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 sound-name-prefix = "Linein"; 70 }; 71 72 lineout: audio-codec-1 { 73 #sound-dai-cells = <0>; 74 compatible = "everest,es7154"; 75 VDD-supply = <&vcc_3v3>; 76 PVDD-supply = <&vcc_5v>; 77 sound-name-prefix = "Lineout"; 78 }; 79 80 spdif_dit: audio-codec-2 { 81 #sound-dai-cells = <0>; 82 compatible = "linux,spdif-dit"; 83 sound-name-prefix = "DIT"; 84 }; 85 86 dmics: audio-codec-3 { 87 #sound-dai-cells = <0>; 88 compatible = "dmic-codec"; 89 num-channels = <7>; 90 wakeup-delay-ms = <50>; 91 sound-name-prefix = "MIC"; 92 }; 93 94 spdif_dir: audio-codec-4 { 95 #sound-dai-cells = <0>; 96 compatible = "linux,spdif-dir"; 97 sound-name-prefix = "DIR"; 98 }; 99 100 emmc_pwrseq: emmc-pwrseq { 101 compatible = "mmc-pwrseq-emmc"; 102 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>; 103 }; 104 105 chosen { 106 stdout-path = "serial0:115200n8"; 107 }; 108 109 memory@0 { 110 device_type = "memory"; 111 reg = <0x0 0x0 0x0 0x40000000>; 112 }; 113 114 main_12v: regulator-main_12v { 115 compatible = "regulator-fixed"; 116 regulator-name = "12V"; 117 regulator-min-microvolt = <12000000>; 118 regulator-max-microvolt = <12000000>; 119 regulator-always-on; 120 }; 121 122 vcc_3v3: regulator-vcc_3v3 { 123 compatible = "regulator-fixed"; 124 regulator-name = "VCC_3V3"; 125 regulator-min-microvolt = <3300000>; 126 regulator-max-microvolt = <3300000>; 127 vin-supply = <&vddao_3v3>; 128 regulator-always-on; 129 }; 130 131 vcc_5v: regulator-vcc_5v { 132 compatible = "regulator-fixed"; 133 regulator-name = "VCC5V"; 134 regulator-min-microvolt = <5000000>; 135 regulator-max-microvolt = <5000000>; 136 vin-supply = <&main_12v>; 137 138 gpio = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>; 139 enable-active-high; 140 }; 141 142 vddao_3v3: regulator-vddao_3v3 { 143 compatible = "regulator-fixed"; 144 regulator-name = "VDDAO_3V3"; 145 regulator-min-microvolt = <3300000>; 146 regulator-max-microvolt = <3300000>; 147 vin-supply = <&main_12v>; 148 regulator-always-on; 149 }; 150 151 vddio_ao18: regulator-vddio_ao18 { 152 compatible = "regulator-fixed"; 153 regulator-name = "VDDIO_AO18"; 154 regulator-min-microvolt = <1800000>; 155 regulator-max-microvolt = <1800000>; 156 vin-supply = <&vddao_3v3>; 157 regulator-always-on; 158 }; 159 160 vddio_boot: regulator-vddio_boot { 161 compatible = "regulator-fixed"; 162 regulator-name = "VDDIO_BOOT"; 163 regulator-min-microvolt = <1800000>; 164 regulator-max-microvolt = <1800000>; 165 vin-supply = <&vddao_3v3>; 166 regulator-always-on; 167 }; 168 169 usb_pwr: regulator-usb_pwr { 170 compatible = "regulator-fixed"; 171 regulator-name = "USB_PWR"; 172 regulator-min-microvolt = <5000000>; 173 regulator-max-microvolt = <5000000>; 174 vin-supply = <&vcc_5v>; 175 176 gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>; 177 enable-active-high; 178 }; 179 180 sdio_pwrseq: sdio-pwrseq { 181 compatible = "mmc-pwrseq-simple"; 182 reset-gpios = <&gpio GPIOX_7 GPIO_ACTIVE_LOW>; 183 clocks = <&wifi32k>; 184 clock-names = "ext_clock"; 185 }; 186 187 speaker-leds { 188 compatible = "gpio-leds"; 189 190 aled1 { 191 label = "speaker:aled1"; 192 gpios = <&gpio_speaker 7 0>; 193 }; 194 195 aled2 { 196 label = "speaker:aled2"; 197 gpios = <&gpio_speaker 6 0>; 198 }; 199 200 aled3 { 201 label = "speaker:aled3"; 202 gpios = <&gpio_speaker 5 0>; 203 }; 204 205 aled4 { 206 label = "speaker:aled4"; 207 gpios = <&gpio_speaker 4 0>; 208 }; 209 210 aled5 { 211 label = "speaker:aled5"; 212 gpios = <&gpio_speaker 3 0>; 213 }; 214 215 aled6 { 216 label = "speaker:aled6"; 217 gpios = <&gpio_speaker 2 0>; 218 }; 219 }; 220 221 sound { 222 compatible = "amlogic,axg-sound-card"; 223 model = "AXG-S400"; 224 audio-aux-devs = <&tdmin_a>, <&tdmin_b>, <&tdmin_c>, 225 <&tdmin_lb>, <&tdmout_c>; 226 audio-widgets = "Line", "Lineout", 227 "Line", "Linein", 228 "Speaker", "Speaker1 Left", 229 "Speaker", "Speaker1 Right"; 230 audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", 231 "SPDIFOUT IN 0", "FRDDR_A OUT 3", 232 "TDMOUT_C IN 1", "FRDDR_B OUT 2", 233 "SPDIFOUT IN 1", "FRDDR_B OUT 3", 234 "TDMOUT_C IN 2", "FRDDR_C OUT 2", 235 "SPDIFOUT IN 2", "FRDDR_C OUT 3", 236 "TDM_C Playback", "TDMOUT_C OUT", 237 "TDMIN_A IN 2", "TDM_C Capture", 238 "TDMIN_A IN 5", "TDM_C Loopback", 239 "TDMIN_B IN 2", "TDM_C Capture", 240 "TDMIN_B IN 5", "TDM_C Loopback", 241 "TDMIN_C IN 2", "TDM_C Capture", 242 "TDMIN_C IN 5", "TDM_C Loopback", 243 "TDMIN_LB IN 2", "TDM_C Loopback", 244 "TDMIN_LB IN 5", "TDM_C Capture", 245 "TODDR_A IN 0", "TDMIN_A OUT", 246 "TODDR_B IN 0", "TDMIN_A OUT", 247 "TODDR_C IN 0", "TDMIN_A OUT", 248 "TODDR_A IN 1", "TDMIN_B OUT", 249 "TODDR_B IN 1", "TDMIN_B OUT", 250 "TODDR_C IN 1", "TDMIN_B OUT", 251 "TODDR_A IN 2", "TDMIN_C OUT", 252 "TODDR_B IN 2", "TDMIN_C OUT", 253 "TODDR_C IN 2", "TDMIN_C OUT", 254 "TODDR_A IN 3", "SPDIFIN Capture", 255 "TODDR_B IN 3", "SPDIFIN Capture", 256 "TODDR_C IN 3", "SPDIFIN Capture", 257 "TODDR_A IN 4", "PDM Capture", 258 "TODDR_B IN 4", "PDM Capture", 259 "TODDR_C IN 4", "PDM Capture", 260 "TODDR_A IN 6", "TDMIN_LB OUT", 261 "TODDR_B IN 6", "TDMIN_LB OUT", 262 "TODDR_C IN 6", "TDMIN_LB OUT", 263 "Lineout", "Lineout AOUTL", 264 "Lineout", "Lineout AOUTR", 265 "Speaker1 Left", "SPK1 OUT_A", 266 "Speaker1 Left", "SPK1 OUT_B", 267 "Speaker1 Right", "SPK1 OUT_C", 268 "Speaker1 Right", "SPK1 OUT_D", 269 "Linein AINL", "Linein", 270 "Linein AINR", "Linein"; 271 assigned-clocks = <&clkc CLKID_HIFI_PLL>, 272 <&clkc CLKID_MPLL0>, 273 <&clkc CLKID_MPLL1>; 274 assigned-clock-parents = <0>, <0>, <0>; 275 assigned-clock-rates = <589824000>, 276 <270950400>, 277 <393216000>; 278 279 dai-link-0 { 280 sound-dai = <&frddr_a>; 281 }; 282 283 dai-link-1 { 284 sound-dai = <&frddr_b>; 285 }; 286 287 dai-link-2 { 288 sound-dai = <&frddr_c>; 289 }; 290 291 dai-link-3 { 292 sound-dai = <&toddr_a>; 293 }; 294 295 dai-link-4 { 296 sound-dai = <&toddr_b>; 297 }; 298 299 dai-link-5 { 300 sound-dai = <&toddr_c>; 301 }; 302 303 dai-link-6 { 304 sound-dai = <&tdmif_c>; 305 dai-format = "i2s"; 306 dai-tdm-slot-tx-mask-2 = <1 1>; 307 dai-tdm-slot-rx-mask-1 = <1 1>; 308 mclk-fs = <256>; 309 310 codec-0 { 311 sound-dai = <&lineout>; 312 }; 313 314 codec-1 { 315 sound-dai = <&speaker_amp1>; 316 }; 317 318 codec-2 { 319 sound-dai = <&linein>; 320 }; 321 322 }; 323 324 dai-link-7 { 325 sound-dai = <&spdifout>; 326 327 codec { 328 sound-dai = <&spdif_dit>; 329 }; 330 }; 331 332 dai-link-8 { 333 sound-dai = <&spdifin>; 334 335 codec { 336 sound-dai = <&spdif_dir>; 337 }; 338 }; 339 340 dai-link-9 { 341 sound-dai = <&pdm>; 342 343 codec { 344 sound-dai = <&dmics>; 345 }; 346 }; 347 }; 348 349 wifi32k: wifi32k { 350 compatible = "pwm-clock"; 351 #clock-cells = <0>; 352 clock-frequency = <32768>; 353 pwms = <&pwm_ab 0 30518 0>; /* PWM_A at 32.768KHz */ 354 }; 355}; 356 357ðmac { 358 status = "okay"; 359 pinctrl-0 = <ð_rgmii_y_pins>; 360 pinctrl-names = "default"; 361 phy-handle = <ð_phy0>; 362 phy-mode = "rgmii"; 363 364 mdio { 365 compatible = "snps,dwmac-mdio"; 366 #address-cells = <1>; 367 #size-cells = <0>; 368 369 eth_phy0: ethernet-phy@0 { 370 /* Realtek RTL8211F (0x001cc916) */ 371 reg = <0>; 372 interrupt-parent = <&gpio_intc>; 373 interrupts = <98 IRQ_TYPE_LEVEL_LOW>; 374 eee-broken-1000t; 375 }; 376 }; 377}; 378 379&frddr_a { 380 status = "okay"; 381}; 382 383&frddr_b { 384 status = "okay"; 385}; 386 387&frddr_c { 388 status = "okay"; 389}; 390 391&ir { 392 status = "okay"; 393 pinctrl-0 = <&remote_input_ao_pins>; 394 pinctrl-names = "default"; 395}; 396 397&i2c1 { 398 status = "okay"; 399 pinctrl-0 = <&i2c1_z_pins>; 400 pinctrl-names = "default"; 401 402 speaker_amp1: audio-codec@1b { 403 compatible = "ti,tas5707"; 404 reg = <0x1b>; 405 reset-gpios = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_LOW>; 406 #sound-dai-cells = <0>; 407 AVDD-supply = <&vcc_3v3>; 408 DVDD-supply = <&vcc_3v3>; 409 PVDD_A-supply = <&main_12v>; 410 PVDD_B-supply = <&main_12v>; 411 PVDD_C-supply = <&main_12v>; 412 PVDD_D-supply = <&main_12v>; 413 sound-name-prefix = "SPK1"; 414 }; 415}; 416 417&i2c_AO { 418 status = "okay"; 419 pinctrl-0 = <&i2c_ao_sck_10_pins>, <&i2c_ao_sda_11_pins>; 420 pinctrl-names = "default"; 421 422 gpio_speaker: gpio-controller@1f { 423 compatible = "nxp,pca9557"; 424 reg = <0x1f>; 425 gpio-controller; 426 #gpio-cells = <2>; 427 vcc-supply = <&vddao_3v3>; 428 }; 429}; 430 431&pdm { 432 pinctrl-0 = <&pdm_dclk_a14_pins>, <&pdm_din0_pins>, 433 <&pdm_din1_pins>, <&pdm_din2_pins>, <&pdm_din3_pins>; 434 pinctrl-names = "default"; 435 status = "okay"; 436}; 437 438&pcieA { 439 reset-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_LOW>; 440 status = "okay"; 441}; 442 443&pcieB { 444 reset-gpios = <&gpio GPIOZ_10 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; 445 status = "okay"; 446}; 447 448&pwm_ab { 449 status = "okay"; 450 pinctrl-0 = <&pwm_a_x20_pins>; 451 pinctrl-names = "default"; 452}; 453 454&saradc { 455 status = "okay"; 456 vref-supply = <&vddio_ao18>; 457}; 458 459/* wifi module */ 460&sd_emmc_b { 461 status = "okay"; 462 #address-cells = <1>; 463 #size-cells = <0>; 464 465 pinctrl-0 = <&sdio_pins>; 466 pinctrl-1 = <&sdio_clk_gate_pins>; 467 pinctrl-names = "default", "clk-gate"; 468 469 bus-width = <4>; 470 cap-sd-highspeed; 471 sd-uhs-sdr104; 472 max-frequency = <200000000>; 473 non-removable; 474 disable-wp; 475 476 mmc-pwrseq = <&sdio_pwrseq>; 477 478 vmmc-supply = <&vddao_3v3>; 479 vqmmc-supply = <&vddio_boot>; 480 481 brcmf: wifi@1 { 482 reg = <1>; 483 compatible = "brcm,bcm4329-fmac"; 484 }; 485}; 486 487/* emmc storage */ 488&sd_emmc_c { 489 status = "okay"; 490 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; 491 pinctrl-1 = <&emmc_clk_gate_pins>; 492 pinctrl-names = "default", "clk-gate"; 493 494 bus-width = <8>; 495 cap-mmc-highspeed; 496 max-frequency = <200000000>; 497 non-removable; 498 disable-wp; 499 mmc-ddr-1_8v; 500 mmc-hs200-1_8v; 501 502 mmc-pwrseq = <&emmc_pwrseq>; 503 504 vmmc-supply = <&vcc_3v3>; 505 vqmmc-supply = <&vddio_boot>; 506}; 507 508&spdifin { 509 pinctrl-0 = <&spdif_in_a19_pins>; 510 pinctrl-names = "default"; 511 status = "okay"; 512}; 513 514&spdifout { 515 pinctrl-0 = <&spdif_out_a20_pins>; 516 pinctrl-names = "default"; 517 status = "okay"; 518}; 519 520&tdmif_a { 521 pinctrl-0 = <&tdma_sclk_pins>, <&tdma_fs_pins>, 522 <&tdma_din0_pins>, <&tdma_dout0_x15_pins>; 523 pinctrl-names = "default"; 524 status = "okay"; 525}; 526 527&tdmif_b { 528 pinctrl-0 = <&tdmb_sclk_pins>, <&tdmb_fs_pins>, 529 <&tdmb_din3_pins>, <&mclk_b_pins>; 530 pinctrl-names = "default"; 531 status = "okay"; 532}; 533 534&tdmif_c { 535 pinctrl-0 = <&tdmc_sclk_pins>, <&tdmc_fs_pins>, 536 <&tdmc_din1_pins>, <&tdmc_dout2_pins>, 537 <&mclk_c_pins>; 538 pinctrl-names = "default"; 539 status = "okay"; 540}; 541 542&tdmin_a { 543 status = "okay"; 544}; 545 546&tdmin_b { 547 status = "okay"; 548}; 549 550&tdmin_c { 551 status = "okay"; 552}; 553 554&tdmin_lb { 555 status = "okay"; 556}; 557 558&tdmout_c { 559 status = "okay"; 560}; 561 562&toddr_a { 563 status = "okay"; 564}; 565 566&toddr_b { 567 status = "okay"; 568}; 569 570&toddr_c { 571 status = "okay"; 572}; 573 574&uart_A { 575 status = "okay"; 576 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 577 pinctrl-names = "default"; 578 uart-has-rtscts; 579 580 bluetooth { 581 compatible = "brcm,bcm43438-bt"; 582 shutdown-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>; 583 }; 584}; 585 586&uart_AO { 587 status = "okay"; 588 pinctrl-0 = <&uart_ao_a_pins>; 589 pinctrl-names = "default"; 590}; 591 592&usb { 593 status = "okay"; 594 dr_mode = "otg"; 595 vbus-supply = <&usb_pwr>; 596}; 597