b4a68d1558d7fc1f3d0058e79c486d9b87089d8e
[openwrt/staging/xback.git] /
1 From 096ebfb74b19f2d4bdcbc33ae02e857ff4b3e0a0 Mon Sep 17 00:00:00 2001
2 From: Jagan Teki <jagan@amarulasolutions.com>
3 Date: Thu, 12 Jan 2023 16:29:02 +0530
4 Subject: [PATCH] arm64: dts: rockchip: Add Radxa Compute Module 3 IO board
5
6 Radxa Compute Module 3(CM3) IO board is an application board from Radxa
7 and is compatible with Raspberry Pi CM4 IO form factor.
8
9 Specification:
10 - 1x HDMI,
11 - 2x MIPI DSI
12 - 2x MIPI CSI2
13 - 1x eDP
14 - 1x PCIe card
15 - 2x SATA
16 - 2x USB 2.0 Host
17 - 1x USB 3.0
18 - 1x USB 2.0 OTG
19 - Phone jack
20 - microSD slot
21 - 40-pin GPIO expansion header
22 - 12V DC
23
24 Radxa CM3 needs to mount on top of this IO board in order to create
25 complete Radxa CM3 IO board platform.
26
27 Add support for Radxa CM3 IO Board.
28
29 Co-developed-by: FUKAUMI Naoki <naoki@radxa.com>
30 Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
31 Co-developed-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
32 Signed-off-by: Manoj Sai <abbaraju.manojsai@amarulasolutions.com>
33 Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
34 Link: https://lore.kernel.org/r/20230112105902.192852-3-jagan@amarulasolutions.com
35 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
36 ---
37 arch/arm64/boot/dts/rockchip/Makefile | 1 +
38 .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 179 ++++++++++++++++++
39 2 files changed, 180 insertions(+)
40 create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
41
42 --- a/arch/arm64/boot/dts/rockchip/Makefile
43 +++ b/arch/arm64/boot/dts/rockchip/Makefile
44 @@ -70,6 +70,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pi
45 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
46 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
47 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
48 +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-radxa-cm3-io.dtb
49 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
50 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
51 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
52 --- /dev/null
53 +++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
54 @@ -0,0 +1,179 @@
55 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
56 +/*
57 + * Copyright (c) 2022 Radxa Limited
58 + * Copyright (c) 2022 Amarula Solutions(India)
59 + */
60 +
61 +/dts-v1/;
62 +#include <dt-bindings/soc/rockchip,vop2.h>
63 +#include "rk3566.dtsi"
64 +#include "rk3566-radxa-cm3.dtsi"
65 +
66 +/ {
67 + model = "Radxa Compute Module 3(CM3) IO Board";
68 + compatible = "radxa,radxa-cm3-io", "radxa,radxa-cm3", "rockchip,rk3566";
69 +
70 + aliases {
71 + mmc1 = &sdmmc0;
72 + };
73 +
74 + chosen: chosen {
75 + stdout-path = "serial2:1500000n8";
76 + };
77 +
78 + hdmi-con {
79 + compatible = "hdmi-connector";
80 + type = "a";
81 +
82 + port {
83 + hdmi_con_in: endpoint {
84 + remote-endpoint = <&hdmi_out_con>;
85 + };
86 + };
87 + };
88 +
89 + leds {
90 + compatible = "gpio-leds";
91 +
92 + led-1 {
93 + gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>;
94 + color = <LED_COLOR_ID_GREEN>;
95 + function = LED_FUNCTION_ACTIVITY;
96 + linux,default-trigger = "heartbeat";
97 + pinctrl-names = "default";
98 + pinctrl-0 = <&pi_nled_activity>;
99 + };
100 + };
101 +
102 + vcc5v0_usb30: vcc5v0-usb30-regulator {
103 + compatible = "regulator-fixed";
104 + regulator-name = "vcc5v0_usb30";
105 + enable-active-high;
106 + gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
107 + pinctrl-names = "default";
108 + pinctrl-0 = <&vcc5v0_usb30_en_h>;
109 + regulator-always-on;
110 + regulator-min-microvolt = <5000000>;
111 + regulator-max-microvolt = <5000000>;
112 + vin-supply = <&vcc_sys>;
113 + };
114 +
115 + vcca1v8_image: vcca1v8-image-regulator {
116 + compatible = "regulator-fixed";
117 + regulator-name = "vcca1v8_image";
118 + regulator-always-on;
119 + regulator-boot-on;
120 + regulator-min-microvolt = <1800000>;
121 + regulator-max-microvolt = <1800000>;
122 + vin-supply = <&vcc_1v8_p>;
123 + };
124 +
125 + vdda0v9_image: vdda0v9-image-regulator {
126 + compatible = "regulator-fixed";
127 + regulator-name = "vcca0v9_image";
128 + regulator-always-on;
129 + regulator-boot-on;
130 + regulator-min-microvolt = <900000>;
131 + regulator-max-microvolt = <900000>;
132 + vin-supply = <&vdda_0v9>;
133 + };
134 +};
135 +
136 +&combphy1 {
137 + status = "okay";
138 +};
139 +
140 +&hdmi {
141 + avdd-0v9-supply = <&vdda0v9_image>;
142 + avdd-1v8-supply = <&vcca1v8_image>;
143 + status = "okay";
144 +};
145 +
146 +&hdmi_in {
147 + hdmi_in_vp0: endpoint {
148 + remote-endpoint = <&vp0_out_hdmi>;
149 + };
150 +};
151 +
152 +&hdmi_out {
153 + hdmi_out_con: endpoint {
154 + remote-endpoint = <&hdmi_con_in>;
155 + };
156 +};
157 +
158 +&hdmi_sound {
159 + status = "okay";
160 +};
161 +
162 +&pinctrl {
163 + leds {
164 + pi_nled_activity: pi-nled-activity {
165 + rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
166 + };
167 + };
168 +
169 + sdcard {
170 + sdmmc_pwren: sdmmc-pwren {
171 + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
172 + };
173 + };
174 +
175 + usb {
176 + vcc5v0_usb30_en_h: vcc5v0-host-en-h {
177 + rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
178 + };
179 + };
180 +};
181 +
182 +&sdmmc0 {
183 + bus-width = <4>;
184 + cap-mmc-highspeed;
185 + cap-sd-highspeed;
186 + disable-wp;
187 + vqmmc-supply = <&vccio_sd>;
188 + pinctrl-names = "default";
189 + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_pwren>;
190 + status = "okay";
191 +};
192 +
193 +&uart2 {
194 + status = "okay";
195 +};
196 +
197 +&usb2phy0_host {
198 + phy-supply = <&vcc5v0_usb30>;
199 + status = "okay";
200 +};
201 +
202 +&usb2phy1_host {
203 + status = "okay";
204 +};
205 +
206 +&usb2phy1_otg {
207 + status = "okay";
208 +};
209 +
210 +&usb_host0_ehci {
211 + status = "okay";
212 +};
213 +
214 +&usb_host1_xhci {
215 + status = "okay";
216 +};
217 +
218 +&vop {
219 + assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
220 + assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
221 + status = "okay";
222 +};
223 +
224 +&vop_mmu {
225 + status = "okay";
226 +};
227 +
228 +&vp0 {
229 + vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
230 + reg = <ROCKCHIP_VOP2_EP_HDMI0>;
231 + remote-endpoint = <&hdmi_in_vp0>;
232 + };
233 +};