Skip to contentSkip to conversation

dt-bindings: phy-qcom-ipq4019-usb: add binding document

PATCH Superseded John Crispin 2 participants 4 messages Jul 25, 2018 – Jul 31, 2018

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dt-bindings: phy-qcom-ipq4019-usb: add binding document

This patch adds the binding documentation for the HS/SS USB PHY found inside Qualcom Dakota SoCs.

---
 .../bindings/phy/phy-qcom-ipq4019-usb.txt           | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt new file +21 -0
new file mode 100644
index 000000000000..362877fcafed
@@ -0,0 +1,21 @@
+Qualcom Dakota HS/SS USB PHY
+
+Required properties:
+ - compatible: "qcom,usb-ss-ipq4019-phy",
+	       "qcom,usb-hs-ipq4019-phy"
+ - reg: offset and length of the registers
+ - #phy-cells: should be 0
+ - resets: the reset controllers as listed below
+ - reset-names: the names of the reset controllers
+	"por_rst" - the POR reset line for SS and HS phys
+	"srif_rst" - the SRIF reset line for HS phys
+Example:
+
+hsphy@a8000 {
+	compatible = "qcom,usb-hs-ipq4019-phy";
+	phy-cells = <0>;
+	reg = <0xa8000 0x40>;
+	resets = <&gcc USB2_HSPHY_POR_ARES>,
+		 <&gcc USB2_HSPHY_S_ARES>;
+	reset-names = "por_rst", "srif_rst";
+};
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/3 phy: qcom-ipq4019-usb: add driver for QCOM/IPQ4019

Add a driver to setup the USB phy on Qualcom Dakota SoCs.
The driver sets up HS and SS phys. In case of HS some magic values need to be written to magic offsets. These were taken from the SDK driver.

---
 drivers/phy/qualcomm/Kconfig                |   7 +
 drivers/phy/qualcomm/Makefile               |   1 +
 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 193 ++++++++++++++++++++++++++++
 3 files changed, 201 insertions(+)
 create mode 100644 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
drivers/phy/qualcomm/Kconfig +7 -0
index 632a0e73ee10..41894904d708 100644
@@ -17,6 +17,13 @@ config PHY_QCOM_APQ8064_SATA
 	depends on OF
 	select GENERIC_PHY
 
+config PHY_QCOM_IPQ4019_USB
+	tristate "Qualcomm IPQ4019 USB PHY module"
+	depends on OF && ARCH_QCOM
+	select GENERIC_PHY
+	help
+	  Support for the USB PHY on QCOM IPQ4019/Dakota chipsets.
+
 config PHY_QCOM_IPQ806X_SATA
 	tristate "Qualcomm IPQ806x SATA SerDes/PHY driver"
 	depends on ARCH_QCOM
drivers/phy/qualcomm/Makefile +1 -0
index deb831f453ae..463383483cd4 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_PHY_ATH79_USB)		+= phy-ath79-usb.o
 obj-$(CONFIG_PHY_QCOM_APQ8064_SATA)	+= phy-qcom-apq8064-sata.o
+obj-$(CONFIG_PHY_QCOM_IPQ4019_USB) 	+= phy-qcom-ipq4019-usb.o
 obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA)	+= phy-qcom-ipq806x-sata.o
 obj-$(CONFIG_PHY_QCOM_QMP)		+= phy-qcom-qmp.o
 obj-$(CONFIG_PHY_QCOM_QUSB2)		+= phy-qcom-qusb2.o
drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c new file +193 -0

193 lines not on this page · raw message

Signature · 1 line
2.11.0
#2 lore raw

PATCH 3/3 qcom: ipq4019: add USB devicetree nodes

In reply to John Crispin

This patch makes USB work on the Dakota EVB.

---
 arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi | 20 +++++++
 arch/arm/boot/dts/qcom-ipq4019.dtsi           | 76 +++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)
arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi +20 -0
index 418f9a022336..2ee5f05d5a43 100644
@@ -109,5 +109,25 @@
 		wifi@a800000 {
 			status = "ok";
 		};
+
+		usb3_ss_phy: ssphy@9a000 {
+			status = "ok";
+		};
+
+		usb3_hs_phy: hsphy@a6000 {
+			status = "ok";
+		};
+
+		usb3: usb3@8af8800 {
+			status = "ok";
+		};
+
+		usb2_hs_phy: hsphy@a8000 {
+			status = "ok";
+		};
+
+		usb2: usb2@60f8800 {
+			status = "ok";
+		};
 	};
 };
arch/arm/boot/dts/qcom-ipq4019.dtsi +76 -0

81 lines not on this page · raw message

Signature · 1 line
2.11.0
maintainer
#3 lore raw
In reply to John Crispin
Quoted 2 lines · John Crispin

This patch adds the binding documentation for the HS/SS USB PHY found inside Qualcom Dakota SoCs.

Qualcomm

Quoted 15 lines
---
 .../bindings/phy/phy-qcom-ipq4019-usb.txt           | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt new file +0 -0
new file mode 100644
index 000000000000..362877fcafed

Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt line 5

Quoted 5 lines
Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt new file +5 -0
@@ -0,0 +1,21 @@
+Qualcom Dakota HS/SS USB PHY
+
+Required properties:
+ - compatible: "qcom,usb-ss-ipq4019-phy",
+	       "qcom,usb-hs-ipq4019-phy"

<vendor>,<soc>-<block> is the usual order.

Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt line 11

Quoted 6 lines
Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt new file +6 -0
+ - reg: offset and length of the registers
+ - #phy-cells: should be 0
+ - resets: the reset controllers as listed below
+ - reset-names: the names of the reset controllers
+	"por_rst" - the POR reset line for SS and HS phys
+	"srif_rst" - the SRIF reset line for HS phys

'_rst' is redundant.

Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt line 14

Quoted 3 lines
Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt new file +3 -0
+Example:
+
+hsphy@a8000 {

usb-phy@...

Quoted 14 lines
Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt new file +7 -0
+	compatible = "qcom,usb-hs-ipq4019-phy";
+	phy-cells = <0>;
+	reg = <0xa8000 0x40>;
+	resets = <&gcc USB2_HSPHY_POR_ARES>,
+		 <&gcc USB2_HSPHY_S_ARES>;
+	reset-names = "por_rst", "srif_rst";
+};
Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html