diff mbox series

[14/22] ARM: dts: apalis-imx6: Add some example I2C devices

Message ID 20190730144649.19022-15-dev@pschenker.ch (mailing list archive)
State New, archived
Headers show
Series This patchset holds some common changes that were never upstreamed. | expand

Commit Message

Philippe Schenker July 30, 2019, 2:46 p.m. UTC
From: Philippe Schenker <philippe.schenker@toradex.com>

Those devices are used in conjunction with Toradex's evalboard.

Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
---

 arch/arm/boot/dts/imx6q-apalis-eval.dts | 95 +++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

Comments

Fabio Estevam July 30, 2019, 8:53 p.m. UTC | #1
On Tue, Jul 30, 2019 at 11:57 AM Philippe Schenker <dev@pschenker.ch> wrote:

>  &backlight {
> @@ -204,6 +228,77 @@
>   */
>  &i2c3 {
>         status = "okay";
> +
> +       adv7280: adv7280@21 {
> +               compatible = "adv7280";
> +               reg = <0x21>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
> +               clocks = <&clks 200>;

Please replace this 200 with a proper clock label.

> +               clock-names = "csi_mclk";
> +               DOVDD-supply = <&reg_3p3v>;
> +               AVDD-supply = <&reg_3p3v>;
> +               DVDD-supply = <&reg_3p3v>;
> +               PVDD-supply = <&reg_3p3v>;
> +               csi_id = <0>;

This is not a valid property upstream.

It seems you just ported it from a downstream vendor kernel. Please
make sure you test with the dt-bindings from mainline.

> +               mclk = <24000000>;
> +               mclk_source = <1>;
> +               status = "okay";
> +       };
> +
> +       /* Video ADC on Analog Camera Module */
> +       adv7180: adv7180@21 {
> +               compatible = "adv,adv7180";
> +               reg = <0x21>;
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
> +               clocks = <&clks 200>;

clock label, please.

> +               clock-names = "csi_mclk";
> +               DOVDD-supply = <&reg_3p3v>; /* 3.3v */
> +               AVDD-supply = <&reg_3p3v>;  /* 1.8v */
> +               DVDD-supply = <&reg_3p3v>;  /* 1.8v */
> +               PVDD-supply = <&reg_3p3v>;  /* 1.8v */
> +               csi_id = <0>;

Same here

> +               mclk = <24000000>;
> +               mclk_source = <1>;
> +               cvbs = <1>;
> +               status = "disabled";
> +       };
> +
> +       max9526: max9526@20 {
> +               compatible = "maxim,max9526";

This is not documented in mainline.
Philippe Schenker July 31, 2019, 11:36 a.m. UTC | #2
On Tue, 2019-07-30 at 17:53 -0300, Fabio Estevam wrote:
> On Tue, Jul 30, 2019 at 11:57 AM Philippe Schenker <dev@pschenker.ch> wrote:
> 
> >  &backlight {
> > @@ -204,6 +228,77 @@
> >   */
> >  &i2c3 {
> >         status = "okay";
> > +
> > +       adv7280: adv7280@21 {
> > +               compatible = "adv7280";
> > +               reg = <0x21>;
> > +               pinctrl-names = "default";
> > +               pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
> > +               clocks = <&clks 200>;
> 
> Please replace this 200 with a proper clock label.
> 
> > +               clock-names = "csi_mclk";
> > +               DOVDD-supply = <&reg_3p3v>;
> > +               AVDD-supply = <&reg_3p3v>;
> > +               DVDD-supply = <&reg_3p3v>;
> > +               PVDD-supply = <&reg_3p3v>;
> > +               csi_id = <0>;
> 
> This is not a valid property upstream.
> 
> It seems you just ported it from a downstream vendor kernel. Please
> make sure you test with the dt-bindings from mainline.
> 
> > +               mclk = <24000000>;
> > +               mclk_source = <1>;
> > +               status = "okay";
> > +       };
> > +
> > +       /* Video ADC on Analog Camera Module */
> > +       adv7180: adv7180@21 {
> > +               compatible = "adv,adv7180";
> > +               reg = <0x21>;
> > +               pinctrl-names = "default";
> > +               pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
> > +               clocks = <&clks 200>;
> 
> clock label, please.
> 
> > +               clock-names = "csi_mclk";
> > +               DOVDD-supply = <&reg_3p3v>; /* 3.3v */
> > +               AVDD-supply = <&reg_3p3v>;  /* 1.8v */
> > +               DVDD-supply = <&reg_3p3v>;  /* 1.8v */
> > +               PVDD-supply = <&reg_3p3v>;  /* 1.8v */
> > +               csi_id = <0>;
> 
> Same here
> 
> > +               mclk = <24000000>;
> > +               mclk_source = <1>;
> > +               cvbs = <1>;
> > +               status = "disabled";
> > +       };
> > +
> > +       max9526: max9526@20 {
> > +               compatible = "maxim,max9526";
> 
> This is not documented in mainline.

Yeah, too much downstream stuff in here. I will drop that patch for now...
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/imx6q-apalis-eval.dts b/arch/arm/boot/dts/imx6q-apalis-eval.dts
index 60ec5e89d215..33193d6137c0 100644
--- a/arch/arm/boot/dts/imx6q-apalis-eval.dts
+++ b/arch/arm/boot/dts/imx6q-apalis-eval.dts
@@ -140,6 +140,30 @@ 
 		regulator-max-microvolt = <3300000>;
 		regulator-always-on;
 	};
+
+	reg_1p8v: regulator-1p8v {
+		compatible = "regulator-fixed";
+		regulator-name = "1P8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-always-on;
+	};
+
+	reg_2p5v: regulator-2p5v {
+		compatible = "regulator-fixed";
+		regulator-name = "2P5V";
+		regulator-min-microvolt = <2500000>;
+		regulator-max-microvolt = <2500000>;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "3P3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
 };
 
 &backlight {
@@ -204,6 +228,77 @@ 
  */
 &i2c3 {
 	status = "okay";
+
+	adv7280: adv7280@21 {
+		compatible = "adv7280";
+		reg = <0x21>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
+		clocks = <&clks 200>;
+		clock-names = "csi_mclk";
+		DOVDD-supply = <&reg_3p3v>;
+		AVDD-supply = <&reg_3p3v>;
+		DVDD-supply = <&reg_3p3v>;
+		PVDD-supply = <&reg_3p3v>;
+		csi_id = <0>;
+		mclk = <24000000>;
+		mclk_source = <1>;
+		status = "okay";
+	};
+
+	/* Video ADC on Analog Camera Module */
+	adv7180: adv7180@21 {
+		compatible = "adv,adv7180";
+		reg = <0x21>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
+		clocks = <&clks 200>;
+		clock-names = "csi_mclk";
+		DOVDD-supply = <&reg_3p3v>; /* 3.3v */
+		AVDD-supply = <&reg_3p3v>;  /* 1.8v */
+		DVDD-supply = <&reg_3p3v>;  /* 1.8v */
+		PVDD-supply = <&reg_3p3v>;  /* 1.8v */
+		csi_id = <0>;
+		mclk = <24000000>;
+		mclk_source = <1>;
+		cvbs = <1>;
+		status = "disabled";
+	};
+
+	max9526: max9526@20 {
+		compatible = "maxim,max9526";
+		reg = <0x20>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu1_csi0 &pinctrl_cam_mclk>;
+		clocks = <&clks 200>;
+		clock-names = "csi_mclk";
+		DVDDIO-supply = <&reg_3p3v>; /* 3.3v */
+		AVDD-supply = <&reg_3p3v>;  /* 1.8v */
+		DVDD-supply = <&reg_3p3v>;  /* 1.8v */
+		csi_id = <0>;
+		mclk = <24000000>;
+		mclk_source = <1>;
+		cvbs = <1>;
+		status = "okay";
+	};
+
+	ov5640_mipi@3c {
+		compatible = "ovti,ov564x_mipi";
+		reg = <0x3c>;
+		clocks = <&clks 147>;
+		clock-names = "csi_mclk";
+		DOVDD-supply = <&reg_1p8v>;
+		AVDD-supply = <&reg_2p5v>;
+		DVDD-supply = <&reg_1p8v>;
+		pwn-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+		rst-gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+		ipu_id = <0>;
+		csi_id = <1>;
+		mclk = <22000000>;
+		mclk_source = <0>;
+		pwms = <&pwm3 0 45 0>;
+		status = "okay";
+	};
 };
 
 &ipu1_di1_disp1 {