1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/gpio/meson-g12a-gpio.h>
9 #include <dt-bindings/sound/meson-g12a-toacodec.h>
10 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
18 dioo2133: audio-amplifier-0 {
19 compatible = "simple-audio-amplifier";
20 enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
21 VCC-supply = <&vcc_5v>;
22 sound-name-prefix = "U19";
27 stdout-path = "serial0:115200n8";
31 device_type = "memory";
32 reg = <0x0 0x0 0x0 0x40000000>;
35 emmc_pwrseq: emmc-pwrseq {
36 compatible = "mmc-pwrseq-emmc";
37 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
41 compatible = "gpio-leds";
45 gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
46 linux,default-trigger = "heartbeat";
50 tflash_vdd: regulator-tflash_vdd {
51 compatible = "regulator-fixed";
53 regulator-name = "TFLASH_VDD";
54 regulator-min-microvolt = <3300000>;
55 regulator-max-microvolt = <3300000>;
57 gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
62 tf_io: gpio-regulator-tf_io {
63 compatible = "regulator-gpio";
65 regulator-name = "TF_IO";
66 regulator-min-microvolt = <1800000>;
67 regulator-max-microvolt = <3300000>;
69 gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
76 flash_1v8: regulator-flash_1v8 {
77 compatible = "regulator-fixed";
78 regulator-name = "FLASH_1V8";
79 regulator-min-microvolt = <1800000>;
80 regulator-max-microvolt = <1800000>;
81 vin-supply = <&vcc_3v3>;
85 main_12v: regulator-main_12v {
86 compatible = "regulator-fixed";
87 regulator-name = "12V";
88 regulator-min-microvolt = <12000000>;
89 regulator-max-microvolt = <12000000>;
93 vcc_5v: regulator-vcc_5v {
94 compatible = "regulator-fixed";
95 regulator-name = "5V";
96 regulator-min-microvolt = <5000000>;
97 regulator-max-microvolt = <5000000>;
99 vin-supply = <&main_12v>;
102 vcc_1v8: regulator-vcc_1v8 {
103 compatible = "regulator-fixed";
104 regulator-name = "VCC_1V8";
105 regulator-min-microvolt = <1800000>;
106 regulator-max-microvolt = <1800000>;
107 vin-supply = <&vcc_3v3>;
111 vcc_3v3: regulator-vcc_3v3 {
112 compatible = "regulator-fixed";
113 regulator-name = "VCC_3V3";
114 regulator-min-microvolt = <3300000>;
115 regulator-max-microvolt = <3300000>;
116 vin-supply = <&vddao_3v3>;
118 /* FIXME: actually controlled by VDDCPU_B_EN */
121 vddcpu_a: regulator-vddcpu-a {
123 * MP8756GD Regulator.
125 compatible = "pwm-regulator";
127 regulator-name = "VDDCPU_A";
128 regulator-min-microvolt = <721000>;
129 regulator-max-microvolt = <1022000>;
131 vin-supply = <&main_12v>;
133 pwms = <&pwm_ab 0 1250 0>;
134 pwm-dutycycle-range = <100 0>;
140 vddcpu_b: regulator-vddcpu-b {
142 * Silergy SY8120B1ABC Regulator.
144 compatible = "pwm-regulator";
146 regulator-name = "VDDCPU_B";
147 regulator-min-microvolt = <721000>;
148 regulator-max-microvolt = <1022000>;
150 vin-supply = <&main_12v>;
152 pwms = <&pwm_AO_cd 1 1250 0>;
153 pwm-dutycycle-range = <100 0>;
159 hub_5v: regulator-hub_5v {
160 compatible = "regulator-fixed";
161 regulator-name = "HUB_5V";
162 regulator-min-microvolt = <5000000>;
163 regulator-max-microvolt = <5000000>;
164 vin-supply = <&vcc_5v>;
166 /* Connected to the Hub CHIPENABLE, LOW sets low power state */
167 gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
171 usb_pwr_en: regulator-usb_pwr_en {
172 compatible = "regulator-fixed";
173 regulator-name = "USB_PWR_EN";
174 regulator-min-microvolt = <5000000>;
175 regulator-max-microvolt = <5000000>;
176 vin-supply = <&vcc_5v>;
178 /* Connected to the microUSB port power enable */
179 gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
183 vddao_1v8: regulator-vddao_1v8 {
184 compatible = "regulator-fixed";
185 regulator-name = "VDDAO_1V8";
186 regulator-min-microvolt = <1800000>;
187 regulator-max-microvolt = <1800000>;
188 vin-supply = <&vddao_3v3>;
192 vddao_3v3: regulator-vddao_3v3 {
193 compatible = "regulator-fixed";
194 regulator-name = "VDDAO_3V3";
195 regulator-min-microvolt = <3300000>;
196 regulator-max-microvolt = <3300000>;
197 vin-supply = <&main_12v>;
202 compatible = "hdmi-connector";
206 hdmi_connector_in: endpoint {
207 remote-endpoint = <&hdmi_tx_tmds_out>;
213 compatible = "amlogic,axg-sound-card";
214 model = "G12B-ODROID-N2";
215 audio-widgets = "Line", "Lineout";
216 audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
217 <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
219 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
220 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
221 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
222 "TDM_B Playback", "TDMOUT_B OUT",
223 "TDMOUT_C IN 0", "FRDDR_A OUT 2",
224 "TDMOUT_C IN 1", "FRDDR_B OUT 2",
225 "TDMOUT_C IN 2", "FRDDR_C OUT 2",
226 "TDM_C Playback", "TDMOUT_C OUT",
227 "TDMIN_A IN 4", "TDM_B Loopback",
228 "TDMIN_B IN 4", "TDM_B Loopback",
229 "TDMIN_C IN 4", "TDM_B Loopback",
230 "TDMIN_LB IN 1", "TDM_B Loopback",
231 "TDMIN_A IN 5", "TDM_C Loopback",
232 "TDMIN_B IN 5", "TDM_C Loopback",
233 "TDMIN_C IN 5", "TDM_C Loopback",
234 "TDMIN_LB IN 2", "TDM_C Loopback",
235 "TODDR_A IN 0", "TDMIN_A OUT",
236 "TODDR_B IN 0", "TDMIN_A OUT",
237 "TODDR_C IN 0", "TDMIN_A OUT",
238 "TODDR_A IN 1", "TDMIN_B OUT",
239 "TODDR_B IN 1", "TDMIN_B OUT",
240 "TODDR_C IN 1", "TDMIN_B OUT",
241 "TODDR_A IN 2", "TDMIN_C OUT",
242 "TODDR_B IN 2", "TDMIN_C OUT",
243 "TODDR_C IN 2", "TDMIN_C OUT",
244 "TODDR_A IN 6", "TDMIN_LB OUT",
245 "TODDR_B IN 6", "TDMIN_LB OUT",
246 "TODDR_C IN 6", "TDMIN_LB OUT",
247 "U19 INL", "ACODEC LOLP",
248 "U19 INR", "ACODEC LORP",
249 "Lineout", "U19 OUTL",
250 "Lineout", "U19 OUTR";
252 assigned-clocks = <&clkc CLKID_MPLL2>,
255 assigned-clock-parents = <0>, <0>, <0>;
256 assigned-clock-rates = <294912000>,
262 sound-dai = <&frddr_a>;
266 sound-dai = <&frddr_b>;
270 sound-dai = <&frddr_c>;
274 sound-dai = <&toddr_a>;
278 sound-dai = <&toddr_b>;
282 sound-dai = <&toddr_c>;
285 /* 8ch hdmi interface */
287 sound-dai = <&tdmif_b>;
289 dai-tdm-slot-tx-mask-0 = <1 1>;
290 dai-tdm-slot-tx-mask-1 = <1 1>;
291 dai-tdm-slot-tx-mask-2 = <1 1>;
292 dai-tdm-slot-tx-mask-3 = <1 1>;
296 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
300 sound-dai = <&toacodec TOACODEC_IN_B>;
304 /* i2s jack output interface */
306 sound-dai = <&tdmif_c>;
308 dai-tdm-slot-tx-mask-0 = <1 1>;
312 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
316 sound-dai = <&toacodec TOACODEC_IN_C>;
322 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
325 sound-dai = <&hdmi_tx>;
331 sound-dai = <&toacodec TOACODEC_OUT>;
334 sound-dai = <&acodec>;
341 AVDD-supply = <&vddao_1v8>;
350 pinctrl-0 = <&cec_ao_a_h_pins>;
351 pinctrl-names = "default";
353 hdmi-phandle = <&hdmi_tx>;
357 pinctrl-0 = <&cec_ao_b_h_pins>;
358 pinctrl-names = "default";
360 hdmi-phandle = <&hdmi_tx>;
368 cpu-supply = <&vddcpu_b>;
369 operating-points-v2 = <&cpu_opp_table_0>;
370 clocks = <&clkc CLKID_CPU_CLK>;
371 clock-latency = <50000>;
375 cpu-supply = <&vddcpu_b>;
376 operating-points-v2 = <&cpu_opp_table_0>;
377 clocks = <&clkc CLKID_CPU_CLK>;
378 clock-latency = <50000>;
382 cpu-supply = <&vddcpu_a>;
383 operating-points-v2 = <&cpub_opp_table_1>;
384 clocks = <&clkc CLKID_CPUB_CLK>;
385 clock-latency = <50000>;
389 cpu-supply = <&vddcpu_a>;
390 operating-points-v2 = <&cpub_opp_table_1>;
391 clocks = <&clkc CLKID_CPUB_CLK>;
392 clock-latency = <50000>;
396 cpu-supply = <&vddcpu_a>;
397 operating-points-v2 = <&cpub_opp_table_1>;
398 clocks = <&clkc CLKID_CPUB_CLK>;
399 clock-latency = <50000>;
403 cpu-supply = <&vddcpu_a>;
404 operating-points-v2 = <&cpub_opp_table_1>;
405 clocks = <&clkc CLKID_CPUB_CLK>;
406 clock-latency = <50000>;
410 external_phy: ethernet-phy@0 {
411 /* Realtek RTL8211F (0x001cc916) */
415 reset-assert-us = <10000>;
416 reset-deassert-us = <80000>;
417 reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
419 interrupt-parent = <&gpio_intc>;
420 /* MAC_INTR on GPIOZ_14 */
421 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
426 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
427 pinctrl-names = "default";
430 phy-handle = <&external_phy>;
431 amlogic,tx-delay-ns = <2>;
448 * WARNING: The USB Hub on the Odroid-N2 needs a reset signal
449 * to be turned high in order to be detected by the USB Controller
450 * This signal should be handled by a USB specific power sequence
451 * in order to reset the Hub when USB bus is powered down.
455 gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
457 line-name = "usb-hub-reset";
463 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
464 pinctrl-names = "default";
465 hdmi-supply = <&vcc_5v>;
469 hdmi_tx_tmds_out: endpoint {
470 remote-endpoint = <&hdmi_connector_in>;
476 pinctrl-0 = <&remote_input_ao_pins>;
477 pinctrl-names = "default";
478 linux,rc-map-name = "rc-odroid";
482 pinctrl-0 = <&pwm_a_e_pins>;
483 pinctrl-names = "default";
485 clock-names = "clkin0";
490 pinctrl-0 = <&pwm_ao_d_e_pins>;
491 pinctrl-names = "default";
493 clock-names = "clkin1";
500 pinctrl-0 = <&sdcard_c_pins>;
501 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
502 pinctrl-names = "default", "clk-gate";
506 max-frequency = <50000000>;
509 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
510 vmmc-supply = <&tflash_vdd>;
511 vqmmc-supply = <&tf_io>;
518 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
519 pinctrl-1 = <&emmc_clk_gate_pins>;
520 pinctrl-names = "default", "clk-gate";
526 max-frequency = <200000000>;
529 mmc-pwrseq = <&emmc_pwrseq>;
530 vmmc-supply = <&vcc_3v3>;
531 vqmmc-supply = <&flash_1v8>;
535 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR pins
536 * and eMMC Data 4 to 7 pins.
537 * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0,
538 * and change bus-width to 4 then spifc can be enabled.
539 * The SW1 slide should also be set to the correct position.
543 pinctrl-0 = <&nor_pins>;
544 pinctrl-names = "default";
546 mx25u64: spi-flash@0 {
547 #address-cells = <1>;
549 compatible = "mxicy,mx25u6435f", "jedec,spi-nor";
551 spi-max-frequency = <104000000>;
609 pinctrl-0 = <&uart_ao_a_pins>;
610 pinctrl-names = "default";
615 vbus-supply = <&usb_pwr_en>;
619 phy-supply = <&vcc_5v>;
623 /* Enable the hub which is connected to this port */
624 phy-supply = <&hub_5v>;