Re: [PATCH v2 05/19] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors
On 01/04/2017 07:26 AM, Fabio Estevam wrote: On Tue, Jan 3, 2017 at 6:57 PM, Steve Longerbeam wrote: + camera: ov5642@3c { + compatible = "ovti,ov5642"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5642>; + clocks = <&clks IMX6QDL_CLK_CKO>; + clock-names = "xclk"; + reg = <0x3c>; + xclk = <2400>; + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 + rev B board is VGEN5 */ Please use vgen3 so that by default we have the valid AVDD-supply for revC boards which is more recent and more the users have access to. done. + mipi_camera: ov5640@3c { + compatible = "ovti,ov5640_mipi"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5640>; + reg = <0x3c>; + clocks = <&clks IMX6QDL_CLK_CKO>; + clock-names = "xclk"; + xclk = <2400>; + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 + rev B board is VGEN5 */ Same here. done. + pinctrl_ov5640: ov5640grp { + fsl,pins = < + MX6QDL_PAD_SD1_DAT2__GPIO1_IO19 0x8000 + MX6QDL_PAD_SD1_CLK__GPIO1_IO20 0x8000 Please avoid all the 0x8000 IOMUX settings and replace them by their real values. yeah, finally got around to this, done! Steve
Re: [PATCH v2 05/19] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors
On 01/04/2017 04:33 AM, Vladimir Zapolskiy wrote: + + camera: ov5642@3c { ov5642: camera@3c done. + pwdn-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; /* SD1_DAT0 */ + reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; /* SD1_DAT1 */ Comments about SD1_* pad names are redundant. sure, removed. + status = "disabled"; Why is it disabled here? It's explained in the header. I don't yet have the OV5642 module for the sabresd for testing, so it is disabled for now. + + mipi_camera: ov5640@3c { ov5640: camera@3c done. + pwdn-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; /* SD1_DAT2 */ + reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; /* SD1_CLK */ Comments about SD1_* pad names are redundant. removed. + + pinctrl_ipu1_csi0: ipu1grp-csi0 { Please rename the node name to ipu1csi0grp. Please add new pin control groups preserving the alphanimerical order. done and done. Steve
Re: [PATCH v2 05/19] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors
On Tue, Jan 3, 2017 at 6:57 PM, Steve Longerbeam wrote: > + camera: ov5642@3c { > + compatible = "ovti,ov5642"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5642>; > + clocks = <&clks IMX6QDL_CLK_CKO>; > + clock-names = "xclk"; > + reg = <0x3c>; > + xclk = <2400>; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 > + rev B board is VGEN5 */ Please use vgen3 so that by default we have the valid AVDD-supply for revC boards which is more recent and more the users have access to. > + mipi_camera: ov5640@3c { > + compatible = "ovti,ov5640_mipi"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5640>; > + reg = <0x3c>; > + clocks = <&clks IMX6QDL_CLK_CKO>; > + clock-names = "xclk"; > + xclk = <2400>; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 > + rev B board is VGEN5 */ Same here. > + pinctrl_ov5640: ov5640grp { > + fsl,pins = < > + MX6QDL_PAD_SD1_DAT2__GPIO1_IO19 0x8000 > + MX6QDL_PAD_SD1_CLK__GPIO1_IO20 0x8000 Please avoid all the 0x8000 IOMUX settings and replace them by their real values.
Re: [PATCH v2 05/19] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors
On 01/03/2017 10:57 PM, Steve Longerbeam wrote: > Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. > > The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux. > > The OV5640 connects to the input port on the MIPI CSI-2 receiver on > mipi_csi. It is set to transmit over MIPI virtual channel 1. > > Until the OV5652 sensor module compatible with the SabreSD becomes > available for testing, the ov5642 node is currently disabled. > > Signed-off-by: Steve Longerbeam > --- [snip] > + > + camera: ov5642@3c { ov5642: camera@3c > + compatible = "ovti,ov5642"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5642>; > + clocks = <&clks IMX6QDL_CLK_CKO>; > + clock-names = "xclk"; > + reg = <0x3c>; > + xclk = <2400>; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 > + rev B board is VGEN5 */ > + DVDD-supply = <&vgen2_reg>; /* 1.5v*/ > + pwdn-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; /* SD1_DAT0 */ > + reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; /* SD1_DAT1 */ Comments about SD1_* pad names are redundant. > + status = "disabled"; Why is it disabled here? > + > + port { > + ov5642_to_ipu1_csi0_mux: endpoint { > + remote-endpoint = > <&ipu1_csi0_mux_from_parallel_sensor>; > + bus-width = <8>; > + hsync-active = <1>; > + vsync-active = <1>; > + }; > + }; > + }; > }; > > &i2c2 { > @@ -322,6 +376,34 @@ > }; > }; > }; > + > + mipi_camera: ov5640@3c { ov5640: camera@3c > + compatible = "ovti,ov5640_mipi"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_ov5640>; > + reg = <0x3c>; > + clocks = <&clks IMX6QDL_CLK_CKO>; > + clock-names = "xclk"; > + xclk = <2400>; > + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ > + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 > + rev B board is VGEN5 */ > + DVDD-supply = <&vgen2_reg>; /* 1.5v*/ > + pwdn-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; /* SD1_DAT2 */ > + reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; /* SD1_CLK */ Comments about SD1_* pad names are redundant. > + > + port { > + #address-cells = <1>; > + #size-cells = <0>; > + > + ov5640_to_mipi_csi: endpoint@1 { > + reg = <1>; > + remote-endpoint = <&mipi_csi_from_mipi_sensor>; > + data-lanes = <0 1>; > + clock-lanes = <2>; > + }; > + }; > + }; > }; > > &i2c3 { > @@ -426,6 +508,36 @@ > >; > }; > > + pinctrl_ov5640: ov5640grp { > + fsl,pins = < > + MX6QDL_PAD_SD1_DAT2__GPIO1_IO19 0x8000 > + MX6QDL_PAD_SD1_CLK__GPIO1_IO20 0x8000 > + >; > + }; > + > + pinctrl_ov5642: ov5642grp { > + fsl,pins = < > + MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x8000 > + MX6QDL_PAD_SD1_DAT1__GPIO1_IO17 0x8000 > + >; > + }; > + > + pinctrl_ipu1_csi0: ipu1grp-csi0 { Please rename the node name to ipu1csi0grp. Please add new pin control groups preserving the alphanimerical order. > + fsl,pins = < > + MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 > 0x8000 > + MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 > 0x8000 > + MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 > 0x8000 > + MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 > 0x8000 > + MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 > 0x8000 > + MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 > 0x8000 > + MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18 > 0x8000 > + MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19 > 0x8000 > + MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK > 0x8000 > + MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC > 0x8000 > + MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC > 0x8000 > +
[PATCH v2 05/19] ARM: dts: imx6-sabresd: add OV5642 and OV5640 camera sensors
Enables the OV5642 parallel-bus sensor, and the OV5640 MIPI CSI-2 sensor. The OV5642 connects to the parallel-bus mux input port on ipu1_csi0_mux. The OV5640 connects to the input port on the MIPI CSI-2 receiver on mipi_csi. It is set to transmit over MIPI virtual channel 1. Until the OV5652 sensor module compatible with the SabreSD becomes available for testing, the ov5642 node is currently disabled. Signed-off-by: Steve Longerbeam --- arch/arm/boot/dts/imx6dl-sabresd.dts | 5 ++ arch/arm/boot/dts/imx6q-sabresd.dts| 5 ++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 114 - 3 files changed, 123 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx6dl-sabresd.dts b/arch/arm/boot/dts/imx6dl-sabresd.dts index 1e45f2f..6cf7a50 100644 --- a/arch/arm/boot/dts/imx6dl-sabresd.dts +++ b/arch/arm/boot/dts/imx6dl-sabresd.dts @@ -15,3 +15,8 @@ model = "Freescale i.MX6 DualLite SABRE Smart Device Board"; compatible = "fsl,imx6dl-sabresd", "fsl,imx6dl"; }; + +&ipu1_csi1_from_ipu1_csi1_mux { + data-lanes = <0 1>; + clock-lanes = <2>; +}; diff --git a/arch/arm/boot/dts/imx6q-sabresd.dts b/arch/arm/boot/dts/imx6q-sabresd.dts index 9cbdfe7..8c1d7ad 100644 --- a/arch/arm/boot/dts/imx6q-sabresd.dts +++ b/arch/arm/boot/dts/imx6q-sabresd.dts @@ -23,3 +23,8 @@ &sata { status = "okay"; }; + +&ipu1_csi1_from_mipi_vc1 { + data-lanes = <0 1>; + clock-lanes = <2>; +}; diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index 55ef535..39b4228 100644 --- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi @@ -10,6 +10,7 @@ * http://www.gnu.org/copyleft/gpl.html */ +#include #include #include @@ -146,6 +147,33 @@ }; }; +&ipu1_csi0_from_ipu1_csi0_mux { + bus-width = <8>; + data-shift = <12>; /* Lines 19:12 used */ + hsync-active = <1>; + vsync-active = <1>; +}; + +&ipu1_csi0_mux_from_parallel_sensor { + remote-endpoint = <&ov5642_to_ipu1_csi0_mux>; +}; + +&ipu1_csi0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ipu1_csi0>; +}; + +&mipi_csi { + status = "okay"; +}; + +/* Incoming port from sensor */ +&mipi_csi_from_mipi_sensor { + remote-endpoint = <&ov5640_to_mipi_csi>; + data-lanes = <0 1>; + clock-lanes = <2>; +}; + &audmux { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_audmux>; @@ -214,7 +242,33 @@ 0x8014 /* 4:FN_DMICCDAT */ 0x /* 5:Default */ >; - }; + }; + + camera: ov5642@3c { + compatible = "ovti,ov5642"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5642>; + clocks = <&clks IMX6QDL_CLK_CKO>; + clock-names = "xclk"; + reg = <0x3c>; + xclk = <2400>; + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 + rev B board is VGEN5 */ + DVDD-supply = <&vgen2_reg>; /* 1.5v*/ + pwdn-gpios = <&gpio1 16 GPIO_ACTIVE_HIGH>; /* SD1_DAT0 */ + reset-gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; /* SD1_DAT1 */ + status = "disabled"; + + port { + ov5642_to_ipu1_csi0_mux: endpoint { + remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>; + bus-width = <8>; + hsync-active = <1>; + vsync-active = <1>; + }; + }; + }; }; &i2c2 { @@ -322,6 +376,34 @@ }; }; }; + + mipi_camera: ov5640@3c { + compatible = "ovti,ov5640_mipi"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5640>; + reg = <0x3c>; + clocks = <&clks IMX6QDL_CLK_CKO>; + clock-names = "xclk"; + xclk = <2400>; + DOVDD-supply = <&vgen4_reg>; /* 1.8v */ + AVDD-supply = <&vgen5_reg>; /* 2.8v, rev C board is VGEN3 + rev B board is VGEN5 */ + DVDD-supply = <&vgen2_reg>; /* 1.5v*/ + pwdn-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; /* SD1_DAT2 */ + reset-gpios = <&gpio1 20 GPIO_ACTIVE_LOW>; /* SD1_CLK */ + + port { + #address-cells = <1>; + #size-cells = <0>; + + ov5640_to_mipi_csi: endpoint@1 { + reg = <1>; + remote-endpoint = <&mipi_csi_from_mipi_sensor>; + data-lanes = <0 1>; +