Skip to content

Commit 3066ea9

Browse files
iavigorpecovnik
authored andcommitted
rockchip64: Helios64: fix Type-C PD negotiation
Remove usb-role-switch property from fusb302 node and replace with extcon property. The usb-role-switch property breaks PD negotiation and DP alt mode on kernel 6.18+. Fix based on PR #9245 (Pinebook Pro) by amazingfate. Apply Helios64: fix Type-C PHY registration #9158 to 6.19.
1 parent d88d32b commit 3066ea9

File tree

2 files changed

+29
-10
lines changed

2 files changed

+29
-10
lines changed

patch/kernel/archive/rockchip64-6.18/add-board-helios64.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ index 111111111111..222222222222 100644
596596
+ pinctrl-names = "default";
597597
+ pinctrl-0 = <&fusb0_int>;
598598
+ vbus-supply = <&vcc5v0_typec>;
599-
+ usb-role-switch = <&typec_extcon_bridge>;
599+
+ extcon = <&typec_extcon_bridge>;
600600
+
601601
+ connector {
602602
+ compatible = "usb-c-connector";

patch/kernel/archive/rockchip64-6.19/add-board-helios64.patch

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ index 111111111111..222222222222 100644
252252
vcc12v_dcin: regulator-vcc12v-dcin {
253253
compatible = "regulator-fixed";
254254
regulator-name = "vcc12v_dcin";
255-
@@ -227,36 +375,60 @@ vcc12v_dcin_bkup: regulator-vcc12v-dcin-bkup {
255+
@@ -227,36 +375,68 @@ vcc12v_dcin_bkup: regulator-vcc12v-dcin-bkup {
256256
regulator-max-microvolt = <12000000>;
257257
vin-supply = <&vcc12v_dcin>;
258258
};
@@ -335,6 +335,14 @@ index 111111111111..222222222222 100644
335335
+ compatible = "rockchip,rk3399-hdmi-dp";
336336
+ rockchip,cpu = <&i2s2>;
337337
+ rockchip,codec = <&cdn_dp>;
338+
+ };
339+
+
340+
+ typec_extcon_bridge: typec-extcon {
341+
+ compatible = "linux,typec-extcon-bridge";
342+
+ usb-role-switch;
343+
+ orientation-switch;
344+
+ mode-switch;
345+
+ svid = /bits/ 16 <0xff01>;
338346
+ };
339347
};
340348

@@ -353,7 +361,7 @@ index 111111111111..222222222222 100644
353361
+
354362
+&cdn_dp {
355363
+ status = "okay";
356-
+ extcon = <&fusb0>;
364+
+ extcon = <&typec_extcon_bridge>;
357365
+ phys = <&tcphy0_dp>;
358366
+};
359367
+
@@ -550,7 +558,7 @@ index 111111111111..222222222222 100644
550558
vin-supply = <&vcc5v0_sys>;
551559

552560
regulator-state-mem {
553-
@@ -404,17 +696,101 @@ &i2c2 {
561+
@@ -404,17 +696,108 @@ &i2c2 {
554562
i2c-scl-falling-time-ns = <30>;
555563
status = "okay";
556564

@@ -588,19 +596,26 @@ index 111111111111..222222222222 100644
588596
+ pinctrl-names = "default";
589597
+ pinctrl-0 = <&fusb0_int>;
590598
+ vbus-supply = <&vcc5v0_typec>;
599+
+ extcon = <&typec_extcon_bridge>;
591600
+
592601
+ connector {
593602
+ compatible = "usb-c-connector";
594603
+ label = "USB-C";
595604
+ power-role = "dual";
596605
+ data-role = "dual";
597606
+ try-power-role = "sink";
598-
+ source-pdos = <PDO_FIXED(5000, 1200, PDO_FIXED_USB_COMM)>;
599-
+ sink-pdos = <PDO_FIXED(5000, 500, PDO_FIXED_USB_COMM)>;
607+
+ source-pdos = <PDO_FIXED(5000, 1200, PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
608+
+ sink-pdos = <PDO_FIXED(5000, 500, PDO_FIXED_USB_COMM | PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
600609
+ op-sink-microwatt = <5000000>;
610+
+ mode-switch = <&typec_extcon_bridge>;
611+
+ orientation-switch = <&typec_extcon_bridge>;
601612
+
602-
+ extcon-cables = <1 2 5 6 9 10 12 44>;
603-
+ typec-altmodes = <0xff01 1 0x001c0000 1>;
613+
+ altmodes {
614+
+ dp {
615+
+ svid = /bits/ 16 <0xff01>;
616+
+ vdo = <0x1c46>;
617+
+ };
618+
+ };
604619
+
605620
+ ports {
606621
+ #address-cells = <1>;
@@ -841,7 +856,7 @@ index 111111111111..222222222222 100644
841856
};
842857

843858
+&tcphy0 {
844-
+ extcon = <&fusb0>;
859+
+ extcon = <&typec_extcon_bridge>;
845860
+ status = "okay";
846861
+};
847862
+
@@ -864,12 +879,14 @@ index 111111111111..222222222222 100644
864879
&tcphy1 {
865880
/* phy for &usbdrd_dwc3_1 */
866881
status = "okay";
867-
@@ -559,61 +1056,118 @@ &tsadc {
882+
@@ -559,61 +1056,122 @@ &tsadc {
868883
status = "okay";
869884
};
870885

871886
-&u2phy1 {
872887
+&u2phy0 {
888+
+ extcon = <&typec_extcon_bridge>;
889+
+ extcon,ignore-usb;
873890
status = "okay";
874891

875892
- otg-port {
@@ -923,6 +940,8 @@ index 111111111111..222222222222 100644
923940
+&usbdrd_dwc3_0 {
924941
+ status = "okay";
925942
+ dr_mode = "otg";
943+
+ extcon = <&typec_extcon_bridge>;
944+
+ snps,usb3-phy-reset-quirk;
926945
+};
927946
+
928947
&usbdrd3_1 {

0 commit comments

Comments
 (0)