Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright 2012 ST-Ericsson AB
0004  */
0005 
0006 #include "ste-href-ab8500.dtsi"
0007 #include "ste-href.dtsi"
0008 
0009 / {
0010         model = "ST-Ericsson HREF (v60+) platform with Device Tree";
0011         compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500";
0012 
0013         thermal-zones {
0014                 chassis-thermal {
0015                         /* Poll every 20 seconds */
0016                         polling-delay = <20000>;
0017                         /* Poll every 2nd second when cooling */
0018                         polling-delay-passive = <2000>;
0019 
0020                         thermal-sensors = <&therm1>, <&therm2>;
0021 
0022                         /* Tripping points made from rough guess about operating conditions */
0023                         trips {
0024                                 chassis_alert: chassis-alert {
0025                                         /* At 50 degrees take down the CPU frequency */
0026                                         temperature = <50000>;
0027                                         hysteresis = <3000>;
0028                                         type = "active";
0029                                 };
0030                                 chassis_crit: chassis-crit {
0031                                         /* Just shut down at 70 degrees */
0032                                         temperature = <70000>;
0033                                         hysteresis = <2000>;
0034                                         type = "critical";
0035                                 };
0036                         };
0037 
0038                         /* Push down the operating frequency of the SoC when it gets hot */
0039                         cooling-maps {
0040                                 map0 {
0041                                         trip = <&chassis_alert>;
0042                                         cooling-device = <&CPU0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
0043                                         contribution = <100>;
0044                                 };
0045                         };
0046                 };
0047         };
0048 
0049         /*
0050          * Thermistors on the board, formally to monitor battery temperatures
0051          * but what they measure is the board temperature.
0052          */
0053         therm1: thermistor@0 {
0054                 compatible = "murata,ncp18wb473";
0055                 io-channels = <&gpadc 0x06>; /* AUX1 */
0056                 pullup-uv = <1800000>;
0057                 pullup-ohm = <220000>;
0058                 pulldown-ohm = <0>;
0059                 #thermal-sensor-cells = <0>;
0060         };
0061 
0062         therm2: thermistor@1 {
0063                 compatible = "murata,ncp18wb473";
0064                 io-channels = <&gpadc 0x07>; /* AUX2 */
0065                 pullup-uv = <1800000>;
0066                 pullup-ohm = <220000>;
0067                 pulldown-ohm = <0>;
0068                 #thermal-sensor-cells = <0>;
0069         };
0070 
0071         soc {
0072                 /* Name the GPIO muxed rails on the HREF boards */
0073                 gpio@8012e000 {
0074                         /* GPIOs 0 - 31 */
0075                         gpio-line-names =
0076                                      /* GPIO0,1 used for UART0 BT RX/TX */
0077                                      "", "",
0078                                      "UART_WAKE",
0079                                      "BT_WAKE",
0080                                      "",
0081                                      "SDMMC_1V8_3V_SEL",
0082                                      "FLASH_LED_SYNC (FLASH_CTRL_0)",
0083                                      "XENON_READY (FLASH_CTRL_1)",
0084                                      "", "", "", "", "", "", "", "",
0085                                      "", "", "", "",
0086                                      "",
0087                                      "FLASH_LED_EN (FLASH_CTRL_3)",
0088                                      "", "",
0089                                      "", "", "", "", "",
0090                                      /* Used by UART2 (console) */
0091                                      "", "",
0092                                      "MAGNETOMETER_INT";
0093                 };
0094 
0095                 gpio@8012e080 {
0096                         /* GPIOs 32 - 63 */
0097                         gpio-line-names =
0098                                      "MAGNETOMETER_DRDY",
0099                                      "", "", "", "", "", "", "",
0100                                      "", "", "", "", "", "", "", "",
0101                                      "", "", "", "", "", "", "", "",
0102                                      "", "", "", "", "", "", "", "";
0103                 };
0104 
0105                 gpio@8000e000 {
0106                         /* GPIOs 64 - 95 */
0107                         gpio-line-names = "XENON_EN2 (FLASH_CTRL_4)",
0108                                      "DISP1_RST",
0109                                      "DISP2_RST",
0110                                      "TOUCH_INT2",
0111                                      "LCD_VSI0_A",
0112                                      "LCD_VSI1_A",
0113                                      /* GPIO 70-77 used for ETM */
0114                                      "", "", "", "", "", "", "", "",
0115                                      /* GPIO 78-81 used for YCBCR */
0116                                      "", "", "", "",
0117                                      "ACCELEROMETER_INT1_RDY",
0118                                      "ACCELEROMETER_INT2",
0119                                      "TOUCH_INT",
0120                                      "WLAN_ENA",
0121                                      "", "", "", "", "",
0122                                      "FORCE_SENSING_INT",
0123                                      "FORCE_SENSING_RESET",
0124                                      "", "",
0125                                      "SDMMC_CD";
0126                 };
0127 
0128                 gpio@8000e080 {
0129                         /* GPIOs 96 - 127 */
0130                         gpio-line-names = "",
0131                                      "FORCE_SENSING_WU",
0132                                      "", "", "", "", "", "",
0133                                      "", "", "", "", "", "", "", "",
0134                                      "", "", "", "", "", "", "", "",
0135                                      "", "", "", "", "", "", "", "";
0136                 };
0137 
0138                 gpio@8000e100 {
0139                         /* GPIOs 128 - 159 */
0140                         gpio-line-names = "", "", "", "", "", "", "", "",
0141                                      "", "", "",
0142                                      "DIPRO_INT", /* GPIO139 */
0143                                      "XSHUTDOWN_SECONDARY_SENSOR",
0144                                      "XSHUTDOWN_PRIMARY_SENSOR",
0145                                      "NFC_RST (NFC_CTRL_",
0146                                      "TOUCH_RST",
0147                                      "NFC_IRQ (NFC_CTRL_1)",
0148                                      "HAL_SW",
0149                                      "TOUCH_RST2",
0150                                      "", "",
0151                                      "VAUDIO_HF_EN", /* GPIO149 */
0152                                      "", "", "", "", "", "", "", "", "", "";
0153                 };
0154 
0155                 gpio@8000e180 {
0156                         /* GPIOs 160 - 191 */
0157                         gpio-line-names = "", "", "", "", "", "", "", "",
0158                                      "",
0159                                      "SDMMC_EN",
0160                                      "XENON_CHARGE (FLASH_CONTROL_5)",
0161                                      "GBF_ENA_RESET",
0162                                      "", "", "", "",
0163                                      "", "", "", "", "", "", "", "",
0164                                      "", "", "", "", "", "", "", "";
0165                 };
0166 
0167                 gpio@8011e000 {
0168                         /* GPIOs 192 - 223 */
0169                         gpio-line-names = "HDTV_INTN",
0170                                      "", "", "",
0171                                      "HDTV_RSTN",
0172                                      "", "", "",
0173                                      "", /* GPIO200 */
0174                                      "", "", "", "", "", "", "",
0175                                      /* GPIO208-216 used for WGBF_MC1 */
0176                                      "", "", "", "", "", "", "", "", "",
0177                                      "SW_FRONT_PROXIMITY", /* GPIO217 */
0178                                      "KPD_CTRL_INT", /* Keypad controller */
0179                                      "", "", "", "", "";
0180                 };
0181 
0182                 gpio@8011e080 {
0183                         /* GPIOs 224 - 255 */
0184                         gpio-line-names = "", "",
0185                                      "HSIT_ACWAKE0",
0186                                      "", "", "", "", "",
0187                                      "", "", "", "", "", "", "", "",
0188                                      "", "", "", "", "", "", "", "",
0189                                      "", "", "", "", "", "", "", "";
0190                 };
0191 
0192                 // External Micro SD slot
0193                 mmc@80126000 {
0194                         cd-gpios  = <&gpio2 31 GPIO_ACTIVE_HIGH>; // 95
0195                 };
0196 
0197                 pinctrl {
0198                         /*
0199                          * Set this up using hogs, as time goes by and as seems fit, these
0200                          * can be moved over to being controlled by respective device.
0201                          */
0202                         pinctrl-names = "default";
0203                         pinctrl-0 = <&ipgpio_hrefv60_mode>,
0204                                   <&etm_hrefv60_mode>,
0205                                   <&nahj_hrefv60_mode>,
0206                                   <&nfc_hrefv60_mode>,
0207                                   <&force_hrefv60_mode>,
0208                                   <&dipro_hrefv60_mode>,
0209                                   <&vaudio_hf_hrefv60_mode>,
0210                                   <&gbf_hrefv60_mode>,
0211                                   <&hdtv_hrefv60_mode>,
0212                                   <&gpios_hrefv60_mode>;
0213 
0214                         sdi0 {
0215                                 sdi0_default_mode: sdi0_default {
0216                                         /* SD card detect GPIO pin, extend default state */
0217                                         default_hrefv60_cfg1 {
0218                                                 pins = "GPIO95_E8";
0219                                                 ste,config = <&gpio_in_pu>;
0220                                         };
0221                                 };
0222                         };
0223                         ipgpio {
0224                                 /*
0225                                  * XENON Flashgun on image processor GPIO (controlled from image
0226                                  * processor firmware), mux in these image processor GPIO lines 0
0227                                  * (XENON_FLASH_ID), 1 (XENON_READY) and there is an assistant
0228                                  * LED on IP GPIO 4 (XENON_EN2) on altfunction C, that need bias
0229                                  * from GPIO21 so pull up 0, 1 and drive 4 and GPIO21 low as output.
0230                                  */
0231                                 ipgpio_hrefv60_mode: ipgpio_hrefv60 {
0232                                         hrefv60_mux {
0233                                                 function = "ipgpio";
0234                                                 groups = "ipgpio0_c_1", "ipgpio1_c_1", "ipgpio4_c_1";
0235                                         };
0236                                         hrefv60_cfg1 {
0237                                                 pins = "GPIO6_AF6", "GPIO7_AG5";
0238                                                 ste,config = <&in_pu>;
0239                                         };
0240                                         hrefv60_cfg2 {
0241                                                 pins = "GPIO21_AB3";
0242                                                 ste,config = <&gpio_out_lo>;
0243                                         };
0244                                         hrefv60_cfg3 {
0245                                                 pins = "GPIO64_F3";
0246                                                 ste,config = <&out_lo>;
0247                                         };
0248                                 };
0249                         };
0250                         etm {
0251                                 /*
0252                                  * Drive D19-D23 for the ETM PTM trace interface low,
0253                                  * (presumably pins are unconnected therefore grounded here,
0254                                  * the "other alt C1" setting enables these pins)
0255                                  */
0256                                 etm_hrefv60_mode: etm_hrefv60 {
0257                                         hrefv60_cfg1 {
0258                                                 pins =
0259                                                 "GPIO70_G5",
0260                                                 "GPIO71_G4",
0261                                                 "GPIO72_H4",
0262                                                 "GPIO73_H3",
0263                                                 "GPIO74_J3";
0264                                                 ste,config = <&gpio_out_lo>;
0265                                         };
0266                                  };
0267                         };
0268                         nahj {
0269                                 nahj_hrefv60_mode: nahj_hrefv60 {
0270                                         /* NAHJ CTRL on GPIO76 to low, CTRL_INV on GPIO216 to high */
0271                                         hrefv60_cfg1 {
0272                                                 pins = "GPIO76_J2";
0273                                                 ste,config = <&gpio_out_lo>;
0274                                         };
0275                                         hrefv60_cfg2 {
0276                                                 pins = "GPIO216_AG12";
0277                                                 ste,config = <&gpio_out_hi>;
0278                                         };
0279                                  };
0280                         };
0281                         nfc {
0282                                 nfc_hrefv60_mode: nfc_hrefv60 {
0283                                         /* NFC ENA and RESET to low, pulldown IRQ line */
0284                                         hrefv60_cfg1 {
0285                                                 pins =
0286                                                 "GPIO77_H1", /* NFC_ENA */
0287                                                 "GPIO142_C11"; /* NFC_RESET */
0288                                                 ste,config = <&gpio_out_lo>;
0289                                         };
0290                                         hrefv60_cfg2 {
0291                                                 pins = "GPIO144_B13"; /* NFC_IRQ */
0292                                                 ste,config = <&gpio_in_pd>;
0293                                         };
0294                                  };
0295                         };
0296                         force {
0297                                 force_hrefv60_mode: force_hrefv60 {
0298                                         hrefv60_cfg1 {
0299                                                 pins = "GPIO91_B6"; /* FORCE_SENSING_INT */
0300                                                 ste,config = <&gpio_in_pu>;
0301                                         };
0302                                         hrefv60_cfg2 {
0303                                                 pins =
0304                                                 "GPIO92_D6", /* FORCE_SENSING_RST */
0305                                                 "GPIO97_D9"; /* FORCE_SENSING_WU */
0306                                                 ste,config = <&gpio_out_lo>;
0307                                         };
0308                                  };
0309                         };
0310                         dipro {
0311                                 dipro_hrefv60_mode: dipro_hrefv60 {
0312                                         hrefv60_cfg1 {
0313                                                 pins = "GPIO139_C9"; /* DIPRO_INT */
0314                                                 ste,config = <&gpio_in_pu>;
0315                                         };
0316                                  };
0317                         };
0318                         vaudio_hf {
0319                                 vaudio_hf_hrefv60_mode: vaudio_hf_hrefv60 {
0320                                         /* Audio Amplifier HF enable GPIO */
0321                                         hrefv60_cfg1 {
0322                                                 pins = "GPIO149_B14"; /* VAUDIO_HF_EN, enable MAX8968 */
0323                                                 ste,config = <&gpio_out_hi>;
0324                                         };
0325                                  };
0326                         };
0327                         gbf {
0328                                 gbf_hrefv60_mode: gbf_hrefv60 {
0329                                         /*
0330                                          * GBF (GPS, Bluetooth, FM-radio) interface,
0331                                          * pull low to reset state
0332                                          */
0333                                         hrefv60_cfg1 {
0334                                                 pins = "GPIO171_D23"; /* GBF_ENA_RESET */
0335                                                 ste,config = <&gpio_out_lo>;
0336                                         };
0337                                  };
0338                         };
0339                         hdtv {
0340                                 hdtv_hrefv60_mode: hdtv_hrefv60 {
0341                                         /* MSP : HDTV INTERFACE GPIO line */
0342                                         hrefv60_cfg1 {
0343                                                 pins = "GPIO192_AJ27";
0344                                                 ste,config = <&gpio_in_pd>;
0345                                         };
0346                                  };
0347                         };
0348                         mcde {
0349                                 lcd_hrefv60_mode: lcd_hrefv60 {
0350                                         /*
0351                                          * Display Interface 1 uses GPIO 65 for RST (reset).
0352                                          * Display Interface 2 uses GPIO 66 for RST (reset).
0353                                          * Drive DISP1 reset high (not reset), driver DISP2 reset low (reset)
0354                                          */
0355                                         hrefv60_cfg1 {
0356                                                 pins = "GPIO65_F1";
0357                                                 ste,config = <&gpio_out_hi>;
0358                                         };
0359                                         hrefv60_cfg2 {
0360                                                 pins = "GPIO66_G3";
0361                                                 ste,config = <&gpio_out_lo>;
0362                                         };
0363                                 };
0364                         };
0365                         gpios {
0366                                 /* Dangling GPIO pins */
0367                                 gpios_hrefv60_mode: gpios_hrefv60 {
0368                                         default_cfg1 {
0369                                                 /* Normally UART1 RXD, now dangling */
0370                                                 pins = "GPIO4_AH6";
0371                                                 ste,config = <&in_pu>;
0372                                         };
0373                                 };
0374                         };
0375                 };
0376         };
0377 };