forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/arch/arm64/boot/dts/rockchip/rk3399pro-evb-v11-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"
....@@ -201,6 +202,26 @@
201202 status = "disabled";
202203 };
203204
205
+ vbus_typec: vbus-typec-regulator {
206
+ compatible = "regulator-fixed";
207
+ enable-active-high;
208
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
209
+ pinctrl-names = "default";
210
+ pinctrl-0 = <&vcc5v0_typec0_en>;
211
+ regulator-name = "vbus_typec";
212
+ vin-supply = <&vcc5v0_sys>;
213
+ };
214
+
215
+ vbus_typec: vbus-typec-regulator {
216
+ compatible = "regulator-fixed";
217
+ enable-active-high;
218
+ gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
219
+ pinctrl-names = "default";
220
+ pinctrl-0 = <&vcc5v0_typec0_en>;
221
+ regulator-name = "vbus_typec";
222
+ vin-supply = <&vcc5v0_sys>;
223
+ };
224
+
204225 vcc_phy: vcc-phy-regulator {
205226 compatible = "regulator-fixed";
206227 regulator-name = "vcc_phy";
....@@ -243,7 +264,6 @@
243264
244265 &cdn_dp {
245266 status = "okay";
246
- extcon = <&fusb0>;
247267 phys = <&tcphy0_dp>;
248268 };
249269
....@@ -614,8 +634,8 @@
614634 };
615635 };
616636
617
- vdd_cpu_b: tcs452x@1c {
618
- compatible = "tcs,tcs452x";
637
+ vdd_cpu_b: tcs4525@1c {
638
+ compatible = "tcs,tcs4525";
619639 reg = <0x1c>;
620640 vin-supply = <&vcc5v0_sys>;
621641 regulator-compatible = "fan53555-reg";
....@@ -634,8 +654,8 @@
634654 };
635655 };
636656
637
- vdd_gpu: tcs452x@10 {
638
- compatible = "tcs,tcs452x";
657
+ vdd_gpu: tcs4526@10 {
658
+ compatible = "tcs,tcs4526";
639659 reg = <0x10>;
640660 vin-supply = <&vcc5v0_sys>;
641661 regulator-compatible = "fan53555-reg";
....@@ -657,7 +677,6 @@
657677 bq25700: bq25700@6b {
658678 compatible = "ti,bq25703";
659679 reg = <0x6b>;
660
- extcon = <&fusb0>;
661680 interrupt-parent = <&gpio1>;
662681 interrupts = <RK_PA1 IRQ_TYPE_LEVEL_LOW>;
663682 pinctrl-names = "default";
....@@ -786,16 +805,53 @@
786805 i2c-scl-falling-time-ns = <11>;
787806 clock-frequency = <100000>;
788807
789
- fusb0: fusb30x@22 {
790
- compatible = "fairchild,fusb302";
808
+ usbc0: fusb302@22 {
809
+ compatible = "fcs,fusb302";
791810 reg = <0x22>;
811
+ interrupt-parent = <&gpio1>;
812
+ interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
792813 pinctrl-names = "default";
793
- pinctrl-0 = <&fusb0_int>;
794
- int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
795
- vbus-5v-gpios = <&gpio0 RK_PA1 GPIO_ACTIVE_LOW>;
814
+ pinctrl-0 = <&usbc0_int>;
815
+ vbus-supply = <&vbus_typec>;
796816 status = "okay";
797
- };
798817
818
+ ports {
819
+ #address-cells = <1>;
820
+ #size-cells = <0>;
821
+
822
+ port@0 {
823
+ reg = <0>;
824
+ usbc0_role_sw: endpoint@0 {
825
+ remote-endpoint = <&dwc3_0_role_switch>;
826
+ };
827
+ };
828
+ };
829
+
830
+ usb_con: connector {
831
+ compatible = "usb-c-connector";
832
+ label = "USB-C";
833
+ data-role = "dual";
834
+ power-role = "dual";
835
+ try-power-role = "sink";
836
+ op-sink-microwatt = <1000000>;
837
+ sink-pdos =
838
+ <PDO_FIXED(5000, 2500, PDO_FIXED_USB_COMM)>;
839
+ source-pdos =
840
+ <PDO_FIXED(5000, 1500, PDO_FIXED_USB_COMM)>;
841
+
842
+ ports {
843
+ #address-cells = <1>;
844
+ #size-cells = <0>;
845
+
846
+ port@0 {
847
+ reg = <0>;
848
+ usbc0_orien_sw: endpoint {
849
+ remote-endpoint = <&tcphy0_orientation_switch>;
850
+ };
851
+ };
852
+ };
853
+ };
854
+ };
799855 };
800856
801857 &i2s1 {
....@@ -995,8 +1051,16 @@
9951051 };
9961052
9971053 &tcphy0 {
998
- extcon = <&fusb0>;
9991054 status = "okay";
1055
+ orientation-switch;
1056
+ port {
1057
+ #address-cells = <1>;
1058
+ #size-cells = <0>;
1059
+ tcphy0_orientation_switch: endpoint@0 {
1060
+ reg = <0>;
1061
+ remote-endpoint = <&usbc0_orien_sw>;
1062
+ };
1063
+ };
10001064 };
10011065
10021066 &tcphy1 {
....@@ -1011,7 +1075,6 @@
10111075
10121076 &u2phy0 {
10131077 status = "okay";
1014
- extcon = <&fusb0>;
10151078
10161079 u2phy0_otg: otg-port {
10171080 status = "okay";
....@@ -1067,7 +1130,15 @@
10671130
10681131 &usbdrd_dwc3_0 {
10691132 status = "okay";
1070
- extcon = <&fusb0>;
1133
+ usb-role-switch;
1134
+ port {
1135
+ #address-cells = <1>;
1136
+ #size-cells = <0>;
1137
+ dwc3_0_role_switch: endpoint@0 {
1138
+ reg = <0>;
1139
+ remote-endpoint = <&usbc0_role_sw>;
1140
+ };
1141
+ };
10711142 };
10721143
10731144 &usbdrd_dwc3_1 {
....@@ -1105,13 +1176,6 @@
11051176 cam_pwren_high: cam-pwren-high {
11061177 rockchip,pins =
11071178 <4 RK_PC5 RK_FUNC_GPIO &pcfg_output_high>;
1108
- };
1109
- };
1110
-
1111
- fusb30x {
1112
- fusb0_int: fusb0-int {
1113
- rockchip,pins =
1114
- <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
11151179 };
11161180 };
11171181
....@@ -1205,6 +1269,16 @@
12051269 };
12061270 };
12071271
1272
+ usb-typec {
1273
+ usbc0_int: usbc0-int {
1274
+ rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1275
+ };
1276
+
1277
+ vcc5v0_typec0_en: vcc5v0-typec0-en {
1278
+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
1279
+ };
1280
+ };
1281
+
12081282 wireless-bluetooth {
12091283 bt_irq_gpio: bt-irq-gpio {
12101284 rockchip,pins =