Neil Armstrong | 7c088e1 | 2018-09-05 15:56:52 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2017 Amlogic, Inc. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | /dts-v1/; |
| 7 | |
| 8 | #include "meson-axg.dtsi" |
| 9 | #include <dt-bindings/input/input.h> |
| 10 | |
| 11 | / { |
| 12 | compatible = "amlogic,s400", "amlogic,a113d", "amlogic,meson-axg"; |
| 13 | model = "Amlogic Meson AXG S400 Development Board"; |
| 14 | |
| 15 | adc_keys { |
| 16 | compatible = "adc-keys"; |
| 17 | io-channels = <&saradc 0>; |
| 18 | io-channel-names = "buttons"; |
| 19 | keyup-threshold-microvolt = <1800000>; |
| 20 | |
| 21 | button-next { |
| 22 | label = "Next"; |
| 23 | linux,code = <KEY_NEXT>; |
| 24 | press-threshold-microvolt = <1116000>; /* 62% */ |
| 25 | }; |
| 26 | |
| 27 | button-prev { |
| 28 | label = "Previous"; |
| 29 | linux,code = <KEY_PREVIOUS>; |
| 30 | press-threshold-microvolt = <900000>; /* 50% */ |
| 31 | }; |
| 32 | |
| 33 | button-wifi { |
| 34 | label = "Wifi"; |
| 35 | linux,code = <KEY_WLAN>; |
| 36 | press-threshold-microvolt = <684000>; /* 38% */ |
| 37 | }; |
| 38 | |
| 39 | button-up { |
| 40 | label = "Volume Up"; |
| 41 | linux,code = <KEY_VOLUMEUP>; |
| 42 | press-threshold-microvolt = <468000>; /* 26% */ |
| 43 | }; |
| 44 | |
| 45 | button-down { |
| 46 | label = "Volume Down"; |
| 47 | linux,code = <KEY_VOLUMEDOWN>; |
| 48 | press-threshold-microvolt = <252000>; /* 14% */ |
| 49 | }; |
| 50 | |
| 51 | button-voice { |
| 52 | label = "Voice"; |
| 53 | linux,code = <KEY_VOICECOMMAND>; |
| 54 | press-threshold-microvolt = <0>; /* 0% */ |
| 55 | }; |
| 56 | }; |
| 57 | |
| 58 | aliases { |
| 59 | serial0 = &uart_AO; |
| 60 | serial1 = &uart_A; |
| 61 | }; |
| 62 | |
| 63 | linein: audio-codec@0 { |
| 64 | #sound-dai-cells = <0>; |
| 65 | compatible = "everest,es7241"; |
| 66 | VDDA-supply = <&vcc_3v3>; |
| 67 | VDDP-supply = <&vcc_3v3>; |
| 68 | VDDD-supply = <&vcc_3v3>; |
| 69 | status = "okay"; |
| 70 | sound-name-prefix = "Linein"; |
| 71 | }; |
| 72 | |
| 73 | lineout: audio-codec@1 { |
| 74 | #sound-dai-cells = <0>; |
| 75 | compatible = "everest,es7154"; |
| 76 | VDD-supply = <&vcc_3v3>; |
| 77 | PVDD-supply = <&vcc_5v>; |
| 78 | status = "okay"; |
| 79 | sound-name-prefix = "Lineout"; |
| 80 | }; |
| 81 | |
| 82 | spdif_dit: audio-codec@2 { |
| 83 | #sound-dai-cells = <0>; |
| 84 | compatible = "linux,spdif-dit"; |
| 85 | status = "okay"; |
| 86 | sound-name-prefix = "DIT"; |
| 87 | }; |
| 88 | |
| 89 | dmics: audio-codec@3 { |
| 90 | #sound-dai-cells = <0>; |
| 91 | compatible = "dmic-codec"; |
| 92 | num-channels = <7>; |
| 93 | wakeup-delay-ms = <50>; |
| 94 | status = "okay"; |
| 95 | sound-name-prefix = "MIC"; |
| 96 | }; |
| 97 | |
| 98 | emmc_pwrseq: emmc-pwrseq { |
| 99 | compatible = "mmc-pwrseq-emmc"; |
| 100 | reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; |
| 101 | }; |
| 102 | |
| 103 | chosen { |
| 104 | stdout-path = "serial0:115200n8"; |
| 105 | }; |
| 106 | |
| 107 | memory@0 { |
| 108 | device_type = "memory"; |
| 109 | reg = <0x0 0x0 0x0 0x40000000>; |
| 110 | }; |
| 111 | |
| 112 | main_12v: regulator-main_12v { |
| 113 | compatible = "regulator-fixed"; |
| 114 | regulator-name = "12V"; |
| 115 | regulator-min-microvolt = <12000000>; |
| 116 | regulator-max-microvolt = <12000000>; |
| 117 | regulator-always-on; |
| 118 | }; |
| 119 | |
| 120 | vcc_3v3: regulator-vcc_3v3 { |
| 121 | compatible = "regulator-fixed"; |
| 122 | regulator-name = "VCC_3V3"; |
| 123 | regulator-min-microvolt = <3300000>; |
| 124 | regulator-max-microvolt = <3300000>; |
| 125 | vin-supply = <&vddao_3v3>; |
| 126 | regulator-always-on; |
| 127 | }; |
| 128 | |
| 129 | vcc_5v: regulator-vcc_5v { |
| 130 | compatible = "regulator-fixed"; |
| 131 | regulator-name = "VCC5V"; |
| 132 | regulator-min-microvolt = <5000000>; |
| 133 | regulator-max-microvolt = <5000000>; |
| 134 | vin-supply = <&main_12v>; |
| 135 | |
| 136 | gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>; |
| 137 | enable-active-high; |
| 138 | }; |
| 139 | |
| 140 | vddao_3v3: regulator-vddao_3v3 { |
| 141 | compatible = "regulator-fixed"; |
| 142 | regulator-name = "VDDAO_3V3"; |
| 143 | regulator-min-microvolt = <3300000>; |
| 144 | regulator-max-microvolt = <3300000>; |
| 145 | vin-supply = <&main_12v>; |
| 146 | regulator-always-on; |
| 147 | }; |
| 148 | |
| 149 | vddio_ao18: regulator-vddio_ao18 { |
| 150 | compatible = "regulator-fixed"; |
| 151 | regulator-name = "VDDIO_AO18"; |
| 152 | regulator-min-microvolt = <1800000>; |
| 153 | regulator-max-microvolt = <1800000>; |
| 154 | vin-supply = <&vddao_3v3>; |
| 155 | regulator-always-on; |
| 156 | }; |
| 157 | |
| 158 | vddio_boot: regulator-vddio_boot { |
| 159 | compatible = "regulator-fixed"; |
| 160 | regulator-name = "VDDIO_BOOT"; |
| 161 | regulator-min-microvolt = <1800000>; |
| 162 | regulator-max-microvolt = <1800000>; |
| 163 | vin-supply = <&vddao_3v3>; |
| 164 | regulator-always-on; |
| 165 | }; |
| 166 | |
| 167 | usb_pwr: regulator-usb_pwr { |
| 168 | compatible = "regulator-fixed"; |
| 169 | regulator-name = "USB_PWR"; |
| 170 | regulator-min-microvolt = <5000000>; |
| 171 | regulator-max-microvolt = <5000000>; |
| 172 | vin-supply = <&vcc_5v>; |
| 173 | |
| 174 | gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; |
| 175 | enable-active-high; |
| 176 | }; |
| 177 | |
| 178 | sdio_pwrseq: sdio-pwrseq { |
| 179 | compatible = "mmc-pwrseq-simple"; |
| 180 | reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>; |
| 181 | clocks = <&wifi32k>; |
| 182 | clock-names = "ext_clock"; |
| 183 | }; |
| 184 | |
| 185 | speaker-leds { |
| 186 | compatible = "gpio-leds"; |
| 187 | |
| 188 | aled1 { |
| 189 | label = "speaker:aled1"; |
| 190 | gpios = <&gpio_speaker 7 0>; |
| 191 | }; |
| 192 | |
| 193 | aled2 { |
| 194 | label = "speaker:aled2"; |
| 195 | gpios = <&gpio_speaker 6 0>; |
| 196 | }; |
| 197 | |
| 198 | aled3 { |
| 199 | label = "speaker:aled3"; |
| 200 | gpios = <&gpio_speaker 5 0>; |
| 201 | }; |
| 202 | |
| 203 | aled4 { |
| 204 | label = "speaker:aled4"; |
| 205 | gpios = <&gpio_speaker 4 0>; |
| 206 | }; |
| 207 | |
| 208 | aled5 { |
| 209 | label = "speaker:aled5"; |
| 210 | gpios = <&gpio_speaker 3 0>; |
| 211 | }; |
| 212 | |
| 213 | aled6 { |
| 214 | label = "speaker:aled6"; |
| 215 | gpios = <&gpio_speaker 2 0>; |
| 216 | }; |
| 217 | }; |
| 218 | |
| 219 | sound { |
| 220 | compatible = "amlogic,axg-sound-card"; |
| 221 | model = "AXG-S400"; |
| 222 | audio-aux-devs = <&tdmin_a>, <&tdmin_b>, <&tdmin_c>, |
| 223 | <&tdmin_lb>, <&tdmout_c>; |
| 224 | audio-widgets = "Line", "Lineout", |
| 225 | "Line", "Linein", |
| 226 | "Speaker", "Speaker1 Left", |
| 227 | "Speaker", "Speaker1 Right"; |
| 228 | audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", |
| 229 | "SPDIFOUT IN 0", "FRDDR_A OUT 3", |
| 230 | "TDMOUT_C IN 1", "FRDDR_B OUT 2", |
| 231 | "SPDIFOUT IN 1", "FRDDR_B OUT 3", |
| 232 | "TDMOUT_C IN 2", "FRDDR_C OUT 2", |
| 233 | "SPDIFOUT IN 2", "FRDDR_C OUT 3", |
| 234 | "TDM_C Playback", "TDMOUT_C OUT", |
| 235 | "TDMIN_A IN 2", "TDM_C Capture", |
| 236 | "TDMIN_A IN 5", "TDM_C Loopback", |
| 237 | "TDMIN_B IN 2", "TDM_C Capture", |
| 238 | "TDMIN_B IN 5", "TDM_C Loopback", |
| 239 | "TDMIN_C IN 2", "TDM_C Capture", |
| 240 | "TDMIN_C IN 5", "TDM_C Loopback", |
| 241 | "TDMIN_LB IN 2", "TDM_C Loopback", |
| 242 | "TDMIN_LB IN 5", "TDM_C Capture", |
| 243 | "TODDR_A IN 0", "TDMIN_A OUT", |
| 244 | "TODDR_B IN 0", "TDMIN_A OUT", |
| 245 | "TODDR_C IN 0", "TDMIN_A OUT", |
| 246 | "TODDR_A IN 1", "TDMIN_B OUT", |
| 247 | "TODDR_B IN 1", "TDMIN_B OUT", |
| 248 | "TODDR_C IN 1", "TDMIN_B OUT", |
| 249 | "TODDR_A IN 2", "TDMIN_C OUT", |
| 250 | "TODDR_B IN 2", "TDMIN_C OUT", |
| 251 | "TODDR_C IN 2", "TDMIN_C OUT", |
| 252 | "TODDR_A IN 4", "PDM Capture", |
| 253 | "TODDR_B IN 4", "PDM Capture", |
| 254 | "TODDR_C IN 4", "PDM Capture", |
| 255 | "TODDR_A IN 6", "TDMIN_LB OUT", |
| 256 | "TODDR_B IN 6", "TDMIN_LB OUT", |
| 257 | "TODDR_C IN 6", "TDMIN_LB OUT", |
| 258 | "Lineout", "Lineout AOUTL", |
| 259 | "Lineout", "Lineout AOUTR", |
| 260 | "Speaker1 Left", "SPK1 OUT_A", |
| 261 | "Speaker1 Left", "SPK1 OUT_B", |
| 262 | "Speaker1 Right", "SPK1 OUT_C", |
| 263 | "Speaker1 Right", "SPK1 OUT_D", |
| 264 | "Linein AINL", "Linein", |
| 265 | "Linein AINR", "Linein"; |
| 266 | assigned-clocks = <&clkc CLKID_HIFI_PLL>, |
| 267 | <&clkc CLKID_MPLL0>, |
| 268 | <&clkc CLKID_MPLL1>; |
| 269 | assigned-clock-parents = <0>, <0>, <0>; |
| 270 | assigned-clock-rates = <589824000>, |
| 271 | <270950400>, |
| 272 | <393216000>; |
| 273 | status = "okay"; |
| 274 | |
| 275 | dai-link@0 { |
| 276 | sound-dai = <&frddr_a>; |
| 277 | }; |
| 278 | |
| 279 | dai-link@1 { |
| 280 | sound-dai = <&frddr_b>; |
| 281 | }; |
| 282 | |
| 283 | dai-link@2 { |
| 284 | sound-dai = <&frddr_c>; |
| 285 | }; |
| 286 | |
| 287 | dai-link@3 { |
| 288 | sound-dai = <&toddr_a>; |
| 289 | }; |
| 290 | |
| 291 | dai-link@4 { |
| 292 | sound-dai = <&toddr_b>; |
| 293 | }; |
| 294 | |
| 295 | dai-link@5 { |
| 296 | sound-dai = <&toddr_c>; |
| 297 | }; |
| 298 | |
| 299 | dai-link@6 { |
| 300 | sound-dai = <&tdmif_c>; |
| 301 | dai-format = "i2s"; |
| 302 | dai-tdm-slot-tx-mask-2 = <1 1>; |
| 303 | dai-tdm-slot-rx-mask-1 = <1 1>; |
| 304 | mclk-fs = <256>; |
| 305 | |
| 306 | codec@0 { |
| 307 | sound-dai = <&lineout>; |
| 308 | }; |
| 309 | |
| 310 | codec@1 { |
| 311 | sound-dai = <&speaker_amp1>; |
| 312 | }; |
| 313 | |
| 314 | codec@2 { |
| 315 | sound-dai = <&linein>; |
| 316 | }; |
| 317 | |
| 318 | }; |
| 319 | |
| 320 | dai-link@7 { |
| 321 | sound-dai = <&spdifout>; |
| 322 | |
| 323 | codec { |
| 324 | sound-dai = <&spdif_dit>; |
| 325 | }; |
| 326 | }; |
| 327 | |
| 328 | dai-link@8 { |
| 329 | sound-dai = <&pdm>; |
| 330 | |
| 331 | codec { |
| 332 | sound-dai = <&dmics>; |
| 333 | }; |
| 334 | }; |
| 335 | }; |
| 336 | |
| 337 | wifi32k: wifi32k { |
| 338 | compatible = "pwm-clock"; |
| 339 | #clock-cells = <0>; |
| 340 | clock-frequency = <32768>; |
| 341 | pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */ |
| 342 | }; |
| 343 | }; |
| 344 | |
| 345 | ðmac { |
| 346 | status = "okay"; |
| 347 | pinctrl-0 = <ð_rgmii_y_pins>; |
| 348 | pinctrl-names = "default"; |
| 349 | phy-handle = <ð_phy0>; |
| 350 | phy-mode = "rgmii"; |
| 351 | |
| 352 | mdio { |
| 353 | compatible = "snps,dwmac-mdio"; |
| 354 | #address-cells = <1>; |
| 355 | #size-cells = <0>; |
| 356 | |
| 357 | eth_phy0: ethernet-phy@0 { |
| 358 | /* Realtek RTL8211F (0x001cc916) */ |
| 359 | reg = <0>; |
| 360 | eee-broken-1000t; |
| 361 | }; |
| 362 | }; |
| 363 | }; |
| 364 | |
| 365 | &frddr_a { |
| 366 | status = "okay"; |
| 367 | }; |
| 368 | |
| 369 | &frddr_b { |
| 370 | status = "okay"; |
| 371 | }; |
| 372 | |
| 373 | &frddr_c { |
| 374 | status = "okay"; |
| 375 | }; |
| 376 | |
| 377 | &ir { |
| 378 | status = "okay"; |
| 379 | pinctrl-0 = <&remote_input_ao_pins>; |
| 380 | pinctrl-names = "default"; |
| 381 | }; |
| 382 | |
| 383 | &i2c1 { |
| 384 | status = "okay"; |
| 385 | pinctrl-0 = <&i2c1_z_pins>; |
| 386 | pinctrl-names = "default"; |
| 387 | |
| 388 | speaker_amp1: audio-codec@1b { |
| 389 | compatible = "ti,tas5707"; |
| 390 | reg = <0x1b>; |
| 391 | reset-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>; |
| 392 | #sound-dai-cells = <0>; |
| 393 | AVDD-supply = <&vcc_3v3>; |
| 394 | DVDD-supply = <&vcc_3v3>; |
| 395 | PVDD_A-supply = <&main_12v>; |
| 396 | PVDD_B-supply = <&main_12v>; |
| 397 | PVDD_C-supply = <&main_12v>; |
| 398 | PVDD_D-supply = <&main_12v>; |
| 399 | sound-name-prefix = "SPK1"; |
| 400 | }; |
| 401 | }; |
| 402 | |
| 403 | &i2c_AO { |
| 404 | status = "okay"; |
| 405 | pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>; |
| 406 | pinctrl-names = "default"; |
| 407 | |
| 408 | gpio_speaker: gpio-controller@1f { |
| 409 | compatible = "nxp,pca9557"; |
| 410 | reg = <0x1f>; |
| 411 | gpio-controller; |
| 412 | #gpio-cells = <2>; |
| 413 | vcc-supply = <&vddao_3v3>; |
| 414 | }; |
| 415 | }; |
| 416 | |
| 417 | &pdm { |
| 418 | pinctrl-0 = <&pdm_dclk_a14_pins>, <&pdm_din0_pins>, |
| 419 | <&pdm_din1_pins>, <&pdm_din2_pins>, <&pdm_din3_pins>; |
| 420 | pinctrl-names = "default"; |
| 421 | status = "okay"; |
| 422 | }; |
| 423 | |
| 424 | &pwm_ab { |
| 425 | status = "okay"; |
| 426 | pinctrl-0 = <&pwm_a_x20_pins>; |
| 427 | pinctrl-names = "default"; |
| 428 | }; |
| 429 | |
| 430 | &saradc { |
| 431 | status = "okay"; |
| 432 | vref-supply = <&vddio_ao18>; |
| 433 | }; |
| 434 | |
| 435 | /* wifi module */ |
| 436 | &sd_emmc_b { |
| 437 | status = "okay"; |
| 438 | #address-cells = <1>; |
| 439 | #size-cells = <0>; |
| 440 | |
| 441 | pinctrl-0 = <&sdio_pins>; |
| 442 | pinctrl-1 = <&sdio_clk_gate_pins>; |
| 443 | pinctrl-names = "default", "clk-gate"; |
| 444 | |
| 445 | bus-width = <4>; |
| 446 | cap-sd-highspeed; |
| 447 | max-frequency = <100000000>; |
| 448 | non-removable; |
| 449 | disable-wp; |
| 450 | |
| 451 | mmc-pwrseq = <&sdio_pwrseq>; |
| 452 | |
| 453 | vmmc-supply = <&vddao_3v3>; |
| 454 | vqmmc-supply = <&vddio_boot>; |
| 455 | |
| 456 | brcmf: wifi@1 { |
| 457 | reg = <1>; |
| 458 | compatible = "brcm,bcm4329-fmac"; |
| 459 | }; |
| 460 | }; |
| 461 | |
| 462 | /* emmc storage */ |
| 463 | &sd_emmc_c { |
| 464 | status = "disabled"; |
| 465 | pinctrl-0 = <&emmc_pins>; |
| 466 | pinctrl-1 = <&emmc_clk_gate_pins>; |
| 467 | pinctrl-names = "default", "clk-gate"; |
| 468 | |
| 469 | bus-width = <8>; |
| 470 | cap-sd-highspeed; |
| 471 | cap-mmc-highspeed; |
| 472 | max-frequency = <180000000>; |
| 473 | non-removable; |
| 474 | disable-wp; |
| 475 | mmc-ddr-1_8v; |
| 476 | mmc-hs200-1_8v; |
| 477 | |
| 478 | mmc-pwrseq = <&emmc_pwrseq>; |
| 479 | |
| 480 | vmmc-supply = <&vcc_3v3>; |
| 481 | vqmmc-supply = <&vddio_boot>; |
| 482 | }; |
| 483 | |
| 484 | &spdifout { |
| 485 | pinctrl-0 = <&spdif_out_a20_pins>; |
| 486 | pinctrl-names = "default"; |
| 487 | status = "okay"; |
| 488 | }; |
| 489 | |
| 490 | &tdmif_a { |
| 491 | pinctrl-0 = <&tdma_sclk_pins>, <&tdma_fs_pins>, |
| 492 | <&tdma_din0_pins>, <&tdma_dout0_x15_pins>; |
| 493 | pinctrl-names = "default"; |
| 494 | status = "okay"; |
| 495 | }; |
| 496 | |
| 497 | &tdmif_b { |
| 498 | pinctrl-0 = <&tdmb_sclk_pins>, <&tdmb_fs_pins>, |
| 499 | <&tdmb_din3_pins>, <&mclk_b_pins>; |
| 500 | pinctrl-names = "default"; |
| 501 | status = "okay"; |
| 502 | }; |
| 503 | |
| 504 | &tdmif_c { |
| 505 | pinctrl-0 = <&tdmc_sclk_pins>, <&tdmc_fs_pins>, |
| 506 | <&tdmc_din1_pins>, <&tdmc_dout2_pins>, |
| 507 | <&mclk_c_pins>; |
| 508 | pinctrl-names = "default"; |
| 509 | status = "okay"; |
| 510 | }; |
| 511 | |
| 512 | &tdmin_a { |
| 513 | status = "okay"; |
| 514 | }; |
| 515 | |
| 516 | &tdmin_b { |
| 517 | status = "okay"; |
| 518 | }; |
| 519 | |
| 520 | &tdmin_c { |
| 521 | status = "okay"; |
| 522 | }; |
| 523 | |
| 524 | &tdmin_lb { |
| 525 | status = "okay"; |
| 526 | }; |
| 527 | |
| 528 | &tdmout_c { |
| 529 | status = "okay"; |
| 530 | }; |
| 531 | |
| 532 | &toddr_a { |
| 533 | status = "okay"; |
| 534 | }; |
| 535 | |
| 536 | &toddr_b { |
| 537 | status = "okay"; |
| 538 | }; |
| 539 | |
| 540 | &toddr_c { |
| 541 | status = "okay"; |
| 542 | }; |
| 543 | |
| 544 | &uart_A { |
| 545 | status = "okay"; |
| 546 | pinctrl-0 = <&uart_a_pins>; |
| 547 | pinctrl-names = "default"; |
| 548 | }; |
| 549 | |
| 550 | &uart_AO { |
| 551 | status = "okay"; |
| 552 | pinctrl-0 = <&uart_ao_a_pins>; |
| 553 | pinctrl-names = "default"; |
| 554 | }; |