Embedded USB Debugger(EUD) being a High-Speed USB hub needs
HS-Phy support for it's operation. Hence document phy bindings
to support this.
Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com>
---
.../devicetree/bindings/soc/qcom/qcom,eud.yaml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
index f2c5ec7e6437..fca5b608ec63 100644
--- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml
@@ -29,6 +29,14 @@ properties:
description: EUD interrupt
maxItems: 1
+ phys:
+ items:
+ - description: USB2/HS PHY needed for EUD functionality
+
+ phy-names:
+ items:
+ - const: usb2-phy
+
ports:
$ref: /schemas/graph.yaml#/properties/ports
description:
@@ -48,6 +56,8 @@ properties:
required:
- compatible
- reg
+ - phys
+ - phy-names
- ports
additionalProperties: false
@@ -58,6 +68,8 @@ examples:
compatible = "qcom,sc7280-eud", "qcom,eud";
reg = <0x88e0000 0x2000>,
<0x88e2000 0x1000>;
+ phys = <&usb_2_hsphy>;
+ phy-names = "usb2-phy";
ports {
#address-cells = <1>;
--
2.17.1
On 31/07/2024 00:24, Elson Roy Serrao wrote: > Embedded USB Debugger(EUD) being a High-Speed USB hub needs > HS-Phy support for it's operation. Hence document phy bindings > to support this. > > Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com> A nit, subject: drop second/last, redundant "bindings". The "dt-bindings" prefix is already stating that these are bindings. See also: https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 > --- > .../devicetree/bindings/soc/qcom/qcom,eud.yaml | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml > index f2c5ec7e6437..fca5b608ec63 100644 > --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml > +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml > @@ -29,6 +29,14 @@ properties: > description: EUD interrupt > maxItems: 1 > > + phys: > + items: > + - description: USB2/HS PHY needed for EUD functionality > + > + phy-names: > + items: > + - const: usb2-phy > + > ports: > $ref: /schemas/graph.yaml#/properties/ports > description: > @@ -48,6 +56,8 @@ properties: > required: > - compatible > - reg > + - phys > + - phy-names That's an ABI break and nothing in commit msg justified it. Best regards, Krzysztof
On 7/30/2024 10:33 PM, Krzysztof Kozlowski wrote: > On 31/07/2024 00:24, Elson Roy Serrao wrote: >> Embedded USB Debugger(EUD) being a High-Speed USB hub needs >> HS-Phy support for it's operation. Hence document phy bindings >> to support this. >> >> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com> > > A nit, subject: drop second/last, redundant "bindings". The > "dt-bindings" prefix is already stating that these are bindings. > See also: > https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 > Ack >> --- >> .../devicetree/bindings/soc/qcom/qcom,eud.yaml | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >> index f2c5ec7e6437..fca5b608ec63 100644 >> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >> @@ -29,6 +29,14 @@ properties: >> description: EUD interrupt >> maxItems: 1 >> >> + phys: >> + items: >> + - description: USB2/HS PHY needed for EUD functionality >> + >> + phy-names: >> + items: >> + - const: usb2-phy >> + >> ports: >> $ref: /schemas/graph.yaml#/properties/ports >> description: >> @@ -48,6 +56,8 @@ properties: >> required: >> - compatible >> - reg >> + - phys >> + - phy-names > > That's an ABI break and nothing in commit msg justified it. > Hi Krzysztof Thank you for the review. I see that the only user for EUD as of now is QC sc7280 SoC where phy property is missing and EUD node is disabled. As described in my cover letter, HS phy support is needed for EUD functionality and this is applicable to all SoCs where EUD is to be enabled. Hence phy would be a required property. Given that the changes in this series are directly applicable to sc7280 as well, I will re-enable/rectify EUD feature on sc7280 SoC first, by adhering it to this binding requirement. That would address the ABI break. Once the base framework is set I shall extend it to sm8450 SoC. Regards Elson
On 01/08/2024 00:23, Elson Serrao wrote: > > > On 7/30/2024 10:33 PM, Krzysztof Kozlowski wrote: >> On 31/07/2024 00:24, Elson Roy Serrao wrote: >>> Embedded USB Debugger(EUD) being a High-Speed USB hub needs >>> HS-Phy support for it's operation. Hence document phy bindings >>> to support this. >>> >>> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com> >> >> A nit, subject: drop second/last, redundant "bindings". The >> "dt-bindings" prefix is already stating that these are bindings. >> See also: >> https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 >> > Ack >>> --- >>> .../devicetree/bindings/soc/qcom/qcom,eud.yaml | 12 ++++++++++++ >>> 1 file changed, 12 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>> index f2c5ec7e6437..fca5b608ec63 100644 >>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>> @@ -29,6 +29,14 @@ properties: >>> description: EUD interrupt >>> maxItems: 1 >>> >>> + phys: >>> + items: >>> + - description: USB2/HS PHY needed for EUD functionality >>> + >>> + phy-names: >>> + items: >>> + - const: usb2-phy >>> + >>> ports: >>> $ref: /schemas/graph.yaml#/properties/ports >>> description: >>> @@ -48,6 +56,8 @@ properties: >>> required: >>> - compatible >>> - reg >>> + - phys >>> + - phy-names >> >> That's an ABI break and nothing in commit msg justified it. >> > > Hi Krzysztof > > Thank you for the review. > I see that the only user for EUD as of now is QC sc7280 SoC where phy property Did you ask all customers and all users of Linux kernel? > is missing and EUD node is disabled. As described in my cover letter, HS phy > support is needed for EUD functionality and this is applicable to all SoCs > where EUD is to be enabled. Hence phy would be a required property. Nothing in commit msg explained that, but I have a bit hard time to believe that this never worked. If that's the case, say it explicitly in commit msg - this was always broken. > Given that the changes in this series are directly applicable to sc7280 as well, > I will re-enable/rectify EUD feature on sc7280 SoC first, by adhering it to this binding > requirement. That would address the ABI break. I don't understand what you are saying here. > Once the base framework is set I shall extend it to sm8450 SoC. Best regards, Krzysztof
On 1.08.2024 9:45 AM, Krzysztof Kozlowski wrote: > On 01/08/2024 00:23, Elson Serrao wrote: >> >> >> On 7/30/2024 10:33 PM, Krzysztof Kozlowski wrote: >>> On 31/07/2024 00:24, Elson Roy Serrao wrote: >>>> Embedded USB Debugger(EUD) being a High-Speed USB hub needs >>>> HS-Phy support for it's operation. Hence document phy bindings >>>> to support this. >>>> >>>> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com> >>> >>> A nit, subject: drop second/last, redundant "bindings". The >>> "dt-bindings" prefix is already stating that these are bindings. >>> See also: >>> https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 >>> >> Ack >>>> --- >>>> .../devicetree/bindings/soc/qcom/qcom,eud.yaml | 12 ++++++++++++ >>>> 1 file changed, 12 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>> index f2c5ec7e6437..fca5b608ec63 100644 >>>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>> @@ -29,6 +29,14 @@ properties: >>>> description: EUD interrupt >>>> maxItems: 1 >>>> >>>> + phys: >>>> + items: >>>> + - description: USB2/HS PHY needed for EUD functionality >>>> + >>>> + phy-names: >>>> + items: >>>> + - const: usb2-phy >>>> + >>>> ports: >>>> $ref: /schemas/graph.yaml#/properties/ports >>>> description: >>>> @@ -48,6 +56,8 @@ properties: >>>> required: >>>> - compatible >>>> - reg >>>> + - phys >>>> + - phy-names >>> >>> That's an ABI break and nothing in commit msg justified it. >>> >> >> Hi Krzysztof >> >> Thank you for the review. >> I see that the only user for EUD as of now is QC sc7280 SoC where phy property > > Did you ask all customers and all users of Linux kernel? Unfortunately, the PDF agrees - the current description is inherently incomplete and the driver seems to have been upstreamed in a rather "i need this specific part of it for my usecase" manner.. The driver must be aware of all USB state changes (as EUD is essentially a mux+hub sitting between the PHYs and the USB controllers). Additionally, AFAICU, all device-mode-capable USB ports may potentially be used for debug purposes (one at a time), so it's not just a matter of a single controller here. Plug events / their suspend state must be monitored to program the EUD (which again, sits in the middle of all this) in a specific manner. EUD is present on all non-ancient SoCs and by default it's on in bypass mode, so you can ignore its existence. That is, unless you want to use the features it provides, which we absolutely do. >> is missing and EUD node is disabled. As described in my cover letter, HS phy >> support is needed for EUD functionality and this is applicable to all SoCs >> where EUD is to be enabled. Hence phy would be a required property. > > Nothing in commit msg explained that, but I have a bit hard time to > believe that this never worked. If that's the case, say it explicitly in > commit msg - this was always broken. Even if it does work, it does so on a specific class of boards, relying on specific setup from a previous stage bootloader. >> Given that the changes in this series are directly applicable to sc7280 as well, >> I will re-enable/rectify EUD feature on sc7280 SoC first, by adhering it to this binding >> requirement. That would address the ABI break. > > I don't understand what you are saying here. > >> Once the base framework is set I shall extend it to sm8450 SoC. tldr, we should fix both the bindings and the 7280 dt for it Konrad
On 27.01.2025 3:40 PM, Konrad Dybcio wrote: > On 1.08.2024 9:45 AM, Krzysztof Kozlowski wrote: >> On 01/08/2024 00:23, Elson Serrao wrote: >>> >>> >>> On 7/30/2024 10:33 PM, Krzysztof Kozlowski wrote: >>>> On 31/07/2024 00:24, Elson Roy Serrao wrote: >>>>> Embedded USB Debugger(EUD) being a High-Speed USB hub needs >>>>> HS-Phy support for it's operation. Hence document phy bindings >>>>> to support this. >>>>> >>>>> Signed-off-by: Elson Roy Serrao <quic_eserrao@quicinc.com> >>>> >>>> A nit, subject: drop second/last, redundant "bindings". The >>>> "dt-bindings" prefix is already stating that these are bindings. >>>> See also: >>>> https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18 >>>> >>> Ack >>>>> --- >>>>> .../devicetree/bindings/soc/qcom/qcom,eud.yaml | 12 ++++++++++++ >>>>> 1 file changed, 12 insertions(+) >>>>> >>>>> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>>> index f2c5ec7e6437..fca5b608ec63 100644 >>>>> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>>> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,eud.yaml >>>>> @@ -29,6 +29,14 @@ properties: >>>>> description: EUD interrupt >>>>> maxItems: 1 >>>>> >>>>> + phys: >>>>> + items: >>>>> + - description: USB2/HS PHY needed for EUD functionality >>>>> + >>>>> + phy-names: >>>>> + items: >>>>> + - const: usb2-phy >>>>> + >>>>> ports: >>>>> $ref: /schemas/graph.yaml#/properties/ports >>>>> description: >>>>> @@ -48,6 +56,8 @@ properties: >>>>> required: >>>>> - compatible >>>>> - reg >>>>> + - phys >>>>> + - phy-names >>>> >>>> That's an ABI break and nothing in commit msg justified it. >>>> >>> >>> Hi Krzysztof >>> >>> Thank you for the review. >>> I see that the only user for EUD as of now is QC sc7280 SoC where phy property >> >> Did you ask all customers and all users of Linux kernel? > > Unfortunately, the PDF agrees - the current description is inherently incomplete > and the driver seems to have been upstreamed in a rather "i need this specific > part of it for my usecase" manner.. > > The driver must be aware of all USB state changes (as EUD is essentially a mux+hub > sitting between the PHYs and the USB controllers). > > Additionally, AFAICU, all device-mode-capable USB ports may potentially be used > for debug purposes (one at a time), so it's not just a matter of a single > controller here. Plug events / their suspend state must be monitored to program > the EUD (which again, sits in the middle of all this) in a specific manner. > > EUD is present on all non-ancient SoCs and by default it's on in bypass mode, so > you can ignore its existence. That is, unless you want to use the features it > provides, which we absolutely do. > >>> is missing and EUD node is disabled. As described in my cover letter, HS phy >>> support is needed for EUD functionality and this is applicable to all SoCs >>> where EUD is to be enabled. Hence phy would be a required property. >> >> Nothing in commit msg explained that, but I have a bit hard time to >> believe that this never worked. If that's the case, say it explicitly in >> commit msg - this was always broken. > > Even if it does work, it does so on a specific class of boards, relying on > specific setup from a previous stage bootloader. > >>> Given that the changes in this series are directly applicable to sc7280 as well, >>> I will re-enable/rectify EUD feature on sc7280 SoC first, by adhering it to this binding >>> requirement. That would address the ABI break. >> >> I don't understand what you are saying here. >> >>> Once the base framework is set I shall extend it to sm8450 SoC. > > tldr, we should fix both the bindings and the 7280 dt for it On top of these comments, reg should be split up into three regions too, if we want to be docs-accurate.. Konrad
© 2016 - 2026 Red Hat, Inc.