更新ISP传感器配置
SL1680 supports multiple camera sensors. By default, SL1680 is configured to use the OV5647 module with port CSI0. But, the software can be configured to use any of the supported sensor modules. Some configurations require setting a device tree overlay to function correctly.
备注
Starting with release v1.5, the default sensor is now the OV5647 module.
已支持的相机模块
Sensor
Module
Interface
Adapter Board
Device Tree Overlay
IMX258
Synaptics IMX258 Camera Module
MIPI-CSI 0
Synaptics SL1680 MIPI CSI Adaptor Board
dolphin-csi0-with-expander.dtbo
IMX415
Synaptics IMX415 Camera Module
MIPI-CSI 0
Synaptics SL1680 MIPI CSI Adaptor Board
dolphin-csi0-with-expander.dtbo
OV5647
Arducam 5MP OV5647 Camera Module
MIPI-CSI 0 MIPI-CSI 1 Dual CSI0/1
None None None
N/A dolphin-csi1-without-expander.dtbo dolphin-bothcsi-without-expander.dtbo
更换摄像头传感器模块
The file /proc/vsi/isp_subdev0
is used to display the sensor configuration properties
and to update the sensor configuration.
当前的传感器配置
The current sensor configuration can be viewed by read from the /proc/vsi/isp_subdev0
file.

Reading the current sensor configuration
配置新模块
To change the sensor configuration, update the /usr/sbin/isp_media_server.sh
script.
Change the line which writes the sensor config to /proc/vsi/isp_subdev0
.
Update the sensor name, xml, and json files for the new sensor.

Each camera sensor module contains one or more XML configuration files located in /usr/share
.

List of sensor config files
Then restart the isp_media_server service to apply the update.
systemctl restart isp_media_server
备注
To apply these changes to an image, modify the meta-synaptics/recipes-devtools/synasdk/files/isp_media_server.sh
script as described below.
更新设备树覆盖
Different sensors may require different settings in device tree.
Astra supports device tree overlays for modifying the device tree settings for different sensors.
Setting the device tree overlay requires booting into U-Boot and setting the dtbo
variable
to the required device tree overlay. See 带SUBoot的U-Boot提示符 for instructions on getting
to the U-Boot prompt.
Once at the U-Boot prompt run the following commands to enable the Device Tree Overlay.
Set the dtbo
variables:
=> setenv dtbo dolphin-csi0-with-expander.dtbo
Save the environment to the eMMC so that the new variable will persist across reboots.
=> saveenv
Saving Environment to MMC... Writing to redundant MMC(0)... OK
Optionally, confirm that the variable was correctly set.
=> printenv
altbootcmd=if test ${boot_slot} = 1; then bootslot set b; bootcount reset;bootcount reset; run bootcmd; else bootslot set a; bootcount reset; bootcount reset; run bootcmd; fi
autoload=n
baudrate=115200
bootcmd=bootmmc
bootcount=1
bootdelay=0
bootlimit=3
dtbo=dolphin-csi0-with-expander.dtbo
fdtcontroladdr=2172e190
preboot=show_logo;
upgrade_available=0
ver=U-Boot 2019.10 (Nov 21 2024 - 14:01:42 +0000)
Environment size: 407/65531 bytesboo
Finally, boot with the new overlay applied.
=> boot
Supported device tree overlays are included in the Linux Kernel Overlay Repository. If you are using a different sensor you may need to add a custom overlay.
备注
Support for device tree overlays were added in release v1.5.
使用OV5647传感器
Astra Machina SL1680 supports using the OV5647 sensor on either the CSI0 (22-pin),
or the CSI1 (15-pin) connector, or both simultaneously.
Connecting a single OV5647 sensor to CSI0 is the default configuration.
Connecting a single OV5647 sensor to CSI1 requires enabling the dolphin-csi1-without-expander.dtbo
overlay.
Using two OV5647 sensors simultaneously requires enabling the dolphin-bothcsi-without-expander.dtbo
overlay.
备注
Release v1.4 adds support for using an OV5647 sensor on CSI1. Previous versions only support using OV5647 on CSI0.
备注
Release v1.5 adds support for using CSI0 and CSI1 simultaneously with two OV5647 sensors.
启用IMX258和IMX415传感器
Astra Machina SL1680 supports the IMX258 and IMX415 sensors connected to CSI0.
These sensors use a GPIO expander which requires the dolphin-csi0-with-expander.dtbo
overlay.
备注
Using the IMX258 and IMX415 on CSI1 is not supported on Synaptics Astra Machina boards since CSI1 is not compatible with the GPIO expander.
In addition to enabling the dolphin-csi0-with-expander.dtbo
,
the sensor configuration needs to be updated to use the new sensor.
Apply the following changes to isp_media_server.sh
as describe in the previous section:
更换摄像头传感器模块 .
Configuration for IMX258:
diff --git a/recipes-devtools/synasdk/files/isp_media_server.sh b/recipes-devtools/synasdk/files/isp_media_server.sh
index 4f603fb..c5cd9b1 100644
--- a/recipes-devtools/synasdk/files/isp_media_server.sh
+++ b/recipes-devtools/synasdk/files/isp_media_server.sh
@@ -26,7 +26,7 @@ set -e
case $1 in
start)
- echo "sensor=ov5647 xml=/usr/share/OV5647_480p.xml manu_json=/usr/share/ISP_Manual_IMX258.json \
+ echo "sensor=imx258 xml=/usr/share/IMX258.xml manu_json=/usr/share/ISP_Manual_IMX258.json \
auto_json=/usr/share/ISP_Auto.json i2c_bus_id=3 mipi_id=0 mode=0" > /proc/vsi/isp_subdev0
echo "1 sensor=ov5647 1 xml=/usr/share/OV5647_480p.xml 1 manu_json=/usr/share/ISP_Manual_IMX258.json \
1 auto_json=/usr/share/ISP_Auto.json 1 i2c_bus_id=0 1 mipi_id=1 1 mode=0" > /proc/vsi/isp_subdev0
Configuration for IMX415:
diff --git a/recipes-devtools/synasdk/files/isp_media_server.sh b/recipes-devtools/synasdk/files/isp_media_server.sh
index 4f603fb..c5cd9b1 100644
--- a/recipes-devtools/synasdk/files/isp_media_server.sh
+++ b/recipes-devtools/synasdk/files/isp_media_server.sh
@@ -26,7 +26,7 @@ set -e
case $1 in
start)
- echo "sensor=ov5647 xml=/usr/share/OV5647_480p.xml manu_json=/usr/share/ISP_Manual_IMX258.json \
+ echo "sensor=imx415 xml=/usr/share/IMX415.xml manu_json=/usr/share/ISP_Manual_IMX415.json \
auto_json=/usr/share/ISP_Auto.json i2c_bus_id=3 mipi_id=0 mode=0" > /proc/vsi/isp_subdev0
echo "1 sensor=ov5647 1 xml=/usr/share/OV5647_480p.xml 1 manu_json=/usr/share/ISP_Manual_IMX258.json \
1 auto_json=/usr/share/ISP_Auto.json 1 i2c_bus_id=0 1 mipi_id=1 1 mode=0" > /proc/vsi/isp_subdev0