From nobody Sun May 24 19:33:38 2026 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BF04356761 for ; Sat, 23 May 2026 08:30:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525040; cv=none; b=DCrmnQVa2fwmAVxmLhof0sWe5rtQKdtsFAyUytQTnwtrcTtMmYAhY62Af5IXPeOJjrXDTLW69GoH+2umshvqkPvfdDpRgC8pxWADk+JHe3/Uxje29tHwIv/iQHDe8Y5wBnJrZrJ/KU6dO0a6DahnvLue77rAtX0q/fylQMrI95Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525040; c=relaxed/simple; bh=RFk4nd6bXVOHvzs0Um8Cm7YAd9OzwjBPCs0pyzgoFWk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WiEj+yeyAGWNyLmFnGt6V5J48yBZU8Pr01edN8Cnn6djgbglbytcAOTcSXXR7g8tCc6/cJeFUN+3fIVJK9rmKD17On87Jp0MCDlGvJVmiAB/Nx0J0et9T1ovDWWRay0EjVbhzI5GAmZ0EtuJCj/JawikrlV7ARTIylh3okR88p0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=oc675ppB; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oc675ppB" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-bd11a3729e8so1284955366b.0 for ; Sat, 23 May 2026 01:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779525037; x=1780129837; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=csVvMr98OyRGdIIeLSoE7oflCBXwh48FuWRULAXXVcU=; b=oc675ppBo2F7gBEfP/n/NeUIwg8MU3fq00oAODh9iYz+WyRmsqF7EAMqZEPUfBbCIZ be2eLhO+UrtGyqPXm3Tx5+FZ4uQ/ChWj5Nk4tkIQ7XKJZD/+ZfTWOpet5eXIJyNqyPcO Z44NSPBPYZDnXTOQi6dF/vfH5V0J2dCjI+SfmQ+ljRR/CBgeCVW1poUsfIn5FdoyB8Uh zkpgHwyP44saQ2CqXh8ax8wzelauBobar0t06WjKMhUq+YnD3pyFa5LH/2tQGV/sG8Af aUq0olDHM3JTodU8hXyOcls+SwxSkD6v4gleByWrfA7JGOWDOYt7GzAhxCz70/GtZ/JW 7nrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779525037; x=1780129837; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=csVvMr98OyRGdIIeLSoE7oflCBXwh48FuWRULAXXVcU=; b=oBuxIsNFCuQAmQDwWqNSIEPOi00SsOV2PKacsev+YLbI0qbP/dddLC8w/MgMWpA+6x jnxqyPLyK3O0OfnJd7KpnTjuWcxwFgcLngoAB8MlqHE2UaaHm/Gn/pzRFQXEvzexQLdi qQmSExa94WmMFvWBAlwX5Tyr42e/MaprF2HxHl8zfwBKBfSqtaqX+NwtzyOHk+5RH3Od p0gwzB5xT0NBlLnvj5b3clKcz8YYf/FYcSfGF5Jw5yg0m8BMrADJwex5nHk8048wrD2o DDfzrBIge55NX3hFgF6MYvqhFR4oWZH7rnI/8ec8Ep6vBytYGS1WoeDLkW/xB089j8Jt p2sg== X-Forwarded-Encrypted: i=1; AFNElJ+j1zxme1lB+p43uJXuXopGALngwn9AE2lFRujddkiUFc+4PbubWIolWhw0jmzsYsfgSOjWrGuneeurCjo=@vger.kernel.org X-Gm-Message-State: AOJu0YxRVO8D3MhFE3tvPpq7WwY0jsQMDI/1Gx+bLYKPZ09CTgo3ynvb kITJhTFx3wBNRk9bO1mfL1sSBvTk3OP3zuxlsEepmzViksZobfXB3F6g X-Gm-Gg: Acq92OHBVpn1sQAHGItoT3mBFPs41K2X9c1P9Ix3EARZrRVc2SW83HCVElZiEHvXKwH 7+3rFghLg+ETteENBhkVfCAToL+QWOINF03Irs/uns4wYlag/gnpHSQ7+fzjkk+uiDrHul5jBov esNRn8/ynUo32yenL5nim9hZKJ2ztNlm12FVg2ISc/+zU3H3rCAiswKGJAwbiQUGz2nwu7G4Ky6 nHnFOKAaF1gNG3skmRtrD7a21sGH7FflHpfIx60ApbebLG5/h8q6geRfAqQyMU1WtFk0KAQIZe7 fqIXtCzi/zJfXk2srWo35LaYgAvjuECjQuKN6m/rN1Z/avrNvTYFCGUsMOaBDmwoxNCtdYKuJDx ugE2r0Nv58JcyxaR2Aki//Y6dLf5hYU0HMbZ88pwKhPbI9IasvwD5xS5/4UNv7KKfGYnWA30Qwb kTcgpRP00t4N2svU274K17ngM= X-Received: by 2002:a17:907:3ea2:b0:bdb:b76c:4dd0 with SMTP id a640c23a62f3a-bdd263c954cmr455094666b.40.1779525036960; Sat, 23 May 2026 01:30:36 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-688bb62b6dfsm1651856a12.30.2026.05.23.01.30.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 May 2026 01:30:35 -0700 (PDT) From: Svyatoslav Ryhel 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@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] dt-bindings: usb: Move Tegra-specific Chipidea USB properties into a dedicated schema Date: Sat, 23 May 2026 11:30:09 +0300 Message-ID: <20260523083013.46372-2-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260523083013.46372-1-clamor95@gmail.com> References: <20260523083013.46372-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move all Tegra-specific Chipidea devices and their properties into a dedicated schema file, by analogy with i.MX. Signed-off-by: Svyatoslav Ryhel --- .../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-teg= ra.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 + +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 sta= tes. + $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 + #include + + usb@7d000000 { + compatible =3D "nvidia,tegra30-udc"; + reg =3D <0x7d000000 0x4000>; + interrupts =3D ; + phy_type =3D "utmi"; + clocks =3D <&tegra_car TEGRA30_CLK_USBD>; + resets =3D <&tegra_car 22>; + reset-names =3D "usb"; + phys =3D <&phy1>; + power-domains =3D <&pd_core>; + operating-points-v2 =3D <&usbd_dvfs_opp_table>; + + dr_mode =3D "otg"; + + hnp-disable; + srp-disable; + adp-disable; + + usb-role-switch; + extcon =3D <&charger>, <&extcon>; /* vbus, id */ + vbus-supply =3D <&usb_otg_vbus>; + + port { + usb_in: endpoint { + remote-endpoint =3D <&connector_out>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml b/Docu= mentation/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 =20 - 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 --=20 2.51.0 From nobody Sun May 24 19:33:38 2026 Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FDE0362130 for ; Sat, 23 May 2026 08:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525043; cv=none; b=hXU17RUSTn8D6OlVx3or5X1Dvs4W9IBLNfuZED8rB9yHTszi8wvjBYNu0yxfeAItB7GlssZv7Pif4g4ZeLy5oqWbStbefiOtcqHo6ovqIp9lwY8zUQKjOyk9eBVqQo9PzAuGWmhNINYS8WITkuVrrGsxnJ4+xsAuUyy11k1N9Eg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525043; c=relaxed/simple; bh=b4zUqL1Ke9Cs6I32xqzsUT0DCZF3QkH23uPT8sySGAk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gDPv4YKmNJdj8gbmvZX3v6JtNjFWr8d1GsbXRkAlL4um5NwhbnwlZrhCZUbxrs/3FJoQf5rnZ3RGcWTXGRLc1KnaGzfktOknCAUC+L+CxsFjC2hOUyUTrS/lIVsld6Rfv1TMfyrkR9FMq+yZ5sJElKDh7wlMs8trEXdEFcTIAfE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=pjqg9z0F; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pjqg9z0F" Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-bd6460b0d11so1432561566b.1 for ; Sat, 23 May 2026 01:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779525040; x=1780129840; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=F6p+M6SIjzcIcxd3MTES1MZkiaQb7Dr/HC9nyX3iDS8=; b=pjqg9z0FRTFWOuubUxmbZQzuonL3Ld0EMv+22tPnGPy/3yg1zS2z5zYYujAOoCmLom qXZqIYR3fHZnSjkM7YhU4PuwPoCTJlnQE4aT0Jc+E3KovC7H3jYsQntqSgsx/flPJbVg A7g+pg7mX9UH961QTOOvkcIU0eej4wOfnbd9sstKhMCuH/ewLMvPoq9aFWH47Aml+guC /Pm5NNjWjoeVqbM5a4VRaHWoI5C5PHR7kKF+pSM3ZYo5120MX16/Nk7VbIggH1edwPKu hVpoVMjYC1DIKounLREek5RP8EDslzt95E69mZY9J8tGljAipPJy21hlf8MlF6jfDxuo sTuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779525040; x=1780129840; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=F6p+M6SIjzcIcxd3MTES1MZkiaQb7Dr/HC9nyX3iDS8=; b=l9QMLU32A9zXrxfe+ywOw5bEhFwOwt840m6OBZqUhizSZikK8k62nGi1NqctBbi6BF VomP3tUKdrmnZCspRhJUqDt8FSi40dypjsy0Hilw7b2EOV1F4MXjae2VYrK9dYE1KUkX Grdp5WPY1Aw3ZBEO/MtFpa8AgwwfKHY1CeZtUGHdKuoFnclCwAJb3zv2jsSjTYVrFeGq rOuWattEkTE9zaxo0sdjzquM/7iCVNemapAEDRmG/+1lb9zag9sML51Kp+d0stng2dF0 H7f2hcvwVzV6gbj8ckSVKZeQyG+7Ln9ez2Hw0o7rxyzZD7/T7bqu7d7+597V47yFG82S ZIJw== X-Forwarded-Encrypted: i=1; AFNElJ+2nv9g/DIiC6giRxm0rfwUNh2mVYXzceiMni84Q2f8CwJZnCU1EeWmDNaO9wr9GLI2joXjWr2jxoLCiGw=@vger.kernel.org X-Gm-Message-State: AOJu0Yz3vON4uDIYNLP5zQlMPfjeXfDMmOkQ3GLCPJzm+rX6cU0eQg2G TI76clOePy/lZ9+cOtbtGZTNkDNSs4J9rdyBX0qXDKwTA9Es8twRGp3h X-Gm-Gg: Acq92OGEohqOxdK7JRu9A4MaPwKzLKZz4eiHJdJw1tOMOy6Z6lK+5v9GsXm4qDHyjnC Ud9TNAxXBayjJnLhmShCy8k4LhlGyfuqP83ECOdmleAIO3/q/sAQLFNpUP7AhQRZhqx5mGwE6wm Uz8F3bBbFHvilqM36jAGv+zlDkBVcpf8f8JaUhLbMBXnMBhOLQMz4gYcFscRb+/KIhyT6egt3Bf fFMgCk+nASV2MuOGU9oV7VzQOtTmxo9jA88+1UeXTAiWuBYEr7Y4dq9VbByE8DSHQKyNoA2oFH5 FaXn+GCtuNLJ4Gh4w9gdTGFBCOZyNL4rcVD6kSSuMRKobCqs6tCamijCYKmHbVRFQ5imFGnz/Ec LJBCT5S6i76kW9lPWxjRPu3tq1Ss32hDftT1bWtm5GBZKGVMIsXLWuevpMXcYV0sdNCmlG6pKCm My/l10r9HiKSMP X-Received: by 2002:a17:907:74a:b0:bcf:5de8:567f with SMTP id a640c23a62f3a-bdd2580c412mr414994766b.28.1779525040277; Sat, 23 May 2026 01:30:40 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-688bb62b6dfsm1651856a12.30.2026.05.23.01.30.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 May 2026 01:30:38 -0700 (PDT) From: Svyatoslav Ryhel 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@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/4] dt-bindings: usb: chipidea,usb2-tegra: Document nvidia,external-control property Date: Sat, 23 May 2026 11:30:10 +0300 Message-ID: <20260523083013.46372-3-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260523083013.46372-1-clamor95@gmail.com> References: <20260523083013.46372-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- .../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 =20 + 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 --=20 2.51.0 From nobody Sun May 24 19:33:38 2026 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C6A3364927 for ; Sat, 23 May 2026 08:30:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525047; cv=none; b=vDmkju+XWdss9+0Bq/s/WnH6medigUrB/to7CR68irgPXka2EnxGxKglB+A3Nl3eFQv3PHIclZACuGb03GLsqWU2AneUPzJoX0xjagkixw4D7OUWWCn2sixluOPk+xJFi7gOBPYa64aY5v6pjyzFyfemD3/+wP1m3e02ZPOOsbg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525047; c=relaxed/simple; bh=L3pd9O9+k7HD97LBKiHjkt7CjVY/MTLZ0/1GPuvhFoc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AhY5HX7NNY8mve/VYB8pW+/BG3Z1IvgE26GLQUY0Dx/KEm3t9omMtTmTWbK+2MwW59ROkjCdLup5/Ld9g4a75f7wMy9PHrwE3bN71vZSoak17rWzFiRDBem4s08FCMeFAiULdnCCQZwLq5G5If8CdbtV4xgci+9i8+B7w7eP/J8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MYjquy+s; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MYjquy+s" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-67cac5ece75so15325763a12.2 for ; Sat, 23 May 2026 01:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779525043; x=1780129843; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WoLIFVfCtco7LvImKkYkivcovHQB6EbUjyp4kpuJb6I=; b=MYjquy+sfTodYeCUKJo0VvRo2/+kuyqW+Qq+xpgerwms4qG5y5xtSM4OWNRZIp8fjS tCXWh6gR3UzJ2uamcT8hkivvWZ6pP+9LwACxA3jg6dkLXmf7iSlc6zWyYsU/egrfdFBf vo7iXPe+bUfxv8FiwM4bTfZkzocgR0JKRe6dxRSO+CAl4Lnr1cGIl+g9evzFaaPsu6h/ ontf2nLe4SI2OqhdVJDd1NfQf4Wvq0DVoY+MwYTMMgipltHgJvgncjerFjbDNgnJCFtF ohXHCNKlsdBF6xN0Kx8sBBsc4gUJ86E9Y4xwlFGDwsD9lj319RRmktVPtZyPZGYHFrTC wlIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779525043; x=1780129843; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WoLIFVfCtco7LvImKkYkivcovHQB6EbUjyp4kpuJb6I=; b=cfP0h/SW8+ciUxD8CtC47AZRwuXn3WGJrXQuTfz13HOCS2cyCAUTOrVJNQTsGJ8X7A Fu8KvOLk/knnMQdx/FBdgAR6F2DQqXqikhDKdXRBzroIW/L5bIhYPxXtbIM+jTuzfXi+ v7N9D35a70KhsuKShguslD6+M3EX3jY22qsLY3TFXBbXYntsdYouT+rtqtkw7lpseEPD pGoPE4K/N+WcVGmXCCS0pgFLWo/usz1J6eTfJPu0DV/bv+R8APRo7tgv1uCeNIfh7uq+ XKdklnYNavF8XCwNOMXb/xywP2BhoqYj5tMF3XnASMGIPFP/uK+w/JJcscjRIqlGoqbO B/Xg== X-Forwarded-Encrypted: i=1; AFNElJ/SP0HCB9KO8Y1RQto5pODmtgQew8q5I17zgkQNDLiToLuB9YyKg6xGMMxLIW3+nwC6j8N5O2o6XmG9fmE=@vger.kernel.org X-Gm-Message-State: AOJu0YzOsEAsumGuO4v3wTWw0T6ALzgua+fiOSeszN61PqPbJV2ACW75 BijmlbJ9ytVIpBG0EMRcSLKiR1qM9pvGtNLyILHwgn5zxeeQ2IV31Y1q X-Gm-Gg: Acq92OGF/qlV7dwEk82VtM0//mAa06a8oTeb95DPgf3tOLbLn01phfdKw14Dp7JJDya ET2QoXKhNeU7+Zcuy6M3Q7JCAssoAilLPYTH3werJj0cTotYpMSOOYQ3wqm2o+uor/k1gza9+Qx BN1OqSQgGgQdZLzNHz2mBo1g6e7FZnV3zGd/b18Ofkd3YHXGYE2M+ok+kr06Fz2SxpFxCh1zgiU 1J+8RuXUyLSWnFETeLyY1gMZthxxZTlUg9Q8DjME6tBYZrj4wzGiAx6ROagNrt9nJczyRUwWdLw S1FYRsT+G4CN47F91hgk59VraPlzwL/fSQLkMBsQa3D9SW95pyFCB8YCCjFj0/fgBt2g5gga1D1 pYe5qYIsYTBmE60ZThOHZXmxUPwf6930dSxLsFqs0DhIYO1P47cAG1ayNcT71G4SGOTsAv11b1o brXkGPE1F5gcIh X-Received: by 2002:a05:6402:42cc:b0:688:1d5:44b9 with SMTP id 4fb4d7f45d1cf-6889c43c704mr4015594a12.7.1779525042509; Sat, 23 May 2026 01:30:42 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-688bb62b6dfsm1651856a12.30.2026.05.23.01.30.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 May 2026 01:30:42 -0700 (PDT) From: Svyatoslav Ryhel 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@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/4] usb: chipidea: tegra: Avoid controller/PHY init if bus is externally controlled Date: Sat, 23 May 2026 11:30:11 +0300 Message-ID: <20260523083013.46372-4-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260523083013.46372-1-clamor95@gmail.com> References: <20260523083013.46372-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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; =20 bool needs_double_reset; + bool externally_controlled; }; =20 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 =3D true; =20 + if (device_property_present(&pdev->dev, "nvidia,external-control")) + usb->externally_controlled =3D true; + err =3D 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 *pde= v) * initialized, otherwise CPU will hang because clocks are gated. * PHY driver controls gating of internal USB clocks on Tegra. */ - err =3D usb_phy_init(usb->phy); - if (err) - goto fail_power_off; + if (!usb->externally_controlled) { + err =3D usb_phy_init(usb->phy); + if (err) + goto fail_power_off; + } =20 /* setup and register ChipIdea HDRC device */ usb->soc =3D soc; @@ -342,12 +348,14 @@ static int tegra_usb_probe(struct platform_device *pd= ev) if (of_usb_get_phy_mode(pdev->dev.of_node) =3D=3D USBPHY_INTERFACE_MODE_U= LPI) usb->data.flags &=3D ~CI_HDRC_SUPPORTS_RUNTIME_PM; =20 - usb->dev =3D ci_hdrc_add_device(&pdev->dev, pdev->resource, - pdev->num_resources, &usb->data); - if (IS_ERR(usb->dev)) { - err =3D dev_err_probe(&pdev->dev, PTR_ERR(usb->dev), - "failed to add HDRC device"); - goto phy_shutdown; + if (!usb->externally_controlled) { + usb->dev =3D ci_hdrc_add_device(&pdev->dev, pdev->resource, + pdev->num_resources, &usb->data); + if (IS_ERR(usb->dev)) { + err =3D dev_err_probe(&pdev->dev, PTR_ERR(usb->dev), + "failed to add HDRC device"); + goto phy_shutdown; + } } =20 return 0; @@ -365,8 +373,10 @@ static void tegra_usb_remove(struct platform_device *p= dev) { struct tegra_usb *usb =3D platform_get_drvdata(pdev); =20 - 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); + } =20 pm_runtime_put_sync_suspend(&pdev->dev); pm_runtime_force_suspend(&pdev->dev); --=20 2.51.0 From nobody Sun May 24 19:33:38 2026 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6A9D35F8D1 for ; Sat, 23 May 2026 08:30:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525049; cv=none; b=TOLjeCE5tMUN76tKXvS5ezHdUTlHAldgpCDm2nq8kfvXmXKePi6KK5MgUcH1AEeuYceQ1bofN4gPRP+U9SdM/iWVQTTDjdzRFiG+nkQStwP5uB8OiPF59HMnccijvoNjt/brHj2KqL7WknugSL0VaWXUKC7+IGAYJy27iM2aVIk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779525049; c=relaxed/simple; bh=O4o9ol0z9p1ozuLH8y297KGzgYwC2IgBRXVV6czRJHo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nvOeOgHj+ZrDp4pVKFDcG0quXEDySRHZL1H4ldM69NadZsgK5K/XCrO7zRCARZEqDDqQny+aD6muE96Xh69r1jcPNl2r+kcMJk9YWFAhPLqvoNUd9xqMiYDnhTdB5x90okK/nW9K7E0Rrb2NfA1zSCqLFv2erhbTYv2ZzbeOyWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=imnVYIMh; arc=none smtp.client-ip=209.85.208.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="imnVYIMh" Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-6877c719cb0so5353072a12.2 for ; Sat, 23 May 2026 01:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779525046; x=1780129846; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IWj8ptSzNBKrFt1mxoQKUyY2RzDOkBP4g8UuTE+1+DQ=; b=imnVYIMhBy80+n7Te9lWyG3Wzocdx/9S3tLruB550EhYCV7vdCLl3PxPqaWxqFBIif 8zSzmZJNXVGN4nl1AvL1qfzzW7mFxt1jzmKAELjnhYDomx4NAyKpxtj4HygbSVD+dIkB omInIBLYdW4t+mCSCmAsiReu8LQ+EbKwV0/T4Pxn+N+ACD3UZ7Bmwns83CLVbXtRlK7s 1B3unh30uHX/yvuQDfOw8ddYGp/ROIu+v4DBbRKpZRROBte5CUYv9zZBnD1C34qbUzwH 4R7e8DfybL1GNBFT4ihZbtbnQhHXPtXtNT7MprS/F9vl7fpYx43K1nb4VFuPMba9DzSf sCTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779525046; x=1780129846; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IWj8ptSzNBKrFt1mxoQKUyY2RzDOkBP4g8UuTE+1+DQ=; b=b4lC1HoFAmZM12UvKTL7rjJr1kQDIULXlujE1nYwMRKsgN8hb3NR/nkQR0jT5LX8iq vyK88j79vQaXPHxtUppSuvZR5mA5x6IM6xP88n8/W5bHyd3Mtay+uTet/ch4f984VxSd vAi3JaVYnYXPm1JB4A7w4oXml8ZmZPOU0SZIG91O/d3fKrNT7chYaZKN6/OFQ1horLGE O+BUWrPH1KLQnw/TSMLm4Y/0LO4e/cY87gL+POt2DVdOUZpsEdlXifnXE9BisPaGa74q 4ntSHei6cKTwLHGOuOOCga/sVSk7sk9wSkioQoh72Yzxko37Q+DG3uiX/qBivVHt593w bspQ== X-Forwarded-Encrypted: i=1; AFNElJ/oACZN0uSetg72uLjxuylL6uL7opOHh/Kiq9KwrRa9fzzJUr8KWLbKJFNFFHOsHEnOfmtYNsWcSftor9c=@vger.kernel.org X-Gm-Message-State: AOJu0YyTPbw9o2d//qeT4PrXdUs50vKwJFzq6j7AECz/pa6GSTm5SGqs 67iiihxUGutI/5esxxwIx9BLA5Rxyd4ykyx7XB4GoXz0IxasRC1h5Adt X-Gm-Gg: Acq92OHhZkyFMFMbCvz6Y6cVEcmAO/p64cyiDBBVXvq905YJx+/j/OCyv5F5fQ70u1T AFWT5qB3Vueem0r904P/qXIjwbJMh7cOQlwb6ftiKOHFPejkw4eSdFOY93f1eYBPIqLPZaH2kap ykku7kOhblcBNgq4jGgAsVda5QJzniAfgD99ZfY8UX5AZUqgqHzBRCekbLrpiT9lKN/Ma18FeNK eIh6TSotYcqXXxDzdSaDmX7Bc9jpbEuh5Is+ERKY9fNb7MUdtEgm6O2HUEJwrckUlPFHbuAkqvN MC0E6yfe0YW0Rtt/uRAM2mY7QU0l/365d7mHxuo3EwAig4xl3xZR9sveIntCcrMVCrx/THEBiMt E614euF7vRBCRXoTF7MjSs4xt9g9aXzx15WLKYhBgJhbWYJYOcsEwm46zJ8jTaOLmsy+f/w9Joz +kNQvuiO4Puj3OO1q3C7hQ3CA= X-Received: by 2002:a05:6402:3719:b0:687:285d:44a8 with SMTP id 4fb4d7f45d1cf-6889c453fa1mr3595245a12.14.1779525045838; Sat, 23 May 2026 01:30:45 -0700 (PDT) Received: from xeon ([188.163.112.61]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-688bb62b6dfsm1651856a12.30.2026.05.23.01.30.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 May 2026 01:30:44 -0700 (PDT) From: Svyatoslav Ryhel 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@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/4] usb: chipidea: tegra: Expose tegra_usb structure Date: Sat, 23 May 2026 11:30:12 +0300 Message-ID: <20260523083013.46372-5-clamor95@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260523083013.46372-1-clamor95@gmail.com> References: <20260523083013.46372-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 --- 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 #include #include +#include =20 #include =20 @@ -23,18 +24,6 @@ =20 #include "ci.h" =20 -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_us= b_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 #include #include +#include #include =20 struct gpio_desc; @@ -62,6 +63,20 @@ enum tegra_usb_phy_port_speed { TEGRA_USB_PHY_PORT_SPEED_HIGH, }; =20 +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; =20 struct tegra_usb_phy { --=20 2.51.0