forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v10.dts
....@@ -124,6 +124,8 @@
124124 prepare-delay-ms = <20>;
125125 enable-delay-ms = <20>;
126126 reset-delay-ms = <20>;
127
+ width-mm = <120>;
128
+ height-mm = <160>;
127129
128130 display-timings {
129131 native-mode = <&timing0>;
....@@ -197,6 +199,16 @@
197199 reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
198200 };
199201
202
+ vbus_typec: vbus-typec-regulator {
203
+ compatible = "regulator-fixed";
204
+ enable-active-high;
205
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
206
+ pinctrl-names = "default";
207
+ pinctrl-0 = <&vcc5v0_typec0_en>;
208
+ regulator-name = "vbus_typec";
209
+ vin-supply = <&vcc5v0_sys>;
210
+ };
211
+
200212 vcc_phy: vcc-phy-regulator {
201213 compatible = "regulator-fixed";
202214 regulator-name = "vcc_phy";
....@@ -239,7 +251,6 @@
239251
240252 &cdn_dp {
241253 status = "okay";
242
- extcon = <&fusb0>;
243254 phys = <&tcphy0_dp>;
244255 };
245256
....@@ -676,7 +687,6 @@
676687 bq25700: bq25700@6b {
677688 compatible = "ti,bq25703";
678689 reg = <0x6b>;
679
- extcon = <&fusb0>;
680690 interrupt-parent = <&gpio1>;
681691 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
682692 pinctrl-names = "default";
....@@ -750,15 +760,53 @@
750760 i2c-scl-falling-time-ns = <11>;
751761 clock-frequency = <100000>;
752762
753
- fusb0: fusb30x@22 {
754
- compatible = "fairchild,fusb302";
763
+ usbc0: fusb302@22 {
764
+ compatible = "fcs,fusb302";
755765 reg = <0x22>;
766
+ interrupt-parent = <&gpio1>;
767
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
756768 pinctrl-names = "default";
757
- pinctrl-0 = <&fusb0_int>;
758
- int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
769
+ pinctrl-0 = <&usbc0_int>;
770
+ vbus-supply = <&vbus_typec>;
759771 status = "okay";
760
- };
761772
773
+ ports {
774
+ #address-cells = <1>;
775
+ #size-cells = <0>;
776
+
777
+ port@0 {
778
+ reg = <0>;
779
+ usbc0_role_sw: endpoint@0 {
780
+ remote-endpoint = <&dwc3_0_role_switch>;
781
+ };
782
+ };
783
+ };
784
+
785
+ usb_con: connector {
786
+ compatible = "usb-c-connector";
787
+ label = "USB-C";
788
+ data-role = "dual";
789
+ power-role = "dual";
790
+ try-power-role = "sink";
791
+ op-sink-microwatt = <1000000>;
792
+ sink-pdos =
793
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
794
+ source-pdos =
795
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
796
+
797
+ ports {
798
+ #address-cells = <1>;
799
+ #size-cells = <0>;
800
+
801
+ port@0 {
802
+ reg = <0>;
803
+ usbc0_orien_sw: endpoint {
804
+ remote-endpoint = <&tcphy0_orientation_switch>;
805
+ };
806
+ };
807
+ };
808
+ };
809
+ };
762810 };
763811
764812 &i2s1 {
....@@ -856,8 +904,16 @@
856904 };
857905
858906 &tcphy0 {
859
- extcon = <&fusb0>;
860907 status = "okay";
908
+ orientation-switch;
909
+ port {
910
+ #address-cells = <1>;
911
+ #size-cells = <0>;
912
+ tcphy0_orientation_switch: endpoint@0 {
913
+ reg = <0>;
914
+ remote-endpoint = <&usbc0_orien_sw>;
915
+ };
916
+ };
861917 };
862918
863919 &tcphy1 {
....@@ -872,7 +928,6 @@
872928
873929 &u2phy0 {
874930 status = "okay";
875
- extcon = <&fusb0>;
876931
877932 u2phy0_otg: otg-port {
878933 status = "okay";
....@@ -928,7 +983,15 @@
928983
929984 &usbdrd_dwc3_0 {
930985 status = "okay";
931
- extcon = <&fusb0>;
986
+ usb-role-switch;
987
+ port {
988
+ #address-cells = <1>;
989
+ #size-cells = <0>;
990
+ dwc3_0_role_switch: endpoint@0 {
991
+ reg = <0>;
992
+ remote-endpoint = <&usbc0_role_sw>;
993
+ };
994
+ };
932995 };
933996
934997 &usbdrd_dwc3_1 {
....@@ -953,13 +1016,6 @@
9531016 charger_ok_int: charger-ok-int {
9541017 rockchip,pins =
9551018 <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
956
- };
957
- };
958
-
959
- fusb30x {
960
- fusb0_int: fusb0-int {
961
- rockchip,pins =
962
- <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
9631019 };
9641020 };
9651021
....@@ -1048,6 +1104,16 @@
10481104 };
10491105 };
10501106
1107
+ usb-typec {
1108
+ usbc0_int: usbc0-int {
1109
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1110
+ };
1111
+
1112
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1113
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1114
+ };
1115
+ };
1116
+
10511117 wireless-bluetooth {
10521118 uart0_gpios: uart0-gpios {
10531119 rockchip,pins =