Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX8M-L/Peripherals/MIPI

3,190 bytes added, 11:23, 15 February 2023
Peripheral MIPI
=== Device tree configuration ===
 
==== ORCA ====
 
Here below an example of device tree configuration used on standard DAVE's kit for the ORCA SOM:
</pre>
==== MINI ==== Here below an example of device tree configuration used on standard DAVE's kit for the MINI SOM: From <code>imx8mm-mito8mmini.dts</code>: <pre>...... regulators {...... reg_csi_en: regulator-csi-en { compatible = "regulator-fixed"; regulator-name = "csi_enable"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_csi_pwn>; gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; enable-active-high; regulator-always-on; };......&csi1_bridge { fsl,mipi-mode; status = "okay"; port { csi1_ep: endpoint { remote-endpoint = <&csi1_mipi_ep>; }; };};......&i2c3 {...... /* Digilent Pcam 5C */ ov5640_mipi: ov5640_mipi@3c { compatible = "ovti,ov5640_mipi"; reg = <0x3c>; status = "okay"; pinctrl-names = "default"; clocks = <&clk IMX8MM_CLK_CLKO1>; clock-names = "csi_mclk"; assigned-clocks = <&clk IMX8MM_CLK_CLKO1>; assigned-clock-parents = <&clk IMX8MM_CLK_24M>; assigned-clock-rates = <24000000>; csi_id = <0>; mclk = <24000000>; mclk_source = <0>; port { ov5640_mipi1_ep: endpoint { remote-endpoint = <&mipi1_sensor_ep>; }; }; };};......&mipi_csi_1 {...... port { mipi1_sensor_ep: endpoint@1 { remote-endpoint = <&ov5640_mipi1_ep>; data-lanes = <2>; csis-hs-settle = <13>; csis-clk-settle = <2>; csis-wclk; };  csi1_mipi_ep: endpoint@2 { remote-endpoint = <&csi1_ep>; }; };};......&mipi_dsi { status = "disabled";};......&iomuxc {...... pinctrl_csi_pwn: csi_pwn_grp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x19 >; };...... </pre> ===Accessing the peripheralin ORCA SOM===
====Linux messages at boot time====
Freeing pipeline ...
root@desk-mx8mp:~#
</pre>
 
===Accessing the peripheral in MINI SOM===
 
====Linux messages at boot time====
 
MIPI CSI-2 driver initialized:
 
<pre class="workstation-terminal">
...
...
root@desk-mx8mm:~# dmesg | grep -i mxc_mipi
[ 2.551615] mxc_mipi-csi 32e30000.mipi_csi: 32e30000.mipi_csi supply mipi-phy not found, using dummy regulator
[ 2.561820] mxc_mipi-csi 32e30000.mipi_csi: mipi csi v4l2 device registered
[ 2.568795] CSI: Registered sensor subdevice: mxc_mipi-csi.0
[ 2.574482] mxc_mipi-csi 32e30000.mipi_csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 333000000
...
...
</pre>
 
and if a MIPI camera is inserted, it has been recognized and its video driver loaded:
 
<pre class="workstation-terminal">
root@desk-mx8mm:~# dmesg | grep -i ov5640
[ 3.249776] ov5640_mipi 2-003c: No pin available
[ 3.254421] ov5640_mipi 2-003c: No sensor pwdn pin available
[ 3.260093] ov5640_mipi 2-003c: No sensor reset pin available
[ 3.265879] ov5640_mipi 2-003c: 2-003c supply DOVDD not found, using dummy regulator
[ 3.273677] ov5640_mipi 2-003c: 2-003c supply DVDD not found, using dummy regulator
[ 3.281380] ov5640_mipi 2-003c: 2-003c supply AVDD not found, using dummy regulator
[ 4.975637] mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: ov5640_mipi 2-003c
[ 4.993052] ov5640_mipi 2-003c: Camera is found
root@desk-mx8mm:~# ls -la /sys/bus/i2c/drivers/ov5640_mipi/2-003c
lrwxrwxrwx 1 root root 0 Feb 15 10:43 /sys/bus/i2c/drivers/ov5640_mipi/2-003c -> ../../../../devices/platform/soc@0/soc@0:bus@30800000/30a40000.i2c/i2c-2/2-003c
</pre>
dave_user
424
edits