mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
179 lines
4.0 KiB
Diff
179 lines
4.0 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: John Doe <john.doe@somewhere.on.planet>
|
|
Date: Wed, 18 Jun 2025 06:25:34 +0000
|
|
Subject: arm64: dts: rockchip: Add USB-C to Khadas Edge 2
|
|
|
|
Signed-off-by: John Doe <john.doe@somewhere.on.planet>
|
|
---
|
|
arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts | 119 ++++++++++
|
|
1 file changed, 119 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
|
index 111111111111..222222222222 100644
|
|
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
|
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
|
|
@@ -7,6 +7,7 @@
|
|
#include <dt-bindings/pinctrl/rockchip.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
#include <dt-bindings/soc/rockchip,vop2.h>
|
|
+#include <dt-bindings/usb/pd.h>
|
|
#include "rk3588s.dtsi"
|
|
|
|
/ {
|
|
@@ -88,6 +89,18 @@ blue_led: led-2 {
|
|
};
|
|
};
|
|
|
|
+ vbus5v0_typec: vbus5v0-typec-regulator {
|
|
+ compatible = "regulator-fixed";
|
|
+ regulator-name = "vbus5v0_typec";
|
|
+ regulator-min-microvolt = <5000000>;
|
|
+ regulator-max-microvolt = <5000000>;
|
|
+ enable-active-high;
|
|
+ gpio = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
|
|
+ vin-supply = <&vcc5v0_sys>;
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&typec5v_pwren>;
|
|
+ };
|
|
+
|
|
vcc3v3_pcie_wl: regulator-vcc3v3-pcie-wl {
|
|
compatible = "regulator-fixed";
|
|
enable-active-high;
|
|
@@ -264,6 +277,57 @@ regulator-state-mem {
|
|
&i2c2 {
|
|
status = "okay";
|
|
|
|
+ usbc0: usb-typec@22 {
|
|
+ compatible = "fcs,fusb302";
|
|
+ reg = <0x22>;
|
|
+ interrupt-parent = <&gpio1>;
|
|
+ interrupts = <RK_PB5 IRQ_TYPE_LEVEL_LOW>;
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&usbc0_int>;
|
|
+ vbus-supply = <&vbus5v0_typec>;
|
|
+ status = "okay";
|
|
+
|
|
+ usb_con: connector {
|
|
+ compatible = "usb-c-connector";
|
|
+ label = "USB-C";
|
|
+ data-role = "dual";
|
|
+ power-role = "dual";
|
|
+ try-power-role = "source";
|
|
+ op-sink-microwatt = <1000000>;
|
|
+ sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
|
|
+ PDO_FIXED(9000, 3000, PDO_FIXED_USB_COMM)
|
|
+ PDO_FIXED(12000, 3000, PDO_FIXED_USB_COMM)>;
|
|
+ source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
|
|
+
|
|
+ ports {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ port@0 {
|
|
+ reg = <0>;
|
|
+ usbc0_orien_sw: endpoint {
|
|
+ remote-endpoint = <&usbdp_phy0_orientation_switch>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ port@1 {
|
|
+ reg = <1>;
|
|
+ usbc0_role_sw: endpoint {
|
|
+ remote-endpoint = <&dwc3_0_role_switch>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ port@2 {
|
|
+ reg = <2>;
|
|
+ dp_altmode_mux: endpoint {
|
|
+ remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+
|
|
+
|
|
hym8563: rtc@51 {
|
|
compatible = "haoyu,hym8563";
|
|
reg = <0x51>;
|
|
@@ -304,6 +368,16 @@ vcc5v0_host_en: vcc5v0-host-en {
|
|
};
|
|
};
|
|
|
|
+ usb-typec {
|
|
+ usbc0_int: usbc0-int {
|
|
+ rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
|
|
+ };
|
|
+
|
|
+ typec5v_pwren: typec5v-pwren {
|
|
+ rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
+ };
|
|
+ };
|
|
+
|
|
ir-receiver {
|
|
ir_receiver_pin: ir-receiver-pin {
|
|
rockchip,pins = <1 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
|
|
@@ -761,6 +835,14 @@ bluetooth {
|
|
};
|
|
};
|
|
|
|
+&u2phy0 {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
+&u2phy0_otg {
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
&u2phy2 {
|
|
status = "okay";
|
|
};
|
|
@@ -787,6 +869,43 @@ &usb_host0_ohci {
|
|
status = "okay";
|
|
};
|
|
|
|
+&usbdp_phy0 {
|
|
+ orientation-switch;
|
|
+ mode-switch;
|
|
+ sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
|
|
+ sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
|
|
+ status = "okay";
|
|
+
|
|
+ port {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ usbdp_phy0_orientation_switch: endpoint@0 {
|
|
+ reg = <0>;
|
|
+ remote-endpoint = <&usbc0_orien_sw>;
|
|
+ };
|
|
+
|
|
+ usbdp_phy0_dp_altmode_mux: endpoint@1 {
|
|
+ reg = <1>;
|
|
+ remote-endpoint = <&dp_altmode_mux>;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
+&usb_host0_xhci {
|
|
+ usb-role-switch;
|
|
+ status = "okay";
|
|
+
|
|
+ port {
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ dwc3_0_role_switch: endpoint@0 {
|
|
+ reg = <0>;
|
|
+ remote-endpoint = <&usbc0_role_sw>;
|
|
+ };
|
|
+ };
|
|
+};
|
|
+
|
|
&usb_host1_ehci {
|
|
status = "okay";
|
|
};
|
|
--
|
|
Armbian
|
|
|