AMAC and SYSTEMPORT bindings YAML conversion
Subsystems (5)
v4 cover AMAC and SYSTEMPORT bindings YAML conversion
Hi Rob,
Since the other patches have been applied to dt/next, here are the two that you requested changes to be made:
Changes in v4:
- updated AMAC to list all possible reg-names values and then use conditionals to adjust minItems/maxItems based upon the compatible string
- updated SYSTEMPORT to indicate the tx/rx queue range, drop unnecessary quotes and use unevaluatedProperties: false
Thanks!
Florian Fainelli (2):
dt-bindings: net: Convert AMAC to YAML
dt-bindings: net: Convert SYSTEMPORT to YAML
.../devicetree/bindings/net/brcm,amac.txt | 30 ------- .../devicetree/bindings/net/brcm,amac.yaml | 88 +++++++++++++++++++ .../bindings/net/brcm,systemport.txt | 38 -------- .../bindings/net/brcm,systemport.yaml | 88 +++++++++++++++++++ MAINTAINERS | 3 +- 5 files changed, 178 insertions(+), 69 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,amac.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,amac.yaml delete mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.yaml
Signature · 1 line
2.25.1
PATCH v4 1/2 dt-bindings: net: Convert AMAC to YAML
Convert the Broadcom AMAC Device Tree binding to YAML to help with schema and dtbs checking.
--- .../devicetree/bindings/net/brcm,amac.txt | 30 ------- .../devicetree/bindings/net/brcm,amac.yaml | 88 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 89 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,amac.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,amac.yaml
Documentation/devicetree/bindings/net/brcm,amac.txt deleted +0 -30
@@ -1,30 +0,0 @@ -Broadcom AMAC Ethernet Controller Device Tree Bindings -------------------------------------------------------------- - -Required properties: - - compatible: "brcm,amac" - "brcm,nsp-amac" - "brcm,ns2-amac" - - reg: Address and length of the register set for the device. It - contains the information of registers in the same order as - described by reg-names - - reg-names: Names of the registers. - "amac_base": Address and length of the GMAC registers - "idm_base": Address and length of the GMAC IDM registers - (required for NSP and Northstar2) - "nicpm_base": Address and length of the NIC Port Manager - registers (required for Northstar2) - - interrupts: Interrupt number - -The MAC address will be determined using the optional properties -defined in ethernet.txt. - -Examples: - -amac0: ethernet@18022000 { - compatible = "brcm,nsp-amac"; - reg = <0x18022000 0x1000>, - <0x18110000 0x1000>; - reg-names = "amac_base", "idm_base"; - interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>; -};
Documentation/devicetree/bindings/net/brcm,amac.yaml new file +88 -0
88 lines not on this page · raw message
MAINTAINERS +1 -1
@@ -3861,7 +3861,7 @@ M: Rafał Miłecki <[email protected]> M: [email protected] L: [email protected] S: Maintained -F: Documentation/devicetree/bindings/net/brcm,amac.txt +F: Documentation/devicetree/bindings/net/brcm,amac.yaml F: drivers/net/ethernet/broadcom/bgmac* F: drivers/net/ethernet/broadcom/unimac.h
Signature · 1 line
2.25.1
Re: [PATCH v4 1/2] dt-bindings: net: Convert AMAC to YAML
Quoted 12 lines · Florian Fainelli
Convert the Broadcom AMAC Device Tree binding to YAML to help with schema and dtbs checking.
Signed-off-by Florian Fainelli <[email protected]>--- .../devicetree/bindings/net/brcm,amac.txt | 30 ------- .../devicetree/bindings/net/brcm,amac.yaml | 88 +++++++++++++++++++ MAINTAINERS | 2 +- 3 files changed, 89 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,amac.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,amac.yaml
Applied, thanks!
PATCH v4 2/2 dt-bindings: net: Convert SYSTEMPORT to YAML
In reply to Florian FainelliConvert the Broadcom SYSTEMPORT Ethernet controller Device Tree binding to YAML.
--- .../bindings/net/brcm,systemport.txt | 38 -------- .../bindings/net/brcm,systemport.yaml | 88 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 89 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.yaml
Documentation/devicetree/bindings/net/brcm,systemport.txt deleted +0 -38
@@ -1,38 +0,0 @@ -* Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT) - -Required properties: -- compatible: should be one of: - "brcm,systemport-v1.00" - "brcm,systemportlite-v1.00" or - "brcm,systemport" -- reg: address and length of the register set for the device. -- interrupts: interrupts for the device, first cell must be for the rx - interrupts, and the second cell should be for the transmit queues. An - optional third interrupt cell for Wake-on-LAN can be specified -- local-mac-address: Ethernet MAC address (48 bits) of this adapter -- phy-mode: Should be a string describing the PHY interface to the - Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt -- fixed-link: see Documentation/devicetree/bindings/net/fixed-link.txt for - the property specific details - -Optional properties: -- systemport,num-tier2-arb: number of tier 2 arbiters, an integer -- systemport,num-tier1-arb: number of tier 1 arbiters, an integer -- systemport,num-txq: number of HW transmit queues, an integer -- systemport,num-rxq: number of HW receive queues, an integer -- clocks: When provided, must be two phandles to the functional clocks nodes of - the SYSTEMPORT block. The first phandle is the main SYSTEMPORT clock used - during normal operation, while the second phandle is the Wake-on-LAN clock. -- clock-names: When provided, names of the functional clock phandles, first - name should be "sw_sysport" and second should be "sw_sysportwol". - -Example: -ethernet@f04a0000 { - compatible = "brcm,systemport-v1.00"; - reg = <0xf04a0000 0x4650>; - local-mac-address = [ 00 11 22 33 44 55 ]; - fixed-link = <0 1 1000 0 0>; - phy-mode = "gmii"; - interrupts = <0x0 0x16 0x0>, - <0x0 0x17 0x0>; -};
Documentation/devicetree/bindings/net/brcm,systemport.yaml new file +88 -0
88 lines not on this page · raw message
MAINTAINERS +1 -0
@@ -3972,6 +3972,7 @@ L: [email protected] S: Supported F: drivers/net/ethernet/broadcom/bcmsysport.* F: drivers/net/ethernet/broadcom/unimac.h +F: Documentation/devicetree/bindings/net/brcm,systemport.yaml BROADCOM TG3 GIGABIT ETHERNET DRIVER M: Siva Reddy Kallam <[email protected]>
Signature · 1 line
2.25.1
Rob Herring
maintainerRe: [PATCH v4 2/2] dt-bindings: net: Convert SYSTEMPORT to YAML
Quoted 105 lines · Florian Fainelli
Convert the Broadcom SYSTEMPORT Ethernet controller Device Tree binding to YAML.
Signed-off-by Florian Fainelli <[email protected]>--- .../bindings/net/brcm,systemport.txt | 38 -------- .../bindings/net/brcm,systemport.yaml | 88 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 89 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.yamlDocumentation/devicetree/bindings/net/brcm,systemport.txt deleted +0
-38@@ -1,38 +0,0 @@ -* Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT) - -Required properties: -- compatible: should be one of: - "brcm,systemport-v1.00" - "brcm,systemportlite-v1.00" or - "brcm,systemport" -- reg: address and length of the register set for the device. -- interrupts: interrupts for the device, first cell must be for the rx - interrupts, and the second cell should be for the transmit queues. An - optional third interrupt cell for Wake-on-LAN can be specified -- local-mac-address: Ethernet MAC address (48 bits) of this adapter -- phy-mode: Should be a string describing the PHY interface to the - Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt -- fixed-link: see Documentation/devicetree/bindings/net/fixed-link.txt for - the property specific details - -Optional properties: -- systemport,num-tier2-arb: number of tier 2 arbiters, an integer -- systemport,num-tier1-arb: number of tier 1 arbiters, an integer -- systemport,num-txq: number of HW transmit queues, an integer -- systemport,num-rxq: number of HW receive queues, an integer -- clocks: When provided, must be two phandles to the functional clocks nodes of - the SYSTEMPORT block. The first phandle is the main SYSTEMPORT clock used - during normal operation, while the second phandle is the Wake-on-LAN clock. -- clock-names: When provided, names of the functional clock phandles, first - name should be "sw_sysport" and second should be "sw_sysportwol". - -Example: -ethernet@f04a0000 { - compatible = "brcm,systemport-v1.00"; - reg = <0xf04a0000 0x4650>; - local-mac-address = [ 00 11 22 33 44 55 ]; - fixed-link = <0 1 1000 0 0>; - phy-mode = "gmii"; - interrupts = <0x0 0x16 0x0>, - <0x0 0x17 0x0>; -};Documentation/devicetree/bindings/net/brcm,systemport.yaml new file +43
-0@@ -0,0 +1,88 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/brcm,systemport.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT) + +maintainers: + - Florian Fainelli <[email protected]> + +properties: + compatible: + enum: + - brcm,systemport-v1.00 + - brcm,systemportlite-v1.00 + - brcm,systemport + + reg: + maxItems: 1 + + interrupts: + minItems: 2 + items: + - description: interrupt line for RX queues + - description: interrupt line for TX queues + - description: interrupt line for Wake-on-LAN + + clocks: + items: + - description: main clock + - description: Wake-on-LAN clock + + clock-names: + items: + - const: sw_sysport + - const: sw_sysportwol + + systemport,num-tier2-arb: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of tier 2 arbiters +
Documentation/devicetree/bindings/net/brcm,systemport.yaml line 53
Quoted 10 lines
Documentation/devicetree/bindings/net/brcm,systemport.yaml new file +10
-0+ systemport,num-tier1-arb: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of tier 2 arbiters + + systemport,num-txq: + $ref: /schemas/types.yaml#/definitions/uint32 + items: + - minimum: 1 + - maximum: 32
This says you have an array of 2 entries. I'll fix up.
Quoted 51 lines
Documentation/devicetree/bindings/net/brcm,systemport.yaml new file +35
-0+ description: + Number of HW transmit queues + + systemport,num-rxq: + $ref: /schemas/types.yaml#/definitions/uint32 + items: + - minimum: 1 + - maximum: 32 + description: + Number of HW receive queues + +required: + - reg + - interrupts + - phy-mode + +allOf: + - $ref: "ethernet-controller.yaml#" + +unevaluatedProperties: false + +examples: + - | + ethernet@f04a0000 { + compatible = "brcm,systemport-v1.00"; + reg = <0xf04a0000 0x4650>; + local-mac-address = [ 00 11 22 33 44 55 ]; + phy-mode = "gmii"; + interrupts = <0x0 0x16 0x0>, + <0x0 0x17 0x0>; + fixed-link { + speed = <1000>; + full-duplex; + }; + };MAINTAINERS +1
-0@@ -3972,6 +3972,7 @@ L: [email protected] S: Supported F: drivers/net/ethernet/broadcom/bcmsysport.* F: drivers/net/ethernet/broadcom/unimac.h +F: Documentation/devicetree/bindings/net/brcm,systemport.yaml BROADCOM TG3 GIGABIT ETHERNET DRIVER M: Siva Reddy Kallam <[email protected]>Signature · 1 line
2.25.1
Re: [PATCH v4 2/2] dt-bindings: net: Convert SYSTEMPORT to YAML
In reply to Florian FainelliQuoted 12 lines · Florian Fainelli
Convert the Broadcom SYSTEMPORT Ethernet controller Device Tree binding to YAML.
Signed-off-by Florian Fainelli <[email protected]>--- .../bindings/net/brcm,systemport.txt | 38 -------- .../bindings/net/brcm,systemport.yaml | 88 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 89 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.yaml
Applied, thanks!
Re: [PATCH v4 2/2] dt-bindings: net: Convert SYSTEMPORT to YAML
Quoted 14 lines · Rob Herring
Quoted 12 lines · Florian Fainelli
Convert the Broadcom SYSTEMPORT Ethernet controller Device Tree binding to YAML.
Signed-off-by Florian Fainelli <[email protected]>--- .../bindings/net/brcm,systemport.txt | 38 -------- .../bindings/net/brcm,systemport.yaml | 88 +++++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 89 insertions(+), 38 deletions(-) delete mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.txt create mode 100644 Documentation/devicetree/bindings/net/brcm,systemport.yaml
Quoted 1 line
Applied, thanks!
Thanks for applying the patches and fixing up my mistakes in the process.
Signature · 1 line
Florian