Add Embedded USB Debugger (EUD) driver
cover Add Embedded USB Debugger (EUD) driver
This is a series of patches that implements a driver for the control peripheral, EUD (Embedded USB Debugger). The EUD is a mini-USB hub implemented on chip to support the USB-based debug and trace capabilities. Apart from debug capabilities, EUD has a control peripheral. Control Peripheral is on when EUD is on and gets signals like USB attach, pet EUD, charge phone etc. EUD driver listens to events like USB attach or detach and charger enable or disable and then notifies the USB driver or PMIC driver respectively about these events via EXTCON. At regular intervals, the EUD driver receives an interrupt to pet the driver indicating that the software is functional.
Prakruthi Deepak Heragu (2):
dt-bindings: Documentation for qcom,eud
Embedded USB Debugger (EUD) driver
.../devicetree/bindings/soc/qcom/qcom,msm-eud.txt | 32 ++ drivers/soc/qcom/Kconfig | 11 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/eud.c | 340 +++++++++++++++++++++ 4 files changed, 384 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt create mode 100644 drivers/soc/qcom/eud.c
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH 1/2 dt-bindings: Documentation for qcom,eud
Documentation for Embedded USB Debugger (EUD) device tree bindings.
--- .../devicetree/bindings/soc/qcom/qcom,msm-eud.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt
Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt new file +28 -0
@@ -0,0 +1,28 @@ +* Qualcomm Technologies Inc Embedded USB Debugger (EUD) + +The EUD (Embedded USB Debugger) is a mini-USB hub implemented +on chip to support the USB-based debug and trace capabilities. + +Required properties: + + - compatible: Should be "qcom,msm-eud" + - interrupts: Interrupt number + - reg: Should be address and size of EUD register space + +Driver notifies clients via extcon for VBUS attach/detach +and charger enable/disable events. Clients registered for these +notifications should have extcon property set to eud. + +An example for EUD device node: + + eud: qcom,msm-eud@88e0000 { + compatible = "qcom,msm-eud"; + interrupts = <GIC_SPI 492 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x88e0000 0x4000>; + }; + +An example for EUD extcon client: + + usb3 { + extcon = <&eud>; + };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Rob Herring
maintainerRe: [PATCH 1/2] dt-bindings: Documentation for qcom,eud
Quoted 2 lines · Prakruthi Deepak Heragu
Documentation for Embedded USB Debugger (EUD) device tree bindings.
If you want bindings reviewed, send them to the correct list and people (hint: run get_maintainers.pl).
New bindings should not use extcon.
Quoted 46 lines
Signed-off-by Satya Durga Srinivasu Prabhala <[email protected]>Signed-off-by Prakruthi Deepak Heragu <[email protected]>--- .../devicetree/bindings/soc/qcom/qcom,msm-eud.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txtDocumentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt new file +28
-1@@ -0,0 +1,28 @@ +* Qualcomm Technologies Inc Embedded USB Debugger (EUD) + +The EUD (Embedded USB Debugger) is a mini-USB hub implemented +on chip to support the USB-based debug and trace capabilities. + +Required properties: + + - compatible: Should be "qcom,msm-eud" + - interrupts: Interrupt number + - reg: Should be address and size of EUD register space + +Driver notifies clients via extcon for VBUS attach/detach +and charger enable/disable events. Clients registered for these +notifications should have extcon property set to eud. + +An example for EUD device node: + + eud: qcom,msm-eud@88e0000 { + compatible = "qcom,msm-eud"; + interrupts = <GIC_SPI 492 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x88e0000 0x4000>; + }; + +An example for EUD extcon client: + + usb3 { + extcon = <&eud>; + }; --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH 1/2] dt-bindings: Documentation for qcom,eud
Quoted 10 lines · Rob Herring
Quoted 2 lines · Prakruthi Deepak Heragu
Documentation for Embedded USB Debugger (EUD) device tree bindings.
If you want bindings reviewed, send them to the correct list and people (hint: run get_maintainers.pl).
New bindings should not use extcon.
Why should we not use extcon? Are there any alternatives which you would suggest? We were looking at graphs instead of extcon.
Quoted 48 lines
Quoted 48 lines
Signed-off-by Satya Durga Srinivasu Prabhala <[email protected]>Signed-off-by Prakruthi Deepak Heragu <[email protected]>--- .../devicetree/bindings/soc/qcom/qcom,msm-eud.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644
Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txtDocumentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt new file +28
-1@@ -0,0 +1,28 @@ +* Qualcomm Technologies Inc Embedded USB Debugger (EUD) + +The EUD (Embedded USB Debugger) is a mini-USB hub implemented +on chip to support the USB-based debug and trace capabilities. + +Required properties: + + - compatible: Should be "qcom,msm-eud" + - interrupts: Interrupt number + - reg: Should be address and size of EUD register space + +Driver notifies clients via extcon for VBUS attach/detach +and charger enable/disable events. Clients registered for these +notifications should have extcon property set to eud. + +An example for EUD device node: + + eud: qcom,msm-eud@88e0000 { + compatible = "qcom,msm-eud"; + interrupts = <GIC_SPI 492 IRQ_TYPE_LEVEL_HIGH>; + reg = <0x88e0000 0x4000>; + }; + +An example for EUD extcon client: + + usb3 { + extcon = <&eud>; + }; --The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Rob Herring
maintainerRe: [PATCH 1/2] dt-bindings: Documentation for qcom,eud
Quoted 5 lines · On Thu, Aug 2, 2018 at 12:44 PM <[email protected]> wrote:
Quoted 3 lines · Rob Herring
Quoted 1 line · Prakruthi Deepak Heragu
Quoted 8 lines
Quoted 7 lines
Quoted 1 line
Documentation for Embedded USB Debugger (EUD) device tree bindings.
If you want bindings reviewed, send them to the correct list and people (hint: run get_maintainers.pl).
New bindings should not use extcon.
Why should we not use extcon?
Because it is poorly designed and has things which are Linux specific.
Quoted 2 lines
Are there any alternatives which you
would suggest? We were looking at graphs instead of extcon.
There's a usb-connector binding now which does use graphs.
But I'm not really sure what this should look like given this appears to be both a USB device and a MMIO device.
Rob
PATCH 2/2 Embedded USB Debugger (EUD) driver
In reply to Prakruthi Deepak HeraguAdd support for control peripheral of EUD (Embedded USB Debugger) to listen to events such as USB attach/detach, charger enable/disable, pet EUD to indicate software is functional.
--- drivers/soc/qcom/Kconfig | 13 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/eud.c | 340 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 354 insertions(+) create mode 100644 drivers/soc/qcom/eud.c
drivers/soc/qcom/Kconfig +13 -0
@@ -136,4 +136,17 @@ config QCOM_APR application processor and QDSP6. APR is used by audio driver to configure QDSP6 ASM, ADM and AFE modules. + +config QCOM_EUD + tristate "QTI Embedded USB Debugger (EUD)" + depends on ARCH_QCOM + select SERIAL_CORE + help + The Embedded USB Debugger (EUD) driver is a driver for the + control peripheral which waits on events like USB attach/detach + and charger enable/disable. The control peripheral further helps + support the USB-based debug and trace capabilities. + This module enables support for Qualcomm Technologies, Inc. + Embedded USB Debugger (EUD). + If unsure, say N. endmenu
drivers/soc/qcom/Makefile +1 -0
@@ -15,3 +15,4 @@ obj-$(CONFIG_QCOM_SMP2P) += smp2p.o obj-$(CONFIG_QCOM_SMSM) += smsm.o obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o obj-$(CONFIG_QCOM_APR) += apr.o +obj-$(CONFIG_QCOM_EUD) += eud.o
drivers/soc/qcom/eud.c new file +340 -0
340 lines not on this page · raw message
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH 2/2] Embedded USB Debugger (EUD) driver
Hi Prakruthi,
Quoted 3 lines · Prakruthi Deepak Heragu
Add support for control peripheral of EUD (Embedded USB Debugger) to listen to events such as USB attach/detach, charger enable/disable, pet EUD to indicate software is functional.
We should CC linux-usb mailing list too?
drivers/soc/qcom/Kconfig config QCOM_APR · line 143
Quoted 5 lines
drivers/soc/qcom/Kconfig +5
-0+ +config QCOM_EUD + tristate "QTI Embedded USB Debugger (EUD)" + depends on ARCH_QCOM + select SERIAL_CORE
We don't need to select SERIAL_CORE since there is nothing related to serial console in this driver.
Signature · 2 lines
---Trilok Soni Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH 2/2] Embedded USB Debugger (EUD) driver
Quoted 9 lines · Trilok Soni
Hi Prakruthi,
Quoted 3 lines · Prakruthi Deepak Heragu
Add support for control peripheral of EUD (Embedded USB Debugger) to listen to events such as USB attach/detach, charger enable/disable, pet EUD to indicate software is functional.
We should CC linux-usb mailing list too?
Sure. Will get the id and do it.
Quoted 8 lines
drivers/soc/qcom/Kconfig config QCOM_APR · line 143
Quoted 5 lines
drivers/soc/qcom/Kconfig +5
-0+ +config QCOM_EUD + tristate "QTI Embedded USB Debugger (EUD)" + depends on ARCH_QCOM + select SERIAL_COREWe don't need to select
SERIAL_COREsince there is nothing related to serial console in this driver.
Yes, I will take it off. Shall I send a version 1?