xref: /linux/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-hc4.dts (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2020 Dongjin Kim <tobetter@gmail.com>
4 */
5
6/dts-v1/;
7
8#include "meson-sm1-odroid.dtsi"
9
10/ {
11	compatible = "hardkernel,odroid-hc4", "amlogic,sm1";
12	model = "Hardkernel ODROID-HC4";
13
14	aliases {
15		rtc0 = &rtc;
16		rtc1 = &vrtc;
17	};
18
19	fan0: pwm-fan {
20		compatible = "pwm-fan";
21		#cooling-cells = <2>;
22		cooling-levels = <0 120 170 220>;
23		pwms = <&pwm_cd 1 40000 0>;
24	};
25
26	leds {
27		compatible = "gpio-leds";
28
29		led-blue {
30			color = <LED_COLOR_ID_BLUE>;
31			function = LED_FUNCTION_STATUS;
32			gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
33			linux,default-trigger = "heartbeat";
34			panic-indicator;
35		};
36
37		led-red {
38			color = <LED_COLOR_ID_RED>;
39			function = LED_FUNCTION_POWER;
40			gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>;
41			default-state = "on";
42		};
43	};
44
45	/* Powers the SATA Disk 0 regulator, which is enabled when a disk load is detected */
46	p12v_0: regulator-p12v-0 {
47		compatible = "regulator-fixed";
48		regulator-name = "P12V_0";
49		regulator-min-microvolt = <12000000>;
50		regulator-max-microvolt = <12000000>;
51		vin-supply = <&main_12v>;
52
53		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
54		enable-active-high;
55		regulator-always-on;
56	};
57
58	/* Powers the SATA Disk 1 regulator, which is enabled when a disk load is detected */
59	p12v_1: regulator-p12v-1 {
60		compatible = "regulator-fixed";
61		regulator-name = "P12V_1";
62		regulator-min-microvolt = <12000000>;
63		regulator-max-microvolt = <12000000>;
64		vin-supply = <&main_12v>;
65
66		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
67		enable-active-high;
68		regulator-always-on;
69	};
70
71	sound {
72		model = "ODROID-HC4";
73	};
74};
75
76&cpu_thermal {
77	trips {
78		cpu_active: cpu-active {
79			temperature = <60000>; /* millicelsius */
80			hysteresis = <2000>; /* millicelsius */
81			type = "active";
82		};
83	};
84
85	cooling-maps {
86		map {
87			trip = <&cpu_active>;
88			cooling-device = <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
89		};
90	};
91};
92
93&ir {
94	linux,rc-map-name = "rc-odroid";
95};
96
97&i2c2 {
98	status = "okay";
99	pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
100	pinctrl-names = "default";
101
102	rtc: rtc@51 {
103		status = "okay";
104		compatible = "nxp,pcf8563";
105		reg = <0x51>;
106		wakeup-source;
107	};
108};
109
110&pcie {
111	status = "okay";
112	reset-gpios = <&gpio GPIOH_4 GPIO_ACTIVE_LOW>;
113};
114
115&pwm_cd {
116	status = "okay";
117	pinctrl-names = "default";
118	pinctrl-0 = <&pwm_d_x6_pins>;
119};
120
121&sd_emmc_c {
122	status = "disabled";
123};
124
125&spifc {
126	status = "okay";
127	pinctrl-0 = <&nor_pins>;
128	pinctrl-names = "default";
129
130	flash@0 {
131		#address-cells = <1>;
132		#size-cells = <1>;
133		compatible = "jedec,spi-nor";
134		reg = <0>;
135		spi-max-frequency = <104000000>;
136	};
137};
138
139&usb {
140	phys = <&usb2_phy0>, <&usb2_phy1>;
141	phy-names = "usb2-phy0", "usb2-phy1";
142};
143