1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2019 BayLibre, SAS
4 * Author: Neil Armstrong <narmstrong@baylibre.com>
9 #include "meson-g12b-s922x.dtsi"
10 #include <dt-bindings/input/input.h>
11 #include <dt-bindings/gpio/meson-g12a-gpio.h>
12 #include <dt-bindings/sound/meson-g12a-toacodec.h>
13 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
16 compatible = "hardkernel,odroid-n2", "amlogic,s922x", "amlogic,g12b";
17 model = "Hardkernel ODROID-N2";
24 dioo2133: audio-amplifier-0 {
25 compatible = "simple-audio-amplifier";
26 enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
27 VCC-supply = <&vcc_5v>;
28 sound-name-prefix = "U19";
33 stdout-path = "serial0:115200n8";
37 device_type = "memory";
38 reg = <0x0 0x0 0x0 0x40000000>;
41 emmc_pwrseq: emmc-pwrseq {
42 compatible = "mmc-pwrseq-emmc";
43 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
47 compatible = "gpio-leds";
51 gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
52 linux,default-trigger = "heartbeat";
56 tflash_vdd: regulator-tflash_vdd {
57 compatible = "regulator-fixed";
59 regulator-name = "TFLASH_VDD";
60 regulator-min-microvolt = <3300000>;
61 regulator-max-microvolt = <3300000>;
63 gpio = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
68 tf_io: gpio-regulator-tf_io {
69 compatible = "regulator-gpio";
71 regulator-name = "TF_IO";
72 regulator-min-microvolt = <1800000>;
73 regulator-max-microvolt = <3300000>;
75 gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>;
82 flash_1v8: regulator-flash_1v8 {
83 compatible = "regulator-fixed";
84 regulator-name = "FLASH_1V8";
85 regulator-min-microvolt = <1800000>;
86 regulator-max-microvolt = <1800000>;
87 vin-supply = <&vcc_3v3>;
91 main_12v: regulator-main_12v {
92 compatible = "regulator-fixed";
93 regulator-name = "12V";
94 regulator-min-microvolt = <12000000>;
95 regulator-max-microvolt = <12000000>;
99 vcc_5v: regulator-vcc_5v {
100 compatible = "regulator-fixed";
101 regulator-name = "5V";
102 regulator-min-microvolt = <5000000>;
103 regulator-max-microvolt = <5000000>;
105 vin-supply = <&main_12v>;
108 vcc_1v8: regulator-vcc_1v8 {
109 compatible = "regulator-fixed";
110 regulator-name = "VCC_1V8";
111 regulator-min-microvolt = <1800000>;
112 regulator-max-microvolt = <1800000>;
113 vin-supply = <&vcc_3v3>;
117 vcc_3v3: regulator-vcc_3v3 {
118 compatible = "regulator-fixed";
119 regulator-name = "VCC_3V3";
120 regulator-min-microvolt = <3300000>;
121 regulator-max-microvolt = <3300000>;
122 vin-supply = <&vddao_3v3>;
124 /* FIXME: actually controlled by VDDCPU_B_EN */
127 vddcpu_a: regulator-vddcpu-a {
129 * MP8756GD Regulator.
131 compatible = "pwm-regulator";
133 regulator-name = "VDDCPU_A";
134 regulator-min-microvolt = <721000>;
135 regulator-max-microvolt = <1022000>;
137 vin-supply = <&main_12v>;
139 pwms = <&pwm_ab 0 1250 0>;
140 pwm-dutycycle-range = <100 0>;
146 vddcpu_b: regulator-vddcpu-b {
148 * Silergy SY8120B1ABC Regulator.
150 compatible = "pwm-regulator";
152 regulator-name = "VDDCPU_B";
153 regulator-min-microvolt = <721000>;
154 regulator-max-microvolt = <1022000>;
156 vin-supply = <&main_12v>;
158 pwms = <&pwm_AO_cd 1 1250 0>;
159 pwm-dutycycle-range = <100 0>;
165 hub_5v: regulator-hub_5v {
166 compatible = "regulator-fixed";
167 regulator-name = "HUB_5V";
168 regulator-min-microvolt = <5000000>;
169 regulator-max-microvolt = <5000000>;
170 vin-supply = <&vcc_5v>;
172 /* Connected to the Hub CHIPENABLE, LOW sets low power state */
173 gpio = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
177 usb_pwr_en: regulator-usb_pwr_en {
178 compatible = "regulator-fixed";
179 regulator-name = "USB_PWR_EN";
180 regulator-min-microvolt = <5000000>;
181 regulator-max-microvolt = <5000000>;
182 vin-supply = <&vcc_5v>;
184 /* Connected to the microUSB port power enable */
185 gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
189 vddao_1v8: regulator-vddao_1v8 {
190 compatible = "regulator-fixed";
191 regulator-name = "VDDAO_1V8";
192 regulator-min-microvolt = <1800000>;
193 regulator-max-microvolt = <1800000>;
194 vin-supply = <&vddao_3v3>;
198 vddao_3v3: regulator-vddao_3v3 {
199 compatible = "regulator-fixed";
200 regulator-name = "VDDAO_3V3";
201 regulator-min-microvolt = <3300000>;
202 regulator-max-microvolt = <3300000>;
203 vin-supply = <&main_12v>;
208 compatible = "hdmi-connector";
212 hdmi_connector_in: endpoint {
213 remote-endpoint = <&hdmi_tx_tmds_out>;
219 compatible = "amlogic,axg-sound-card";
220 model = "G12B-ODROID-N2";
221 audio-widgets = "Line", "Lineout";
222 audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
223 <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
225 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
226 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
227 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
228 "TDM_B Playback", "TDMOUT_B OUT",
229 "TDMOUT_C IN 0", "FRDDR_A OUT 2",
230 "TDMOUT_C IN 1", "FRDDR_B OUT 2",
231 "TDMOUT_C IN 2", "FRDDR_C OUT 2",
232 "TDM_C Playback", "TDMOUT_C OUT",
233 "TDMIN_A IN 4", "TDM_B Loopback",
234 "TDMIN_B IN 4", "TDM_B Loopback",
235 "TDMIN_C IN 4", "TDM_B Loopback",
236 "TDMIN_LB IN 1", "TDM_B Loopback",
237 "TDMIN_A IN 5", "TDM_C Loopback",
238 "TDMIN_B IN 5", "TDM_C Loopback",
239 "TDMIN_C IN 5", "TDM_C Loopback",
240 "TDMIN_LB IN 2", "TDM_C Loopback",
241 "TODDR_A IN 0", "TDMIN_A OUT",
242 "TODDR_B IN 0", "TDMIN_A OUT",
243 "TODDR_C IN 0", "TDMIN_A OUT",
244 "TODDR_A IN 1", "TDMIN_B OUT",
245 "TODDR_B IN 1", "TDMIN_B OUT",
246 "TODDR_C IN 1", "TDMIN_B OUT",
247 "TODDR_A IN 2", "TDMIN_C OUT",
248 "TODDR_B IN 2", "TDMIN_C OUT",
249 "TODDR_C IN 2", "TDMIN_C OUT",
250 "TODDR_A IN 6", "TDMIN_LB OUT",
251 "TODDR_B IN 6", "TDMIN_LB OUT",
252 "TODDR_C IN 6", "TDMIN_LB OUT",
253 "U19 INL", "ACODEC LOLP",
254 "U19 INR", "ACODEC LORP",
255 "Lineout", "U19 OUTL",
256 "Lineout", "U19 OUTR";
258 assigned-clocks = <&clkc CLKID_MPLL2>,
261 assigned-clock-parents = <0>, <0>, <0>;
262 assigned-clock-rates = <294912000>,
268 sound-dai = <&frddr_a>;
272 sound-dai = <&frddr_b>;
276 sound-dai = <&frddr_c>;
280 sound-dai = <&toddr_a>;
284 sound-dai = <&toddr_b>;
288 sound-dai = <&toddr_c>;
291 /* 8ch hdmi interface */
293 sound-dai = <&tdmif_b>;
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>;
302 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
306 sound-dai = <&toacodec TOACODEC_IN_B>;
310 /* i2s jack output interface */
312 sound-dai = <&tdmif_c>;
314 dai-tdm-slot-tx-mask-0 = <1 1>;
318 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
322 sound-dai = <&toacodec TOACODEC_IN_C>;
328 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
331 sound-dai = <&hdmi_tx>;
337 sound-dai = <&toacodec TOACODEC_OUT>;
340 sound-dai = <&acodec>;
347 AVDD-supply = <&vddao_1v8>;
356 pinctrl-0 = <&cec_ao_a_h_pins>;
357 pinctrl-names = "default";
359 hdmi-phandle = <&hdmi_tx>;
363 pinctrl-0 = <&cec_ao_b_h_pins>;
364 pinctrl-names = "default";
366 hdmi-phandle = <&hdmi_tx>;
374 cpu-supply = <&vddcpu_b>;
375 operating-points-v2 = <&cpu_opp_table_0>;
376 clocks = <&clkc CLKID_CPU_CLK>;
377 clock-latency = <50000>;
381 cpu-supply = <&vddcpu_b>;
382 operating-points-v2 = <&cpu_opp_table_0>;
383 clocks = <&clkc CLKID_CPU_CLK>;
384 clock-latency = <50000>;
388 cpu-supply = <&vddcpu_a>;
389 operating-points-v2 = <&cpub_opp_table_1>;
390 clocks = <&clkc CLKID_CPUB_CLK>;
391 clock-latency = <50000>;
395 cpu-supply = <&vddcpu_a>;
396 operating-points-v2 = <&cpub_opp_table_1>;
397 clocks = <&clkc CLKID_CPUB_CLK>;
398 clock-latency = <50000>;
402 cpu-supply = <&vddcpu_a>;
403 operating-points-v2 = <&cpub_opp_table_1>;
404 clocks = <&clkc CLKID_CPUB_CLK>;
405 clock-latency = <50000>;
409 cpu-supply = <&vddcpu_a>;
410 operating-points-v2 = <&cpub_opp_table_1>;
411 clocks = <&clkc CLKID_CPUB_CLK>;
412 clock-latency = <50000>;
416 external_phy: ethernet-phy@0 {
417 /* Realtek RTL8211F (0x001cc916) */
421 reset-assert-us = <10000>;
422 reset-deassert-us = <30000>;
423 reset-gpios = <&gpio GPIOZ_15 (GPIO_ACTIVE_LOW | GPIO_OPEN_DRAIN)>;
425 interrupt-parent = <&gpio_intc>;
426 /* MAC_INTR on GPIOZ_14 */
427 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
432 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
433 pinctrl-names = "default";
436 phy-handle = <&external_phy>;
437 amlogic,tx-delay-ns = <2>;
454 * WARNING: The USB Hub on the Odroid-N2 needs a reset signal
455 * to be turned high in order to be detected by the USB Controller
456 * This signal should be handled by a USB specific power sequence
457 * in order to reset the Hub when USB bus is powered down.
461 gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
463 line-name = "usb-hub-reset";
469 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
470 pinctrl-names = "default";
471 hdmi-supply = <&vcc_5v>;
475 hdmi_tx_tmds_out: endpoint {
476 remote-endpoint = <&hdmi_connector_in>;
482 pinctrl-0 = <&remote_input_ao_pins>;
483 pinctrl-names = "default";
484 linux,rc-map-name = "rc-odroid";
488 pinctrl-0 = <&pwm_a_e_pins>;
489 pinctrl-names = "default";
491 clock-names = "clkin0";
496 pinctrl-0 = <&pwm_ao_d_e_pins>;
497 pinctrl-names = "default";
499 clock-names = "clkin1";
506 pinctrl-0 = <&sdcard_c_pins>;
507 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
508 pinctrl-names = "default", "clk-gate";
512 max-frequency = <50000000>;
515 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
516 vmmc-supply = <&tflash_vdd>;
517 vqmmc-supply = <&tf_io>;
524 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
525 pinctrl-1 = <&emmc_clk_gate_pins>;
526 pinctrl-names = "default", "clk-gate";
532 max-frequency = <200000000>;
535 mmc-pwrseq = <&emmc_pwrseq>;
536 vmmc-supply = <&vcc_3v3>;
537 vqmmc-supply = <&flash_1v8>;
541 * EMMC_D4, EMMC_D5, EMMC_D6 and EMMC_D7 pins are shared between SPI NOR pins
542 * and eMMC Data 4 to 7 pins.
543 * Replace emmc_data_8b_pins to emmc_data_4b_pins from sd_emmc_c pinctrl-0,
544 * and change bus-width to 4 then spifc can be enabled.
545 * The SW1 slide should also be set to the correct position.
549 pinctrl-0 = <&nor_pins>;
550 pinctrl-names = "default";
552 mx25u64: spi-flash@0 {
553 #address-cells = <1>;
555 compatible = "mxicy,mx25u6435f", "jedec,spi-nor";
557 spi-max-frequency = <104000000>;
615 pinctrl-0 = <&uart_ao_a_pins>;
616 pinctrl-names = "default";
621 vbus-supply = <&usb_pwr_en>;
625 phy-supply = <&vcc_5v>;
629 /* Enable the hub which is connected to this port */
630 phy-supply = <&hub_5v>;