Skip to content

Commit

Permalink
Merge pull request #351 from lsj123lsjlsj/medge-rk3528a-io
Browse files Browse the repository at this point in the history
feat: add medge-rk3528a io board to the overlays of the rk3528 series
  • Loading branch information
RadxaYuntian authored Jul 31, 2024
2 parents 5640606 + 13dbf27 commit fc1556b
Show file tree
Hide file tree
Showing 22 changed files with 105 additions and 21 deletions.
2 changes: 2 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ dtb-$(CONFIG_CPU_RK3399) += \
rock-4-radxa-display-10hd.dtbo

dtb-$(CONFIG_CLK_RK3528) += \
medge-rk3528a-io-enable-pcie.dtbo \
rk3528-dwc3-host.dtbo \
rk3528-dwc3-otg.dtbo \
rk3528-dwc3-peripheral.dtbo \
Expand All @@ -128,6 +129,7 @@ dtb-$(CONFIG_CLK_RK3528) += \
rk3528-pwm0-m0.dtbo \
rk3528-pwm3-m0.dtbo \
rk3528-pwm4-m0.dtbo \
rk3528-pwm4-m1.dtbo \
rk3528-pwm5-m0.dtbo \
rk3528-pwm6-m0.dtbo \
rk3528-spi0-cs1-enc28j60.dtbo \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/rockchip.h>

/ {
metadata {
title = "Enable PCIe";
compatible = "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "pcie2x1", "usbdrd_dwc3";
description = "Enable PCIe.
After enabling PCIe, the USB OTG port is limited to USB 2.0 speed.";
};
};

&{/} {
vcc3v3_pcie: vcc3v3-pcie {
compatible = "regulator-fixed";
regulator-name = "vcc3v3_pcie";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
startup-delay-us = <5000>;
enable-active-high;
gpio = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_sys>;
};
};

&pcie_usb_selection {
enable-active-high;
gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
};

&usbdrd_dwc3 {
phys = <&u2phy_otg>;
phy-names = "usb2-phy";
maximum-speed = "high-speed";
snps,dis_u2_susphy_quirk;
snps,usb2-lpm-disable;
};

&pcie2x1 {
reset-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
vpcie3v3-supply = <&vcc3v3_pcie>;
status = "okay";
};
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-dwc3-host.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/ {
metadata {
title = "Set OTG port to Host mode";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "usbdrd_dwc3-dr_mode";
description = "Set OTG port to Host mode.
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-dwc3-otg.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/ {
metadata {
title = "Set OTG port to be controlled by hardware switch";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "usbdrd_dwc3-dr_mode";
description = "Set OTG port to be controlled by hardware switch.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/ {
metadata {
title = "Set OTG port to Peripheral mode";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "usbdrd_dwc3-dr_mode";
description = "Set OTG port to Peripheral mode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/ {
metadata {
title = "Enable analog video output";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "tve";
description = "Enable analog video output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
/ {
metadata {
title = "Enable FIQ Debugger on UART1-M0";
compatible = "unknown";
compatible = "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_A7", "GPIO4_A6";
description = "Enable FIQ Debugger on UART1-M0.";
description = "Enable FIQ Debugger on UART1-M0.
On Radxa mEdge-RK3528A IO this is TX pin 7 & RX pin 32.
";
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable FIQ Debugger on UART2-M1";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO1_B1", "GPIO1_B0";
description = "Enable FIQ Debugger on UART2-M1.
On Radxa ROCK 2A this is TX pin 33 & RX pin 31.
On Radxa ROCK 2F this is TX pin 33 & RX pin 31.
On Radxa mEdge-RK3528A IO this is TX pin 33 & RX pin 31.
";
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable FIQ Debugger on UART3-M0";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_B1", "GPIO4_B0";
description = "Enable FIQ Debugger on UART3-M0.
On Radxa ROCK 2A this is TX pin 18 & RX pin 16.
On Radxa ROCK 2F this is TX pin 18 & RX pin 16.
On Radxa mEdge-RK3528A IO this is TX pin 18 & RX pin 16.
";
};
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-i2c0-m1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
/ {
metadata {
title = "Enable I2C0-M1";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_A0", "GPIO4_A1", "i2c0";
description = "Enable I2C0-M1.
On Radxa 2A this is SDA pin 3 and SCL pin 5.
On Radxa 2A this is SDA pin 3 and SCL pin 5.
On Radxa mEdge-RK3528A IO this is SDA pin 3 and SCL pin 5.
";
};
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-i2c1-m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
/ {
metadata {
title = "Enable I2C1-M0";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_A2", "GPIO4_A3", "i2c1";
description = "Enable I2C1-M0.
On Radxa 2A this is SDA pin 27 and SCL pin 28.
On Radxa 2A this is SDA pin 27 and SCL pin 28.
On Radxa mEdge-RK3528A IO this is SDA pin 27 and SCL pin 28.
";
};
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-pwm0-m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable PWM0-M0";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_C3";
description = "Enable PWM0-M0.
On Radxa ROCK 2A this is pin 32.
On Radxa ROCK 2F this is pin 32.
On Radxa mEdge-RK3528A IO this is pin 11.
";
};
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-pwm3-m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable PWM3-M0";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_C6";
description = "Enable PWM3-M0.
On Radxa ROCK 2A this is pin 15.
On Radxa ROCK 2F this is pin 15.
On Radxa mEdge-RK3528A IO this is pin 13.
";
};
};
Expand Down
20 changes: 20 additions & 0 deletions arch/arm64/boot/dts/rockchip/overlays/rk3528-pwm4-m1.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/dts-v1/;
/plugin/;

/ {
metadata {
title = "Enable PWM4-M1";
compatible = "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO1_A4";
description = "Enable PWM4-M1.
On Radxa mEdge-RK3528A IO this is pin 15.
";
};
};

&pwm4 {
status = "okay";
pinctrl-names = "active";
pinctrl-0 = <&pwm4m1_pins>;
};
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-pwm6-m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable PWM6-M0";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_C1";
description = "Enable PWM6-M0.
On Radxa ROCK 2A this is pin 26.
On Radxa ROCK 2F this is pin 26.
On Radxa mEdge-RK3528A IO this is pin 26.
";
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/ {
metadata {
title = "Enable ENC28J60 on SPI0 CS1";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_B2", "GPIO4_B3", "GPIO4_B4", "GPIO4_C1", "GPIO4_C6";
description = "Enable Microchip ENC28J60 SPI Ethernet controller on SPI0 CS1.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

metadata {
title = "Enable MCP2515 on SPI0 CS1";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_B2", "GPIO4_B3", "GPIO4_B4", "GPIO4_C1", "GPIO4_C6";
description = "Enable MCP2515 on SPI0 CS1 with 12 MHz Crystal Oscillator.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/ {
metadata {
title = "Enable spidev on SPI0 over CS1";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_B2", "GPIO4_B3", "GPIO4_B4", "GPIO4_C1";
description = "Enable spidev on SPI0 over CS1.";
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-uart0-m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable UART0-M0";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_D0", "GPIO4_C7";
description = "Enable UART0-M0.
On Radxa ROCK 2A this is TX pin 8 & RX pin 10.
On Radxa ROCK 2F this is TX pin 8 & RX pin 10.
On Radxa mEdge-RK3528A IO this is TX pin 8 & RX pin 10.
";
};
};
Expand Down
6 changes: 4 additions & 2 deletions arch/arm64/boot/dts/rockchip/overlays/rk3528-uart1-m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
/ {
metadata {
title = "Enable UART1-M0";
compatible = "unknown";
compatible = "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_A7", "GPIO4_A6";
description = "Enable UART1-M0.";
description = "Enable UART1-M0.
On Radxa mEdge-RK3528A IO this is TX pin 7 & RX pin 32.
";
};
};

Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-uart2-m1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable UART2-M1";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO1_B1", "GPIO1_B0";
description = "Enable UART2-M1.
On Radxa ROCK 2A this is TX pin 33 & RX pin 31.
On Radxa ROCK 2F this is TX pin 33 & RX pin 31.
On Radxa mEdge-RK3528A IO this is TX pin 33 & RX pin 31.
";
};
};
Expand Down
3 changes: 2 additions & 1 deletion arch/arm64/boot/dts/rockchip/overlays/rk3528-uart3-m0.dts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
/ {
metadata {
title = "Enable UART3-M0";
compatible = "radxa,rock-2a", "radxa,rock-2f";
compatible = "radxa,rock-2a", "radxa,rock-2f", "radxa,medge-rk3528a-io";
category = "misc";
exclusive = "GPIO4_B1", "GPIO4_B0";
description = "Enable UART3-M0.
On Radxa ROCK 2A this is TX pin 18 & RX pin 16.
On Radxa ROCK 2F this is TX pin 18 & RX pin 16.
On Radxa mEdge-RK3528A IO this is TX pin 18 & RX pin 16.
";
};
};
Expand Down

0 comments on commit fc1556b

Please sign in to comment.