[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <56ddc607-f30b-410b-af54-e2d9afc06540@linaro.org>
Date: Mon, 8 Sep 2025 09:33:51 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: Rob Herring <robh@...nel.org>
Cc: Vinod Koul <vkoul@...nel.org>, Kishon Vijay Abraham I
<kishon@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
Krzysztof Kozlowski <krzk@...nel.org>, linux-arm-msm@...r.kernel.org,
linux-phy@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: do not
reference whole usb-switch.yaml
On 05/09/2025 19:55, Rob Herring wrote:
> On Tue, Sep 02, 2025 at 06:10:05PM +0200, Neil Armstrong wrote:
>> Both bindings describe a different layout of the ports properties,
>> leading to errors when validating DT using this PHY bindings as
>> reported by Rob Herring.
>>
>> Reported-by: Rob Herring <robh@...nel.org>
>> Closes: https://lore.kernel.org/all/175462129176.394940.16810637795278334342.robh@kernel.org/
>> Fixes: 3bad7fe22796 ("dt-bindings: phy: qcom,sc8280xp-qmp-usb43dp: Reference usb-switch.yaml to allow mode-switch")
>> Signed-off-by: Neil Armstrong <neil.armstrong@...aro.org>
>> ---
>> .../devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> index c8bc512df08b5694c8599f475de78679a4438449..5005514d7c3a1e4a8893883497fd204bc04e12be 100644
>> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb43dp-phy.yaml
>> @@ -73,8 +73,11 @@ properties:
>> description:
>> See include/dt-bindings/phy/phy-qcom-qmp.h
>>
>> - mode-switch: true
>> - orientation-switch: true
>> + mode-switch:
>> + $ref: /schemas/usb/usb-switch.yaml#properties/mode-switch
>> +
>> + orientation-switch:
>> + $ref: /schemas/usb/usb-switch.yaml#properties/orientation-switch
>
> This is a pattern we try to avoid with references at a property level. I
> prefer you make port and ports not required in usb-switch.yaml.
Sure but the ports definitions will still collide in this case.
The other problem here is the difference in ports definition,
port@0 and port@1 are not the same.
qcom,sc8280xp-qmp-usb43dp-phy.yaml:
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description: Output endpoint of the PHY
port@1:
$ref: /schemas/graph.yaml#/properties/port
description: Incoming endpoint from the USB controller
port@2:
$ref: /schemas/graph.yaml#/properties/port
description: Incoming endpoint from the DisplayPort controller
usb-switch.yaml:
ports:
$ref: /schemas/graph.yaml#/properties/ports
properties:
port@0:
$ref: /schemas/graph.yaml#/properties/port
description:
Super Speed (SS) Output endpoint to the Type-C connector
port@1:
$ref: /schemas/graph.yaml#/$defs/port-base
description:
Super Speed (SS) Input endpoint from the Super-Speed PHY
Neil
>
> Rob
Powered by blists - more mailing lists