From dfee171ecdb0e539926b78d80baf8d84fc24c78c Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 11:59:55 -0700 Subject: [PATCH 01/20] Revert "FROMLIST: arm64: dts: qcom: Map USB connector to EUD for kodiak boards" This reverts commit 8c7f91d8f5390117341ccedf03dbca8620e1fede. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 11 +++++------ arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts | 11 +++++------ arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 11 +++++------ arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 11 +++++------ .../boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 11 +++++------ arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts | 11 +++++------ 6 files changed, 30 insertions(+), 36 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts index 9f0cfd0b5005e..04cb9230d29fd 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts @@ -89,7 +89,6 @@ reg = <0>; power-role = "dual"; data-role = "dual"; - usb-role-switch = <&usb_1>; ports { #address-cells = <1>; @@ -99,7 +98,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&eud_con>; + remote-endpoint = <&usb_1_dwc3_hs>; }; }; @@ -1479,6 +1478,10 @@ status = "okay"; }; +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c>; vdda18-supply = <&vreg_l1c>; @@ -1518,7 +1521,3 @@ qcom,calibration-variant = "Fairphone_5"; status = "okay"; }; - -&eud_con { - remote-endpoint = <&pmic_glink_hs_in>; -}; diff --git a/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts b/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts index ca9c1a09ca733..bf18c48520813 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts @@ -65,7 +65,6 @@ reg = <0>; power-role = "dual"; data-role = "dual"; - usb-role-switch = <&usb_1>; ports { #address-cells = <1>; @@ -75,7 +74,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&eud_con>; + remote-endpoint = <&usb_1_dwc3_hs>; }; }; @@ -827,6 +826,10 @@ status = "okay"; }; +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c_0p88>; vdda33-supply = <&vreg_l2b_3p072>; @@ -859,7 +862,3 @@ &usb_dp_qmpphy_out { remote-endpoint = <&pmic_glink_ss_in>; }; - -&eud_con { - remote-endpoint = <&pmic_glink_hs_in>; -}; diff --git a/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts b/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts index eb7e228787c24..797f37596bf19 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts @@ -75,7 +75,6 @@ reg = <0>; power-role = "dual"; data-role = "dual"; - usb-role-switch = <&usb_1>; ports { #address-cells = <1>; @@ -85,7 +84,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&eud_con>; + remote-endpoint = <&usb_1_dwc3_hs>; }; }; @@ -953,6 +952,10 @@ status = "okay"; }; +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c>; vdda18-supply = <&vreg_l1c>; @@ -983,10 +986,6 @@ remote-endpoint = <&pmic_glink_ss_in>; }; -&eud_con { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &venus { firmware-name = "qcom/qcm6490/SHIFT/otter/venus.mbn"; diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts index 6db3b2a9ff811..e393ccf1884af 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -185,7 +185,6 @@ reg = <0>; power-role = "dual"; data-role = "dual"; - usb-role-switch = <&usb_1>; ports { #address-cells = <1>; @@ -195,7 +194,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&eud_con>; + remote-endpoint = <&usb_1_dwc3_hs>; }; }; @@ -1372,12 +1371,12 @@ status = "okay"; }; -&usb_1_dwc3_ss { - remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>; +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; }; -&eud_con { - remote-endpoint = <&pmic_glink_hs_in>; +&usb_1_dwc3_ss { + remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>; }; &usb_1_hsphy { diff --git a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts index 05cd73b5bcbe2..f47efca42d48d 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts @@ -84,7 +84,6 @@ reg = <0>; power-role = "dual"; data-role = "dual"; - usb-role-switch = <&usb_1>; ports { #address-cells = <1>; @@ -94,7 +93,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&eud_con>; + remote-endpoint = <&usb_1_dwc3_hs>; }; }; @@ -1091,6 +1090,10 @@ status = "okay"; }; +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c_0p88>; vdda33-supply = <&vreg_l2b_3p072>; @@ -1124,10 +1127,6 @@ remote-endpoint = <&pmic_glink_ss_in>; }; -&eud_con { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &ufs_mem_hc { reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; vcc-supply = <&vreg_l7b_2p952>; diff --git a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts index f99a47334452f..cb59c122f6f6a 100644 --- a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts +++ b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts @@ -90,7 +90,6 @@ reg = <0>; power-role = "dual"; data-role = "dual"; - usb-role-switch = <&usb_1>; ports { #address-cells = <1>; @@ -100,7 +99,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&eud_con>; + remote-endpoint = <&usb_1_dwc3_hs>; }; }; @@ -1441,6 +1440,10 @@ status = "okay"; }; +&usb_1_dwc3_hs { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &usb_1_hsphy { vdda-pll-supply = <&vdd_a_usbhs_core>; vdda18-supply = <&vdd_a_usbhs_1p8>; @@ -1456,7 +1459,3 @@ &wifi { status = "okay"; }; - -&eud_con { - remote-endpoint = <&pmic_glink_hs_in>; -}; From c018513acbf996b89b8bf41a586c6b13d0ec96d8 Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:10 -0700 Subject: [PATCH 02/20] Revert "FROMLIST: arm64: dts: qcom: kodiak: Fix EUD USB controller connection" This reverts commit 53c87be283ff3509b852428bceef181f58236a1f. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- arch/arm64/boot/dts/qcom/kodiak.dtsi | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qcom/kodiak.dtsi index 6b57ab6b74836..988ca5f7c8a0e 100644 --- a/arch/arm64/boot/dts/qcom/kodiak.dtsi +++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi @@ -4400,6 +4400,12 @@ phy-names = "usb2-phy"; maximum-speed = "high-speed"; usb-role-switch; + + port { + usb2_role_switch: endpoint { + remote-endpoint = <&eud_ep>; + }; + }; }; qspi: spi@88dc000 { @@ -4723,22 +4729,16 @@ <0 0x88e2000 0 0x1000>; interrupts-extended = <&pdc 11 IRQ_TYPE_LEVEL_HIGH>; + status = "disabled"; + ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; - eud_ep: endpoint { - remote-endpoint = <&usb_1_dwc3_hs>; - }; - }; - - port@1 { - reg = <1>; - - eud_con: endpoint { + remote-endpoint = <&usb2_role_switch>; }; }; }; @@ -4965,7 +4965,6 @@ reg = <0>; usb_1_dwc3_hs: endpoint { - remote-endpoint = <&eud_ep>; }; }; From 20a8f010782944ef5ff74e28dc87088336bbd2b4 Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:11 -0700 Subject: [PATCH 03/20] Revert "FROMLIST: usb: dwc3: qcom: notify EUD driver of role changes" This reverts commit 84bffcdc566466681c51c21a7245e7884e8c6442. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- drivers/usb/dwc3/Kconfig | 1 - drivers/usb/dwc3/dwc3-qcom.c | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/drivers/usb/dwc3/Kconfig b/drivers/usb/dwc3/Kconfig index ae03ae45e50e4..18169727a413e 100644 --- a/drivers/usb/dwc3/Kconfig +++ b/drivers/usb/dwc3/Kconfig @@ -132,7 +132,6 @@ config USB_DWC3_QCOM depends on ARCH_QCOM || COMPILE_TEST depends on EXTCON || !EXTCON depends on OF - depends on USB_QCOM_EUD || !USB_QCOM_EUD default USB_DWC3 help Some Qualcomm SoCs use DesignWare Core IP for USB2/3 diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index 4c00b6b87f6d5..f43f73ac36ff1 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include @@ -20,7 +19,6 @@ #include #include #include -#include #include "core.h" #include "glue.h" @@ -563,7 +561,6 @@ static int dwc3_qcom_setup_irq(struct dwc3_qcom *qcom, struct platform_device *p static void dwc3_qcom_set_role_notifier(struct dwc3 *dwc, enum usb_role next_role) { struct dwc3_qcom *qcom = to_dwc3_qcom(dwc); - struct device_node *eud_node; if (qcom->current_role == next_role) return; @@ -573,13 +570,6 @@ static void dwc3_qcom_set_role_notifier(struct dwc3 *dwc, enum usb_role next_rol return; } - /* Notify EUD of role change */ - eud_node = of_graph_get_remote_node(qcom->dev->of_node, 0, -1); - if (eud_node) { - qcom_eud_usb_role_notify(eud_node, dwc->usb2_generic_phy[0], next_role); - of_node_put(eud_node); - } - if (qcom->current_role == USB_ROLE_DEVICE) dwc3_qcom_vbus_override_enable(qcom, false); else if (qcom->current_role != USB_ROLE_DEVICE) From 288aa7b4f27404e08969cc91e813a1c56428971f Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:12 -0700 Subject: [PATCH 04/20] Revert "FROMLIST: usb: misc: qcom_eud: add host mode coordination" This reverts commit edf1452564b0574f89ca502c3c6aa71bd2e19b9d. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- drivers/usb/misc/qcom_eud.c | 110 +---------------------------------- include/linux/usb/qcom_eud.h | 21 ------- 2 files changed, 1 insertion(+), 130 deletions(-) delete mode 100644 include/linux/usb/qcom_eud.h diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 5b5cf11d6f526..ae0c5b2f022a2 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -12,13 +12,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #define EUD_REG_INT1_EN_MASK 0x0024 @@ -44,14 +42,11 @@ struct eud_chip { struct phy *phy[EUD_MAX_PORTS]; void __iomem *base; phys_addr_t mode_mgr; - /* serializes EUD control operations */ - struct mutex state_lock; unsigned int int_status; int irq; bool enabled; bool usb_attached; bool phy_enabled; - bool eud_disabled_for_host; u8 port_idx; }; @@ -147,43 +142,17 @@ static ssize_t enable_store(struct device *dev, const char *buf, size_t count) { struct eud_chip *chip = dev_get_drvdata(dev); - enum usb_role role; bool enable; int ret; if (kstrtobool(buf, &enable)) return -EINVAL; - guard(mutex)(&chip->state_lock); - /* Skip operation if already in desired state */ if (chip->enabled == enable) return count; - /* - * Handle double-disable scenario: User is disabling EUD that was already - * disabled due to host mode. Since the hardware is already disabled, we - * only need to clear the host-disabled flag to prevent unwanted re-enabling - * when exiting host mode. This respects the user's explicit disable request. - */ - if (!enable && chip->eud_disabled_for_host) { - chip->eud_disabled_for_host = false; - chip->enabled = false; - return count; - } - if (enable) { - /* - * EUD functions by presenting itself as a USB device to the host PC for - * debugging, making it incompatible with USB host mode configuration. - * Prevent enabling EUD in this configuration to avoid hardware conflicts. - */ - role = usb_role_switch_get_role(chip->role_sw[chip->port_idx]); - if (role == USB_ROLE_HOST) { - dev_err(chip->dev, "Cannot enable EUD: USB port is in host mode\n"); - return -EBUSY; - } - ret = enable_eud(chip); if (ret) { dev_err(chip->dev, "failed to enable eud\n"); @@ -382,75 +351,6 @@ static int eud_parse_dt_port(struct eud_chip *chip, u8 port_id) return 0; } -/** - * qcom_eud_usb_role_notify - Notify EUD of USB role change - * @eud_node: Device node of the EUD device - * @phy: HSUSB PHY of the port changing role - * @role: New role being set - * - * Notifies EUD that a USB port is changing roles. EUD will disable itself - * if the port is switching to HOST mode, as EUD is incompatible with host - * mode operation. This API should be called by the USB controller driver - * when it switches the USB role. - * - * The PHY parameter is used to identify which physical USB port is changing - * roles. This is important in multi-port systems where EUD may be active on - * one port while another port changes roles. - * - * This is a best-effort notification - failures are logged but do not affect - * the role change operation. - */ -void qcom_eud_usb_role_notify(struct device_node *eud_node, struct phy *phy, - enum usb_role role) -{ - struct platform_device *pdev; - struct eud_chip *chip; - int ret; - - if (!of_device_is_compatible(eud_node, "qcom,eud")) - return; - - pdev = of_find_device_by_node(eud_node); - if (!pdev) - return; - - chip = platform_get_drvdata(pdev); - if (!chip) - goto put_dev; - - mutex_lock(&chip->state_lock); - - /* Only act if this notification is for the currently active EUD port */ - if (!chip->enabled || chip->phy[chip->port_idx] != phy) { - mutex_unlock(&chip->state_lock); - goto put_dev; - } - - /* - * chip->enabled preserves user's sysfs configuration and is not modified - * during host mode transitions to preserve user intent. - */ - if (role == USB_ROLE_HOST && !chip->eud_disabled_for_host) { - ret = disable_eud(chip); - if (ret) - dev_err(chip->dev, "Failed to disable EUD for host mode: %d\n", ret); - else - chip->eud_disabled_for_host = true; - } else if (role != USB_ROLE_HOST && chip->eud_disabled_for_host) { - ret = enable_eud(chip); - if (ret) - dev_err(chip->dev, "Failed to re-enable EUD after host mode: %d\n", ret); - else - chip->eud_disabled_for_host = false; - } - - mutex_unlock(&chip->state_lock); - -put_dev: - platform_device_put(pdev); -} -EXPORT_SYMBOL_GPL(qcom_eud_usb_role_notify); - static void eud_role_switch_release(void *data) { struct eud_chip *chip = data; @@ -472,8 +372,6 @@ static int eud_probe(struct platform_device *pdev) chip->dev = &pdev->dev; - mutex_init(&chip->state_lock); - /* * Parse the DT resources for primary port. * This is the default EUD port and is mandatory. @@ -518,14 +416,8 @@ static void eud_remove(struct platform_device *pdev) { struct eud_chip *chip = platform_get_drvdata(pdev); - platform_set_drvdata(pdev, NULL); - - mutex_lock(&chip->state_lock); - if (chip->enabled) { + if (chip->enabled) disable_eud(chip); - chip->enabled = false; - } - mutex_unlock(&chip->state_lock); device_init_wakeup(&pdev->dev, false); disable_irq_wake(chip->irq); diff --git a/include/linux/usb/qcom_eud.h b/include/linux/usb/qcom_eud.h deleted file mode 100644 index fe560426b78f3..0000000000000 --- a/include/linux/usb/qcom_eud.h +++ /dev/null @@ -1,21 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. - */ - -#ifndef __LINUX_USB_QCOM_EUD_H -#define __LINUX_USB_QCOM_EUD_H - -#include - -#if IS_ENABLED(CONFIG_USB_QCOM_EUD) -void qcom_eud_usb_role_notify(struct device_node *eud_node, struct phy *phy, - enum usb_role role); -#else -static inline void qcom_eud_usb_role_notify(struct device_node *eud_node, struct phy *phy, - enum usb_role role) -{ -} -#endif - -#endif /* __LINUX_USB_QCOM_EUD_H */ From 2bc2c2fd73e59e6326f4f4d2eb392f3a191ee2b8 Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:13 -0700 Subject: [PATCH 05/20] Revert "FROMLIST: usb: misc: qcom_eud: fix virtual attach/detach event handling" This reverts commit cbc24a407351ac7f12e13deed1c2eb507a8e1c00. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- drivers/usb/misc/qcom_eud.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index ae0c5b2f022a2..eee79774f5f8d 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -278,26 +278,10 @@ static irqreturn_t handle_eud_irq_thread(int irq, void *data) struct eud_chip *chip = data; int ret; - /* - * EUD virtual attach/detach event handling for low power debugging: - * - * When EUD is enabled in debug mode, the device remains physically - * connected to the PC throughout the debug session, keeping the USB - * controller active. This prevents testing of low power scenarios that - * require USB disconnection. - * - * EUD solves this by providing virtual USB attach/detach events while - * maintaining the physical connection. These events are triggered from - * the Host PC via the enumerated EUD control interface and delivered - * to the EUD driver as interrupts. - * - * These notifications are forwarded to the USB controller through role - * switch framework. - */ if (chip->usb_attached) ret = usb_role_switch_set_role(chip->role_sw[chip->port_idx], USB_ROLE_DEVICE); else - ret = usb_role_switch_set_role(chip->role_sw[chip->port_idx], USB_ROLE_NONE); + ret = usb_role_switch_set_role(chip->role_sw[chip->port_idx], USB_ROLE_HOST); if (ret) dev_err(chip->dev, "failed to set role switch\n"); From 2864f62270a7266d272437be7e3378308c15b69c Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:14 -0700 Subject: [PATCH 06/20] Revert "FROMLIST: usb: misc: qcom_eud: improve enable_store API" This reverts commit a43abda884518c5a4795c2a2154959202e28f13b. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- drivers/usb/misc/qcom_eud.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index eee79774f5f8d..c484fc88dea4d 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -148,27 +148,18 @@ static ssize_t enable_store(struct device *dev, if (kstrtobool(buf, &enable)) return -EINVAL; - /* Skip operation if already in desired state */ - if (chip->enabled == enable) - return count; - if (enable) { ret = enable_eud(chip); - if (ret) { - dev_err(chip->dev, "failed to enable eud\n"); - return ret; - } + if (!ret) + chip->enabled = enable; + else + disable_eud(chip); + } else { ret = disable_eud(chip); - if (ret) { - dev_err(chip->dev, "failed to disable eud\n"); - return ret; - } } - chip->enabled = enable; - - return count; + return ret < 0 ? ret : count; } static DEVICE_ATTR_RW(enable); From 793c5e08a626eb7711aface44f19301fa7288f51 Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:15 -0700 Subject: [PATCH 07/20] Revert "FROMLIST: usb: misc: qcom_eud: add per-port role switch support" This reverts commit 0987b89e360ef81b9e757487d44d18e84d6fe325. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- drivers/usb/misc/qcom_eud.c | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index c484fc88dea4d..571b21323797b 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -38,7 +38,7 @@ struct eud_chip { struct device *dev; - struct usb_role_switch *role_sw[EUD_MAX_PORTS]; + struct usb_role_switch *role_sw; struct phy *phy[EUD_MAX_PORTS]; void __iomem *base; phys_addr_t mode_mgr; @@ -112,7 +112,7 @@ static int enable_eud(struct eud_chip *priv) writel(EUD_INT_VBUS | EUD_INT_SAFE_MODE, priv->base + EUD_REG_INT1_EN_MASK); - return 0; + return usb_role_switch_set_role(priv->role_sw, USB_ROLE_DEVICE); } static int disable_eud(struct eud_chip *priv) @@ -270,9 +270,9 @@ static irqreturn_t handle_eud_irq_thread(int irq, void *data) int ret; if (chip->usb_attached) - ret = usb_role_switch_set_role(chip->role_sw[chip->port_idx], USB_ROLE_DEVICE); + ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_DEVICE); else - ret = usb_role_switch_set_role(chip->role_sw[chip->port_idx], USB_ROLE_HOST); + ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_HOST); if (ret) dev_err(chip->dev, "failed to set role switch\n"); @@ -287,7 +287,6 @@ static int eud_parse_dt_port(struct eud_chip *chip, u8 port_id) { struct device_node *controller_node; struct phy *phy; - struct usb_role_switch *role_sw; /* * Multiply port_id by 2 to get controller port number: @@ -308,31 +307,16 @@ static int eud_parse_dt_port(struct eud_chip *chip, u8 port_id) } chip->phy[port_id] = phy; - /* Only fetch role switch if usb-role-switch property exists */ - if (!of_property_read_bool(controller_node, "usb-role-switch")) { - of_node_put(controller_node); - return 0; - } - - role_sw = usb_role_switch_find_by_fwnode(of_fwnode_handle(controller_node)); of_node_put(controller_node); - if (!role_sw) - return dev_err_probe(chip->dev, -EPROBE_DEFER, - "failed to get role switch for port %u\n", port_id); - - chip->role_sw[port_id] = role_sw; - return 0; } static void eud_role_switch_release(void *data) { struct eud_chip *chip = data; - int i; - for (i = 0; i < EUD_MAX_PORTS; i++) - usb_role_switch_put(chip->role_sw[i]); + usb_role_switch_put(chip->role_sw); } static int eud_probe(struct platform_device *pdev) @@ -358,6 +342,11 @@ static int eud_probe(struct platform_device *pdev) /* Secondary port is optional */ eud_parse_dt_port(chip, 1); + chip->role_sw = usb_role_switch_get(&pdev->dev); + if (IS_ERR(chip->role_sw)) + return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), + "failed to get role switch\n"); + ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip); if (ret) return ret; From ebd2adc09aa930479e6f3c5ede21573d6d120054 Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:16 -0700 Subject: [PATCH 08/20] Revert "FROMLIST: usb: misc: qcom_eud: add per-port High-Speed PHY control" This reverts commit 5f5237955ee30ff41c57467b40f2f324b781b862. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- drivers/usb/misc/Kconfig | 1 - drivers/usb/misc/qcom_eud.c | 103 +----------------------------------- 2 files changed, 1 insertion(+), 103 deletions(-) diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig index 2d9190c756f9c..0b56b773dbdf7 100644 --- a/drivers/usb/misc/Kconfig +++ b/drivers/usb/misc/Kconfig @@ -147,7 +147,6 @@ config USB_APPLEDISPLAY config USB_QCOM_EUD tristate "QCOM Embedded USB Debugger(EUD) Driver" depends on ARCH_QCOM || COMPILE_TEST - depends on OF select QCOM_SCM select USB_ROLE_SWITCH help diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 571b21323797b..35324e1e1ea7e 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -11,8 +11,6 @@ #include #include #include -#include -#include #include #include #include @@ -39,74 +37,22 @@ struct eud_chip { struct device *dev; struct usb_role_switch *role_sw; - struct phy *phy[EUD_MAX_PORTS]; void __iomem *base; phys_addr_t mode_mgr; unsigned int int_status; int irq; bool enabled; bool usb_attached; - bool phy_enabled; u8 port_idx; }; -static int eud_phy_enable(struct eud_chip *chip) -{ - struct phy *phy; - int ret; - - if (chip->phy_enabled) - return 0; - - phy = chip->phy[chip->port_idx]; - - ret = phy_init(phy); - if (ret) { - dev_err(chip->dev, "Failed to initialize USB2 PHY for port %u: %d\n", - chip->port_idx, ret); - return ret; - } - - ret = phy_power_on(phy); - if (ret) { - dev_err(chip->dev, "Failed to power on USB2 PHY for port %u: %d\n", - chip->port_idx, ret); - phy_exit(phy); - return ret; - } - - chip->phy_enabled = true; - - return 0; -} - -static void eud_phy_disable(struct eud_chip *chip) -{ - struct phy *phy; - - if (!chip->phy_enabled) - return; - - phy = chip->phy[chip->port_idx]; - - phy_power_off(phy); - phy_exit(phy); - chip->phy_enabled = false; -} - static int enable_eud(struct eud_chip *priv) { int ret; - ret = eud_phy_enable(priv); - if (ret) - return ret; - ret = qcom_scm_io_writel(priv->mode_mgr + EUD_REG_EUD_EN2, 1); - if (ret) { - eud_phy_disable(priv); + if (ret) return ret; - } writel(EUD_ENABLE, priv->base + EUD_REG_CSR_EUD_EN); writel(EUD_INT_VBUS | EUD_INT_SAFE_MODE, @@ -124,8 +70,6 @@ static int disable_eud(struct eud_chip *priv) return ret; writel(0, priv->base + EUD_REG_CSR_EUD_EN); - eud_phy_disable(priv); - return 0; } @@ -186,11 +130,6 @@ static ssize_t port_store(struct device *dev, struct device_attribute *attr, if (port >= EUD_MAX_PORTS) return -EINVAL; - if (!chip->phy[port]) { - dev_err(chip->dev, "EUD not supported on selected port\n"); - return -EOPNOTSUPP; - } - /* Port selection must be done before enabling EUD */ if (chip->enabled) { dev_err(chip->dev, "Cannot change port while EUD is enabled\n"); @@ -283,35 +222,6 @@ static irqreturn_t handle_eud_irq_thread(int irq, void *data) return IRQ_HANDLED; } -static int eud_parse_dt_port(struct eud_chip *chip, u8 port_id) -{ - struct device_node *controller_node; - struct phy *phy; - - /* - * Multiply port_id by 2 to get controller port number: - * port_id 0 -> port@0 (primary USB controller) - * port_id 1 -> port@2 (secondary USB controller) - */ - controller_node = of_graph_get_remote_node(chip->dev->of_node, - port_id * 2, -1); - if (!controller_node) - return dev_err_probe(chip->dev, -ENODEV, - "failed to get controller node for port %u\n", port_id); - - phy = devm_of_phy_get_by_index(chip->dev, controller_node, 0); - if (IS_ERR(phy)) { - of_node_put(controller_node); - return dev_err_probe(chip->dev, PTR_ERR(phy), - "failed to get HS PHY for port %u\n", port_id); - } - chip->phy[port_id] = phy; - - of_node_put(controller_node); - - return 0; -} - static void eud_role_switch_release(void *data) { struct eud_chip *chip = data; @@ -331,17 +241,6 @@ static int eud_probe(struct platform_device *pdev) chip->dev = &pdev->dev; - /* - * Parse the DT resources for primary port. - * This is the default EUD port and is mandatory. - */ - ret = eud_parse_dt_port(chip, 0); - if (ret) - return ret; - - /* Secondary port is optional */ - eud_parse_dt_port(chip, 1); - chip->role_sw = usb_role_switch_get(&pdev->dev); if (IS_ERR(chip->role_sw)) return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), From aa29ac4c1eaaa5704904e4ee2792fd847320fb2c Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:17 -0700 Subject: [PATCH 09/20] Revert "FROMLIST: usb: misc: qcom_eud: add sysfs attribute for port selection" This reverts commit 5c70d700487556db50429d60ccd0eb3a0f69ea60. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- Documentation/ABI/testing/sysfs-driver-eud | 16 --------- drivers/usb/misc/qcom_eud.c | 41 ---------------------- 2 files changed, 57 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-driver-eud b/Documentation/ABI/testing/sysfs-driver-eud index 67223f73ee606..2bab0db2d2f0f 100644 --- a/Documentation/ABI/testing/sysfs-driver-eud +++ b/Documentation/ABI/testing/sysfs-driver-eud @@ -7,19 +7,3 @@ Description: EUD based on a 1 or a 0 value. By enabling EUD, the user is able to activate the mini-usb hub of EUD for debug and trace capabilities. - -What: /sys/bus/platform/drivers/qcom_eud/.../port -Date: January 2026 -Contact: Elson Serrao -Description: - Selects which USB port the Embedded USB Debugger (EUD) - is mapped to on platforms providing multiple High-Speed - USB ports. - - Valid values: - 0 - Primary USB port - 1 - Secondary USB port - - The attribute is writable only while EUD is disabled. - Reading the attribute returns the currently selected - USB port number. diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 35324e1e1ea7e..926419ca560fc 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -23,11 +23,8 @@ #define EUD_REG_VBUS_INT_CLR 0x0080 #define EUD_REG_CSR_EUD_EN 0x1014 #define EUD_REG_SW_ATTACH_DET 0x1018 -#define EUD_REG_PORT_SEL 0x1028 #define EUD_REG_EUD_EN2 0x0000 -#define EUD_MAX_PORTS 2 - #define EUD_ENABLE BIT(0) #define EUD_INT_PET_EUD BIT(0) #define EUD_INT_VBUS BIT(2) @@ -43,7 +40,6 @@ struct eud_chip { int irq; bool enabled; bool usb_attached; - u8 port_idx; }; static int enable_eud(struct eud_chip *priv) @@ -108,45 +104,8 @@ static ssize_t enable_store(struct device *dev, static DEVICE_ATTR_RW(enable); -static ssize_t port_show(struct device *dev, struct device_attribute *attr, char *buf) -{ - struct eud_chip *chip = dev_get_drvdata(dev); - - return sysfs_emit(buf, "%u\n", chip->port_idx); -} - -static ssize_t port_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct eud_chip *chip = dev_get_drvdata(dev); - u8 port; - int ret; - - ret = kstrtou8(buf, 0, &port); - if (ret) - return ret; - - /* Only port 0 and port 1 are valid */ - if (port >= EUD_MAX_PORTS) - return -EINVAL; - - /* Port selection must be done before enabling EUD */ - if (chip->enabled) { - dev_err(chip->dev, "Cannot change port while EUD is enabled\n"); - return -EBUSY; - } - - writel(port, chip->base + EUD_REG_PORT_SEL); - chip->port_idx = port; - - return count; -} - -static DEVICE_ATTR_RW(port); - static struct attribute *eud_attrs[] = { &dev_attr_enable.attr, - &dev_attr_port.attr, NULL, }; ATTRIBUTE_GROUPS(eud); From e8b975686a672dbc31f5b0b07e946f3e3c09eb56 Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:18 -0700 Subject: [PATCH 10/20] Revert "FROMLIST: dt-bindings: soc: qcom: eud: Add support for dual-port configuration" This reverts commit 94d8ce661ff7fb28168b57d31fdc2d520d081088. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- .../bindings/soc/qcom/qcom,eud.yaml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml index 12560342f37fb..84218636c0d8d 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml @@ -32,27 +32,18 @@ properties: ports: $ref: /schemas/graph.yaml#/properties/ports description: - These ports attach to endpoints of DWC3 controller nodes and Type-C - connector nodes. The controller has the "usb-role-switch" property. - EUD supports up to 2 USB ports. For single-port configurations, use - port@0 and port@1. For dual-port configurations, use all four ports. + These ports is to be attached to the endpoint of the DWC3 controller node + and type C connector node. The controller has the "usb-role-switch" + property. properties: port@0: $ref: /schemas/graph.yaml#/properties/port - description: This port is to be attached to the primary DWC3 controller. + description: This port is to be attached to the DWC3 controller. port@1: $ref: /schemas/graph.yaml#/properties/port - description: This port is to be attached to the primary Type-C connector. - - port@2: - $ref: /schemas/graph.yaml#/properties/port - description: This port is to be attached to the secondary DWC3 controller. - - port@3: - $ref: /schemas/graph.yaml#/properties/port - description: This port is to be attached to the secondary Type-C connector. + description: This port is to be attached to the type C connector. required: - compatible From 8da4dff8dc4c1e10be8e5e6614a2de160c4deee1 Mon Sep 17 00:00:00 2001 From: Elson Roy Serrao Date: Wed, 13 May 2026 12:00:19 -0700 Subject: [PATCH 11/20] =?UTF-8?q?Revert=20"FROMLIST:=20dt-bindings:=20conn?= =?UTF-8?q?ector:=20Add=20role=E2=80=91switch=20provider=20phandle"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit e8d6ecf09cb6a0441148eec041d918061139f7da. Revert EUD v3 changes to align with the EUD v4 patch series posted upstream. Signed-off-by: Elson Roy Serrao --- .../devicetree/bindings/connector/usb-connector.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Documentation/devicetree/bindings/connector/usb-connector.yaml b/Documentation/devicetree/bindings/connector/usb-connector.yaml index ecad7781644ce..8ca0292490a2c 100644 --- a/Documentation/devicetree/bindings/connector/usb-connector.yaml +++ b/Documentation/devicetree/bindings/connector/usb-connector.yaml @@ -95,14 +95,6 @@ properties: - device - dual - usb-role-switch: - $ref: /schemas/types.yaml#/definitions/phandle - description: - A phandle to the USB role-switch provider. The provider is typically - a dual-role (DRD) USB controller node that declares the boolean - 'usb-role-switch' property. Use this when the connector is not - directly linked to the provider in the OF graph. - typec-power-opmode: description: Determines the power operation mode that the Type C connector will support and will advertise through CC pins when it has no power From 94b07a1be769a73970117b3bb729ab7e2bdbe5ee Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:27 -0700 Subject: [PATCH 12/20] FROMLIST: dt-bindings: soc: qcom: eud: Add per-path child nodes for UTMI routing The Qualcomm Embedded USB Debugger (EUD) can intercept one or two independent High-Speed UTMI paths, depending on the SoC configuration. Each path is distinct, with its own connector/controller connection and role-dependent UTMI routing. Because the EUD sits between the USB connector and the USB controller, it must relay role changes across the UTMI path. In device role, the EUD inserts its internal hub into the path to enable debug functionality. In host role, the path remains directly connected between the PHY and the USB controller, bypassing the EUD hub. These hardware constraints require per-path role awareness, as UTMI path roles may differ. The existing binding models only a single UTMI path and assumes a uniform routing model. While sufficient for simple device-role-only configurations, this representation does not accurately describe EUD hardware when role switching and/or multiple UTMI paths are involved. To address this limitation, per-path child nodes are introduced to describe individual UTMI paths through the EUD. Each path includes its own ports description, allowing controller and connector associations, as well as role-aware routing. Link: https://lore.kernel.org/all/20260501170635.2641748-2-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao --- .../bindings/soc/qcom/qcom,eud.yaml | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml index 84218636c0d8d..21f75038a81c6 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml @@ -45,10 +45,63 @@ properties: $ref: /schemas/graph.yaml#/properties/port description: This port is to be attached to the type C connector. + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + "^eud-path@[0-1]$": + type: object + description: + Represents one High-Speed UTMI path that EUD intercepts. Use eud-path nodes + to associate role-switching behavior with specific port connections, allowing + EUD to manage role transitions independently for each UTMI path. + + properties: + reg: + maxItems: 1 + description: Path number + + usb-role-switch: + type: boolean + description: + Indicates that EUD should act as a role switch for this path. + In device role, debug mode inserts the EUD hub into the UTMI path. In + host role, the EUD hub is bypassed and UTMI traffic flows directly + between the PHY and the USB controller. + + ports: + $ref: /schemas/graph.yaml#/properties/ports + description: + These ports are to be attached to the endpoint of the USB controller node + and USB connector node. + + properties: + port@0: + $ref: /schemas/graph.yaml#/properties/port + description: This port is to be attached to the USB controller. + + port@1: + $ref: /schemas/graph.yaml#/properties/port + description: This port is to be attached to the USB connector. + + required: + - reg + - ports + + additionalProperties: false + required: - compatible - reg - - ports + +oneOf: + - required: + - ports + - required: + - eud-path@0 additionalProperties: false From 547ed806980d3015042b7ba9ee59baab94293411 Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:28 -0700 Subject: [PATCH 13/20] FROMLIST: usb: misc: qcom_eud: add sysfs attribute for port selection EUD can be mapped to either the primary USB port or the secondary USB port depending on the value of the EUD_PORT_SEL register. Add a 'port' sysfs attribute to allow userspace to select which port EUD should operate on and update the ABI documentation. This is needed for systems with dual USB ports where EUD needs to be accessible on either port depending on the system configuration and use case. Link: https://lore.kernel.org/all/20260501170635.2641748-3-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao --- Documentation/ABI/testing/sysfs-driver-eud | 16 +++++++++ drivers/usb/misc/qcom_eud.c | 41 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-driver-eud b/Documentation/ABI/testing/sysfs-driver-eud index 2bab0db2d2f0f..a2a4fc5a9915e 100644 --- a/Documentation/ABI/testing/sysfs-driver-eud +++ b/Documentation/ABI/testing/sysfs-driver-eud @@ -7,3 +7,19 @@ Description: EUD based on a 1 or a 0 value. By enabling EUD, the user is able to activate the mini-usb hub of EUD for debug and trace capabilities. + +What: /sys/bus/platform/drivers/qcom_eud/.../port +Date: January 2026 +Contact: Elson Serrao +Description: + Selects which USB port the Embedded USB Debugger (EUD) + is mapped to on platforms providing multiple High-Speed + USB ports. + + Valid values: + primary - Primary USB port + secondary - Secondary USB port + + The attribute is writable only while EUD is disabled. + Reading the attribute returns the currently selected + USB port. diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 926419ca560fc..4aa49f0f58c0c 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -23,14 +23,22 @@ #define EUD_REG_VBUS_INT_CLR 0x0080 #define EUD_REG_CSR_EUD_EN 0x1014 #define EUD_REG_SW_ATTACH_DET 0x1018 +#define EUD_REG_PORT_SEL 0x1028 #define EUD_REG_EUD_EN2 0x0000 +#define EUD_MAX_PORTS 2 + #define EUD_ENABLE BIT(0) #define EUD_INT_PET_EUD BIT(0) #define EUD_INT_VBUS BIT(2) #define EUD_INT_SAFE_MODE BIT(4) #define EUD_INT_ALL (EUD_INT_VBUS | EUD_INT_SAFE_MODE) +static const char * const eud_port_names[] = { + "primary", + "secondary", +}; + struct eud_chip { struct device *dev; struct usb_role_switch *role_sw; @@ -40,6 +48,7 @@ struct eud_chip { int irq; bool enabled; bool usb_attached; + u8 port_idx; }; static int enable_eud(struct eud_chip *priv) @@ -104,8 +113,40 @@ static ssize_t enable_store(struct device *dev, static DEVICE_ATTR_RW(enable); +static ssize_t port_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct eud_chip *chip = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%s\n", eud_port_names[chip->port_idx]); +} + +static ssize_t port_store(struct device *dev, struct device_attribute *attr, + const char *buf, size_t count) +{ + struct eud_chip *chip = dev_get_drvdata(dev); + int port; + + port = sysfs_match_string(eud_port_names, buf); + if (port < 0) + return port; + + /* Port selection must be done before enabling EUD */ + if (chip->enabled) { + dev_err(chip->dev, "Cannot change port while EUD is enabled\n"); + return -EBUSY; + } + + writel(port, chip->base + EUD_REG_PORT_SEL); + chip->port_idx = port; + + return count; +} + +static DEVICE_ATTR_RW(port); + static struct attribute *eud_attrs[] = { &dev_attr_enable.attr, + &dev_attr_port.attr, NULL, }; ATTRIBUTE_GROUPS(eud); From fdb26dd6e701d32b9f58e8a38d18f69d5baf3299 Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:29 -0700 Subject: [PATCH 14/20] FROMLIST: usb: misc: qcom_eud: add per-path High-Speed PHY control EUD hardware can support multiple High-Speed USB paths, each routed through its own PHY. The active path is selected in hardware via the EUD_PORT_SEL register. As a High-Speed hub, EUD requires access to the High-Speed PHY associated with the active path. To support this multi-path capability, the driver must manage PHY resources on a per-path basis, ensuring that the PHY for the currently selected path is properly initialized and powered. This patch restructures the driver to implement per-path PHY management. The driver now powers the appropriate PHY based on the selected and enabled UTMI path, ensuring correct operation when EUD is enabled. Historically, EUD appeared to work on single-path systems because the USB controller kept the PHY initialized. However, EUD is designed to operate independently of the USB controller and therefore requires explicit PHY control for proper operation. Link: https://lore.kernel.org/all/20260501170635.2641748-4-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao --- drivers/usb/misc/qcom_eud.c | 126 +++++++++++++++++++++++++++++++++++- 1 file changed, 125 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 4aa49f0f58c0c..a624c44d5d599 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include #include @@ -39,26 +41,84 @@ static const char * const eud_port_names[] = { "secondary", }; +struct eud_path { + struct eud_chip *chip; + struct phy *phy; + u8 num; +}; + struct eud_chip { struct device *dev; struct usb_role_switch *role_sw; void __iomem *base; + struct eud_path *paths[EUD_MAX_PORTS]; phys_addr_t mode_mgr; unsigned int int_status; int irq; bool enabled; bool usb_attached; + bool phy_enabled; u8 port_idx; }; +static int eud_phy_enable(struct eud_chip *chip) +{ + struct phy *phy; + int ret; + + if (chip->phy_enabled) + return 0; + + phy = chip->paths[chip->port_idx]->phy; + + ret = phy_init(phy); + if (ret) { + dev_err(chip->dev, "Failed to initialize USB2 PHY for port %u: %d\n", + chip->port_idx, ret); + return ret; + } + + ret = phy_power_on(phy); + if (ret) { + dev_err(chip->dev, "Failed to power on USB2 PHY for port %u: %d\n", + chip->port_idx, ret); + phy_exit(phy); + return ret; + } + + chip->phy_enabled = true; + + return 0; +} + +static void eud_phy_disable(struct eud_chip *chip) +{ + struct phy *phy; + + if (!chip->phy_enabled) + return; + + phy = chip->paths[chip->port_idx]->phy; + + phy_power_off(phy); + phy_exit(phy); + chip->phy_enabled = false; +} + static int enable_eud(struct eud_chip *priv) { int ret; - ret = qcom_scm_io_writel(priv->mode_mgr + EUD_REG_EUD_EN2, 1); + ret = eud_phy_enable(priv); if (ret) return ret; + ret = qcom_scm_io_writel(priv->mode_mgr + EUD_REG_EUD_EN2, 1); + if (ret) { + eud_phy_disable(priv); + return ret; + } + writel(EUD_ENABLE, priv->base + EUD_REG_CSR_EUD_EN); writel(EUD_INT_VBUS | EUD_INT_SAFE_MODE, priv->base + EUD_REG_INT1_EN_MASK); @@ -75,6 +135,8 @@ static int disable_eud(struct eud_chip *priv) return ret; writel(0, priv->base + EUD_REG_CSR_EUD_EN); + eud_phy_disable(priv); + return 0; } @@ -130,6 +192,12 @@ static ssize_t port_store(struct device *dev, struct device_attribute *attr, if (port < 0) return port; + /* Check if the corresponding path is available */ + if (!chip->paths[port]) { + dev_err(chip->dev, "EUD not supported on selected port\n"); + return -EOPNOTSUPP; + } + /* Port selection must be done before enabling EUD */ if (chip->enabled) { dev_err(chip->dev, "Cannot change port while EUD is enabled\n"); @@ -229,8 +297,54 @@ static void eud_role_switch_release(void *data) usb_role_switch_put(chip->role_sw); } +static int eud_init_path(struct eud_chip *chip, struct device_node *np) +{ + struct device_node *controller_node; + struct eud_path *path; + u32 path_num; + int ret; + + ret = of_property_read_u32(np, "reg", &path_num); + if (ret) { + /* Legacy DT uses 'ports' node without 'reg' property; treat as path 0 */ + if (of_node_name_eq(np, "ports")) + path_num = 0; + else + return dev_err_probe(chip->dev, ret, "unexpected child node '%s'\n", + np->name); + } + + if (path_num >= EUD_MAX_PORTS) + return dev_err_probe(chip->dev, -EINVAL, "invalid path number: %u (max %d)\n", + path_num, EUD_MAX_PORTS - 1); + + path = devm_kzalloc(chip->dev, sizeof(*path), GFP_KERNEL); + if (!path) + return -ENOMEM; + + path->chip = chip; + path->num = path_num; + + controller_node = of_graph_get_remote_node(np, 0, -1); + if (!controller_node) + return dev_err_probe(chip->dev, -ENODEV, + "failed to get controller node for path %u\n", path_num); + + path->phy = devm_of_phy_get_by_index(chip->dev, controller_node, 0); + of_node_put(controller_node); + + if (IS_ERR(path->phy)) + return dev_err_probe(chip->dev, PTR_ERR(path->phy), + "failed to get PHY for path %d\n", path_num); + + chip->paths[path_num] = path; + + return 0; +} + static int eud_probe(struct platform_device *pdev) { + struct device_node *np = pdev->dev.of_node; struct eud_chip *chip; struct resource *res; int ret; @@ -241,6 +355,16 @@ static int eud_probe(struct platform_device *pdev) chip->dev = &pdev->dev; + for_each_child_of_node_scoped(np, child) { + ret = eud_init_path(chip, child); + if (ret) + return ret; + } + + /* Primary path is mandatory. Secondary is optional */ + if (!chip->paths[0]) + return dev_err_probe(chip->dev, -ENODEV, "primary path not found\n"); + chip->role_sw = usb_role_switch_get(&pdev->dev); if (IS_ERR(chip->role_sw)) return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), From f3f5f21d1c53f8d3da4c27f2a4c463bdcde9c3ce Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:30 -0700 Subject: [PATCH 15/20] FROMLIST: usb: misc: qcom_eud: add per-path role switch support The EUD hardware can support multiple High-Speed USB paths, each connected to different USB controllers. The current implementation uses a single chip-level role switch, which cannot properly handle multi-path configurations where each path needs independent role management. Since EUD is physically present between the USB connector and the controller, it should also relay the role change requests from the connector. Restructure the driver to support per-path role switches and remove the chip-level role switch. Additionally, as EUD need not modify the USB role upon enabling, remove the unnecessary role switch call from enable_eud(). Link: https://lore.kernel.org/all/20260501170635.2641748-5-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao --- drivers/usb/misc/qcom_eud.c | 89 +++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 19 deletions(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index a624c44d5d599..7fbb74bf1599f 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -44,12 +44,15 @@ static const char * const eud_port_names[] = { struct eud_path { struct eud_chip *chip; struct phy *phy; + struct usb_role_switch *controller_sw; + struct usb_role_switch *eud_sw; + enum usb_role curr_role; + char name[16]; u8 num; }; struct eud_chip { struct device *dev; - struct usb_role_switch *role_sw; void __iomem *base; struct eud_path *paths[EUD_MAX_PORTS]; phys_addr_t mode_mgr; @@ -123,7 +126,7 @@ static int enable_eud(struct eud_chip *priv) writel(EUD_INT_VBUS | EUD_INT_SAFE_MODE, priv->base + EUD_REG_INT1_EN_MASK); - return usb_role_switch_set_role(priv->role_sw, USB_ROLE_DEVICE); + return 0; } static int disable_eud(struct eud_chip *priv) @@ -274,12 +277,15 @@ static irqreturn_t handle_eud_irq(int irq, void *data) static irqreturn_t handle_eud_irq_thread(int irq, void *data) { struct eud_chip *chip = data; + struct eud_path *path; int ret; + path = chip->paths[chip->port_idx]; + if (chip->usb_attached) - ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_DEVICE); + ret = usb_role_switch_set_role(path->controller_sw, USB_ROLE_DEVICE); else - ret = usb_role_switch_set_role(chip->role_sw, USB_ROLE_HOST); + ret = usb_role_switch_set_role(path->controller_sw, USB_ROLE_HOST); if (ret) dev_err(chip->dev, "failed to set role switch\n"); @@ -290,15 +296,36 @@ static irqreturn_t handle_eud_irq_thread(int irq, void *data) return IRQ_HANDLED; } -static void eud_role_switch_release(void *data) +static int eud_role_switch_set(struct usb_role_switch *sw, enum usb_role role) { - struct eud_chip *chip = data; + struct eud_path *path = usb_role_switch_get_drvdata(sw); + int ret; + + /* Forward the role request to the USB controller */ + ret = usb_role_switch_set_role(path->controller_sw, role); + if (ret) { + dev_err(path->chip->dev, "failed to set role %s for port %u: %d\n", + usb_role_string(role), path->num, ret); + return ret; + } - usb_role_switch_put(chip->role_sw); + path->curr_role = role; + + return 0; +} + +static void eud_path_role_switch_release(void *data) +{ + struct eud_path *path = data; + + usb_role_switch_unregister(path->eud_sw); + usb_role_switch_put(path->controller_sw); } static int eud_init_path(struct eud_chip *chip, struct device_node *np) { + struct usb_role_switch_desc role_sw_desc; + struct usb_role_switch *sw; struct device_node *controller_node; struct eud_path *path; u32 path_num; @@ -331,11 +358,44 @@ static int eud_init_path(struct eud_chip *chip, struct device_node *np) "failed to get controller node for path %u\n", path_num); path->phy = devm_of_phy_get_by_index(chip->dev, controller_node, 0); - of_node_put(controller_node); - - if (IS_ERR(path->phy)) + if (IS_ERR(path->phy)) { + of_node_put(controller_node); return dev_err_probe(chip->dev, PTR_ERR(path->phy), "failed to get PHY for path %d\n", path_num); + } + + path->curr_role = USB_ROLE_NONE; + + /* Fetch controller role switch if it is role switch capable */ + if (of_property_read_bool(controller_node, "usb-role-switch")) { + sw = usb_role_switch_find_by_fwnode(of_fwnode_handle(controller_node)); + if (!sw) { + of_node_put(controller_node); + return dev_err_probe(chip->dev, -EPROBE_DEFER, + "Failed to get controller role switch for path %d\n", + path_num); + } + path->controller_sw = sw; + } + + of_node_put(controller_node); + + role_sw_desc.fwnode = of_fwnode_handle(np); + role_sw_desc.set = eud_role_switch_set; + role_sw_desc.driver_data = path; + snprintf(path->name, sizeof(path->name), "eud-path%u", path_num); + role_sw_desc.name = path->name; + + path->eud_sw = usb_role_switch_register(chip->dev, &role_sw_desc); + if (IS_ERR(path->eud_sw)) { + usb_role_switch_put(path->controller_sw); + return dev_err_probe(chip->dev, PTR_ERR(path->eud_sw), + "Failed to register EUD role switch for path %d\n", path_num); + } + + ret = devm_add_action_or_reset(chip->dev, eud_path_role_switch_release, path); + if (ret) + return ret; chip->paths[path_num] = path; @@ -365,15 +425,6 @@ static int eud_probe(struct platform_device *pdev) if (!chip->paths[0]) return dev_err_probe(chip->dev, -ENODEV, "primary path not found\n"); - chip->role_sw = usb_role_switch_get(&pdev->dev); - if (IS_ERR(chip->role_sw)) - return dev_err_probe(chip->dev, PTR_ERR(chip->role_sw), - "failed to get role switch\n"); - - ret = devm_add_action_or_reset(chip->dev, eud_role_switch_release, chip); - if (ret) - return ret; - chip->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(chip->base)) return PTR_ERR(chip->base); From 574d0a0803c1e5d8aee5ce44c10c73a01e33218f Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:31 -0700 Subject: [PATCH 16/20] FROMLIST: usb: misc: qcom_eud: improve enable_store API Currently enable_store() allows operations irrespective of the EUD state, which can result in redundant operations. Avoid this by adding duplicate state checks to skip requests when EUD is already in the desired state. Additionally, improve error handling with explicit logging to provide better feedback. Link: https://lore.kernel.org/all/20260501170635.2641748-6-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao Reviewed-by: Konrad Dybcio --- drivers/usb/misc/qcom_eud.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 7fbb74bf1599f..f656ffc8818a9 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -162,18 +162,27 @@ static ssize_t enable_store(struct device *dev, if (kstrtobool(buf, &enable)) return -EINVAL; + /* Skip operation if already in desired state */ + if (chip->enabled == enable) + return count; + if (enable) { ret = enable_eud(chip); - if (!ret) - chip->enabled = enable; - else - disable_eud(chip); - + if (ret) { + dev_err(chip->dev, "failed to enable eud\n"); + return ret; + } } else { ret = disable_eud(chip); + if (ret) { + dev_err(chip->dev, "failed to disable eud\n"); + return ret; + } } - return ret < 0 ? ret : count; + chip->enabled = enable; + + return count; } static DEVICE_ATTR_RW(enable); From e87a589708dbe05e48899263c2126019c4a66522 Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:32 -0700 Subject: [PATCH 17/20] FROMLIST: usb: misc: qcom_eud: add host mode coordination EUD functions by presenting itself as a USB device to the host PC for debugging, making it incompatible with USB host mode configurations. Enabling EUD while in host mode can also cause the USB controller to misbehave, as the EUD hub supports only a single upstream-facing port. Handle the following scenarios to prevent these conflicts: 1. Prevent the user from enabling EUD via sysfs when the USB port is in host mode. 2. Automatically disable EUD when the USB port switches to host mode, and re-enable it when exiting host mode. This ensures consistent state management without creating conflicts between the EUD debug hub and the USB controller. Link: https://lore.kernel.org/all/20260501170635.2641748-7-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao --- drivers/usb/misc/qcom_eud.c | 65 ++++++++++++++++++++++++++++++++++++- 1 file changed, 64 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index f656ffc8818a9..4734b6307a853 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -55,12 +55,15 @@ struct eud_chip { struct device *dev; void __iomem *base; struct eud_path *paths[EUD_MAX_PORTS]; + /* serializes EUD control operations */ + struct mutex state_lock; phys_addr_t mode_mgr; unsigned int int_status; int irq; bool enabled; bool usb_attached; bool phy_enabled; + bool eud_disabled_for_host; u8 port_idx; }; @@ -156,17 +159,43 @@ static ssize_t enable_store(struct device *dev, const char *buf, size_t count) { struct eud_chip *chip = dev_get_drvdata(dev); + struct eud_path *path; bool enable; int ret; if (kstrtobool(buf, &enable)) return -EINVAL; + guard(mutex)(&chip->state_lock); + /* Skip operation if already in desired state */ if (chip->enabled == enable) return count; + /* + * Handle double-disable scenario: User is disabling EUD that was already + * disabled due to host mode. Since the hardware is already disabled, we + * only need to clear the host-disabled flag to prevent unwanted re-enabling + * when exiting host mode. This respects the user's explicit disable request. + */ + if (!enable && chip->eud_disabled_for_host) { + chip->eud_disabled_for_host = false; + chip->enabled = false; + return count; + } + if (enable) { + /* + * EUD functions by presenting itself as a USB device to the host PC for + * debugging, making it incompatible with USB host mode configuration. + * Prevent enabling EUD in this configuration to avoid hardware conflicts. + */ + path = chip->paths[chip->port_idx]; + if (path->curr_role == USB_ROLE_HOST) { + dev_err(chip->dev, "cannot enable EUD: USB port is in host mode\n"); + return -EBUSY; + } + ret = enable_eud(chip); if (ret) { dev_err(chip->dev, "failed to enable eud\n"); @@ -308,9 +337,41 @@ static irqreturn_t handle_eud_irq_thread(int irq, void *data) static int eud_role_switch_set(struct usb_role_switch *sw, enum usb_role role) { struct eud_path *path = usb_role_switch_get_drvdata(sw); + struct eud_chip *chip = path->chip; int ret; - /* Forward the role request to the USB controller */ + guard(mutex)(&chip->state_lock); + + /* + * EUD must be disabled when USB operates in host mode. EUD functions by + * presenting itself as a USB device to the host PC for debugging, making + * it incompatible with host mode configuration. + * + * chip->enabled preserves user's sysfs configuration and is not modified + * during host mode transitions to maintain user intent. + */ + + /* Only act if EUD is enabled and this is the active path */ + if (chip->enabled && path->num == chip->port_idx) { + if (role == USB_ROLE_HOST && !chip->eud_disabled_for_host) { + ret = disable_eud(chip); + if (ret) { + dev_err(chip->dev, "failed to disable EUD for host mode: %d\n", + ret); + return ret; + } + chip->eud_disabled_for_host = true; + } else if (role != USB_ROLE_HOST && chip->eud_disabled_for_host) { + ret = enable_eud(chip); + if (ret) { + dev_err(chip->dev, "failed to re-enable EUD after host mode: %d\n", + ret); + return ret; + } + chip->eud_disabled_for_host = false; + } + } + ret = usb_role_switch_set_role(path->controller_sw, role); if (ret) { dev_err(path->chip->dev, "failed to set role %s for port %u: %d\n", @@ -424,6 +485,8 @@ static int eud_probe(struct platform_device *pdev) chip->dev = &pdev->dev; + mutex_init(&chip->state_lock); + for_each_child_of_node_scoped(np, child) { ret = eud_init_path(chip, child); if (ret) From 46625d64c6590358bb8473f9f5f90ba016698fc3 Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:33 -0700 Subject: [PATCH 18/20] FROMLIST: usb: misc: qcom_eud: fix virtual attach/detach event handling EUD provides virtual USB attach/detach events to simulate cable plug/unplug while maintaining the physical debug connection. However, the current implementation incorrectly sets the USB role to HOST on virtual detach, which doesn't represent the disconnected state. Fix the virtual detach handling by setting the USB role to NONE instead of HOST, correctly representing the disconnected state. Link: https://lore.kernel.org/all/20260501170635.2641748-8-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao Reviewed-by: Konrad Dybcio --- drivers/usb/misc/qcom_eud.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/qcom_eud.c b/drivers/usb/misc/qcom_eud.c index 4734b6307a853..187cbffbab13d 100644 --- a/drivers/usb/misc/qcom_eud.c +++ b/drivers/usb/misc/qcom_eud.c @@ -320,10 +320,26 @@ static irqreturn_t handle_eud_irq_thread(int irq, void *data) path = chip->paths[chip->port_idx]; + /* + * EUD virtual attach/detach event handling for low power debugging: + * + * When EUD is enabled in debug mode, the device remains physically + * connected to the PC throughout the debug session, keeping the USB + * controller active. This prevents testing of low power scenarios that + * require USB disconnection. + * + * EUD solves this by providing virtual USB attach/detach events while + * maintaining the physical connection. These events are triggered from + * the Host PC via the enumerated EUD control interface and delivered + * to the EUD driver as interrupts. + * + * These notifications are forwarded to the USB controller through role + * switch framework. + */ if (chip->usb_attached) ret = usb_role_switch_set_role(path->controller_sw, USB_ROLE_DEVICE); else - ret = usb_role_switch_set_role(path->controller_sw, USB_ROLE_HOST); + ret = usb_role_switch_set_role(path->controller_sw, USB_ROLE_NONE); if (ret) dev_err(chip->dev, "failed to set role switch\n"); From d6906a9fb78e42908437c658b2f03a2a6f83749d Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:34 -0700 Subject: [PATCH 19/20] FROMLIST: arm64: dts: qcom: kodiak: Describe EUD UTMI path using child node The existing EUD description uses a legacy single-path representation that assumes uniform UTMI routing. This was sufficient for minimal configurations where the USB port operated only in device mode and role switching was not considered. Update the description to explicitly model the topology using eud path child node and add a role-switch declaration to reflect role-dependent UTMI routing. Also on this SoC, the EUD hardware intercepts only the primary UTMI path. So remove the USB endpoint mapping to the secondary controller and associate it with the primary controller. With the UTMI path now accurately described, enable the EUD by default. The connector side of the path is left unspecified, allowing board-level DTS files to describe the physical connector mapping. Link: https://lore.kernel.org/all/20260501170635.2641748-9-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao --- arch/arm64/boot/dts/qcom/kodiak.dtsi | 35 +++++++++++++++++----------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/kodiak.dtsi b/arch/arm64/boot/dts/qcom/kodiak.dtsi index 988ca5f7c8a0e..cad1d78f9e629 100644 --- a/arch/arm64/boot/dts/qcom/kodiak.dtsi +++ b/arch/arm64/boot/dts/qcom/kodiak.dtsi @@ -4400,12 +4400,6 @@ phy-names = "usb2-phy"; maximum-speed = "high-speed"; usb-role-switch; - - port { - usb2_role_switch: endpoint { - remote-endpoint = <&eud_ep>; - }; - }; }; qspi: spi@88dc000 { @@ -4729,16 +4723,28 @@ <0 0x88e2000 0 0x1000>; interrupts-extended = <&pdc 11 IRQ_TYPE_LEVEL_HIGH>; - status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; - ports { - #address-cells = <1>; - #size-cells = <0>; + eud0: eud-path@0 { + reg = <0>; + usb-role-switch; - port@0 { - reg = <0>; - eud_ep: endpoint { - remote-endpoint = <&usb2_role_switch>; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + eud_usb: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + eud_con: endpoint { + }; }; }; }; @@ -4965,6 +4971,7 @@ reg = <0>; usb_1_dwc3_hs: endpoint { + remote-endpoint = <&eud_usb>; }; }; From a2b5febb83934ac3bf39029b497de35a6b62512f Mon Sep 17 00:00:00 2001 From: Elson Serrao Date: Fri, 1 May 2026 10:06:35 -0700 Subject: [PATCH 20/20] FROMLIST: arm64: dts: qcom: Map USB connector to EUD on Kodiak boards On Kodiak-based boards, the primary USB connector is connected through the EUD on the High-Speed path. Update the board-level descriptions to map the USB connector endpoint to EUD, reflecting the intended hardware topology. Link: https://lore.kernel.org/all/20260501170635.2641748-10-elson.serrao@oss.qualcomm.com/ Signed-off-by: Elson Serrao --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 10 +++++----- arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts | 10 +++++----- arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts | 10 +++++----- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 10 +++++----- .../boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 10 +++++----- arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts index 04cb9230d29fd..c213e06a4428c 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts @@ -98,7 +98,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&usb_1_dwc3_hs>; + remote-endpoint = <&eud_con>; }; }; @@ -1478,10 +1478,6 @@ status = "okay"; }; -&usb_1_dwc3_hs { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c>; vdda18-supply = <&vreg_l1c>; @@ -1521,3 +1517,7 @@ qcom,calibration-variant = "Fairphone_5"; status = "okay"; }; + +&eud_con { + remote-endpoint = <&pmic_glink_hs_in>; +}; diff --git a/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts b/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts index bf18c48520813..e9c0463daa53d 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-particle-tachyon.dts @@ -74,7 +74,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&usb_1_dwc3_hs>; + remote-endpoint = <&eud_con>; }; }; @@ -826,10 +826,6 @@ status = "okay"; }; -&usb_1_dwc3_hs { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c_0p88>; vdda33-supply = <&vreg_l2b_3p072>; @@ -862,3 +858,7 @@ &usb_dp_qmpphy_out { remote-endpoint = <&pmic_glink_ss_in>; }; + +&eud_con { + remote-endpoint = <&pmic_glink_hs_in>; +}; diff --git a/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts b/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts index 797f37596bf19..650c4fbc1606d 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts @@ -84,7 +84,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&usb_1_dwc3_hs>; + remote-endpoint = <&eud_con>; }; }; @@ -952,10 +952,6 @@ status = "okay"; }; -&usb_1_dwc3_hs { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c>; vdda18-supply = <&vreg_l1c>; @@ -986,6 +982,10 @@ remote-endpoint = <&pmic_glink_ss_in>; }; +&eud_con { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &venus { firmware-name = "qcom/qcm6490/SHIFT/otter/venus.mbn"; diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts index e393ccf1884af..a0db2a2745d27 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -194,7 +194,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&usb_1_dwc3_hs>; + remote-endpoint = <&eud_con>; }; }; @@ -1371,14 +1371,14 @@ status = "okay"; }; -&usb_1_dwc3_hs { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &usb_1_dwc3_ss { remote-endpoint = <&usb_dp_qmpphy_usb_ss_in>; }; +&eud_con { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c_0p88>; vdda33-supply = <&vreg_l2b_3p072>; diff --git a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts index f47efca42d48d..387c38aa87d2d 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts @@ -93,7 +93,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&usb_1_dwc3_hs>; + remote-endpoint = <&eud_con>; }; }; @@ -1090,10 +1090,6 @@ status = "okay"; }; -&usb_1_dwc3_hs { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &usb_1_hsphy { vdda-pll-supply = <&vreg_l10c_0p88>; vdda33-supply = <&vreg_l2b_3p072>; @@ -1127,6 +1123,10 @@ remote-endpoint = <&pmic_glink_ss_in>; }; +&eud_con { + remote-endpoint = <&pmic_glink_hs_in>; +}; + &ufs_mem_hc { reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>; vcc-supply = <&vreg_l7b_2p952>; diff --git a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts index cb59c122f6f6a..a2e160f3f46ec 100644 --- a/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts +++ b/arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts @@ -99,7 +99,7 @@ reg = <0>; pmic_glink_hs_in: endpoint { - remote-endpoint = <&usb_1_dwc3_hs>; + remote-endpoint = <&eud_con>; }; }; @@ -1440,10 +1440,6 @@ status = "okay"; }; -&usb_1_dwc3_hs { - remote-endpoint = <&pmic_glink_hs_in>; -}; - &usb_1_hsphy { vdda-pll-supply = <&vdd_a_usbhs_core>; vdda18-supply = <&vdd_a_usbhs_1p8>; @@ -1459,3 +1455,7 @@ &wifi { status = "okay"; }; + +&eud_con { + remote-endpoint = <&pmic_glink_hs_in>; +};