1// SPDX-License-Identifier: GPL-2.0 2 3/dts-v1/; 4#include <dt-bindings/gpio/gpio.h> 5#include <dt-bindings/input/input.h> 6#include "s5pv210-aries.dtsi" 7 8/ { 9 model = "Samsung Galaxy S Fascinate 4G (SGH-T959P) based on S5PV210"; 10 compatible = "samsung,fascinate4g", "samsung,aries", "samsung,s5pv210"; 11 chassis-type = "handset"; 12 13 chosen { 14 stdout-path = &uart2; 15 }; 16 17 gpio-keys { 18 compatible = "gpio-keys"; 19 20 key-power { 21 label = "power"; 22 gpios = <&gph2 6 GPIO_ACTIVE_LOW>; 23 linux,code = <KEY_POWER>; 24 wakeup-source; 25 }; 26 27 key-vol-down { 28 label = "volume_down"; 29 gpios = <&gph3 2 GPIO_ACTIVE_LOW>; 30 linux,code = <KEY_VOLUMEDOWN>; 31 }; 32 33 key-vol-up { 34 label = "volume_up"; 35 gpios = <&gph3 1 GPIO_ACTIVE_LOW>; 36 linux,code = <KEY_VOLUMEUP>; 37 }; 38 }; 39 40 headset_micbias_reg: regulator-fixed-3 { 41 compatible = "regulator-fixed"; 42 regulator-name = "Headset_Micbias"; 43 gpio = <&gpj2 5 GPIO_ACTIVE_HIGH>; 44 enable-active-high; 45 46 pinctrl-names = "default"; 47 pinctrl-0 = <&headset_micbias_ena>; 48 }; 49 50 main_micbias_reg: regulator-fixed-4 { 51 compatible = "regulator-fixed"; 52 regulator-name = "Main_Micbias"; 53 gpio = <&gpj4 2 GPIO_ACTIVE_HIGH>; 54 enable-active-high; 55 56 pinctrl-names = "default"; 57 pinctrl-0 = <&main_micbias_ena>; 58 }; 59 60 sound { 61 compatible = "samsung,fascinate4g-wm8994"; 62 63 model = "Fascinate4G"; 64 65 extcon = <&fsa9480>; 66 67 main-micbias-supply = <&main_micbias_reg>; 68 headset-micbias-supply = <&headset_micbias_reg>; 69 70 earpath-sel-gpios = <&gpj2 6 GPIO_ACTIVE_HIGH>; 71 72 io-channels = <&adc 3>; 73 io-channel-names = "headset-detect"; 74 headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>; 75 headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>; 76 77 samsung,audio-routing = 78 "HP", "HPOUT1L", 79 "HP", "HPOUT1R", 80 81 "SPK", "SPKOUTLN", 82 "SPK", "SPKOUTLP", 83 84 "RCV", "HPOUT2N", 85 "RCV", "HPOUT2P", 86 87 "LINE", "LINEOUT2N", 88 "LINE", "LINEOUT2P", 89 90 "IN1LP", "Main Mic", 91 "IN1LN", "Main Mic", 92 93 "IN1RP", "Headset Mic", 94 "IN1RN", "Headset Mic", 95 96 "Modem Out", "Modem TX", 97 "Modem RX", "Modem In", 98 99 "Bluetooth SPK", "TX", 100 "RX", "Bluetooth Mic"; 101 102 pinctrl-names = "default"; 103 pinctrl-0 = <&headset_det &earpath_sel>; 104 105 cpu { 106 sound-dai = <&i2s0>, <&bt_codec>; 107 }; 108 109 codec { 110 sound-dai = <&wm8994>; 111 }; 112 }; 113}; 114 115&fg { 116 compatible = "maxim,max77836-battery"; 117 118 interrupt-parent = <&gph3>; 119 interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 120 121 pinctrl-names = "default"; 122 pinctrl-0 = <&fg_irq>; 123}; 124 125&pinctrl0 { 126 pinctrl-names = "default"; 127 pinctrl-0 = <&sleep_cfg>; 128 129 headset_det: headset-det-pins { 130 samsung,pins = "gph0-6", "gph3-6"; 131 samsung,pin-function = <S5PV210_PIN_FUNC_F>; 132 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>; 133 }; 134 135 fg_irq: fg-irq-pins { 136 samsung,pins = "gph3-3"; 137 samsung,pin-function = <S5PV210_PIN_FUNC_F>; 138 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>; 139 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>; 140 }; 141 142 headset_micbias_ena: headset-micbias-ena-pins { 143 samsung,pins = "gpj2-5"; 144 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>; 145 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>; 146 }; 147 148 earpath_sel: earpath-sel-pins { 149 samsung,pins = "gpj2-6"; 150 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>; 151 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>; 152 }; 153 154 main_micbias_ena: main-micbias-ena-pins { 155 samsung,pins = "gpj4-2"; 156 samsung,pin-pud = <S5PV210_PIN_PULL_NONE>; 157 samsung,pin-drv = <S5PV210_PIN_DRV_LV1>; 158 }; 159 160 /* Based on vendor kernel v2.6.35.7 */ 161 sleep_cfg: sleep-state { 162 PIN_SLP(gpa0-0, PREV, NONE); 163 PIN_SLP(gpa0-1, PREV, NONE); 164 PIN_SLP(gpa0-2, PREV, NONE); 165 PIN_SLP(gpa0-3, OUT1, NONE); 166 PIN_SLP(gpa0-4, PREV, NONE); 167 PIN_SLP(gpa0-5, PREV, NONE); 168 PIN_SLP(gpa0-6, PREV, NONE); 169 PIN_SLP(gpa0-7, PREV, NONE); 170 171 PIN_SLP(gpa1-0, INPUT, DOWN); 172 PIN_SLP(gpa1-1, OUT0, NONE); 173 PIN_SLP(gpa1-2, INPUT, DOWN); 174 PIN_SLP(gpa1-3, OUT0, NONE); 175 176 PIN_SLP(gpb-0, OUT0, NONE); 177 PIN_SLP(gpb-1, OUT1, NONE); 178 PIN_SLP(gpb-2, OUT0, NONE); 179 PIN_SLP(gpb-3, PREV, NONE); 180 PIN_SLP(gpb-4, INPUT, NONE); 181 PIN_SLP(gpb-5, PREV, NONE); 182 PIN_SLP(gpb-6, INPUT, DOWN); 183 PIN_SLP(gpb-7, OUT0, NONE); 184 185 PIN_SLP(gpc0-0, OUT0, NONE); 186 PIN_SLP(gpc0-1, INPUT, DOWN); 187 PIN_SLP(gpc0-2, OUT0, NONE); 188 PIN_SLP(gpc0-3, INPUT, DOWN); 189 PIN_SLP(gpc0-4, OUT0, NONE); 190 191 PIN_SLP(gpc1-0, INPUT, DOWN); 192 PIN_SLP(gpc1-1, INPUT, DOWN); 193 PIN_SLP(gpc1-2, INPUT, DOWN); 194 PIN_SLP(gpc1-3, INPUT, DOWN); 195 PIN_SLP(gpc1-4, INPUT, DOWN); 196 197 PIN_SLP(gpd0-0, INPUT, DOWN); 198 PIN_SLP(gpd0-1, OUT0, NONE); 199 PIN_SLP(gpd0-2, INPUT, DOWN); 200 PIN_SLP(gpd0-3, INPUT, DOWN); 201 202 PIN_SLP(gpd1-0, INPUT, NONE); 203 PIN_SLP(gpd1-1, INPUT, NONE); 204 PIN_SLP(gpd1-2, INPUT, DOWN); 205 PIN_SLP(gpd1-3, INPUT, DOWN); 206 PIN_SLP(gpd1-4, INPUT, DOWN); 207 PIN_SLP(gpd1-5, INPUT, DOWN); 208 209 PIN_SLP(gpe0-0, INPUT, DOWN); 210 PIN_SLP(gpe0-1, INPUT, DOWN); 211 PIN_SLP(gpe0-2, INPUT, DOWN); 212 PIN_SLP(gpe0-3, INPUT, DOWN); 213 PIN_SLP(gpe0-4, INPUT, DOWN); 214 PIN_SLP(gpe0-5, INPUT, DOWN); 215 PIN_SLP(gpe0-6, INPUT, DOWN); 216 PIN_SLP(gpe0-7, INPUT, DOWN); 217 218 PIN_SLP(gpe1-0, INPUT, DOWN); 219 PIN_SLP(gpe1-1, INPUT, DOWN); 220 PIN_SLP(gpe1-2, INPUT, DOWN); 221 PIN_SLP(gpe1-3, OUT0, NONE); 222 PIN_SLP(gpe1-4, INPUT, DOWN); 223 224 PIN_SLP(gpf0-0, OUT0, NONE); 225 PIN_SLP(gpf0-1, OUT0, NONE); 226 PIN_SLP(gpf0-2, OUT0, NONE); 227 PIN_SLP(gpf0-3, OUT0, NONE); 228 PIN_SLP(gpf0-4, OUT0, NONE); 229 PIN_SLP(gpf0-5, OUT0, NONE); 230 PIN_SLP(gpf0-6, OUT0, NONE); 231 PIN_SLP(gpf0-7, OUT0, NONE); 232 233 PIN_SLP(gpf1-0, OUT0, NONE); 234 PIN_SLP(gpf1-1, OUT0, NONE); 235 PIN_SLP(gpf1-2, OUT0, NONE); 236 PIN_SLP(gpf1-3, OUT0, NONE); 237 PIN_SLP(gpf1-4, OUT0, NONE); 238 PIN_SLP(gpf1-5, OUT0, NONE); 239 PIN_SLP(gpf1-6, OUT0, NONE); 240 PIN_SLP(gpf1-7, OUT0, NONE); 241 242 PIN_SLP(gpf2-0, OUT0, NONE); 243 PIN_SLP(gpf2-1, OUT0, NONE); 244 PIN_SLP(gpf2-2, OUT0, NONE); 245 PIN_SLP(gpf2-3, OUT0, NONE); 246 PIN_SLP(gpf2-4, OUT0, NONE); 247 PIN_SLP(gpf2-5, OUT0, NONE); 248 PIN_SLP(gpf2-6, OUT0, NONE); 249 PIN_SLP(gpf2-7, OUT0, NONE); 250 251 PIN_SLP(gpf3-0, OUT0, NONE); 252 PIN_SLP(gpf3-1, OUT0, NONE); 253 PIN_SLP(gpf3-2, OUT0, NONE); 254 PIN_SLP(gpf3-3, OUT0, NONE); 255 PIN_SLP(gpf3-4, PREV, NONE); 256 PIN_SLP(gpf3-5, INPUT, DOWN); 257 258 PIN_SLP(gpg0-0, INPUT, DOWN); 259 PIN_SLP(gpg0-1, INPUT, DOWN); 260 PIN_SLP(gpg0-2, INPUT, NONE); 261 PIN_SLP(gpg0-3, INPUT, DOWN); 262 PIN_SLP(gpg0-4, INPUT, DOWN); 263 PIN_SLP(gpg0-5, INPUT, DOWN); 264 PIN_SLP(gpg0-6, INPUT, DOWN); 265 266 PIN_SLP(gpg1-0, OUT0, NONE); 267 PIN_SLP(gpg1-1, OUT1, NONE); 268 PIN_SLP(gpg1-2, PREV, NONE); 269 PIN_SLP(gpg1-3, OUT1, NONE); 270 PIN_SLP(gpg1-4, OUT1, NONE); 271 PIN_SLP(gpg1-5, OUT1, NONE); 272 PIN_SLP(gpg1-6, OUT1, NONE); 273 274 PIN_SLP(gpg2-0, OUT0, NONE); 275 PIN_SLP(gpg2-1, OUT0, NONE); 276 PIN_SLP(gpg2-2, INPUT, NONE); 277 PIN_SLP(gpg2-3, OUT0, NONE); 278 PIN_SLP(gpg2-4, OUT0, NONE); 279 PIN_SLP(gpg2-5, OUT0, NONE); 280 PIN_SLP(gpg2-6, OUT0, NONE); 281 282 PIN_SLP(gpg3-0, PREV, UP); 283 PIN_SLP(gpg3-1, PREV, UP); 284 PIN_SLP(gpg3-2, INPUT, NONE); 285 PIN_SLP(gpg3-3, INPUT, DOWN); 286 PIN_SLP(gpg3-4, OUT0, NONE); 287 PIN_SLP(gpg3-5, OUT0, NONE); 288 PIN_SLP(gpg3-6, INPUT, DOWN); 289 290 PIN_SLP(gpi-0, PREV, NONE); 291 PIN_SLP(gpi-1, INPUT, DOWN); 292 PIN_SLP(gpi-2, PREV, NONE); 293 PIN_SLP(gpi-3, PREV, NONE); 294 PIN_SLP(gpi-4, PREV, NONE); 295 PIN_SLP(gpi-5, INPUT, DOWN); 296 PIN_SLP(gpi-6, INPUT, DOWN); 297 298 PIN_SLP(gpj0-0, INPUT, NONE); 299 PIN_SLP(gpj0-1, INPUT, NONE); 300 PIN_SLP(gpj0-2, INPUT, NONE); 301 PIN_SLP(gpj0-3, INPUT, NONE); 302 PIN_SLP(gpj0-4, INPUT, NONE); 303 PIN_SLP(gpj0-5, INPUT, DOWN); 304 PIN_SLP(gpj0-6, OUT0, NONE); 305 PIN_SLP(gpj0-7, INPUT, NONE); 306 307 PIN_SLP(gpj1-0, OUT1, NONE); 308 PIN_SLP(gpj1-1, OUT0, NONE); 309 PIN_SLP(gpj1-2, INPUT, DOWN); 310 PIN_SLP(gpj1-3, PREV, NONE); 311 PIN_SLP(gpj1-4, PREV, NONE); 312 PIN_SLP(gpj1-5, OUT0, NONE); 313 314 PIN_SLP(gpj2-0, INPUT, DOWN); 315 PIN_SLP(gpj2-1, INPUT, DOWN); 316 PIN_SLP(gpj2-2, OUT0, NONE); 317 PIN_SLP(gpj2-3, INPUT, DOWN); 318 PIN_SLP(gpj2-4, INPUT, DOWN); 319 PIN_SLP(gpj2-5, PREV, NONE); 320 PIN_SLP(gpj2-6, PREV, NONE); 321 PIN_SLP(gpj2-7, INPUT, DOWN); 322 323 PIN_SLP(gpj3-0, INPUT, NONE); 324 PIN_SLP(gpj3-1, INPUT, NONE); 325 PIN_SLP(gpj3-2, OUT0, NONE); 326 PIN_SLP(gpj3-3, INPUT, DOWN); 327 PIN_SLP(gpj3-4, INPUT, NONE); 328 PIN_SLP(gpj3-5, INPUT, NONE); 329 PIN_SLP(gpj3-6, INPUT, NONE); 330 PIN_SLP(gpj3-7, INPUT, NONE); 331 332 PIN_SLP(gpj4-0, INPUT, NONE); 333 PIN_SLP(gpj4-1, INPUT, DOWN); 334 PIN_SLP(gpj4-2, PREV, NONE); 335 PIN_SLP(gpj4-3, INPUT, NONE); 336 PIN_SLP(gpj4-4, INPUT, DOWN); 337 338 PIN_SLP(mp01-0, OUT1, NONE); 339 PIN_SLP(mp01-1, OUT0, NONE); 340 PIN_SLP(mp01-2, INPUT, DOWN); 341 PIN_SLP(mp01-3, INPUT, DOWN); 342 PIN_SLP(mp01-4, OUT1, NONE); 343 PIN_SLP(mp01-5, INPUT, DOWN); 344 PIN_SLP(mp01-6, INPUT, DOWN); 345 PIN_SLP(mp01-7, INPUT, DOWN); 346 347 PIN_SLP(mp02-0, INPUT, DOWN); 348 PIN_SLP(mp02-1, INPUT, DOWN); 349 PIN_SLP(mp02-2, INPUT, NONE); 350 PIN_SLP(mp02-3, INPUT, DOWN); 351 352 PIN_SLP(mp03-0, INPUT, DOWN); 353 PIN_SLP(mp03-1, INPUT, DOWN); 354 PIN_SLP(mp03-2, OUT1, NONE); 355 PIN_SLP(mp03-3, OUT0, NONE); 356 PIN_SLP(mp03-4, INPUT, NONE); 357 PIN_SLP(mp03-5, OUT0, NONE); 358 PIN_SLP(mp03-6, INPUT, DOWN); 359 PIN_SLP(mp03-7, INPUT, DOWN); 360 361 PIN_SLP(mp04-0, INPUT, DOWN); 362 PIN_SLP(mp04-1, OUT0, NONE); 363 PIN_SLP(mp04-2, INPUT, DOWN); 364 PIN_SLP(mp04-3, OUT0, NONE); 365 PIN_SLP(mp04-4, INPUT, DOWN); 366 PIN_SLP(mp04-5, INPUT, DOWN); 367 PIN_SLP(mp04-6, OUT0, NONE); 368 PIN_SLP(mp04-7, INPUT, DOWN); 369 370 PIN_SLP(mp05-0, INPUT, NONE); 371 PIN_SLP(mp05-1, INPUT, NONE); 372 PIN_SLP(mp05-2, INPUT, NONE); 373 PIN_SLP(mp05-3, INPUT, NONE); 374 PIN_SLP(mp05-4, INPUT, DOWN); 375 PIN_SLP(mp05-5, OUT0, NONE); 376 PIN_SLP(mp05-6, INPUT, DOWN); 377 PIN_SLP(mp05-7, PREV, NONE); 378 379 PIN_SLP(mp06-0, INPUT, DOWN); 380 PIN_SLP(mp06-1, INPUT, DOWN); 381 PIN_SLP(mp06-2, INPUT, DOWN); 382 PIN_SLP(mp06-3, INPUT, DOWN); 383 PIN_SLP(mp06-4, INPUT, DOWN); 384 PIN_SLP(mp06-5, INPUT, DOWN); 385 PIN_SLP(mp06-6, INPUT, DOWN); 386 PIN_SLP(mp06-7, INPUT, DOWN); 387 388 PIN_SLP(mp07-0, INPUT, DOWN); 389 PIN_SLP(mp07-1, INPUT, DOWN); 390 PIN_SLP(mp07-2, INPUT, DOWN); 391 PIN_SLP(mp07-3, INPUT, DOWN); 392 PIN_SLP(mp07-4, INPUT, DOWN); 393 PIN_SLP(mp07-5, INPUT, DOWN); 394 PIN_SLP(mp07-6, INPUT, DOWN); 395 PIN_SLP(mp07-7, INPUT, DOWN); 396 }; 397}; 398 399&wm8994 { 400 /* GPIO3 (BCLK2) and GPIO4 (LRCLK2) as outputs */ 401 wlf,gpio-cfg = <0xa101 0x8100 0x8100 0x8100 0x8100 0xa101 402 0x0100 0x8100 0x0100 0x0100 0x0100>; 403}; 404