Add Embedded USB Debugger (EUD) driver
Subsystems (4)
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.
Changes since v0:
- Remove select SERIAL_CORE from Kconfig as this patch doesn't involve anything related to serial console
- Changed the dt-bindings to remove extcon and replace it with graphs to represent a connection with client
Prakruthi Deepak Heragu (2):
dt-bindings: Documentation for qcom,eud
Embedded USB Debugger (EUD) driver
.../devicetree/bindings/soc/qcom/qcom,msm-eud.txt | 28 ++ drivers/soc/qcom/Kconfig | 12 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/eud.c | 340 +++++++++++++++++++++ 4 files changed, 381 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 | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt
Documentation/devicetree/bindings/soc/qcom/qcom,msm-eud.txt new file +41 -0
@@ -0,0 +1,41 @@ +* 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 for VBUS attach/detach and charger enable/disable +events. The link between client and EUD is established via a directed +graph. EUD driver has one endpoint of the graph link mentioning EUD as an +output link and clients registered for these notifications from the EUD +should have the other endpoint of the graph link as an input link. Each of +these endpoints should contain a 'remote-endpoint' phandle property that +points to the corresponding endpoint in the port of the remote device. + +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>; + port { + eud_output: endpoint { + remote-endpoint = <&usb3_input>; + }; + }; + }; + +An example for EUD client: + + usb3 { + port { + usb3_input: endpoint { + remote-endpoint = <&eud_output>; + }; + }; + };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
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 | 12 ++ drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/eud.c | 340 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 353 insertions(+) create mode 100644 drivers/soc/qcom/eud.c
drivers/soc/qcom/Kconfig +12 -0
@@ -136,4 +136,16 @@ 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 + 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 v1 2/2] Embedded USB Debugger (EUD) driver
Hi Prakruthi,
drivers/soc/qcom/eud.c line 35
Quoted 6 lines · Prakruthi Deepak Heragu
drivers/soc/qcom/eud.c new file +6
-0+ +#define EUD_INT_VBUS BIT(2) +#define EUD_INT_CHGR BIT(3) +#define EUD_INT_SAFE_MODE BIT(4) + +#define EUD_NR 1
I don't see any use of EUD_NR in the driver below. Do we need it?
Re: [PATCH v1 2/2] Embedded USB Debugger (EUD) driver
Quoted 11 lines · Trilok Soni
Hi Prakruthi,
drivers/soc/qcom/eud.c line 35
Quoted 6 lines · Prakruthi Deepak Heragu
drivers/soc/qcom/eud.c new file +6
-0+ +#define EUD_INT_VBUS BIT(2) +#define EUD_INT_CHGR BIT(3) +#define EUD_INT_SAFE_MODE BIT(4) + +#define EUD_NR 1I don't see any use of
EUD_NRin the driver below. Do we need it?
Sorry about that. Will get rid of it.
Quoted 10 lines · Prakruthi Deepak Heragu
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.
Any other review comments on this patch series?
---Trilok Soni