1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright 2012 ST-Ericsson AB 4 */ 5 6#include "ste-dbx5x0.dtsi" 7#include "ste-href-ab8500.dtsi" 8#include "ste-href.dtsi" 9 10/ { 11 model = "ST-Ericsson HREF (v60+) platform with Device Tree"; 12 compatible = "st-ericsson,hrefv60+", "st-ericsson,u8500"; 13 14 soc { 15 /* Name the GPIO muxed rails on the HREF boards */ 16 gpio@8012e000 { 17 /* GPIOs 0 - 31 */ 18 gpio-line-names = 19 /* GPIO0,1 used for UART0 BT RX/TX */ 20 "", "", 21 "UART_WAKE", 22 "BT_WAKE", 23 "", 24 "SDMMC_1V8_3V_SEL", 25 "FLASH_LED_SYNC (FLASH_CTRL_0)", 26 "XENON_READY (FLASH_CTRL_1)", 27 "", "", "", "", "", "", "", "", 28 "", "", "", "", 29 "", 30 "FLASH_LED_EN (FLASH_CTRL_3)", 31 "", "", 32 "", "", "", "", "", 33 /* Used by UART2 (console) */ 34 "", "", 35 "MAGNETOMETER_INT"; 36 }; 37 38 gpio@8012e080 { 39 /* GPIOs 32 - 63 */ 40 gpio-line-names = 41 "MAGNETOMETER_DRDY", 42 "", "", "", "", "", "", "", 43 "", "", "", "", "", "", "", "", 44 "", "", "", "", "", "", "", "", 45 "", "", "", "", "", "", "", ""; 46 }; 47 48 gpio@8000e000 { 49 /* GPIOs 64 - 95 */ 50 gpio-line-names = "XENON_EN2 (FLASH_CTRL_4)", 51 "DISP1_RST", 52 "DISP2_RST", 53 "TOUCH_INT2", 54 "LCD_VSI0_A", 55 "LCD_VSI1_A", 56 /* GPIO 70-77 used for ETM */ 57 "", "", "", "", "", "", "", "", 58 /* GPIO 78-81 used for YCBCR */ 59 "", "", "", "", 60 "ACCELEROMETER_INT1_RDY", 61 "ACCELEROMETER_INT2", 62 "TOUCH_INT", 63 "WLAN_ENA", 64 "", "", "", "", "", 65 "FORCE_SENSING_INT", 66 "FORCE_SENSING_RESET", 67 "", "", 68 "SDMMC_CD"; 69 }; 70 71 gpio@8000e080 { 72 /* GPIOs 96 - 127 */ 73 gpio-line-names = "", 74 "FORCE_SENSING_WU", 75 "", "", "", "", "", "", 76 "", "", "", "", "", "", "", "", 77 "", "", "", "", "", "", "", "", 78 "", "", "", "", "", "", "", ""; 79 }; 80 81 gpio@8000e100 { 82 /* GPIOs 128 - 159 */ 83 gpio-line-names = "", "", "", "", "", "", "", "", 84 "", "", "", 85 "DIPRO_INT", /* GPIO139 */ 86 "XSHUTDOWN_SECONDARY_SENSOR", 87 "XSHUTDOWN_PRIMARY_SENSOR", 88 "NFC_RST (NFC_CTRL_", 89 "TOUCH_RST", 90 "NFC_IRQ (NFC_CTRL_1)", 91 "HAL_SW", 92 "TOUCH_RST2", 93 "", "", 94 "VAUDIO_HF_EN", /* GPIO149 */ 95 "", "", "", "", "", "", "", "", "", ""; 96 }; 97 98 gpio@8000e180 { 99 /* GPIOs 160 - 191 */ 100 gpio-line-names = "", "", "", "", "", "", "", "", 101 "", 102 "SDMMC_EN", 103 "XENON_CHARGE (FLASH_CONTROL_5)", 104 "GBF_ENA_RESET", 105 "", "", "", "", 106 "", "", "", "", "", "", "", "", 107 "", "", "", "", "", "", "", ""; 108 }; 109 110 gpio@8011e000 { 111 /* GPIOs 192 - 223 */ 112 gpio-line-names = "HDTV_INTN", 113 "", "", "", 114 "HDTV_RSTN", 115 "", "", "", 116 "", /* GPIO200 */ 117 "", "", "", "", "", "", "", 118 /* GPIO208-216 used for WGBF_MC1 */ 119 "", "", "", "", "", "", "", "", "", 120 "SW_FRONT_PROXIMITY", /* GPIO217 */ 121 "KPD_CTRL_INT", /* Keypad controller */ 122 "", "", "", "", ""; 123 }; 124 125 gpio@8011e080 { 126 /* GPIOs 224 - 255 */ 127 gpio-line-names = "", "", 128 "HSIT_ACWAKE0", 129 "", "", "", "", "", 130 "", "", "", "", "", "", "", "", 131 "", "", "", "", "", "", "", "", 132 "", "", "", "", "", "", "", ""; 133 }; 134 135 // External Micro SD slot 136 sdi0_per1@80126000 { 137 cd-gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; // 95 138 }; 139 140 vmmci: regulator-gpio { 141 gpios = <&gpio0 5 GPIO_ACTIVE_HIGH>; 142 enable-gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>; 143 enable-active-high; 144 }; 145 146 pinctrl { 147 /* 148 * Set this up using hogs, as time goes by and as seems fit, these 149 * can be moved over to being controlled by respective device. 150 */ 151 pinctrl-names = "default"; 152 pinctrl-0 = <&ipgpio_hrefv60_mode>, 153 <&etm_hrefv60_mode>, 154 <&nahj_hrefv60_mode>, 155 <&nfc_hrefv60_mode>, 156 <&force_hrefv60_mode>, 157 <&dipro_hrefv60_mode>, 158 <&vaudio_hf_hrefv60_mode>, 159 <&gbf_hrefv60_mode>, 160 <&hdtv_hrefv60_mode>, 161 <&gpios_hrefv60_mode>; 162 163 sdi0 { 164 sdi0_default_mode: sdi0_default { 165 /* SD card detect GPIO pin, extend default state */ 166 default_hrefv60_cfg1 { 167 pins = "GPIO95_E8"; 168 ste,config = <&gpio_in_pu>; 169 }; 170 /* VMMCI level-shifter enable */ 171 default_hrefv60_cfg2 { 172 pins = "GPIO169_D22"; 173 ste,config = <&gpio_out_hi>; 174 }; 175 /* VMMCI level-shifter voltage select */ 176 default_hrefv60_cfg3 { 177 pins = "GPIO5_AG6"; 178 ste,config = <&gpio_out_hi>; 179 }; 180 }; 181 }; 182 ipgpio { 183 /* 184 * XENON Flashgun on image processor GPIO (controlled from image 185 * processor firmware), mux in these image processor GPIO lines 0 186 * (XENON_FLASH_ID), 1 (XENON_READY) and there is an assistant 187 * LED on IP GPIO 4 (XENON_EN2) on altfunction C, that need bias 188 * from GPIO21 so pull up 0, 1 and drive 4 and GPIO21 low as output. 189 */ 190 ipgpio_hrefv60_mode: ipgpio_hrefv60 { 191 hrefv60_mux { 192 function = "ipgpio"; 193 groups = "ipgpio0_c_1", "ipgpio1_c_1", "ipgpio4_c_1"; 194 }; 195 hrefv60_cfg1 { 196 pins = "GPIO6_AF6", "GPIO7_AG5"; 197 ste,config = <&in_pu>; 198 }; 199 hrefv60_cfg2 { 200 pins = "GPIO21_AB3"; 201 ste,config = <&gpio_out_lo>; 202 }; 203 hrefv60_cfg3 { 204 pins = "GPIO64_F3"; 205 ste,config = <&out_lo>; 206 }; 207 }; 208 }; 209 etm { 210 /* 211 * Drive D19-D23 for the ETM PTM trace interface low, 212 * (presumably pins are unconnected therefore grounded here, 213 * the "other alt C1" setting enables these pins) 214 */ 215 etm_hrefv60_mode: etm_hrefv60 { 216 hrefv60_cfg1 { 217 pins = 218 "GPIO70_G5", 219 "GPIO71_G4", 220 "GPIO72_H4", 221 "GPIO73_H3", 222 "GPIO74_J3"; 223 ste,config = <&gpio_out_lo>; 224 }; 225 }; 226 }; 227 nahj { 228 nahj_hrefv60_mode: nahj_hrefv60 { 229 /* NAHJ CTRL on GPIO76 to low, CTRL_INV on GPIO216 to high */ 230 hrefv60_cfg1 { 231 pins = "GPIO76_J2"; 232 ste,config = <&gpio_out_lo>; 233 }; 234 hrefv60_cfg2 { 235 pins = "GPIO216_AG12"; 236 ste,config = <&gpio_out_hi>; 237 }; 238 }; 239 }; 240 nfc { 241 nfc_hrefv60_mode: nfc_hrefv60 { 242 /* NFC ENA and RESET to low, pulldown IRQ line */ 243 hrefv60_cfg1 { 244 pins = 245 "GPIO77_H1", /* NFC_ENA */ 246 "GPIO142_C11"; /* NFC_RESET */ 247 ste,config = <&gpio_out_lo>; 248 }; 249 hrefv60_cfg2 { 250 pins = "GPIO144_B13"; /* NFC_IRQ */ 251 ste,config = <&gpio_in_pd>; 252 }; 253 }; 254 }; 255 force { 256 force_hrefv60_mode: force_hrefv60 { 257 hrefv60_cfg1 { 258 pins = "GPIO91_B6"; /* FORCE_SENSING_INT */ 259 ste,config = <&gpio_in_pu>; 260 }; 261 hrefv60_cfg2 { 262 pins = 263 "GPIO92_D6", /* FORCE_SENSING_RST */ 264 "GPIO97_D9"; /* FORCE_SENSING_WU */ 265 ste,config = <&gpio_out_lo>; 266 }; 267 }; 268 }; 269 dipro { 270 dipro_hrefv60_mode: dipro_hrefv60 { 271 hrefv60_cfg1 { 272 pins = "GPIO139_C9"; /* DIPRO_INT */ 273 ste,config = <&gpio_in_pu>; 274 }; 275 }; 276 }; 277 vaudio_hf { 278 vaudio_hf_hrefv60_mode: vaudio_hf_hrefv60 { 279 /* Audio Amplifier HF enable GPIO */ 280 hrefv60_cfg1 { 281 pins = "GPIO149_B14"; /* VAUDIO_HF_EN, enable MAX8968 */ 282 ste,config = <&gpio_out_hi>; 283 }; 284 }; 285 }; 286 gbf { 287 gbf_hrefv60_mode: gbf_hrefv60 { 288 /* 289 * GBF (GPS, Bluetooth, FM-radio) interface, 290 * pull low to reset state 291 */ 292 hrefv60_cfg1 { 293 pins = "GPIO171_D23"; /* GBF_ENA_RESET */ 294 ste,config = <&gpio_out_lo>; 295 }; 296 }; 297 }; 298 hdtv { 299 hdtv_hrefv60_mode: hdtv_hrefv60 { 300 /* MSP : HDTV INTERFACE GPIO line */ 301 hrefv60_cfg1 { 302 pins = "GPIO192_AJ27"; 303 ste,config = <&gpio_in_pd>; 304 }; 305 }; 306 }; 307 mcde { 308 lcd_hrefv60_mode: lcd_hrefv60 { 309 /* 310 * Display Interface 1 uses GPIO 65 for RST (reset). 311 * Display Interface 2 uses GPIO 66 for RST (reset). 312 * Drive DISP1 reset high (not reset), driver DISP2 reset low (reset) 313 */ 314 hrefv60_cfg1 { 315 pins ="GPIO65_F1"; 316 ste,config = <&gpio_out_hi>; 317 }; 318 hrefv60_cfg2 { 319 pins ="GPIO66_G3"; 320 ste,config = <&gpio_out_lo>; 321 }; 322 }; 323 }; 324 gpios { 325 /* Dangling GPIO pins */ 326 gpios_hrefv60_mode: gpios_hrefv60 { 327 default_cfg1 { 328 /* Normally UART1 RXD, now dangling */ 329 pins = "GPIO4_AH6"; 330 ste,config = <&in_pu>; 331 }; 332 }; 333 }; 334 }; 335 }; 336}; 337