2019-08-20 09:57:42 +02:00
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 BayLibre, SAS
%YAML 1.2
---
$id : "http://devicetree.org/schemas/net/amlogic,meson-dwmac.yaml#"
$schema : "http://devicetree.org/meta-schemas/core.yaml#"
title : Amlogic Meson DWMAC Ethernet controller
maintainers :
- Neil Armstrong <narmstrong@baylibre.com>
- Martin Blumenstingl <martin.blumenstingl@googlemail.com>
# We need a select here so we don't match all nodes with 'snps,dwmac'
select :
properties :
compatible :
contains :
enum :
- amlogic,meson6-dwmac
- amlogic,meson8b-dwmac
- amlogic,meson8m2-dwmac
- amlogic,meson-gxbb-dwmac
- amlogic,meson-axg-dwmac
2020-06-20 21:26:40 +02:00
- amlogic,meson-g12a-dwmac
2019-08-20 09:57:42 +02:00
required :
- compatible
allOf :
- $ref : "snps,dwmac.yaml#"
- if :
properties :
compatible :
contains :
enum :
- amlogic,meson8b-dwmac
- amlogic,meson8m2-dwmac
- amlogic,meson-gxbb-dwmac
- amlogic,meson-axg-dwmac
2020-06-20 21:26:40 +02:00
- amlogic,meson-g12a-dwmac
2019-08-20 09:57:42 +02:00
then :
properties :
clocks :
2020-05-12 23:10:57 +02:00
minItems : 3
maxItems : 4
2019-08-20 09:57:42 +02:00
items :
- description : GMAC main clock
- description : First parent clock of the internal mux
- description : Second parent clock of the internal mux
2020-05-12 23:10:57 +02:00
- description : The clock which drives the timing adjustment logic
2019-08-20 09:57:42 +02:00
clock-names :
minItems : 3
2020-05-12 23:10:57 +02:00
maxItems : 4
2019-08-20 09:57:42 +02:00
items :
- const : stmmaceth
- const : clkin0
- const : clkin1
2020-05-12 23:10:57 +02:00
- const : timing-adjustment
2019-08-20 09:57:42 +02:00
amlogic,tx-delay-ns :
2020-12-17 16:34:29 -06:00
$ref : /schemas/types.yaml#/definitions/uint32
2019-08-20 09:57:42 +02:00
description :
The internal RGMII TX clock delay (provided by this driver) in
nanoseconds. Allowed values are 0ns, 2ns, 4ns, 6ns.
When phy-mode is set to "rgmii" then the TX delay should be
explicitly configured. When not configured a fallback of 2ns is
used. When the phy-mode is set to either "rgmii-id" or "rgmii-txid"
the TX clock delay is already provided by the PHY. In that case
this property should be set to 0ns (which disables the TX clock
delay in the MAC to prevent the clock from going off because both
PHY and MAC are adding a delay).
Any configuration is ignored when the phy-mode is set to "rmii".
2020-05-12 23:10:56 +02:00
amlogic,rx-delay-ns :
2021-01-06 14:42:47 +01:00
deprecated : true
2020-05-12 23:10:56 +02:00
enum :
- 0
- 2
default : 0
description :
2021-01-06 14:42:47 +01:00
The internal RGMII RX clock delay in nanoseconds. Deprecated, use
rx-internal-delay-ps instead.
rx-internal-delay-ps :
default : 0
- if :
properties :
compatible :
contains :
enum :
- amlogic,meson8b-dwmac
- amlogic,meson8m2-dwmac
- amlogic,meson-gxbb-dwmac
- amlogic,meson-axg-dwmac
then :
properties :
rx-internal-delay-ps :
enum :
- 0
- 2000
- if :
properties :
compatible :
contains :
enum :
- amlogic,meson-g12a-dwmac
then :
properties :
rx-internal-delay-ps :
enum :
- 0
- 200
- 400
- 600
- 800
- 1000
- 1200
- 1400
- 1600
- 1800
- 2000
- 2200
- 2400
- 2600
- 2800
- 3000
2020-05-12 23:10:56 +02:00
2019-08-20 09:57:42 +02:00
properties :
compatible :
additionalItems : true
maxItems : 3
items :
- enum :
- amlogic,meson6-dwmac
- amlogic,meson8b-dwmac
- amlogic,meson8m2-dwmac
- amlogic,meson-gxbb-dwmac
- amlogic,meson-axg-dwmac
2020-06-20 21:26:40 +02:00
- amlogic,meson-g12a-dwmac
2019-08-20 09:57:42 +02:00
contains :
enum :
- snps,dwmac-3.70a
- snps,dwmac
reg :
items :
- description :
The first register range should be the one of the DWMAC controller
- description :
The second range is is for the Amlogic specific configuration
(for example the PRG_ETHERNET register range on Meson8b and newer)
required :
- compatible
- reg
- interrupts
- interrupt-names
- clocks
- clock-names
- phy-mode
2020-10-05 13:38:27 -05:00
unevaluatedProperties : false
2019-08-20 09:57:42 +02:00
examples :
- |
ethmac : ethernet@c9410000 {
compatible = "amlogic,meson-gxbb-dwmac", "snps,dwmac";
reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
interrupts = <8>;
interrupt-names = "macirq";
2020-05-12 23:10:57 +02:00
clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
2019-08-20 09:57:42 +02:00
phy-mode = "rgmii";
};