Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 1 | * Broadcom BCM7xxx Ethernet Controller (GENET) |
| 2 | |
| 3 | Required properties: |
| 4 | - compatible: should contain one of "brcm,genet-v1", "brcm,genet-v2", |
Stefan Wahren | f7bda51 | 2019-11-11 20:49:22 +0100 | [diff] [blame] | 5 | "brcm,genet-v3", "brcm,genet-v4", "brcm,genet-v5", "brcm,bcm2711-genet-v5". |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 6 | - reg: address and length of the register set for the device |
Doug Berger | 7583569 | 2017-03-13 17:41:40 -0700 | [diff] [blame] | 7 | - interrupts and/or interrupts-extended: must be two cells, the first cell |
| 8 | is the general purpose interrupt line, while the second cell is the |
| 9 | interrupt for the ring RX and TX queues operating in ring mode. An |
| 10 | optional third interrupt cell for Wake-on-LAN can be specified. |
| 11 | See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt |
| 12 | for information on the property specifics. |
Sergei Shtylyov | e8f08ee | 2014-02-18 02:41:59 +0300 | [diff] [blame] | 13 | - phy-mode: see ethernet.txt file in the same directory |
Florian Fainelli | 9e5f040 | 2014-02-18 14:36:15 -0800 | [diff] [blame] | 14 | - #address-cells: should be 1 |
| 15 | - #size-cells: should be 1 |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 16 | |
| 17 | Optional properties: |
Florian Fainelli | d94b27c | 2014-02-14 15:21:42 -0800 | [diff] [blame] | 18 | - clocks: When provided, must be two phandles to the functional clocks nodes |
| 19 | of the GENET block. The first phandle is the main GENET clock used during |
| 20 | normal operation, while the second phandle is the Wake-on-LAN clock. |
| 21 | - clock-names: When provided, names of the functional clock phandles, first |
| 22 | name should be "enet" and second should be "enet-wol". |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 23 | |
Sergei Shtylyov | e8f08ee | 2014-02-18 02:41:59 +0300 | [diff] [blame] | 24 | - phy-handle: See ethernet.txt file in the same directory; used to describe |
| 25 | configurations where a PHY (internal or external) is used. |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 26 | |
| 27 | - fixed-link: When the GENET interface is connected to a MoCA hardware block or |
| 28 | when operating in a RGMII to RGMII type of connection, or when the MDIO bus is |
| 29 | voluntarily disabled, this property should be used to describe the "fixed link". |
Florian Fainelli | ae21888 | 2014-05-22 09:47:44 -0700 | [diff] [blame] | 30 | See Documentation/devicetree/bindings/net/fixed-link.txt for information on |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 31 | the property specifics |
| 32 | |
| 33 | Required child nodes: |
| 34 | |
Doug Berger | 0ce5aa1 | 2017-03-13 17:41:41 -0700 | [diff] [blame] | 35 | - mdio bus node: this node should always be present regardless of the PHY |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 36 | configuration of the GENET instance |
| 37 | |
| 38 | MDIO bus node required properties: |
| 39 | |
| 40 | - compatible: should contain one of "brcm,genet-mdio-v1", "brcm,genet-mdio-v2" |
Doug Berger | 0ce5aa1 | 2017-03-13 17:41:41 -0700 | [diff] [blame] | 41 | "brcm,genet-mdio-v3", "brcm,genet-mdio-v4", "brcm,genet-mdio-v5", the version |
| 42 | has to match the parent node compatible property (e.g: brcm,genet-v4 pairs |
| 43 | with brcm,genet-mdio-v4) |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 44 | - reg: address and length relative to the parent node base register address |
Florian Fainelli | 9e5f040 | 2014-02-18 14:36:15 -0800 | [diff] [blame] | 45 | - #address-cells: address cell for MDIO bus addressing, should be 1 |
| 46 | - #size-cells: size of the cells for MDIO bus addressing, should be 0 |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 47 | |
| 48 | Ethernet PHY node properties: |
| 49 | |
| 50 | See Documentation/devicetree/bindings/net/phy.txt for the list of required and |
| 51 | optional properties. |
| 52 | |
| 53 | Internal Gigabit PHY example: |
| 54 | |
| 55 | ethernet@f0b60000 { |
| 56 | phy-mode = "internal"; |
| 57 | phy-handle = <&phy1>; |
| 58 | mac-address = [ 00 10 18 36 23 1a ]; |
| 59 | compatible = "brcm,genet-v4"; |
| 60 | #address-cells = <0x1>; |
| 61 | #size-cells = <0x1>; |
| 62 | reg = <0xf0b60000 0xfc4c>; |
| 63 | interrupts = <0x0 0x14 0x0>, <0x0 0x15 0x0>; |
| 64 | |
| 65 | mdio@e14 { |
| 66 | compatible = "brcm,genet-mdio-v4"; |
| 67 | #address-cells = <0x1>; |
| 68 | #size-cells = <0x0>; |
| 69 | reg = <0xe14 0x8>; |
| 70 | |
| 71 | phy1: ethernet-phy@1 { |
| 72 | max-speed = <1000>; |
| 73 | reg = <0x1>; |
Andrew Lunn | e4bf797 | 2016-01-28 02:30:30 +0100 | [diff] [blame] | 74 | compatible = "ethernet-phy-ieee802.3-c22"; |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 75 | }; |
| 76 | }; |
| 77 | }; |
| 78 | |
| 79 | MoCA interface / MAC to MAC example: |
| 80 | |
| 81 | ethernet@f0b80000 { |
| 82 | phy-mode = "moca"; |
| 83 | fixed-link = <1 0 1000 0 0>; |
| 84 | mac-address = [ 00 10 18 36 24 1a ]; |
| 85 | compatible = "brcm,genet-v4"; |
| 86 | #address-cells = <0x1>; |
| 87 | #size-cells = <0x1>; |
| 88 | reg = <0xf0b80000 0xfc4c>; |
| 89 | interrupts = <0x0 0x16 0x0>, <0x0 0x17 0x0>; |
| 90 | |
| 91 | mdio@e14 { |
| 92 | compatible = "brcm,genet-mdio-v4"; |
| 93 | #address-cells = <0x1>; |
| 94 | #size-cells = <0x0>; |
| 95 | reg = <0xe14 0x8>; |
| 96 | }; |
| 97 | }; |
| 98 | |
| 99 | |
| 100 | External MDIO-connected Gigabit PHY/switch: |
| 101 | |
| 102 | ethernet@f0ba0000 { |
| 103 | phy-mode = "rgmii"; |
| 104 | phy-handle = <&phy0>; |
| 105 | mac-address = [ 00 10 18 36 26 1a ]; |
| 106 | compatible = "brcm,genet-v4"; |
| 107 | #address-cells = <0x1>; |
| 108 | #size-cells = <0x1>; |
| 109 | reg = <0xf0ba0000 0xfc4c>; |
| 110 | interrupts = <0x0 0x18 0x0>, <0x0 0x19 0x0>; |
| 111 | |
Marco Franchi | 48c926c | 2017-11-08 14:27:48 -0200 | [diff] [blame] | 112 | mdio@e14 { |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 113 | compatible = "brcm,genet-mdio-v4"; |
| 114 | #address-cells = <0x1>; |
| 115 | #size-cells = <0x0>; |
| 116 | reg = <0xe14 0x8>; |
| 117 | |
| 118 | phy0: ethernet-phy@0 { |
| 119 | max-speed = <1000>; |
| 120 | reg = <0x0>; |
Andrew Lunn | e4bf797 | 2016-01-28 02:30:30 +0100 | [diff] [blame] | 121 | compatible = "ethernet-phy-ieee802.3-c22"; |
Florian Fainelli | aab5127 | 2014-02-13 16:08:50 -0800 | [diff] [blame] | 122 | }; |
| 123 | }; |
| 124 | }; |