Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: Convert AMAC to YAML

Convert the Broadcom AMAC Device Tree binding to YAML to help with
schema and dtbs checking.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211208202801.3706929-2-f.fainelli@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Florian Fainelli and committed by
Rob Herring
2371a03f 7675a1dc

+89 -31
-30
Documentation/devicetree/bindings/net/brcm,amac.txt
··· 1 - Broadcom AMAC Ethernet Controller Device Tree Bindings 2 - ------------------------------------------------------------- 3 - 4 - Required properties: 5 - - compatible: "brcm,amac" 6 - "brcm,nsp-amac" 7 - "brcm,ns2-amac" 8 - - reg: Address and length of the register set for the device. It 9 - contains the information of registers in the same order as 10 - described by reg-names 11 - - reg-names: Names of the registers. 12 - "amac_base": Address and length of the GMAC registers 13 - "idm_base": Address and length of the GMAC IDM registers 14 - (required for NSP and Northstar2) 15 - "nicpm_base": Address and length of the NIC Port Manager 16 - registers (required for Northstar2) 17 - - interrupts: Interrupt number 18 - 19 - The MAC address will be determined using the optional properties 20 - defined in ethernet.txt. 21 - 22 - Examples: 23 - 24 - amac0: ethernet@18022000 { 25 - compatible = "brcm,nsp-amac"; 26 - reg = <0x18022000 0x1000>, 27 - <0x18110000 0x1000>; 28 - reg-names = "amac_base", "idm_base"; 29 - interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>; 30 - };
+88
Documentation/devicetree/bindings/net/brcm,amac.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/net/brcm,amac.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Broadcom AMAC Ethernet Controller Device Tree Bindings 8 + 9 + maintainers: 10 + - Florian Fainelli <f.fainelli@gmail.com> 11 + 12 + allOf: 13 + - $ref: "ethernet-controller.yaml#" 14 + - if: 15 + properties: 16 + compatible: 17 + contains: 18 + enum: 19 + - brcm,amac 20 + then: 21 + properties: 22 + reg: 23 + maxItems: 2 24 + reg-names: 25 + maxItems: 2 26 + 27 + - if: 28 + properties: 29 + compatible: 30 + contains: 31 + enum: 32 + - brcm,nsp-amac 33 + then: 34 + properties: 35 + reg: 36 + minItems: 2 37 + maxItems: 2 38 + reg-names: 39 + minItems: 2 40 + maxItems: 2 41 + 42 + - if: 43 + properties: 44 + compatible: 45 + contains: 46 + enum: 47 + - brcm,ns2-amac 48 + then: 49 + properties: 50 + reg: 51 + minItems: 3 52 + reg-names: 53 + minItems: 3 54 + 55 + properties: 56 + compatible: 57 + enum: 58 + - brcm,amac 59 + - brcm,nsp-amac 60 + - brcm,ns2-amac 61 + 62 + interrupts: 63 + maxItems: 1 64 + 65 + reg: 66 + minItems: 1 67 + maxItems: 3 68 + 69 + reg-names: 70 + minItems: 1 71 + items: 72 + - const: amac_base 73 + - const: idm_base 74 + - const: nicpm_base 75 + 76 + unevaluatedProperties: false 77 + 78 + examples: 79 + - | 80 + #include <dt-bindings/interrupt-controller/arm-gic.h> 81 + 82 + amac0: ethernet@18022000 { 83 + compatible = "brcm,nsp-amac"; 84 + reg = <0x18022000 0x1000>, 85 + <0x18110000 0x1000>; 86 + reg-names = "amac_base", "idm_base"; 87 + interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>; 88 + };
+1 -1
MAINTAINERS
··· 3861 3861 M: bcm-kernel-feedback-list@broadcom.com 3862 3862 L: netdev@vger.kernel.org 3863 3863 S: Maintained 3864 - F: Documentation/devicetree/bindings/net/brcm,amac.txt 3864 + F: Documentation/devicetree/bindings/net/brcm,amac.yaml 3865 3865 F: drivers/net/ethernet/broadcom/bgmac* 3866 3866 F: drivers/net/ethernet/broadcom/unimac.h 3867 3867