dt-bindings: phy: mxs-usb-phy: convert to DT schema format
Subsystems (4)
PATCH v2 1/2 dt-bindings: phy: mxs-usb-phy: convert to DT schema format
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalProperties
--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml delete mode 100644 Documentation/devicetree/bindings/phy/mxs-usb-phy.txt
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +128 -0
@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,mxs-usbphy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS USB Phy Device + +maintainers: + - Xu Yang <[email protected]> + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphy + - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphy + - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + oneOf: + - enum: + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required: + - fsl,anatop + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + usbphy1: usb-phy@20c9000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; + reg = <0x020c9000 0x1000>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; + fsl,anatop = <&anatop>; + }; + +...
Documentation/devicetree/bindings/phy/mxs-usb-phy.txt deleted +0 -33
@@ -1,33 +0,0 @@ -* Freescale MXS USB Phy Device - -Required properties: -- compatible: should contain: - * "fsl,imx23-usbphy" for imx23 and imx28 - * "fsl,imx6q-usbphy" for imx6dq and imx6dl - * "fsl,imx6sl-usbphy" for imx6sl - * "fsl,vf610-usbphy" for Vybrid vf610 - * "fsl,imx6sx-usbphy" for imx6sx - * "fsl,imx7ulp-usbphy" for imx7ulp - * "fsl,imx8dxl-usbphy" for imx8dxl - "fsl,imx23-usbphy" is still a fallback for other strings -- reg: Should contain registers location and length -- interrupts: Should contain phy interrupt -- fsl,anatop: phandle for anatop register, it is only for imx6 SoC series - -Optional properties: -- fsl,tx-cal-45-dn-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DN output signal. Default: 45 -- fsl,tx-cal-45-dp-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DP output signal. Default: 45 -- fsl,tx-d-cal: Integer [79-119]. Current trimming value (as a percentage) of - the 17.78mA TX reference current. Default: 100 - -Example: -usbphy1: usb-phy@20c9000 { - compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; - reg = <0x020c9000 0x1000>; - interrupts = <0 44 0x04>; - fsl,anatop = <&anatop>; -};
Signature · 1 line
2.34.1
PATCH v2 2/2 dt-bindings: phy: mxs-usb-phy: add imx8ulp and imx8qm compatible
The imx8ulp and imx8qm are compatible with imx8dxl. This will add such compatible.
---
Changes in v2:
- no change
--- Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml +4 -1
@@ -32,7 +32,10 @@ properties: - const: fsl,imx7ulp-usbphy - const: fsl,imx6ul-usbphy - items: - - const: fsl,imx8dxl-usbphy + - enum: + - fsl,imx8ulp-usbphy + - fsl,imx8dxl-usbphy + - fsl,imx8qm-usbphy - const: fsl,imx7ulp-usbphy reg:
Signature · 1 line
2.34.1
Re: [PATCH v2 2/2] dt-bindings: phy: mxs-usb-phy: add imx8ulp and imx8qm compatible
Quoted 17 lines · Xu Yang
The imx8ulp and imx8qm are compatible with imx8dxl. This will add such compatible.
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- no change--- Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml +0
-0
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml properties: · line 38
Quoted 8 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml +4
-1@@ -32,7 +32,10 @@ properties: - const: fsl,imx7ulp-usbphy - const: fsl,imx6ul-usbphy - items: - - const: fsl,imx8dxl-usbphy + - enum: + - fsl,imx8ulp-usbphy + - fsl,imx8dxl-usbphy + - fsl,imx8qm-usbphy
Keep the items sorted. Your previous patch also had wrongly ordered imx6ul in enum.
Best regards,
Krzysztof
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
RE: [EXT] Re: [PATCH v2 2/2] dt-bindings: phy: mxs-usb-phy: add imx8ulp and imx8qm compatible
Hi Krzysztof,
Quoted 28 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Wednesday, June 14, 2023 3:18 AM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Jun Li <[email protected]>
Subject: [EXT] Re: [PATCH v2 2/2] dt-bindings: phy: mxs-usb-phy: add imx8ulp and imx8qm compatibleCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Quoted 5 lines · Xu Yang
The imx8ulp and imx8qm are compatible with imx8dxl. This will add such compatible.
Signed-off-by Xu Yang <[email protected]>Review
Quoted 8 lines
---
Changes in v2:
- no change--- Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml
Quoted 15 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml properties: · line 38
Quoted 12 lines
index
1b6b19fdf491..1395a982c387100644Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml +4
-1@@ -32,7 +32,10 @@ properties: - const: fsl,imx7ulp-usbphy - const: fsl,imx6ul-usbphy - items: - - const: fsl,imx8dxl-usbphy + - enum: + - fsl,imx8ulp-usbphy + - fsl,imx8dxl-usbphy + - fsl,imx8qm-usbphyKeep the items sorted. Your previous patch also had wrongly ordered imx6ul in enum.
V4 already fix this issue as below:
@@ -29,7 +29,10 @@ properties:
- const: fsl,imx6ul-usbphy
- const: fsl,imx23-usbphy
- items:
- - const: fsl,imx8dxl-usbphy
+ - enum:
+ - fsl,imx8dxl-usbphy + - fsl,imx8qm-usbphy + - fsl,imx8ulp-usbphy
- const: fsl,imx7ulp-usbphy
Thanks,
Xu Yang
Quoted 3 lines
Best regards,
Krzysztof
Rob Herring
maintainerQuoted 11 lines · Xu Yang
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalProperties
Quoted 7 lines
--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml delete mode 100644 Documentation/devicetree/bindings/phy/mxs-usb-phy.txt
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:./Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml:103:15: [warning] wrong indentation: expected 16 but found 14 (indentation) ./Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml:109:15: [warning] wrong indentation: expected 16 but found 14 (indentation)
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.example.dtb: usb-phy@20c9000: 'clocks' is a required property
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]
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.
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Hi Xu,
Am 08.06.23 um 05:36 schrieb Xu Yang:
Quoted 32 lines
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalProperties--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-)create mode 100644
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamldelete mode 100644Documentation/devicetree/bindings/phy/mxs-usb-phy.txtDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +8
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,mxs-usbphy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS USB Phy Device +
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 18
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+maintainers: + - Xu Yang <[email protected]> + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphy
on the one side the fsl,imx7ulp-usbphy has an individual compatible
Quoted 5 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +5
-0+ - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphy
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 33
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+ - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphy
on the other side this should be compatible to imx6ul. So at least one definition seems to be unnecessary.
Looking at usb/phy/phy-mxs-usb.c suggests me that fsl,imx7ulp-usbphy is not directly compatible to fsl,imx6ul-usbphy, because the platform data is different. So maybe the using dts* files should be fixed instead?
Quoted 134 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +95
-0+ - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + oneOf: + - enum: + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required: + - fsl,anatop + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + usbphy1: usb-phy@20c9000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; + reg = <0x020c9000 0x1000>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; + fsl,anatop = <&anatop>; + }; + +...Documentation/devicetree/bindings/phy/mxs-usb-phy.txt deleted +0
-33@@ -1,33 +0,0 @@ -* Freescale MXS USB Phy Device - -Required properties: -- compatible: should contain: - * "fsl,imx23-usbphy" for imx23 and imx28 - * "fsl,imx6q-usbphy" for imx6dq and imx6dl - * "fsl,imx6sl-usbphy" for imx6sl - * "fsl,vf610-usbphy" for Vybrid vf610 - * "fsl,imx6sx-usbphy" for imx6sx - * "fsl,imx7ulp-usbphy" for imx7ulp - * "fsl,imx8dxl-usbphy" for imx8dxl - "fsl,imx23-usbphy" is still a fallback for other strings -- reg: Should contain registers location and length -- interrupts: Should contain phy interrupt -- fsl,anatop: phandle for anatop register, it is only for imx6 SoC series - -Optional properties: -- fsl,tx-cal-45-dn-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DN output signal. Default: 45 -- fsl,tx-cal-45-dp-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DP output signal. Default: 45 -- fsl,tx-d-cal: Integer [79-119]. Current trimming value (as a percentage) of - the 17.78mA TX reference current. Default: 100 - -Example: -usbphy1: usb-phy@20c9000 { - compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; - reg = <0x020c9000 0x1000>; - interrupts = <0 44 0x04>; - fsl,anatop = <&anatop>; -};
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Hi Stefan,
Quoted 87 lines
-----Original Message-----
From: Stefan Wahren <[email protected]>
Sent: Thursday, June 8, 2023 3:56 PM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Jun Li <[email protected]>
Subject: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Hi Xu,
Am 08.06.23 um 05:36 schrieb Xu Yang:
Quoted 11 lines
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalPropertiesReview
Quoted 8 lines
--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-)create mode 100644
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamldelete mode 100644Documentation/devicetree/bindings/phy/mxs-usb-phy.txt(quoted diff) +0
-0
b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamlDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 4
Quoted 9 lines
new file mode 100644
index 000000000000..1b6b19fdf491Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id:http://devicetree.org/schemas/phy/fsl,mxs-
usbphy.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7C5df4d949f975469013b408db67f5d46c%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C0%7C638218077754788407%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjo iV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8Sz8tK9GVQqE6ywVLpxPB8YDFQvygZvj6s1NjZk hbzU%3D&reserved=0Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 5
Quoted 1 line
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +1
-0+$schema: http://devicetree.org/meta-schemas%2Fcore.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7C5df4d949f975469013b408db67f5d46c%7C686ea1 d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638218077754788407%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iaX16VnSJnvU%2F0tcnRgsdnTxMsD89 5r4WquGsCFt9Qo%3D&reserved=0
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 18
Quoted 13 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +13
-0+ +title: Freescale MXS USB Phy Device + +maintainers: + - Xu Yang <[email protected]> + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphyon the one side the fsl,imx7ulp-usbphy has an individual compatible
Quoted 5 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +5
-0+ - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphyDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 33
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+ - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphy
Quoted 6 lines
on the other side this should be compatible to imx6ul. So at least one definition seems to be unnecessary.
Looking at
usb/phy/phy-mxs-usb.csuggests me that fsl,imx7ulp-usbphy is not directly compatible to fsl,imx6ul-usbphy, because the platform data is different. So maybe the using dts* files should be fixed instead?
The imx7ulp and imx6ul only has minor difference. In general, imx7ulp is compatilbe with imx6ul. We don't need to modify both dts file and this doc here. So the validation of existing dtb would not fail.
Thanks,
Xu Yang
Quoted 136 lines
Documentation/devicetree/bindings/phy/mxs-
Quoted 97 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +95
-0+ - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + oneOf: + - enum: + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required: + - fsl,anatop + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + usbphy1: usb-phy@20c9000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; + reg = <0x020c9000 0x1000>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; + fsl,anatop = <&anatop>; + }; + +...Documentation/devicetree/bindings/phy/mxs- renamed from Documentation/devicetree/bindings/phy/mxs-usb-phy.txt +0
-0usb-phy.txt
Quoted 38 lines
deleted file mode 100644
index 70c813b0755f..000000000000Documentation/devicetree/bindings/phy/mxs-usb-phy.txt deleted +0
-33@@ -1,33 +0,0 @@ -* Freescale MXS USB Phy Device - -Required properties: -- compatible: should contain: - * "fsl,imx23-usbphy" for imx23 and imx28 - * "fsl,imx6q-usbphy" for imx6dq and imx6dl - * "fsl,imx6sl-usbphy" for imx6sl - * "fsl,vf610-usbphy" for Vybrid vf610 - * "fsl,imx6sx-usbphy" for imx6sx - * "fsl,imx7ulp-usbphy" for imx7ulp - * "fsl,imx8dxl-usbphy" for imx8dxl - "fsl,imx23-usbphy" is still a fallback for other strings -- reg: Should contain registers location and length -- interrupts: Should contain phy interrupt -- fsl,anatop: phandle for anatop register, it is only for imx6 SoC series - -Optional properties: -- fsl,tx-cal-45-dn-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DN output signal. Default: 45 -- fsl,tx-cal-45-dp-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DP output signal. Default: 45 -- fsl,tx-d-cal: Integer [79-119]. Current trimming value (as a percentage) of - the 17.78mA TX reference current. Default: 100 - -Example: -usbphy1: usb-phy@20c9000 { - compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; - reg = <0x020c9000 0x1000>; - interrupts = <0 44 0x04>; - fsl,anatop = <&anatop>; -};
Hi Xu,
Am 08.06.23 um 12:30 schrieb Xu Yang:
Quoted 92 lines
Hi Stefan,
Quoted 90 lines
-----Original Message-----
From: Stefan Wahren <[email protected]>
Sent: Thursday, June 8, 2023 3:56 PM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Jun Li <[email protected]>
Subject: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Hi Xu,
Am 08.06.23 um 05:36 schrieb Xu Yang:
Quoted 11 lines
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalPropertiesReview
Quoted 8 lines
--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-)create mode 100644
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamldelete mode 100644Documentation/devicetree/bindings/phy/mxs-usb-phy.txt(quoted diff) +0
-0
b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamlDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 4
Quoted 9 lines
new file mode 100644
index 000000000000..1b6b19fdf491Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id:http://devicetree.org/schemas/phy/fsl,mxs-
usbphy.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7C5df4d949f975469013b408db67f5d46c%7C686ea1d3bc2b4c 6fa92cd99c5c301635%7C0%7C0%7C638218077754788407%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjo iV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8Sz8tK9GVQqE6ywVLpxPB8YDFQvygZvj6s1NjZk hbzU%3D&reserved=0Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 5
Quoted 1 line
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +1
-0+$schema: http://devicetree.org/meta-schemas%2Fcore.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7C5df4d949f975469013b408db67f5d46c%7C686ea1 d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638218077754788407%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iaX16VnSJnvU%2F0tcnRgsdnTxMsD89 5r4WquGsCFt9Qo%3D&reserved=0
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 18
Quoted 13 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +13
-0+ +title: Freescale MXS USB Phy Device + +maintainers: + - Xu Yang <[email protected]> + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphyon the one side the fsl,imx7ulp-usbphy has an individual compatible
Quoted 5 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +5
-0+ - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphyDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 33
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+ - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphyon the other side this should be compatible to imx6ul. So at least one definition seems to be unnecessary.
Quoted 7 lines
Quoted 3 lines
Looking at
usb/phy/phy-mxs-usb.csuggests me that fsl,imx7ulp-usbphy is not directly compatible to fsl,imx6ul-usbphy, because the platform data is different. So maybe the using dts* files should be fixed instead?The imx7ulp and imx6ul only has minor difference. In general, imx7ulp is compatilbe with imx6ul. We don't need to modify both dts file and this doc here. So the validation of existing dtb would not fail.
The fact that according to the schema imx6ul needs fsl,anatop and imx7ulp doesn't need it, let me think that the difference is not really minor.
Nevertheless the compatibles for imx7ulp-usbphy looks fishy to me, because there are two ways to describe imx7ulp-usbphy ( with and without fsl,imx6ul-usbphy ). From my understanding there should be only one way.
In case you are just concerned about validation issues in this series: it's acceptable to convert txt file to YAML and fix outstanding validation issues within the series via separate patch. In my opinion the goal is to get a proper DT schema and not just to avoid DT validation warnings.
Best regards
Quoted 140 lines
Thanks,
Xu YangQuoted 136 lines
Documentation/devicetree/bindings/phy/mxs-
Quoted 97 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +95
-0+ - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + oneOf: + - enum: + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required: + - fsl,anatop + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + usbphy1: usb-phy@20c9000 { + compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; + reg = <0x020c9000 0x1000>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; + fsl,anatop = <&anatop>; + }; + +...Documentation/devicetree/bindings/phy/mxs- renamed from Documentation/devicetree/bindings/phy/mxs-usb-phy.txt +0
-0usb-phy.txt
Quoted 38 lines
deleted file mode 100644
index 70c813b0755f..000000000000Documentation/devicetree/bindings/phy/mxs-usb-phy.txt deleted +0
-33@@ -1,33 +0,0 @@ -* Freescale MXS USB Phy Device - -Required properties: -- compatible: should contain: - * "fsl,imx23-usbphy" for imx23 and imx28 - * "fsl,imx6q-usbphy" for imx6dq and imx6dl - * "fsl,imx6sl-usbphy" for imx6sl - * "fsl,vf610-usbphy" for Vybrid vf610 - * "fsl,imx6sx-usbphy" for imx6sx - * "fsl,imx7ulp-usbphy" for imx7ulp - * "fsl,imx8dxl-usbphy" for imx8dxl - "fsl,imx23-usbphy" is still a fallback for other strings -- reg: Should contain registers location and length -- interrupts: Should contain phy interrupt -- fsl,anatop: phandle for anatop register, it is only for imx6 SoC series - -Optional properties: -- fsl,tx-cal-45-dn-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DN output signal. Default: 45 -- fsl,tx-cal-45-dp-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DP output signal. Default: 45 -- fsl,tx-d-cal: Integer [79-119]. Current trimming value (as a percentage) of - the 17.78mA TX reference current. Default: 100 - -Example: -usbphy1: usb-phy@20c9000 { - compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; - reg = <0x020c9000 0x1000>; - interrupts = <0 44 0x04>; - fsl,anatop = <&anatop>; -};
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Hi Stefan,
Quoted 142 lines
-----Original Message-----
From: Stefan Wahren <[email protected]>
Sent: Thursday, June 8, 2023 7:39 PM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Jun Li <[email protected]>
Subject: Re: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Hi Xu,
Am 08.06.23 um 12:30 schrieb Xu Yang:
Quoted 7 lines
Hi Stefan,
Quoted 5 lines
-----Original Message-----
From: Stefan Wahren <[email protected]>
Sent: Thursday, June 8, 2023 3:56 PM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx<linux-
Quoted 1 line
Quoted 1 line
[email protected]>; [email protected]; [email protected]; [email protected];
linux-
Quoted 4 lines
Quoted 4 lines
[email protected]; Jun Li <[email protected]>
Subject: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report
the
Quoted 26 lines
Quoted 26 lines
message using the 'Report this email' button
Hi Xu,
Am 08.06.23 um 05:36 schrieb Xu Yang:
Quoted 11 lines
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalPropertiesReview
Quoted 8 lines
--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-)create mode 100644
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamldelete mode 100644Documentation/devicetree/bindings/phy/mxs-usb-phy.txt(quoted diff) +0
-0
b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamlQuoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 4
Quoted 9 lines
new file mode 100644
index 000000000000..1b6b19fdf491Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id:http://devicetree.org/schemas/phy/fsl,mxs-
&data=05%7C01%7Cxu.yang_2%40nxp.com%7C35ccff605dbd46ac9d8608db6814f13f%7C686ea1d3bc2b4c6fa92cd99c5c3016 35%7C0%7C0%7C638218211379372106%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6I k1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gSKnnBeB7BrscJNdHEPWgALwvaSlnZrCbW2lo1K8D0s%3D&reserv ed=0Quoted 1 line
Quoted 1 line
usbphy.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7C5df4d949f975469013b408db67f5d46c%7C686ea1d3bc2b4c
Quoted 1 line
Quoted 1 line
6fa92cd99c5c301635%7C0%7C0%7C638218077754788407%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjo
Quoted 1 line
Quoted 1 line
iV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8Sz8tK9GVQqE6ywVLpxPB8YDFQvygZvj6s1NjZk
Quoted 2 lines
Quoted 2 lines
hbzU%3D&reserved=0
Quoted 1 line
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +1
-0+$schema: http://devicetree.org/meta-&data=05%7C01%7Cxu.yang_2%40nxp.com%7C35ccff605dbd46ac9d8608db6814f13f%7C686ea1d3bc2b4c6fa92cd99c5c3016 35%7C0%7C0%7C638218211379372106%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6I k1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=D3MKKJpLHdfLhK9ubiqQYGZ7ORNDOYbA%2FJOQX%2B3DoAg%3 D&reserved=0
Quoted 1 line
Quoted 1 line
schemas%2Fcore.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7C5df4d949f975469013b408db67f5d46c%7C686ea1
Quoted 1 line
Quoted 1 line
d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638218077754788407%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
Quoted 1 line
Quoted 1 line
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iaX16VnSJnvU%2F0tcnRgsdnTxMsD89
Quoted 36 lines
Quoted 36 lines
5r4WquGsCFt9Qo%3D&reserved=0
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 18
Quoted 13 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +13
-0+ +title: Freescale MXS USB Phy Device + +maintainers: + - Xu Yang <[email protected]> + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphyon the one side the fsl,imx7ulp-usbphy has an individual compatible
Quoted 5 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +5
-0+ - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphyDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 33
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+ - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphyon the other side this should be compatible to imx6ul. So at least one definition seems to be unnecessary.
Quoted 7 lines
Quoted 3 lines
Looking at
usb/phy/phy-mxs-usb.csuggests me that fsl,imx7ulp-usbphy is not directly compatible to fsl,imx6ul-usbphy, because the platform data is different. So maybe the using dts* files should be fixed instead?The imx7ulp and imx6ul only has minor difference. In general, imx7ulp is compatilbe with imx6ul. We don't need to modify both dts file and this doc here. So the validation of existing dtb would not fail.
The fact that according to the schema imx6ul needs fsl,anatop and imx7ulp doesn't need it, let me think that the difference is not really minor.
Nevertheless the compatibles for imx7ulp-usbphy looks fishy to me, because there are two ways to describe imx7ulp-usbphy ( with and without fsl,imx6ul-usbphy ). From my understanding there should be only one way.
Quoted 5 lines
In case you are just concerned about validation issues in this series:
it's acceptable to convert txt file to YAML and fix outstanding validation issues within the series via separate patch. In my opinion the goal is to get a proper DT schema and not just to avoid DT validation warnings.
I reviewed the dts files and driver again. It seems indeedly that imx7ulp-usbphy is diverged from imx6ul-usbphy today. Therefore, to keep this doc clear, "fsl,imx7ulp-usbphy", "fsl,imx6ul-usbphy" could be removed. Thanks for your input. I will remove the second one and keep the first one in V4.
Thanks,
Xu Yang
Quoted 144 lines
Best regards
Quoted 93 lines
Thanks,
Xu YangQuoted 89 lines
Quoted 89 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +88
-0+ - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2 + + interrupts: + minItems: 1 + maxItems: 2 + + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + oneOf: + - enum: + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required: + - fsl,anatop + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + usbphy1: usb-phy@20c9000 {Quoted 8 lines
Quoted 8 lines
Review
Quoted 8 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +7
-0+ compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; + reg = <0x020c9000 0x1000>; + interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>; + fsl,anatop = <&anatop>; + }; + +...(quoted diff) +0
-0b/Documentation/devicetree/bindings/phy/mxs-
Quoted 39 lines
Quoted 39 lines
usb-phy.txt
Quoted 38 lines
deleted file mode 100644
index 70c813b0755f..000000000000Documentation/devicetree/bindings/phy/mxs-usb-phy.txt deleted +0
-33@@ -1,33 +0,0 @@ -* Freescale MXS USB Phy Device - -Required properties: -- compatible: should contain: - * "fsl,imx23-usbphy" for imx23 and imx28 - * "fsl,imx6q-usbphy" for imx6dq and imx6dl - * "fsl,imx6sl-usbphy" for imx6sl - * "fsl,vf610-usbphy" for Vybrid vf610 - * "fsl,imx6sx-usbphy" for imx6sx - * "fsl,imx7ulp-usbphy" for imx7ulp - * "fsl,imx8dxl-usbphy" for imx8dxl - "fsl,imx23-usbphy" is still a fallback for other strings -- reg: Should contain registers location and length -- interrupts: Should contain phy interrupt -- fsl,anatop: phandle for anatop register, it is only for imx6 SoC series - -Optional properties: -- fsl,tx-cal-45-dn-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DN output signal. Default: 45 -- fsl,tx-cal-45-dp-ohms: Integer [35-54]. Resistance (in ohms) of switchable - high-speed trimming resistor connected in parallel with the 45 ohm resistor - that terminates the DP output signal. Default: 45 -- fsl,tx-d-cal: Integer [79-119]. Current trimming value (as a percentage) of - the 17.78mA TX reference current. Default: 100 - -Example: -usbphy1: usb-phy@20c9000 { - compatible = "fsl,imx6q-usbphy", "fsl,imx23-usbphy"; - reg = <0x020c9000 0x1000>; - interrupts = <0 44 0x04>; - fsl,anatop = <&anatop>; -};
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 2 lines · Xu Yang
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Why ones do you add?
Quoted 30 lines
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalProperties--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml delete mode 100644 Documentation/devicetree/bindings/phy/mxs-usb-phy.txtDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +8
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/fsl,mxs-usbphy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS USB Phy Device +
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 18
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+maintainers: + - Xu Yang <[email protected]> + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphy
Keep the list sorted.
Quoted 12 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +12
-0+ - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 40
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+ - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphy + - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2
You should list the items.
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 44
Quoted 4 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0+ + interrupts: + minItems: 1 + maxItems: 2
You should list the items.
Quoted 49 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +49
-0+ + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 103
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+ - reg + - clocks + +allOf: + - if: + properties: + compatible: + oneOf: + - enum: + - fsl,imx6sl-usbphy
It does not look like you tested the bindings, at least after quick look. Please run make dt_binding_check (see Documentation/devicetree/bindings/writing-schema.rst for instructions). Maybe you need to update your dtschema and yamllint.
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 116
Quoted 13 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +13
-0+ - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required: + - fsl,anatop + +additionalProperties: false +
Best regards,
Krzysztof
Hi Krzysztof,
Quoted 13 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Saturday, June 10, 2023 12:44 AM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Jun Li <[email protected]>
Subject: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Quoted 5 lines
Quoted 2 lines · Xu Yang
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Why ones do you add?
I add clock, power-domains and phy-3p0-supply to this doc. Because the txt file should contain these properties but it not. I think the txt doesn't get update in time.
Quoted 38 lines
Quoted 10 lines
Signed-off-by Xu Yang <[email protected]>---
Changes in v2:
- change filename to fsl,mxs-usbphy.yaml
- add other optional properties
- narrow fsl,anatop to imx6
- use additionalPropertiesReview
Quoted 8 lines
--- .../bindings/phy/fsl,mxs-usbphy.yaml | 128 ++++++++++++++++++ .../devicetree/bindings/phy/mxs-usb-phy.txt | 33 ----- 2 files changed, 128 insertions(+), 33 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml delete mode 100644 Documentation/devicetree/bindings/phy/mxs-usb-phy.txt(quoted diff) +0
-0
b/Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yamlDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 4
Quoted 9 lines
new file mode 100644
index 000000000000..1b6b19fdf491Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0@@ -0,0 +1,128 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id:http://devicetree.org/schemas/phy/fsl,mxs-
usbphy.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7Ccdb34e27fd17419bbe3608db6908b13d%7C686ea1d3bc2b4 c6fa92cd99c5c301635%7C0%7C0%7C638219258284008643%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4pNCtSE9x4kENZsGf2nq%2F2S8uazubTjeqpSZ XyRRVOo%3D&reserved=0Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 5
Quoted 1 line
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +1
-0+$schema: http://devicetree.org/meta-schemas%2Fcore.yaml%23&data=05%7C01%7Cxu.yang_2%40nxp.com%7Ccdb34e27fd17419bbe3608db6908b13d%7C686ea 1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638219258284008643%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QjXo%2FzS6Ntl2RGBScVJfkdIONo6Sa psDkcDM5AY9cgQ%3D&reserved=0
Quoted 15 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 18
Quoted 13 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +13
-0+ +title: Freescale MXS USB Phy Device + +maintainers: + - Xu Yang <[email protected]> + +properties: + compatible: + oneOf: + - enum: + - fsl,imx23-usbphy + - fsl,vf610-usbphy + - fsl,imx7ulp-usbphyKeep the list sorted.
Okay.
Quoted 24 lines
Quoted 13 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +12
-0+ - items: + - enum: + - fsl,imx28-usbphy + - fsl,imx6ul-usbphy + - fsl,imx6sl-usbphy + - fsl,imx6sx-usbphy + - fsl,imx6q-usbphy + - const: fsl,imx23-usbphy + - items: + - const: fsl,imx6sll-usbphy + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphyDocumentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 40
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +10
-0+ - items: + - const: fsl,imx7ulp-usbphy + - const: fsl,imx6ul-usbphy + - items: + - const: fsl,imx8dxl-usbphy + - const: fsl,imx7ulp-usbphy + + reg: + minItems: 1 + maxItems: 2
Quoted 8 lines
You should list the items.
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 44
Quoted 4 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0+ + interrupts: + minItems: 1 + maxItems: 2You should list the items.
After my check, the maxItems value of reg and interrupts should be 1. Will change it.
Quoted 57 lines
Quoted 57 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +56
-0+ + clocks: + maxItems: 1 + + '#phy-cells': + const: 0 + + power-domains: + maxItems: 1 + + fsl,anatop: + description: + phandle for anatop register, it is only for imx6 SoC series. + $ref: /schemas/types.yaml#/definitions/phandle + + phy-3p0-supply: + description: + One of USB PHY's power supply. Can be used to keep a good signal + quality. + + fsl,tx-cal-45-dn-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DN output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-cal-45-dp-ohms: + description: + Resistance (in ohms) of switchable high-speed trimming resistor + connected in parallel with the 45 ohm resistor that terminates + the DP output signal. + minimum: 35 + maximum: 54 + default: 45 + + fsl,tx-d-cal: + description: + Current trimming value (as a percentage) of the 17.78 mA TX + reference current. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 79 + maximum: 119 + default: 100 + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible:
Quoted 8 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 23
Quoted 3 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +3
-0+ oneOf: + - enum: + - fsl,imx6sl-usbphyIt does not look like you tested the bindings, at least after quick look. Please run
make dt_binding_check(seeDocumentation/devicetree/bindings/writing-schema.rstfor instructions). Maybe you need to update your dtschema and yamllint.
Missed this in v2, but already checked bindings in v3. However, I have checked schema using dt-doc-validate and dtbs using dt-validate tools.
Quoted 10 lines
Quoted 10 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +9
-0+ - fsl,imx6sx-usbphy + - fsl,imx6sll-usbphy + - fsl,imx6q-usbphy + - fsl,vf610-usbphy + - items: + - const: fsl,imx6ul-usbphy + - const: fsl,imx23-usbphy + then: + required:
Quoted 8 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 116
Quoted 4 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0+ - fsl,anatop + +additionalProperties: false +Best regards,
Krzysztof
Thanks,
Xu Yang
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 16 lines · Xu Yang
Hi Krzysztof,
Quoted 14 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Saturday, June 10, 2023 12:44 AM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Jun Li <[email protected]>
Subject: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
On 08/06/2023 05:36, Xu Yang wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Why ones do you add?
I add clock, power-domains and phy-3p0-supply to this doc. Because the txt file should contain these properties but it not. I think the txt doesn't get update in time.
Can you mention them in commit msg?
Quoted 13 lines
Quoted 13 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 40
Quoted 5 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +3
-0+ reg: + minItems: 1 + maxItems: 2You should list the items.
Quoted 4 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0+ + interrupts: + minItems: 1 + maxItems: 2
Quoted 4 lines
Quoted 1 line
You should list the items.
After my check, the maxItems value of reg and interrupts should be 1. Will change it.
OK
Best regards,
Krzysztof
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 36 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Tuesday, June 13, 2023 3:40 PM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx <linux- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; Jun Li <[email protected]>
Subject: Re: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Quoted 7 lines · Xu Yang
Hi Krzysztof,
Quoted 5 lines
-----Original Message-----
From: Krzysztof Kozlowski <[email protected]>
Sent: Saturday, June 10, 2023 12:44 AM
To: Xu Yang <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; dl-linux-imx<linux-
Quoted 1 line
Quoted 1 line
[email protected]>; [email protected]; [email protected]; [email protected];
linux-
Quoted 4 lines
Quoted 4 lines
[email protected]; Jun Li <[email protected]>
Subject: [EXT] Re: [PATCH v2 1/2] dt-bindings: phy: mxs-usb-phy: convert to DT schema formatCaution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report
the
Quoted 7 lines
Quoted 7 lines
message using the 'Report this email' button
Quoted 2 lines · Xu Yang
Convert the binding to DT schema format. Besides, this also add other optional properties not contained in txt file.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Why ones do you add?
I add clock, power-domains and phy-3p0-supply to this doc. Because the txt file should contain these properties but it not. I think the txt doesn't get update in time.
Can you mention them in commit msg?
Sure.
Thanks,
Xu Yang
Quoted 24 lines
Quoted 14 lines
Quoted 14 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml line 40
Quoted 6 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +3
-0+ reg: + minItems: 1 + maxItems: 2You should list the items.
Quoted 4 lines
Documentation/devicetree/bindings/phy/fsl,mxs-usbphy.yaml new file +4
-0+ + interrupts: + minItems: 1 + maxItems: 2Quoted 4 lines
Quoted 1 line
You should list the items.
After my check, the maxItems value of reg and interrupts should be 1. Will change it.
OK
Best regards,
Krzysztof