* [PATCH] dt-bindings: usb: add missing unevaluatedProperties on USB connector
@ 2023-07-23 7:11 Krzysztof Kozlowski
2023-07-24 16:26 ` Rob Herring
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-23 7:11 UTC (permalink / raw)
To: Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Chunfeng Yun, Matthias Brugger,
AngeloGioacchino Del Regno, Jagan Sridharan, ChiYuan Huang,
Min Guo, Gene Chen, linux-usb, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski
The usb-connector.yaml schema allows any additional properties, thus its
usage should finish with unevaluatedProperties: false.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Documentation/devicetree/bindings/usb/maxim,max33359.yaml | 1 +
Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 1 +
Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 1 +
Documentation/devicetree/bindings/usb/mediatek,musb.yaml | 1 +
Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml | 1 +
Documentation/devicetree/bindings/usb/richtek,rt1719.yaml | 1 +
6 files changed, 6 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/maxim,max33359.yaml b/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
index 276bf7554215..45e093978b82 100644
--- a/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
+++ b/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
@@ -25,6 +25,7 @@ properties:
connector:
type: object
$ref: ../connector/usb-connector.yaml#
+ unevaluatedProperties: false
description:
Properties for usb c connector.
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
index 053264e60583..42b9d3a35c67 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
@@ -29,6 +29,7 @@ properties:
connector:
type: object
$ref: ../connector/usb-connector.yaml#
+ unevaluatedProperties: false
description:
Properties for usb c connector.
diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
index a59d91243ac8..7eb880e4a270 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
@@ -144,6 +144,7 @@ properties:
connector:
$ref: /schemas/connector/usb-connector.yaml#
+ unevaluatedProperties: false
description:
Connector for dual role switch, especially for "gpio-usb-b-connector"
type: object
diff --git a/Documentation/devicetree/bindings/usb/mediatek,musb.yaml b/Documentation/devicetree/bindings/usb/mediatek,musb.yaml
index a39d38db7714..924f74d45baa 100644
--- a/Documentation/devicetree/bindings/usb/mediatek,musb.yaml
+++ b/Documentation/devicetree/bindings/usb/mediatek,musb.yaml
@@ -66,6 +66,7 @@ properties:
$ref: /schemas/connector/usb-connector.yaml#
description: Connector for dual role switch
type: object
+ unevaluatedProperties: false
dependencies:
usb-role-switch: [ connector ]
diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
index 8da4d2ad1a91..980235e27a7f 100644
--- a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
+++ b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
@@ -36,6 +36,7 @@ properties:
connector:
type: object
$ref: /schemas/connector/usb-connector.yaml#
+ unevaluatedProperties: false
description:
Properties for usb c connector.
diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml
index 4ced2f68e2a9..27978580b234 100644
--- a/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml
+++ b/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml
@@ -34,6 +34,7 @@ properties:
connector:
type: object
$ref: ../connector/usb-connector.yaml#
+ unevaluatedProperties: false
description:
Properties for usb c connector.
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: usb: add missing unevaluatedProperties on USB connector
2023-07-23 7:11 [PATCH] dt-bindings: usb: add missing unevaluatedProperties on USB connector Krzysztof Kozlowski
@ 2023-07-24 16:26 ` Rob Herring
2023-07-24 17:05 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-07-24 16:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Chunfeng Yun, Matthias Brugger, AngeloGioacchino Del Regno,
Jagan Sridharan, ChiYuan Huang, Min Guo, Gene Chen, linux-usb,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
On Sun, Jul 23, 2023 at 09:11:05AM +0200, Krzysztof Kozlowski wrote:
> The usb-connector.yaml schema allows any additional properties, thus its
> usage should finish with unevaluatedProperties: false.
Is it problematic if usb-connector.yaml is restricted?
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> Documentation/devicetree/bindings/usb/maxim,max33359.yaml | 1 +
> Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml | 1 +
> Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 1 +
> Documentation/devicetree/bindings/usb/mediatek,musb.yaml | 1 +
> Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml | 1 +
> Documentation/devicetree/bindings/usb/richtek,rt1719.yaml | 1 +
> 6 files changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/maxim,max33359.yaml b/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
> index 276bf7554215..45e093978b82 100644
> --- a/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
> +++ b/Documentation/devicetree/bindings/usb/maxim,max33359.yaml
> @@ -25,6 +25,7 @@ properties:
> connector:
> type: object
> $ref: ../connector/usb-connector.yaml#
> + unevaluatedProperties: false
> description:
> Properties for usb c connector.
>
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> index 053264e60583..42b9d3a35c67 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mt6360-tcpc.yaml
> @@ -29,6 +29,7 @@ properties:
> connector:
> type: object
> $ref: ../connector/usb-connector.yaml#
> + unevaluatedProperties: false
> description:
> Properties for usb c connector.
>
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
> index a59d91243ac8..7eb880e4a270 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml
> @@ -144,6 +144,7 @@ properties:
>
> connector:
> $ref: /schemas/connector/usb-connector.yaml#
> + unevaluatedProperties: false
> description:
> Connector for dual role switch, especially for "gpio-usb-b-connector"
> type: object
> diff --git a/Documentation/devicetree/bindings/usb/mediatek,musb.yaml b/Documentation/devicetree/bindings/usb/mediatek,musb.yaml
> index a39d38db7714..924f74d45baa 100644
> --- a/Documentation/devicetree/bindings/usb/mediatek,musb.yaml
> +++ b/Documentation/devicetree/bindings/usb/mediatek,musb.yaml
> @@ -66,6 +66,7 @@ properties:
> $ref: /schemas/connector/usb-connector.yaml#
> description: Connector for dual role switch
> type: object
> + unevaluatedProperties: false
>
> dependencies:
> usb-role-switch: [ connector ]
> diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> index 8da4d2ad1a91..980235e27a7f 100644
> --- a/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> +++ b/Documentation/devicetree/bindings/usb/richtek,rt1711h.yaml
> @@ -36,6 +36,7 @@ properties:
> connector:
> type: object
> $ref: /schemas/connector/usb-connector.yaml#
> + unevaluatedProperties: false
> description:
> Properties for usb c connector.
>
> diff --git a/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml b/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml
> index 4ced2f68e2a9..27978580b234 100644
> --- a/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml
> +++ b/Documentation/devicetree/bindings/usb/richtek,rt1719.yaml
> @@ -34,6 +34,7 @@ properties:
> connector:
> type: object
> $ref: ../connector/usb-connector.yaml#
> + unevaluatedProperties: false
> description:
> Properties for usb c connector.
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: usb: add missing unevaluatedProperties on USB connector
2023-07-24 16:26 ` Rob Herring
@ 2023-07-24 17:05 ` Krzysztof Kozlowski
2023-07-24 21:02 ` Rob Herring
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-24 17:05 UTC (permalink / raw)
To: Rob Herring
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Chunfeng Yun, Matthias Brugger, AngeloGioacchino Del Regno,
Jagan Sridharan, ChiYuan Huang, Min Guo, Gene Chen, linux-usb,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
On 24/07/2023 18:26, Rob Herring wrote:
> On Sun, Jul 23, 2023 at 09:11:05AM +0200, Krzysztof Kozlowski wrote:
>> The usb-connector.yaml schema allows any additional properties, thus its
>> usage should finish with unevaluatedProperties: false.
>
> Is it problematic if usb-connector.yaml is restricted?
Yes, a bit.
1. Missing reg/unit-address:
Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
I guess this could be easily solved.
2. phy-supply:
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
(and more of armada)
This is a bit odd:
phy@18300 {
compatible = "marvell,comphy-a3700";
comphy0: phy@0 {}
comphy1: phy@1 {}
comphy2: phy@2 {
connector {
compatible = "usb-a-connector";
phy-supply = <&exp_usb3_vbus>;
};
};
I would assume that phy-supply should be a property of the phy.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: usb: add missing unevaluatedProperties on USB connector
2023-07-24 17:05 ` Krzysztof Kozlowski
@ 2023-07-24 21:02 ` Rob Herring
2023-07-25 10:22 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2023-07-24 21:02 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Chunfeng Yun, Matthias Brugger, AngeloGioacchino Del Regno,
Jagan Sridharan, ChiYuan Huang, Min Guo, Gene Chen, linux-usb,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
On Mon, Jul 24, 2023 at 11:05 AM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 24/07/2023 18:26, Rob Herring wrote:
> > On Sun, Jul 23, 2023 at 09:11:05AM +0200, Krzysztof Kozlowski wrote:
> >> The usb-connector.yaml schema allows any additional properties, thus its
> >> usage should finish with unevaluatedProperties: false.
> >
> > Is it problematic if usb-connector.yaml is restricted?
>
> Yes, a bit.
> 1. Missing reg/unit-address:
> Documentation/devicetree/bindings/usb/cypress,cypd4226.yaml
> I guess this could be easily solved.
>
> 2. phy-supply:
> arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> (and more of armada)
> This is a bit odd:
>
> phy@18300 {
> compatible = "marvell,comphy-a3700";
> comphy0: phy@0 {}
> comphy1: phy@1 {}
> comphy2: phy@2 {
> connector {
> compatible = "usb-a-connector";
> phy-supply = <&exp_usb3_vbus>;
> };
> };
>
> I would assume that phy-supply should be a property of the phy.
Indeed. We already have vbus-supply which this looks like it is. I'm
pretty sure I've seen Vbus in phy bindings too which I've pushed back
on as to whether Vbus really went to the phy or was there because the
phy driver just wants to control Vbus.
The marvell platforms aren't in great shape schema wise, so maybe
don't worry about it now.
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: usb: add missing unevaluatedProperties on USB connector
2023-07-24 21:02 ` Rob Herring
@ 2023-07-25 10:22 ` Krzysztof Kozlowski
0 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2023-07-25 10:22 UTC (permalink / raw)
To: Rob Herring
Cc: Greg Kroah-Hartman, Krzysztof Kozlowski, Conor Dooley,
Chunfeng Yun, Matthias Brugger, AngeloGioacchino Del Regno,
Jagan Sridharan, ChiYuan Huang, Min Guo, Gene Chen, linux-usb,
devicetree, linux-kernel, linux-arm-kernel, linux-mediatek
On 24/07/2023 23:02, Rob Herring wrote:
>> compatible = "usb-a-connector";
>> phy-supply = <&exp_usb3_vbus>;
>> };
>> };
>>
>> I would assume that phy-supply should be a property of the phy.
>
> Indeed. We already have vbus-supply which this looks like it is. I'm
> pretty sure I've seen Vbus in phy bindings too which I've pushed back
> on as to whether Vbus really went to the phy or was there because the
> phy driver just wants to control Vbus.
>
> The marvell platforms aren't in great shape schema wise, so maybe
> don't worry about it now.
OK, I will send a v2.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-25 10:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-23 7:11 [PATCH] dt-bindings: usb: add missing unevaluatedProperties on USB connector Krzysztof Kozlowski
2023-07-24 16:26 ` Rob Herring
2023-07-24 17:05 ` Krzysztof Kozlowski
2023-07-24 21:02 ` Rob Herring
2023-07-25 10:22 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox