~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 3e4aee8f70c1bb5c19b201f9b874e147defb1f63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)

/dts-v1/;

#include <dt-bindings/gpio/gpio.h>
#include "rk3588.dtsi"

/ {
	model = "Radxa ROCK 5 Model B";
	compatible = "radxa,rock-5b", "rockchip,rk3588";

	aliases {
		mmc0 = &sdhci;
		serial2 = &uart2;
	};

	chosen {
		stdout-path = "serial2:1500000n8";
	};

	fan: pwm-fan {
		compatible = "pwm-fan";
		cooling-levels = <0 95 145 195 255>;
		fan-supply = <&vcc5v0_sys>;
		pwms = <&pwm1 0 50000 0>;
		#cooling-cells = <2>;
	};

	sound {
		compatible = "audio-graph-card";
		label = "Analog";

		widgets = "Microphone", "Mic Jack",
			  "Headphone", "Headphones";

		routing = "MIC2", "Mic Jack",
			  "Headphones", "HPOL",
			  "Headphones", "HPOR";

		dais = <&i2s0_8ch_p0>;
		hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
		pinctrl-names = "default";
		pinctrl-0 = <&hp_detect>;
	};

	vcc5v0_sys: vcc5v0-sys-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vcc5v0_sys";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
	};
};

&cpu_b0 {
	cpu-supply = <&vdd_cpu_big0_s0>;
};

&cpu_b1 {
	cpu-supply = <&vdd_cpu_big0_s0>;
};

&cpu_b2 {
	cpu-supply = <&vdd_cpu_big1_s0>;
};

&cpu_b3 {
	cpu-supply = <&vdd_cpu_big1_s0>;
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0m2_xfer>;
	status = "okay";

	vdd_cpu_big0_s0: regulator@42 {
		compatible = "rockchip,rk8602";
		reg = <0x42>;
		fcs,suspend-voltage-selector = <1>;
		regulator-name = "vdd_cpu_big0_s0";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <550000>;
		regulator-max-microvolt = <1050000>;
		regulator-ramp-delay = <2300>;
		vin-supply = <&vcc5v0_sys>;

		regulator-state-mem {
			regulator-off-in-suspend;
		};
	};

	vdd_cpu_big1_s0: regulator@43 {
		compatible = "rockchip,rk8603", "rockchip,rk8602";
		reg = <0x43>;
		fcs,suspend-voltage-selector = <1>;
		regulator-name = "vdd_cpu_big1_s0";
		regulator-always-on;
		regulator-boot-on;
		regulator-min-microvolt = <550000>;
		regulator-max-microvolt = <1050000>;
		regulator-ramp-delay = <2300>;
		vin-supply = <&vcc5v0_sys>;

		regulator-state-mem {
			regulator-off-in-suspend;
		};
	};
};

&i2c6 {
	status = "okay";

	hym8563: rtc@51 {
		compatible = "haoyu,hym8563";
		reg = <0x51>;
		#clock-cells = <0>;
		clock-output-names = "hym8563";
		pinctrl-names = "default";
		pinctrl-0 = <&hym8563_int>;
		interrupt-parent = <&gpio0>;
		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
		wakeup-source;
	};
};

&i2c7 {
	status = "okay";

	es8316: audio-codec@11 {
		compatible = "everest,es8316";
		reg = <0x11>;
		clocks = <&cru I2S0_8CH_MCLKOUT>;
		clock-names = "mclk";
		#sound-dai-cells = <0>;

		port {
			es8316_p0_0: endpoint {
				remote-endpoint = <&i2s0_8ch_p0_0>;
			};
		};
	};
};

&i2s0_8ch {
	pinctrl-names = "default";
	pinctrl-0 = <&i2s0_lrck
		     &i2s0_mclk
		     &i2s0_sclk
		     &i2s0_sdi0
		     &i2s0_sdo0>;
	status = "okay";

	i2s0_8ch_p0: port {
		i2s0_8ch_p0_0: endpoint {
			dai-format = "i2s";
			mclk-fs = <256>;
			remote-endpoint = <&es8316_p0_0>;
		};
	};
};

&pinctrl {
	hym8563 {
		hym8563_int: hym8563-int {
			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};

	sound {
		hp_detect: hp-detect {
			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
		};
	};
};

&pwm1 {
	status = "okay";
};

&sdhci {
	bus-width = <8>;
	no-sdio;
	no-sd;
	non-removable;
	max-frequency = <200000000>;
	mmc-hs400-1_8v;
	mmc-hs400-enhanced-strobe;
	status = "okay";
};

&uart2 {
	pinctrl-0 = <&uart2m0_xfer>;
	status = "okay";
};