1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2020 Dongjin Kim <tobetter@gmail.com>
8 #include "meson-sm1.dtsi"
9 #include <dt-bindings/gpio/meson-g12a-gpio.h>
10 #include <dt-bindings/leds/common.h>
11 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
14 compatible = "hardkernel,odroid-c4", "amlogic,sm1";
15 model = "Hardkernel ODROID-C4";
23 stdout-path = "serial0:115200n8";
27 device_type = "memory";
28 reg = <0x0 0x0 0x0 0x40000000>;
31 emmc_pwrseq: emmc-pwrseq {
32 compatible = "mmc-pwrseq-emmc";
33 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
37 compatible = "gpio-leds";
40 color = <LED_COLOR_ID_BLUE>;
41 function = LED_FUNCTION_STATUS;
42 gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
43 linux,default-trigger = "heartbeat";
48 tflash_vdd: regulator-tflash_vdd {
49 compatible = "regulator-fixed";
51 regulator-name = "TFLASH_VDD";
52 regulator-min-microvolt = <3300000>;
53 regulator-max-microvolt = <3300000>;
55 gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
60 tf_io: gpio-regulator-tf_io {
61 compatible = "regulator-gpio";
63 regulator-name = "TF_IO";
64 regulator-min-microvolt = <1800000>;
65 regulator-max-microvolt = <3300000>;
67 gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
74 flash_1v8: regulator-flash_1v8 {
75 compatible = "regulator-fixed";
76 regulator-name = "FLASH_1V8";
77 regulator-min-microvolt = <1800000>;
78 regulator-max-microvolt = <1800000>;
79 vin-supply = <&vcc_3v3>;
83 main_12v: regulator-main_12v {
84 compatible = "regulator-fixed";
85 regulator-name = "12V";
86 regulator-min-microvolt = <12000000>;
87 regulator-max-microvolt = <12000000>;
91 vcc_5v: regulator-vcc_5v {
92 compatible = "regulator-fixed";
93 regulator-name = "5V";
94 regulator-min-microvolt = <5000000>;
95 regulator-max-microvolt = <5000000>;
97 vin-supply = <&main_12v>;
100 vcc_1v8: regulator-vcc_1v8 {
101 compatible = "regulator-fixed";
102 regulator-name = "VCC_1V8";
103 regulator-min-microvolt = <1800000>;
104 regulator-max-microvolt = <1800000>;
105 vin-supply = <&vcc_3v3>;
109 vcc_3v3: regulator-vcc_3v3 {
110 compatible = "regulator-fixed";
111 regulator-name = "VCC_3V3";
112 regulator-min-microvolt = <3300000>;
113 regulator-max-microvolt = <3300000>;
114 vin-supply = <&vddao_3v3>;
116 /* FIXME: actually controlled by VDDCPU_B_EN */
119 vddcpu: regulator-vddcpu {
121 * MP8756GD Regulator.
123 compatible = "pwm-regulator";
125 regulator-name = "VDDCPU";
126 regulator-min-microvolt = <721000>;
127 regulator-max-microvolt = <1022000>;
129 vin-supply = <&main_12v>;
131 pwms = <&pwm_AO_cd 1 1250 0>;
132 pwm-dutycycle-range = <100 0>;
138 hub_5v: regulator-hub_5v {
139 compatible = "regulator-fixed";
140 regulator-name = "HUB_5V";
141 regulator-min-microvolt = <5000000>;
142 regulator-max-microvolt = <5000000>;
143 vin-supply = <&vcc_5v>;
145 /* Connected to the Hub CHIPENABLE, LOW sets low power state */
146 gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
150 usb_pwr_en: regulator-usb_pwr_en {
151 compatible = "regulator-fixed";
152 regulator-name = "USB_PWR_EN";
153 regulator-min-microvolt = <5000000>;
154 regulator-max-microvolt = <5000000>;
155 vin-supply = <&vcc_5v>;
157 /* Connected to the microUSB port power enable */
158 gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
162 vddao_1v8: regulator-vddao_1v8 {
163 compatible = "regulator-fixed";
164 regulator-name = "VDDAO_1V8";
165 regulator-min-microvolt = <1800000>;
166 regulator-max-microvolt = <1800000>;
167 vin-supply = <&vddao_3v3>;
171 vddao_3v3: regulator-vddao_3v3 {
172 compatible = "regulator-fixed";
173 regulator-name = "VDDAO_3V3";
174 regulator-min-microvolt = <3300000>;
175 regulator-max-microvolt = <3300000>;
176 vin-supply = <&main_12v>;
181 compatible = "hdmi-connector";
185 hdmi_connector_in: endpoint {
186 remote-endpoint = <&hdmi_tx_tmds_out>;
192 compatible = "amlogic,axg-sound-card";
193 model = "SM1-ODROID-C4";
194 audio-aux-devs = <&tdmout_b>;
195 audio-routing = "TDMOUT_B IN 0", "FRDDR_A OUT 1",
196 "TDMOUT_B IN 1", "FRDDR_B OUT 1",
197 "TDMOUT_B IN 2", "FRDDR_C OUT 1",
198 "TDM_B Playback", "TDMOUT_B OUT";
200 assigned-clocks = <&clkc CLKID_MPLL2>,
203 assigned-clock-parents = <0>, <0>, <0>;
204 assigned-clock-rates = <294912000>,
210 sound-dai = <&frddr_a>;
214 sound-dai = <&frddr_b>;
218 sound-dai = <&frddr_c>;
221 /* 8ch hdmi interface */
223 sound-dai = <&tdmif_b>;
225 dai-tdm-slot-tx-mask-0 = <1 1>;
226 dai-tdm-slot-tx-mask-1 = <1 1>;
227 dai-tdm-slot-tx-mask-2 = <1 1>;
228 dai-tdm-slot-tx-mask-3 = <1 1>;
232 sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
238 sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
241 sound-dai = <&hdmi_tx>;
256 cpu-supply = <&vddcpu>;
257 operating-points-v2 = <&cpu_opp_table>;
258 clocks = <&clkc CLKID_CPU_CLK>;
259 clock-latency = <50000>;
263 cpu-supply = <&vddcpu>;
264 operating-points-v2 = <&cpu_opp_table>;
265 clocks = <&clkc CLKID_CPU1_CLK>;
266 clock-latency = <50000>;
270 cpu-supply = <&vddcpu>;
271 operating-points-v2 = <&cpu_opp_table>;
272 clocks = <&clkc CLKID_CPU2_CLK>;
273 clock-latency = <50000>;
277 cpu-supply = <&vddcpu>;
278 operating-points-v2 = <&cpu_opp_table>;
279 clocks = <&clkc CLKID_CPU3_CLK>;
280 clock-latency = <50000>;
284 external_phy: ethernet-phy@0 {
285 /* Realtek RTL8211F (0x001cc916) */
289 interrupt-parent = <&gpio_intc>;
290 /* MAC_INTR on GPIOZ_14 */
291 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
296 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
297 pinctrl-names = "default";
300 phy-handle = <&external_phy>;
301 amlogic,tx-delay-ns = <2>;
319 "", "", "", "", "", "", "", "",
320 "", "", "", "", "", "", "", "",
323 "PIN_36", /* GPIOH_5 */
324 "PIN_26", /* GPIOH_6 */
325 "PIN_32", /* GPIOH_7 */
328 "", "", "", "", "", "", "", "",
329 "", "", "", "", "", "", "", "",
331 "", "", "", "", "", "", "", "",
333 "", "", "", "", "", "", "", "",
334 "", "", "", "", "", "",
335 "PIN_27", /* GPIOA_14 */
336 "PIN_28", /* GPIOA_15 */
338 "PIN_16", /* GPIOX_0 */
339 "PIN_18", /* GPIOX_1 */
340 "PIN_22", /* GPIOX_2 */
341 "PIN_11", /* GPIOX_3 */
342 "PIN_13", /* GPIOX_4 */
343 "PIN_7", /* GPIOX_5 */
344 "PIN_33", /* GPIOX_6 */
345 "PIN_15", /* GPIOX_7 */
346 "PIN_19", /* GPIOX_8 */
347 "PIN_21", /* GPIOX_9 */
348 "PIN_24", /* GPIOX_10 */
349 "PIN_23", /* GPIOX_11 */
350 "PIN_8", /* GPIOX_12 */
351 "PIN_10", /* GPIOX_13 */
352 "PIN_29", /* GPIOX_14 */
353 "PIN_31", /* GPIOX_15 */
354 "PIN_12", /* GPIOX_16 */
355 "PIN_3", /* GPIOX_17 */
356 "PIN_5", /* GPIOX_18 */
357 "PIN_35"; /* GPIOX_19 */
360 * WARNING: The USB Hub on the Odroid-C4 needs a reset signal
361 * to be turned high in order to be detected by the USB Controller
362 * This signal should be handled by a USB specific power sequence
363 * in order to reset the Hub when USB bus is powered down.
367 gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
369 line-name = "usb-hub-reset";
377 "PIN_47", /* GPIOAO_4 */
379 "PIN_45", /* GPIOAO_7 */
380 "PIN_46", /* GPIOAO_8 */
381 "PIN_44", /* GPIOAO_9 */
382 "PIN_42", /* GPIOAO_10 */
390 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
391 pinctrl-names = "default";
392 hdmi-supply = <&vcc_5v>;
396 hdmi_tx_tmds_out: endpoint {
397 remote-endpoint = <&hdmi_connector_in>;
403 pinctrl-0 = <&remote_input_ao_pins>;
404 pinctrl-names = "default";
405 linux,rc-map-name = "rc-odroid";
409 pinctrl-0 = <&pwm_ao_d_e_pins>;
410 pinctrl-names = "default";
412 clock-names = "clkin1";
423 pinctrl-0 = <&sdcard_c_pins>;
424 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
425 pinctrl-names = "default", "clk-gate";
429 max-frequency = <200000000>;
436 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
437 vmmc-supply = <&tflash_vdd>;
438 vqmmc-supply = <&tf_io>;
444 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
445 pinctrl-1 = <&emmc_clk_gate_pins>;
446 pinctrl-names = "default", "clk-gate";
452 max-frequency = <200000000>;
455 mmc-pwrseq = <&emmc_pwrseq>;
456 vmmc-supply = <&vcc_3v3>;
457 vqmmc-supply = <&flash_1v8>;
474 pinctrl-0 = <&uart_ao_a_pins>;
475 pinctrl-names = "default";
480 vbus-supply = <&usb_pwr_en>;
484 phy-supply = <&vcc_5v>;
488 /* Enable the hub which is connected to this port */
489 phy-supply = <&hub_5v>;