forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
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"
....@@ -135,6 +136,8 @@
135136 prepare-delay-ms = <20>;
136137 enable-delay-ms = <20>;
137138 reset-delay-ms = <20>;
139
+ width-mm = <120>;
140
+ height-mm = <160>;
138141
139142 display-timings {
140143 native-mode = <&timing0>;
....@@ -196,6 +199,16 @@
196199 reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>;
197200 };
198201
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
+
199212 vcc_phy: vcc-phy-regulator {
200213 compatible = "regulator-fixed";
201214 regulator-name = "vcc_phy";
....@@ -238,7 +251,6 @@
238251
239252 &cdn_dp {
240253 status = "okay";
241
- extcon = <&fusb0>;
242254 phys = <&tcphy0_dp>;
243255 };
244256
....@@ -647,7 +659,6 @@
647659 bq25700: bq25700@6b {
648660 compatible = "ti,bq25703";
649661 reg = <0x6b>;
650
- extcon = <&fusb0>;
651662 interrupt-parent = <&gpio1>;
652663 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
653664 pinctrl-names = "default";
....@@ -774,13 +785,52 @@
774785 i2c-scl-falling-time-ns = <11>;
775786 clock-frequency = <100000>;
776787
777
- fusb0: fusb30x@22 {
778
- compatible = "fairchild,fusb302";
788
+ usbc0: fusb302@22 {
789
+ compatible = "fcs,fusb302";
779790 reg = <0x22>;
791
+ interrupt-parent = <&gpio1>;
792
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
780793 pinctrl-names = "default";
781
- pinctrl-0 = <&fusb0_int>;
782
- int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
794
+ pinctrl-0 = <&usbc0_int>;
795
+ vbus-supply = <&vbus_typec>;
783796 status = "okay";
797
+
798
+ ports {
799
+ #address-cells = <1>;
800
+ #size-cells = <0>;
801
+
802
+ port@0 {
803
+ reg = <0>;
804
+ usbc0_role_sw: endpoint@0 {
805
+ remote-endpoint = <&dwc3_0_role_switch>;
806
+ };
807
+ };
808
+ };
809
+
810
+ usb_con: connector {
811
+ compatible = "usb-c-connector";
812
+ label = "USB-C";
813
+ data-role = "dual";
814
+ power-role = "dual";
815
+ try-power-role = "sink";
816
+ op-sink-microwatt = <1000000>;
817
+ sink-pdos =
818
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
819
+ source-pdos =
820
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
821
+
822
+ ports {
823
+ #address-cells = <1>;
824
+ #size-cells = <0>;
825
+
826
+ port@0 {
827
+ reg = <0>;
828
+ usbc0_orien_sw: endpoint {
829
+ remote-endpoint = <&tcphy0_orientation_switch>;
830
+ };
831
+ };
832
+ };
833
+ };
784834 };
785835
786836 };
....@@ -982,8 +1032,16 @@
9821032 };
9831033
9841034 &tcphy0 {
985
- extcon = <&fusb0>;
9861035 status = "okay";
1036
+ orientation-switch;
1037
+ port {
1038
+ #address-cells = <1>;
1039
+ #size-cells = <0>;
1040
+ tcphy0_orientation_switch: endpoint@0 {
1041
+ reg = <0>;
1042
+ remote-endpoint = <&usbc0_orien_sw>;
1043
+ };
1044
+ };
9871045 };
9881046
9891047 &tcphy1 {
....@@ -998,7 +1056,6 @@
9981056
9991057 &u2phy0 {
10001058 status = "okay";
1001
- extcon = <&fusb0>;
10021059
10031060 u2phy0_otg: otg-port {
10041061 status = "okay";
....@@ -1054,7 +1111,15 @@
10541111
10551112 &usbdrd_dwc3_0 {
10561113 status = "okay";
1057
- extcon = <&fusb0>;
1114
+ usb-role-switch;
1115
+ port {
1116
+ #address-cells = <1>;
1117
+ #size-cells = <0>;
1118
+ dwc3_0_role_switch: endpoint@0 {
1119
+ reg = <0>;
1120
+ remote-endpoint = <&usbc0_role_sw>;
1121
+ };
1122
+ };
10581123 };
10591124
10601125 &usbdrd_dwc3_1 {
....@@ -1085,13 +1150,6 @@
10851150 charger_ok_int: charger-ok-int {
10861151 rockchip,pins =
10871152 <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>;
10951153 };
10961154 };
10971155
....@@ -1146,6 +1204,16 @@
11461204 };
11471205 };
11481206
1207
+ usb-typec {
1208
+ usbc0_int: usbc0-int {
1209
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1210
+ };
1211
+
1212
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1213
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1214
+ };
1215
+ };
1216
+
11491217 sdio-pwrseq {
11501218 wifi_enable_h: wifi-enable-h {
11511219 rockchip,pins =