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>
13 compatible = "hardkernel,odroid-c4", "amlogic,sm1";
14 model = "Hardkernel ODROID-C4";
22 stdout-path = "serial0:115200n8";
26 device_type = "memory";
27 reg = <0x0 0x0 0x0 0x40000000>;
30 emmc_pwrseq: emmc-pwrseq {
31 compatible = "mmc-pwrseq-emmc";
32 reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
36 compatible = "gpio-leds";
39 color = <LED_COLOR_ID_BLUE>;
40 function = LED_FUNCTION_STATUS;
41 gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
42 linux,default-trigger = "heartbeat";
47 tflash_vdd: regulator-tflash_vdd {
48 compatible = "regulator-fixed";
50 regulator-name = "TFLASH_VDD";
51 regulator-min-microvolt = <3300000>;
52 regulator-max-microvolt = <3300000>;
54 gpio = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
59 tf_io: gpio-regulator-tf_io {
60 compatible = "regulator-gpio";
62 regulator-name = "TF_IO";
63 regulator-min-microvolt = <1800000>;
64 regulator-max-microvolt = <3300000>;
66 gpios = <&gpio_ao GPIOAO_6 GPIO_ACTIVE_HIGH>;
73 flash_1v8: regulator-flash_1v8 {
74 compatible = "regulator-fixed";
75 regulator-name = "FLASH_1V8";
76 regulator-min-microvolt = <1800000>;
77 regulator-max-microvolt = <1800000>;
78 vin-supply = <&vcc_3v3>;
82 main_12v: regulator-main_12v {
83 compatible = "regulator-fixed";
84 regulator-name = "12V";
85 regulator-min-microvolt = <12000000>;
86 regulator-max-microvolt = <12000000>;
90 vcc_5v: regulator-vcc_5v {
91 compatible = "regulator-fixed";
92 regulator-name = "5V";
93 regulator-min-microvolt = <5000000>;
94 regulator-max-microvolt = <5000000>;
96 vin-supply = <&main_12v>;
99 vcc_1v8: regulator-vcc_1v8 {
100 compatible = "regulator-fixed";
101 regulator-name = "VCC_1V8";
102 regulator-min-microvolt = <1800000>;
103 regulator-max-microvolt = <1800000>;
104 vin-supply = <&vcc_3v3>;
108 vcc_3v3: regulator-vcc_3v3 {
109 compatible = "regulator-fixed";
110 regulator-name = "VCC_3V3";
111 regulator-min-microvolt = <3300000>;
112 regulator-max-microvolt = <3300000>;
113 vin-supply = <&vddao_3v3>;
115 /* FIXME: actually controlled by VDDCPU_B_EN */
118 vddcpu: regulator-vddcpu {
120 * MP8756GD Regulator.
122 compatible = "pwm-regulator";
124 regulator-name = "VDDCPU";
125 regulator-min-microvolt = <721000>;
126 regulator-max-microvolt = <1022000>;
128 vin-supply = <&main_12v>;
130 pwms = <&pwm_AO_cd 1 1250 0>;
131 pwm-dutycycle-range = <100 0>;
137 hub_5v: regulator-hub_5v {
138 compatible = "regulator-fixed";
139 regulator-name = "HUB_5V";
140 regulator-min-microvolt = <5000000>;
141 regulator-max-microvolt = <5000000>;
142 vin-supply = <&vcc_5v>;
144 /* Connected to the Hub CHIPENABLE, LOW sets low power state */
145 gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
149 usb_pwr_en: regulator-usb_pwr_en {
150 compatible = "regulator-fixed";
151 regulator-name = "USB_PWR_EN";
152 regulator-min-microvolt = <5000000>;
153 regulator-max-microvolt = <5000000>;
154 vin-supply = <&vcc_5v>;
156 /* Connected to the microUSB port power enable */
157 gpio = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
161 vddao_1v8: regulator-vddao_1v8 {
162 compatible = "regulator-fixed";
163 regulator-name = "VDDAO_1V8";
164 regulator-min-microvolt = <1800000>;
165 regulator-max-microvolt = <1800000>;
166 vin-supply = <&vddao_3v3>;
170 vddao_3v3: regulator-vddao_3v3 {
171 compatible = "regulator-fixed";
172 regulator-name = "VDDAO_3V3";
173 regulator-min-microvolt = <3300000>;
174 regulator-max-microvolt = <3300000>;
175 vin-supply = <&main_12v>;
180 compatible = "hdmi-connector";
184 hdmi_connector_in: endpoint {
185 remote-endpoint = <&hdmi_tx_tmds_out>;
192 cpu-supply = <&vddcpu>;
193 operating-points-v2 = <&cpu_opp_table>;
194 clocks = <&clkc CLKID_CPU_CLK>;
195 clock-latency = <50000>;
199 cpu-supply = <&vddcpu>;
200 operating-points-v2 = <&cpu_opp_table>;
201 clocks = <&clkc CLKID_CPU1_CLK>;
202 clock-latency = <50000>;
206 cpu-supply = <&vddcpu>;
207 operating-points-v2 = <&cpu_opp_table>;
208 clocks = <&clkc CLKID_CPU2_CLK>;
209 clock-latency = <50000>;
213 cpu-supply = <&vddcpu>;
214 operating-points-v2 = <&cpu_opp_table>;
215 clocks = <&clkc CLKID_CPU3_CLK>;
216 clock-latency = <50000>;
220 external_phy: ethernet-phy@0 {
221 /* Realtek RTL8211F (0x001cc916) */
225 interrupt-parent = <&gpio_intc>;
226 /* MAC_INTR on GPIOZ_14 */
227 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
232 pinctrl-0 = <ð_pins>, <ð_rgmii_pins>;
233 pinctrl-names = "default";
236 phy-handle = <&external_phy>;
237 amlogic,tx-delay-ns = <2>;
243 "", "", "", "", "", "", "", "",
244 "", "", "", "", "", "", "", "",
247 "PIN_36", /* GPIOH_5 */
248 "PIN_26", /* GPIOH_6 */
249 "PIN_32", /* GPIOH_7 */
252 "", "", "", "", "", "", "", "",
253 "", "", "", "", "", "", "", "",
255 "", "", "", "", "", "", "", "",
257 "", "", "", "", "", "", "", "",
258 "", "", "", "", "", "",
259 "PIN_27", /* GPIOA_14 */
260 "PIN_28", /* GPIOA_15 */
262 "PIN_16", /* GPIOX_0 */
263 "PIN_18", /* GPIOX_1 */
264 "PIN_22", /* GPIOX_2 */
265 "PIN_11", /* GPIOX_3 */
266 "PIN_13", /* GPIOX_4 */
267 "PIN_7", /* GPIOX_5 */
268 "PIN_33", /* GPIOX_6 */
269 "PIN_15", /* GPIOX_7 */
270 "PIN_19", /* GPIOX_8 */
271 "PIN_21", /* GPIOX_9 */
272 "PIN_24", /* GPIOX_10 */
273 "PIN_23", /* GPIOX_11 */
274 "PIN_8", /* GPIOX_12 */
275 "PIN_10", /* GPIOX_13 */
276 "PIN_29", /* GPIOX_14 */
277 "PIN_31", /* GPIOX_15 */
278 "PIN_12", /* GPIOX_16 */
279 "PIN_3", /* GPIOX_17 */
280 "PIN_5", /* GPIOX_18 */
281 "PIN_35"; /* GPIOX_19 */
284 * WARNING: The USB Hub on the Odroid-C4 needs a reset signal
285 * to be turned high in order to be detected by the USB Controller
286 * This signal should be handled by a USB specific power sequence
287 * in order to reset the Hub when USB bus is powered down.
291 gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
293 line-name = "usb-hub-reset";
301 "PIN_47", /* GPIOAO_4 */
303 "PIN_45", /* GPIOAO_7 */
304 "PIN_46", /* GPIOAO_8 */
305 "PIN_44", /* GPIOAO_9 */
306 "PIN_42", /* GPIOAO_10 */
314 pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
315 pinctrl-names = "default";
316 hdmi-supply = <&vcc_5v>;
320 hdmi_tx_tmds_out: endpoint {
321 remote-endpoint = <&hdmi_connector_in>;
327 pinctrl-0 = <&remote_input_ao_pins>;
328 pinctrl-names = "default";
329 linux,rc-map-name = "rc-odroid";
333 pinctrl-0 = <&pwm_ao_d_e_pins>;
334 pinctrl-names = "default";
336 clock-names = "clkin1";
347 pinctrl-0 = <&sdcard_c_pins>;
348 pinctrl-1 = <&sdcard_clk_gate_c_pins>;
349 pinctrl-names = "default", "clk-gate";
353 max-frequency = <200000000>;
360 cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
361 vmmc-supply = <&tflash_vdd>;
362 vqmmc-supply = <&tf_io>;
368 pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
369 pinctrl-1 = <&emmc_clk_gate_pins>;
370 pinctrl-names = "default", "clk-gate";
376 max-frequency = <200000000>;
379 mmc-pwrseq = <&emmc_pwrseq>;
380 vmmc-supply = <&vcc_3v3>;
381 vqmmc-supply = <&flash_1v8>;
386 pinctrl-0 = <&uart_ao_a_pins>;
387 pinctrl-names = "default";
392 vbus-supply = <&usb_pwr_en>;
396 phy-supply = <&vcc_5v>;
400 /* Enable the hub which is connected to this port */
401 phy-supply = <&hub_5v>;