Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1448428 > unrolled thread
| Started by | Frank Wang <frank.wang@rock-chips.com> |
|---|---|
| First post | 2016-07-22 09:10 +0200 |
| Last post | 2016-07-22 09:10 +0200 |
| Articles | 2 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH v9 0/4] Add a new Rockchip usb2 phy driver Frank Wang <frank.wang@rock-chips.com> - 2016-07-22 09:10 +0200
[PATCH v9 3/4] arm64: dts: rockchip: add usb2-phy support for rk3399 Frank Wang <frank.wang@rock-chips.com> - 2016-07-22 09:10 +0200
| From | Frank Wang <frank.wang@rock-chips.com> |
|---|---|
| Date | 2016-07-22 09:10 +0200 |
| Subject | [PATCH v9 0/4] Add a new Rockchip usb2 phy driver |
| Message-ID | <rXCKR-2yo-11@gated-at.bofh.it> |
The newer SoCs (rk3366, rk3399) of Rock-chip take a different usb-phy IP block than rk3288 and before, and most of phy-related registers are also different from the past, so a new phy driver is required necessarily. These series patch add phy-rockchip-inno-usb2.c and the corresponding dt-bindings. Changes in v9: - Move the usb gpio config from dtsi to dts. - Add vin-supply (vcc5v0_sys) for vcc5v0_host. - Change some properties' name. Changes in v8: - Added support for rk3399 SoC. - Prepare input clock of phy at probe time. - Improved sm_work function to handle phy-port state more clearly. Changes in v7: - Renamed functions *usb2phy_resume/*usb2phy_suspend to *usb2phy_power_on/usb2phy_power_off. Changes in v6: - Changed '_' to '-' for otg-id and otg-bvalid property in devicetree bindings. - Fixed the output clock would be disabled more than once while phy-port was going to suspend. - Improved the driver to avoid the currently empty otg-port would cause null-pointer dereferences. Changes in v5: - Added 'reg' property both in devicetree bindings and driver to match the different phy-blocks. Changes in v4: - Used 'phy-supply' instead of 'vbus_*-supply'. Changes in v3: - Supplemented some hardware-description into the devicetree bindings. - Resolved the mapping defect between fixed value in driver and the property in devicetree. - Code cleanup. Changes in v2: - Specified more hardware-description into the devicetree bindings. - Optimized some process of driver. Frank Wang (4): Documentation: bindings: add DT documentation for Rockchip USB2PHY phy: rockchip-inno-usb2: add a new driver for Rockchip usb2phy arm64: dts: rockchip: add usb2-phy support for rk3399 arm64: dts: rockchip: configure usb2-phy support for rk3399-evb .../bindings/phy/phy-rockchip-inno-usb2.txt | 64 ++ arch/arm64/boot/dts/rockchip/rk3399-evb.dts | 44 ++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 42 +- drivers/phy/Kconfig | 7 + drivers/phy/Makefile | 1 + drivers/phy/phy-rockchip-inno-usb2.c | 707 ++++++++++++++++++++ 6 files changed, 864 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/phy/phy-rockchip-inno-usb2.txt create mode 100644 drivers/phy/phy-rockchip-inno-usb2.c -- 1.7.9.5
[toc] | [next] | [standalone]
| From | Frank Wang <frank.wang@rock-chips.com> |
|---|---|
| Date | 2016-07-22 09:10 +0200 |
| Subject | [PATCH v9 3/4] arm64: dts: rockchip: add usb2-phy support for rk3399 |
| Message-ID | <rXCKS-2yo-23@gated-at.bofh.it> |
| In reply to | #1448428 |
Add usb2-phy nodes and specify phys phandle for ehci.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
---
Changes in v9:
- Move the usb gpio config to rk3399-evb.dts
- Fix ehci phy-names property.
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 42 +++++++++++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index d7f8e06..843d51c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -221,6 +221,8 @@
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_HOST0>, <&cru HCLK_HOST0_ARB>;
clock-names = "hclk_host0", "hclk_host0_arb";
+ phys = <&u2phy0_host>;
+ phy-names = "usb";
status = "disabled";
};
@@ -239,6 +241,8 @@
interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru HCLK_HOST1>, <&cru HCLK_HOST1_ARB>;
clock-names = "hclk_host1", "hclk_host1_arb";
+ phys = <&u2phy1_host>;
+ phy-names = "usb";
status = "disabled";
};
@@ -481,8 +485,44 @@
};
grf: syscon@ff770000 {
- compatible = "rockchip,rk3399-grf", "syscon";
+ compatible = "rockchip,rk3399-grf", "syscon", "simple-mfd";
reg = <0x0 0xff770000 0x0 0x10000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ u2phy0: usb2-phy@e450 {
+ compatible = "rockchip,rk3399-usb2phy";
+ reg = <0xe450 0x10>;
+ clocks = <&cru SCLK_USB2PHY0_REF>;
+ clock-names = "phyclk";
+ #clock-cells = <0>;
+ clock-output-names = "clk_usbphy0_480m";
+ status = "disabled";
+
+ u2phy0_host: host-port {
+ #phy-cells = <0>;
+ interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "linestate";
+ status = "disabled";
+ };
+ };
+
+ u2phy1: usb2-phy@e460 {
+ compatible = "rockchip,rk3399-usb2phy";
+ reg = <0xe460 0x10>;
+ clocks = <&cru SCLK_USB2PHY1_REF>;
+ clock-names = "phyclk";
+ #clock-cells = <0>;
+ clock-output-names = "clk_usbphy1_480m";
+ status = "disabled";
+
+ u2phy1_host: host-port {
+ #phy-cells = <0>;
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "linestate";
+ status = "disabled";
+ };
+ };
};
watchdog@ff840000 {
--
1.7.9.5
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web