Beniamino Galvani | 318fd49 | 2014-09-20 15:29:17 +0200 | [diff] [blame] | 1 | * Amlogic Meson DWMAC Ethernet controller |
| 2 | |
| 3 | The device inherits all the properties of the dwmac/stmmac devices |
Martin Blumenstingl | 6aee159 | 2016-09-06 23:38:43 +0200 | [diff] [blame] | 4 | described in the file stmmac.txt in the current directory with the |
| 5 | following changes. |
Beniamino Galvani | 318fd49 | 2014-09-20 15:29:17 +0200 | [diff] [blame] | 6 | |
Martin Blumenstingl | 6aee159 | 2016-09-06 23:38:43 +0200 | [diff] [blame] | 7 | Required properties on all platforms: |
Beniamino Galvani | 318fd49 | 2014-09-20 15:29:17 +0200 | [diff] [blame] | 8 | |
Martin Blumenstingl | 6aee159 | 2016-09-06 23:38:43 +0200 | [diff] [blame] | 9 | - compatible: Depending on the platform this should be one of: |
| 10 | - "amlogic,meson6-dwmac" |
| 11 | - "amlogic,meson8b-dwmac" |
| 12 | - "amlogic,meson-gxbb-dwmac" |
Yixun Lan | 68f96e5 | 2018-04-28 10:21:10 +0000 | [diff] [blame] | 13 | - "amlogic,meson-axg-dwmac" |
Martin Blumenstingl | 6aee159 | 2016-09-06 23:38:43 +0200 | [diff] [blame] | 14 | Additionally "snps,dwmac" and any applicable more |
| 15 | detailed version number described in net/stmmac.txt |
| 16 | should be used. |
Beniamino Galvani | 318fd49 | 2014-09-20 15:29:17 +0200 | [diff] [blame] | 17 | |
Martin Blumenstingl | 6aee159 | 2016-09-06 23:38:43 +0200 | [diff] [blame] | 18 | - reg: The first register range should be the one of the DWMAC |
| 19 | controller. The second range is is for the Amlogic specific |
| 20 | configuration (for example the PRG_ETHERNET register range |
| 21 | on Meson8b and newer) |
Beniamino Galvani | 318fd49 | 2014-09-20 15:29:17 +0200 | [diff] [blame] | 22 | |
Martin Blumenstingl | 6aee159 | 2016-09-06 23:38:43 +0200 | [diff] [blame] | 23 | Required properties on Meson8b and newer: |
| 24 | - clock-names: Should contain the following: |
| 25 | - "stmmaceth" - see stmmac.txt |
| 26 | - "clkin0" - first parent clock of the internal mux |
| 27 | - "clkin1" - second parent clock of the internal mux |
| 28 | |
| 29 | |
| 30 | Example for Meson6: |
Beniamino Galvani | 318fd49 | 2014-09-20 15:29:17 +0200 | [diff] [blame] | 31 | |
| 32 | ethmac: ethernet@c9410000 { |
| 33 | compatible = "amlogic,meson6-dwmac", "snps,dwmac"; |
| 34 | reg = <0xc9410000 0x10000 |
| 35 | 0xc1108108 0x4>; |
| 36 | interrupts = <0 8 1>; |
| 37 | interrupt-names = "macirq"; |
| 38 | clocks = <&clk81>; |
| 39 | clock-names = "stmmaceth"; |
| 40 | } |
Martin Blumenstingl | 6aee159 | 2016-09-06 23:38:43 +0200 | [diff] [blame] | 41 | |
| 42 | Example for GXBB: |
| 43 | ethmac: ethernet@c9410000 { |
| 44 | compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac"; |
| 45 | reg = <0x0 0xc9410000 0x0 0x10000>, |
| 46 | <0x0 0xc8834540 0x0 0x8>; |
| 47 | interrupts = <0 8 1>; |
| 48 | interrupt-names = "macirq"; |
| 49 | clocks = <&clkc CLKID_ETH>, |
| 50 | <&clkc CLKID_FCLK_DIV2>, |
| 51 | <&clkc CLKID_MPLL2>; |
| 52 | clock-names = "stmmaceth", "clkin0", "clkin1"; |
| 53 | phy-mode = "rgmii"; |
| 54 | status = "disabled"; |
| 55 | }; |