drivers: usb: phy: add driver for usb-nop-xceiv
cover drivers: usb: phy: add driver for usb-nop-xceiv
From: "Ying-Chun Liu (PaulLiu)" <[email protected]>
implement the generic NOP USB transceiver for all USB transceiver which are either built-in into USB IP or which are mostly autonomous.
Ying-Chun Liu (PaulLiu) (2):
drivers: usb: phy: add driver for usb-nop-xceiv
doc: device-tree-bindings: phy: usb-nop-xceiv
.../phy/usb-nop-xceiv.txt | 43 ++++++ drivers/usb/phy/Kconfig | 8 + drivers/usb/phy/Makefile | 1 + drivers/usb/phy/usb_nop_phy.c | 137 ++++++++++++++++++ 4 files changed, 189 insertions(+) create mode 100644 doc/device-tree-bindings/phy/usb-nop-xceiv.txt create mode 100644 drivers/usb/phy/usb_nop_phy.c
Signature · 1 line
2.30.1
PATCH 1/2 drivers: usb: phy: add driver for usb-nop-xceiv
From: "Ying-Chun Liu (PaulLiu)" <[email protected]>
implement the generic NOP USB transceiver for all USB transceiver which are either built-in into USB IP or which are mostly autonomous.
--- drivers/usb/phy/Kconfig | 8 ++ drivers/usb/phy/Makefile | 1 + drivers/usb/phy/usb_nop_phy.c | 137 ++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 drivers/usb/phy/usb_nop_phy.c
drivers/usb/phy/Kconfig +8 -0
@@ -13,3 +13,11 @@ config OMAP_USB_PHY config ROCKCHIP_USB2_PHY bool "Rockchip USB2 PHY" + +config NOP_USB_XCEIV + bool "NOP USB Transceiver Driver" + depends on PHY + help + This driver is to be used by all the usb transceiver which are either + built-in with usb ip or which are autonomous and doesn't require any + phy programming such as ISP1x04 etc.
drivers/usb/phy/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_TWL4030_USB) += twl4030.o obj-$(CONFIG_OMAP_USB_PHY) += omap_usb_phy.o obj-$(CONFIG_ROCKCHIP_USB2_PHY) += rockchip_usb2_phy.o +obj-$(CONFIG_NOP_USB_XCEIV) += usb_nop_phy.o
drivers/usb/phy/usb_nop_phy.c new file +137 -0
137 lines not on this page · raw message
Signature · 1 line
2.30.1
PATCH 2/2 doc: device-tree-bindings: phy: usb-nop-xceiv
In reply to Ying-Chun LiuFrom: "Ying-Chun Liu (PaulLiu)" <[email protected]>
Document the bindings for usb-nop-xceiv
--- .../phy/usb-nop-xceiv.txt | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 doc/device-tree-bindings/phy/usb-nop-xceiv.txt
doc/device-tree-bindings/phy/usb-nop-xceiv.txt new file +43 -0
@@ -0,0 +1,43 @@ +USB NOP PHY + +Required properties: +- compatible: should be usb-nop-xceiv +- #phy-cells: Must be 0 + +Optional properties: +- clocks: phandle to the PHY clock. Use as per Documentation/devicetree + /bindings/clock/clock-bindings.txt + This property is required if clock-frequency is specified. + +- clock-names: Should be "main_clk" + +- clock-frequency: the clock frequency (in Hz) that the PHY clock must + be configured to. + +- vcc-supply: phandle to the regulator that provides power to the PHY. + +- reset-gpios: Should specify the GPIO for reset. + +- vbus-detect-gpio: should specify the GPIO detecting a VBus insertion + (see Documentation/devicetree/bindings/gpio/gpio.txt) +- vbus-regulator : should specifiy the regulator supplying current drawn from + the VBus line (see Documentation/devicetree/bindings/regulator/regulator.txt). + +Example: + + hsusb1_phy { + compatible = "usb-nop-xceiv"; + clock-frequency = <19200000>; + clocks = <&osc 0>; + clock-names = "main_clk"; + vcc-supply = <&hsusb1_vcc_regulator>; + reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + vbus-detect-gpio = <&gpio2 13 GPIO_ACTIVE_HIGH>; + vbus-regulator = <&vbus_regulator>; + #phy-cells = <0>; + }; + +hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator +and expects that clock to be configured to 19.2MHz by the NOP PHY driver. +hsusb1_vcc_regulator provides power to the PHY and GPIO 7 controls RESET. +GPIO 13 detects VBus insertion, and accordingly notifies the vbus-regulator.
Signature · 1 line
2.30.1