1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-or-later 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Device Tree for the TVK1281618 R3 user interface board (UIB) 4*f126890aSEmmanuel Vadot * also known as the "CYTTSP board" 5*f126890aSEmmanuel Vadot */ 6*f126890aSEmmanuel Vadot 7*f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 8*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h> 9*f126890aSEmmanuel Vadot 10*f126890aSEmmanuel Vadot/ { 11*f126890aSEmmanuel Vadot gpio_keys { 12*f126890aSEmmanuel Vadot compatible = "gpio-keys"; 13*f126890aSEmmanuel Vadot #address-cells = <1>; 14*f126890aSEmmanuel Vadot #size-cells = <0>; 15*f126890aSEmmanuel Vadot vdd-supply = <&ab8500_ldo_aux1_reg>; 16*f126890aSEmmanuel Vadot pinctrl-names = "default"; 17*f126890aSEmmanuel Vadot pinctrl-0 = <&hall_tvk_mode>; 18*f126890aSEmmanuel Vadot 19*f126890aSEmmanuel Vadot button@145 { 20*f126890aSEmmanuel Vadot /* Hall sensor */ 21*f126890aSEmmanuel Vadot gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>; 22*f126890aSEmmanuel Vadot linux,code = <0>; /* SW_LID */ 23*f126890aSEmmanuel Vadot label = "HED54XXU11 Hall Effect Sensor"; 24*f126890aSEmmanuel Vadot }; 25*f126890aSEmmanuel Vadot }; 26*f126890aSEmmanuel Vadot 27*f126890aSEmmanuel Vadot soc { 28*f126890aSEmmanuel Vadot i2c@80004000 { 29*f126890aSEmmanuel Vadot tc35893@44 { 30*f126890aSEmmanuel Vadot compatible = "toshiba,tc35893"; 31*f126890aSEmmanuel Vadot reg = <0x44>; 32*f126890aSEmmanuel Vadot interrupt-parent = <&gpio2>; 33*f126890aSEmmanuel Vadot interrupts = <0 IRQ_TYPE_EDGE_RISING>; 34*f126890aSEmmanuel Vadot pinctrl-names = "default"; 35*f126890aSEmmanuel Vadot pinctrl-0 = <&tc35893_tvk_mode>; 36*f126890aSEmmanuel Vadot 37*f126890aSEmmanuel Vadot interrupt-controller; 38*f126890aSEmmanuel Vadot #interrupt-cells = <1>; 39*f126890aSEmmanuel Vadot status = "disabled"; 40*f126890aSEmmanuel Vadot 41*f126890aSEmmanuel Vadot tc3589x_gpio { 42*f126890aSEmmanuel Vadot compatible = "toshiba,tc3589x-gpio"; 43*f126890aSEmmanuel Vadot interrupts = <0>; 44*f126890aSEmmanuel Vadot 45*f126890aSEmmanuel Vadot interrupt-controller; 46*f126890aSEmmanuel Vadot #interrupt-cells = <2>; 47*f126890aSEmmanuel Vadot gpio-controller; 48*f126890aSEmmanuel Vadot #gpio-cells = <2>; 49*f126890aSEmmanuel Vadot }; 50*f126890aSEmmanuel Vadot tc3589x_keypad { 51*f126890aSEmmanuel Vadot compatible = "toshiba,tc3589x-keypad"; 52*f126890aSEmmanuel Vadot interrupts = <6>; 53*f126890aSEmmanuel Vadot debounce-delay-ms = <4>; 54*f126890aSEmmanuel Vadot keypad,num-columns = <8>; 55*f126890aSEmmanuel Vadot keypad,num-rows = <8>; 56*f126890aSEmmanuel Vadot linux,no-autorepeat; 57*f126890aSEmmanuel Vadot wakeup-source; 58*f126890aSEmmanuel Vadot linux,keymap = <MATRIX_KEY(3, 1, KEY_END)>, 59*f126890aSEmmanuel Vadot <MATRIX_KEY(4, 1, KEY_HOME)>, 60*f126890aSEmmanuel Vadot <MATRIX_KEY(6, 4, KEY_VOLUMEDOWN)>, 61*f126890aSEmmanuel Vadot <MATRIX_KEY(4, 2, KEY_EMAIL)>, 62*f126890aSEmmanuel Vadot <MATRIX_KEY(3, 3, KEY_RIGHT)>, 63*f126890aSEmmanuel Vadot <MATRIX_KEY(2, 5, KEY_BACKSPACE)>, 64*f126890aSEmmanuel Vadot <MATRIX_KEY(6, 7, KEY_MENU)>, 65*f126890aSEmmanuel Vadot <MATRIX_KEY(5, 0, KEY_ENTER)>, 66*f126890aSEmmanuel Vadot <MATRIX_KEY(4, 3, KEY_0)>, 67*f126890aSEmmanuel Vadot <MATRIX_KEY(3, 4, KEY_DOT)>, 68*f126890aSEmmanuel Vadot <MATRIX_KEY(5, 2, KEY_UP)>, 69*f126890aSEmmanuel Vadot <MATRIX_KEY(3, 5, KEY_DOWN)>, 70*f126890aSEmmanuel Vadot <MATRIX_KEY(4, 5, KEY_SEND)>, 71*f126890aSEmmanuel Vadot <MATRIX_KEY(0, 5, KEY_BACK)>, 72*f126890aSEmmanuel Vadot <MATRIX_KEY(6, 2, KEY_VOLUMEUP)>, 73*f126890aSEmmanuel Vadot <MATRIX_KEY(1, 3, KEY_SPACE)>, 74*f126890aSEmmanuel Vadot <MATRIX_KEY(7, 6, KEY_LEFT)>, 75*f126890aSEmmanuel Vadot <MATRIX_KEY(5, 5, KEY_SEARCH)>; 76*f126890aSEmmanuel Vadot }; 77*f126890aSEmmanuel Vadot }; 78*f126890aSEmmanuel Vadot }; 79*f126890aSEmmanuel Vadot 80*f126890aSEmmanuel Vadot i2c@80128000 { 81*f126890aSEmmanuel Vadot accelerometer@19 { 82*f126890aSEmmanuel Vadot compatible = "st,lsm303dlhc-accel"; 83*f126890aSEmmanuel Vadot st,drdy-int-pin = <1>; 84*f126890aSEmmanuel Vadot reg = <0x19>; 85*f126890aSEmmanuel Vadot vdd-supply = <&ab8500_ldo_aux1_reg>; 86*f126890aSEmmanuel Vadot vddio-supply = <&db8500_vsmps2_reg>; 87*f126890aSEmmanuel Vadot interrupt-parent = <&gpio2>; 88*f126890aSEmmanuel Vadot interrupts = <18 IRQ_TYPE_EDGE_RISING>, 89*f126890aSEmmanuel Vadot <19 IRQ_TYPE_EDGE_RISING>; 90*f126890aSEmmanuel Vadot pinctrl-names = "default"; 91*f126890aSEmmanuel Vadot pinctrl-0 = <&accel_tvk_mode>; 92*f126890aSEmmanuel Vadot mount-matrix = "0", "-1", "0", 93*f126890aSEmmanuel Vadot "-1", "0", "0", 94*f126890aSEmmanuel Vadot "0", "0", "-1"; 95*f126890aSEmmanuel Vadot }; 96*f126890aSEmmanuel Vadot magnetometer@1e { 97*f126890aSEmmanuel Vadot compatible = "st,lsm303dlm-magn"; 98*f126890aSEmmanuel Vadot reg = <0x1e>; 99*f126890aSEmmanuel Vadot vdd-supply = <&ab8500_ldo_aux1_reg>; 100*f126890aSEmmanuel Vadot vddio-supply = <&db8500_vsmps2_reg>; 101*f126890aSEmmanuel Vadot // This interrupt is not properly working with the driver 102*f126890aSEmmanuel Vadot // interrupt-parent = <&gpio1>; 103*f126890aSEmmanuel Vadot // interrupts = <0 IRQ_TYPE_EDGE_RISING>; 104*f126890aSEmmanuel Vadot pinctrl-names = "default"; 105*f126890aSEmmanuel Vadot pinctrl-0 = <&magn_tvk_mode>; 106*f126890aSEmmanuel Vadot }; 107*f126890aSEmmanuel Vadot gyroscope@68 { 108*f126890aSEmmanuel Vadot /* Gyroscope */ 109*f126890aSEmmanuel Vadot compatible = "st,l3g4200d-gyro"; 110*f126890aSEmmanuel Vadot reg = <0x68>; 111*f126890aSEmmanuel Vadot vdd-supply = <&ab8500_ldo_aux1_reg>; 112*f126890aSEmmanuel Vadot vddio-supply = <&db8500_vsmps2_reg>; 113*f126890aSEmmanuel Vadot }; 114*f126890aSEmmanuel Vadot pressure@5c { 115*f126890aSEmmanuel Vadot /* Barometer/pressure sensor */ 116*f126890aSEmmanuel Vadot compatible = "st,lps001wp-press"; 117*f126890aSEmmanuel Vadot reg = <0x5c>; 118*f126890aSEmmanuel Vadot vdd-supply = <&ab8500_ldo_aux1_reg>; 119*f126890aSEmmanuel Vadot vddio-supply = <&db8500_vsmps2_reg>; 120*f126890aSEmmanuel Vadot }; 121*f126890aSEmmanuel Vadot }; 122*f126890aSEmmanuel Vadot 123*f126890aSEmmanuel Vadot spi@80111000 { 124*f126890aSEmmanuel Vadot num-cs = <1>; 125*f126890aSEmmanuel Vadot cs-gpios = <&gpio6 24 GPIO_ACTIVE_LOW>; 126*f126890aSEmmanuel Vadot pinctrl-names = "default"; 127*f126890aSEmmanuel Vadot pinctrl-0 = <&spi2_default_mode>; 128*f126890aSEmmanuel Vadot status = "okay"; 129*f126890aSEmmanuel Vadot 130*f126890aSEmmanuel Vadot touchscreen@0 { 131*f126890aSEmmanuel Vadot compatible = "cypress,cy8ctma340"; 132*f126890aSEmmanuel Vadot /* 133*f126890aSEmmanuel Vadot * Actually the max frequency is 6 MHz, but over 2 MHz the 134*f126890aSEmmanuel Vadot * data rate needs to be restricted to max 2Mbps which the 135*f126890aSEmmanuel Vadot * SPI framework cannot handle. 136*f126890aSEmmanuel Vadot */ 137*f126890aSEmmanuel Vadot spi-max-frequency = <2000000>; 138*f126890aSEmmanuel Vadot reg = <0>; 139*f126890aSEmmanuel Vadot interrupt-parent = <&gpio2>; 140*f126890aSEmmanuel Vadot interrupts = <20 IRQ_TYPE_EDGE_FALLING>; 141*f126890aSEmmanuel Vadot vcpin-supply = <&ab8500_ldo_aux1_reg>; 142*f126890aSEmmanuel Vadot vdd-supply = <&db8500_vsmps2_reg>; 143*f126890aSEmmanuel Vadot reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; 144*f126890aSEmmanuel Vadot touchscreen-size-x = <480>; 145*f126890aSEmmanuel Vadot touchscreen-size-y = <854>; 146*f126890aSEmmanuel Vadot active-interval-ms = <0>; 147*f126890aSEmmanuel Vadot touch-timeout-ms = <255>; 148*f126890aSEmmanuel Vadot lowpower-interval-ms = <10>; 149*f126890aSEmmanuel Vadot bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>; 150*f126890aSEmmanuel Vadot pinctrl-names = "default"; 151*f126890aSEmmanuel Vadot pinctrl-0 = <&cyttsp_tvk_mode>; 152*f126890aSEmmanuel Vadot }; 153*f126890aSEmmanuel Vadot }; 154*f126890aSEmmanuel Vadot 155*f126890aSEmmanuel Vadot mcde@a0350000 { 156*f126890aSEmmanuel Vadot status = "okay"; 157*f126890aSEmmanuel Vadot 158*f126890aSEmmanuel Vadot dsi@a0351000 { 159*f126890aSEmmanuel Vadot panel { 160*f126890aSEmmanuel Vadot compatible = "sony,acx424akp"; 161*f126890aSEmmanuel Vadot reg = <0>; 162*f126890aSEmmanuel Vadot vddi-supply = <&ab8500_ldo_aux1_reg>; 163*f126890aSEmmanuel Vadot reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>; 164*f126890aSEmmanuel Vadot }; 165*f126890aSEmmanuel Vadot }; 166*f126890aSEmmanuel Vadot }; 167*f126890aSEmmanuel Vadot 168*f126890aSEmmanuel Vadot pinctrl { 169*f126890aSEmmanuel Vadot hall { 170*f126890aSEmmanuel Vadot hall_tvk_mode: hall_tvk { 171*f126890aSEmmanuel Vadot tvk_cfg { 172*f126890aSEmmanuel Vadot pins = "GPIO145_C13"; 173*f126890aSEmmanuel Vadot ste,config = <&gpio_in_pu>; 174*f126890aSEmmanuel Vadot }; 175*f126890aSEmmanuel Vadot }; 176*f126890aSEmmanuel Vadot }; 177*f126890aSEmmanuel Vadot tc35893 { 178*f126890aSEmmanuel Vadot /* IRQ from the TC35893 */ 179*f126890aSEmmanuel Vadot tc35893_tvk_mode: tc35893_tvk { 180*f126890aSEmmanuel Vadot tvk_cfg { 181*f126890aSEmmanuel Vadot pins = "GPIO64_F3"; 182*f126890aSEmmanuel Vadot ste,config = <&gpio_in_pu>; 183*f126890aSEmmanuel Vadot }; 184*f126890aSEmmanuel Vadot }; 185*f126890aSEmmanuel Vadot }; 186*f126890aSEmmanuel Vadot accelerometer { 187*f126890aSEmmanuel Vadot accel_tvk_mode: accel_tvk { 188*f126890aSEmmanuel Vadot /* Accelerometer interrupt lines 1 & 2 */ 189*f126890aSEmmanuel Vadot tvk_cfg { 190*f126890aSEmmanuel Vadot pins = "GPIO82_C1", "GPIO83_D3"; 191*f126890aSEmmanuel Vadot ste,config = <&gpio_in_pd>; 192*f126890aSEmmanuel Vadot }; 193*f126890aSEmmanuel Vadot }; 194*f126890aSEmmanuel Vadot }; 195*f126890aSEmmanuel Vadot magnetometer { 196*f126890aSEmmanuel Vadot magn_tvk_mode: magn_tvk { 197*f126890aSEmmanuel Vadot /* GPIO 32 used for DRDY, pull this down */ 198*f126890aSEmmanuel Vadot tvk_cfg { 199*f126890aSEmmanuel Vadot pins = "GPIO32_V2"; 200*f126890aSEmmanuel Vadot ste,config = <&gpio_in_pd>; 201*f126890aSEmmanuel Vadot }; 202*f126890aSEmmanuel Vadot }; 203*f126890aSEmmanuel Vadot }; 204*f126890aSEmmanuel Vadot cyttsp { 205*f126890aSEmmanuel Vadot cyttsp_tvk_mode: cyttsp_tvk { 206*f126890aSEmmanuel Vadot /* Touchscreen uses GPIO84 for IRQ */ 207*f126890aSEmmanuel Vadot tvk_cfg1 { 208*f126890aSEmmanuel Vadot pins = "GPIO84_C2"; 209*f126890aSEmmanuel Vadot ste,config = <&gpio_in_pu>; 210*f126890aSEmmanuel Vadot }; 211*f126890aSEmmanuel Vadot /* GPIO143 is reset */ 212*f126890aSEmmanuel Vadot tvk_cfg2 { 213*f126890aSEmmanuel Vadot pins = "GPIO143_D12"; 214*f126890aSEmmanuel Vadot ste,config = <&gpio_out_hi>; 215*f126890aSEmmanuel Vadot }; 216*f126890aSEmmanuel Vadot }; 217*f126890aSEmmanuel Vadot }; 218*f126890aSEmmanuel Vadot }; 219*f126890aSEmmanuel Vadot }; 220*f126890aSEmmanuel Vadot}; 221