diff mbox series

[v3,20/21] ARM: dts: imx6ull-colibri: Add touchscreen used with Eval Board

Message ID 20190807082556.5013-21-philippe.schenker@toradex.com (mailing list archive)
State New, archived
Headers show
Series Common patches from downstream development | expand

Commit Message

Philippe Schenker Aug. 7, 2019, 8:26 a.m. UTC
This adds the common touchscreen that is used with Toradex's
Eval Boards.

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

---

Changes in v3: None
Changes in v2:
- Removed f0710a, that is downstream only
- Changed to generic node name
- Better comment

 .../arm/boot/dts/imx6ull-colibri-eval-v3.dtsi | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Marcel Ziswiler Aug. 9, 2019, 3:54 p.m. UTC | #1
Hi Philippe

On Wed, 2019-08-07 at 08:26 +0000, Philippe Schenker wrote:
> This adds the common touchscreen that is used with Toradex's
> Eval Boards.

Is that really Eval Board specific?

> Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
> 
> ---
> 
> Changes in v3: None
> Changes in v2:
> - Removed f0710a, that is downstream only
> - Changed to generic node name
> - Better comment
> 
>  .../arm/boot/dts/imx6ull-colibri-eval-v3.dtsi | 24
> +++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> index d3c4809f140e..78e74bfeca1b 100644
> --- a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> +++ b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> @@ -112,6 +112,21 @@
>  &i2c1 {
>  	status = "okay";
>  
> +	/*
> +	 * Touchscreen is using SODIMM 28/30, also used for PWM<B>,
> PWM<C>,
> +	 * aka pwm2, pwm3. so if you enable touchscreen, disable the
> pwms
> +	 */
> +	touchscreen@4a {
> +		compatible = "atmel,maxtouch";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_gpiotouch>;
> +		reg = <0x4a>;
> +		interrupt-parent = <&gpio4>;
> +		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;	/* SODIMM 28
> */
> +		reset-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;	/*
> SODIMM 30 */
> +		status = "disabled";
> +	};
> +
>  	/* M41T0M6 real time clock on carrier board */
>  	m41t0m6: rtc@68 {
>  		compatible = "st,m41t0";
> @@ -188,3 +203,12 @@
>  	sd-uhs-sdr104;
>  	status = "okay";
>  };
> +
> +&iomuxc {
> +	pinctrl_gpiotouch: touchgpios {
> +		fsl,pins = <
> +			MX6UL_PAD_NAND_DQS__GPIO4_IO16		0x74
> +			MX6UL_PAD_ENET1_TX_EN__GPIO2_IO05	0x14
> +		>;
> +	};
> +};

I guess that could also be moved to the module's dtsi for any carrier board to potentially profit from.

Cheers

Marcel
Philippe Schenker Aug. 12, 2019, 1:14 p.m. UTC | #2
On Fri, 2019-08-09 at 15:54 +0000, Marcel Ziswiler wrote:
> Hi Philippe
> 
> On Wed, 2019-08-07 at 08:26 +0000, Philippe Schenker wrote:
> > This adds the common touchscreen that is used with Toradex's
> > Eval Boards.
> 
> Is that really Eval Board specific?

Since we provide the needed signals as standard on every Eval Board,
this is not specific to the Eval Board.

> 
> > Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
> > 
> > ---
> > 
> > Changes in v3: None
> > Changes in v2:
> > - Removed f0710a, that is downstream only
> > - Changed to generic node name
> > - Better comment
> > 
> >  .../arm/boot/dts/imx6ull-colibri-eval-v3.dtsi | 24
> > +++++++++++++++++++
> >  1 file changed, 24 insertions(+)
> > 
> > diff --git a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> > b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> > index d3c4809f140e..78e74bfeca1b 100644
> > --- a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> > +++ b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
> > @@ -112,6 +112,21 @@
> >  &i2c1 {
> >  	status = "okay";
> >  
> > +	/*
> > +	 * Touchscreen is using SODIMM 28/30, also used for PWM<B>,
> > PWM<C>,
> > +	 * aka pwm2, pwm3. so if you enable touchscreen, disable the
> > pwms
> > +	 */
> > +	touchscreen@4a {
> > +		compatible = "atmel,maxtouch";
> > +		pinctrl-names = "default";
> > +		pinctrl-0 = <&pinctrl_gpiotouch>;
> > +		reg = <0x4a>;
> > +		interrupt-parent = <&gpio4>;
> > +		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;	/* SODIMM 28
> > */
> > +		reset-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;	/*
> > SODIMM 30 */
> > +		status = "disabled";
> > +	};
> > +
> >  	/* M41T0M6 real time clock on carrier board */
> >  	m41t0m6: rtc@68 {
> >  		compatible = "st,m41t0";
> > @@ -188,3 +203,12 @@
> >  	sd-uhs-sdr104;
> >  	status = "okay";
> >  };
> > +
> > +&iomuxc {
> > +	pinctrl_gpiotouch: touchgpios {
> > +		fsl,pins = <
> > +			MX6UL_PAD_NAND_DQS__GPIO4_IO16		0x74
> > +			MX6UL_PAD_ENET1_TX_EN__GPIO2_IO05	0x14
> > +		>;
> > +	};
> > +};
> 
> I guess that could also be moved to the module's dtsi for any carrier
> board to potentially profit from.

I think this clearly is physically not present on our module so I would
not do that. I like to leave that in here as is, so it offers an example
of how to hook this touchscreen up in DT.

Philippe
> 
> Cheers
> 
> Marcel
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
index d3c4809f140e..78e74bfeca1b 100644
--- a/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
+++ b/arch/arm/boot/dts/imx6ull-colibri-eval-v3.dtsi
@@ -112,6 +112,21 @@ 
 &i2c1 {
 	status = "okay";
 
+	/*
+	 * Touchscreen is using SODIMM 28/30, also used for PWM<B>, PWM<C>,
+	 * aka pwm2, pwm3. so if you enable touchscreen, disable the pwms
+	 */
+	touchscreen@4a {
+		compatible = "atmel,maxtouch";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_gpiotouch>;
+		reg = <0x4a>;
+		interrupt-parent = <&gpio4>;
+		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;	/* SODIMM 28 */
+		reset-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;	/* SODIMM 30 */
+		status = "disabled";
+	};
+
 	/* M41T0M6 real time clock on carrier board */
 	m41t0m6: rtc@68 {
 		compatible = "st,m41t0";
@@ -188,3 +203,12 @@ 
 	sd-uhs-sdr104;
 	status = "okay";
 };
+
+&iomuxc {
+	pinctrl_gpiotouch: touchgpios {
+		fsl,pins = <
+			MX6UL_PAD_NAND_DQS__GPIO4_IO16		0x74
+			MX6UL_PAD_ENET1_TX_EN__GPIO2_IO05	0x14
+		>;
+	};
+};