dt-bindings: net: brcm,unimac-mdio: convert to the json-schema
PATCH 1/1 dt-bindings: net: brcm,unimac-mdio: convert to the json-schema
From: Rafał Miłecki <[email protected]>
This helps validating DTS files.
Introduced example binding changes:
1. Fixed reg formatting
2. Swapped #address-cells and #size-cells incorrect values
3. Renamed node: s/phy/ethernet-phy/
---
I've verified this new binding using:
make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
--- .../bindings/net/brcm,unimac-mdio.txt | 43 ---------- .../bindings/net/brcm,unimac-mdio.yaml | 84 +++++++++++++++++++ 2 files changed, 84 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt deleted +0 -43
@@ -1,43 +0,0 @@ -* Broadcom UniMAC MDIO bus controller - -Required properties: -- compatible: should one from "brcm,genet-mdio-v1", "brcm,genet-mdio-v2", - "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5" or - "brcm,unimac-mdio" -- reg: address and length of the register set for the device, first one is the - base register, and the second one is optional and for indirect accesses to - larger than 16-bits MDIO transactions -- reg-names: name(s) of the register must be "mdio" and optional "mdio_indir_rw" -- #size-cells: must be 1 -- #address-cells: must be 0 - -Optional properties: -- interrupts: must be one if the interrupt is shared with the Ethernet MAC or - Ethernet switch this MDIO block is integrated from, or must be two, if there - are two separate interrupts, first one must be "mdio done" and second must be - for "mdio error" -- interrupt-names: must be "mdio_done_error" when there is a share interrupt fed - to this hardware block, or must be "mdio_done" for the first interrupt and - "mdio_error" for the second when there are separate interrupts -- clocks: A reference to the clock supplying the MDIO bus controller -- clock-frequency: the MDIO bus clock that must be output by the MDIO bus - hardware, if absent, the default hardware values are used - -Child nodes of this MDIO bus controller node are standard Ethernet PHY device -nodes as described in Documentation/devicetree/bindings/net/phy.txt - -Example: - -mdio@403c0 { - compatible = "brcm,unimac-mdio"; - reg = <0x403c0 0x8 0x40300 0x18>; - reg-names = "mdio", "mdio_indir_rw"; - #size-cells = <1>; - #address-cells = <0>; - - ... - phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0>; - }; -};
Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.26.2
Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml line 40
Quoted 4 lines
Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml new file +4
-0+ interrupts: + oneOf: + - description: > + Tnterrupt shared with the Ethernet MAC or Ethernet switch this MDIO
Interrupt.
Andrew
PATCH v2 1/1 dt-bindings: net: brcm,unimac-mdio: convert to the json-schema
In reply to Rafał MiłeckiFrom: Rafał Miłecki <[email protected]>
This helps validating DTS files.
Introduced example binding changes:
1. Fixed reg formatting
2. Swapped #address-cells and #size-cells incorrect values
3. Renamed node: s/phy/ethernet-phy/
---
I've verified this new binding using:
make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
V2: Fix typo: s/Tnterrupt/Interrupt/ - thanks Andrew
--- .../bindings/net/brcm,unimac-mdio.txt | 43 ---------- .../bindings/net/brcm,unimac-mdio.yaml | 84 +++++++++++++++++++ 2 files changed, 84 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
Documentation/devicetree/bindings/net/brcm,unimac-mdio.txt deleted +0 -43
@@ -1,43 +0,0 @@ -* Broadcom UniMAC MDIO bus controller - -Required properties: -- compatible: should one from "brcm,genet-mdio-v1", "brcm,genet-mdio-v2", - "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5" or - "brcm,unimac-mdio" -- reg: address and length of the register set for the device, first one is the - base register, and the second one is optional and for indirect accesses to - larger than 16-bits MDIO transactions -- reg-names: name(s) of the register must be "mdio" and optional "mdio_indir_rw" -- #size-cells: must be 1 -- #address-cells: must be 0 - -Optional properties: -- interrupts: must be one if the interrupt is shared with the Ethernet MAC or - Ethernet switch this MDIO block is integrated from, or must be two, if there - are two separate interrupts, first one must be "mdio done" and second must be - for "mdio error" -- interrupt-names: must be "mdio_done_error" when there is a share interrupt fed - to this hardware block, or must be "mdio_done" for the first interrupt and - "mdio_error" for the second when there are separate interrupts -- clocks: A reference to the clock supplying the MDIO bus controller -- clock-frequency: the MDIO bus clock that must be output by the MDIO bus - hardware, if absent, the default hardware values are used - -Child nodes of this MDIO bus controller node are standard Ethernet PHY device -nodes as described in Documentation/devicetree/bindings/net/phy.txt - -Example: - -mdio@403c0 { - compatible = "brcm,unimac-mdio"; - reg = <0x403c0 0x8 0x40300 0x18>; - reg-names = "mdio", "mdio_indir_rw"; - #size-cells = <1>; - #address-cells = <0>; - - ... - phy@0 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <0>; - }; -};
Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.26.2
Quoted 10 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
This helps validating DTS files.
Introduced example binding changes:
1. Fixed reg formatting
2. Swapped #address-cells and #size-cells incorrect values
3. Renamed node: s/phy/ethernet-phy/Signed-off-by Rafał Miłecki <[email protected]>
Signature · 1 line
Florian
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Fri, 20 Aug 2021 18:15:33 +0200 you wrote:
From: Rafał Miłecki <[email protected]>
This helps validating DTS files.
Introduced example binding changes:
1. Fixed reg formatting
2. Swapped #address-cells and #size-cells incorrect values
3. Renamed node: s/phy/ethernet-phy/[...]
Here is the summary with links:
- [V2] dt-bindings: net: brcm,unimac-mdio: convert to the json-schema
https://git.kernel.org/netdev/net-next/c/5d1c5594b646
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html