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

dt-bindings: net: Convert GENET binding to YAML

Convert the GENET binding to YAML, leveraging brcm,unimac-mdio.yaml and
the standard ethernet-controller.yaml files.

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

authored by

Florian Fainelli and committed by
Rob Herring
3a470447 68dfc226

+146 -126
-125
Documentation/devicetree/bindings/net/brcm,bcmgenet.txt
··· 1 - * Broadcom BCM7xxx Ethernet Controller (GENET) 2 - 3 - Required properties: 4 - - compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2", 5 - "brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5", "brcm,bcm2711-genet-v5" or 6 - "brcm,bcm7712-genet-v5". 7 - - reg: address and length of the register set for the device 8 - - interrupts and/or interrupts-extended: must be two cells, the first cell 9 - is the general purpose interrupt line, while the second cell is the 10 - interrupt for the ring RX and TX queues operating in ring mode. An 11 - optional third interrupt cell for Wake-on-LAN can be specified. 12 - See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt 13 - for information on the property specifics. 14 - - phy-mode: see ethernet.txt file in the same directory 15 - - #address-cells: should be 1 16 - - #size-cells: should be 1 17 - 18 - Optional properties: 19 - - clocks: When provided, must be two phandles to the functional clocks nodes 20 - of the GENET block. The first phandle is the main GENET clock used during 21 - normal operation, while the second phandle is the Wake-on-LAN clock. 22 - - clock-names: When provided, names of the functional clock phandles, first 23 - name should be "enet" and second should be "enet-wol". 24 - 25 - - phy-handle: See ethernet.txt file in the same directory; used to describe 26 - configurations where a PHY (internal or external) is used. 27 - 28 - - fixed-link: When the GENET interface is connected to a MoCA hardware block or 29 - when operating in a RGMII to RGMII type of connection, or when the MDIO bus is 30 - voluntarily disabled, this property should be used to describe the "fixed link". 31 - See Documentation/devicetree/bindings/net/fixed-link.txt for information on 32 - the property specifics 33 - 34 - Required child nodes: 35 - 36 - - mdio bus node: this node should always be present regardless of the PHY 37 - configuration of the GENET instance 38 - 39 - MDIO bus node required properties: 40 - 41 - - compatible: should contain one of "brcm,genet-mdio-v1", "brcm,genet-mdio-v2" 42 - "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5", the version 43 - has to match the parent node compatible property (e.g: brcm,genet-v4 pairs 44 - with brcm,genet-mdio-v4) 45 - - reg: address and length relative to the parent node base register address 46 - - #address-cells: address cell for MDIO bus addressing, should be 1 47 - - #size-cells: size of the cells for MDIO bus addressing, should be 0 48 - 49 - Ethernet PHY node properties: 50 - 51 - See Documentation/devicetree/bindings/net/phy.txt for the list of required and 52 - optional properties. 53 - 54 - Internal Gigabit PHY example: 55 - 56 - ethernet@f0b60000 { 57 - phy-mode = "internal"; 58 - phy-handle = <&phy1>; 59 - mac-address = [ 00 10 18 36 23 1a ]; 60 - compatible = "brcm,genet-v4"; 61 - #address-cells = <0x1>; 62 - #size-cells = <0x1>; 63 - reg = <0xf0b60000 0xfc4c>; 64 - interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>; 65 - 66 - mdio@e14 { 67 - compatible = "brcm,genet-mdio-v4"; 68 - #address-cells = <0x1>; 69 - #size-cells = <0x0>; 70 - reg = <0xe14 0x8>; 71 - 72 - phy1: ethernet-phy@1 { 73 - max-speed = <1000>; 74 - reg = <0x1>; 75 - compatible = "ethernet-phy-ieee802.3-c22"; 76 - }; 77 - }; 78 - }; 79 - 80 - MoCA interface / MAC to MAC example: 81 - 82 - ethernet@f0b80000 { 83 - phy-mode = "moca"; 84 - fixed-link = <1 0 1000 0 0>; 85 - mac-address = [ 00 10 18 36 24 1a ]; 86 - compatible = "brcm,genet-v4"; 87 - #address-cells = <0x1>; 88 - #size-cells = <0x1>; 89 - reg = <0xf0b80000 0xfc4c>; 90 - interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>; 91 - 92 - mdio@e14 { 93 - compatible = "brcm,genet-mdio-v4"; 94 - #address-cells = <0x1>; 95 - #size-cells = <0x0>; 96 - reg = <0xe14 0x8>; 97 - }; 98 - }; 99 - 100 - 101 - External MDIO-connected Gigabit PHY/switch: 102 - 103 - ethernet@f0ba0000 { 104 - phy-mode = "rgmii"; 105 - phy-handle = <&phy0>; 106 - mac-address = [ 00 10 18 36 26 1a ]; 107 - compatible = "brcm,genet-v4"; 108 - #address-cells = <0x1>; 109 - #size-cells = <0x1>; 110 - reg = <0xf0ba0000 0xfc4c>; 111 - interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>; 112 - 113 - mdio@e14 { 114 - compatible = "brcm,genet-mdio-v4"; 115 - #address-cells = <0x1>; 116 - #size-cells = <0x0>; 117 - reg = <0xe14 0x8>; 118 - 119 - phy0: ethernet-phy@0 { 120 - max-speed = <1000>; 121 - reg = <0x0>; 122 - compatible = "ethernet-phy-ieee802.3-c22"; 123 - }; 124 - }; 125 - };
+145
Documentation/devicetree/bindings/net/brcm,bcmgenet.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,bcmgenet.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Broadcom BCM7xxx Ethernet Controller (GENET) binding 8 + 9 + maintainers: 10 + - Doug Berger <opendmb@gmail.com> 11 + - Florian Fainelli <f.fainelli@gmail.com> 12 + 13 + properties: 14 + compatible: 15 + enum: 16 + - brcm,genet-v1 17 + - brcm,genet-v2 18 + - brcm,genet-v3 19 + - brcm,genet-v4 20 + - brcm,genet-v5 21 + - brcm,bcm2711-genet-v5 22 + - brcm,bcm7712-genet-v5 23 + 24 + reg: 25 + maxItems: 1 26 + 27 + interrupts: 28 + minItems: 2 29 + items: 30 + - description: general purpose interrupt line 31 + - description: RX and TX rings interrupt line 32 + - description: Wake-on-LAN interrupt line 33 + 34 + 35 + clocks: 36 + minItems: 1 37 + items: 38 + - description: main clock 39 + - description: EEE clock 40 + - description: Wake-on-LAN clock 41 + 42 + clock-names: 43 + minItems: 1 44 + items: 45 + - const: enet 46 + - const: enet-eee 47 + - const: enet-wol 48 + 49 + "#address-cells": 50 + const: 1 51 + 52 + "#size-cells": 53 + const: 1 54 + 55 + patternProperties: 56 + "^mdio@[0-9a-f]+$": 57 + type: object 58 + $ref: "brcm,unimac-mdio.yaml" 59 + 60 + description: 61 + GENET internal UniMAC MDIO bus 62 + 63 + required: 64 + - reg 65 + - interrupts 66 + - phy-mode 67 + - "#address-cells" 68 + - "#size-cells" 69 + 70 + allOf: 71 + - $ref: ethernet-controller.yaml 72 + 73 + unevaluatedProperties: false 74 + 75 + examples: 76 + #include <dt-bindings/interrupt-controller/arm-gic.h> 77 + 78 + - | 79 + ethernet@f0b60000 { 80 + phy-mode = "internal"; 81 + phy-handle = <&phy1>; 82 + mac-address = [ 00 10 18 36 23 1a ]; 83 + compatible = "brcm,genet-v4"; 84 + reg = <0xf0b60000 0xfc4c>; 85 + interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>; 86 + #address-cells = <1>; 87 + #size-cells = <1>; 88 + 89 + mdio0: mdio@e14 { 90 + compatible = "brcm,genet-mdio-v4"; 91 + #address-cells = <1>; 92 + #size-cells = <0>; 93 + reg = <0xe14 0x8>; 94 + 95 + phy1: ethernet-phy@1 { 96 + max-speed = <1000>; 97 + reg = <1>; 98 + compatible = "ethernet-phy-ieee802.3-c22"; 99 + }; 100 + }; 101 + }; 102 + 103 + - | 104 + ethernet@f0b80000 { 105 + phy-mode = "moca"; 106 + fixed-link = <1 0 1000 0 0>; 107 + mac-address = [ 00 10 18 36 24 1a ]; 108 + compatible = "brcm,genet-v4"; 109 + #address-cells = <1>; 110 + #size-cells = <1>; 111 + reg = <0xf0b80000 0xfc4c>; 112 + interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>; 113 + 114 + mdio1: mdio@e14 { 115 + compatible = "brcm,genet-mdio-v4"; 116 + #address-cells = <1>; 117 + #size-cells = <0>; 118 + reg = <0xe14 0x8>; 119 + }; 120 + }; 121 + 122 + - | 123 + ethernet@f0ba0000 { 124 + phy-mode = "rgmii"; 125 + phy-handle = <&phy0>; 126 + mac-address = [ 00 10 18 36 26 1a ]; 127 + compatible = "brcm,genet-v4"; 128 + #address-cells = <1>; 129 + #size-cells = <1>; 130 + reg = <0xf0ba0000 0xfc4c>; 131 + interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>; 132 + 133 + mdio2: mdio@e14 { 134 + compatible = "brcm,genet-mdio-v4"; 135 + #address-cells = <1>; 136 + #size-cells = <0>; 137 + reg = <0xe14 0x8>; 138 + 139 + phy0: ethernet-phy@0 { 140 + max-speed = <1000>; 141 + reg = <0>; 142 + compatible = "ethernet-phy-ieee802.3-c22"; 143 + }; 144 + }; 145 + };
+1 -1
MAINTAINERS
··· 3819 3819 L: bcm-kernel-feedback-list@broadcom.com 3820 3820 L: netdev@vger.kernel.org 3821 3821 S: Supported 3822 - F: Documentation/devicetree/bindings/net/brcm,bcmgenet.txt 3822 + F: Documentation/devicetree/bindings/net/brcm,bcmgenet.yaml 3823 3823 F: Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml 3824 3824 F: drivers/net/ethernet/broadcom/genet/ 3825 3825 F: drivers/net/ethernet/broadcom/unimac.h