Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Devicetree for the Samsung Galaxy Ace 2 GT-I8160 also known as Codina.
0004  *
0005  * NOTE: this is the most common variant according to the vendor tree, known
0006  * as "R0.0". There appears to be a "R0.4" variant with backlight on GPIO69,
0007  * AB8505 and other changes. There is also talk about some variants having a
0008  * Samsung S6D27A1 display, indicated by passing a different command line from
0009  * the boot loader.
0010  *
0011  * The Samsung tree further talks about GT-I8160P and GT-I8160chn (China).
0012  * The GT-I8160 plain is known as the "europe" variant.
0013  * The GT-I8160P is the CDMA version and it appears to not use the ST
0014  * Microelectronics accelerometer and reportedly has NFC mounted.
0015  * The GT-I8160chn appears to be the same as the europe variant.
0016  *
0017  * There is also the Codina-TMO, Samsung SGH-T599, which has its own device
0018  * tree.
0019  */
0020 
0021 /dts-v1/;
0022 #include "ste-db8500.dtsi"
0023 #include "ste-ab8500.dtsi"
0024 #include "ste-dbx5x0-pinctrl.dtsi"
0025 #include <dt-bindings/gpio/gpio.h>
0026 #include <dt-bindings/leds/common.h>
0027 #include <dt-bindings/input/input.h>
0028 #include <dt-bindings/interrupt-controller/irq.h>
0029 
0030 / {
0031         model = "Samsung Galaxy Ace 2 (GT-I8160)";
0032         compatible = "samsung,codina", "st-ericsson,u8500";
0033 
0034         cpus {
0035                 cpu@300 {
0036                         /*
0037                          * This has a frequency cap at ~800 MHz in the firmware.
0038                          * (Changing this number here will not overclock it.)
0039                          */
0040                         operating-points = <798720 0
0041                                             399360 0
0042                                             199680 0>;
0043                 };
0044         };
0045 
0046         chosen {
0047                 stdout-path = &serial2;
0048         };
0049 
0050         battery: battery {
0051                 compatible = "samsung,eb425161lu";
0052         };
0053 
0054         thermal-zones {
0055                 battery-thermal {
0056                         /* This zone will be polled by the battery temperature code */
0057                         polling-delay = <0>;
0058                         polling-delay-passive = <0>;
0059                         thermal-sensors = <&bat_therm>;
0060                 };
0061         };
0062 
0063         bat_therm: thermistor {
0064                 compatible = "samsung,1404-001221";
0065                 io-channels = <&gpadc 0x02>; /* BatTemp */
0066                 pullup-uv = <1800000>;
0067                 pullup-ohm = <230000>;
0068                 pulldown-ohm = <0>;
0069                 #thermal-sensor-cells = <0>;
0070         };
0071 
0072         /* TI TXS0206 level translator for 2.9 V */
0073         sd_level_translator: regulator-gpio {
0074                 compatible = "regulator-fixed";
0075 
0076                 /* GPIO87 EN */
0077                 gpios = <&gpio2 23 GPIO_ACTIVE_HIGH>;
0078                 enable-active-high;
0079 
0080                 regulator-name = "sd-level-translator";
0081                 regulator-min-microvolt = <2900000>;
0082                 regulator-max-microvolt = <2900000>;
0083                 regulator-type = "voltage";
0084 
0085                 startup-delay-us = <200>;
0086 
0087                 pinctrl-names = "default";
0088                 pinctrl-0 = <&sd_level_translator_default>;
0089         };
0090 
0091         /* External LDO MIC5366-3.3YMT for eMMC */
0092         ldo_3v3_reg: regulator-gpio-ldo-3v3 {
0093                 compatible = "regulator-fixed";
0094                 /* Supplied in turn by VBAT */
0095                 regulator-name = "VMEM_3V3";
0096                 regulator-min-microvolt = <3300000>;
0097                 regulator-max-microvolt = <3300000>;
0098                 gpios = <&gpio6 31 GPIO_ACTIVE_HIGH>;
0099                 startup-delay-us = <5000>;
0100                 enable-active-high;
0101                 pinctrl-names = "default";
0102                 pinctrl-0 = <&emmc_ldo_en_default_mode>;
0103         };
0104 
0105         /*
0106          * External Ricoh "TSP" regulator for the touchscreen.
0107          * One GPIO line controls two voltages of 3.3V and 1.8V
0108          * this line is known as "TSP_LDO_ON1" in the schematics.
0109          */
0110         ldo_tsp_3v3_reg: regulator-gpio-tsp-ldo-3v3 {
0111                 compatible = "regulator-fixed";
0112                 /* Supplied in turn by VBAT */
0113                 regulator-name = "LDO_TSP_A3V3";
0114                 regulator-min-microvolt = <3300000>;
0115                 regulator-max-microvolt = <3300000>;
0116                 /* GPIO94 controls this regulator */
0117                 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
0118                 /* 70 ms power-on delay */
0119                 startup-delay-us = <70000>;
0120                 enable-active-high;
0121                 pinctrl-names = "default";
0122                 pinctrl-0 = <&tsp_ldo_en_default_mode>;
0123         };
0124         ldo_tsp_1v8_reg: regulator-gpio-tsp-ldo-1v8 {
0125                 compatible = "regulator-fixed";
0126                 /* Supplied in turn by VBAT */
0127                 regulator-name = "VREG_TSP_1V8";
0128                 regulator-min-microvolt = <1800000>;
0129                 regulator-max-microvolt = <1800000>;
0130                 /* GPIO94 controls this regulator */
0131                 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
0132                 /* 70 ms power-on delay */
0133                 startup-delay-us = <70000>;
0134                 enable-active-high;
0135                 pinctrl-names = "default";
0136                 pinctrl-0 = <&tsp_ldo_en_default_mode>;
0137         };
0138 
0139         /*
0140          * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
0141          * LCD_PWR_EN controls both a 3.0V and 1.8V output.
0142          */
0143         lcd_3v0_reg: regulator-gpio-lcd-3v0 {
0144                 compatible = "regulator-fixed";
0145                 /* Supplied in turn by VBAT */
0146                 regulator-name = "VREG_LCD_3.0V";
0147                 regulator-min-microvolt = <3000000>;
0148                 regulator-max-microvolt = <3000000>;
0149                 /* GPIO219 controls this regulator */
0150                 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
0151                 enable-active-high;
0152                 pinctrl-names = "default";
0153                 pinctrl-0 = <&lcd_pwr_en_default_mode>;
0154         };
0155         lcd_1v8_reg: regulator-gpio-lcd-1v8 {
0156                 compatible = "regulator-fixed";
0157                 /* Supplied in turn by VBAT */
0158                 regulator-name = "VREG_LCD_1.8V";
0159                 regulator-min-microvolt = <1800000>;
0160                 regulator-max-microvolt = <1800000>;
0161                 /* GPIO219 controls this regulator too */
0162                 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
0163                 enable-active-high;
0164                 pinctrl-names = "default";
0165                 pinctrl-0 = <&lcd_pwr_en_default_mode>;
0166         };
0167 
0168         /*
0169          * This regulator is a GPIO line that drives the Broadcom WLAN
0170          * line WL_REG_ON high and enables the internal regulators
0171          * inside the chip. Unfortunatley it is erroneously named
0172          * WLAN_RST_N on the schematic but it is not a reset line.
0173          *
0174          * The voltage specified here is only used to determine the OCR mask,
0175          * the for the SDIO connector, the chip is actually connected
0176          * directly to VBAT.
0177          */
0178         wl_reg: regulator-gpio-wlan {
0179                 compatible = "regulator-fixed";
0180                 regulator-name = "WL_REG_ON";
0181                 regulator-min-microvolt = <3000000>;
0182                 regulator-max-microvolt = <3000000>;
0183                 startup-delay-us = <100000>;
0184                 /* GPIO215 (WLAN_RST_N to WL_REG_ON) */
0185                 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
0186                 enable-active-high;
0187                 pinctrl-names = "default";
0188                 pinctrl-0 = <&wlan_ldo_en_default>;
0189         };
0190 
0191         vibrator {
0192                 compatible = "gpio-vibrator";
0193                 /* GPIO195 "MOT_EN" */
0194                 enable-gpios = <&gpio6 3 GPIO_ACTIVE_HIGH>;
0195                 pinctrl-names = "default";
0196                 pinctrl-0 = <&vibrator_default>;
0197         };
0198 
0199         gpio-keys {
0200                 compatible = "gpio-keys";
0201                 pinctrl-names = "default";
0202                 pinctrl-0 = <&gpio_keys_default_mode>;
0203 
0204                 button-home {
0205                         linux,code = <KEY_HOME>;
0206                         label = "HOME";
0207                         /* GPIO91 */
0208                         gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
0209                 };
0210                 button-volup {
0211                         linux,code = <KEY_VOLUMEUP>;
0212                         label = "VOL+";
0213                         /* GPIO67 */
0214                         gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
0215                 };
0216                 button-voldown {
0217                         linux,code = <KEY_VOLUMEDOWN>;
0218                         label = "VOL-";
0219                         /* GPIO92 */
0220                         gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
0221                 };
0222         };
0223 
0224         gpio-leds {
0225                 compatible = "gpio-leds";
0226                 pinctrl-names = "default";
0227                 pinctrl-0 = <&gpio_leds_default_mode>;
0228                 touchkey-led {
0229                         label = "touchkeys";
0230                         /*
0231                          * GPIO194 on R0.0, R0.4 does not use this at all, it
0232                          * will instead turn LDO AUX4 on/off for key led backlighy.
0233                          * (Line is pulled down on R0.4)
0234                          */
0235                         gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
0236                         default-state = "on";
0237                 };
0238         };
0239 
0240         ktd253: backlight {
0241                 compatible = "kinetic,ktd253";
0242                 /*
0243                  * GPIO68 is for R0.0, the board file talks about a TMO variant
0244                  * (R0.4) using GPIO69.
0245                  */
0246                 enable-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>;
0247                 /* Default to 13/32 brightness */
0248                 default-brightness = <13>;
0249                 pinctrl-names = "default";
0250                 pinctrl-0 = <&ktd253_backlight_default_mode>;
0251         };
0252 
0253         /* Richtek RT8515GQW Flash LED Driver IC */
0254         flash {
0255                 compatible = "richtek,rt8515";
0256                 /* GPIO 140 */
0257                 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
0258                 /* GPIO 141 */
0259                 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
0260                 /*
0261                  * RFS is 16 kOhm and RTS is 100 kOhm giving
0262                  * the flash max current 343mA and torch max
0263                  * current 55 mA.
0264                  */
0265                 richtek,rfs-ohms = <16000>;
0266                 richtek,rts-ohms = <100000>;
0267                 pinctrl-names = "default";
0268                 pinctrl-0 = <&gpio_flash_default_mode>;
0269 
0270                 led {
0271                         function = LED_FUNCTION_FLASH;
0272                         color = <LED_COLOR_ID_WHITE>;
0273                         flash-max-timeout-us = <250000>;
0274                         flash-max-microamp = <343750>;
0275                         led-max-microamp = <55000>;
0276                 };
0277         };
0278 
0279         /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
0280         i2c-gpio-0 {
0281                 compatible = "i2c-gpio";
0282                 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0283                 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0284                 pinctrl-names = "default";
0285                 pinctrl-0 = <&i2c_gpio_0_default>;
0286                 #address-cells = <1>;
0287                 #size-cells = <0>;
0288 
0289                 magnetometer@c {
0290                         compatible = "alps,hscdtd008a";
0291                         reg = <0x0c>;
0292                         clock-frequency = <400000>;
0293 
0294                         avdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
0295                         dvdd-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
0296                 };
0297                 /* TODO: this should also be used by the SM5103 Camera power management unit */
0298         };
0299 
0300         /* Bit-banged I2C on GPIO151 and GPIO152 also called "NFC I2C" */
0301         i2c-gpio-1 {
0302                 compatible = "i2c-gpio";
0303                 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0304                 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0305                 pinctrl-names = "default";
0306                 pinctrl-0 = <&i2c_gpio_1_default>;
0307                 #address-cells = <1>;
0308                 #size-cells = <0>;
0309 
0310                 nfc@2b {
0311                         /* NXP NFC circuit PN544 C1 marked NXP 44501  */
0312                         compatible = "nxp,pn544-i2c";
0313                         /* IF0, IF1 high, gives I2C address 0x2B */
0314                         reg = <0x2b>;
0315                         clock-frequency = <400000>;
0316                         /* NFC IRQ on GPIO32 */
0317                         interrupt-parent = <&gpio1>;
0318                         interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
0319                         /* GPIO 31 */
0320                         firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
0321                         /* GPIO88 */
0322                         enable-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;
0323                         pinctrl-names = "default";
0324                         pinctrl-0 = <&pn544_codina_default>;
0325                 };
0326         };
0327 
0328         spi-gpio-0 {
0329                 compatible = "spi-gpio";
0330                 /* Clock on GPIO220, pin SCL */
0331                 sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
0332                 /* MOSI on GPIO224, pin SDI "slave data in" */
0333                 mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
0334                 /* MISO on GPIO225, pin SDO "slave data out" */
0335                 miso-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
0336                 /* Chip select on GPIO201 */
0337                 cs-gpios = <&gpio6 9 GPIO_ACTIVE_LOW>;
0338                 num-chipselects = <1>;
0339 
0340                 pinctrl-names = "default";
0341                 pinctrl-0 = <&spi_gpio_0_default>;
0342                 #address-cells = <1>;
0343                 #size-cells = <0>;
0344 
0345                 /*
0346                  * Some Codinas (90%) have a WideChips WS2401-based LMS380KF01
0347                  * display mounted and some 10% has a Samsung S6D27A1 instead.
0348                  * The boot loader needs to modify this compatible to
0349                  * correspond to whatever is passed from the early Samsung boot.
0350                  */
0351                 panel@0 {
0352                         compatible = "samsung,lms380kf01";
0353                         spi-max-frequency = <1200000>;
0354                         /* TYPE 3: inverse clock polarity and phase */
0355                         spi-cpha;
0356                         spi-cpol;
0357 
0358                         reg = <0>;
0359                         vci-supply = <&lcd_3v0_reg>;
0360                         vccio-supply = <&lcd_1v8_reg>;
0361 
0362                         /* Reset on GPIO139 */
0363                         reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
0364                         /* LCD_VGH/LCD_DETECT, ESD IRQ on GPIO93 */
0365                         interrupt-parent = <&gpio2>;
0366                         interrupts = <29 IRQ_TYPE_EDGE_RISING>;
0367 
0368                         pinctrl-names = "default";
0369                         pinctrl-0 = <&panel_default_mode>;
0370                         backlight = <&ktd253>;
0371 
0372                         port {
0373                                 panel_in: endpoint {
0374                                         remote-endpoint = <&display_out>;
0375                                 };
0376                         };
0377                 };
0378         };
0379 
0380         soc {
0381                 /* External Micro SD slot */
0382                 mmc@80126000 {
0383                         arm,primecell-periphid = <0x10480180>;
0384                         max-frequency = <100000000>;
0385                         bus-width = <4>;
0386                         cap-sd-highspeed;
0387                         cap-mmc-highspeed;
0388                         st,sig-pin-fbclk;
0389                         full-pwr-cycle;
0390                         /* MMC is powered by AUX3 1.2V .. 2.91V */
0391                         vmmc-supply = <&ab8500_ldo_aux3_reg>;
0392                         /* 2.9 V level translator is using AUX3 at 2.9 V as well */
0393                         vqmmc-supply = <&sd_level_translator>;
0394                         pinctrl-names = "default", "sleep";
0395                         pinctrl-0 = <&mc0_a_2_default>;
0396                         pinctrl-1 = <&mc0_a_2_sleep>;
0397                         cd-gpios  = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
0398                         status = "okay";
0399                 };
0400 
0401                 /* WLAN SDIO channel */
0402                 mmc@80118000 {
0403                         arm,primecell-periphid = <0x10480180>;
0404                         max-frequency = <50000000>;
0405                         bus-width = <4>;
0406                         non-removable;
0407                         cap-sd-highspeed;
0408                         pinctrl-names = "default", "sleep";
0409                         pinctrl-0 = <&mc1_a_2_default>;
0410                         pinctrl-1 = <&mc1_a_2_sleep>;
0411                         /*
0412                          * GPIO-controlled voltage enablement: this drives
0413                          * the WL_REG_ON line high when we use this device.
0414                          * Represented as regulator to fill OCR mask.
0415                          */
0416                         vmmc-supply = <&wl_reg>;
0417 
0418                         #address-cells = <1>;
0419                         #size-cells = <0>;
0420                         status = "okay";
0421 
0422                         wifi@1 {
0423                                 /* Actually BRCM4330 */
0424                                 compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-fmac";
0425                                 reg = <1>;
0426                                 /* GPIO216 WL_HOST_WAKE */
0427                                 interrupt-parent = <&gpio6>;
0428                                 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
0429                                 interrupt-names = "host-wake";
0430                                 pinctrl-names = "default";
0431                                 pinctrl-0 = <&wlan_default_mode>;
0432                         };
0433                 };
0434 
0435                 /* eMMC */
0436                 mmc@80005000 {
0437                         arm,primecell-periphid = <0x10480180>;
0438                         max-frequency = <100000000>;
0439                         bus-width = <8>;
0440                         non-removable;
0441                         cap-mmc-highspeed;
0442                         mmc-ddr-1_8v;
0443                         no-sdio;
0444                         no-sd;
0445                         vmmc-supply = <&ldo_3v3_reg>;
0446                         pinctrl-names = "default", "sleep";
0447                         /*
0448                          * GPIO130 will be set to input no pull-up resulting in a resistor
0449                          * pulling the reset high and taking the memory out of reset.
0450                          */
0451                         pinctrl-0 = <&mc2_a_1_default>;
0452                         pinctrl-1 = <&mc2_a_1_sleep>;
0453                         status = "okay";
0454                 };
0455 
0456                 /* GBF (Bluetooth) UART */
0457                 uart@80120000 {
0458                         pinctrl-names = "default", "sleep";
0459                         pinctrl-0 = <&u0_a_1_default>;
0460                         pinctrl-1 = <&u0_a_1_sleep>;
0461                         status = "okay";
0462 
0463                         bluetooth {
0464                                 compatible = "brcm,bcm4330-bt";
0465                                 /* GPIO222 rail BT_VREG_EN to BT_REG_ON */
0466                                 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
0467                                 /* BT_WAKE on GPIO199 */
0468                                 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
0469                                 /* BT_HOST_WAKE on GPIO97 */
0470                                 /* FIXME: convert to interrupt */
0471                                 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
0472                                 /* BT_RST_N on GPIO209 */
0473                                 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
0474                                 pinctrl-names = "default";
0475                                 pinctrl-0 = <&bluetooth_default_mode>;
0476                         };
0477                 };
0478 
0479                 /* GPS UART */
0480                 uart@80121000 {
0481                         status = "okay";
0482                         pinctrl-names = "default", "sleep";
0483                         pinctrl-0 = <&u1rxtx_a_1_default &u1ctsrts_a_1_default>;
0484                         pinctrl-1 = <&u1rxtx_a_1_sleep &u1ctsrts_a_1_sleep>;
0485 
0486                         gnss {
0487                                 compatible = "brcm,bcm4751";
0488                                 /* GPS_RSTN on GPIO21 */
0489                                 reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
0490                                 /* GPS_ON_OFF on GPIO86 */
0491                                 enable-gpios = <&gpio2 22 GPIO_ACTIVE_HIGH>;
0492                                 /* GPS_1V8 (VSMPS2) */
0493                                 vddio-supply = <&db8500_vsmps2_reg>;
0494                                 pinctrl-names = "default";
0495                                 pinctrl-0 = <&bcm4751_codina_default>;
0496                         };
0497                 };
0498 
0499                 /* Debugging console UART connected to TSU6111RSVR (FSA880) */
0500                 uart@80007000 {
0501                         status = "okay";
0502                         pinctrl-names = "default", "sleep";
0503                         pinctrl-0 = <&u2rxtx_c_1_default>;
0504                         pinctrl-1 = <&u2rxtx_c_1_sleep>;
0505                 };
0506 
0507                 prcmu@80157000 {
0508                         ab8500 {
0509                                 phy {
0510                                         pinctrl-names = "default", "sleep";
0511                                         pinctrl-0 = <&usb_a_1_default>;
0512                                         pinctrl-1 = <&usb_a_1_sleep>;
0513                                 };
0514 
0515                                 ab8500_fg {
0516                                         line-impedance-micro-ohms = <36000>;
0517                                 };
0518 
0519                                 regulator {
0520                                         ab8500_ldo_aux1 {
0521                                                 /* Used for VDD for sensors */
0522                                                 regulator-name = "V-SENSORS-VDD";
0523                                                 regulator-min-microvolt = <3000000>;
0524                                                 regulator-max-microvolt = <3000000>;
0525                                         };
0526 
0527                                         ab8500_ldo_aux2 {
0528                                                 /* Used for VIO for sensors */
0529                                                 regulator-name = "V-SENSORS-VIO";
0530                                                 regulator-min-microvolt = <1800000>;
0531                                                 regulator-max-microvolt = <1800000>;
0532                                         };
0533 
0534                                         ab8500_ldo_aux3 {
0535                                                 /* Used for voltage for external MMC/SD card */
0536                                                 regulator-name = "V-MMC-SD";
0537                                                 regulator-min-microvolt = <1200000>;
0538                                                 regulator-max-microvolt = <2910000>;
0539                                         };
0540                                 };
0541                         };
0542                 };
0543 
0544                 /* I2C0 also known as "AGC I2C" */
0545                 i2c@80004000 {
0546                         status = "okay";
0547                         pinctrl-names = "default", "sleep";
0548                         pinctrl-0 = <&i2c0_a_1_default>;
0549                         pinctrl-1 = <&i2c0_a_1_sleep>;
0550 
0551                         proximity@39 {
0552                                 /* Codina has the Amstaos TMD2672 */
0553                                 compatible = "amstaos,tmd2672";
0554                                 clock-frequency = <400000>;
0555                                 reg = <0x39>;
0556 
0557                                 /* IRQ on GPIO146 "PS_INT" */
0558                                 interrupt-parent = <&gpio4>;
0559                                 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
0560                                 /* FIXME: needs a VDDIO supply that is connected to a pull-up resistor */
0561                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0562                                 pinctrl-names = "default";
0563                                 pinctrl-0 = <&tms2672_codina_default>;
0564                         };
0565                 };
0566 
0567                 /* I2C1 on GPIO16 and GPIO17 also called "MUS I2C" */
0568                 i2c@80122000 {
0569                         status = "okay";
0570                         pinctrl-names = "default","sleep";
0571                         /* FIXME: If it doesn't work try what we use on Gavini */
0572                         pinctrl-0 = <&i2c1_b_2_default>;
0573                         pinctrl-1 = <&i2c1_b_2_sleep>;
0574 
0575                         /* Texas Instruments TSU6111 micro USB switch */
0576                         usb-switch@25 {
0577                                 compatible = "ti,tsu6111";
0578                                 reg = <0x25>;
0579                                 /* Interrupt JACK_INT_N on GPIO95 */
0580                                 interrupt-parent = <&gpio2>;
0581                                 interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
0582                                 pinctrl-names = "default";
0583                                 pinctrl-0 = <&tsu6111_codina_default>;
0584                         };
0585                 };
0586 
0587                 /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
0588                 i2c@80128000 {
0589                         status = "okay";
0590                         pinctrl-names = "default", "sleep";
0591                         pinctrl-0 = <&i2c2_b_2_default>;
0592                         pinctrl-1 = <&i2c2_b_2_sleep>;
0593 
0594                         lisd3dh@19 {
0595                                 /* ST Microelectronics Accelerometer */
0596                                 compatible = "st,lis3dh-accel";
0597                                 st,drdy-int-pin = <1>;
0598                                 reg = <0x19>;
0599                                 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
0600                                 vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
0601                                 mount-matrix = "0", "1", "0",
0602                                                "-1", "0", "0",
0603                                                "0", "0", "1";
0604                         };
0605                 };
0606 
0607                 /* I2C3 */
0608                 i2c@80110000 {
0609                         status = "okay";
0610 
0611                         pinctrl-names = "default", "sleep";
0612                         pinctrl-0 = <&i2c3_c_2_default>;
0613                         pinctrl-1 = <&i2c3_c_2_sleep>;
0614 
0615                         /* TODO: write bindings and driver for this touchscreen */
0616 
0617                         /* Zinitix BT404 ISP part */
0618                         isp@50 {
0619                                 compatible = "zinitix,bt404-isp";
0620                                 reg = <0x50>;
0621                                 pinctrl-names = "default";
0622                                 pinctrl-0 = <&tsp_default>;
0623                         };
0624 
0625                         /* Zinitix BT404 touchscreen, also has the touchkeys for menu and back */
0626                         touchscreen@20 {
0627                                 compatible = "zinitix,bt404";
0628                                 reg = <0x20>;
0629                                 /* GPIO218 (TSP_INT_1V8) */
0630                                 interrupt-parent = <&gpio6>;
0631                                 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
0632                                 vcca-supply = <&ldo_tsp_3v3_reg>;
0633                                 vdd-supply = <&ldo_tsp_1v8_reg>;
0634                                 zinitix,mode = <2>;
0635                                 touchscreen-size-x = <480>;
0636                                 touchscreen-size-y = <800>;
0637                                 pinctrl-names = "default";
0638                                 pinctrl-0 = <&tsp_default>;
0639                         };
0640                 };
0641 
0642                 mcde@a0350000 {
0643                         status = "okay";
0644                         pinctrl-names = "default";
0645                         pinctrl-0 = <&dpi_default_mode>;
0646 
0647                         port {
0648                                 display_out: endpoint {
0649                                         remote-endpoint = <&panel_in>;
0650                                 };
0651                         };
0652                 };
0653         };
0654 };
0655 
0656 &pinctrl {
0657         /*
0658          * This extends the MC0_A_2 default config to include
0659          * the card detect GPIO217 line.
0660          */
0661         sdi0 {
0662                 mc0_a_2_default {
0663                         default_cfg4 {
0664                                 pins = "GPIO217_AH12"; /* card detect */
0665                                 ste,config = <&gpio_in_pd>;
0666                         };
0667                 };
0668         };
0669         sdi2 {
0670                 /*
0671                  * This will make the resistor mounted in R0.0 pull up
0672                  * the reset line and take the eMMC out of reset. On
0673                  * R0.4 variants, GPIO130 should be set in GPIO mode and
0674                  * pulled down. (Not connected.)
0675                  */
0676                 mc2_a_1_default {
0677                         default_cfg2 {
0678                                 pins = "GPIO130_C8"; /* FBCLK */
0679                                 ste,config = <&in_nopull>;
0680                         };
0681                 };
0682         };
0683         /* GPIO that enables the 2.9V SD card level translator */
0684         sd-level-translator {
0685                 sd_level_translator_default: sd_level_translator_default {
0686                         /* level shifter on GPIO87 */
0687                         codina_cfg1 {
0688                                 pins = "GPIO87_B3";
0689                                 ste,config = <&gpio_out_hi>;
0690                         };
0691                 };
0692         };
0693         /* GPIO that enables the LDO regulator for the eMMC */
0694         emmc-ldo {
0695                 emmc_ldo_en_default_mode: emmc_ldo_default {
0696                         /* LDO enable on GPIO223 */
0697                         codina_cfg1 {
0698                                 pins = "GPIO223_AH9";
0699                                 ste,config = <&gpio_out_hi>;
0700                         };
0701                 };
0702         };
0703         /* GPIOs for panel control */
0704         panel {
0705                 panel_default_mode: panel_default {
0706                         codina_cfg1 {
0707                                 /* Reset line */
0708                                 pins = "GPIO139_C9";
0709                                 ste,config = <&gpio_out_lo>;
0710                         };
0711                         codina_cfg2 {
0712                                 /* ESD IRQ line "LCD detect" */
0713                                 pins = "GPIO93_B7";
0714                                 ste,config = <&gpio_in_nopull>;
0715                         };
0716                 };
0717         };
0718         /* GPIO that enables the LDO regulator for the touchscreen */
0719         tsp-ldo {
0720                 tsp_ldo_en_default_mode: tsp_ldo_default {
0721                         /* LDO enable on GPIO94 */
0722                         gavini_cfg1 {
0723                                 pins = "GPIO94_D7";
0724                                 ste,config = <&gpio_out_hi>;
0725                         };
0726                 };
0727         };
0728         /* GPIO that enables the LDO regulator for the LCD display */
0729         lcd-ldo {
0730                 lcd_pwr_en_default_mode: lcd_pwr_en_default {
0731                         /* LCD_PWR_EN on GPIO219 */
0732                         codina_cfg1 {
0733                                 pins = "GPIO219_AG10";
0734                                 ste,config = <&gpio_out_hi>;
0735                         };
0736                 };
0737         };
0738         /* GPIO that enables the LDO regulator for the key LED */
0739         key-led {
0740                 gpio_leds_default_mode: en_led_ldo_default {
0741                         /* EN_LED_LDO on GPIO194 */
0742                         codina_cfg1 {
0743                                 pins = "GPIO194_AF27";
0744                                 ste,config = <&gpio_out_hi>;
0745                         };
0746                 };
0747         };
0748         /* GPIO that enables the WLAN internal LDO regulators */
0749         wlan-ldo {
0750                 wlan_ldo_en_default: wlan_ldo_default {
0751                         /* GPIO215 named WLAN_RST_N */
0752                         codina_cfg1 {
0753                                 pins = "GPIO215_AH13";
0754                                 ste,config = <&gpio_out_lo>;
0755                         };
0756                 };
0757         };
0758         /* Backlight GPIO */
0759         backlight {
0760                 ktd253_backlight_default_mode: backlight_default {
0761                         skomer_cfg1 {
0762                                 pins = "GPIO68_E1"; /* LCD_BL_CTRL */
0763                                 ste,config = <&gpio_out_lo>;
0764                         };
0765                 };
0766         };
0767         /* Flash and torch */
0768         flash {
0769                 gpio_flash_default_mode: flash_default {
0770                         codina_cfg1 {
0771                                 pins = "GPIO140_B11", "GPIO141_C12";
0772                                 ste,config = <&gpio_out_lo>;
0773                         };
0774                 };
0775         };
0776         /* GPIO keys */
0777         gpio-keys {
0778                 gpio_keys_default_mode: gpio_keys_default {
0779                         skomer_cfg1 {
0780                                 pins = "GPIO67_G2", /* VOL UP */
0781                                        "GPIO91_B6", /* HOME */
0782                                        "GPIO92_D6"; /* VOL DOWN */
0783                                 ste,config = <&gpio_in_pu>;
0784                         };
0785                 };
0786         };
0787         /* Interrupt line for the Zinitix BT404 touchscreen */
0788         tsp {
0789                 tsp_default: tsp_default {
0790                         codina_cfg1 {
0791                                 pins = "GPIO218_AH11";  /* TSP_INT_1V8 */
0792                                 ste,config = <&gpio_in_nopull>;
0793                         };
0794                 };
0795         };
0796         /* Interrupt line for light/proximity sensor TMS2672 */
0797         tms2672 {
0798                 tms2672_codina_default: tms2672_codina {
0799                         codina_cfg1 {
0800                                 pins = "GPIO146_D13";
0801                                 ste,config = <&gpio_in_nopull>;
0802                         };
0803                 };
0804         };
0805         /* GPIO-based I2C bus for subpmu */
0806         i2c-gpio-0 {
0807                 i2c_gpio_0_default: i2c_gpio_0 {
0808                         codina_cfg1 {
0809                                 pins = "GPIO143_D12", "GPIO144_B13";
0810                                 ste,config = <&gpio_in_nopull>;
0811                         };
0812                 };
0813         };
0814         /* GPIO-based I2C bus for the NFC */
0815         i2c-gpio-1 {
0816                 i2c_gpio_1_default: i2c_gpio_1 {
0817                         codina_cfg1 {
0818                                 pins = "GPIO151_D17", "GPIO152_D16";
0819                                 ste,config = <&gpio_in_nopull>;
0820                         };
0821                 };
0822         };
0823         /* GPIO-based SPI bus for the display */
0824         spi-gpio-0 {
0825                 spi_gpio_0_default: spi_gpio_0_d {
0826                         codina_cfg1 {
0827                                 pins = "GPIO220_AH10", "GPIO201_AF24", "GPIO224_AG9";
0828                                 ste,config = <&gpio_out_hi>;
0829                         };
0830                         codina_cfg2 {
0831                                 pins = "GPIO225_AG8";
0832                                 /* Needs pull down, no pull down resistor on board */
0833                                 ste,config = <&gpio_in_pd>;
0834                         };
0835                 };
0836                 spi_gpio_0_sleep: spi_gpio_0_s {
0837                         codina_cfg1 {
0838                                 pins = "GPIO220_AH10", "GPIO201_AF24",
0839                                        "GPIO224_AG9", "GPIO225_AG8";
0840                                 ste,config = <&gpio_out_hi>;
0841                         };
0842                 };
0843         };
0844         wlan {
0845                 wlan_default_mode: wlan_default {
0846                         /* GPIO216 for WL_HOST_WAKE */
0847                         codina_cfg2 {
0848                                 pins = "GPIO216_AG12";
0849                                 ste,config = <&gpio_in_pd>;
0850                         };
0851                 };
0852         };
0853         bluetooth {
0854                 bluetooth_default_mode: bluetooth_default {
0855                         /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
0856                         codina_cfg1 {
0857                                 pins = "GPIO199_AH23", "GPIO222_AJ9";
0858                                 ste,config = <&gpio_out_lo>;
0859                         };
0860                         /* GPIO97 BT_HOST_WAKE */
0861                         codina_cfg2 {
0862                                 pins = "GPIO97_D9";
0863                                 ste,config = <&gpio_in_nopull>;
0864                         };
0865                         /* GPIO209 BT_RST_N */
0866                         codina_cfg3 {
0867                                 pins = "GPIO209_AG15";
0868                                 ste,config = <&gpio_out_hi>;
0869                         };
0870                 };
0871         };
0872         /* Interrupt line for TI TSU6111 Micro USB switch */
0873         tsu6111 {
0874                 tsu6111_codina_default: tsu6111_codina {
0875                         codina_cfg1 {
0876                                 /* GPIO95 used for IRQ */
0877                                 pins = "GPIO95_E8";
0878                                 ste,config = <&gpio_in_nopull>;
0879                         };
0880                 };
0881         };
0882         nfc {
0883                 pn544_codina_default: pn544_codina {
0884                         /* Interrupt line */
0885                         codina_cfg1 {
0886                                 pins = "GPIO32_V2";
0887                                 ste,config = <&gpio_in_nopull>;
0888                         };
0889                         /* Enable and firmware GPIOs */
0890                         codina_cfg2 {
0891                                 pins = "GPIO31_V3", "GPIO88_C4";
0892                                 ste,config = <&gpio_out_lo>;
0893                         };
0894                 };
0895         };
0896         bcm4751 {
0897                 bcm4751_codina_default: bcm4751_codina {
0898                         /* Reset line, start out asserted */
0899                         codina_cfg1 {
0900                                 pins = "GPIO21_AB3";
0901                                 ste,config = <&gpio_out_lo>;
0902                         };
0903                         /* GPS_ON_OFF, start out deasserted (off) */
0904                         codina_cfg2 {
0905                                 pins = "GPIO86_C6";
0906                                 ste,config = <&gpio_out_lo>;
0907                         };
0908                 };
0909         };
0910         vibrator {
0911                 vibrator_default: vibrator_default {
0912                         codina_cfg1 {
0913                                 pins = "GPIO195_AG28";  /* MOT_EN */
0914                                 ste,config = <&gpio_out_lo>;
0915                         };
0916                 };
0917         };
0918         mcde {
0919                 dpi_default_mode: dpi_default {
0920                         default_mux1 {
0921                                 /* Mux in all the data lines */
0922                                 function = "lcd";
0923                                 groups =
0924                                         /* Data lines D0-D7 GPIO70..GPIO77 */
0925                                         "lcd_d0_d7_a_1",
0926                                         /* Data lines D8-D11 GPIO78..GPIO81 */
0927                                         "lcd_d8_d11_a_1",
0928                                         /* Data lines D12-D15 GPIO82..GPIO85 */
0929                                         "lcd_d12_d15_a_1",
0930                                         /* Data lines D16-D23 GPIO161..GPIO168 */
0931                                         "lcd_d16_d23_b_1";
0932                         };
0933                         default_mux2 {
0934                                 function = "lcda";
0935                                 /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
0936                                 groups = "lcdaclk_b_1", "lcda_b_1";
0937                         };
0938                         /* Input, no pull-up is the default state for pins used for an alt function */
0939                         default_cfg1 {
0940                                 pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
0941                                 ste,config = <&in_nopull>;
0942                         };
0943                 };
0944         };
0945 };