0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003 * Copyright 2011 ST-Ericsson AB
0004 */
0005
0006 /dts-v1/;
0007 #include "ste-db9500.dtsi"
0008 #include "ste-href-ab8500.dtsi"
0009 #include "ste-href-family-pinctrl.dtsi"
0010
0011 / {
0012 model = "Calao Systems Snowball platform with device tree";
0013 compatible = "calaosystems,snowball-a9500", "st-ericsson,u9500";
0014
0015 memory {
0016 device_type = "memory";
0017 reg = <0x00000000 0x20000000>;
0018 };
0019
0020 battery: battery {
0021 compatible = "simple-battery";
0022 battery-type = "lithium-ion-polymer";
0023 };
0024
0025 thermal-zones {
0026 battery-thermal {
0027 /* This zone will be polled by the battery temperature code */
0028 polling-delay = <0>;
0029 polling-delay-passive = <0>;
0030 thermal-sensors = <&bat_therm>;
0031 };
0032 };
0033
0034 bat_therm: thermistor {
0035 compatible = "murata,ncp18wb473";
0036 io-channels = <&gpadc 0x02>; /* BatTemp */
0037 pullup-uv = <1800000>;
0038 pullup-ohm = <230000>;
0039 pulldown-ohm = <0>;
0040 #thermal-sensor-cells = <0>;
0041 };
0042
0043 en_3v3_reg: en_3v3 {
0044 compatible = "regulator-fixed";
0045 regulator-name = "en-3v3-fixed-supply";
0046 regulator-min-microvolt = <3300000>;
0047 regulator-max-microvolt = <3300000>;
0048 /* AB8500 GPIOs start from 1 - offset 25 is GPIO26. */
0049 gpio = <&ab8500_gpio 25 0x4>;
0050 startup-delay-us = <5000>;
0051 enable-active-high;
0052 };
0053
0054 gpio_keys {
0055 compatible = "gpio-keys";
0056 #address-cells = <1>;
0057 #size-cells = <0>;
0058
0059 button@1 {
0060 debounce-interval = <50>;
0061 wakeup-source;
0062 linux,code = <2>;
0063 label = "userpb";
0064 gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>;
0065 };
0066 button@2 {
0067 debounce-interval = <50>;
0068 wakeup-source;
0069 linux,code = <3>;
0070 label = "extkb1";
0071 gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>;
0072 };
0073 button@3 {
0074 debounce-interval = <50>;
0075 wakeup-source;
0076 linux,code = <4>;
0077 label = "extkb2";
0078 gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;
0079 };
0080 button@4 {
0081 debounce-interval = <50>;
0082 wakeup-source;
0083 linux,code = <5>;
0084 label = "extkb3";
0085 gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
0086 };
0087 button@5 {
0088 debounce-interval = <50>;
0089 wakeup-source;
0090 linux,code = <6>;
0091 label = "extkb4";
0092 gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>;
0093 };
0094 };
0095
0096 leds {
0097 compatible = "gpio-leds";
0098 pinctrl-names = "default";
0099 pinctrl-0 = <&gpioled_snowball_mode>;
0100 used-led {
0101 label = "user_led";
0102 gpios = <&gpio4 14 GPIO_ACTIVE_HIGH>;
0103 default-state = "on";
0104 linux,default-trigger = "heartbeat";
0105 };
0106 };
0107
0108 soc {
0109 /* Name the GPIO muxed rails on the Snowball board */
0110 gpio@8012e000 {
0111 /* GPIOs 0 - 31 */
0112 gpio-line-names = "", "", "", "", "", "", "", "",
0113 "", "", "", "", "", "", "", "",
0114 "", "", "", "", "", "", "", "",
0115 "", "", "", "", "", "", "",
0116 "AP_GPIO31";
0117 };
0118
0119 gpio@8012e080 {
0120 /* GPIOs 32 - 63 */
0121 gpio-line-names = "USR PB", "", "", "", "", "", "", "",
0122 "", "", "", "", "", "", "", "",
0123 "", "", "", "", "", "", "", "",
0124 "", "", "", "", "", "", "", "";
0125 };
0126
0127 gpio@8000e000 {
0128 /* GPIOs 64 - 95 */
0129 gpio-line-names = "", "", "", "", "AP_GPIO68", "", "", "",
0130 "", "", "", "", "", "", "", "",
0131 "", "", "", "", "", "", "", "",
0132 "", "", "", "", "", "", "", "";
0133 };
0134
0135 gpio@8000e100 {
0136 /* GPIOs 128 - 159 */
0137 gpio-line-names = "", "", "", "", "", "", "", "",
0138 "", "", "", "", "IRQ_LAN", "RSTn_LAN",
0139 "USR_LED", "", "", "", "", "", "",
0140 "", "", "AP_GPIO151", "AP_GPIO152",
0141 "", "", "", "", "", "", "";
0142 };
0143
0144 gpio@8000e180 {
0145 /* GPIOs 160 - 191 */
0146 gpio-line-names = "", "AP_GPIO161", "AP_GPIO162",
0147 "ACCELEROMETER_INT1_RDY",
0148 "ACCELEROMETER_INT2", "MAG_DRDY",
0149 "GYRO_DRDY", "RSTn_MLC", "RSTn_SLC",
0150 "GYRO_INT", "UART_WAKE", "GBF_RESET",
0151 "", "", "", "",
0152 "", "", "", "", "", "", "", "",
0153 "", "", "", "", "", "", "", "";
0154 };
0155
0156 gpio@8011e000 {
0157 /* GPIOs 192 - 223 */
0158 gpio-line-names = "HDTV_INTn", "", "", "", "HDTV_RST",
0159 "", "", "", "", "", "", "", "", "",
0160 "", "", "", "", "", "", "", "", "",
0161 "WLAN_RESETN", "WLAN_IRQ", "MMC_EN",
0162 "MMC_CD", "", "", "", "", "";
0163 };
0164
0165 gpio@8011e080 {
0166 /* GPIOs 224 - 255 */
0167 gpio-line-names = "", "", "", "", "SD_SEL", "", "", "",
0168 "", "", "", "", "", "", "", "",
0169 "", "", "", "", "", "", "", "",
0170 "", "", "", "", "", "", "", "";
0171 };
0172
0173 msp0: msp@80123000 {
0174 pinctrl-names = "default";
0175 pinctrl-0 = <&msp0txrxtfstck_a_1_default>;
0176 status = "okay";
0177 };
0178
0179 msp1: msp@80124000 {
0180 pinctrl-names = "default";
0181 pinctrl-0 = <&msp1txrx_a_1_default>;
0182 status = "okay";
0183 };
0184
0185 msp2: msp@80117000 {
0186 pinctrl-names = "default";
0187 pinctrl-0 = <&msp2_a_1_default>;
0188 };
0189
0190 msp3: msp@80125000 {
0191 status = "okay";
0192 };
0193
0194 external-bus@50000000 {
0195 status = "okay";
0196
0197 ethernet@0 {
0198 compatible = "smsc,lan9115";
0199 reg = <0 0x10000>;
0200 interrupts = <12 IRQ_TYPE_EDGE_RISING>;
0201 interrupt-parent = <&gpio4>;
0202 vdd33a-supply = <&en_3v3_reg>;
0203 vddvario-supply = <&db8500_vape_reg>;
0204 pinctrl-names = "default";
0205 pinctrl-0 = <ð_snowball_mode>;
0206
0207 reg-shift = <1>;
0208 reg-io-width = <2>;
0209 smsc,force-internal-phy;
0210 smsc,irq-active-high;
0211 smsc,irq-push-pull;
0212
0213 clocks = <&prcc_pclk 3 0>;
0214 };
0215 };
0216
0217 /* ST6G3244ME level translator for 1.8/2.9 V */
0218 vmmci: regulator-gpio {
0219 compatible = "regulator-gpio";
0220
0221 /* GPIO228 SD_SEL */
0222 gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
0223 /* GPIO217 MMC_EN */
0224 enable-gpio = <&gpio6 25 GPIO_ACTIVE_HIGH>;
0225 enable-active-high;
0226
0227 regulator-min-microvolt = <1800000>;
0228 regulator-max-microvolt = <2900000>;
0229 regulator-name = "mmci-reg";
0230 regulator-type = "voltage";
0231
0232 startup-delay-us = <100>;
0233
0234 states = <1800000 0x1
0235 2900000 0x0>;
0236 };
0237
0238 // External Micro SD slot
0239 mmc@80126000 {
0240 arm,primecell-periphid = <0x10480180>;
0241 max-frequency = <100000000>;
0242 bus-width = <4>;
0243 cap-sd-highspeed;
0244 cap-mmc-highspeed;
0245 sd-uhs-sdr12;
0246 sd-uhs-sdr25;
0247 /* All direction control is used */
0248 st,sig-dir-cmd;
0249 st,sig-dir-dat0;
0250 st,sig-dir-dat2;
0251 st,sig-dir-dat31;
0252 st,sig-pin-fbclk;
0253 full-pwr-cycle;
0254 vmmc-supply = <&ab8500_ldo_aux3_reg>;
0255 vqmmc-supply = <&vmmci>;
0256 pinctrl-names = "default", "sleep";
0257 pinctrl-0 = <&mc0_a_1_default &sdi0_default_mode>;
0258 pinctrl-1 = <&mc0_a_1_sleep>;
0259
0260 /* GPIO218 MMC_CD */
0261 cd-gpios = <&gpio6 26 GPIO_ACTIVE_LOW>;
0262
0263 status = "okay";
0264 };
0265
0266 // WLAN SDIO channel
0267 mmc@80118000 {
0268 arm,primecell-periphid = <0x10480180>;
0269 max-frequency = <100000000>;
0270 bus-width = <4>;
0271 pinctrl-names = "default", "sleep";
0272 pinctrl-0 = <&mc1_a_1_default>;
0273 pinctrl-1 = <&mc1_a_1_sleep>;
0274
0275 status = "okay";
0276 };
0277
0278 // Unused PoP eMMC - register and put it to sleep by default */
0279 mmc@80005000 {
0280 arm,primecell-periphid = <0x10480180>;
0281 pinctrl-names = "default";
0282 pinctrl-0 = <&mc2_a_1_sleep>;
0283
0284 status = "okay";
0285 };
0286
0287 // On-board eMMC
0288 mmc@80114000 {
0289 arm,primecell-periphid = <0x10480180>;
0290 max-frequency = <100000000>;
0291 bus-width = <8>;
0292 cap-mmc-highspeed;
0293 no-sdio;
0294 no-sd;
0295 vmmc-supply = <&ab8500_ldo_aux2_reg>;
0296 pinctrl-names = "default", "sleep";
0297 pinctrl-0 = <&mc4_a_1_default>;
0298 pinctrl-1 = <&mc4_a_1_sleep>;
0299
0300 status = "okay";
0301 };
0302
0303 uart@80120000 {
0304 pinctrl-names = "default", "sleep";
0305 pinctrl-0 = <&u0_a_1_default>;
0306 pinctrl-1 = <&u0_a_1_sleep>;
0307 status = "okay";
0308 };
0309
0310 /* This UART is unused and thus left disabled */
0311 uart@80121000 {
0312 pinctrl-names = "default", "sleep";
0313 pinctrl-0 = <&u1rxtx_a_1_default>;
0314 pinctrl-1 = <&u1rxtx_a_1_sleep>;
0315 };
0316
0317 uart@80007000 {
0318 pinctrl-names = "default", "sleep";
0319 pinctrl-0 = <&u2rxtx_c_1_default>;
0320 pinctrl-1 = <&u2rxtx_c_1_sleep>;
0321 status = "okay";
0322 };
0323
0324 i2c@80004000 {
0325 pinctrl-names = "default","sleep";
0326 pinctrl-0 = <&i2c0_a_1_default>;
0327 pinctrl-1 = <&i2c0_a_1_sleep>;
0328 status = "okay";
0329 };
0330
0331 i2c@80122000 {
0332 pinctrl-names = "default","sleep";
0333 pinctrl-0 = <&i2c1_b_2_default>;
0334 pinctrl-1 = <&i2c1_b_2_sleep>;
0335 status = "okay";
0336 };
0337
0338 i2c@80128000 {
0339 pinctrl-names = "default","sleep";
0340 pinctrl-0 = <&i2c2_b_2_default>;
0341 pinctrl-1 = <&i2c2_b_2_sleep>;
0342 status = "okay";
0343 lsm303dlh@18 {
0344 /* Accelerometer */
0345 compatible = "st,lsm303dlh-accel";
0346 st,drdy-int-pin = <1>;
0347 reg = <0x18>;
0348 vdd-supply = <&ab8500_ldo_aux1_reg>;
0349 vddio-supply = <&db8500_vsmps2_reg>;
0350 pinctrl-names = "default";
0351 pinctrl-0 = <&accel_snowball_mode>;
0352 interrupt-parent = <&gpio5>;
0353 interrupts = <3 IRQ_TYPE_EDGE_RISING>, /* INT1 */
0354 <4 IRQ_TYPE_EDGE_RISING>; /* INT2 */
0355 };
0356 lsm303dlh@1e {
0357 /* Magnetometer */
0358 compatible = "st,lsm303dlh-magn";
0359 reg = <0x1e>;
0360 vdd-supply = <&ab8500_ldo_aux1_reg>;
0361 vddio-supply = <&db8500_vsmps2_reg>;
0362 pinctrl-names = "default";
0363 pinctrl-0 = <&magneto_snowball_mode>;
0364 interrupt-parent = <&gpio5>;
0365 interrupts = <5 IRQ_TYPE_EDGE_RISING>; /* DRDY line */
0366 };
0367 l3g4200d@68 {
0368 /* Gyroscope */
0369 compatible = "st,l3g4200d-gyro";
0370 st,drdy-int-pin = <2>;
0371 reg = <0x68>;
0372 vdd-supply = <&ab8500_ldo_aux1_reg>;
0373 vddio-supply = <&db8500_vsmps2_reg>;
0374 pinctrl-names = "default";
0375 pinctrl-0 = <&gyro_snowball_mode>;
0376 interrupt-parent = <&gpio5>;
0377 interrupts = <6 IRQ_TYPE_EDGE_RISING>, /* DRDY line */
0378 <9 IRQ_TYPE_EDGE_RISING>; /* INT1 */
0379 };
0380 lsp001wm@5c {
0381 /* Barometer/pressure sensor */
0382 compatible = "st,lps001wp-press";
0383 reg = <0x5c>;
0384 vdd-supply = <&ab8500_ldo_aux1_reg>;
0385 vddio-supply = <&db8500_vsmps2_reg>;
0386 };
0387 };
0388
0389 i2c@80110000 {
0390 pinctrl-names = "default","sleep";
0391 pinctrl-0 = <&i2c3_c_2_default>;
0392 pinctrl-1 = <&i2c3_c_2_sleep>;
0393 status = "okay";
0394 };
0395
0396 spi@80002000 {
0397 pinctrl-names = "default";
0398 pinctrl-0 = <&ssp0_snowball_mode>;
0399 status = "okay";
0400 };
0401
0402 prcmu@80157000 {
0403 ab8500 {
0404 gpio {
0405 /*
0406 * AB8500 GPIOs are numbered starting from 1, so the first
0407 * index 0 is what in the datasheet is called "GPIO1", and
0408 * the second is "GPIO2" and so forth. Confusingly, the
0409 * Snowball schematic then names the "GPIO2" line "PM_GPIO1".
0410 * while later naming "GPIO4" as "PM_GPIO4".
0411 */
0412 gpio-line-names = "", /* AB8500 GPIO1 */
0413 "PM_GPIO1", /* AB8500 GPIO2 */
0414 "WLAN_CLK_REQ", /* AB8500 GPIO3 */
0415 "PM_GPIO4", /* AB8500 GPIO4 */
0416 "", "", "", "", "", "", "", "", "", "", "",
0417 "EN_3V6", /* AB8500 GPIO16 */
0418 "", "", "", "" ,"", "", "", "", "",
0419 "EN_3V3", /* AB8500 GPIO26 */
0420 "", "", "", "", "", "", "", "", "", "", "", "", "",
0421 "PM_GPIO40", /* AB8500 GPIO40 */
0422 "PM_GPIO41", /* AB8500 GPIO41 */
0423 "PM_GPIO42"; /* AB8500 GPIO42 */
0424 };
0425
0426 phy {
0427 pinctrl-names = "default", "sleep";
0428 pinctrl-0 = <&usb_a_1_default>;
0429 pinctrl-1 = <&usb_a_1_sleep>;
0430 };
0431
0432 ext_regulators: regulator-external {
0433 ab8500_ext1_reg: ab8500_ext1 {
0434 regulator-name = "ab8500-ext-supply1";
0435 };
0436
0437 ab8500_ext2_reg_reg: ab8500_ext2 {
0438 regulator-name = "ab8500-ext-supply2";
0439 };
0440
0441 ab8500_ext3_reg_reg: ab8500_ext3 {
0442 regulator-name = "ab8500-ext-supply3";
0443 };
0444 };
0445
0446 regulator {
0447 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
0448 regulator-name = "V-DISPLAY";
0449 };
0450
0451 ab8500_ldo_aux2_reg: ab8500_ldo_aux2 {
0452 regulator-name = "V-eMMC1";
0453 };
0454
0455 ab8500_ldo_aux3_reg: ab8500_ldo_aux3 {
0456 regulator-name = "V-MMC-SD";
0457 };
0458
0459 ab8500_ldo_intcore_reg: ab8500_ldo_intcore {
0460 regulator-name = "V-INTCORE";
0461 };
0462
0463 ab8500_ldo_tvout_reg: ab8500_ldo_tvout {
0464 regulator-name = "V-TVOUT";
0465 };
0466
0467 ab8500_ldo_audio_reg: ab8500_ldo_audio {
0468 regulator-name = "V-AUD";
0469 };
0470
0471 ab8500_ldo_anamic1_reg: ab8500_ldo_anamic1 {
0472 regulator-name = "V-AMIC1";
0473 };
0474
0475 ab8500_ldo_anamic2_reg: ab8500_ldo_anamic2 {
0476 regulator-name = "V-AMIC2";
0477 };
0478
0479 ab8500_ldo_dmic_reg: ab8500_ldo_dmic {
0480 regulator-name = "V-DMIC";
0481 };
0482
0483 ab8500_ldo_ana_reg: ab8500_ldo_ana {
0484 regulator-name = "V-CSI/DSI";
0485 };
0486 };
0487 };
0488 };
0489
0490 pinctrl {
0491 /*
0492 * Set this up using hogs, as time goes by and as seems fit, these
0493 * can be moved over to being controlled by respective device.
0494 */
0495 pinctrl-names = "default";
0496 pinctrl-0 = <&gbf_snowball_mode>,
0497 <&wlan_snowball_mode>;
0498
0499 ethernet {
0500 /*
0501 * Mux in "SM" which is used for the
0502 * SMSC911x Ethernet adapter
0503 */
0504 eth_snowball_mode: eth_snowball {
0505 snowball_mux {
0506 function = "sm";
0507 groups = "sm_b_1";
0508 };
0509 /* LAN IRQ pin */
0510 snowball_cfg1 {
0511 pins = "GPIO140_B11";
0512 ste,config = <&in_nopull>;
0513 };
0514 /* LAN reset pin */
0515 snowball_cfg2 {
0516 pins = "GPIO141_C12";
0517 ste,config = <&gpio_out_hi>;
0518 };
0519
0520 };
0521 };
0522 sdi0 {
0523 sdi0_default_mode: sdi0_default {
0524 snowball_mux {
0525 function = "mc0";
0526 /* Add the DAT31 pin even if it is not really used */
0527 groups = "mc0dat31dir_a_1";
0528 };
0529 snowball_cfg1 {
0530 pins = "GPIO21_AB3"; /* DAT31DIR */
0531 ste,config = <&out_hi>;
0532 };
0533 /* SD card detect GPIO pin, extend default state */
0534 snowball_cfg2 {
0535 pins = "GPIO218_AH11";
0536 ste,config = <&gpio_in_pu>;
0537 };
0538 /* VMMCI level-shifter enable */
0539 snowball_cfg3 {
0540 pins = "GPIO217_AH12";
0541 ste,config = <&gpio_out_hi>;
0542 };
0543 /* VMMCI level-shifter voltage select */
0544 snowball_cfg4 {
0545 pins = "GPIO228_AJ6";
0546 ste,config = <&gpio_out_hi>;
0547 };
0548 };
0549 };
0550 ssp0 {
0551 ssp0_snowball_mode: ssp0_snowball_default {
0552 snowball_mux {
0553 function = "ssp0";
0554 groups = "ssp0_a_1";
0555 };
0556 snowball_cfg1 {
0557 pins = "GPIO144_B13"; /* FRM */
0558 ste,config = <&gpio_out_hi>;
0559 };
0560 snowball_cfg2 {
0561 pins = "GPIO145_C13"; /* RXD */
0562 ste,config = <&in_pd>;
0563 };
0564 snowball_cfg3 {
0565 pins =
0566 "GPIO146_D13", /* TXD */
0567 "GPIO143_D12"; /* CLK */
0568 ste,config = <&out_lo>;
0569 };
0570
0571 };
0572 };
0573 gpio_led {
0574 gpioled_snowball_mode: gpioled_default {
0575 snowball_cfg1 {
0576 pins = "GPIO142_C11";
0577 ste,config = <&gpio_out_hi>;
0578 };
0579
0580 };
0581 };
0582 accelerometer {
0583 accel_snowball_mode: accel_snowball {
0584 /* Accelerometer lines */
0585 snowball_cfg1 {
0586 pins =
0587 "GPIO163_C20", /* ACCEL_IRQ1 */
0588 "GPIO164_B21"; /* ACCEL_IRQ2 */
0589 ste,config = <&gpio_in_pu>;
0590 };
0591 };
0592 };
0593 gyro {
0594 gyro_snowball_mode: gyro_snowball {
0595 snowball_cfg1 {
0596 pins =
0597 "GPIO166_A22", /* DRDY */
0598 "GPIO169_D22"; /* INT */
0599 ste,config = <&gpio_in_pu>;
0600 };
0601 };
0602 };
0603 magnetometer {
0604 magneto_snowball_mode: magneto_snowball {
0605 snowball_cfg1 {
0606 pins = "GPIO165_C21"; /* MAG_DRDY */
0607 ste,config = <&gpio_in_pu>;
0608 };
0609 };
0610 };
0611 gbf {
0612 gbf_snowball_mode: gbf_snowball {
0613 /*
0614 * GBF (GPS, Bluetooth, FM-radio) interface,
0615 * pull low to reset state
0616 */
0617 snowball_cfg1 {
0618 pins = "GPIO171_D23"; /* GBF_ENA_RESET */
0619 ste,config = <&gpio_out_lo>;
0620 };
0621 };
0622 };
0623 wlan {
0624 wlan_snowball_mode: wlan_snowball {
0625 /*
0626 * Activate this mode with the WLAN chip.
0627 * These are plain GPIO pins used by WLAN
0628 */
0629 snowball_cfg1 {
0630 pins =
0631 "GPIO161_D21", /* WLAN_PMU_EN */
0632 "GPIO215_AH13"; /* WLAN_ENA */
0633 ste,config = <&gpio_out_lo>;
0634 };
0635 snowball_cfg2 {
0636 pins = "GPIO216_AG12"; /* WLAN_IRQ */
0637 ste,config = <&gpio_in_pu>;
0638 };
0639 };
0640 };
0641 };
0642
0643 mcde@a0350000 {
0644 pinctrl-names = "default", "sleep";
0645 pinctrl-0 = <&lcd_default_mode>;
0646 pinctrl-1 = <&lcd_sleep_mode>;
0647 };
0648 };
0649 };