Roc rk3399 pc enable type C (#3953)
* roc-rk3399-pc remove outdated patch * roc-rk3399-pc enable type-c
This commit is contained in:
parent
eef3b33807
commit
9680fc46a0
@ -0,0 +1,189 @@
|
||||
From 70de721816c1a353ee88f55e8b1ea9b039b2b19e Mon Sep 17 00:00:00 2001
|
||||
From: tonymac32 <tonymckahan@gmail.com>
|
||||
Date: Sat, 18 Jun 2022 01:26:00 -0400
|
||||
Subject: [PATCH] RK3399-roc-pc usb type C
|
||||
|
||||
Signed-off-by: tonymac32 <tonymckahan@gmail.com>
|
||||
---
|
||||
.../boot/dts/rockchip/rk3399-roc-pc.dtsi | 126 ++++++++++++++++++
|
||||
1 file changed, 126 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
index d1aaf8e83..e55a24dbd 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
@@ -6,6 +6,7 @@
|
||||
/dts-v1/;
|
||||
#include <dt-bindings/input/linux-event-codes.h>
|
||||
#include <dt-bindings/pwm/pwm.h>
|
||||
+#include <dt-bindings/usb/pd.h>
|
||||
#include "rk3399.dtsi"
|
||||
#include "rk3399-opp.dtsi"
|
||||
|
||||
@@ -537,6 +538,46 @@ fusb1: usb-typec@22 {
|
||||
pinctrl-0 = <&fusb1_int>;
|
||||
vbus-supply = <&vcc_vbus_typec1>;
|
||||
status = "okay";
|
||||
+
|
||||
+ connector {
|
||||
+ compatible = "usb-c-connector";
|
||||
+ data-role = "dual";
|
||||
+ label = "USB-C1";
|
||||
+ power-role = "source";
|
||||
+ source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
|
||||
+ sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ usbc1_hs: endpoint {
|
||||
+ remote-endpoint =
|
||||
+ <&u2phy1_typec_hs>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ usbc1_ss: endpoint {
|
||||
+ remote-endpoint =
|
||||
+ <&tcphy1_typec_ss>;
|
||||
+ };
|
||||
+ };
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+
|
||||
+ usbc1_dp: endpoint {
|
||||
+ remote-endpoint =
|
||||
+ <&tcphy1_typec_dp>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
};
|
||||
|
||||
@@ -554,6 +595,47 @@ fusb0: usb-typec@22 {
|
||||
pinctrl-0 = <&fusb0_int>;
|
||||
vbus-supply = <&vcc_vbus_typec0>;
|
||||
status = "okay";
|
||||
+
|
||||
+ connector {
|
||||
+ compatible = "usb-c-connector";
|
||||
+ data-role = "host";
|
||||
+ label = "USB-C0";
|
||||
+ op-sink-microwatt = <15000000>;
|
||||
+ power-role = "sink";
|
||||
+ source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
|
||||
+ sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
|
||||
+
|
||||
+ ports {
|
||||
+ #address-cells = <1>;
|
||||
+ #size-cells = <0>;
|
||||
+
|
||||
+ port@0 {
|
||||
+ reg = <0>;
|
||||
+
|
||||
+ usbc0_hs: endpoint {
|
||||
+ remote-endpoint =
|
||||
+ <&u2phy0_typec_hs>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ port@1 {
|
||||
+ reg = <1>;
|
||||
+
|
||||
+ usbc0_ss: endpoint {
|
||||
+ remote-endpoint =
|
||||
+ <&tcphy0_typec_ss>;
|
||||
+ };
|
||||
+ };
|
||||
+ port@2 {
|
||||
+ reg = <2>;
|
||||
+
|
||||
+ usbc0_dp: endpoint {
|
||||
+ remote-endpoint =
|
||||
+ <&tcphy0_typec_dp>;
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
mp8859: regulator@66 {
|
||||
@@ -743,10 +825,42 @@ &tcphy0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tcphy0_dp {
|
||||
+ port {
|
||||
+ tcphy0_typec_dp: endpoint {
|
||||
+ remote-endpoint = <&usbc0_dp>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tcphy0_usb3 {
|
||||
+ port {
|
||||
+ tcphy0_typec_ss: endpoint {
|
||||
+ remote-endpoint = <&usbc0_ss>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&tcphy1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
+&tcphy1_dp {
|
||||
+ port {
|
||||
+ tcphy1_typec_dp: endpoint {
|
||||
+ remote-endpoint = <&usbc1_dp>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&tcphy1_usb3 {
|
||||
+ port {
|
||||
+ tcphy1_typec_ss: endpoint {
|
||||
+ remote-endpoint = <&usbc1_ss>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
&tsadc {
|
||||
/* tshut mode 0:CRU 1:GPIO */
|
||||
rockchip,hw-tshut-mode = <1>;
|
||||
@@ -767,6 +881,12 @@ u2phy0_host: host-port {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ port {
|
||||
+ u2phy0_typec_hs: endpoint {
|
||||
+ remote-endpoint = <&usbc0_hs>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&u2phy1 {
|
||||
@@ -781,6 +901,12 @@ u2phy1_host: host-port {
|
||||
phy-supply = <&vcc5v0_host>;
|
||||
status = "okay";
|
||||
};
|
||||
+
|
||||
+ port {
|
||||
+ u2phy1_typec_hs: endpoint {
|
||||
+ remote-endpoint = <&usbc1_hs>;
|
||||
+ };
|
||||
+ };
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
--
|
||||
Created with Armbian build tools https://github.com/armbian/build
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
index 9f225e9c3..057c938be 100644
|
||||
--- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
+++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi
|
||||
@@ -506,7 +506,7 @@
|
||||
status = "okay";
|
||||
|
||||
fusb1: usb-typec@22 {
|
||||
- compatible = "fcs,fusb302";
|
||||
+ compatible = "fairchild,fusb302";
|
||||
reg = <0x22>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
|
||||
@@ -523,7 +523,7 @@
|
||||
status = "okay";
|
||||
|
||||
fusb0: usb-typec@22 {
|
||||
- compatible = "fcs,fusb302";
|
||||
+ compatible = "fairchild,fusb302";
|
||||
reg = <0x22>;
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
|
||||
Loading…
Reference in New Issue
Block a user