Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003  * Devicetree for the Samsung Galaxy S Advance GT-I9070 also known as Janice.
0004  */
0005 
0006 /dts-v1/;
0007 #include "ste-db8500.dtsi"
0008 #include "ste-ab8500.dtsi"
0009 #include "ste-dbx5x0-pinctrl.dtsi"
0010 #include <dt-bindings/gpio/gpio.h>
0011 #include <dt-bindings/leds/common.h>
0012 #include <dt-bindings/input/input.h>
0013 #include <dt-bindings/interrupt-controller/irq.h>
0014 
0015 / {
0016         model = "Samsung Galaxy S Advance (GT-I9070)";
0017         compatible = "samsung,janice", "st-ericsson,u8500";
0018 
0019         chosen {
0020                 stdout-path = &serial2;
0021         };
0022 
0023         battery: battery {
0024                 compatible = "samsung,eb535151vu";
0025         };
0026 
0027         thermal-zones {
0028                 battery-thermal {
0029                         /* This zone will be polled by the battery temperature code */
0030                         polling-delay = <0>;
0031                         polling-delay-passive = <0>;
0032                         thermal-sensors = <&bat_therm>;
0033                 };
0034         };
0035 
0036         bat_therm: thermistor {
0037                 compatible = "samsung,1404-001221";
0038                 io-channels = <&gpadc 0x02>; /* BatTemp */
0039                 pullup-uv = <1800000>;
0040                 pullup-ohm = <230000>;
0041                 pulldown-ohm = <0>;
0042                 #thermal-sensor-cells = <0>;
0043         };
0044 
0045         /* External LDO for eMMC LDO VMEM_3V3 controlled by GPIO6 */
0046         ldo_3v3_reg: regulator-gpio-ldo-3v3 {
0047                 compatible = "regulator-fixed";
0048                 /* Supplied in turn by VBAT */
0049                 regulator-name = "VMEM_3V3";
0050                 regulator-min-microvolt = <3300000>;
0051                 regulator-max-microvolt = <3300000>;
0052                 gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
0053                 startup-delay-us = <5000>; // FIXME
0054                 enable-active-high;
0055                 pinctrl-names = "default";
0056                 pinctrl-0 = <&emmc_ldo_en_default_mode>;
0057         };
0058 
0059         /*
0060          * External Ricoh "TSP" regulator for the touchscreen.
0061          * One GPIO line controls two voltages of 3.3V and 1.8V
0062          * this line is known as "TSP_LDO_ON1" in the schematics.
0063          */
0064         ldo_tsp_3v3_reg: regulator-gpio-tsp-ldo-3v3 {
0065                 compatible = "regulator-fixed";
0066                 /* Supplied in turn by VBAT */
0067                 regulator-name = "LDO_TSP_A3V3";
0068                 regulator-min-microvolt = <3300000>;
0069                 regulator-max-microvolt = <3300000>;
0070                 /* GPIO94 controls this regulator */
0071                 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
0072                 /* 70 ms power-on delay */
0073                 startup-delay-us = <70000>;
0074                 enable-active-high;
0075                 pinctrl-names = "default";
0076                 pinctrl-0 = <&tsp_ldo_en_default_mode>;
0077         };
0078         ldo_tsp_1v8_reg: regulator-gpio-tsp-ldo-1v8 {
0079                 compatible = "regulator-fixed";
0080                 /* Supplied in turn by VBAT */
0081                 regulator-name = "VREG_TSP_1V8";
0082                 regulator-min-microvolt = <1800000>;
0083                 regulator-max-microvolt = <1800000>;
0084                 /* GPIO94 controls this regulator */
0085                 gpio = <&gpio2 30 GPIO_ACTIVE_HIGH>;
0086                 /* 70 ms power-on delay */
0087                 startup-delay-us = <70000>;
0088                 enable-active-high;
0089                 pinctrl-names = "default";
0090                 pinctrl-0 = <&tsp_ldo_en_default_mode>;
0091         };
0092 
0093         /*
0094          * External Ricoh "TSP" regulator for the touchkeys.
0095          * Two GPIO lines controls two voltages of 3.3V and 1.8V
0096          * TSP_LDO_ON2 controls VREG_TOUCHKEY_1V8
0097          * EN_LED_LDO controls VREG_KLED_3V3 (key LED)
0098          */
0099         ldo_kled_3v3_reg: regulator-gpio-vreg-kled-3v3 {
0100                 compatible = "regulator-fixed";
0101                 /* Supplied in turn by VBAT */
0102                 regulator-name = "VREG_KLED_3V3";
0103                 regulator-min-microvolt = <3300000>;
0104                 regulator-max-microvolt = <3300000>;
0105                 /* GPIO68 controls this regulator */
0106                 gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
0107                 /* 70 ms power-on delay */
0108                 startup-delay-us = <70000>;
0109                 enable-active-high;
0110                 pinctrl-names = "default";
0111                 pinctrl-0 = <&en_led_ldo_default_mode>;
0112         };
0113         ldo_touchkey_1v8_reg: regulator-gpio-vreg-touchkey-1v8 {
0114                 compatible = "regulator-fixed";
0115                 /* Supplied in turn by VBAT */
0116                 regulator-name = "VREG_TOUCHKEY_1V8";
0117                 regulator-min-microvolt = <1800000>;
0118                 regulator-max-microvolt = <1800000>;
0119                 /* GPIO89 controls this regulator */
0120                 gpio = <&gpio2 25 GPIO_ACTIVE_HIGH>;
0121                 /* 70 ms power-on delay */
0122                 startup-delay-us = <70000>;
0123                 enable-active-high;
0124                 pinctrl-names = "default";
0125                 pinctrl-0 = <&tsp_ldo_on2_default_mode>;
0126         };
0127 
0128 
0129         /*
0130          * External Ricoh RP152L010B-TR LCD LDO regulator for the display.
0131          * LCD_PWR_EN controls a 3.0V and 1.8V output.
0132          */
0133         lcd_3v0_reg: regulator-gpio-lcd-3v0 {
0134                 compatible = "regulator-fixed";
0135                 /* Supplied in turn by VBAT */
0136                 regulator-name = "VREG_LCD_3V0";
0137                 regulator-min-microvolt = <3000000>;
0138                 regulator-max-microvolt = <3000000>;
0139                 /* GPIO219 controls this regulator */
0140                 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
0141                 enable-active-high;
0142                 pinctrl-names = "default";
0143                 pinctrl-0 = <&lcd_pwr_en_default_mode>;
0144         };
0145         lcd_1v8_reg: regulator-gpio-lcd-1v8 {
0146                 compatible = "regulator-fixed";
0147                 /* Supplied in turn by VBAT */
0148                 regulator-name = "VREG_LCD_1V8";
0149                 regulator-min-microvolt = <1800000>;
0150                 regulator-max-microvolt = <1800000>;
0151                 /* GPIO219 controls this regulator */
0152                 gpio = <&gpio6 27 GPIO_ACTIVE_HIGH>;
0153                 enable-active-high;
0154                 pinctrl-names = "default";
0155                 pinctrl-0 = <&lcd_pwr_en_default_mode>;
0156         };
0157 
0158         /*
0159          * This regulator is a GPIO line that drives the Broadcom WLAN
0160          * line WL_REG_ON high and enables the internal regulators
0161          * inside the chip. Unfortunatley it is erroneously named
0162          * WLAN_RST_N on the schematic but it is not a reset line.
0163          *
0164          * The voltage specified here is only used to determine the OCR mask,
0165          * the for the SDIO connector, the chip is actually connected
0166          * directly to VBAT.
0167          */
0168         wl_reg: regulator-gpio-wlan {
0169                 compatible = "regulator-fixed";
0170                 regulator-name = "WL_REG_ON";
0171                 regulator-min-microvolt = <3000000>;
0172                 regulator-max-microvolt = <3000000>;
0173                 startup-delay-us = <100000>;
0174                 /* GPIO215 (WLAN_RST_N to WL_REG_ON) */
0175                 gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>;
0176                 enable-active-high;
0177                 pinctrl-names = "default";
0178                 pinctrl-0 = <&wlan_ldo_en_default>;
0179         };
0180 
0181 
0182         gpio-keys {
0183                 compatible = "gpio-keys";
0184                 pinctrl-names = "default";
0185                 pinctrl-0 = <&gpio_keys_default_mode>;
0186 
0187                 button-home {
0188                         linux,code = <KEY_HOME>;
0189                         label = "HOME";
0190                         /* GPIO91 */
0191                         gpios = <&gpio2 27 GPIO_ACTIVE_LOW>;
0192                 };
0193                 button-volup {
0194                         linux,code = <KEY_VOLUMEUP>;
0195                         label = "VOL+";
0196                         /* GPIO67 */
0197                         gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
0198                 };
0199                 button-voldown {
0200                         linux,code = <KEY_VOLUMEDOWN>;
0201                         label = "VOL-";
0202                         /* GPIO92 */
0203                         gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
0204                 };
0205         };
0206 
0207         /* Richtek RT8515GQW Flash LED Driver IC */
0208         flash {
0209                 compatible = "richtek,rt8515";
0210                 /* GPIO 140 */
0211                 enf-gpios = <&gpio4 12 GPIO_ACTIVE_HIGH>;
0212                 /* GPIO 141 */
0213                 ent-gpios = <&gpio4 13 GPIO_ACTIVE_HIGH>;
0214                 /*
0215                  * RFS is 16 kOhm and RTS is 100 kOhm giving
0216                  * the flash max current 343mA and torch max
0217                  * current 55 mA.
0218                  */
0219                 richtek,rfs-ohms = <16000>;
0220                 richtek,rts-ohms = <100000>;
0221                 pinctrl-names = "default";
0222                 pinctrl-0 = <&gpio_flash_default_mode>;
0223 
0224                 led {
0225                         function = LED_FUNCTION_FLASH;
0226                         color = <LED_COLOR_ID_WHITE>;
0227                         flash-max-timeout-us = <250000>;
0228                         flash-max-microamp = <343750>;
0229                         led-max-microamp = <55000>;
0230                 };
0231         };
0232 
0233         /* Bit-banged I2C on GPIO143 and GPIO144 also called "SUBPMU I2C" */
0234         i2c-gpio-0 {
0235                 compatible = "i2c-gpio";
0236                 sda-gpios = <&gpio4 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0237                 scl-gpios = <&gpio4 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0238                 pinctrl-names = "default";
0239                 pinctrl-0 = <&i2c_gpio_0_default>;
0240                 #address-cells = <1>;
0241                 #size-cells = <0>;
0242 
0243                 /* Yamaha YAS530 magnetometer */
0244                 magnetometer@2e {
0245                         compatible = "yamaha,yas530";
0246                         reg = <0x2e>;
0247                         /* VDD 3V */
0248                         vdd-supply = <&ab8500_ldo_aux1_reg>;
0249                         /* IOVDD 1.8V */
0250                         iovdd-supply = <&ab8500_ldo_aux2_reg>;
0251                         /* GPIO204 COMPASS_RST_N */
0252                         reset-gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
0253                         pinctrl-names = "default";
0254                         pinctrl-0 = <&yas529_default>;
0255                 };
0256                 /* TODO: this should also be used by the NCP6914 Camera power management unit */
0257         };
0258 
0259         /*
0260          * These pins do have an spi controller, however the controller on
0261          * these pins is not the fully featured PL022 SSP/SPI block but the
0262          * ST Micro diet "PL023" version. One of the lacking features in
0263          * this derivative is 3wire support, so it cannot be used to drive
0264          * this panel interface. We have to use GPIO bit-banging instead.
0265          */
0266         spi-gpio-0 {
0267                 compatible = "spi-gpio";
0268                 /* Clock on GPIO220 */
0269                 sck-gpios = <&gpio6 28 GPIO_ACTIVE_HIGH>;
0270                 /* MISO/MOSI on GPIO224 (no separate MISO pin) */
0271                 mosi-gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
0272                 /* Chip select on GPIO223 */
0273                 cs-gpios = <&gpio6 31 GPIO_ACTIVE_LOW>;
0274                 num-chipselects = <1>;
0275 
0276                 pinctrl-names = "default";
0277                 pinctrl-0 = <&spi_gpio_0_default>;
0278                 #address-cells = <1>;
0279                 #size-cells = <0>;
0280 
0281                 panel@0 {
0282                         compatible = "samsung,s6e63m0";
0283                         reg = <0>;
0284                         vdd3-supply = <&lcd_3v0_reg>;
0285                         vci-supply = <&lcd_1v8_reg>;
0286                         /* Reset on GPIO139 */
0287                         reset-gpios = <&gpio4 11 GPIO_ACTIVE_LOW>;
0288                         pinctrl-names = "default";
0289                         pinctrl-0 = <&panel_default_mode>;
0290                         spi-3wire;
0291                         /* TYPE 3: inverse clock polarity and phase */
0292                         spi-cpha;
0293                         spi-cpol;
0294 
0295                         port {
0296                                 panel_in: endpoint {
0297                                         remote-endpoint = <&display_out>;
0298                                 };
0299                         };
0300                 };
0301         };
0302 
0303         /*
0304          * Current sense amplifier on the light sensor to convert current to
0305          * voltage. We do not know if this is the actual configuration. The
0306          * sense resistor value was found by calibrating in a room ambient
0307          * light with a second mobile phone light sensor as reference. If you
0308          * pry a Janice phone apart and inspect it you may figure this out.
0309          */
0310         gp2a_shunt: current-sense-shunt {
0311                 compatible = "current-sense-shunt";
0312                 io-channels = <&gpadc 0x07>;
0313                 shunt-resistor-micro-ohms = <15000000>; /* 15 ohms c:a */
0314                 #io-channel-cells = <0>;
0315                 io-channel-ranges;
0316         };
0317 
0318         /* Bit-banged I2C on GPIO196 and GPIO197 also called "TOUCHKEY_I2C" */
0319         i2c-gpio-1 {
0320                 compatible = "i2c-gpio";
0321                 sda-gpios = <&gpio6 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0322                 scl-gpios = <&gpio6 4 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0323                 clock-frequency = <400000>;
0324                 pinctrl-names = "default";
0325                 pinctrl-0 = <&i2c_gpio_1_default>;
0326                 #address-cells = <1>;
0327                 #size-cells = <0>;
0328 
0329                 touchkey@20 {
0330                         compatible = "coreriver,tc360-touchkey";
0331                         reg = <0x20>;
0332                         vdd-supply = <&ldo_kled_3v3_reg>;
0333                         vcc-supply = <&ldo_touchkey_1v8_reg>;
0334                         vddio-supply = <&ldo_touchkey_1v8_reg>;
0335 
0336                         /* Interrupt on GPIO 198 */
0337                         interrupt-parent = <&gpio6>;
0338                         interrupts = <6 IRQ_TYPE_EDGE_RISING>;
0339 
0340                         pinctrl-names = "default";
0341                         pinctrl-0 = <&touchkey_default_mode>;
0342                         linux,keycodes = <KEY_MENU KEY_BACK>;
0343                 };
0344         };
0345 
0346         /* Bit-banged I2C on GPIO201 and GPIO202 also called "MOT_I2C" */
0347         i2c-gpio-2 {
0348                 compatible = "i2c-gpio";
0349                 sda-gpios = <&gpio6 10 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0350                 scl-gpios = <&gpio6 9 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0351                 pinctrl-names = "default";
0352                 pinctrl-0 = <&i2c_gpio_2_default>;
0353                 #address-cells = <1>;
0354                 #size-cells = <0>;
0355                 /* TODO: add the Immersion ISA1200 I2C device here */
0356         };
0357 
0358         /* Bit-banged I2C on GPIO151 and GPIO152 also called "NFC_I2C" */
0359         i2c-gpio-3 {
0360                 compatible = "i2c-gpio";
0361                 sda-gpios = <&gpio4 24 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0362                 scl-gpios = <&gpio4 23 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0363                 pinctrl-names = "default";
0364                 pinctrl-0 = <&i2c_gpio_3_default>;
0365                 #address-cells = <1>;
0366                 #size-cells = <0>;
0367 
0368                 nfc@30 {
0369                         compatible = "nxp,pn547", "nxp,nxp-nci-i2c";
0370                         reg = <0x30>;
0371                         /* NFC IRQ on GPIO32 */
0372                         interrupt-parent = <&gpio1>;
0373                         interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
0374                         /* GPIO 31 */
0375                         firmware-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
0376                         /* GPIO88 */
0377                         enable-gpios = <&gpio2 24 GPIO_ACTIVE_HIGH>;
0378                         pinctrl-names = "default";
0379                         pinctrl-0 = <&pn547_janice_default>;
0380                 };
0381         };
0382 
0383         soc {
0384                 /* External Micro SD slot */
0385                 mmc@80126000 {
0386                         arm,primecell-periphid = <0x10480180>;
0387                         max-frequency = <50000000>;
0388                         bus-width = <4>;
0389                         cap-sd-highspeed;
0390                         cap-mmc-highspeed;
0391                         st,sig-dir-cmd;
0392                         st,sig-dir-dat0;
0393                         st,sig-dir-dat2;
0394                         st,sig-pin-fbclk;
0395                         full-pwr-cycle;
0396                         /* MMC is powered by AUX3 1.2V .. 2.91V */
0397                         vmmc-supply = <&ab8500_ldo_aux3_reg>;
0398                         /* 2.9 V level translator is using AUX3 at 2.9 V as well */
0399                         vqmmc-supply = <&ab8500_ldo_aux3_reg>;
0400                         pinctrl-names = "default", "sleep";
0401                         pinctrl-0 = <&mc0_a_2_default>;
0402                         pinctrl-1 = <&mc0_a_2_sleep>;
0403                         cd-gpios  = <&gpio6 25 GPIO_ACTIVE_LOW>; // GPIO217
0404                         status = "okay";
0405                 };
0406 
0407                 /* WLAN SDIO channel */
0408                 mmc@80118000 {
0409                         arm,primecell-periphid = <0x10480180>;
0410                         max-frequency = <50000000>;
0411                         bus-width = <4>;
0412                         non-removable;
0413                         cap-sd-highspeed;
0414                         pinctrl-names = "default", "sleep";
0415                         pinctrl-0 = <&mc1_a_2_default>;
0416                         pinctrl-1 = <&mc1_a_2_sleep>;
0417                         /*
0418                          * GPIO-controlled voltage enablement: this drives
0419                          * the WL_REG_ON line high when we use this device.
0420                          * Represented as regulator to fill OCR mask.
0421                          */
0422                         vmmc-supply = <&wl_reg>;
0423 
0424                         #address-cells = <1>;
0425                         #size-cells = <0>;
0426                         status = "okay";
0427 
0428                         wifi@1 {
0429                                 compatible = "brcm,bcm4330-fmac", "brcm,bcm4329-fmac";
0430                                 reg = <1>;
0431                                 /* GPIO216 WL_HOST_WAKE */
0432                                 interrupt-parent = <&gpio6>;
0433                                 interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
0434                                 interrupt-names = "host-wake";
0435                                 pinctrl-names = "default";
0436                                 pinctrl-0 = <&wlan_default_mode>;
0437                         };
0438                 };
0439 
0440                 /* eMMC */
0441                 mmc@80005000 {
0442                         arm,primecell-periphid = <0x10480180>;
0443                         max-frequency = <50000000>;
0444                         bus-width = <8>;
0445                         non-removable;
0446                         cap-mmc-highspeed;
0447                         mmc-ddr-1_8v;
0448                         no-sdio;
0449                         no-sd;
0450                         vmmc-supply = <&ldo_3v3_reg>;
0451                         pinctrl-names = "default", "sleep";
0452                         pinctrl-0 = <&mc2_a_1_default>;
0453                         pinctrl-1 = <&mc2_a_1_sleep>;
0454                         status = "okay";
0455                 };
0456 
0457                 /* GBF (Bluetooth) UART */
0458                 uart@80120000 {
0459                         pinctrl-names = "default", "sleep";
0460                         pinctrl-0 = <&u0_a_1_default>;
0461                         pinctrl-1 = <&u0_a_1_sleep>;
0462                         status = "okay";
0463 
0464                         bluetooth {
0465                                 /* BCM4330B1 actually */
0466                                 compatible = "brcm,bcm4330-bt";
0467                                 /* GPIO222 rail BT_VREG_EN to BT_REG_ON */
0468                                 shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>;
0469                                 /* BT_WAKE on GPIO199 */
0470                                 device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
0471                                 /* BT_HOST_WAKE on GPIO97 */
0472                                 /* FIXME: convert to interrupt */
0473                                 host-wakeup-gpios = <&gpio3 1 GPIO_ACTIVE_HIGH>;
0474                                 /* BT_RST_N on GPIO209 */
0475                                 reset-gpios = <&gpio6 17 GPIO_ACTIVE_LOW>;
0476                                 pinctrl-names = "default";
0477                                 pinctrl-0 = <&bluetooth_default_mode>;
0478                         };
0479                 };
0480 
0481                 /* GPS UART */
0482                 uart@80121000 {
0483                         status = "okay";
0484                         pinctrl-names = "default", "sleep";
0485                         /* CTS/RTS is not used, CTS is repurposed as GPIO */
0486                         pinctrl-0 = <&u1rxtx_a_1_default>;
0487                         pinctrl-1 = <&u1rxtx_a_1_sleep>;
0488 
0489                         gnss {
0490                                 /*
0491                                  * The Low Noise Amplifier (LNA) power and enablement is controlled
0492                                  * autonomously by the GSD4t.
0493                                  * Janice has a SiRFstarIV-based GSD4t
0494                                  * Golden has a SiRFstarV 5t-based CSRG05TA03-ICJE-R.
0495                                  */
0496                                 compatible = "csr,gsd4t";
0497                                 /* GPS_RSTN on GPIO21 */
0498                                 reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
0499                                 /* GPS_ON_OFF on GPIO96 */
0500                                 sirf,onoff-gpios = <&gpio3 0 GPIO_ACTIVE_HIGH>;
0501                                 /* GPS_1V8 (VSMPS2) */
0502                                 vcc-supply = <&db8500_vsmps2_reg>;
0503                                 pinctrl-names = "default";
0504                                 pinctrl-0 = <&gsd4t_janice_default>;
0505                                 /* According to /etc/sirfgps.conf */
0506                                 current-speed = <460800>;
0507                         };
0508                 };
0509 
0510                 /* Debugging console UART connected to TSU6111RSVR (FSA880) */
0511                 uart@80007000 {
0512                         status = "okay";
0513                         pinctrl-names = "default", "sleep";
0514                         pinctrl-0 = <&u2rxtx_c_1_default>;
0515                         pinctrl-1 = <&u2rxtx_c_1_sleep>;
0516                 };
0517 
0518                 prcmu@80157000 {
0519                         ab8500 {
0520                                 phy {
0521                                         pinctrl-names = "default", "sleep";
0522                                         pinctrl-0 = <&usb_a_1_default>;
0523                                         pinctrl-1 = <&usb_a_1_sleep>;
0524                                 };
0525 
0526                                 ab8500_fg {
0527                                         line-impedance-micro-ohms = <15000>;
0528                                 };
0529 
0530                                 regulator {
0531                                         ab8500_ldo_aux1 {
0532                                                 /* Used for VDD for sensors */
0533                                                 regulator-name = "V-SENSORS-VDD";
0534                                                 regulator-min-microvolt = <3000000>;
0535                                                 regulator-max-microvolt = <3000000>;
0536                                         };
0537 
0538                                         ab8500_ldo_aux2 {
0539                                                 /* Used for VIO for sensors */
0540                                                 regulator-name = "V-SENSORS-VIO";
0541                                                 regulator-min-microvolt = <1800000>;
0542                                                 regulator-max-microvolt = <1800000>;
0543                                         };
0544 
0545                                         ab8500_ldo_aux3 {
0546                                                 /* Used for voltage for external MMC/SD card */
0547                                                 regulator-name = "V-MMC-SD";
0548                                                 regulator-min-microvolt = <1200000>;
0549                                                 regulator-max-microvolt = <2910000>;
0550                                         };
0551                                 };
0552                         };
0553                 };
0554 
0555                 /* I2C0 */
0556                 i2c@80004000 {
0557                         status = "okay";
0558                         pinctrl-names = "default", "sleep";
0559                         pinctrl-0 = <&i2c0_a_1_default>;
0560                         pinctrl-1 = <&i2c0_a_1_sleep>;
0561 
0562                         proximity@44 {
0563                                 /* Janice has the GP2AP002A00F with light sensor */
0564                                 compatible = "sharp,gp2ap002a00f";
0565                                 clock-frequency = <400000>;
0566                                 reg = <0x44>;
0567 
0568                                 interrupt-parent = <&gpio4>;
0569                                 interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
0570                                 vdd-supply = <&ab8500_ldo_aux1_reg>;
0571                                 vio-supply = <&ab8500_ldo_aux2_reg>;
0572                                 /* ADC channel AUX2 to read ALSOUT ambient light sensor out */
0573                                 io-channels = <&gp2a_shunt>;
0574                                 io-channel-names = "alsout";
0575                                 pinctrl-names = "default";
0576                                 pinctrl-0 = <&gp2ap002_janice_default>;
0577                                 /* B1 mode (arch/arm/mach-ux500/include/mach/gp2a.h) */
0578                                 sharp,proximity-far-hysteresis = /bits/ 8 <0x40>;
0579                                 sharp,proximity-close-hysteresis = /bits/ 8 <0x0f>;
0580                         };
0581                 };
0582 
0583                 /* I2C1 on GPIO16 and GPIO17 also called "MUS I2C" */
0584                 i2c@80122000 {
0585                         status = "okay";
0586                         pinctrl-names = "default","sleep";
0587                         pinctrl-0 = <&i2c1_b_2_default>;
0588                         pinctrl-1 = <&i2c1_b_2_sleep>;
0589 
0590                         /* Texas Instruments TSU6111 micro USB switch */
0591                         usb-switch@25 {
0592                                 compatible = "ti,tsu6111";
0593                                 reg = <0x25>;
0594                                 /* Interrupt JACK_INT_N on GPIO95 */
0595                                 interrupt-parent = <&gpio2>;
0596                                 interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
0597                                 pinctrl-names = "default";
0598                                 pinctrl-0 = <&tsu6111_janice_default>;
0599                         };
0600                 };
0601 
0602                 /* I2C2 on GPIO10 and GPIO11 also called "SENSORS I2C" */
0603                 i2c@80128000 {
0604                         status = "okay";
0605                         pinctrl-names = "default", "sleep";
0606                         pinctrl-0 = <&i2c2_b_2_default>;
0607                         pinctrl-1 = <&i2c2_b_2_sleep>;
0608 
0609                         gyroscope@68 {
0610                                 compatible = "invensense,mpu3050";
0611                                 reg = <0x68>;
0612                                 /* GPIO226 interrupt */
0613                                 interrupt-parent = <&gpio7>;
0614                                 interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
0615                                 /* FIXME: no idea about this */
0616                                 mount-matrix = "1", "0", "0",
0617                                                "0", "1", "0",
0618                                                "0", "0", "1";
0619                                 vlogic-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
0620                                 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
0621                                 pinctrl-names = "default";
0622                                 pinctrl-0 = <&mpu3050_janice_default>;
0623 
0624                                 /*
0625                                  * The MPU-3050 acts as a hub for the
0626                                  * accelerometer.
0627                                  */
0628                                 i2c-gate {
0629                                         #address-cells = <1>;
0630                                         #size-cells = <0>;
0631 
0632                                         /* Bosch BMA222 accelerometer */
0633                                         accelerometer@8 {
0634                                                 compatible = "bosch,bma222";
0635                                                 reg = <0x08>;
0636                                                 mount-matrix = "0", "-1", "0",
0637                                                                "1", "0", "0",
0638                                                                "0", "0", "1";
0639                                                 vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V
0640                                                 vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
0641                                         };
0642                                 };
0643                         };
0644                 };
0645 
0646                 /* I2C3 */
0647                 i2c@80110000 {
0648                         status = "okay";
0649 
0650                         pinctrl-names = "default", "sleep";
0651                         pinctrl-0 = <&i2c3_c_2_default>;
0652                         pinctrl-1 = <&i2c3_c_2_sleep>;
0653 
0654                         /* Atmel mXT224E touchscreen */
0655                         touchscreen@4a {
0656                                 compatible = "atmel,maxtouch";
0657                                 reg = <0x4a>;
0658                                 /* GPIO218 (TSP_INT_1V8) */
0659                                 interrupt-parent = <&gpio6>;
0660                                 interrupts = <26 IRQ_TYPE_EDGE_FALLING>;
0661                                 /* VDDA is "analog supply", 2.57-3.47 V */
0662                                 vdda-supply = <&ldo_tsp_3v3_reg>;
0663                                 /* VDD is "digital supply" 1.71-3.47V */
0664                                 vdd-supply = <&ldo_tsp_1v8_reg>;
0665                                 pinctrl-names = "default";
0666                                 pinctrl-0 = <&tsp_default>;
0667                         };
0668                 };
0669 
0670                 mcde@a0350000 {
0671                         status = "okay";
0672                         pinctrl-names = "default";
0673                         pinctrl-0 = <&dpi_default_mode>;
0674 
0675                         port {
0676                                 display_out: endpoint {
0677                                         remote-endpoint = <&panel_in>;
0678                                 };
0679                         };
0680                 };
0681         };
0682 };
0683 
0684 &pinctrl {
0685         /*
0686          * This extends the MC0_A_2 default config to include
0687          * the card detect GPIO217 line.
0688          */
0689         sdi0 {
0690                 mc0_a_2_default {
0691                         default_cfg4 {
0692                                 pins = "GPIO217_AH12"; /* card detect */
0693                                 ste,config = <&gpio_in_pd>;
0694                         };
0695                 };
0696         };
0697         mcde {
0698                 dpi_default_mode: dpi_default {
0699                         default_mux1 {
0700                                 /* Mux in all the data lines */
0701                                 function = "lcd";
0702                                 groups =
0703                                         /* Data lines D0-D7 GPIO70..GPIO77 */
0704                                         "lcd_d0_d7_a_1",
0705                                         /* Data lines D8-D11 GPIO78..GPIO81 */
0706                                         "lcd_d8_d11_a_1",
0707                                         /* Data lines D12-D15 GPIO82..GPIO85 */
0708                                         "lcd_d12_d15_a_1",
0709                                         /* Data lines D16-D23 GPIO161..GPIO168 */
0710                                         "lcd_d16_d23_b_1";
0711                         };
0712                         default_mux2 {
0713                                 function = "lcda";
0714                                 /* Clock line on GPIO150, DE, VSO, HSO on GPIO169..GPIO171 */
0715                                 groups = "lcdaclk_b_1", "lcda_b_1";
0716                         };
0717                         /* Input, no pull-up is the default state for pins used for an alt function */
0718                         default_cfg1 {
0719                                 pins = "GPIO150_C14", "GPIO169_D22", "GPIO170_C23", "GPIO171_D23";
0720                                 ste,config = <&in_nopull>;
0721                         };
0722                 };
0723         };
0724         /* GPIO for panel reset control */
0725         panel {
0726                 panel_default_mode: panel_default {
0727                         janice_cfg1 {
0728                                 /* Reset line */
0729                                 pins = "GPIO139_C9";
0730                                 ste,config = <&gpio_out_lo>;
0731                         };
0732                 };
0733         };
0734         /* GPIO that enables the LDO regulator for the eMMC */
0735         emmc-ldo {
0736                 emmc_ldo_en_default_mode: emmc_ldo_default {
0737                         /* LDO enable on GPIO6 */
0738                         janice_cfg1 {
0739                                 pins = "GPIO6_AF6";
0740                                 ste,config = <&gpio_out_hi>;
0741                         };
0742                 };
0743         };
0744         /* GPIO that enables the LDO regulator for the touchscreen */
0745         tsp-ldo {
0746                 tsp_ldo_en_default_mode: tsp_ldo_default {
0747                         /* LDO enable on GPIO94 */
0748                         janice_cfg1 {
0749                                 pins = "GPIO94_D7";
0750                                 ste,config = <&gpio_out_hi>;
0751                         };
0752                 };
0753         };
0754         /* GPIO that enables the LDO regulator for the key LED */
0755         key-led {
0756                 en_led_ldo_default_mode: en_led_ldo_default {
0757                         /* EN_LED_LDO on GPIO68 */
0758                         janice_cfg1 {
0759                                 pins = "GPIO68_E1";
0760                                 ste,config = <&gpio_out_hi>;
0761                         };
0762                 };
0763         };
0764         /* GPIO that enables the LDO regulator for the touchkeys */
0765         touchkey-ldo {
0766                 tsp_ldo_on2_default_mode: tsp_ldo_on2_default {
0767                         /* TSP_LDO_ON2 on GPIO89 */
0768                         janice_cfg1 {
0769                                 pins = "GPIO89_E6";
0770                                 ste,config = <&gpio_out_lo>;
0771                         };
0772                 };
0773         };
0774         touchkey {
0775                 touchkey_default_mode: touchkey_default {
0776                         janice_cfg1 {
0777                                 /* Interrupt */
0778                                 pins = "GPIO198_AG25";
0779                                 ste,config = <&gpio_in_nopull>;
0780                         };
0781                         janice_cfg2 {
0782                                 /* Reset, actually completely unused (not routed) */
0783                                 pins = "GPIO205_AG23";
0784                                 ste,config = <&gpio_in_pd>;
0785                         };
0786                 };
0787         };
0788         /* GPIO that enabled the LDO regulator for the LCD display */
0789         lcd-ldo {
0790                 lcd_pwr_en_default_mode: lcd_pwr_en_default {
0791                         /* LCD_PWR_EN on GPIO219 */
0792                         janice_cfg1 {
0793                                 pins = "GPIO219_AG10";
0794                                 ste,config = <&gpio_out_hi>;
0795                         };
0796                 };
0797         };
0798         /* GPIO that enables the WLAN internal LDO regulators */
0799         wlan-ldo {
0800                 wlan_ldo_en_default: wlan_ldo_default {
0801                         /* GPIO215 named WLAN_RST_N */
0802                         janice_cfg1 {
0803                                 pins = "GPIO215_AH13";
0804                                 ste,config = <&gpio_out_lo>;
0805                         };
0806                 };
0807         };
0808         /* Flash and torch */
0809         flash {
0810                 gpio_flash_default_mode: flash_default {
0811                         janice_cfg1 {
0812                                 pins = "GPIO140_B11", "GPIO141_C12";
0813                                 ste,config = <&gpio_out_lo>;
0814                         };
0815                 };
0816         };
0817         /* GPIO keys */
0818         gpio-keys {
0819                 gpio_keys_default_mode: gpio_keys_default {
0820                         skomer_cfg1 {
0821                                 pins = "GPIO67_G2", /* VOL UP */
0822                                        "GPIO91_B6", /* HOME */
0823                                        "GPIO92_D6"; /* VOL DOWN */
0824                                 ste,config = <&gpio_in_pu>;
0825                         };
0826                 };
0827         };
0828         /* Interrupt line for the Atmel MXT228 touchscreen */
0829         tsp {
0830                 tsp_default: tsp_default {
0831                         janice_cfg1 {
0832                                 pins = "GPIO218_AH11";  /* TSP_INT_1V8 */
0833                                 ste,config = <&gpio_in_nopull>;
0834                         };
0835                 };
0836         };
0837         /* Reset line for the Yamaha YAS529 magnetometer */
0838         yas529 {
0839                 yas529_default: yas529_janice {
0840                         janice_cfg1 {
0841                                 pins = "GPIO204_AF23";
0842                                 ste,config = <&gpio_out_hi>;
0843                         };
0844                 };
0845         };
0846         /* Interrupt line for light/proximity sensor GP2AP002 */
0847         gp2ap002 {
0848                 gp2ap002_janice_default: gp2ap002_janice {
0849                         janice_cfg1 {
0850                                 pins = "GPIO146_D13";
0851                                 ste,config = <&gpio_in_nopull>;
0852                         };
0853                 };
0854         };
0855         /* Interrupt line for Invensense MPU3050 gyroscope */
0856         mpu3050 {
0857                 mpu3050_janice_default: mpu3050_janice {
0858                         janice_cfg1 {
0859                                 /* GPIO226 used for IRQ */
0860                                 pins = "GPIO226_AF8";
0861                                 ste,config = <&gpio_in_nopull>;
0862                         };
0863                 };
0864         };
0865         /* GPIO-based I2C bus for magnetometer and NCP6914 */
0866         i2c-gpio-0 {
0867                 i2c_gpio_0_default: i2c_gpio_0 {
0868                         janice_cfg1 {
0869                                 pins = "GPIO143_D12", "GPIO144_B13";
0870                                 ste,config = <&gpio_in_nopull>;
0871                         };
0872                 };
0873         };
0874         /* GPIO-based I2C bus for the Cypress touchkeys */
0875         i2c-gpio-1 {
0876                 i2c_gpio_1_default: i2c_gpio_1 {
0877                         janice_cfg1 {
0878                                 pins = "GPIO196_AG26", "GPIO197_AH24";
0879                                 ste,config = <&gpio_in_nopull>;
0880                         };
0881                 };
0882         };
0883         /* GPIO-based I2C bus for the Immersion ISA1200 */
0884         i2c-gpio-2 {
0885                 i2c_gpio_2_default: i2c_gpio_2 {
0886                         janice_cfg1 {
0887                                 pins = "GPIO201_AF24", "GPIO202_AF25";
0888                                 ste,config = <&gpio_in_nopull>;
0889                         };
0890                 };
0891         };
0892         /* GPIO-based I2C bus for the NFC */
0893         i2c-gpio-3 {
0894                 i2c_gpio_3_default: i2c_gpio_3 {
0895                         janice_cfg1 {
0896                                 pins = "GPIO151_D17", "GPIO152_D16";
0897                                 ste,config = <&gpio_in_nopull>;
0898                         };
0899                 };
0900         };
0901         /* GPIO-based SPI bus for the display */
0902         spi-gpio-0 {
0903                 spi_gpio_0_default: spi_gpio_0 {
0904                         janice_cfg1 {
0905                                 pins = "GPIO220_AH10", "GPIO223_AH9", "GPIO224_AG9";
0906                                 ste,config = <&gpio_out_hi>;
0907                         };
0908                         /* This pin is unused but belongs with this SPI block */
0909                         janice_cfg2 {
0910                                 pins = "GPIO225_AG8";
0911                                 ste,config = <&in_pd>;
0912                         };
0913                 };
0914         };
0915         wlan {
0916                 wlan_default_mode: wlan_default {
0917                         /* GPIO216 for WL_HOST_WAKE */
0918                         janice_cfg2 {
0919                                 pins = "GPIO216_AG12";
0920                                 ste,config = <&gpio_in_pd>;
0921                         };
0922                 };
0923         };
0924         bluetooth {
0925                 bluetooth_default_mode: bluetooth_default {
0926                         /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */
0927                         janice_cfg1 {
0928                                 pins = "GPIO199_AH23", "GPIO222_AJ9";
0929                                 ste,config = <&gpio_out_lo>;
0930                         };
0931                         /* GPIO97 BT_HOST_WAKE */
0932                         janice_cfg2 {
0933                                 pins = "GPIO97_D9";
0934                                 ste,config = <&gpio_in_nopull>;
0935                         };
0936                         /* GPIO209 BT_RST_N */
0937                         janice_cfg3 {
0938                                 pins = "GPIO209_AG15";
0939                                 ste,config = <&gpio_out_hi>;
0940                         };
0941                 };
0942         };
0943         /* Interrupt line for TI TSU6111 Micro USB switch */
0944         tsu6111 {
0945                 tsu6111_janice_default: tsu6111_janice {
0946                         janice_cfg1 {
0947                                 /* GPIO95 used for IRQ */
0948                                 pins = "GPIO95_E8";
0949                                 ste,config = <&gpio_in_nopull>;
0950                         };
0951                 };
0952         };
0953         nfc {
0954                 pn547_janice_default: pn547_janice {
0955                         /* Interrupt line */
0956                         janice_cfg1 {
0957                                 pins = "GPIO32_V2";
0958                                 ste,config = <&gpio_in_nopull>;
0959                         };
0960                         /* Enable and firmware GPIOs */
0961                         janice_cfg2 {
0962                                 pins = "GPIO31_V3", "GPIO88_C4";
0963                                 ste,config = <&gpio_out_lo>;
0964                         };
0965                 };
0966         };
0967         gsd4t {
0968                 gsd4t_janice_default: gsd4t_janice {
0969                         /* Reset line, start out asserted */
0970                         janice_cfg1 {
0971                                 pins = "GPIO21_AB3";
0972                                 ste,config = <&gpio_out_lo>;
0973                         };
0974                         /* GPS_ON_OFF, start out deasserted (off) */
0975                         janice_cfg2 {
0976                                 pins = "GPIO96_D8";
0977                                 ste,config = <&gpio_out_lo>;
0978                         };
0979                         /* Unused power enablement line, used in R0.0 and R0.1 boards */
0980                         janice_cfg3 {
0981                                 pins = "GPIO86_C6";
0982                                 ste,config = <&gpio_in_pd>;
0983                         };
0984                 };
0985         };
0986 };