0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2019 BayLibre SAS. All rights reserved.
0004 */
0005
0006 /dts-v1/;
0007
0008 #include "meson-sm1.dtsi"
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include <dt-bindings/input/input.h>
0011 #include <dt-bindings/gpio/meson-g12a-gpio.h>
0012 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
0013
0014 / {
0015 compatible = "seirobotics,sei610", "amlogic,sm1";
0016 model = "SEI Robotics SEI610";
0017
0018 aliases {
0019 serial0 = &uart_AO;
0020 ethernet0 = ðmac;
0021 };
0022
0023 mono_dac: audio-codec-0 {
0024 compatible = "maxim,max98357a";
0025 #sound-dai-cells = <0>;
0026 sound-name-prefix = "U16";
0027 sdmode-gpios = <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>;
0028 };
0029
0030 dmics: audio-codec-1 {
0031 #sound-dai-cells = <0>;
0032 compatible = "dmic-codec";
0033 num-channels = <2>;
0034 wakeup-delay-ms = <50>;
0035 status = "okay";
0036 sound-name-prefix = "MIC";
0037 };
0038
0039 chosen {
0040 stdout-path = "serial0:115200n8";
0041 };
0042
0043 emmc_pwrseq: emmc-pwrseq {
0044 compatible = "mmc-pwrseq-emmc";
0045 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
0046 };
0047
0048 gpio-keys {
0049 compatible = "gpio-keys";
0050
0051 key-1 {
0052 label = "A";
0053 linux,code = <BTN_0>;
0054 gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
0055 interrupt-parent = <&gpio_intc>;
0056 interrupts = <34 IRQ_TYPE_EDGE_BOTH>;
0057 };
0058
0059 key-2 {
0060 label = "B";
0061 linux,code = <BTN_1>;
0062 gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
0063 interrupt-parent = <&gpio_intc>;
0064 interrupts = <35 IRQ_TYPE_EDGE_BOTH>;
0065 };
0066
0067 key-3 {
0068 label = "C";
0069 linux,code = <BTN_2>;
0070 gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
0071 interrupt-parent = <&gpio_intc>;
0072 interrupts = <2 IRQ_TYPE_EDGE_BOTH>;
0073 };
0074
0075 key-mic-mute {
0076 label = "MicMute";
0077 linux,code = <SW_MUTE_DEVICE>;
0078 linux,input-type = <EV_SW>;
0079 gpios = <&gpio_ao GPIOE_2 GPIO_ACTIVE_LOW>;
0080 interrupt-parent = <&gpio_intc>;
0081 interrupts = <99 IRQ_TYPE_EDGE_BOTH>;
0082 };
0083
0084 key-power {
0085 label = "PowerKey";
0086 linux,code = <KEY_POWER>;
0087 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
0088 interrupt-parent = <&gpio_intc>;
0089 interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
0090 };
0091 };
0092
0093 hdmi-connector {
0094 compatible = "hdmi-connector";
0095 type = "a";
0096
0097 port {
0098 hdmi_connector_in: endpoint {
0099 remote-endpoint = <&hdmi_tx_tmds_out>;
0100 };
0101 };
0102 };
0103
0104 led-controller-1 {
0105 compatible = "gpio-leds";
0106
0107 led-1 {
0108 label = "sei610:blue:bt";
0109 gpios = <&gpio GPIOC_7 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
0110 default-state = "off";
0111 };
0112 };
0113
0114 led-controller-2 {
0115 compatible = "pwm-leds";
0116
0117 led-2 {
0118 label = "sei610:red:power";
0119 pwms = <&pwm_AO_ab 0 30518 0>;
0120 max-brightness = <255>;
0121 linux,default-trigger = "default-on";
0122 active-low;
0123 };
0124 };
0125
0126 memory@0 {
0127 device_type = "memory";
0128 reg = <0x0 0x0 0x0 0x40000000>;
0129 };
0130
0131 ao_5v: regulator-ao_5v {
0132 compatible = "regulator-fixed";
0133 regulator-name = "AO_5V";
0134 regulator-min-microvolt = <5000000>;
0135 regulator-max-microvolt = <5000000>;
0136 vin-supply = <&dc_in>;
0137 regulator-always-on;
0138 };
0139
0140 dc_in: regulator-dc_in {
0141 compatible = "regulator-fixed";
0142 regulator-name = "DC_IN";
0143 regulator-min-microvolt = <5000000>;
0144 regulator-max-microvolt = <5000000>;
0145 regulator-always-on;
0146 };
0147
0148 emmc_1v8: regulator-emmc_1v8 {
0149 compatible = "regulator-fixed";
0150 regulator-name = "EMMC_1V8";
0151 regulator-min-microvolt = <1800000>;
0152 regulator-max-microvolt = <1800000>;
0153 vin-supply = <&vddao_3v3>;
0154 regulator-always-on;
0155 };
0156
0157 vddao_3v3: regulator-vddao_3v3 {
0158 compatible = "regulator-fixed";
0159 regulator-name = "VDDAO_3V3";
0160 regulator-min-microvolt = <3300000>;
0161 regulator-max-microvolt = <3300000>;
0162 vin-supply = <&dc_in>;
0163 regulator-always-on;
0164 };
0165
0166 /* Used by Tuner, RGB Led & IR Emitter LED array */
0167 vddao_3v3_t: regulator-vddao_3v3_t {
0168 compatible = "regulator-fixed";
0169 regulator-name = "VDDAO_3V3_T";
0170 regulator-min-microvolt = <3300000>;
0171 regulator-max-microvolt = <3300000>;
0172 vin-supply = <&vddao_3v3>;
0173 gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
0174 enable-active-low;
0175 regulator-always-on;
0176 };
0177
0178 vddcpu: regulator-vddcpu {
0179 /*
0180 * SY8120B1ABC DC/DC Regulator.
0181 */
0182 compatible = "pwm-regulator";
0183
0184 regulator-name = "VDDCPU";
0185 regulator-min-microvolt = <690000>;
0186 regulator-max-microvolt = <1050000>;
0187
0188 pwm-supply = <&dc_in>;
0189
0190 pwms = <&pwm_AO_cd 1 1500 0>;
0191 pwm-dutycycle-range = <100 0>;
0192
0193 regulator-boot-on;
0194 regulator-always-on;
0195 };
0196
0197 vddio_ao1v8: regulator-vddio_ao1v8 {
0198 compatible = "regulator-fixed";
0199 regulator-name = "VDDIO_AO1V8";
0200 regulator-min-microvolt = <1800000>;
0201 regulator-max-microvolt = <1800000>;
0202 vin-supply = <&vddao_3v3>;
0203 regulator-always-on;
0204 };
0205
0206 sdio_pwrseq: sdio-pwrseq {
0207 compatible = "mmc-pwrseq-simple";
0208 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
0209 clocks = <&wifi32k>;
0210 clock-names = "ext_clock";
0211 };
0212
0213 sound {
0214 compatible = "amlogic,axg-sound-card";
0215 model = "SEI610";
0216 audio-aux-devs = <&tdmout_a>, <&tdmout_b>,
0217 <&tdmin_a>, <&tdmin_b>;
0218 audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
0219 "TDMOUT_A IN 1", "FRDDR_B OUT 0",
0220 "TDMOUT_A IN 2", "FRDDR_C OUT 0",
0221 "TDM_A Playback", "TDMOUT_A OUT",
0222 "TDMOUT_B IN 0", "FRDDR_A OUT 1",
0223 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
0224 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
0225 "TDM_B Playback", "TDMOUT_B OUT",
0226 "TODDR_A IN 4", "PDM Capture",
0227 "TODDR_B IN 4", "PDM Capture",
0228 "TODDR_C IN 4", "PDM Capture",
0229 "TDMIN_A IN 0", "TDM_A Capture",
0230 "TDMIN_A IN 3", "TDM_A Loopback",
0231 "TDMIN_B IN 0", "TDM_A Capture",
0232 "TDMIN_B IN 3", "TDM_A Loopback",
0233 "TDMIN_A IN 1", "TDM_B Capture",
0234 "TDMIN_A IN 4", "TDM_B Loopback",
0235 "TDMIN_B IN 1", "TDM_B Capture",
0236 "TDMIN_B IN 4", "TDM_B Loopback",
0237 "TODDR_A IN 0", "TDMIN_A OUT",
0238 "TODDR_B IN 0", "TDMIN_A OUT",
0239 "TODDR_C IN 0", "TDMIN_A OUT",
0240 "TODDR_A IN 1", "TDMIN_B OUT",
0241 "TODDR_B IN 1", "TDMIN_B OUT",
0242 "TODDR_C IN 1", "TDMIN_B OUT";
0243
0244 assigned-clocks = <&clkc CLKID_MPLL2>,
0245 <&clkc CLKID_MPLL0>,
0246 <&clkc CLKID_MPLL1>;
0247 assigned-clock-parents = <0>, <0>, <0>;
0248 assigned-clock-rates = <294912000>,
0249 <270950400>,
0250 <393216000>;
0251 status = "okay";
0252
0253 dai-link-0 {
0254 sound-dai = <&frddr_a>;
0255 };
0256
0257 dai-link-1 {
0258 sound-dai = <&frddr_b>;
0259 };
0260
0261 dai-link-2 {
0262 sound-dai = <&frddr_c>;
0263 };
0264
0265 dai-link-3 {
0266 sound-dai = <&toddr_a>;
0267 };
0268
0269 dai-link-4 {
0270 sound-dai = <&toddr_b>;
0271 };
0272
0273 dai-link-5 {
0274 sound-dai = <&toddr_c>;
0275 };
0276
0277 /* internal speaker interface */
0278 dai-link-6 {
0279 sound-dai = <&tdmif_a>;
0280 dai-format = "i2s";
0281 dai-tdm-slot-tx-mask-0 = <1 1>;
0282 mclk-fs = <256>;
0283
0284 codec-0 {
0285 sound-dai = <&mono_dac>;
0286 };
0287
0288 codec-1 {
0289 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
0290 };
0291 };
0292
0293 /* 8ch hdmi interface */
0294 dai-link-7 {
0295 sound-dai = <&tdmif_b>;
0296 dai-format = "i2s";
0297 dai-tdm-slot-tx-mask-0 = <1 1>;
0298 dai-tdm-slot-tx-mask-1 = <1 1>;
0299 dai-tdm-slot-tx-mask-2 = <1 1>;
0300 dai-tdm-slot-tx-mask-3 = <1 1>;
0301 mclk-fs = <256>;
0302
0303 codec {
0304 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
0305 };
0306 };
0307
0308 /* internal digital mics */
0309 dai-link-8 {
0310 sound-dai = <&pdm>;
0311
0312 codec {
0313 sound-dai = <&dmics>;
0314 };
0315 };
0316
0317 /* hdmi glue */
0318 dai-link-9 {
0319 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
0320
0321 codec {
0322 sound-dai = <&hdmi_tx>;
0323 };
0324 };
0325 };
0326
0327 wifi32k: wifi32k {
0328 compatible = "pwm-clock";
0329 #clock-cells = <0>;
0330 clock-frequency = <32768>;
0331 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
0332 };
0333 };
0334
0335 &arb {
0336 status = "okay";
0337 };
0338
0339 &cec_AO {
0340 pinctrl-0 = <&cec_ao_a_h_pins>;
0341 pinctrl-names = "default";
0342 status = "disabled";
0343 hdmi-phandle = <&hdmi_tx>;
0344 };
0345
0346 &cecb_AO {
0347 pinctrl-0 = <&cec_ao_b_h_pins>;
0348 pinctrl-names = "default";
0349 status = "okay";
0350 hdmi-phandle = <&hdmi_tx>;
0351 };
0352
0353 &clkc_audio {
0354 status = "okay";
0355 };
0356
0357 &cpu0 {
0358 cpu-supply = <&vddcpu>;
0359 operating-points-v2 = <&cpu_opp_table>;
0360 clocks = <&clkc CLKID_CPU_CLK>;
0361 clock-latency = <50000>;
0362 };
0363
0364 &cpu1 {
0365 cpu-supply = <&vddcpu>;
0366 operating-points-v2 = <&cpu_opp_table>;
0367 clocks = <&clkc CLKID_CPU1_CLK>;
0368 clock-latency = <50000>;
0369 };
0370
0371 &cpu2 {
0372 cpu-supply = <&vddcpu>;
0373 operating-points-v2 = <&cpu_opp_table>;
0374 clocks = <&clkc CLKID_CPU2_CLK>;
0375 clock-latency = <50000>;
0376 };
0377
0378 &cpu3 {
0379 cpu-supply = <&vddcpu>;
0380 operating-points-v2 = <&cpu_opp_table>;
0381 clocks = <&clkc CLKID_CPU3_CLK>;
0382 clock-latency = <50000>;
0383 };
0384
0385 ðmac {
0386 status = "okay";
0387 phy-handle = <&internal_ephy>;
0388 phy-mode = "rmii";
0389 };
0390
0391 &frddr_a {
0392 status = "okay";
0393 };
0394
0395 &frddr_b {
0396 status = "okay";
0397 };
0398
0399 &frddr_c {
0400 status = "okay";
0401 };
0402
0403 &hdmi_tx {
0404 status = "okay";
0405 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
0406 pinctrl-names = "default";
0407 };
0408
0409 &hdmi_tx_tmds_port {
0410 hdmi_tx_tmds_out: endpoint {
0411 remote-endpoint = <&hdmi_connector_in>;
0412 };
0413 };
0414
0415 &i2c3 {
0416 status = "okay";
0417 pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
0418 pinctrl-names = "default";
0419 };
0420
0421 &ir {
0422 status = "okay";
0423 pinctrl-0 = <&remote_input_ao_pins>;
0424 pinctrl-names = "default";
0425 };
0426
0427 &pdm {
0428 pinctrl-0 = <&pdm_din0_z_pins>, <&pdm_dclk_z_pins>;
0429 pinctrl-names = "default";
0430 status = "okay";
0431 };
0432
0433 &pwm_AO_ab {
0434 status = "okay";
0435 pinctrl-0 = <&pwm_ao_a_pins>;
0436 pinctrl-names = "default";
0437 clocks = <&xtal>;
0438 clock-names = "clkin0";
0439 };
0440
0441 &pwm_AO_cd {
0442 pinctrl-0 = <&pwm_ao_d_e_pins>;
0443 pinctrl-names = "default";
0444 clocks = <&xtal>;
0445 clock-names = "clkin1";
0446 status = "okay";
0447 };
0448
0449 &pwm_ef {
0450 status = "okay";
0451 pinctrl-0 = <&pwm_e_pins>;
0452 pinctrl-names = "default";
0453 clocks = <&xtal>;
0454 clock-names = "clkin0";
0455 };
0456
0457 &saradc {
0458 status = "okay";
0459 vref-supply = <&vddio_ao1v8>;
0460 };
0461
0462 /* SDIO */
0463 &sd_emmc_a {
0464 status = "okay";
0465 pinctrl-0 = <&sdio_pins>;
0466 pinctrl-1 = <&sdio_clk_gate_pins>;
0467 pinctrl-names = "default", "clk-gate";
0468 #address-cells = <1>;
0469 #size-cells = <0>;
0470
0471 bus-width = <4>;
0472 cap-sd-highspeed;
0473 sd-uhs-sdr50;
0474 max-frequency = <100000000>;
0475
0476 non-removable;
0477 disable-wp;
0478
0479 /* WiFi firmware requires power to be kept while in suspend */
0480 keep-power-in-suspend;
0481
0482 mmc-pwrseq = <&sdio_pwrseq>;
0483
0484 vmmc-supply = <&vddao_3v3>;
0485 vqmmc-supply = <&vddio_ao1v8>;
0486
0487 brcmf: wifi@1 {
0488 reg = <1>;
0489 compatible = "brcm,bcm4329-fmac";
0490 };
0491 };
0492
0493 /* SD card */
0494 &sd_emmc_b {
0495 status = "okay";
0496 pinctrl-0 = <&sdcard_c_pins>;
0497 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
0498 pinctrl-names = "default", "clk-gate";
0499
0500 bus-width = <4>;
0501 cap-sd-highspeed;
0502 max-frequency = <50000000>;
0503 disable-wp;
0504
0505 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
0506 vmmc-supply = <&vddao_3v3>;
0507 vqmmc-supply = <&vddao_3v3>;
0508 };
0509
0510 /* eMMC */
0511 &sd_emmc_c {
0512 status = "okay";
0513 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
0514 pinctrl-1 = <&emmc_clk_gate_pins>;
0515 pinctrl-names = "default", "clk-gate";
0516
0517 bus-width = <8>;
0518 cap-mmc-highspeed;
0519 mmc-ddr-1_8v;
0520 mmc-hs200-1_8v;
0521 max-frequency = <200000000>;
0522 non-removable;
0523 disable-wp;
0524
0525 mmc-pwrseq = <&emmc_pwrseq>;
0526 vmmc-supply = <&vddao_3v3>;
0527 vqmmc-supply = <&emmc_1v8>;
0528 };
0529
0530 &tdmif_a {
0531 pinctrl-0 = <&tdm_a_dout0_pins>, <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>;
0532 pinctrl-names = "default";
0533 status = "okay";
0534
0535 assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD0>,
0536 <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD0>;
0537 assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
0538 <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
0539 assigned-clock-rates = <0>, <0>;
0540 };
0541
0542 &tdmif_b {
0543 status = "okay";
0544 };
0545
0546 &tdmin_a {
0547 status = "okay";
0548 };
0549
0550 &tdmin_b {
0551 status = "okay";
0552 };
0553
0554 &tdmout_a {
0555 status = "okay";
0556 };
0557
0558 &tdmout_b {
0559 status = "okay";
0560 };
0561
0562 &toddr_a {
0563 status = "okay";
0564 };
0565
0566 &toddr_b {
0567 status = "okay";
0568 };
0569
0570 &toddr_c {
0571 status = "okay";
0572 };
0573
0574 &tohdmitx {
0575 status = "okay";
0576 };
0577
0578 &uart_A {
0579 status = "okay";
0580 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
0581 pinctrl-names = "default";
0582 uart-has-rtscts;
0583
0584 bluetooth {
0585 compatible = "brcm,bcm43438-bt";
0586 interrupt-parent = <&gpio_intc>;
0587 interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
0588 interrupt-names = "host-wakeup";
0589 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
0590 max-speed = <2000000>;
0591 clocks = <&wifi32k>;
0592 clock-names = "lpo";
0593 vbat-supply = <&vddao_3v3>;
0594 vddio-supply = <&vddio_ao1v8>;
0595 };
0596 };
0597
0598 /* Exposed via the on-board USB to Serial FT232RL IC */
0599 &uart_AO {
0600 status = "okay";
0601 pinctrl-0 = <&uart_ao_a_pins>;
0602 pinctrl-names = "default";
0603 };
0604
0605 &usb {
0606 status = "okay";
0607 dr_mode = "otg";
0608 };