* [PATCH 1/4] dt-bindings: soc: qcom: eud: add the QCM2290 EUD
2026-11-14 15:39 [PATCH 0/4] arm64: qcom: QCM2290: add the Embedded USB Debugger Igor Opaniuk
@ 2026-11-14 15:39 ` Igor Opaniuk
2026-11-23 10:22 ` Krzysztof Kozlowski
2026-11-14 15:39 ` [PATCH 2/4] usb: misc: qcom_eud: set the TCSR check register before enabling on QCM2290 Igor Opaniuk
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Igor Opaniuk @ 2026-11-14 15:39 UTC (permalink / raw)
To: Souradeep Chowdhury, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-kernel, linux-usb, Elson Serrao,
Igor Opaniuk
The QCM2290 has the same Embedded USB Debugger as the SC7280: the EUD
CSRs and the mode manager register that the secure world writes on
behalf of the driver. On QCM2290 the mode manager additionally ignores
the enable unless the TCSR register TCSR_APSS_SPARE_REG1 is set first;
the boot firmware does the same before enabling the EUD, and the
register is written through the same secure IO service.
Add the compatible and describe that register as a third reg entry,
required on QCM2290 and not allowed on the other EUDs.
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
---
.../devicetree/bindings/soc/qcom/qcom,eud.yaml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
index 84218636c0d8..14503527cdf2 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
@@ -17,13 +17,17 @@ properties:
compatible:
items:
- enum:
+ - qcom,qcm2290-eud
- qcom,sc7280-eud
- const: qcom,eud
reg:
+ minItems: 2
items:
- description: EUD Base Register Region
- description: EUD Mode Manager Register
+ - description: TCSR register that has to be set before the mode
+ manager accepts the enable
interrupts:
description: EUD interrupt
@@ -50,6 +54,21 @@ required:
- reg
- ports
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: qcom,qcm2290-eud
+ then:
+ properties:
+ reg:
+ minItems: 3
+ else:
+ properties:
+ reg:
+ maxItems: 2
+
additionalProperties: false
examples:
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH 1/4] dt-bindings: soc: qcom: eud: add the QCM2290 EUD
2026-11-14 15:39 ` [PATCH 1/4] dt-bindings: soc: qcom: eud: add the QCM2290 EUD Igor Opaniuk
@ 2026-11-23 10:22 ` Krzysztof Kozlowski
2026-11-23 10:41 ` Igor Opaniuk
0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-23 10:22 UTC (permalink / raw)
To: Igor Opaniuk
Cc: Souradeep Chowdhury, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, linux-arm-msm, devicetree, linux-kernel,
linux-usb, Elson Serrao
On Sat, Nov 14, 2026 at 04:39:04PM +0100, Igor Opaniuk wrote:
> The QCM2290 has the same Embedded USB Debugger as the SC7280: the EUD
> CSRs and the mode manager register that the secure world writes on
> behalf of the driver. On QCM2290 the mode manager additionally ignores
> the enable unless the TCSR register TCSR_APSS_SPARE_REG1 is set first;
> the boot firmware does the same before enabling the EUD, and the
> register is written through the same secure IO service.
>
> Add the compatible and describe that register as a third reg entry,
> required on QCM2290 and not allowed on the other EUDs.
>
> Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
> ---
Feedback from Sashiko looks reasonable and I do not see it being
responded to. Dropping from DT Patchwork.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] dt-bindings: soc: qcom: eud: add the QCM2290 EUD
2026-11-23 10:22 ` Krzysztof Kozlowski
@ 2026-11-23 10:41 ` Igor Opaniuk
2026-11-23 10:50 ` Krzysztof Kozlowski
0 siblings, 1 reply; 8+ messages in thread
From: Igor Opaniuk @ 2026-11-23 10:41 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Souradeep Chowdhury, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, linux-arm-msm, devicetree, linux-kernel,
linux-usb, Elson Serrao
Hi Krzysztof,
On Mon, Nov 23, 2026 at 11:22 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Sat, Nov 14, 2026 at 04:39:04PM +0100, Igor Opaniuk wrote:
> > The QCM2290 has the same Embedded USB Debugger as the SC7280: the EUD
> > CSRs and the mode manager register that the secure world writes on
> > behalf of the driver. On QCM2290 the mode manager additionally ignores
> > the enable unless the TCSR register TCSR_APSS_SPARE_REG1 is set first;
> > the boot firmware does the same before enabling the EUD, and the
> > register is written through the same secure IO service.
> >
> > Add the compatible and describe that register as a third reg entry,
> > required on QCM2290 and not allowed on the other EUDs.
> >
> > Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
> > ---
>
> Feedback from Sashiko looks reasonable and I do not see it being
> responded to. Dropping from DT Patchwork.
On Mon, Nov 23, 2026 at 11:22:21AM +0100, Krzysztof Kozlowski wrote:
> Feedback from Sashiko looks reasonable and I do not see it being
> responded to. Dropping from DT Patchwork.
Sorry for the silence. I just silently agreed with the feedback and
took it as is
without replying on the list, I was planning to send v2 with the
sashiko's warnings
addressed.
Is an explicit reply to sashiko's review comment expected as well, even when I
simply agree and address it in the next version? If so, I will do that
from now on.
Thanks,
Igor
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/4] dt-bindings: soc: qcom: eud: add the QCM2290 EUD
2026-11-23 10:41 ` Igor Opaniuk
@ 2026-11-23 10:50 ` Krzysztof Kozlowski
0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-23 10:50 UTC (permalink / raw)
To: Igor Opaniuk
Cc: Souradeep Chowdhury, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman, linux-arm-msm, devicetree, linux-kernel,
linux-usb, Elson Serrao
On 23/11/2026 11:41, Igor Opaniuk wrote:
> Is an explicit reply to sashiko's review comment expected as well, even when I
> simply agree and address it in the next version? If so, I will do that
> from now on.
Maintainers do not receive Sashiko review, so they do not know if you
are planning to send next version. They do not even know that patchset
has valid comments preventing it being applied. That's on Sashiko or
toolset, though.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/4] usb: misc: qcom_eud: set the TCSR check register before enabling on QCM2290
2026-11-14 15:39 [PATCH 0/4] arm64: qcom: QCM2290: add the Embedded USB Debugger Igor Opaniuk
2026-11-14 15:39 ` [PATCH 1/4] dt-bindings: soc: qcom: eud: add the QCM2290 EUD Igor Opaniuk
@ 2026-11-14 15:39 ` Igor Opaniuk
2026-11-14 15:39 ` [PATCH 3/4] arm64: dts: qcom: agatti: add the Embedded USB Debugger Igor Opaniuk
2026-11-14 15:39 ` [PATCH 4/4] arm64: dts: qcom: qrb2210-arduino-imola: enable the EUD Igor Opaniuk
3 siblings, 0 replies; 8+ messages in thread
From: Igor Opaniuk @ 2026-11-14 15:39 UTC (permalink / raw)
To: Souradeep Chowdhury, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-kernel, linux-usb, Elson Serrao,
Igor Opaniuk
On QCM2290 the EUD mode manager ignores EUD_EN2 unless the TCSR
register TCSR_APSS_SPARE_REG1 is set first. The boot firmware does
exactly that when it enables the EUD itself (TCSR_APSS_SPARE_REG1 = 1,
then EUD_EN2 = 1), but only when the device's debug policy asks for
it. Otherwise EUD_EN2 is accepted, the driver reports success, and the
EUD stays in bypass.
Take the register from an optional third reg entry and, like EUD_EN2,
write it through qcom_scm_io_writel(), right before EUD_EN2 on enable
and back to 0 after the disable. Whether the writes are allowed stays
the secure firmware's decision: QTEE accepts both when secure boot is
off or debug is not disabled; TF-A accepts TCSR_APSS_SPARE_REG1 always
and EUD_EN2 in debug builds only.
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
---
drivers/usb/misc/qcom_eud.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c
index 73f9fac22e19..217f6c1791f0 100644
--- a/drivers/usb/misc/qcom_eud.c
+++ b/drivers/usb/misc/qcom_eud.c
@@ -36,6 +36,7 @@ struct eud_chip {
struct usb_role_switch *role_sw;
void __iomem *base;
phys_addr_t mode_mgr;
+ phys_addr_t tcsr_check;
unsigned int int_status;
int irq;
bool enabled;
@@ -46,6 +47,16 @@ static int enable_eud(struct eud_chip *priv)
{
int ret;
+ /*
+ * On QCM2290 the boot firmware sets the TCSR check register before
+ * EUD_EN2; without it the mode manager ignores the enable.
+ */
+ if (priv->tcsr_check) {
+ ret = qcom_scm_io_writel(priv->tcsr_check, 1);
+ if (ret)
+ return ret;
+ }
+
ret = qcom_scm_io_writel(priv->mode_mgr + EUD_REG_EUD_EN2, 1);
if (ret)
return ret;
@@ -65,6 +76,9 @@ static int disable_eud(struct eud_chip *priv)
if (ret)
return ret;
+ if (priv->tcsr_check)
+ qcom_scm_io_writel(priv->tcsr_check, 0);
+
writel(0, priv->base + EUD_REG_CSR_EUD_EN);
return 0;
}
@@ -218,6 +232,11 @@ static int eud_probe(struct platform_device *pdev)
return -ENODEV;
chip->mode_mgr = res->start;
+ /* Optional TCSR check register, written through the secure IO SMC */
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
+ if (res)
+ chip->tcsr_check = res->start;
+
chip->irq = platform_get_irq(pdev, 0);
if (chip->irq < 0)
return chip->irq;
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 3/4] arm64: dts: qcom: agatti: add the Embedded USB Debugger
2026-11-14 15:39 [PATCH 0/4] arm64: qcom: QCM2290: add the Embedded USB Debugger Igor Opaniuk
2026-11-14 15:39 ` [PATCH 1/4] dt-bindings: soc: qcom: eud: add the QCM2290 EUD Igor Opaniuk
2026-11-14 15:39 ` [PATCH 2/4] usb: misc: qcom_eud: set the TCSR check register before enabling on QCM2290 Igor Opaniuk
@ 2026-11-14 15:39 ` Igor Opaniuk
2026-11-14 15:39 ` [PATCH 4/4] arm64: dts: qcom: qrb2210-arduino-imola: enable the EUD Igor Opaniuk
3 siblings, 0 replies; 8+ messages in thread
From: Igor Opaniuk @ 2026-11-14 15:39 UTC (permalink / raw)
To: Souradeep Chowdhury, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-kernel, linux-usb, Elson Serrao,
Igor Opaniuk
Describe the EUD: its CSRs at 0x1610000, the mode manager register at
0x1612000 and TCSR_APSS_SPARE_REG1 at 0x3e5018, which the secure world
writes on behalf of the driver, and its interrupt (eud_int[1], GIC SPI
189). Hook its port to a second endpoint of the dwc3 high-speed port so
the driver finds the role switch, while the board keeps the first
endpoint for its connector.
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/agatti.dtsi | 33 ++++++++++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/agatti.dtsi b/arch/arm64/boot/dts/qcom/agatti.dtsi
index ea9b39b1ed43..a77a5bf87838 100644
--- a/arch/arm64/boot/dts/qcom/agatti.dtsi
+++ b/arch/arm64/boot/dts/qcom/agatti.dtsi
@@ -826,6 +826,29 @@ gcc: clock-controller@1400000 {
#power-domain-cells = <1>;
};
+ eud: eud@1610000 {
+ compatible = "qcom,qcm2290-eud", "qcom,eud";
+ reg = <0x0 0x01610000 0x0 0x2000>,
+ <0x0 0x01612000 0x0 0x1000>,
+ <0x0 0x003e5018 0x0 0x4>;
+ interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ eud_ep: endpoint {
+ remote-endpoint = <&usb_dwc3_hs_eud>;
+ };
+ };
+ };
+ };
+
usb_hsphy: phy@1613000 {
compatible = "qcom,qcm2290-qusb2-phy";
reg = <0x0 0x01613000 0x0 0x180>;
@@ -1680,8 +1703,16 @@ ports {
port@0 {
reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
- usb_dwc3_hs: endpoint {
+ usb_dwc3_hs: endpoint@0 {
+ reg = <0>;
+ };
+
+ usb_dwc3_hs_eud: endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&eud_ep>;
};
};
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH 4/4] arm64: dts: qcom: qrb2210-arduino-imola: enable the EUD
2026-11-14 15:39 [PATCH 0/4] arm64: qcom: QCM2290: add the Embedded USB Debugger Igor Opaniuk
` (2 preceding siblings ...)
2026-11-14 15:39 ` [PATCH 3/4] arm64: dts: qcom: agatti: add the Embedded USB Debugger Igor Opaniuk
@ 2026-11-14 15:39 ` Igor Opaniuk
3 siblings, 0 replies; 8+ messages in thread
From: Igor Opaniuk @ 2026-11-14 15:39 UTC (permalink / raw)
To: Souradeep Chowdhury, Bjorn Andersson, Konrad Dybcio, Abel Vesa,
Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Greg Kroah-Hartman
Cc: linux-arm-msm, devicetree, linux-kernel, linux-usb, Elson Serrao,
Igor Opaniuk
The UNO Q exposes the EUD on its USB-C port: with it enabled, a host
sees the EUD hub and its SWD/trace functions, which OpenOCD's EUD
adapter uses to debug the SoC.
Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
index e99d2a56dc28..a1af2caa5bfc 100644
--- a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
+++ b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
@@ -226,6 +226,10 @@ vph_pwr: regulator-vph-pwr {
};
};
+&eud {
+ status = "okay";
+};
+
&gpi_dma0 {
status = "okay";
};
--
2.53.0
^ permalink raw reply [flat|nested] 8+ messages in thread