This serie adds USB related device nodes support for rv1108 SoCs, in addition,
Rockchip's rv1108-evb board has one usb otg controller and one usb host
controller, each controller connect with one usb-phy port through UTMI+
interface, the changes also enable usb related for rv1108-evb board.
Frank Wang (3):
dt-bindings: update dt-binding for rv1108 SoCs
ARM: dts: rockchip: add usb nodes for rv1108 SoCs
ARM: dts: rockchip: enable usb for rv1108-evb
.../devicetree/bindings/soc/rockchip/grf.txt | 3 +
arch/arm/boot/dts/rv1108-evb.dts | 24 +++++++
arch/arm/boot/dts/rv1108.dtsi | 73 +++++++++++++++++++++-
3 files changed, 99 insertions(+), 1 deletion(-)
--
2.0.0
This patch adds the compatible of GRF and USBGRF for RV1108 SoCs.
Signed-off-by: Frank Wang <[email protected]>
---
Documentation/devicetree/bindings/soc/rockchip/grf.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/rockchip/grf.txt b/Documentation/devicetree/bindings/soc/rockchip/grf.txt
index cc9f05d..7dc5ce8 100644
--- a/Documentation/devicetree/bindings/soc/rockchip/grf.txt
+++ b/Documentation/devicetree/bindings/soc/rockchip/grf.txt
@@ -21,6 +21,7 @@ Required Properties:
- "rockchip,rk3328-grf", "syscon": for rk3328
- "rockchip,rk3368-grf", "syscon": for rk3368
- "rockchip,rk3399-grf", "syscon": for rk3399
+ - "rockchip,rv1108-grf", "syscon": for rv1108
- compatible: PMUGRF should be one of the following:
- "rockchip,rk3368-pmugrf", "syscon": for rk3368
- "rockchip,rk3399-pmugrf", "syscon": for rk3399
@@ -28,6 +29,8 @@ Required Properties:
- "rockchip,rk3288-sgrf", "syscon": for rk3288
- compatible: USB2PHYGRF should be one of the followings
- "rockchip,rk3328-usb2phy-grf", "syscon": for rk3328
+- compatible: USBGRF should be one of the following
+ - "rockchip,rv1108-usbgrf", "syscon": for rv1108
- reg: physical base address of the controller and length of memory mapped
region.
--
2.0.0
Rockchip's rv1108-evb board has one usb otg controller and one usb
host controller, each usb controller connect with one usb-phy port
through UTMI+ interface. This patch enables them to support usb on
rv1108-evb board.
Signed-off-by: Frank Wang <[email protected]>
---
arch/arm/boot/dts/rv1108-evb.dts | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/rv1108-evb.dts b/arch/arm/boot/dts/rv1108-evb.dts
index 010763f..5a48e79 100644
--- a/arch/arm/boot/dts/rv1108-evb.dts
+++ b/arch/arm/boot/dts/rv1108-evb.dts
@@ -103,6 +103,18 @@
status = "okay";
};
+&u2phy {
+ status = "okay";
+
+ u2phy_otg: otg-port {
+ status = "okay";
+ };
+
+ u2phy_host: host-port {
+ status = "okay";
+ };
+};
+
&uart0 {
status = "okay";
};
@@ -114,3 +126,15 @@
&uart2 {
status = "okay";
};
+
+&usb_host_ehci {
+ status = "okay";
+};
+
+&usb_host_ohci {
+ status = "okay";
+};
+
+&usb_otg {
+ status = "okay";
+};
--
2.0.0
This patch adds usb otg/host controllers and phys nodes for RV1108 SoCs.
Signed-off-by: Frank Wang <[email protected]>
---
arch/arm/boot/dts/rv1108.dtsi | 73 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 72 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rv1108.dtsi b/arch/arm/boot/dts/rv1108.dtsi
index 25fab0b..2322328 100644
--- a/arch/arm/boot/dts/rv1108.dtsi
+++ b/arch/arm/boot/dts/rv1108.dtsi
@@ -262,8 +262,35 @@
};
grf: syscon@10300000 {
- compatible = "rockchip,rv1108-grf", "syscon";
+ compatible = "rockchip,rv1108-grf", "syscon", "simple-mfd";
reg = <0x10300000 0x1000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ u2phy: usb2-phy@100 {
+ compatible = "rockchip,rv1108-usb2phy";
+ reg = <0x100 0x0c>;
+ rockchip,usbgrf = <&usbgrf>;
+ clocks = <&cru SCLK_USBPHY>;
+ clock-names = "phyclk";
+ #clock-cells = <0>;
+ clock-output-names = "usbphy";
+ status = "disabled";
+
+ u2phy_otg: otg-port {
+ #phy-cells = <0>;
+ interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "otg-mux";
+ status = "disabled";
+ };
+
+ u2phy_host: host-port {
+ #phy-cells = <0>;
+ interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "linestate";
+ status = "disabled";
+ };
+ };
};
watchdog: wdt@10360000 {
@@ -353,6 +380,11 @@
reg = <0x20060000 0x1000>;
};
+ usbgrf: syscon@202a0000 {
+ compatible = "rockchip,rv1108-usbgrf", "syscon";
+ reg = <0x202a0000 0x1000>;
+ };
+
cru: clock-controller@20200000 {
compatible = "rockchip,rv1108-cru";
reg = <0x20200000 0x1000>;
@@ -399,6 +431,45 @@
status = "disabled";
};
+ usb_host_ehci: usb@30140000 {
+ compatible = "generic-ehci";
+ reg = <0x30140000 0x20000>;
+ interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru HCLK_HOST0>, <&u2phy>;
+ clock-names = "usbhost", "utmi";
+ phys = <&u2phy_host>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ usb_host_ohci: usb@30160000 {
+ compatible = "generic-ohci";
+ reg = <0x30160000 0x20000>;
+ interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru HCLK_HOST0>, <&u2phy>;
+ clock-names = "usbhost", "utmi";
+ phys = <&u2phy_host>;
+ phy-names = "usb";
+ status = "disabled";
+ };
+
+ usb_otg: usb@30180000 {
+ compatible = "rockchip,rv1108-usb", "rockchip,rk3066-usb",
+ "snps,dwc2";
+ reg = <0x30180000 0x40000>;
+ interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru HCLK_OTG>;
+ clock-names = "otg";
+ dr_mode = "otg";
+ g-np-tx-fifo-size = <16>;
+ g-rx-fifo-size = <280>;
+ g-tx-fifo-size = <256 128 128 64 32 16>;
+ g-use-dma;
+ phys = <&u2phy_otg>;
+ phy-names = "usb2-phy";
+ status = "disabled";
+ };
+
gic: interrupt-controller@32010000 {
compatible = "arm,gic-400";
interrupt-controller;
--
2.0.0
On Mon, Aug 21, 2017 at 04:39:26PM +0800, Frank Wang wrote:
> This patch adds the compatible of GRF and USBGRF for RV1108 SoCs.
>
> Signed-off-by: Frank Wang <[email protected]>
> ---
> Documentation/devicetree/bindings/soc/rockchip/grf.txt | 3 +++
> 1 file changed, 3 insertions(+)
Acked-by: Rob Herring <[email protected]>
Am Montag, 21. August 2017, 16:39:25 CEST schrieb Frank Wang:
> This serie adds USB related device nodes support for rv1108 SoCs, in addition,
> Rockchip's rv1108-evb board has one usb otg controller and one usb host
> controller, each controller connect with one usb-phy port through UTMI+
> interface, the changes also enable usb related for rv1108-evb board.
>
> Frank Wang (3):
> dt-bindings: update dt-binding for rv1108 SoCs
> ARM: dts: rockchip: add usb nodes for rv1108 SoCs
> ARM: dts: rockchip: enable usb for rv1108-evb
applied all 3 for 4.14 ... with some minor changes to patch subjects
and property ordering
Thanks
Heiko