forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 95099d4622f8cb224d94e314c7a8e0df60b13f87
kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10-linux.dts
....@@ -8,6 +8,7 @@
88 #include <dt-bindings/display/drm_mipi_dsi.h>
99 #include <dt-bindings/sensor-dev.h>
1010 #include <dt-bindings/pwm/pwm.h>
11
+#include "dt-bindings/usb/pd.h"
1112 #include "rk3399pro.dtsi"
1213 #include "rk3399-linux.dtsi"
1314 #include "rk3399-opp.dtsi"
....@@ -196,6 +197,16 @@
196197 reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
197198 };
198199
200
+ vbus_typec: vbus-typec-regulator {
201
+ compatible = "regulator-fixed";
202
+ enable-active-high;
203
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
204
+ pinctrl-names = "default";
205
+ pinctrl-0 = <&vcc5v0_typec0_en>;
206
+ regulator-name = "vbus_typec";
207
+ vin-supply = <&vcc5v0_sys>;
208
+ };
209
+
199210 vcc_phy: vcc-phy-regulator {
200211 compatible = "regulator-fixed";
201212 regulator-name = "vcc_phy";
....@@ -238,7 +249,6 @@
238249
239250 &cdn_dp {
240251 status = "okay";
241
- extcon = <&fusb0>;
242252 phys = <&tcphy0_dp>;
243253 };
244254
....@@ -647,7 +657,6 @@
647657 bq25700: bq25700@6b {
648658 compatible = "ti,bq25703";
649659 reg = <0x6b>;
650
- extcon = <&fusb0>;
651660 interrupt-parent = <&gpio1>;
652661 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
653662 pinctrl-names = "default";
....@@ -774,13 +783,52 @@
774783 i2c-scl-falling-time-ns = <11>;
775784 clock-frequency = <100000>;
776785
777
- fusb0: fusb30x@22 {
778
- compatible = "fairchild,fusb302";
786
+ usbc0: fusb302@22 {
787
+ compatible = "fcs,fusb302";
779788 reg = <0x22>;
789
+ interrupt-parent = <&gpio1>;
790
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
780791 pinctrl-names = "default";
781
- pinctrl-0 = <&fusb0_int>;
782
- int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
792
+ pinctrl-0 = <&usbc0_int>;
793
+ vbus-supply = <&vbus_typec>;
783794 status = "okay";
795
+
796
+ ports {
797
+ #address-cells = <1>;
798
+ #size-cells = <0>;
799
+
800
+ port@0 {
801
+ reg = <0>;
802
+ usbc0_role_sw: endpoint@0 {
803
+ remote-endpoint = <&dwc3_0_role_switch>;
804
+ };
805
+ };
806
+ };
807
+
808
+ usb_con: connector {
809
+ compatible = "usb-c-connector";
810
+ label = "USB-C";
811
+ data-role = "dual";
812
+ power-role = "dual";
813
+ try-power-role = "sink";
814
+ op-sink-microwatt = <1000000>;
815
+ sink-pdos =
816
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
817
+ source-pdos =
818
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
819
+
820
+ ports {
821
+ #address-cells = <1>;
822
+ #size-cells = <0>;
823
+
824
+ port@0 {
825
+ reg = <0>;
826
+ usbc0_orien_sw: endpoint {
827
+ remote-endpoint = <&tcphy0_orientation_switch>;
828
+ };
829
+ };
830
+ };
831
+ };
784832 };
785833
786834 };
....@@ -982,8 +1030,16 @@
9821030 };
9831031
9841032 &tcphy0 {
985
- extcon = <&fusb0>;
9861033 status = "okay";
1034
+ orientation-switch;
1035
+ port {
1036
+ #address-cells = <1>;
1037
+ #size-cells = <0>;
1038
+ tcphy0_orientation_switch: endpoint@0 {
1039
+ reg = <0>;
1040
+ remote-endpoint = <&usbc0_orien_sw>;
1041
+ };
1042
+ };
9871043 };
9881044
9891045 &tcphy1 {
....@@ -998,7 +1054,6 @@
9981054
9991055 &u2phy0 {
10001056 status = "okay";
1001
- extcon = <&fusb0>;
10021057
10031058 u2phy0_otg: otg-port {
10041059 status = "okay";
....@@ -1054,7 +1109,15 @@
10541109
10551110 &usbdrd_dwc3_0 {
10561111 status = "okay";
1057
- extcon = <&fusb0>;
1112
+ usb-role-switch;
1113
+ port {
1114
+ #address-cells = <1>;
1115
+ #size-cells = <0>;
1116
+ dwc3_0_role_switch: endpoint@0 {
1117
+ reg = <0>;
1118
+ remote-endpoint = <&usbc0_role_sw>;
1119
+ };
1120
+ };
10581121 };
10591122
10601123 &usbdrd_dwc3_1 {
....@@ -1085,13 +1148,6 @@
10851148 charger_ok_int: charger-ok-int {
10861149 rockchip,pins =
10871150 <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
1088
- };
1089
- };
1090
-
1091
- fusb30x {
1092
- fusb0_int: fusb0-int {
1093
- rockchip,pins =
1094
- <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
10951151 };
10961152 };
10971153
....@@ -1146,6 +1202,16 @@
11461202 };
11471203 };
11481204
1205
+ usb-typec {
1206
+ usbc0_int: usbc0-int {
1207
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1208
+ };
1209
+
1210
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1211
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1212
+ };
1213
+ };
1214
+
11491215 sdio-pwrseq {
11501216 wifi_enable_h: wifi-enable-h {
11511217 rockchip,pins =