xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3308-sakurapi-rk3308b.dts (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
1*833e5d42SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*833e5d42SEmmanuel Vadot/*
3*833e5d42SEmmanuel Vadot * Copyright (c) 2019 Akash Gajjar <akash@openedev.com>
4*833e5d42SEmmanuel Vadot * Copyright (c) 2019 Jagan Teki <jagan@openedev.com>
5*833e5d42SEmmanuel Vadot * Copyright (C) 2024 TheSnowfield <thesnowfield@sakurapi.org>
6*833e5d42SEmmanuel Vadot * Copyright (C) 2025 Hsun Lai <i@chainsx.cn>
7*833e5d42SEmmanuel Vadot */
8*833e5d42SEmmanuel Vadot
9*833e5d42SEmmanuel Vadot/dts-v1/;
10*833e5d42SEmmanuel Vadot#include "rk3308.dtsi"
11*833e5d42SEmmanuel Vadot#include <dt-bindings/leds/common.h>
12*833e5d42SEmmanuel Vadot
13*833e5d42SEmmanuel Vadot/ {
14*833e5d42SEmmanuel Vadot	model = "Sakura Pi RK3308B";
15*833e5d42SEmmanuel Vadot	compatible = "sakurapi,rk3308-sakurapi-rk3308b", "rockchip,rk3308";
16*833e5d42SEmmanuel Vadot
17*833e5d42SEmmanuel Vadot	aliases {
18*833e5d42SEmmanuel Vadot		mmc0 = &emmc;
19*833e5d42SEmmanuel Vadot		mmc1 = &sdmmc;
20*833e5d42SEmmanuel Vadot		mmc2 = &sdio;
21*833e5d42SEmmanuel Vadot	};
22*833e5d42SEmmanuel Vadot
23*833e5d42SEmmanuel Vadot	chosen {
24*833e5d42SEmmanuel Vadot		stdout-path = "serial2:1500000n8";
25*833e5d42SEmmanuel Vadot	};
26*833e5d42SEmmanuel Vadot
27*833e5d42SEmmanuel Vadot	vcc5v0_sys: regulator-vcc5v0-sys {
28*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
29*833e5d42SEmmanuel Vadot		regulator-name = "vcc5v0_sys";
30*833e5d42SEmmanuel Vadot		regulator-always-on;
31*833e5d42SEmmanuel Vadot		regulator-boot-on;
32*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <5000000>;
33*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <5000000>;
34*833e5d42SEmmanuel Vadot	};
35*833e5d42SEmmanuel Vadot
36*833e5d42SEmmanuel Vadot	vdd_core: regulator-vdd-core {
37*833e5d42SEmmanuel Vadot		compatible = "pwm-regulator";
38*833e5d42SEmmanuel Vadot		pwms = <&pwm0 0 5000 1>;
39*833e5d42SEmmanuel Vadot		regulator-name = "vdd_core";
40*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <827000>;
41*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <1340000>;
42*833e5d42SEmmanuel Vadot		regulator-settling-time-up-us = <250>;
43*833e5d42SEmmanuel Vadot		regulator-always-on;
44*833e5d42SEmmanuel Vadot		regulator-boot-on;
45*833e5d42SEmmanuel Vadot		pwm-supply = <&vcc5v0_sys>;
46*833e5d42SEmmanuel Vadot	};
47*833e5d42SEmmanuel Vadot
48*833e5d42SEmmanuel Vadot	vdd_log: regulator-vdd-log {
49*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
50*833e5d42SEmmanuel Vadot		regulator-name = "vdd_log";
51*833e5d42SEmmanuel Vadot		regulator-always-on;
52*833e5d42SEmmanuel Vadot		regulator-boot-on;
53*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <1050000>;
54*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <1050000>;
55*833e5d42SEmmanuel Vadot		vin-supply = <&vcc5v0_sys>;
56*833e5d42SEmmanuel Vadot	};
57*833e5d42SEmmanuel Vadot
58*833e5d42SEmmanuel Vadot	vcc_ddr: regulator-vcc-ddr {
59*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
60*833e5d42SEmmanuel Vadot		regulator-name = "vcc_ddr";
61*833e5d42SEmmanuel Vadot		regulator-always-on;
62*833e5d42SEmmanuel Vadot		regulator-boot-on;
63*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <1500000>;
64*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <1500000>;
65*833e5d42SEmmanuel Vadot		vin-supply = <&vcc5v0_sys>;
66*833e5d42SEmmanuel Vadot	};
67*833e5d42SEmmanuel Vadot
68*833e5d42SEmmanuel Vadot	vcc_1v8: regulator-vcc-1v8 {
69*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
70*833e5d42SEmmanuel Vadot		regulator-name = "vcc_1v8";
71*833e5d42SEmmanuel Vadot		regulator-always-on;
72*833e5d42SEmmanuel Vadot		regulator-boot-on;
73*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <1800000>;
74*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <1800000>;
75*833e5d42SEmmanuel Vadot		vin-supply = <&vcc_io>;
76*833e5d42SEmmanuel Vadot	};
77*833e5d42SEmmanuel Vadot
78*833e5d42SEmmanuel Vadot	vcc_io: regulator-vcc-io {
79*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
80*833e5d42SEmmanuel Vadot		regulator-name = "vcc_io";
81*833e5d42SEmmanuel Vadot		regulator-always-on;
82*833e5d42SEmmanuel Vadot		regulator-boot-on;
83*833e5d42SEmmanuel Vadot		regulator-min-microvolt = <3300000>;
84*833e5d42SEmmanuel Vadot		regulator-max-microvolt = <3300000>;
85*833e5d42SEmmanuel Vadot		vin-supply = <&vcc5v0_sys>;
86*833e5d42SEmmanuel Vadot	};
87*833e5d42SEmmanuel Vadot
88*833e5d42SEmmanuel Vadot	vcc_phy: regulator-vcc-phy-regulator {
89*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
90*833e5d42SEmmanuel Vadot		regulator-name = "vcc_phy";
91*833e5d42SEmmanuel Vadot		regulator-always-on;
92*833e5d42SEmmanuel Vadot		regulator-boot-on;
93*833e5d42SEmmanuel Vadot	};
94*833e5d42SEmmanuel Vadot
95*833e5d42SEmmanuel Vadot	vcc5v0_otg: regulator-vcc5v0-otg {
96*833e5d42SEmmanuel Vadot		compatible = "regulator-fixed";
97*833e5d42SEmmanuel Vadot		enable-active-high;
98*833e5d42SEmmanuel Vadot		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
99*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
100*833e5d42SEmmanuel Vadot		pinctrl-0 = <&otg_vbus_drv>;
101*833e5d42SEmmanuel Vadot		regulator-name = "vcc5v0_otg";
102*833e5d42SEmmanuel Vadot		regulator-always-on;
103*833e5d42SEmmanuel Vadot		vin-supply = <&vcc5v0_sys>;
104*833e5d42SEmmanuel Vadot	};
105*833e5d42SEmmanuel Vadot
106*833e5d42SEmmanuel Vadot	sdio_pwrseq: sdio-pwrseq {
107*833e5d42SEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
108*833e5d42SEmmanuel Vadot		pinctrl-0 = <&wifi_enable_h>;
109*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
110*833e5d42SEmmanuel Vadot		/*
111*833e5d42SEmmanuel Vadot		 * On the module itself this is one of these (depending
112*833e5d42SEmmanuel Vadot		 * on the actual card populated):
113*833e5d42SEmmanuel Vadot		 * - SDIO_RESET_L_WL_REG_ON
114*833e5d42SEmmanuel Vadot		 * - PDN (power down when low)
115*833e5d42SEmmanuel Vadot		 */
116*833e5d42SEmmanuel Vadot		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
117*833e5d42SEmmanuel Vadot	};
118*833e5d42SEmmanuel Vadot};
119*833e5d42SEmmanuel Vadot
120*833e5d42SEmmanuel Vadot&cpu0 {
121*833e5d42SEmmanuel Vadot	cpu-supply = <&vdd_core>;
122*833e5d42SEmmanuel Vadot};
123*833e5d42SEmmanuel Vadot
124*833e5d42SEmmanuel Vadot&emmc {
125*833e5d42SEmmanuel Vadot	bus-width = <8>;
126*833e5d42SEmmanuel Vadot	cap-mmc-highspeed;
127*833e5d42SEmmanuel Vadot	non-removable;
128*833e5d42SEmmanuel Vadot	status = "okay";
129*833e5d42SEmmanuel Vadot};
130*833e5d42SEmmanuel Vadot
131*833e5d42SEmmanuel Vadot&i2c1 {
132*833e5d42SEmmanuel Vadot	status = "okay";
133*833e5d42SEmmanuel Vadot};
134*833e5d42SEmmanuel Vadot
135*833e5d42SEmmanuel Vadot&pinctrl {
136*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
137*833e5d42SEmmanuel Vadot	pinctrl-0 = <&rtc_32k>;
138*833e5d42SEmmanuel Vadot
139*833e5d42SEmmanuel Vadot	bluetooth {
140*833e5d42SEmmanuel Vadot		bt_reg_on: bt-reg-on {
141*833e5d42SEmmanuel Vadot			rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
142*833e5d42SEmmanuel Vadot		};
143*833e5d42SEmmanuel Vadot
144*833e5d42SEmmanuel Vadot		bt_wake_host: bt-wake-host {
145*833e5d42SEmmanuel Vadot			rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
146*833e5d42SEmmanuel Vadot		};
147*833e5d42SEmmanuel Vadot
148*833e5d42SEmmanuel Vadot		host_wake_bt: host-wake-bt {
149*833e5d42SEmmanuel Vadot			rockchip,pins = <4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
150*833e5d42SEmmanuel Vadot		};
151*833e5d42SEmmanuel Vadot	};
152*833e5d42SEmmanuel Vadot
153*833e5d42SEmmanuel Vadot	sdio-pwrseq {
154*833e5d42SEmmanuel Vadot		wifi_enable_h: wifi-enable-h {
155*833e5d42SEmmanuel Vadot			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
156*833e5d42SEmmanuel Vadot		};
157*833e5d42SEmmanuel Vadot	};
158*833e5d42SEmmanuel Vadot
159*833e5d42SEmmanuel Vadot	usb {
160*833e5d42SEmmanuel Vadot		otg_vbus_drv: otg-vbus-drv {
161*833e5d42SEmmanuel Vadot			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
162*833e5d42SEmmanuel Vadot		};
163*833e5d42SEmmanuel Vadot	};
164*833e5d42SEmmanuel Vadot
165*833e5d42SEmmanuel Vadot	wifi {
166*833e5d42SEmmanuel Vadot		wifi_host_wake: wifi-host-wake {
167*833e5d42SEmmanuel Vadot			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
168*833e5d42SEmmanuel Vadot		};
169*833e5d42SEmmanuel Vadot	};
170*833e5d42SEmmanuel Vadot};
171*833e5d42SEmmanuel Vadot
172*833e5d42SEmmanuel Vadot&pwm0 {
173*833e5d42SEmmanuel Vadot	status = "okay";
174*833e5d42SEmmanuel Vadot	pinctrl-0 = <&pwm0_pin_pull_down>;
175*833e5d42SEmmanuel Vadot};
176*833e5d42SEmmanuel Vadot
177*833e5d42SEmmanuel Vadot&pwm3 {
178*833e5d42SEmmanuel Vadot	status = "okay";
179*833e5d42SEmmanuel Vadot};
180*833e5d42SEmmanuel Vadot
181*833e5d42SEmmanuel Vadot&saradc {
182*833e5d42SEmmanuel Vadot	vref-supply = <&vcc_1v8>;
183*833e5d42SEmmanuel Vadot	status = "okay";
184*833e5d42SEmmanuel Vadot};
185*833e5d42SEmmanuel Vadot
186*833e5d42SEmmanuel Vadot&sdio {
187*833e5d42SEmmanuel Vadot	#address-cells = <1>;
188*833e5d42SEmmanuel Vadot	#size-cells = <0>;
189*833e5d42SEmmanuel Vadot	cap-sd-highspeed;
190*833e5d42SEmmanuel Vadot	cap-sdio-irq;
191*833e5d42SEmmanuel Vadot	keep-power-in-suspend;
192*833e5d42SEmmanuel Vadot	mmc-pwrseq = <&sdio_pwrseq>;
193*833e5d42SEmmanuel Vadot	non-removable;
194*833e5d42SEmmanuel Vadot	no-mmc;
195*833e5d42SEmmanuel Vadot	no-sd;
196*833e5d42SEmmanuel Vadot	status = "okay";
197*833e5d42SEmmanuel Vadot
198*833e5d42SEmmanuel Vadot	brcmf: wifi@1 {
199*833e5d42SEmmanuel Vadot		compatible = "brcm,bcm43455-fmac", "brcm,bcm4329-fmac";
200*833e5d42SEmmanuel Vadot		reg = <1>;
201*833e5d42SEmmanuel Vadot		interrupt-parent = <&gpio0>;
202*833e5d42SEmmanuel Vadot		interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
203*833e5d42SEmmanuel Vadot		interrupt-names = "host-wake";
204*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
205*833e5d42SEmmanuel Vadot		pinctrl-0 = <&wifi_host_wake>;
206*833e5d42SEmmanuel Vadot	};
207*833e5d42SEmmanuel Vadot};
208*833e5d42SEmmanuel Vadot
209*833e5d42SEmmanuel Vadot&sdmmc {
210*833e5d42SEmmanuel Vadot	cap-mmc-highspeed;
211*833e5d42SEmmanuel Vadot	cap-sd-highspeed;
212*833e5d42SEmmanuel Vadot	disable-wp;
213*833e5d42SEmmanuel Vadot	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_det &sdmmc_bus4>;
214*833e5d42SEmmanuel Vadot	card-detect-delay = <800>;
215*833e5d42SEmmanuel Vadot	status = "okay";
216*833e5d42SEmmanuel Vadot};
217*833e5d42SEmmanuel Vadot
218*833e5d42SEmmanuel Vadot&uart2 {
219*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
220*833e5d42SEmmanuel Vadot	pinctrl-0 = <&uart2m0_xfer>;
221*833e5d42SEmmanuel Vadot	status = "okay";
222*833e5d42SEmmanuel Vadot};
223*833e5d42SEmmanuel Vadot
224*833e5d42SEmmanuel Vadot&uart4 {
225*833e5d42SEmmanuel Vadot	pinctrl-names = "default";
226*833e5d42SEmmanuel Vadot	uart-has-rtscts;
227*833e5d42SEmmanuel Vadot	status = "okay";
228*833e5d42SEmmanuel Vadot
229*833e5d42SEmmanuel Vadot	bluetooth {
230*833e5d42SEmmanuel Vadot		compatible = "brcm,bcm4345c5";
231*833e5d42SEmmanuel Vadot		clocks = <&cru SCLK_RTC32K>;
232*833e5d42SEmmanuel Vadot		clock-names = "lpo";
233*833e5d42SEmmanuel Vadot		pinctrl-names = "default";
234*833e5d42SEmmanuel Vadot		pinctrl-0 = <&host_wake_bt &bt_wake_host &bt_reg_on>;
235*833e5d42SEmmanuel Vadot		device-wakeup-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
236*833e5d42SEmmanuel Vadot		host-wakeup-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
237*833e5d42SEmmanuel Vadot		shutdown-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
238*833e5d42SEmmanuel Vadot		max-speed = <1500000>;
239*833e5d42SEmmanuel Vadot	};
240*833e5d42SEmmanuel Vadot};
241*833e5d42SEmmanuel Vadot
242*833e5d42SEmmanuel Vadot&u2phy {
243*833e5d42SEmmanuel Vadot	status = "okay";
244*833e5d42SEmmanuel Vadot};
245*833e5d42SEmmanuel Vadot
246*833e5d42SEmmanuel Vadot&u2phy_otg {
247*833e5d42SEmmanuel Vadot	status = "okay";
248*833e5d42SEmmanuel Vadot};
249*833e5d42SEmmanuel Vadot
250*833e5d42SEmmanuel Vadot&u2phy_host {
251*833e5d42SEmmanuel Vadot	status = "okay";
252*833e5d42SEmmanuel Vadot};
253*833e5d42SEmmanuel Vadot
254*833e5d42SEmmanuel Vadot&usb20_otg {
255*833e5d42SEmmanuel Vadot	dr_mode = "peripheral";
256*833e5d42SEmmanuel Vadot	status = "okay";
257*833e5d42SEmmanuel Vadot};
258*833e5d42SEmmanuel Vadot
259*833e5d42SEmmanuel Vadot&usb_host_ehci {
260*833e5d42SEmmanuel Vadot	status = "okay";
261*833e5d42SEmmanuel Vadot};
262*833e5d42SEmmanuel Vadot
263*833e5d42SEmmanuel Vadot&usb_host_ohci {
264*833e5d42SEmmanuel Vadot	status = "okay";
265*833e5d42SEmmanuel Vadot};
266