diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2024-09-03 11:54:14 +0200 |
---|---|---|
committer | Marek Szyprowski <m.szyprowski@samsung.com> | 2024-09-03 12:51:58 +0200 |
commit | 2c4b4a52bfa6c931ff497999a4f8c91f46b9e04a (patch) | |
tree | 0c3270d8d6b4fcfba7f58d37e7d821cb32f9a027 | |
parent | 7ba23d22ae5cb870adad8bf48e36188b47c48caa (diff) | |
download | linux-riscv-2c4b4a52bfa6c931ff497999a4f8c91f46b9e04a.tar.gz linux-riscv-2c4b4a52bfa6c931ff497999a4f8c91f46b9e04a.tar.bz2 linux-riscv-2c4b4a52bfa6c931ff497999a4f8c91f46b9e04a.zip |
riscv: dts: spacemit: add USB gadget (UDC) and related PHY nodes
Add device tree nodes needed for the USB gadget (UDC) port 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: I957d8b518c86e585660a5fd6f06d669009f099d7
-rw-r--r-- | arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts | 9 | ||||
-rw-r--r-- | arch/riscv/boot/dts/spacemit/k1.dtsi | 36 |
2 files changed, 45 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 4fb66ecefbac..c9621f5f86ec 100644 --- a/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts +++ b/arch/riscv/boot/dts/spacemit/k1-bananapi-f3.dts @@ -588,3 +588,12 @@ snps,xhci-trb-ent-quirk; }; }; + +&usbphy { + status = "okay"; +}; + +&udc { + spacemit,udc-mode = <MV_USB_MODE_UDC>; + status = "okay"; +}; diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spacemit/k1.dtsi index 11471aa3b6d8..334a21f1f498 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -10,6 +10,7 @@ #include <dt-bindings/pmu/k1x_pmu.h> #include <dt-bindings/display/spacemit-dpu.h> #include <dt-bindings/phy/phy.h> +#include <dt-bindings/usb/k1x_ci_usb.h> /dts-v1/; / { @@ -1049,5 +1050,40 @@ }; }; + usbphy: usbphy@c0940000 { + compatible = "spacemit,usb2-phy"; + reg = <0x0 0xc0940000 0x0 0x200>; + clocks = <&ccu CLK_USB_AXI>; + status = "disabled"; + }; + + otg: otg@c0900100 { + compatible = "spacemit,mv-otg"; + reg = <0x0 0xc0900100 0x0 0x4000>; + interrupts = <105>; + interrupt-parent = <&plic>; + spacemit,otg-name = "mv-otg"; + spacemit,otg-force-a-bus-req; + clocks = <&ccu CLK_USB_AXI>; + resets = <&reset RESET_USB_AXI>; + usb-phy = <&usbphy>; + status = "disabled"; + }; + + udc: udc@c0900100 { + compatible = "spacemit,mv-udc"; + reg = <0x0 0xc0900100 0x0 0x4000>; + interrupts = <105>; + interrupt-parent = <&plic>; + spacemit,udc-name = "mv-udc"; + spacemit,otg-force-a-bus-req; + resets = <&reset RESET_USB_AXI>; + clocks = <&ccu CLK_USB_AXI>; + usb-phy = <&usbphy>; + interconnects = <&dram_range0>; + interconnect-names = "dma-mem"; + usb-otg = <&otg>; + status = "disabled"; + }; }; }; |