Skip to contentSkip to conversation

phy: qcom-ipq4019-usb: add new driver

PATCH In review John Crispin 2 participants 5 messages Aug 1, 2018 – Aug 7, 2018

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover phy: qcom-ipq4019-usb: add new driver

This series adds a PHY driver for the Qualcomm Dakota SoC

Changes V1->V2
* fix the compat string inside the binding doc
* fix up the reset names inside the binding doc
* reflect the above changes in the driver and dts/i files

John Crispin (3):
dt-bindings: phy-qcom-ipq4019-usb: add binding document
phy: qcom-ipq4019-usb: add driver for QCOM/IPQ4019
qcom: ipq4019: add USB devicetree nodes

 .../bindings/phy/phy-qcom-ipq4019-usb.txt          |  21 +++
 arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi      |  20 +++
 arch/arm/boot/dts/qcom-ipq4019.dtsi                |  76 ++++++++
 drivers/phy/qualcomm/Kconfig                       |   7 +
 drivers/phy/qualcomm/Makefile                      |   1 +
 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c        | 193 +++++++++++++++++++++
 6 files changed, 318 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/phy-qcom-ipq4019-usb.txt
 create mode 100644 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 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 Qualcomm 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..320a596c45b4
@@ -0,0 +1,21 @@
+Qualcom Dakota HS/SS USB PHY
+
+Required properties:
+ - compatible: "qcom,ipq4019-usb-ss-phy",
+	       "qcom,ipq4019-usb-hs-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" - the POR reset line for SS and HS phys
+	"srif" - the SRIF reset line for HS phys
+Example:
+
+usb-phy@a8000 {
+	compatible = "qcom,ipq4019-usb-hs-phy";
+	phy-cells = <0>;
+	reg = <0xa8000 0x40>;
+	resets = <&gcc USB2_HSPHY_POR_ARES>,
+		 <&gcc USB2_HSPHY_S_ARES>;
+	reset-names = "por", "srif";
+};
Signature · 1 line
2.11.0
#3 lore raw

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

In reply to John Crispin

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
#4 lore raw

PATCH v2 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..0c226de1c672 100644
@@ -109,5 +109,25 @@
 		wifi@a800000 {
 			status = "ok";
 		};
+
+		usb3_ss_phy: usb-phy@9a000 {
+			status = "ok";
+		};
+
+		usb3_hs_phy: usb-phy@a6000 {
+			status = "ok";
+		};
+
+		usb3: usb3@8af8800 {
+			status = "ok";
+		};
+
+		usb2_hs_phy: usb-phy@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 Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH V2 1/3] dt-bindings: phy-qcom-ipq4019-usb: add binding document

In reply to John Crispin
Quoted 10 lines · John Crispin

This patch adds the binding documentation for the HS/SS USB PHY found inside Qualcomm 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