Skip to content

Commit 4be684e

Browse files
authored
Merge pull request #282 from Ken-Vamrs/main
cm5: update otg port overlay
2 parents e48d436 + fef8986 commit 4be684e

File tree

5 files changed

+230
-2
lines changed

5 files changed

+230
-2
lines changed

arch/arm64/boot/dts/rockchip/overlays/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ dtb-$(CONFIG_CLK_RK3568) += \
136136
radxa-cm3-io-rpi-camera-v1p3-ov5647-cam1.dtbo \
137137
radxa-cm3-io-rpi-camera-v1p3-ov5647-cam2.dtbo \
138138
radxa-cm3-io-pcie2x1.dtbo \
139+
radxa-cm3-radxa-taco-pcie2x1.dtbo \
139140
radxa-cm3-raspcm4io-pcie2x1.dtbo \
140141
radxa-cm3-rpi-cm4-7inch-touchscreen-disp0.dtbo \
141142
radxa-cm3-rpi-cm4-7inch-touchscreen-disp1.dtbo \
@@ -414,6 +415,7 @@ dtb-$(CONFIG_CPU_RK3588) += \
414415
radxa-cm5-io-okdo-5mp.dtbo \
415416
radxa-cm5-io-radxa-display-8hd.dtbo \
416417
radxa-cm5-io-radxa-camera-4k.dtbo \
418+
radxa-cm5-io-radxa-camera-8m.dtbo \
417419
radxa-cm5-io-radxa-display-10fhd.dtbo \
418420
radxa-cm5-io-radxa-display-10hd.dtbo \
419421
radxa-cm5-io-radxa-display-8hd.dtbo \
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/gpio/gpio.h>
5+
#include <dt-bindings/pinctrl/rockchip.h>
6+
7+
/ {
8+
metadata {
9+
title = "Enable PCIe on Radxa Taco";
10+
compatible = "radxa,cm3-io", "radxa,cm3-rpi-cm4-io";
11+
category = "misc";
12+
exclusive = "pcie2x1";
13+
description = "Enable PCIe on Radxa Taco.\nWhen PCIe is enabled, SATA2 cannot be enabled on the same port.";
14+
};
15+
};
16+
17+
&{/} {
18+
pcie2x1-en-regulator {
19+
compatible = "regulator-fixed";
20+
enable-active-high;
21+
gpio = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
22+
pinctrl-names = "default";
23+
pinctrl-0 = <&pcie2x1_en>;
24+
regulator-name = "pcie2x1_en";
25+
regulator-always-on;
26+
regulator-boot-on;
27+
status = "okay";
28+
};
29+
};
30+
31+
&pcie2x1 {
32+
status = "okay";
33+
reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
34+
vpcie3v3-supply = <&vcc3v3_sys>;
35+
pinctrl-0 = <&pcie20m2_pins>;
36+
};
37+
38+
&sata2 {
39+
status = "disabled";
40+
};
41+
42+
&pinctrl {
43+
pcie2x1_en_gpio{
44+
pcie2x1_en: pcie2x1-en{
45+
rockchip,pins = <3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
46+
};
47+
};
48+
};
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
/dts-v1/;
2+
/plugin/;
3+
4+
#include <dt-bindings/gpio/gpio.h>
5+
#include <dt-bindings/pinctrl/rockchip.h>
6+
7+
/ {
8+
metadata {
9+
title ="Enable Radxa Camera 8M 219 on CSI0";
10+
compatible = "radxa,cm5-io";
11+
category = "camera";
12+
exclusive = "csi2_dphy0";
13+
description = "Enable Radxa Camera 8M 219 on CSI0.";
14+
};
15+
};
16+
17+
&{/} {
18+
camera_pwdn_gpio: camera-pwdn-gpio {
19+
compatible = "regulator-fixed";
20+
regulator-name = "camera_pwdn_gpio";
21+
regulator-always-on;
22+
regulator-boot-on;
23+
enable-active-high;
24+
gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
25+
pinctrl-names = "default";
26+
pinctrl-0 = <&cam_pwdn_gpio>;
27+
};
28+
29+
clk_cam_24m: external-camera-clock-24m {
30+
compatible = "fixed-clock";
31+
clock-frequency = <24000000>;
32+
clock-output-names = "clk_cam_24m";
33+
#clock-cells = <0>;
34+
};
35+
};
36+
37+
&i2c7 {
38+
status = "okay";
39+
pinctrl-0 = <&i2c7m2_xfer>;
40+
#address-cells = <1>;
41+
#size-cells = <0>;
42+
43+
camera_imx219: camera-imx219@10 {
44+
compatible = "sony,imx219";
45+
reg = <0x10>;
46+
47+
clocks = <&clk_cam_24m>;
48+
clock-names = "xvclk";
49+
50+
rockchip,camera-module-index = <1>;
51+
rockchip,camera-module-facing = "front";
52+
rockchip,camera-module-name = "RADXA-CAMERA-8M";
53+
rockchip,camera-module-lens-name = "default";
54+
55+
port {
56+
imx219_out0: endpoint {
57+
remote-endpoint = <&mipidphy0_in_ucam1>;
58+
data-lanes = <1 2>;
59+
};
60+
};
61+
};
62+
};
63+
64+
&csi2_dphy0_hw {
65+
status = "okay";
66+
};
67+
68+
&csi2_dphy0 {
69+
status = "okay";
70+
ports {
71+
#address-cells = <1>;
72+
#size-cells = <0>;
73+
port@0 {
74+
reg = <0>;
75+
#address-cells = <1>;
76+
#size-cells = <0>;
77+
78+
mipidphy0_in_ucam1: endpoint@2 {
79+
reg = <2>;
80+
remote-endpoint = <&imx219_out0>;
81+
data-lanes = <1 2>;
82+
};
83+
};
84+
};
85+
86+
port@1 {
87+
reg = <1>;
88+
#address-cells = <1>;
89+
#size-cells = <0>;
90+
91+
csidphy0_out: endpoint@0 {
92+
reg = <0>;
93+
remote-endpoint = <&mipi2_csi2_input>;
94+
};
95+
};
96+
};
97+
98+
&mipi2_csi2 {
99+
status = "okay";
100+
ports {
101+
#address-cells = <1>;
102+
#size-cells = <0>;
103+
port@0 {
104+
reg = <0>;
105+
#address-cells = <1>;
106+
#size-cells = <0>;
107+
108+
mipi2_csi2_input: endpoint@1 {
109+
reg = <1>;
110+
remote-endpoint = <&csidphy0_out>;
111+
};
112+
};
113+
port@1 {
114+
reg = <1>;
115+
#address-cells = <1>;
116+
#size-cells = <0>;
117+
118+
mipi2_csi2_output: endpoint@0 {
119+
reg = <0>;
120+
remote-endpoint = <&cif_mipi2_in0>;
121+
};
122+
};
123+
};
124+
};
125+
126+
&rkcif {
127+
status = "okay";
128+
};
129+
130+
&rkcif_mipi_lvds2 {
131+
status = "okay";
132+
port {
133+
cif_mipi2_in0: endpoint {
134+
remote-endpoint = <&mipi2_csi2_output>;
135+
};
136+
};
137+
};
138+
139+
&rkcif_mipi_lvds2_sditf {
140+
status = "okay";
141+
port {
142+
mipi_lvds2_sditf: endpoint {
143+
remote-endpoint = <&isp0_vir0>;
144+
};
145+
};
146+
};
147+
148+
&rkcif_mmu {
149+
status = "okay";
150+
};
151+
152+
&isp0_mmu {
153+
status = "okay";
154+
};
155+
156+
&rkisp0 {
157+
status = "okay";
158+
};
159+
160+
&rkisp0_vir0 {
161+
status = "okay";
162+
port {
163+
#address-cells = <1>;
164+
#size-cells = <0>;
165+
isp0_vir0: endpoint@0 {
166+
reg = <0>;
167+
remote-endpoint = <&mipi_lvds2_sditf>;
168+
};
169+
};
170+
};
171+
172+
&pinctrl {
173+
camera {
174+
cam_pwdn_gpio: cam-pwdn-gpio {
175+
rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
176+
};
177+
};
178+
};

arch/arm64/boot/dts/rockchip/overlays/rk3588-dwc3-host.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/ {
55
metadata {
66
title = "Set OTG port 0 to Host mode";
7-
compatible = "rockchip,rk3588";
7+
compatible = "radxa,rock-5a", "radxa,rock-5b", "radxa,rock-5c", "radxa,nx5-io";
88
category = "misc";
99
exclusive = "usbdrd_dwc3-dr_mode";
1010
description = "Set OTG port 0 to Host mode.\nUse this when you want to connect USB devices.";

arch/arm64/boot/dts/rockchip/overlays/rk3588-dwc3-peripheral.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/ {
55
metadata {
66
title = "Set OTG port 0 to Peripheral mode";
7-
compatible = "rockchip,rk3588";
7+
compatible = "radxa,rock-5a", "radxa,rock-5b", "radxa,rock-5c", "radxa,nx5-io";
88
category = "misc";
99
exclusive = "usbdrd_dwc3-dr_mode";
1010
description = "Set OTG port 0 to Peripheral mode.\nUse this when you want to connect to another computer.";

0 commit comments

Comments
 (0)