The Exynos2200 SoC has a USB controller PHY, which acts as an
intermediary between a USB controller (typically DWC3) and other PHYs
(UTMI, PIPE3). Add a dt-binding schema for it.
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
---
.../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml
diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml
new file mode 100644
index 000000000..7d879ec8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Exynos2200 USB controller PHY
+
+maintainers:
+ - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
+
+description:
+ Exynos2200 USB controller PHY is an intermediary between a USB controller
+ (typically DWC3) and other PHYs (UTMI, PIPE3).
+
+properties:
+ compatible:
+ enum:
+ - samsung,exynos2200-usbcon-phy
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: bus clock
+
+ clock-names:
+ items:
+ - const: bus
+
+ "#phy-cells":
+ const: 0
+
+ phys:
+ maxItems: 1
+ description:
+ Phandle to eUSB2 PHY
+
+ samsung,pmu-syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ maxItems: 1
+ items:
+ minItems: 1
+ items:
+ - description: phandle for PMU system controller interface, used to
+ control PMU registers bits for USBCON PHY
+ - description: offset of the pmu control register
+ description:
+ Should be phandle/offset pair. The phandle to System Register syscon node
+ and the offset for USBCON PHY.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - "#phy-cells"
+ - phys
+ - samsung,pmu-syscon
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/samsung,exynos2200-cmu.h>
+
+ usb_con_phy: phy@10aa0000 {
+ compatible = "samsung,exynos2200-usbcon-phy";
+ reg = <0x10aa0000 0x10000>;
+ clocks = <&cmu_hsi0 CLK_MOUT_HSI0_NOC>;
+ clock-names = "bus";
+ #phy-cells = <0>;
+ phys = <&usb_hs_phy>;
+ samsung,pmu-syscon = <&pmu_system_controller 0x72c>;
+ };
--
2.43.0
On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: > The Exynos2200 SoC has a USB controller PHY, which acts as an > intermediary between a USB controller (typically DWC3) and other PHYs > (UTMI, PIPE3). Add a dt-binding schema for it. > > Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> > --- > .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ > 1 file changed, 76 insertions(+) > create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml You have undocumented dependencies which prevent merging this file. First, dependencies have to be clearly expressed. Second, you should rather decouple the code from header dependencies, otherwise this cannot be merged for current release (just use clocks with long names, without IDs). > > diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml > new file mode 100644 > index 000000000..7d879ec8b > --- /dev/null > +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml > @@ -0,0 +1,76 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Exynos2200 USB controller PHY > + > +maintainers: > + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> > + > +description: > + Exynos2200 USB controller PHY is an intermediary between a USB controller > + (typically DWC3) and other PHYs (UTMI, PIPE3). Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml I think there is no PHY between DWC3 and UTMI/PIPE. There is a PHY controller (so the samsung,usb3-drd-phy.yaml) which we call here the phy. Best regards, Krzysztof
On 2/24/25 10:56, Krzysztof Kozlowski wrote: > On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >> The Exynos2200 SoC has a USB controller PHY, which acts as an >> intermediary between a USB controller (typically DWC3) and other PHYs >> (UTMI, PIPE3). Add a dt-binding schema for it. >> >> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >> --- >> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >> 1 file changed, 76 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml > You have undocumented dependencies which prevent merging this file. > First, dependencies have to be clearly expressed. They are, in the cover letter. > Second, you should > rather decouple the code from header dependencies, otherwise this cannot > be merged for current release (just use clocks with long names, without IDs). Sure > >> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >> new file mode 100644 >> index 000000000..7d879ec8b >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >> @@ -0,0 +1,76 @@ >> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: Exynos2200 USB controller PHY >> + >> +maintainers: >> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >> + >> +description: >> + Exynos2200 USB controller PHY is an intermediary between a USB controller >> + (typically DWC3) and other PHYs (UTMI, PIPE3). > Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml It's not (I think). There's a few reasons I've decided to make this separate from the usb3-drd-phy bindings and exynos5-usbdrd driver: 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning for them, and all that is needed from it is to disable HWACG, assert/ deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 initialization can be done and USB2 works. If the USBCON phy is not set up before the eUSB2 one, the device hangs, so there is definitely a dependancy between them. For PIPE3 we'd need to control the pipe3 attaching/deattaching and then initialize the synopsys USBDP combophy. 2. With the way it's modelled, we need to parse phandles from eUSB2 and USBDP to the controller. Adding that to the usbdrd driver would be... weird. It makes more sense to model it as a separate driver, because it functions in a different way. I've described this in the cover letter as well. Best regards, Ivaylo > > I think there is no PHY between DWC3 and UTMI/PIPE. There is a PHY > controller (so the samsung,usb3-drd-phy.yaml) which we call here the > phy. > > > Best regards, > Krzysztof >
On 24/02/2025 11:48, Ivaylo Ivanov wrote: > On 2/24/25 10:56, Krzysztof Kozlowski wrote: >> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>> intermediary between a USB controller (typically DWC3) and other PHYs >>> (UTMI, PIPE3). Add a dt-binding schema for it. >>> >>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>> --- >>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>> 1 file changed, 76 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >> You have undocumented dependencies which prevent merging this file. >> First, dependencies have to be clearly expressed. > > They are, in the cover letter. Where? I read it twice. Dependencies is the most important thing and should scream at beginning of the cover letter, so if you bury them somewhere deep it also would not matter - just like they were missing. > >> Second, you should >> rather decouple the code from header dependencies, otherwise this cannot >> be merged for current release (just use clocks with long names, without IDs). > > Sure > >> >>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>> new file mode 100644 >>> index 000000000..7d879ec8b >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>> @@ -0,0 +1,76 @@ >>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Exynos2200 USB controller PHY >>> + >>> +maintainers: >>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>> + >>> +description: >>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml > > It's not (I think). There's a few reasons I've decided to make this separate > from the usb3-drd-phy bindings and exynos5-usbdrd driver: > > 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning USBDRD phy does not provide UTMI and PIPE on its own either if you look at diagram - they call it phy controller. > for them, and all that is needed from it is to disable HWACG, assert/ > deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 > initialization can be done and USB2 works. If the USBCON phy is not set > up before the eUSB2 one, the device hangs, so there is definitely a > dependancy between them. For PIPE3 we'd need to control the pipe3 > attaching/deattaching and then initialize the synopsys USBDP combophy. Does it mean there is no USB DRD phy controller as before? Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. > > 2. With the way it's modelled, we need to parse phandles from eUSB2 and > USBDP to the controller. Adding that to the usbdrd driver would be... > weird. It makes more sense to model it as a separate driver, because > it functions in a different way. Just to be clear: we don't talk about drivers here. Best regards, Krzysztof
On 2/25/25 10:11, Krzysztof Kozlowski wrote: > On 24/02/2025 11:48, Ivaylo Ivanov wrote: >> On 2/24/25 10:56, Krzysztof Kozlowski wrote: >>> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>>> intermediary between a USB controller (typically DWC3) and other PHYs >>>> (UTMI, PIPE3). Add a dt-binding schema for it. >>>> >>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>> --- >>>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>>> 1 file changed, 76 insertions(+) >>>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>> You have undocumented dependencies which prevent merging this file. >>> First, dependencies have to be clearly expressed. >> They are, in the cover letter. > Where? I read it twice. Dependencies is the most important thing and > should scream at beginning of the cover letter, so if you bury them > somewhere deep it also would not matter - just like they were missing. > >>> Second, you should >>> rather decouple the code from header dependencies, otherwise this cannot >>> be merged for current release (just use clocks with long names, without IDs). >> Sure > >>>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>> new file mode 100644 >>>> index 000000000..7d879ec8b >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>> @@ -0,0 +1,76 @@ >>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>> +%YAML 1.2 >>>> +--- >>>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>> + >>>> +title: Exynos2200 USB controller PHY >>>> + >>>> +maintainers: >>>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>> + >>>> +description: >>>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >>> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml >> It's not (I think). There's a few reasons I've decided to make this separate >> from the usb3-drd-phy bindings and exynos5-usbdrd driver: >> >> 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning > USBDRD phy does not provide UTMI and PIPE on its own either if you look > at diagram - they call it phy controller. Ughm. What? So in most exynos cases, there's a combination of multiple phys? > >> for them, and all that is needed from it is to disable HWACG, assert/ >> deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 >> initialization can be done and USB2 works. If the USBCON phy is not set >> up before the eUSB2 one, the device hangs, so there is definitely a >> dependancy between them. For PIPE3 we'd need to control the pipe3 >> attaching/deattaching and then initialize the synopsys USBDP combophy. > Does it mean there is no USB DRD phy controller as before? > > Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. So... DWC3 -> USBDRD (USBCON) -> PHYs? ...with usbdrd controller connecting and controlling the USB2 and USB3 phys, as well as dual role mode? Well, where is the DRD part in the exynos5 driver? I guess it does perfectly fit the job of a usbdrd controller then (if it even deals with DRD). But then again, this brings up two questions: 1. Should this driver even be named exynos2200-usbcon and not, for example, exynos2200-usbdrd? 2. Are the exynos5-usbdrd phys really only USBDRD, or do they implement USB speed functionality? What is the UTMI/PIPE3 setup for then? ps: dealing with this without any documentations sucks. Best regards, Ivaylo > > >> 2. With the way it's modelled, we need to parse phandles from eUSB2 and >> USBDP to the controller. Adding that to the usbdrd driver would be... >> weird. It makes more sense to model it as a separate driver, because >> it functions in a different way. > Just to be clear: we don't talk about drivers here. > > > Best regards, > Krzysztof
On 02/03/2025 10:16, Ivaylo Ivanov wrote: > On 2/25/25 10:11, Krzysztof Kozlowski wrote: >> On 24/02/2025 11:48, Ivaylo Ivanov wrote: >>> On 2/24/25 10:56, Krzysztof Kozlowski wrote: >>>> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>>>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>>>> intermediary between a USB controller (typically DWC3) and other PHYs >>>>> (UTMI, PIPE3). Add a dt-binding schema for it. >>>>> >>>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>> --- >>>>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>>>> 1 file changed, 76 insertions(+) >>>>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>> You have undocumented dependencies which prevent merging this file. >>>> First, dependencies have to be clearly expressed. >>> They are, in the cover letter. >> Where? I read it twice. Dependencies is the most important thing and >> should scream at beginning of the cover letter, so if you bury them >> somewhere deep it also would not matter - just like they were missing. >> >>>> Second, you should >>>> rather decouple the code from header dependencies, otherwise this cannot >>>> be merged for current release (just use clocks with long names, without IDs). >>> Sure >> >>>>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>> new file mode 100644 >>>>> index 000000000..7d879ec8b >>>>> --- /dev/null >>>>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>> @@ -0,0 +1,76 @@ >>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>> +%YAML 1.2 >>>>> +--- >>>>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>> + >>>>> +title: Exynos2200 USB controller PHY >>>>> + >>>>> +maintainers: >>>>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>> + >>>>> +description: >>>>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>>>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >>>> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml >>> It's not (I think). There's a few reasons I've decided to make this separate >>> from the usb3-drd-phy bindings and exynos5-usbdrd driver: >>> >>> 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning >> USBDRD phy does not provide UTMI and PIPE on its own either if you look >> at diagram - they call it phy controller. > > Ughm. What? So in most exynos cases, there's a combination of multiple phys? > >> >>> for them, and all that is needed from it is to disable HWACG, assert/ >>> deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 >>> initialization can be done and USB2 works. If the USBCON phy is not set >>> up before the eUSB2 one, the device hangs, so there is definitely a >>> dependancy between them. For PIPE3 we'd need to control the pipe3 >>> attaching/deattaching and then initialize the synopsys USBDP combophy. >> Does it mean there is no USB DRD phy controller as before? >> >> Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. > > So... > > DWC3 -> USBDRD (USBCON) -> PHYs? No, drop last phy. You just wrote the same as me - two phys, because usbdrd is the phy. In all existing designs there is no such controllable object from the point of view of operating system. > > ...with usbdrd controller connecting and controlling the USB2 and USB3 > phys, as well as dual role mode? Yes. > Well, where is the DRD part in the exynos5 > driver? DRD? I believe it is part of DWC3, the same as in every other standard implementation of Synopsys DWC3. > > I guess it does perfectly fit the job of a usbdrd controller then (if it > even deals with DRD). But then again, this brings up two questions: > 1. Should this driver even be named exynos2200-usbcon and not, for > example, exynos2200-usbdrd? Are you sure we talk about the same thing? USBDRD is IP block in the Exynos and a device driver. Call your device as appropriate it is - based on datasheet or downstream sources. > 2. Are the exynos5-usbdrd phys really only USBDRD, or do they implement > USB speed functionality? What is the UTMI/PIPE3 setup for then? Dunno, I don't get what you mean by "exynos5-usbdrd phys really only USBDRD". USBDRD is just the name of the device. Best regards, Krzysztof
On 3/3/25 09:24, Krzysztof Kozlowski wrote: > On 02/03/2025 10:16, Ivaylo Ivanov wrote: >> On 2/25/25 10:11, Krzysztof Kozlowski wrote: >>> On 24/02/2025 11:48, Ivaylo Ivanov wrote: >>>> On 2/24/25 10:56, Krzysztof Kozlowski wrote: >>>>> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>>>>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>>>>> intermediary between a USB controller (typically DWC3) and other PHYs >>>>>> (UTMI, PIPE3). Add a dt-binding schema for it. >>>>>> >>>>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>> --- >>>>>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>>>>> 1 file changed, 76 insertions(+) >>>>>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>> You have undocumented dependencies which prevent merging this file. >>>>> First, dependencies have to be clearly expressed. >>>> They are, in the cover letter. >>> Where? I read it twice. Dependencies is the most important thing and >>> should scream at beginning of the cover letter, so if you bury them >>> somewhere deep it also would not matter - just like they were missing. >>> >>>>> Second, you should >>>>> rather decouple the code from header dependencies, otherwise this cannot >>>>> be merged for current release (just use clocks with long names, without IDs). >>>> Sure >>>>>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>> new file mode 100644 >>>>>> index 000000000..7d879ec8b >>>>>> --- /dev/null >>>>>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>> @@ -0,0 +1,76 @@ >>>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>>> +%YAML 1.2 >>>>>> +--- >>>>>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>>> + >>>>>> +title: Exynos2200 USB controller PHY >>>>>> + >>>>>> +maintainers: >>>>>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>> + >>>>>> +description: >>>>>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>>>>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >>>>> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml >>>> It's not (I think). There's a few reasons I've decided to make this separate >>>> from the usb3-drd-phy bindings and exynos5-usbdrd driver: >>>> >>>> 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning >>> USBDRD phy does not provide UTMI and PIPE on its own either if you look >>> at diagram - they call it phy controller. >> Ughm. What? So in most exynos cases, there's a combination of multiple phys? > >>>> for them, and all that is needed from it is to disable HWACG, assert/ >>>> deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 >>>> initialization can be done and USB2 works. If the USBCON phy is not set >>>> up before the eUSB2 one, the device hangs, so there is definitely a >>>> dependancy between them. For PIPE3 we'd need to control the pipe3 >>>> attaching/deattaching and then initialize the synopsys USBDP combophy. >>> Does it mean there is no USB DRD phy controller as before? >>> >>> Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. >> So... >> >> DWC3 -> USBDRD (USBCON) -> PHYs? > No, drop last phy. You just wrote the same as me - two phys, because > usbdrd is the phy. In all existing designs there is no such controllable > object from the point of view of operating system. What? Per my understanding, the phy property should refer to whatever is is connected to dwc3 UTMI. In this case it's the so-called USBDRD phy (called usbcon in downstream). Considering that the eUSB2 IP definitely also has UTMI that has to be connected to something, doesn't that mean we have clearly separated hardware blocks? Now, I guess one could argue that this USBCON hardware block could be classified as a syscon. But I don't see the problem with the current binding description, nor the modelling, as it represents how the hardware is (unless I've gotten it completely wrong). Best regards, Ivaylo > >> ...with usbdrd controller connecting and controlling the USB2 and USB3 >> phys, as well as dual role mode? > Yes. > >> Well, where is the DRD part in the exynos5 >> driver? > DRD? I believe it is part of DWC3, the same as in every other standard > implementation of Synopsys DWC3. > >> I guess it does perfectly fit the job of a usbdrd controller then (if it >> even deals with DRD). But then again, this brings up two questions: >> 1. Should this driver even be named exynos2200-usbcon and not, for >> example, exynos2200-usbdrd? > Are you sure we talk about the same thing? USBDRD is IP block in the > Exynos and a device driver. Call your device as appropriate it is - > based on datasheet or downstream sources. > >> 2. Are the exynos5-usbdrd phys really only USBDRD, or do they implement >> USB speed functionality? What is the UTMI/PIPE3 setup for then? > Dunno, I don't get what you mean by "exynos5-usbdrd phys really only > USBDRD". USBDRD is just the name of the device. > > Best regards, > Krzysztof
On 03/03/2025 18:18, Ivaylo Ivanov wrote: > On 3/3/25 09:24, Krzysztof Kozlowski wrote: >> On 02/03/2025 10:16, Ivaylo Ivanov wrote: >>> On 2/25/25 10:11, Krzysztof Kozlowski wrote: >>>> On 24/02/2025 11:48, Ivaylo Ivanov wrote: >>>>> On 2/24/25 10:56, Krzysztof Kozlowski wrote: >>>>>> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>>>>>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>>>>>> intermediary between a USB controller (typically DWC3) and other PHYs >>>>>>> (UTMI, PIPE3). Add a dt-binding schema for it. >>>>>>> >>>>>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>> --- >>>>>>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>>>>>> 1 file changed, 76 insertions(+) >>>>>>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>> You have undocumented dependencies which prevent merging this file. >>>>>> First, dependencies have to be clearly expressed. >>>>> They are, in the cover letter. >>>> Where? I read it twice. Dependencies is the most important thing and >>>> should scream at beginning of the cover letter, so if you bury them >>>> somewhere deep it also would not matter - just like they were missing. >>>> >>>>>> Second, you should >>>>>> rather decouple the code from header dependencies, otherwise this cannot >>>>>> be merged for current release (just use clocks with long names, without IDs). >>>>> Sure >>>>>>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>> new file mode 100644 >>>>>>> index 000000000..7d879ec8b >>>>>>> --- /dev/null >>>>>>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>> @@ -0,0 +1,76 @@ >>>>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>>>> +%YAML 1.2 >>>>>>> +--- >>>>>>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>>>> + >>>>>>> +title: Exynos2200 USB controller PHY >>>>>>> + >>>>>>> +maintainers: >>>>>>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>> + >>>>>>> +description: >>>>>>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>>>>>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >>>>>> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml >>>>> It's not (I think). There's a few reasons I've decided to make this separate >>>>> from the usb3-drd-phy bindings and exynos5-usbdrd driver: >>>>> >>>>> 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning >>>> USBDRD phy does not provide UTMI and PIPE on its own either if you look >>>> at diagram - they call it phy controller. >>> Ughm. What? So in most exynos cases, there's a combination of multiple phys? >> >>>>> for them, and all that is needed from it is to disable HWACG, assert/ >>>>> deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 >>>>> initialization can be done and USB2 works. If the USBCON phy is not set >>>>> up before the eUSB2 one, the device hangs, so there is definitely a >>>>> dependancy between them. For PIPE3 we'd need to control the pipe3 >>>>> attaching/deattaching and then initialize the synopsys USBDP combophy. >>>> Does it mean there is no USB DRD phy controller as before? >>>> >>>> Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. >>> So... >>> >>> DWC3 -> USBDRD (USBCON) -> PHYs? >> No, drop last phy. You just wrote the same as me - two phys, because >> usbdrd is the phy. In all existing designs there is no such controllable >> object from the point of view of operating system. > > What? Per my understanding, the phy property should refer to whatever is > is connected to dwc3 UTMI. In this case it's the so-called USBDRD phy (called > usbcon in downstream). Considering that the eUSB2 IP definitely also has UTMI > that has to be connected to something, doesn't that mean we have clearly The entire point is that eUSB2 is connected to DWC3, no? That's exactly how it is done for example on Qualcomm SoC. Otherwise you claim that DWC3 controls one phy, which controls another phy which controls UTMI... > separated hardware blocks? Now, I guess one could argue that this USBCON > hardware block could be classified as a syscon. But I don't see the problem > with the current binding description, nor the modelling, as it represents > how the hardware is (unless I've gotten it completely wrong). It is the first time you use argument that it represents how the hardware is and this is what we actually disagree. It is not like that. You do not have chain of phys. Just look at any USB 3.0 DRD DWC diagram from any Samsung SoC: where would you squeeze these two phys in relation to what is called there "USB 3.0 PHY" which would be the third phy (!!!). Best regards, Krzysztof
On 3/4/25 09:21, Krzysztof Kozlowski wrote: > On 03/03/2025 18:18, Ivaylo Ivanov wrote: >> On 3/3/25 09:24, Krzysztof Kozlowski wrote: >>> On 02/03/2025 10:16, Ivaylo Ivanov wrote: >>>> On 2/25/25 10:11, Krzysztof Kozlowski wrote: >>>>> On 24/02/2025 11:48, Ivaylo Ivanov wrote: >>>>>> On 2/24/25 10:56, Krzysztof Kozlowski wrote: >>>>>>> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>>>>>>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>>>>>>> intermediary between a USB controller (typically DWC3) and other PHYs >>>>>>>> (UTMI, PIPE3). Add a dt-binding schema for it. >>>>>>>> >>>>>>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>>> --- >>>>>>>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>>>>>>> 1 file changed, 76 insertions(+) >>>>>>>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>> You have undocumented dependencies which prevent merging this file. >>>>>>> First, dependencies have to be clearly expressed. >>>>>> They are, in the cover letter. >>>>> Where? I read it twice. Dependencies is the most important thing and >>>>> should scream at beginning of the cover letter, so if you bury them >>>>> somewhere deep it also would not matter - just like they were missing. >>>>> >>>>>>> Second, you should >>>>>>> rather decouple the code from header dependencies, otherwise this cannot >>>>>>> be merged for current release (just use clocks with long names, without IDs). >>>>>> Sure >>>>>>>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>> new file mode 100644 >>>>>>>> index 000000000..7d879ec8b >>>>>>>> --- /dev/null >>>>>>>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>> @@ -0,0 +1,76 @@ >>>>>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>>>>> +%YAML 1.2 >>>>>>>> +--- >>>>>>>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>>>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>>>>> + >>>>>>>> +title: Exynos2200 USB controller PHY >>>>>>>> + >>>>>>>> +maintainers: >>>>>>>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>>> + >>>>>>>> +description: >>>>>>>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>>>>>>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >>>>>>> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml >>>>>> It's not (I think). There's a few reasons I've decided to make this separate >>>>>> from the usb3-drd-phy bindings and exynos5-usbdrd driver: >>>>>> >>>>>> 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning >>>>> USBDRD phy does not provide UTMI and PIPE on its own either if you look >>>>> at diagram - they call it phy controller. >>>> Ughm. What? So in most exynos cases, there's a combination of multiple phys? >>>>>> for them, and all that is needed from it is to disable HWACG, assert/ >>>>>> deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 >>>>>> initialization can be done and USB2 works. If the USBCON phy is not set >>>>>> up before the eUSB2 one, the device hangs, so there is definitely a >>>>>> dependancy between them. For PIPE3 we'd need to control the pipe3 >>>>>> attaching/deattaching and then initialize the synopsys USBDP combophy. >>>>> Does it mean there is no USB DRD phy controller as before? >>>>> >>>>> Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. >>>> So... >>>> >>>> DWC3 -> USBDRD (USBCON) -> PHYs? >>> No, drop last phy. You just wrote the same as me - two phys, because >>> usbdrd is the phy. In all existing designs there is no such controllable >>> object from the point of view of operating system. >> What? Per my understanding, the phy property should refer to whatever is >> is connected to dwc3 UTMI. In this case it's the so-called USBDRD phy (called >> usbcon in downstream). Considering that the eUSB2 IP definitely also has UTMI >> that has to be connected to something, doesn't that mean we have clearly > The entire point is that eUSB2 is connected to DWC3, no? That's exactly > how it is done for example on Qualcomm SoC. Otherwise you claim that > DWC3 controls one phy, which controls another phy which controls UTMI... But where does the USBCON fit? Is it just a side controller? Why's it needed in the first place? This is what I don't understand. > >> separated hardware blocks? Now, I guess one could argue that this USBCON >> hardware block could be classified as a syscon. But I don't see the problem >> with the current binding description, nor the modelling, as it represents >> how the hardware is (unless I've gotten it completely wrong). > It is the first time you use argument that it represents how the > hardware is and this is what we actually disagree. It is not like that. > You do not have chain of phys. Just look at any USB 3.0 DRD DWC diagram > from any Samsung SoC: where would you squeeze these two phys in relation > to what is called there "USB 3.0 PHY" which would be the third phy (!!!). Yeah, my point was that it was different from any previous design. Now, I don't know if it's actually theoretically possible to design it like so. It's hard to just guess how the hardware is designed without having access to die shots, documentations or even just schematics. Let's make it clear now, the changes your request are to document USBCON in the existing exynos binding, as well as to correct all explanations of how this block functions, right? Best regards, Ivaylo > > Best regards, > Krzysztof
On 04/03/2025 10:09, Ivaylo Ivanov wrote: > On 3/4/25 09:21, Krzysztof Kozlowski wrote: >> On 03/03/2025 18:18, Ivaylo Ivanov wrote: >>> On 3/3/25 09:24, Krzysztof Kozlowski wrote: >>>> On 02/03/2025 10:16, Ivaylo Ivanov wrote: >>>>> On 2/25/25 10:11, Krzysztof Kozlowski wrote: >>>>>> On 24/02/2025 11:48, Ivaylo Ivanov wrote: >>>>>>> On 2/24/25 10:56, Krzysztof Kozlowski wrote: >>>>>>>> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>>>>>>>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>>>>>>>> intermediary between a USB controller (typically DWC3) and other PHYs >>>>>>>>> (UTMI, PIPE3). Add a dt-binding schema for it. >>>>>>>>> >>>>>>>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>>>> --- >>>>>>>>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>>>>>>>> 1 file changed, 76 insertions(+) >>>>>>>>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>> You have undocumented dependencies which prevent merging this file. >>>>>>>> First, dependencies have to be clearly expressed. >>>>>>> They are, in the cover letter. >>>>>> Where? I read it twice. Dependencies is the most important thing and >>>>>> should scream at beginning of the cover letter, so if you bury them >>>>>> somewhere deep it also would not matter - just like they were missing. >>>>>> >>>>>>>> Second, you should >>>>>>>> rather decouple the code from header dependencies, otherwise this cannot >>>>>>>> be merged for current release (just use clocks with long names, without IDs). >>>>>>> Sure >>>>>>>>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>>> new file mode 100644 >>>>>>>>> index 000000000..7d879ec8b >>>>>>>>> --- /dev/null >>>>>>>>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>>> @@ -0,0 +1,76 @@ >>>>>>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>>>>>> +%YAML 1.2 >>>>>>>>> +--- >>>>>>>>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>>>>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>>>>>> + >>>>>>>>> +title: Exynos2200 USB controller PHY >>>>>>>>> + >>>>>>>>> +maintainers: >>>>>>>>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>>>> + >>>>>>>>> +description: >>>>>>>>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>>>>>>>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >>>>>>>> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml >>>>>>> It's not (I think). There's a few reasons I've decided to make this separate >>>>>>> from the usb3-drd-phy bindings and exynos5-usbdrd driver: >>>>>>> >>>>>>> 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning >>>>>> USBDRD phy does not provide UTMI and PIPE on its own either if you look >>>>>> at diagram - they call it phy controller. >>>>> Ughm. What? So in most exynos cases, there's a combination of multiple phys? >>>>>>> for them, and all that is needed from it is to disable HWACG, assert/ >>>>>>> deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 >>>>>>> initialization can be done and USB2 works. If the USBCON phy is not set >>>>>>> up before the eUSB2 one, the device hangs, so there is definitely a >>>>>>> dependancy between them. For PIPE3 we'd need to control the pipe3 >>>>>>> attaching/deattaching and then initialize the synopsys USBDP combophy. >>>>>> Does it mean there is no USB DRD phy controller as before? >>>>>> >>>>>> Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. >>>>> So... >>>>> >>>>> DWC3 -> USBDRD (USBCON) -> PHYs? >>>> No, drop last phy. You just wrote the same as me - two phys, because >>>> usbdrd is the phy. In all existing designs there is no such controllable >>>> object from the point of view of operating system. >>> What? Per my understanding, the phy property should refer to whatever is >>> is connected to dwc3 UTMI. In this case it's the so-called USBDRD phy (called >>> usbcon in downstream). Considering that the eUSB2 IP definitely also has UTMI >>> that has to be connected to something, doesn't that mean we have clearly >> The entire point is that eUSB2 is connected to DWC3, no? That's exactly >> how it is done for example on Qualcomm SoC. Otherwise you claim that >> DWC3 controls one phy, which controls another phy which controls UTMI... > > But where does the USBCON fit? Is it just a side controller? Why's it needed > in the first place? This is what I don't understand. I assume usbcon, so old usbdrd, is the second DWC3's phy, just like qcom qmpphy. > >> >>> separated hardware blocks? Now, I guess one could argue that this USBCON >>> hardware block could be classified as a syscon. But I don't see the problem >>> with the current binding description, nor the modelling, as it represents >>> how the hardware is (unless I've gotten it completely wrong). >> It is the first time you use argument that it represents how the >> hardware is and this is what we actually disagree. It is not like that. >> You do not have chain of phys. Just look at any USB 3.0 DRD DWC diagram >> from any Samsung SoC: where would you squeeze these two phys in relation >> to what is called there "USB 3.0 PHY" which would be the third phy (!!!). > > Yeah, my point was that it was different from any previous design. Now, > I don't know if it's actually theoretically possible to design it like so. It's > hard to just guess how the hardware is designed without having access > to die shots, documentations or even just schematics. > > Let's make it clear now, the changes your request are to document USBCON > in the existing exynos binding, as well as to correct all explanations of how > this block functions, right? No, not necessarily. If USBCON is entirely different device than USBDRD (different register layout, different features), then go ahead with a new binding. I was questioning your chain of PHYs and this should be investigated. Best regards, Krzysztof
On 3/4/25 12:03, Krzysztof Kozlowski wrote: > On 04/03/2025 10:09, Ivaylo Ivanov wrote: >> On 3/4/25 09:21, Krzysztof Kozlowski wrote: >>> On 03/03/2025 18:18, Ivaylo Ivanov wrote: >>>> On 3/3/25 09:24, Krzysztof Kozlowski wrote: >>>>> On 02/03/2025 10:16, Ivaylo Ivanov wrote: >>>>>> On 2/25/25 10:11, Krzysztof Kozlowski wrote: >>>>>>> On 24/02/2025 11:48, Ivaylo Ivanov wrote: >>>>>>>> On 2/24/25 10:56, Krzysztof Kozlowski wrote: >>>>>>>>> On Sun, Feb 23, 2025 at 02:22:22PM +0200, Ivaylo Ivanov wrote: >>>>>>>>>> The Exynos2200 SoC has a USB controller PHY, which acts as an >>>>>>>>>> intermediary between a USB controller (typically DWC3) and other PHYs >>>>>>>>>> (UTMI, PIPE3). Add a dt-binding schema for it. >>>>>>>>>> >>>>>>>>>> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>>>>> --- >>>>>>>>>> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++ >>>>>>>>>> 1 file changed, 76 insertions(+) >>>>>>>>>> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>>> You have undocumented dependencies which prevent merging this file. >>>>>>>>> First, dependencies have to be clearly expressed. >>>>>>>> They are, in the cover letter. >>>>>>> Where? I read it twice. Dependencies is the most important thing and >>>>>>> should scream at beginning of the cover letter, so if you bury them >>>>>>> somewhere deep it also would not matter - just like they were missing. >>>>>>> >>>>>>>>> Second, you should >>>>>>>>> rather decouple the code from header dependencies, otherwise this cannot >>>>>>>>> be merged for current release (just use clocks with long names, without IDs). >>>>>>>> Sure >>>>>>>>>> diff --git a/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>>>> new file mode 100644 >>>>>>>>>> index 000000000..7d879ec8b >>>>>>>>>> --- /dev/null >>>>>>>>>> +++ b/Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml >>>>>>>>>> @@ -0,0 +1,76 @@ >>>>>>>>>> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) >>>>>>>>>> +%YAML 1.2 >>>>>>>>>> +--- >>>>>>>>>> +$id: http://devicetree.org/schemas/phy/samsung,exynos2200-usbcon-phy.yaml# >>>>>>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>>>>>>>>> + >>>>>>>>>> +title: Exynos2200 USB controller PHY >>>>>>>>>> + >>>>>>>>>> +maintainers: >>>>>>>>>> + - Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com> >>>>>>>>>> + >>>>>>>>>> +description: >>>>>>>>>> + Exynos2200 USB controller PHY is an intermediary between a USB controller >>>>>>>>>> + (typically DWC3) and other PHYs (UTMI, PIPE3). >>>>>>>>> Isn't this the same as usbdrd phy? see: samsung,usb3-drd-phy.yaml >>>>>>>> It's not (I think). There's a few reasons I've decided to make this separate >>>>>>>> from the usb3-drd-phy bindings and exynos5-usbdrd driver: >>>>>>>> >>>>>>>> 1. This PHY does not provide UTMI and PIPE3 on its own. There's no tuning >>>>>>> USBDRD phy does not provide UTMI and PIPE on its own either if you look >>>>>>> at diagram - they call it phy controller. >>>>>> Ughm. What? So in most exynos cases, there's a combination of multiple phys? >>>>>>>> for them, and all that is needed from it is to disable HWACG, assert/ >>>>>>>> deassert reset and force bvalid/vbusvalid. After that SNPS eUSB2 >>>>>>>> initialization can be done and USB2 works. If the USBCON phy is not set >>>>>>>> up before the eUSB2 one, the device hangs, so there is definitely a >>>>>>>> dependancy between them. For PIPE3 we'd need to control the pipe3 >>>>>>>> attaching/deattaching and then initialize the synopsys USBDP combophy. >>>>>>> Does it mean there is no USB DRD phy controller as before? >>>>>>> >>>>>>> Anyway the problem is you have DWC3 -> PHY -> PHY. Looks one phy too many. >>>>>> So... >>>>>> >>>>>> DWC3 -> USBDRD (USBCON) -> PHYs? >>>>> No, drop last phy. You just wrote the same as me - two phys, because >>>>> usbdrd is the phy. In all existing designs there is no such controllable >>>>> object from the point of view of operating system. >>>> What? Per my understanding, the phy property should refer to whatever is >>>> is connected to dwc3 UTMI. In this case it's the so-called USBDRD phy (called >>>> usbcon in downstream). Considering that the eUSB2 IP definitely also has UTMI >>>> that has to be connected to something, doesn't that mean we have clearly >>> The entire point is that eUSB2 is connected to DWC3, no? That's exactly >>> how it is done for example on Qualcomm SoC. Otherwise you claim that >>> DWC3 controls one phy, which controls another phy which controls UTMI... >> But where does the USBCON fit? Is it just a side controller? Why's it needed >> in the first place? This is what I don't understand. > I assume usbcon, so old usbdrd, is the second DWC3's phy, just like qcom > qmpphy. Ugh. For qcoms, does the first phy depend on qmpphy? If we pass it as the second phy, I don't know how the linkreset will happen. We also have a usbdp phy, which I suspect is used for SS as well since it's a combophy by Synopsys. https://gitlab.com/Mis012/sm-s908b-linux-source-code/-/blob/s22_restored_history/drivers/phy/samsung/phy-exynos-usbdrd-eusb.c#L1579 Best regards, Ivaylo > >>>> separated hardware blocks? Now, I guess one could argue that this USBCON >>>> hardware block could be classified as a syscon. But I don't see the problem >>>> with the current binding description, nor the modelling, as it represents >>>> how the hardware is (unless I've gotten it completely wrong). >>> It is the first time you use argument that it represents how the >>> hardware is and this is what we actually disagree. It is not like that. >>> You do not have chain of phys. Just look at any USB 3.0 DRD DWC diagram >>> from any Samsung SoC: where would you squeeze these two phys in relation >>> to what is called there "USB 3.0 PHY" which would be the third phy (!!!). >> Yeah, my point was that it was different from any previous design. Now, >> I don't know if it's actually theoretically possible to design it like so. It's >> hard to just guess how the hardware is designed without having access >> to die shots, documentations or even just schematics. >> >> Let's make it clear now, the changes your request are to document USBCON >> in the existing exynos binding, as well as to correct all explanations of how >> this block functions, right? > No, not necessarily. If USBCON is entirely different device than USBDRD > (different register layout, different features), then go ahead with a > new binding. > > I was questioning your chain of PHYs and this should be investigated. > > > Best regards, > Krzysztof
On Sun, 23 Feb 2025 14:22:22 +0200, Ivaylo Ivanov wrote:
> The Exynos2200 SoC has a USB controller PHY, which acts as an
> intermediary between a USB controller (typically DWC3) and other PHYs
> (UTMI, PIPE3). Add a dt-binding schema for it.
>
> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
> ---
> .../phy/samsung,exynos2200-usbcon-phy.yaml | 76 +++++++++++++++++++
> 1 file changed, 76 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.example.dts:18:18: fatal error: dt-bindings/clock/samsung,exynos2200-cmu.h: No such file or directory
18 | #include <dt-bindings/clock/samsung,exynos2200-cmu.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.dtbs:131: Documentation/devicetree/bindings/phy/samsung,exynos2200-usbcon-phy.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1511: dt_binding_check] Error 2
make: *** [Makefile:251: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250223122227.725233-4-ivo.ivanov.ivanov1@gmail.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
© 2016 - 2025 Red Hat, Inc.