1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2019 BayLibre SAS. All rights reserved. 4 */ 5 6/dts-v1/; 7 8#include "meson-sm1.dtsi" 9#include <dt-bindings/gpio/gpio.h> 10#include <dt-bindings/input/input.h> 11#include <dt-bindings/gpio/meson-g12a-gpio.h> 12#include <dt-bindings/sound/meson-g12a-tohdmitx.h> 13 14/ { 15 compatible = "seirobotics,sei610", "amlogic,sm1"; 16 model = "SEI Robotics SEI610"; 17 18 aliases { 19 serial0 = &uart_AO; 20 ethernet0 = ðmac; 21 }; 22 23 mono_dac: audio-codec-0 { 24 compatible = "maxim,max98357a"; 25 #sound-dai-cells = <0>; 26 sound-name-prefix = "U16"; 27 sdmode-gpios = <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>; 28 }; 29 30 dmics: audio-codec-1 { 31 #sound-dai-cells = <0>; 32 compatible = "dmic-codec"; 33 num-channels = <2>; 34 wakeup-delay-ms = <50>; 35 status = "okay"; 36 sound-name-prefix = "MIC"; 37 }; 38 39 chosen { 40 stdout-path = "serial0:115200n8"; 41 }; 42 43 emmc_pwrseq: emmc-pwrseq { 44 compatible = "mmc-pwrseq-emmc"; 45 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>; 46 }; 47 48 gpio-keys { 49 compatible = "gpio-keys"; 50 51 key-1 { 52 label = "A"; 53 linux,code = <BTN_0>; 54 gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>; 55 interrupt-parent = <&gpio_intc>; 56 interrupts = <IRQID_GPIOH_6 IRQ_TYPE_EDGE_BOTH>; 57 }; 58 59 key-2 { 60 label = "B"; 61 linux,code = <BTN_1>; 62 gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>; 63 interrupt-parent = <&gpio_intc>; 64 interrupts = <IRQID_GPIOH_7 IRQ_TYPE_EDGE_BOTH>; 65 }; 66 67 key-3 { 68 label = "C"; 69 linux,code = <BTN_2>; 70 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; 71 interrupt-parent = <&gpio_intc>; 72 interrupts = <IRQID_GPIOAO_2 IRQ_TYPE_EDGE_BOTH>; 73 }; 74 75 key-mic-mute { 76 label = "MicMute"; 77 linux,code = <SW_MUTE_DEVICE>; 78 linux,input-type = <EV_SW>; 79 gpios = <&gpio_ao GPIOE_2 GPIO_ACTIVE_LOW>; 80 interrupt-parent = <&gpio_intc>; 81 interrupts = <IRQID_GPIOE_2 IRQ_TYPE_EDGE_BOTH>; 82 }; 83 84 key-power { 85 label = "PowerKey"; 86 linux,code = <KEY_POWER>; 87 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; 88 interrupt-parent = <&gpio_intc>; 89 interrupts = <IRQID_GPIOAO_3 IRQ_TYPE_EDGE_BOTH>; 90 }; 91 }; 92 93 hdmi-connector { 94 compatible = "hdmi-connector"; 95 type = "a"; 96 97 port { 98 hdmi_connector_in: endpoint { 99 remote-endpoint = <&hdmi_tx_tmds_out>; 100 }; 101 }; 102 }; 103 104 led-controller-1 { 105 compatible = "gpio-leds"; 106 107 led-1 { 108 label = "sei610:blue:bt"; 109 gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>; 110 default-state = "off"; 111 }; 112 }; 113 114 led-controller-2 { 115 compatible = "pwm-leds"; 116 117 led-2 { 118 label = "sei610:red:power"; 119 pwms = <&pwm_AO_ab 0 30518 0>; 120 max-brightness = <255>; 121 linux,default-trigger = "default-on"; 122 active-low; 123 }; 124 }; 125 126 memory@0 { 127 device_type = "memory"; 128 reg = <0x0 0x0 0x0 0x40000000>; 129 }; 130 131 ao_5v: regulator-ao_5v { 132 compatible = "regulator-fixed"; 133 regulator-name = "AO_5V"; 134 regulator-min-microvolt = <5000000>; 135 regulator-max-microvolt = <5000000>; 136 vin-supply = <&dc_in>; 137 regulator-always-on; 138 }; 139 140 dc_in: regulator-dc_in { 141 compatible = "regulator-fixed"; 142 regulator-name = "DC_IN"; 143 regulator-min-microvolt = <5000000>; 144 regulator-max-microvolt = <5000000>; 145 regulator-always-on; 146 }; 147 148 emmc_1v8: regulator-emmc_1v8 { 149 compatible = "regulator-fixed"; 150 regulator-name = "EMMC_1V8"; 151 regulator-min-microvolt = <1800000>; 152 regulator-max-microvolt = <1800000>; 153 vin-supply = <&vddao_3v3>; 154 regulator-always-on; 155 }; 156 157 vddao_3v3: regulator-vddao_3v3 { 158 compatible = "regulator-fixed"; 159 regulator-name = "VDDAO_3V3"; 160 regulator-min-microvolt = <3300000>; 161 regulator-max-microvolt = <3300000>; 162 vin-supply = <&dc_in>; 163 regulator-always-on; 164 }; 165 166 /* Used by Tuner, RGB Led & IR Emitter LED array */ 167 vddao_3v3_t: regulator-vddao_3v3_t { 168 compatible = "regulator-fixed"; 169 regulator-name = "VDDAO_3V3_T"; 170 regulator-min-microvolt = <3300000>; 171 regulator-max-microvolt = <3300000>; 172 vin-supply = <&vddao_3v3>; 173 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>; 174 regulator-always-on; 175 }; 176 177 vddcpu: regulator-vddcpu { 178 /* 179 * SY8120B1ABC DC/DC Regulator. 180 */ 181 compatible = "pwm-regulator"; 182 183 regulator-name = "VDDCPU"; 184 regulator-min-microvolt = <690000>; 185 regulator-max-microvolt = <1050000>; 186 187 pwm-supply = <&dc_in>; 188 189 pwms = <&pwm_AO_cd 1 1500 0>; 190 pwm-dutycycle-range = <100 0>; 191 192 regulator-boot-on; 193 regulator-always-on; 194 }; 195 196 vddio_ao1v8: regulator-vddio_ao1v8 { 197 compatible = "regulator-fixed"; 198 regulator-name = "VDDIO_AO1V8"; 199 regulator-min-microvolt = <1800000>; 200 regulator-max-microvolt = <1800000>; 201 vin-supply = <&vddao_3v3>; 202 regulator-always-on; 203 }; 204 205 sdio_pwrseq: sdio-pwrseq { 206 compatible = "mmc-pwrseq-simple"; 207 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; 208 clocks = <&wifi32k>; 209 clock-names = "ext_clock"; 210 }; 211 212 sound { 213 compatible = "amlogic,axg-sound-card"; 214 model = "SEI610"; 215 audio-aux-devs = <&tdmout_a>, <&tdmout_b>, 216 <&tdmin_a>, <&tdmin_b>; 217 audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0", 218 "TDMOUT_A IN 1", "FRDDR_B OUT 0", 219 "TDMOUT_A IN 2", "FRDDR_C OUT 0", 220 "TDM_A Playback", "TDMOUT_A OUT", 221 "TDMOUT_B IN 0", "FRDDR_A OUT 1", 222 "TDMOUT_B IN 1", "FRDDR_B OUT 1", 223 "TDMOUT_B IN 2", "FRDDR_C OUT 1", 224 "TDM_B Playback", "TDMOUT_B OUT", 225 "TODDR_A IN 4", "PDM Capture", 226 "TODDR_B IN 4", "PDM Capture", 227 "TODDR_C IN 4", "PDM Capture", 228 "TDMIN_A IN 0", "TDM_A Capture", 229 "TDMIN_A IN 3", "TDM_A Loopback", 230 "TDMIN_B IN 0", "TDM_A Capture", 231 "TDMIN_B IN 3", "TDM_A Loopback", 232 "TDMIN_A IN 1", "TDM_B Capture", 233 "TDMIN_A IN 4", "TDM_B Loopback", 234 "TDMIN_B IN 1", "TDM_B Capture", 235 "TDMIN_B IN 4", "TDM_B Loopback", 236 "TODDR_A IN 0", "TDMIN_A OUT", 237 "TODDR_B IN 0", "TDMIN_A OUT", 238 "TODDR_C IN 0", "TDMIN_A OUT", 239 "TODDR_A IN 1", "TDMIN_B OUT", 240 "TODDR_B IN 1", "TDMIN_B OUT", 241 "TODDR_C IN 1", "TDMIN_B OUT"; 242 243 assigned-clocks = <&clkc CLKID_MPLL2>, 244 <&clkc CLKID_MPLL0>, 245 <&clkc CLKID_MPLL1>; 246 assigned-clock-parents = <0>, <0>, <0>; 247 assigned-clock-rates = <294912000>, 248 <270950400>, 249 <393216000>; 250 251 dai-link-0 { 252 sound-dai = <&frddr_a>; 253 }; 254 255 dai-link-1 { 256 sound-dai = <&frddr_b>; 257 }; 258 259 dai-link-2 { 260 sound-dai = <&frddr_c>; 261 }; 262 263 dai-link-3 { 264 sound-dai = <&toddr_a>; 265 }; 266 267 dai-link-4 { 268 sound-dai = <&toddr_b>; 269 }; 270 271 dai-link-5 { 272 sound-dai = <&toddr_c>; 273 }; 274 275 /* internal speaker interface */ 276 dai-link-6 { 277 sound-dai = <&tdmif_a>; 278 dai-format = "i2s"; 279 dai-tdm-slot-tx-mask-0 = <1 1>; 280 mclk-fs = <256>; 281 282 codec-0 { 283 sound-dai = <&mono_dac>; 284 }; 285 286 codec-1 { 287 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>; 288 }; 289 }; 290 291 /* 8ch hdmi interface */ 292 dai-link-7 { 293 sound-dai = <&tdmif_b>; 294 dai-format = "i2s"; 295 dai-tdm-slot-tx-mask-0 = <1 1>; 296 dai-tdm-slot-tx-mask-1 = <1 1>; 297 dai-tdm-slot-tx-mask-2 = <1 1>; 298 dai-tdm-slot-tx-mask-3 = <1 1>; 299 mclk-fs = <256>; 300 301 codec { 302 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; 303 }; 304 }; 305 306 /* internal digital mics */ 307 dai-link-8 { 308 sound-dai = <&pdm>; 309 310 codec { 311 sound-dai = <&dmics>; 312 }; 313 }; 314 315 /* hdmi glue */ 316 dai-link-9 { 317 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; 318 319 codec { 320 sound-dai = <&hdmi_tx>; 321 }; 322 }; 323 }; 324 325 wifi32k: wifi32k { 326 compatible = "pwm-clock"; 327 #clock-cells = <0>; 328 clock-frequency = <32768>; 329 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */ 330 }; 331}; 332 333&arb { 334 status = "okay"; 335}; 336 337&cec_AO { 338 pinctrl-0 = <&cec_ao_a_h_pins>; 339 pinctrl-names = "default"; 340 status = "disabled"; 341 hdmi-phandle = <&hdmi_tx>; 342}; 343 344&cecb_AO { 345 pinctrl-0 = <&cec_ao_b_h_pins>; 346 pinctrl-names = "default"; 347 status = "okay"; 348 hdmi-phandle = <&hdmi_tx>; 349}; 350 351&clkc_audio { 352 status = "okay"; 353}; 354 355&cpu0 { 356 cpu-supply = <&vddcpu>; 357 operating-points-v2 = <&cpu_opp_table>; 358 clocks = <&clkc CLKID_CPU_CLK>; 359 clock-latency = <50000>; 360}; 361 362&cpu1 { 363 cpu-supply = <&vddcpu>; 364 operating-points-v2 = <&cpu_opp_table>; 365 clocks = <&clkc CLKID_CPU1_CLK>; 366 clock-latency = <50000>; 367}; 368 369&cpu2 { 370 cpu-supply = <&vddcpu>; 371 operating-points-v2 = <&cpu_opp_table>; 372 clocks = <&clkc CLKID_CPU2_CLK>; 373 clock-latency = <50000>; 374}; 375 376&cpu3 { 377 cpu-supply = <&vddcpu>; 378 operating-points-v2 = <&cpu_opp_table>; 379 clocks = <&clkc CLKID_CPU3_CLK>; 380 clock-latency = <50000>; 381}; 382 383ðmac { 384 status = "okay"; 385 phy-handle = <&internal_ephy>; 386 phy-mode = "rmii"; 387}; 388 389&frddr_a { 390 status = "okay"; 391}; 392 393&frddr_b { 394 status = "okay"; 395}; 396 397&frddr_c { 398 status = "okay"; 399}; 400 401&hdmi_tx { 402 status = "okay"; 403 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>; 404 pinctrl-names = "default"; 405}; 406 407&hdmi_tx_tmds_port { 408 hdmi_tx_tmds_out: endpoint { 409 remote-endpoint = <&hdmi_connector_in>; 410 }; 411}; 412 413&i2c3 { 414 status = "okay"; 415 pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>; 416 pinctrl-names = "default"; 417}; 418 419&ir { 420 status = "okay"; 421 pinctrl-0 = <&remote_input_ao_pins>; 422 pinctrl-names = "default"; 423}; 424 425&pdm { 426 pinctrl-0 = <&pdm_din0_z_pins>, <&pdm_dclk_z_pins>; 427 pinctrl-names = "default"; 428 status = "okay"; 429}; 430 431&pwm_AO_ab { 432 status = "okay"; 433 pinctrl-0 = <&pwm_ao_a_pins>; 434 pinctrl-names = "default"; 435 clocks = <&xtal>; 436 clock-names = "clkin0"; 437}; 438 439&pwm_AO_cd { 440 pinctrl-0 = <&pwm_ao_d_e_pins>; 441 pinctrl-names = "default"; 442 clocks = <&xtal>; 443 clock-names = "clkin1"; 444 status = "okay"; 445}; 446 447&pwm_ef { 448 status = "okay"; 449 pinctrl-0 = <&pwm_e_pins>; 450 pinctrl-names = "default"; 451 clocks = <&xtal>; 452 clock-names = "clkin0"; 453}; 454 455&saradc { 456 status = "okay"; 457 vref-supply = <&vddio_ao1v8>; 458}; 459 460/* SDIO */ 461&sd_emmc_a { 462 status = "okay"; 463 pinctrl-0 = <&sdio_pins>; 464 pinctrl-1 = <&sdio_clk_gate_pins>; 465 pinctrl-names = "default", "clk-gate"; 466 #address-cells = <1>; 467 #size-cells = <0>; 468 469 bus-width = <4>; 470 cap-sd-highspeed; 471 sd-uhs-sdr50; 472 max-frequency = <100000000>; 473 474 non-removable; 475 disable-wp; 476 477 /* WiFi firmware requires power to be kept while in suspend */ 478 keep-power-in-suspend; 479 480 mmc-pwrseq = <&sdio_pwrseq>; 481 482 vmmc-supply = <&vddao_3v3>; 483 vqmmc-supply = <&vddio_ao1v8>; 484 485 brcmf: wifi@1 { 486 reg = <1>; 487 compatible = "brcm,bcm4329-fmac"; 488 }; 489}; 490 491/* SD card */ 492&sd_emmc_b { 493 status = "okay"; 494 pinctrl-0 = <&sdcard_c_pins>; 495 pinctrl-1 = <&sdcard_clk_gate_c_pins>; 496 pinctrl-names = "default", "clk-gate"; 497 498 bus-width = <4>; 499 cap-sd-highspeed; 500 max-frequency = <50000000>; 501 disable-wp; 502 503 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>; 504 vmmc-supply = <&vddao_3v3>; 505 vqmmc-supply = <&vddao_3v3>; 506}; 507 508/* eMMC */ 509&sd_emmc_c { 510 status = "okay"; 511 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>; 512 pinctrl-1 = <&emmc_clk_gate_pins>; 513 pinctrl-names = "default", "clk-gate"; 514 515 bus-width = <8>; 516 cap-mmc-highspeed; 517 mmc-ddr-1_8v; 518 mmc-hs200-1_8v; 519 max-frequency = <200000000>; 520 non-removable; 521 disable-wp; 522 523 mmc-pwrseq = <&emmc_pwrseq>; 524 vmmc-supply = <&vddao_3v3>; 525 vqmmc-supply = <&emmc_1v8>; 526}; 527 528&tdmif_a { 529 pinctrl-0 = <&tdm_a_dout0_pins>, <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>; 530 pinctrl-names = "default"; 531 status = "okay"; 532 533 assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD0>, 534 <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD0>; 535 assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_A_SCLK>, 536 <&clkc_audio AUD_CLKID_MST_A_LRCLK>; 537 assigned-clock-rates = <0>, <0>; 538}; 539 540&tdmif_b { 541 status = "okay"; 542}; 543 544&tdmin_a { 545 status = "okay"; 546}; 547 548&tdmin_b { 549 status = "okay"; 550}; 551 552&tdmout_a { 553 status = "okay"; 554}; 555 556&tdmout_b { 557 status = "okay"; 558}; 559 560&toddr_a { 561 status = "okay"; 562}; 563 564&toddr_b { 565 status = "okay"; 566}; 567 568&toddr_c { 569 status = "okay"; 570}; 571 572&tohdmitx { 573 status = "okay"; 574}; 575 576&uart_A { 577 status = "okay"; 578 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; 579 pinctrl-names = "default"; 580 uart-has-rtscts; 581 582 bluetooth { 583 compatible = "brcm,bcm43438-bt"; 584 interrupt-parent = <&gpio_intc>; 585 interrupts = <IRQID_GPIOX_18 IRQ_TYPE_LEVEL_HIGH>; 586 interrupt-names = "host-wakeup"; 587 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; 588 max-speed = <2000000>; 589 clocks = <&wifi32k>; 590 clock-names = "lpo"; 591 vbat-supply = <&vddao_3v3>; 592 vddio-supply = <&vddio_ao1v8>; 593 }; 594}; 595 596/* Exposed via the on-board USB to Serial FT232RL IC */ 597&uart_AO { 598 status = "okay"; 599 pinctrl-0 = <&uart_ao_a_pins>; 600 pinctrl-names = "default"; 601}; 602 603&usb { 604 status = "okay"; 605 dr_mode = "otg"; 606}; 607