ARM: dts: cm-t54: add ADS7846 touchscreen support
authorDmitry Lifshitz <lifshitz@compulab.co.il>
Wed, 17 Sep 2014 12:10:07 +0000 (15:10 +0300)
committerTony Lindgren <tony@atomide.com>
Thu, 18 Sep 2014 16:07:52 +0000 (09:07 -0700)
Add ADS7846 touchscreen support.

Signed-off-by: Dmitry Lifshitz <lifshitz@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/omap5-cm-t54.dts

index 7323b7078cdd73a7f16cad026b82953620eb212e..88f3dc6f183500a6c48f504bd1c872e7d997dd9e 100644 (file)
                enable-active-high;
        };
 
+       ads7846reg: ads7846-reg {
+               compatible = "regulator-fixed";
+               regulator-name = "ads7846-reg";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+       };
+
        /* HS USB Host PHY on PORT 2 */
        hsusb2_phy: hsusb2_phy {
                compatible = "usb-nop-xceiv";
        };
 };
 
+&omap5_pmx_wkup {
+
+       ads7846_pins: pinmux_ads7846_pins {
+               pinctrl-single,pins = <
+                       0x02 (PIN_INPUT_PULLDOWN | MUX_MODE6)  /* llib_wakereqin.gpio1_wk15 */
+               >;
+       };
+};
+
 &omap5_pmx_core {
        pinctrl-names = "default";
        pinctrl-0 = <
                        OMAP5_IOPAD(0x013a, PIN_OUTPUT | MUX_MODE3) /* gpio6_187.dispc_data23 */
                >;
        };
+
+       mcspi2_pins: pinmux_mcspi1_pins {
+               pinctrl-single,pins = <
+                       OMAP5_IOPAD(0x00fc, PIN_INPUT | MUX_MODE0) /* mcspi2_clk */
+                       OMAP5_IOPAD(0x00fe, PIN_INPUT | MUX_MODE0) /* mcspi2_simo */
+                       OMAP5_IOPAD(0x0100, PIN_INPUT | MUX_MODE0) /* mcspi2_somi */
+                       OMAP5_IOPAD(0x0102, PIN_INPUT | MUX_MODE0) /* mcspi2_cs0 */
+               >;
+       };
+};
+
+&mcspi2 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&mcspi2_pins>;
+
+       /* touch controller */
+       ads7846@0 {
+               pinctrl-names = "default";
+               pinctrl-0 = <&ads7846_pins>;
+
+               compatible = "ti,ads7846";
+               vcc-supply = <&ads7846reg>;
+
+               reg = <0>;                              /* CS0 */
+               spi-max-frequency = <1500000>;
+
+               interrupt-parent = <&gpio1>;
+               interrupts = <15 0>;                    /* gpio1_wk15 */
+               pendown-gpio = <&gpio1 15 0>;
+
+
+               ti,x-min = /bits/ 16 <0x0>;
+               ti,x-max = /bits/ 16 <0x0fff>;
+               ti,y-min = /bits/ 16 <0x0>;
+               ti,y-max = /bits/ 16 <0x0fff>;
+
+               ti,x-plate-ohms = /bits/ 16 <180>;
+               ti,pressure-max = /bits/ 16 <255>;
+
+               ti,debounce-max = /bits/ 16 <30>;
+               ti,debounce-tol = /bits/ 16 <10>;
+               ti,debounce-rep = /bits/ 16 <1>;
+
+               linux,wakeup;
+       };
 };
 
 &mmc1 {