1a1d32814SChristopher Obbard// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2a1d32814SChristopher Obbard
3a1d32814SChristopher Obbard/dts-v1/;
4a1d32814SChristopher Obbard
5*55529fe3SCristian Ciocaltea#include <dt-bindings/gpio/gpio.h>
6a1d32814SChristopher Obbard#include "rk3588.dtsi"
7a1d32814SChristopher Obbard
8a1d32814SChristopher Obbard/ {
9a1d32814SChristopher Obbard	model = "Radxa ROCK 5 Model B";
10a1d32814SChristopher Obbard	compatible = "radxa,rock-5b", "rockchip,rk3588";
11a1d32814SChristopher Obbard
12a1d32814SChristopher Obbard	aliases {
136fb13f88SChristopher Obbard		mmc0 = &sdhci;
14a1d32814SChristopher Obbard		serial2 = &uart2;
15a1d32814SChristopher Obbard	};
16a1d32814SChristopher Obbard
17a1d32814SChristopher Obbard	chosen {
18a1d32814SChristopher Obbard		stdout-path = "serial2:1500000n8";
19a1d32814SChristopher Obbard	};
20a1d32814SChristopher Obbard
21f36bb176SCristian Ciocaltea	fan: pwm-fan {
22f36bb176SCristian Ciocaltea		compatible = "pwm-fan";
23f36bb176SCristian Ciocaltea		cooling-levels = <0 95 145 195 255>;
24f36bb176SCristian Ciocaltea		fan-supply = <&vcc5v0_sys>;
25f36bb176SCristian Ciocaltea		pwms = <&pwm1 0 50000 0>;
26f36bb176SCristian Ciocaltea		#cooling-cells = <2>;
27f36bb176SCristian Ciocaltea	};
28f36bb176SCristian Ciocaltea
29*55529fe3SCristian Ciocaltea	sound {
30*55529fe3SCristian Ciocaltea		compatible = "audio-graph-card";
31*55529fe3SCristian Ciocaltea		label = "Analog";
32*55529fe3SCristian Ciocaltea
33*55529fe3SCristian Ciocaltea		widgets = "Microphone", "Mic Jack",
34*55529fe3SCristian Ciocaltea			  "Headphone", "Headphones";
35*55529fe3SCristian Ciocaltea
36*55529fe3SCristian Ciocaltea		routing = "MIC2", "Mic Jack",
37*55529fe3SCristian Ciocaltea			  "Headphones", "HPOL",
38*55529fe3SCristian Ciocaltea			  "Headphones", "HPOR";
39*55529fe3SCristian Ciocaltea
40*55529fe3SCristian Ciocaltea		dais = <&i2s0_8ch_p0>;
41*55529fe3SCristian Ciocaltea		hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
42*55529fe3SCristian Ciocaltea		pinctrl-names = "default";
43*55529fe3SCristian Ciocaltea		pinctrl-0 = <&hp_detect>;
44*55529fe3SCristian Ciocaltea	};
45*55529fe3SCristian Ciocaltea
46a1d32814SChristopher Obbard	vcc5v0_sys: vcc5v0-sys-regulator {
47a1d32814SChristopher Obbard		compatible = "regulator-fixed";
48a1d32814SChristopher Obbard		regulator-name = "vcc5v0_sys";
49a1d32814SChristopher Obbard		regulator-always-on;
50a1d32814SChristopher Obbard		regulator-boot-on;
51a1d32814SChristopher Obbard		regulator-min-microvolt = <5000000>;
52a1d32814SChristopher Obbard		regulator-max-microvolt = <5000000>;
53a1d32814SChristopher Obbard	};
54a1d32814SChristopher Obbard};
55a1d32814SChristopher Obbard
561e9c2404SShreeya Patel&i2c6 {
571e9c2404SShreeya Patel	status = "okay";
581e9c2404SShreeya Patel
591e9c2404SShreeya Patel	hym8563: rtc@51 {
601e9c2404SShreeya Patel		compatible = "haoyu,hym8563";
611e9c2404SShreeya Patel		reg = <0x51>;
621e9c2404SShreeya Patel		#clock-cells = <0>;
631e9c2404SShreeya Patel		clock-frequency = <32768>;
641e9c2404SShreeya Patel		clock-output-names = "hym8563";
651e9c2404SShreeya Patel		pinctrl-names = "default";
661e9c2404SShreeya Patel		pinctrl-0 = <&hym8563_int>;
671e9c2404SShreeya Patel		interrupt-parent = <&gpio0>;
681e9c2404SShreeya Patel		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
691e9c2404SShreeya Patel		wakeup-source;
701e9c2404SShreeya Patel	};
711e9c2404SShreeya Patel};
721e9c2404SShreeya Patel
73*55529fe3SCristian Ciocaltea&i2c7 {
74*55529fe3SCristian Ciocaltea	status = "okay";
75*55529fe3SCristian Ciocaltea
76*55529fe3SCristian Ciocaltea	es8316: es8316@11 {
77*55529fe3SCristian Ciocaltea		compatible = "everest,es8316";
78*55529fe3SCristian Ciocaltea		reg = <0x11>;
79*55529fe3SCristian Ciocaltea		clocks = <&cru I2S0_8CH_MCLKOUT>;
80*55529fe3SCristian Ciocaltea		clock-names = "mclk";
81*55529fe3SCristian Ciocaltea		#sound-dai-cells = <0>;
82*55529fe3SCristian Ciocaltea
83*55529fe3SCristian Ciocaltea		port {
84*55529fe3SCristian Ciocaltea			es8316_p0_0: endpoint {
85*55529fe3SCristian Ciocaltea				remote-endpoint = <&i2s0_8ch_p0_0>;
86*55529fe3SCristian Ciocaltea			};
87*55529fe3SCristian Ciocaltea		};
88*55529fe3SCristian Ciocaltea	};
89*55529fe3SCristian Ciocaltea};
90*55529fe3SCristian Ciocaltea
91*55529fe3SCristian Ciocaltea&i2s0_8ch {
92*55529fe3SCristian Ciocaltea	pinctrl-names = "default";
93*55529fe3SCristian Ciocaltea	pinctrl-0 = <&i2s0_lrck
94*55529fe3SCristian Ciocaltea		     &i2s0_mclk
95*55529fe3SCristian Ciocaltea		     &i2s0_sclk
96*55529fe3SCristian Ciocaltea		     &i2s0_sdi0
97*55529fe3SCristian Ciocaltea		     &i2s0_sdo0>;
98*55529fe3SCristian Ciocaltea	status = "okay";
99*55529fe3SCristian Ciocaltea
100*55529fe3SCristian Ciocaltea	i2s0_8ch_p0: port {
101*55529fe3SCristian Ciocaltea		i2s0_8ch_p0_0: endpoint {
102*55529fe3SCristian Ciocaltea			dai-format = "i2s";
103*55529fe3SCristian Ciocaltea			mclk-fs = <256>;
104*55529fe3SCristian Ciocaltea			remote-endpoint = <&es8316_p0_0>;
105*55529fe3SCristian Ciocaltea		};
106*55529fe3SCristian Ciocaltea	};
107*55529fe3SCristian Ciocaltea};
108*55529fe3SCristian Ciocaltea
1091e9c2404SShreeya Patel&pinctrl {
1101e9c2404SShreeya Patel	hym8563 {
1111e9c2404SShreeya Patel		hym8563_int: hym8563-int {
1121e9c2404SShreeya Patel			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
1131e9c2404SShreeya Patel		};
1141e9c2404SShreeya Patel	};
115*55529fe3SCristian Ciocaltea
116*55529fe3SCristian Ciocaltea	sound {
117*55529fe3SCristian Ciocaltea		hp_detect: hp-detect {
118*55529fe3SCristian Ciocaltea			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
119*55529fe3SCristian Ciocaltea		};
120*55529fe3SCristian Ciocaltea	};
1211e9c2404SShreeya Patel};
1221e9c2404SShreeya Patel
123f36bb176SCristian Ciocaltea&pwm1 {
124f36bb176SCristian Ciocaltea	status = "okay";
125f36bb176SCristian Ciocaltea};
126f36bb176SCristian Ciocaltea
127a1d32814SChristopher Obbard&sdhci {
128a1d32814SChristopher Obbard	bus-width = <8>;
129a1d32814SChristopher Obbard	no-sdio;
130a1d32814SChristopher Obbard	no-sd;
131a1d32814SChristopher Obbard	non-removable;
132a1d32814SChristopher Obbard	max-frequency = <200000000>;
133a1d32814SChristopher Obbard	mmc-hs400-1_8v;
134a1d32814SChristopher Obbard	mmc-hs400-enhanced-strobe;
135a1d32814SChristopher Obbard	status = "okay";
136a1d32814SChristopher Obbard};
137a1d32814SChristopher Obbard
138a1d32814SChristopher Obbard&uart2 {
139a1d32814SChristopher Obbard	pinctrl-0 = <&uart2m0_xfer>;
140a1d32814SChristopher Obbard	status = "okay";
141a1d32814SChristopher Obbard};
142