Re: [PATCH v2 2/4] ARM: dts: vf500-colibri: Add device tree node for touchscreen support

2015-07-27 Thread Shawn Guo
On Thu, Jul 16, 2015 at 08:43:20PM +0530, Sanchayan Maity wrote:
> Add device tree node for touchscreen support on Colibri VF50. The
> touchscreen functionality on VF50 uses the ADC channels of Vybrid
> and some GPIOs. Also add pinctrl nodes for proper pinmux.
> 
> Signed-off-by: Sanchayan Maity 
> ---
>  arch/arm/boot/dts/vf500-colibri-eval-v3.dts |  4 +++
>  arch/arm/boot/dts/vf500-colibri.dtsi| 46 
> +
>  2 files changed, 50 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/vf500-colibri-eval-v3.dts 
> b/arch/arm/boot/dts/vf500-colibri-eval-v3.dts
> index 7fc782c..c5efb57 100644
> --- a/arch/arm/boot/dts/vf500-colibri-eval-v3.dts
> +++ b/arch/arm/boot/dts/vf500-colibri-eval-v3.dts
> @@ -15,3 +15,7 @@
>   model = "Toradex Colibri VF50 on Colibri Evaluation Board";
>   compatible = "toradex,vf500-colibri_vf50-on-eval", 
> "toradex,vf500-colibri_vf50", "fsl,vf500";
>  };
> +
> +&touchctrl {
> + status = "okay";
> +};
> diff --git a/arch/arm/boot/dts/vf500-colibri.dtsi 
> b/arch/arm/boot/dts/vf500-colibri.dtsi
> index cee34a3..7cbe341 100644
> --- a/arch/arm/boot/dts/vf500-colibri.dtsi
> +++ b/arch/arm/boot/dts/vf500-colibri.dtsi
> @@ -17,4 +17,50 @@
>   memory {
>   reg = <0x8000 0x800>;
>   };
> +
> + touchctrl: vf50_touchctrl {

Minus rather than underscore should be used in node name.  And node name
should be generic.  "touchscreen" might be a good choice.

Shawn

> + compatible = "toradex,vf50-touchctrl";
> + io-channels = <&adc1 0>,<&adc0 0>,
> + <&adc0 1>,<&adc1 2>;
> + xp-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
> + xm-gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
> + yp-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
> + ym-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
> + pen-detect-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
> + pen-pullup-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
> + pinctrl-names = "idle","default","gpios";
> + pinctrl-0 = <&pinctrl_touchctrl_idle>;
> + pinctrl-1 = <&pinctrl_touchctrl_default>;
> + pinctrl-2 = <&pinctrl_touchctrl_gpios>;
> + status = "disabled";
> + };
> +};
> +
> +&iomuxc {
> + vf610-colibri {
> + pinctrl_touchctrl_idle: touchctrl_idle {
> + fsl,pins = <
> + VF610_PAD_PTA18__GPIO_8 0x206d
> + VF610_PAD_PTA19__GPIO_9 0x206d
> + >;
> + };
> +
> + pinctrl_touchctrl_default: touchctrl_default {
> + fsl,pins = <
> + VF610_PAD_PTA18__ADC0_SE0   0x2060
> + VF610_PAD_PTA19__ADC0_SE1   0x2060
> + VF610_PAD_PTA16__ADC1_SE0   0x2060
> + VF610_PAD_PTB2__ADC1_SE20x2060
> + >;
> + };
> +
> + pinctrl_touchctrl_gpios: touchctrl_gpios {
> + fsl,pins = <
> + VF610_PAD_PTA23__GPIO_130x22e9
> + VF610_PAD_PTB23__GPIO_930x22e9
> + VF610_PAD_PTA22__GPIO_120x22e9
> + VF610_PAD_PTA11__GPIO_4 0x22e9
> + >;
> + };
> + };
>  };
> -- 
> 2.4.6
> 
> 
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v2 2/4] ARM: dts: vf500-colibri: Add device tree node for touchscreen support

2015-07-16 Thread Sanchayan Maity
Add device tree node for touchscreen support on Colibri VF50. The
touchscreen functionality on VF50 uses the ADC channels of Vybrid
and some GPIOs. Also add pinctrl nodes for proper pinmux.

Signed-off-by: Sanchayan Maity 
---
 arch/arm/boot/dts/vf500-colibri-eval-v3.dts |  4 +++
 arch/arm/boot/dts/vf500-colibri.dtsi| 46 +
 2 files changed, 50 insertions(+)

diff --git a/arch/arm/boot/dts/vf500-colibri-eval-v3.dts 
b/arch/arm/boot/dts/vf500-colibri-eval-v3.dts
index 7fc782c..c5efb57 100644
--- a/arch/arm/boot/dts/vf500-colibri-eval-v3.dts
+++ b/arch/arm/boot/dts/vf500-colibri-eval-v3.dts
@@ -15,3 +15,7 @@
model = "Toradex Colibri VF50 on Colibri Evaluation Board";
compatible = "toradex,vf500-colibri_vf50-on-eval", 
"toradex,vf500-colibri_vf50", "fsl,vf500";
 };
+
+&touchctrl {
+   status = "okay";
+};
diff --git a/arch/arm/boot/dts/vf500-colibri.dtsi 
b/arch/arm/boot/dts/vf500-colibri.dtsi
index cee34a3..7cbe341 100644
--- a/arch/arm/boot/dts/vf500-colibri.dtsi
+++ b/arch/arm/boot/dts/vf500-colibri.dtsi
@@ -17,4 +17,50 @@
memory {
reg = <0x8000 0x800>;
};
+
+   touchctrl: vf50_touchctrl {
+   compatible = "toradex,vf50-touchctrl";
+   io-channels = <&adc1 0>,<&adc0 0>,
+   <&adc0 1>,<&adc1 2>;
+   xp-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+   xm-gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
+   yp-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+   ym-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
+   pen-detect-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+   pen-pullup-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+   pinctrl-names = "idle","default","gpios";
+   pinctrl-0 = <&pinctrl_touchctrl_idle>;
+   pinctrl-1 = <&pinctrl_touchctrl_default>;
+   pinctrl-2 = <&pinctrl_touchctrl_gpios>;
+   status = "disabled";
+   };
+};
+
+&iomuxc {
+   vf610-colibri {
+   pinctrl_touchctrl_idle: touchctrl_idle {
+   fsl,pins = <
+   VF610_PAD_PTA18__GPIO_8 0x206d
+   VF610_PAD_PTA19__GPIO_9 0x206d
+   >;
+   };
+
+   pinctrl_touchctrl_default: touchctrl_default {
+   fsl,pins = <
+   VF610_PAD_PTA18__ADC0_SE0   0x2060
+   VF610_PAD_PTA19__ADC0_SE1   0x2060
+   VF610_PAD_PTA16__ADC1_SE0   0x2060
+   VF610_PAD_PTB2__ADC1_SE20x2060
+   >;
+   };
+
+   pinctrl_touchctrl_gpios: touchctrl_gpios {
+   fsl,pins = <
+   VF610_PAD_PTA23__GPIO_130x22e9
+   VF610_PAD_PTB23__GPIO_930x22e9
+   VF610_PAD_PTA22__GPIO_120x22e9
+   VF610_PAD_PTA11__GPIO_4 0x22e9
+   >;
+   };
+   };
 };
-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/