diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2024-09-03 11:15:50 +0200 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2024-09-03 12:51:32 +0200 |
commit | 72bc210801280cc2a5307d564456538e4e400d90 (patch) | |
tree | 62647c2e584cc9c91ff8d0b05d3c95a4aab012ba | |
parent | b54bfb08c7ffaebbd2c332b77e02410196f665e0 (diff) | |
download | linux-riscv-72bc210801280cc2a5307d564456538e4e400d90.tar.gz linux-riscv-72bc210801280cc2a5307d564456538e4e400d90.tar.bz2 linux-riscv-72bc210801280cc2a5307d564456538e4e400d90.zip |
riscv: dts: spacemit: add DWC3/USB3 and related PHY nodes
Add device tree nodes needed for the DWC3/USB3 host ports related
drivers. Ported from the vendor kernel [1].
[1] - https://github.com/BPI-SINOVOIP/pi-linux.git
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0fe6fede371aaa7e4d8c2de79ac6d4d18bbc2721
-rw-r--r-- | arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 33 | ||||
-rw-r--r-- | arch/riscv/boot/dts/spacemit/k1.dtsi | 52 |
2 files changed, 85 insertions, 0 deletions
diff --git a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts index 47409cb1e6d5..4fb66ecefbac 100644 --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -555,3 +555,36 @@ &imggpu { status = "okay"; }; + +&usb2phy { + status = "okay"; +}; + +&combphy { + status = "okay"; +}; + +&usb3hub { + hub-gpios = < + &gpio 123 0 /* usb3 hub en */ + &gpio 124 0>; /* usb3 hub rst*/ + vbus-gpios = <&gpio 97 0>; /* gpio_97 for usb3 hub output vbus */ + status = "okay"; +}; + +&usbdrd3 { + status = "okay"; + dwc3@c0a00000 { + dr_mode = "host"; + phy_type = "utmi"; + snps,hsphy_interface = "utmi"; + snps,dis_enblslpm_quirk; + snps,dis-u1u2-quirk; + snps,dis-u2-freeclk-exists-quirk; + snps,dis-del-phy-power-chg-quirk; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,dis_rxdet_inp3_quirk; + snps,xhci-trb-ent-quirk; + }; +}; diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi index 17bc7f6fca1c..11471aa3b6d8 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -9,6 +9,7 @@ #include <dt-bindings/dma/k1x-dmac.h> #include <dt-bindings/pmu/k1x_pmu.h> #include <dt-bindings/display/spacemit-dpu.h> +#include <dt-bindings/phy/phy.h> /dts-v1/; / { @@ -997,5 +998,56 @@ interconnect-names = "dma-mem"; status = "ok"; }; + + combphy: phy@c0b10000{ + compatible = "spacemit,k1x-combphy"; + reg = <0x0 0xc0b10000 0x0 0x800>, + <0x0 0xd4282910 0x0 0x400>; + reg-names = "puphy", "phy_sel"; + resets = <&reset RESET_PCIE0>; + reset-names = "phy_rst"; + #phy-cells = <1>; + status = "disabled"; + }; + + usb2phy: usb2phy@0xc0a30000 { + compatible = "spacemit,usb2-phy"; + reg = <0x0 0xc0a30000 0x0 0x200>; + spacemit,handle_connect_change; + clocks = <&ccu CLK_USB30>; + status = "disabled"; + }; + + usb3hub: usb3hub@0 { + compatible = "spacemit,usb3-hub"; + status = "disabled"; + }; + + usbdrd3: usb3@0 { + compatible = "spacemit,k1-x-dwc3"; + #address-cells = <2>; + #size-cells = <2>; + resets = <&reset RESET_USB3_0>; + reset-names = "ctl_rst"; + clocks = <&ccu CLK_USB30>; + clock-names = "usbdrd30"; + interrupt-parent = <&plic>; + interrupts = <149>; + ranges; + interconnects = <&dram_range0>; + interconnect-names = "dma-mem"; + status = "disabled"; + + dwc3@c0a00000 { + compatible = "snps,dwc3"; + reg = <0x0 0xc0a00000 0x0 0x10000>; + interrupt-parent = <&plic>; + interrupts = <125>; + phys = <&combphy PHY_TYPE_USB3>; + phy-names = "usb3-phy"; + usb-phy = <&usb2phy>; + }; + }; + }; }; |