Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Device Tree for the TVK1281618 R2 user interface board (UIB)
0004  */
0005 
0006 #include <dt-bindings/interrupt-controller/irq.h>
0007 #include <dt-bindings/input/input.h>
0008 
0009 / {
0010         gpio_keys {
0011                 compatible = "gpio-keys";
0012                 #address-cells = <1>;
0013                 #size-cells = <0>;
0014                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0015                 pinctrl-names = "default";
0016                 pinctrl-0 = <&prox_tvk_mode>, <&hall_tvk_mode>;
0017 
0018                 button@139 {
0019                         /* Proximity sensor */
0020                         gpios = <&gpio6 25 GPIO_ACTIVE_HIGH>;
0021                         linux,code = <11>; /* SW_FRONT_PROXIMITY */
0022                         label = "SFH7741 Proximity Sensor";
0023                 };
0024                 button@145 {
0025                         /* Hall sensor */
0026                         gpios = <&gpio4 17 GPIO_ACTIVE_HIGH>;
0027                         linux,code = <0>; /* SW_LID */
0028                         label = "HED54XXU11 Hall Effect Sensor";
0029                 };
0030         };
0031 
0032         soc {
0033                 i2c@80004000 {
0034                         tc35893@44 {
0035                                 compatible = "toshiba,tc35893";
0036                                 reg = <0x44>;
0037                                 interrupt-parent = <&gpio6>;
0038                                 interrupts = <26 IRQ_TYPE_EDGE_RISING>;
0039                                 pinctrl-names = "default";
0040                                 pinctrl-0 = <&tc35893_tvk_mode>;
0041 
0042                                 interrupt-controller;
0043                                 #interrupt-cells = <1>;
0044                                 status = "disabled";
0045 
0046                                 tc3589x_gpio {
0047                                         compatible = "toshiba,tc3589x-gpio";
0048                                         interrupts = <0>;
0049 
0050                                         interrupt-controller;
0051                                         #interrupt-cells = <2>;
0052                                         gpio-controller;
0053                                         #gpio-cells = <2>;
0054                                 };
0055                                 tc3589x_keypad {
0056                                         compatible = "toshiba,tc3589x-keypad";
0057                                         interrupts = <6>;
0058                                         debounce-delay-ms = <4>;
0059                                         keypad,num-columns = <8>;
0060                                         keypad,num-rows = <8>;
0061                                         linux,no-autorepeat;
0062                                         wakeup-source;
0063                                         linux,keymap = <MATRIX_KEY(3, 1, KEY_END)>,
0064                                                        <MATRIX_KEY(4, 1, KEY_HOME)>,
0065                                                        <MATRIX_KEY(6, 4, KEY_VOLUMEDOWN)>,
0066                                                        <MATRIX_KEY(4, 2, KEY_EMAIL)>,
0067                                                        <MATRIX_KEY(3, 3, KEY_RIGHT)>,
0068                                                        <MATRIX_KEY(2, 5, KEY_BACKSPACE)>,
0069                                                        <MATRIX_KEY(6, 7, KEY_MENU)>,
0070                                                        <MATRIX_KEY(5, 0, KEY_ENTER)>,
0071                                                        <MATRIX_KEY(4, 3, KEY_0)>,
0072                                                        <MATRIX_KEY(3, 4, KEY_DOT)>,
0073                                                        <MATRIX_KEY(5, 2, KEY_UP)>,
0074                                                        <MATRIX_KEY(3, 5, KEY_DOWN)>,
0075                                                        <MATRIX_KEY(4, 5, KEY_SEND)>,
0076                                                        <MATRIX_KEY(0, 5, KEY_BACK)>,
0077                                                        <MATRIX_KEY(6, 2, KEY_VOLUMEUP)>,
0078                                                        <MATRIX_KEY(1, 3, KEY_SPACE)>,
0079                                                        <MATRIX_KEY(7, 6, KEY_LEFT)>,
0080                                                        <MATRIX_KEY(5, 5, KEY_SEARCH)>;
0081                                 };
0082                         };
0083                 };
0084 
0085                 i2c@80128000 {
0086                         accelerometer@18 {
0087                                 /* Accelerometer */
0088                                 compatible = "st,lsm303dlh-accel";
0089                                 st,drdy-int-pin = <1>;
0090                                 drive-open-drain;
0091                                 reg = <0x18>;
0092                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0093                                 vddio-supply = <&db8500_vsmps2_reg>;
0094                                 pinctrl-names = "default";
0095                                 pinctrl-0 = <&accel_tvk_mode>;
0096                                 /*
0097                                  * These interrupts cannot be used: the other component
0098                                  * ST-Micro L3D4200D gyro that is connected to the same lines
0099                                  * cannot set its DRDY line to open drain, so it cannot be
0100                                  * shared with other peripherals. The should be defined for
0101                                  * the falling edge if they could be wired together.
0102                                  *
0103                                  * interrupts-extended =
0104                                  * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
0105                                  * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
0106                                  */
0107                                 mount-matrix = "0", "1", "0",
0108                                                "1", "0", "0",
0109                                                "0", "0", "-1";
0110                         };
0111                         magnetometer@1e {
0112                                 /* Magnetometer */
0113                                 compatible = "st,lsm303dlh-magn";
0114                                 reg = <0x1e>;
0115                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0116                                 vddio-supply = <&db8500_vsmps2_reg>;
0117                                 /*
0118                                  * These interrupts cannot be used: the other component
0119                                  * ST-Micro L3D4200D gyro that is connected to the same lines
0120                                  * cannot set its DRDY line to open drain, so it cannot be
0121                                  * shared with other peripherals. The should be defined for
0122                                  * the falling edge if they could be wired together.
0123                                  *
0124                                  * interrupts-extended =
0125                                  * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
0126                                  * <&gpio2 19 IRQ_TYPE_EDGE_FALLING>;
0127                                  */
0128                         };
0129                         accelerometer@1c {
0130                                 /* Accelerometer */
0131                                 compatible = "st,lis331dl-accel";
0132                                 st,drdy-int-pin = <1>;
0133                                 reg = <0x1c>;
0134                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0135                                 vddio-supply = <&db8500_vsmps2_reg>;
0136                                 pinctrl-names = "default";
0137                                 pinctrl-0 = <&accel_tvk_mode>;
0138                                 interrupt-parent = <&gpio2>;
0139                                 /* INT2 would need to be open drain */
0140                                 interrupts = <18 IRQ_TYPE_EDGE_RISING>,
0141                                              <19 IRQ_TYPE_EDGE_RISING>;
0142                                 mount-matrix = "0", "-1", "0",
0143                                                "-1", "0", "0",
0144                                                "0", "0", "-1";
0145                         };
0146                         magnetometer@f {
0147                                 /* Magnetometer */
0148                                 compatible = "asahi-kasei,ak8974";
0149                                 reg = <0x0f>;
0150                                 avdd-supply = <&ab8500_ldo_aux1_reg>;
0151                                 dvdd-supply = <&db8500_vsmps2_reg>;
0152                                 pinctrl-names = "default";
0153                                 pinctrl-0 = <&gyro_magn_tvk_mode>;
0154                                 /*
0155                                  * These interrupts cannot be used: the other component
0156                                  * ST-Micro L3D4200D gyro that is connected to the same lines
0157                                  * cannot set its DRDY line to open drain, so it cannot be
0158                                  * shared with other peripherals. The should be defined for
0159                                  * the falling edge if they could be wired together.
0160                                  *
0161                                  * interrupts-extended =
0162                                  * <&gpio1 0 IRQ_TYPE_EDGE_FALLING>,
0163                                  * <&gpio0 31 IRQ_TYPE_EDGE_FALLING>;
0164                                  */
0165                         };
0166                         gyroscope@68 {
0167                                 /* Gyroscope */
0168                                 compatible = "st,l3g4200d-gyro";
0169                                 st,drdy-int-pin = <2>;
0170                                 reg = <0x68>;
0171                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0172                                 vddio-supply = <&db8500_vsmps2_reg>;
0173                                 pinctrl-names = "default";
0174                                 pinctrl-0 = <&gyro_magn_tvk_mode>;
0175                                 interrupts-extended =
0176                                 <&gpio1 0 IRQ_TYPE_EDGE_RISING>,
0177                                 <&gpio0 31 IRQ_TYPE_EDGE_RISING>;
0178                         };
0179                         pressure@5c {
0180                                 /* Barometer/pressure sensor */
0181                                 compatible = "st,lps001wp-press";
0182                                 reg = <0x5c>;
0183                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0184                                 vddio-supply = <&db8500_vsmps2_reg>;
0185                         };
0186                 };
0187                 i2c@80110000 {
0188                         synaptics@4b {
0189                                 /* Synaptics RMI4 TM1217 touchscreen */
0190                                 compatible = "syna,rmi4-i2c";
0191                                 #address-cells = <1>;
0192                                 #size-cells = <0>;
0193                                 reg = <0x4b>;
0194                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0195                                 vddio-supply = <&db8500_vsmps2_reg>;
0196                                 pinctrl-names = "default";
0197                                 pinctrl-0 = <&synaptics_tvk_mode>;
0198                                 interrupt-parent = <&gpio2>;
0199                                 interrupts = <20 IRQ_TYPE_EDGE_FALLING>;
0200 
0201                                 rmi4-f01@1 {
0202                                         reg = <0x1>;
0203                                         syna,nosleep = <1>;
0204                                 };
0205                                 rmi4-f11@11 {
0206                                         reg = <0x11>;
0207                                         syna,sensor-type = <1>;
0208                                         /* This is a landscape display */
0209                                         touchscreen-swapped-x-y;
0210                                 };
0211                         };
0212                 };
0213                 mcde@a0350000 {
0214                         status = "okay";
0215 
0216                         dsi@a0351000 {
0217                                 panel {
0218                                         compatible = "samsung,s6d16d0";
0219                                         reg = <0>;
0220                                         vdd1-supply = <&ab8500_ldo_aux1_reg>;
0221                                         reset-gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
0222                                 };
0223                         };
0224                 };
0225                 pinctrl {
0226                         prox {
0227                                 prox_tvk_mode: prox_tvk {
0228                                         tvk_cfg {
0229                                                 pins = "GPIO217_AH12";
0230                                                 ste,config = <&gpio_in_pu>;
0231                                         };
0232                                 };
0233                         };
0234                         hall {
0235                                 hall_tvk_mode: hall_tvk {
0236                                         tvk_cfg {
0237                                                 pins = "GPIO145_C13";
0238                                                 ste,config = <&gpio_in_pu>;
0239                                         };
0240                                 };
0241                         };
0242                         tc35893 {
0243                                 /* IRQ from the TC35893 */
0244                                 tc35893_tvk_mode: tc35893_tvk {
0245                                         tvk_cfg {
0246                                                 pins = "GPIO218_AH11";
0247                                                 ste,config = <&gpio_in_pu>;
0248                                         };
0249                                 };
0250                         };
0251                         accelerometer {
0252                                 accel_tvk_mode: accel_tvk {
0253                                         /* Accelerometer interrupt lines 1 & 2 */
0254                                         tvk_cfg {
0255                                                 pins = "GPIO82_C1", "GPIO83_D3";
0256                                                 ste,config = <&gpio_in_pd>;
0257                                         };
0258                                 };
0259                         };
0260                         gyroscope {
0261                                 /*
0262                                  * These lines are shared between Gyroscope l3g400dh
0263                                  * and AK8974 magnetometer.
0264                                  */
0265                                 gyro_magn_tvk_mode: gyro_magn_tvk {
0266                                          /* GPIO 31 used for INT pull down the line */
0267                                         tvk_cfg1 {
0268                                                 pins = "GPIO31_V3";
0269                                                 ste,config = <&gpio_in_pd>;
0270                                         };
0271                                         /* GPIO 32 used for DRDY, pull this down */
0272                                         tvk_cfg2 {
0273                                                 pins = "GPIO32_V2";
0274                                                 ste,config = <&gpio_in_pd>;
0275                                         };
0276                                 };
0277                         };
0278                         synaptics {
0279                                 synaptics_tvk_mode: synaptics_tvk {
0280                                         /* Touchscreen uses GPIO 84 */
0281                                         tvk_cfg1 {
0282                                                 pins = "GPIO84_C2";
0283                                                 ste,config = <&gpio_in_pu>;
0284                                         };
0285                                 };
0286                         };
0287                 };
0288         };
0289 };