From f5e17cfd26eeec2ebbd20c5b50a32afa332e01d5 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Tue, 17 Feb 2026 18:52:35 -0300 Subject: [PATCH] rockchip64-6.19: mekotronics-r58x-4g: add fusb302 - works as far as I can tell - both orientations - also wired DP, but can't test (I've no USB-DP hw) --- .../dt/rk3588-blueberry-edge-v12-linux.dts | 86 ++++++++++++++++++- 1 file changed, 83 insertions(+), 3 deletions(-) diff --git a/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts b/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts index 803a0fd14d..209a3996d1 100644 --- a/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts +++ b/patch/kernel/archive/rockchip64-6.19/dt/rk3588-blueberry-edge-v12-linux.dts @@ -104,8 +104,6 @@ vcc5v0_otg: vcc5v0-otg-regulator { compatible = "regulator-fixed"; regulator-name = "vcc5v0_otg"; - regulator-boot-on; - regulator-always-on; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; enable-active-high; @@ -403,6 +401,57 @@ &i2c6 { status = "okay"; + usbc0: usb-typec@22 { + compatible = "fcs,fusb302"; + reg = <0x22>; + interrupt-parent = <&gpio3>; + interrupts = ; + pinctrl-names = "default"; + pinctrl-0 = <&usbc0_int>; + vbus-supply = <&vcc5v0_otg>; + status = "okay"; + + connector { + compatible = "usb-c-connector"; + data-role = "dual"; + label = "USB-C"; + op-sink-microwatt = <1000000>; + /* fusb302 supports PD Rev 2.0 Ver 1.2 */ + pd-revision = /bits/ 8 <0x2 0x0 0x1 0x2>; + power-role = "dual"; + sink-pdos = ; + source-pdos = ; + try-power-role = "source"; + typec-power-opmode = "1.5A"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usbc0_hs: endpoint { + remote-endpoint = <&usb_host0_xhci_drd_sw>; + }; + }; + + port@1 { + reg = <1>; + usbc0_ss: endpoint { + remote-endpoint = <&usbdp_phy0_typec_ss>; + }; + }; + + port@2 { + reg = <2>; + usbc0_sbu: endpoint { + remote-endpoint = <&usbdp_phy0_typec_sbu>; + }; + }; + }; + }; + }; + hym8563: rtc@51 { compatible = "haoyu,hym8563"; reg = <0x51>; @@ -572,7 +621,7 @@ }; usb-typec { - usbc0_int: usbc0-int { // @TODO missing fusb302 + usbc0_int: usbc0-int { rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>; }; @@ -982,6 +1031,29 @@ }; }; +&usbdp_phy0 { + mode-switch; + orientation-switch; + sbu1-dc-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>; + sbu2-dc-gpios = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; + status = "okay"; + + port { + #address-cells = <1>; + #size-cells = <0>; + + usbdp_phy0_typec_ss: endpoint@0 { + reg = <0>; + remote-endpoint = <&usbc0_ss>; + }; + + usbdp_phy0_typec_sbu: endpoint@1 { + reg = <1>; + remote-endpoint = <&usbc0_sbu>; + }; + }; +}; + &usbdp_phy1 { rockchip,dp-lane-mux = <0 1 2 3>; status = "okay"; @@ -1000,7 +1072,15 @@ maximum-speed = "high-speed"; phys = <&u2phy0_otg>; phy-names = "usb2-phy"; + + usb-role-switch; status = "okay"; + + port { + usb_host0_xhci_drd_sw: endpoint { + remote-endpoint = <&usbc0_hs>; + }; + }; }; &u2phy1 { // for usbdp_phy1 which is also usb_host1_xhci