From 8f1b8afa036ea0a9b21fbf0e9b42e797dd4fdebe Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Tue, 16 Jan 2018 15:39:01 +0100 Subject: apalis-imx8qm: improve OV5640 MIPI CSI2 support With a valid master clock and power down/reset GPIO correctly specified the sensor is detectable via I2C. However, the sensor driver does not work with the i.MX8QM camera stack yet, further investigations are needed. Signed-off-by: Stefan Agner --- .../arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts | 101 ++++++--------------- 1 file changed, 26 insertions(+), 75 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts b/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts index fbfcf378dac4..f112ee16d16e 100644 --- a/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts +++ b/arch/arm64/boot/dts/freescale/fsl-imx8qm-apalis.dts @@ -73,6 +73,12 @@ &iomuxc { imx8qm-apalis { + pinctrl_cam: camgrp { + fsl,pins = < + SC_P_M40_GPIO0_00_LSIO_GPIO0_IO08 0x06000021 + SC_P_M40_GPIO0_01_LSIO_GPIO0_IO09 0x06000021 + >; + }; pinctrl_fec1: fec1grp { fsl,pins = < @@ -425,54 +431,6 @@ status = "okay"; }; -&i2c0_mipi_csi0 { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - clock-frequency = <100000>; - status = "okay"; - - max9286_mipi@6A { - compatible = "maxim,max9286_mipi"; - reg = <0x6A>; - clocks = <&clk IMX8QM_CLK_DUMMY>; - clock-names = "capture_mclk"; - mclk = <27000000>; - mclk_source = <0>; - virtual-channel; - port { - max9286_0_ep: endpoint { - remote-endpoint = <&mipi_csi0_ep>; - data-lanes = <1 2 3 4>; - }; - }; - }; -}; - -&i2c0_mipi_csi1 { - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - clock-frequency = <100000>; - status = "disabled"; - - max9286_mipi@6A { - compatible = "maxim,max9286_mipi"; - reg = <0x6A>; - clocks = <&clk IMX8QM_CLK_DUMMY>; - clock-names = "capture_mclk"; - mclk = <27000000>; - mclk_source = <0>; - virtual-channel; - port { - max9286_1_ep: endpoint { - remote-endpoint = <&mipi_csi1_ep>; - data-lanes = <1 2 3 4>; - }; - }; - }; -}; - &hdmi { compatible = "fsl,imx8qm-hdmi"; status = "okay"; @@ -526,25 +484,34 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_lpi2c3>; status = "okay"; -/* + ov5640_mipi@3c { - compatible = "ovti,ov564x_mipi"; + /*compatible = "ovti,ov564x_mipi";*/ + compatible = "ovti,ov5640_mipi"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_cam>; reg = <0x3c>; - clocks = <&clks 147>; - clock-names = "csi_mclk"; + /* DOVDD-supply = <®_1p8v>; AVDD-supply = <®_2p5v>; DVDD-supply = <®_1p8v>; - pwn-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>; - rst-gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + */ + pwn-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + rst-gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; ipu_id = <0>; csi_id = <1>; - mclk = <22000000>; + mclk = <24000000>; mclk_source = <0>; - pwms = <&pwm3 0 45 0>; - status = "okay"; + status = "disabled"; + + port { + ov5640_ep: endpoint { + remote-endpoint = <&mipi_csi1_ep>; + data-lanes = <1 2 3 4>; + }; + }; }; -*/ + }; /* Apalis UART3 */ @@ -577,22 +544,6 @@ status = "okay"; }; -&mipi_csi_0 { - #address-cells = <1>; - #size-cells = <0>; - virtual-channel; - status = "okay"; - - /* Camera 0 MIPI CSI-2 (CSIS0) */ - port@0 { - reg = <0>; - mipi_csi0_ep: endpoint { - remote-endpoint = <&max9286_0_ep>; - data-lanes = <1 2 3 4>; - }; - }; -}; - &mipi_csi_1 { #address-cells = <1>; #size-cells = <0>; @@ -603,7 +554,7 @@ port@1 { reg = <1>; mipi_csi1_ep: endpoint { - remote-endpoint = <&max9286_1_ep>; + remote-endpoint = <&ov5640_ep>; data-lanes = <1 2 3 4>; }; }; -- cgit v1.2.3