* [PATCH v2 1/4] dt-bindings: usb: Move Tegra-specific Chipidea USB properties into a dedicated schema
2026-05-23 8:30 [PATCH v2 0/4] usb: chipidea: tegra: Add external control option Svyatoslav Ryhel
@ 2026-05-23 8:30 ` Svyatoslav Ryhel
2026-05-23 8:30 ` [PATCH v2 2/4] dt-bindings: usb: chipidea,usb2-tegra: Document nvidia,external-control property Svyatoslav Ryhel
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Svyatoslav Ryhel @ 2026-05-23 8:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Peter Chen,
Svyatoslav Ryhel, Xu Yang, Peng Fan
Cc: linux-usb, devicetree, linux-tegra, linux-kernel
Move all Tegra-specific Chipidea devices and their properties into a
dedicated schema file, by analogy with i.MX.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
.../bindings/usb/chipidea,usb2-tegra.yaml | 88 +++++++++++++++++++
.../devicetree/bindings/usb/ci-hdrc-usb2.yaml | 22 -----
2 files changed, 88 insertions(+), 22 deletions(-)
create mode 100644 Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml
diff --git a/Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml b/Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml
new file mode 100644
index 000000000000..78046f8a63ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml
@@ -0,0 +1,88 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/usb/chipidea,usb2-tegra.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Tegra USB2 ChipIdea USB controller
+
+maintainers:
+ - Svyatoslav Ryhel <clamor95@gmail.com>
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - nvidia,tegra20-ehci
+ - nvidia,tegra20-udc
+ - nvidia,tegra30-ehci
+ - nvidia,tegra30-udc
+ - nvidia,tegra114-udc
+ - nvidia,tegra124-udc
+ - items:
+ - enum:
+ - nvidia,tegra114-ehci
+ - nvidia,tegra124-ehci
+ - nvidia,tegra210-ehci
+ - const: nvidia,tegra30-ehci
+
+ operating-points-v2:
+ description: A phandle to the OPP table containing the performance states.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ nvidia,phy:
+ description: phandle of usb phy that connects to the port. Use "phys" instead.
+ $ref: /schemas/types.yaml#/definitions/phandle
+ deprecated: true
+
+ nvidia,needs-double-reset:
+ description: Indicates double reset or not.
+ type: boolean
+ deprecated: true
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - resets
+
+allOf:
+ - $ref: chipidea,usb2-common.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/tegra30-car.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ usb@7d000000 {
+ compatible = "nvidia,tegra30-udc";
+ reg = <0x7d000000 0x4000>;
+ interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
+ phy_type = "utmi";
+ clocks = <&tegra_car TEGRA30_CLK_USBD>;
+ resets = <&tegra_car 22>;
+ reset-names = "usb";
+ phys = <&phy1>;
+ power-domains = <&pd_core>;
+ operating-points-v2 = <&usbd_dvfs_opp_table>;
+
+ dr_mode = "otg";
+
+ hnp-disable;
+ srp-disable;
+ adp-disable;
+
+ usb-role-switch;
+ extcon = <&charger>, <&extcon>; /* vbus, id */
+ vbus-supply = <&usb_otg_vbus>;
+
+ port {
+ usb_in: endpoint {
+ remote-endpoint = <&connector_out>;
+ };
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
index 691d6cf02c27..5abca0572714 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
@@ -17,20 +17,8 @@ properties:
- chipidea,usb2
- lsi,zevio-usb
- nuvoton,npcm750-udc
- - nvidia,tegra20-ehci
- - nvidia,tegra20-udc
- - nvidia,tegra30-ehci
- - nvidia,tegra30-udc
- - nvidia,tegra114-udc
- - nvidia,tegra124-udc
- nxp,s32g2-usb
- qcom,ci-hdrc
- - items:
- - enum:
- - nvidia,tegra114-ehci
- - nvidia,tegra124-ehci
- - nvidia,tegra210-ehci
- - const: nvidia,tegra30-ehci
- items:
- const: xlnx,zynq-usb-2.20a
- const: chipidea,usb2
@@ -65,16 +53,6 @@ properties:
- description: register offset
- description: phy index
- nvidia,phy:
- description: phandle of usb phy that connects to the port. Use "phys" instead.
- $ref: /schemas/types.yaml#/definitions/phandle
- deprecated: true
-
- nvidia,needs-double-reset:
- description: Indicates double reset or not.
- type: boolean
- deprecated: true
-
ulpi:
type: object
additionalProperties: false
--
2.51.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 2/4] dt-bindings: usb: chipidea,usb2-tegra: Document nvidia,external-control property
2026-05-23 8:30 [PATCH v2 0/4] usb: chipidea: tegra: Add external control option Svyatoslav Ryhel
2026-05-23 8:30 ` [PATCH v2 1/4] dt-bindings: usb: Move Tegra-specific Chipidea USB properties into a dedicated schema Svyatoslav Ryhel
@ 2026-05-23 8:30 ` Svyatoslav Ryhel
2026-05-23 8:30 ` [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled Svyatoslav Ryhel
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Svyatoslav Ryhel @ 2026-05-23 8:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Peter Chen,
Svyatoslav Ryhel, Xu Yang, Peng Fan
Cc: linux-usb, devicetree, linux-tegra, linux-kernel
Document the nvidia,external-control property required, for example, for
USB lines in HSIC mode connected to a modem, where the modem requires
precise control over the USB bus to properly enumerate all its stages and
intermediate devices.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
.../devicetree/bindings/usb/chipidea,usb2-tegra.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml b/Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml
index 78046f8a63ad..d99a18900b5a 100644
--- a/Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml
+++ b/Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml
@@ -40,6 +40,13 @@ properties:
type: boolean
deprecated: true
+ nvidia,external-control:
+ description:
+ Indicates that the controller is configured externally and that the host
+ should not attempt to access it. This is usually used by a modem that
+ requires precise bus configuration.
+ type: boolean
+
required:
- compatible
- reg
--
2.51.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled
2026-05-23 8:30 [PATCH v2 0/4] usb: chipidea: tegra: Add external control option Svyatoslav Ryhel
2026-05-23 8:30 ` [PATCH v2 1/4] dt-bindings: usb: Move Tegra-specific Chipidea USB properties into a dedicated schema Svyatoslav Ryhel
2026-05-23 8:30 ` [PATCH v2 2/4] dt-bindings: usb: chipidea,usb2-tegra: Document nvidia,external-control property Svyatoslav Ryhel
@ 2026-05-23 8:30 ` Svyatoslav Ryhel
2026-05-25 14:43 ` Svyatoslav Ryhel
2026-05-23 8:30 ` [PATCH v2 4/4] usb: chipidea: tegra: Expose tegra_usb structure Svyatoslav Ryhel
2026-05-29 14:57 ` [PATCH v2 0/4] usb: chipidea: tegra: Add external control option Svyatoslav Ryhel
4 siblings, 1 reply; 9+ messages in thread
From: Svyatoslav Ryhel @ 2026-05-23 8:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Peter Chen,
Svyatoslav Ryhel, Xu Yang, Peng Fan
Cc: linux-usb, devicetree, linux-tegra, linux-kernel
If the USB controller and PHY are externally controlled, then the
registration of the controller and the PHY initialization should be
skipped, since these configurations must be done by the device that
controls the bus to work correctly.
Since USB PHY in Tegra controls clock gates required by the controller
itself, Chipidea core PHY management is not suitable for Tegra.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/usb/chipidea/ci_hdrc_tegra.c | 32 ++++++++++++++++++----------
1 file changed, 21 insertions(+), 11 deletions(-)
diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
index 372788f0f970..a19cb3b33bf3 100644
--- a/drivers/usb/chipidea/ci_hdrc_tegra.c
+++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
@@ -32,6 +32,7 @@ struct tegra_usb {
struct clk *clk;
bool needs_double_reset;
+ bool externally_controlled;
};
struct tegra_usb_soc_info {
@@ -312,6 +313,9 @@ static int tegra_usb_probe(struct platform_device *pdev)
if (device_property_present(&pdev->dev, "nvidia,needs-double-reset"))
usb->needs_double_reset = true;
+ if (device_property_present(&pdev->dev, "nvidia,external-control"))
+ usb->externally_controlled = true;
+
err = tegra_usb_reset_controller(&pdev->dev);
if (err) {
dev_err_probe(&pdev->dev, err, "failed to reset controller");
@@ -323,9 +327,11 @@ static int tegra_usb_probe(struct platform_device *pdev)
* initialized, otherwise CPU will hang because clocks are gated.
* PHY driver controls gating of internal USB clocks on Tegra.
*/
- err = usb_phy_init(usb->phy);
- if (err)
- goto fail_power_off;
+ if (!usb->externally_controlled) {
+ err = usb_phy_init(usb->phy);
+ if (err)
+ goto fail_power_off;
+ }
/* setup and register ChipIdea HDRC device */
usb->soc = soc;
@@ -342,12 +348,14 @@ static int tegra_usb_probe(struct platform_device *pdev)
if (of_usb_get_phy_mode(pdev->dev.of_node) == USBPHY_INTERFACE_MODE_ULPI)
usb->data.flags &= ~CI_HDRC_SUPPORTS_RUNTIME_PM;
- usb->dev = ci_hdrc_add_device(&pdev->dev, pdev->resource,
- pdev->num_resources, &usb->data);
- if (IS_ERR(usb->dev)) {
- err = dev_err_probe(&pdev->dev, PTR_ERR(usb->dev),
- "failed to add HDRC device");
- goto phy_shutdown;
+ if (!usb->externally_controlled) {
+ usb->dev = ci_hdrc_add_device(&pdev->dev, pdev->resource,
+ pdev->num_resources, &usb->data);
+ if (IS_ERR(usb->dev)) {
+ err = dev_err_probe(&pdev->dev, PTR_ERR(usb->dev),
+ "failed to add HDRC device");
+ goto phy_shutdown;
+ }
}
return 0;
@@ -365,8 +373,10 @@ static void tegra_usb_remove(struct platform_device *pdev)
{
struct tegra_usb *usb = platform_get_drvdata(pdev);
- ci_hdrc_remove_device(usb->dev);
- usb_phy_shutdown(usb->phy);
+ if (!usb->externally_controlled) {
+ ci_hdrc_remove_device(usb->dev);
+ usb_phy_shutdown(usb->phy);
+ }
pm_runtime_put_sync_suspend(&pdev->dev);
pm_runtime_force_suspend(&pdev->dev);
--
2.51.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled
2026-05-23 8:30 ` [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled Svyatoslav Ryhel
@ 2026-05-25 14:43 ` Svyatoslav Ryhel
2026-05-28 7:23 ` Peter Chen (CIX)
0 siblings, 1 reply; 9+ messages in thread
From: Svyatoslav Ryhel @ 2026-05-25 14:43 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Peter Chen,
Svyatoslav Ryhel, Xu Yang, Peng Fan
Cc: linux-usb, devicetree, linux-tegra, linux-kernel
сб, 23 трав. 2026 р. о 11:30 Svyatoslav Ryhel <clamor95@gmail.com> пише:
>
> If the USB controller and PHY are externally controlled, then the
> registration of the controller and the PHY initialization should be
> skipped, since these configurations must be done by the device that
> controls the bus to work correctly.
>
> Since USB PHY in Tegra controls clock gates required by the controller
> itself, Chipidea core PHY management is not suitable for Tegra.
>
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
> drivers/usb/chipidea/ci_hdrc_tegra.c | 32 ++++++++++++++++++----------
> 1 file changed, 21 insertions(+), 11 deletions(-)
>
Hello there!
This patch is required because I could not find an acceptable way to
manually remove and add a platform device. I will explain the details
below and hope that someone can give me some suggestions on how to
handle this situation.
The Tegra USB controller is the root node, and it is bound and probed
automatically. This is perfectly fine for ordinary use cases. On the
other hand, the modem used in Tegra 3 devices requires the USB
controller to be registered at the exact moment when the modem is
ready to handle USB. If this window is not respected, the modem will
not expose the USB device, and all you get is a cascade of enumeration
failures.
The solution as I see it right now: The modem has a power sequencing
driver, and the USB controller can either be autoprobed and
unregistered in the pseq probe and then registered/unregistered in the
on/off sequences, or it can have a status = "reserved" set in the USB
node and manually register/unregister it during the pseq on/off
sequences. This would eliminate the need for this patch.
The problem I have faced is that I cannot properly and manually
control the USB controller driver to bind -> probe it and remove ->
unbind it from within powerseq.
Help is appreciated. Thanks!
Best regards,
Svyatoslav R.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled
2026-05-25 14:43 ` Svyatoslav Ryhel
@ 2026-05-28 7:23 ` Peter Chen (CIX)
2026-05-28 11:12 ` Svyatoslav Ryhel
0 siblings, 1 reply; 9+ messages in thread
From: Peter Chen (CIX) @ 2026-05-28 7:23 UTC (permalink / raw)
To: Svyatoslav Ryhel
Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Xu Yang, Peng Fan,
linux-usb, devicetree, linux-tegra, linux-kernel
On 26-05-25 17:43:42, Svyatoslav Ryhel wrote:
> сб, 23 трав. 2026 р. о 11:30 Svyatoslav Ryhel <clamor95@gmail.com> пише:
> >
> > If the USB controller and PHY are externally controlled, then the
> > registration of the controller and the PHY initialization should be
> > skipped, since these configurations must be done by the device that
> > controls the bus to work correctly.
> >
> > Since USB PHY in Tegra controls clock gates required by the controller
> > itself, Chipidea core PHY management is not suitable for Tegra.
> >
> > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > ---
> > drivers/usb/chipidea/ci_hdrc_tegra.c | 32 ++++++++++++++++++----------
> > 1 file changed, 21 insertions(+), 11 deletions(-)
> >
>
> Hello there!
>
> This patch is required because I could not find an acceptable way to
> manually remove and add a platform device. I will explain the details
> below and hope that someone can give me some suggestions on how to
> handle this situation.
>
> The Tegra USB controller is the root node, and it is bound and probed
> automatically. This is perfectly fine for ordinary use cases. On the
> other hand, the modem used in Tegra 3 devices requires the USB
> controller to be registered at the exact moment when the modem is
> ready to handle USB. If this window is not respected, the modem will
> not expose the USB device, and all you get is a cascade of enumeration
> failures.
Could you add USB controller device node as the child node for modem,
and dynamic creating USB controller device during modem probe?
Peter
>
> The solution as I see it right now: The modem has a power sequencing
> driver, and the USB controller can either be autoprobed and
> unregistered in the pseq probe and then registered/unregistered in the
> on/off sequences, or it can have a status = "reserved" set in the USB
> node and manually register/unregister it during the pseq on/off
> sequences. This would eliminate the need for this patch.
>
> The problem I have faced is that I cannot properly and manually
> control the USB controller driver to bind -> probe it and remove ->
> unbind it from within powerseq.
>
> Help is appreciated. Thanks!
>
> Best regards,
> Svyatoslav R.
--
Best regards,
Peter
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled
2026-05-28 7:23 ` Peter Chen (CIX)
@ 2026-05-28 11:12 ` Svyatoslav Ryhel
0 siblings, 0 replies; 9+ messages in thread
From: Svyatoslav Ryhel @ 2026-05-28 11:12 UTC (permalink / raw)
To: Peter Chen (CIX)
Cc: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Xu Yang, Peng Fan,
linux-usb, devicetree, linux-tegra, linux-kernel
чт, 28 трав. 2026 р. о 10:23 Peter Chen (CIX) <peter.chen@kernel.org> пише:
>
> On 26-05-25 17:43:42, Svyatoslav Ryhel wrote:
> > сб, 23 трав. 2026 р. о 11:30 Svyatoslav Ryhel <clamor95@gmail.com> пише:
> > >
> > > If the USB controller and PHY are externally controlled, then the
> > > registration of the controller and the PHY initialization should be
> > > skipped, since these configurations must be done by the device that
> > > controls the bus to work correctly.
> > >
> > > Since USB PHY in Tegra controls clock gates required by the controller
> > > itself, Chipidea core PHY management is not suitable for Tegra.
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> > > ---
> > > drivers/usb/chipidea/ci_hdrc_tegra.c | 32 ++++++++++++++++++----------
> > > 1 file changed, 21 insertions(+), 11 deletions(-)
> > >
> >
> > Hello there!
> >
> > This patch is required because I could not find an acceptable way to
> > manually remove and add a platform device. I will explain the details
> > below and hope that someone can give me some suggestions on how to
> > handle this situation.
> >
> > The Tegra USB controller is the root node, and it is bound and probed
> > automatically. This is perfectly fine for ordinary use cases. On the
> > other hand, the modem used in Tegra 3 devices requires the USB
> > controller to be registered at the exact moment when the modem is
> > ready to handle USB. If this window is not respected, the modem will
> > not expose the USB device, and all you get is a cascade of enumeration
> > failures.
>
> Could you add USB controller device node as the child node for modem,
> and dynamic creating USB controller device during modem probe?
>
> Peter
>
That might be an option, thank you! I have to tinker a bit this this.
Patch 1 of this sequence can be applied as it is.
Patches 2 and 3 should be dropped for now. There may be no need in them at all.
Patch 4 would be needed by modem, if it is appropriate to be applied,
I can resend patch 1 and 4 and that would be it.
> >
> > The solution as I see it right now: The modem has a power sequencing
> > driver, and the USB controller can either be autoprobed and
> > unregistered in the pseq probe and then registered/unregistered in the
> > on/off sequences, or it can have a status = "reserved" set in the USB
> > node and manually register/unregister it during the pseq on/off
> > sequences. This would eliminate the need for this patch.
> >
> > The problem I have faced is that I cannot properly and manually
> > control the USB controller driver to bind -> probe it and remove ->
> > unbind it from within powerseq.
> >
> > Help is appreciated. Thanks!
> >
> > Best regards,
> > Svyatoslav R.
>
> --
>
> Best regards,
> Peter
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 4/4] usb: chipidea: tegra: Expose tegra_usb structure
2026-05-23 8:30 [PATCH v2 0/4] usb: chipidea: tegra: Add external control option Svyatoslav Ryhel
` (2 preceding siblings ...)
2026-05-23 8:30 ` [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled Svyatoslav Ryhel
@ 2026-05-23 8:30 ` Svyatoslav Ryhel
2026-05-29 14:57 ` [PATCH v2 0/4] usb: chipidea: tegra: Add external control option Svyatoslav Ryhel
4 siblings, 0 replies; 9+ messages in thread
From: Svyatoslav Ryhel @ 2026-05-23 8:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Peter Chen,
Svyatoslav Ryhel, Xu Yang, Peng Fan
Cc: linux-usb, devicetree, linux-tegra, linux-kernel
The tegra_usb structure is platform data of USB controller and is required
for proper controller malipulation if its init/deinit is externally
controlled.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
drivers/usb/chipidea/ci_hdrc_tegra.c | 13 +------------
include/linux/usb/tegra_usb_phy.h | 15 +++++++++++++++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
index a19cb3b33bf3..109c4afdee4a 100644
--- a/drivers/usb/chipidea/ci_hdrc_tegra.c
+++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
@@ -16,6 +16,7 @@
#include <linux/usb/hcd.h>
#include <linux/usb/of.h>
#include <linux/usb/phy.h>
+#include <linux/usb/tegra_usb_phy.h>
#include <soc/tegra/common.h>
@@ -23,18 +24,6 @@
#include "ci.h"
-struct tegra_usb {
- struct ci_hdrc_platform_data data;
- struct platform_device *dev;
-
- const struct tegra_usb_soc_info *soc;
- struct usb_phy *phy;
- struct clk *clk;
-
- bool needs_double_reset;
- bool externally_controlled;
-};
-
struct tegra_usb_soc_info {
unsigned long flags;
unsigned int txfifothresh;
diff --git a/include/linux/usb/tegra_usb_phy.h b/include/linux/usb/tegra_usb_phy.h
index 6343f88df5de..ba74b7ebfba0 100644
--- a/include/linux/usb/tegra_usb_phy.h
+++ b/include/linux/usb/tegra_usb_phy.h
@@ -9,6 +9,7 @@
#include <linux/clk.h>
#include <linux/regmap.h>
#include <linux/reset.h>
+#include <linux/usb/chipidea.h>
#include <linux/usb/otg.h>
struct gpio_desc;
@@ -62,6 +63,20 @@ enum tegra_usb_phy_port_speed {
TEGRA_USB_PHY_PORT_SPEED_HIGH,
};
+struct tegra_usb_soc_info;
+
+struct tegra_usb {
+ struct ci_hdrc_platform_data data;
+ struct platform_device *dev;
+
+ const struct tegra_usb_soc_info *soc;
+ struct usb_phy *phy;
+ struct clk *clk;
+
+ bool needs_double_reset;
+ bool externally_controlled;
+};
+
struct tegra_xtal_freq;
struct tegra_usb_phy {
--
2.51.0
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH v2 0/4] usb: chipidea: tegra: Add external control option
2026-05-23 8:30 [PATCH v2 0/4] usb: chipidea: tegra: Add external control option Svyatoslav Ryhel
` (3 preceding siblings ...)
2026-05-23 8:30 ` [PATCH v2 4/4] usb: chipidea: tegra: Expose tegra_usb structure Svyatoslav Ryhel
@ 2026-05-29 14:57 ` Svyatoslav Ryhel
4 siblings, 0 replies; 9+ messages in thread
From: Svyatoslav Ryhel @ 2026-05-29 14:57 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Thierry Reding, Jonathan Hunter, Peter Chen,
Svyatoslav Ryhel, Xu Yang, Peng Fan
Cc: linux-usb, devicetree, linux-tegra, linux-kernel
сб, 23 трав. 2026 р. о 11:30 Svyatoslav Ryhel <clamor95@gmail.com> пише:
>
> Patchset adjusts the Tegra-specific portion of the Chipidea USB controller
> to allow for the disabling of automatic PHY and USB controller
> registration. This is achieved by adding the nvidia,external-control
> property/flag. It does not affect any existing configurations, but it
> allows the USB line to be registered or deregistered by an external
> device — in this case, the modem.
>
> Since Tegra USB PHY holds clock gating for controller PHY cannot be
> handled by code Chipidea mechanism.
>
> This patchset is a part of larger series aiming to bring XMM6260 modem
> support for Tegra devices:
> https://lore.kernel.org/lkml/20260511135703.62470-1-clamor95@gmail.com/
>
> ---
> Changes in v2:
> - separated Tegra USB into its own schema
> - tegra_usb structure moved into tegra_usb_phy.h
> ---
>
> Svyatoslav Ryhel (4):
> dt-bindings: usb: Move Tegra-specific Chipidea USB properties into a
> dedicated schema
> dt-bindings: usb: chipidea,usb2-tegra: Document
> nvidia,external-control property
> usb: chipidea: tegra: Avoid controller/PHY init if bus is externally
> controlled
> usb: chipidea: tegra: Expose tegra_usb structure
>
> .../bindings/usb/chipidea,usb2-tegra.yaml | 95 +++++++++++++++++++
> .../devicetree/bindings/usb/ci-hdrc-usb2.yaml | 22 -----
> drivers/usb/chipidea/ci_hdrc_tegra.c | 43 ++++-----
> include/linux/usb/tegra_usb_phy.h | 15 +++
> 4 files changed, 131 insertions(+), 44 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/usb/chipidea,usb2-tegra.yaml
>
> --
> 2.51.0
>
Hello there! There will be no v3. Sorry for disturbing LKML with 15
year old obsolete tech. My mistake.
^ permalink raw reply [flat|nested] 9+ messages in thread