137a2fce0SSimon Horman# SPDX-License-Identifier: GPL-2.0
237a2fce0SSimon Horman%YAML 1.2
337a2fce0SSimon Horman---
437a2fce0SSimon Horman$id: http://devicetree.org/schemas/net/renesas,ether.yaml#
537a2fce0SSimon Horman$schema: http://devicetree.org/meta-schemas/core.yaml#
637a2fce0SSimon Horman
737a2fce0SSimon Hormantitle: Renesas Electronics SH EtherMAC
837a2fce0SSimon Horman
937a2fce0SSimon HormanallOf:
1037a2fce0SSimon Horman  - $ref: ethernet-controller.yaml#
1137a2fce0SSimon Horman
1237a2fce0SSimon Hormanmaintainers:
13d5b3bd6aSGeert Uytterhoeven  - Sergei Shtylyov <sergei.shtylyov@gmail.com>
1437a2fce0SSimon Horman
1537a2fce0SSimon Hormanproperties:
1637a2fce0SSimon Horman  compatible:
1737a2fce0SSimon Horman    oneOf:
1837a2fce0SSimon Horman      - items:
1937a2fce0SSimon Horman          - enum:
2037a2fce0SSimon Horman              - renesas,gether-r8a7740   # device is a part of R8A7740 SoC
2137a2fce0SSimon Horman              - renesas,gether-r8a77980  # device is a part of R8A77980 SoC
2237a2fce0SSimon Horman              - renesas,ether-r7s72100   # device is a part of R7S72100 SoC
2337a2fce0SSimon Horman              - renesas,ether-r7s9210    # device is a part of R7S9210 SoC
2437a2fce0SSimon Horman      - items:
2537a2fce0SSimon Horman          - enum:
2637a2fce0SSimon Horman              - renesas,ether-r8a7778    # device is a part of R8A7778 SoC
2737a2fce0SSimon Horman              - renesas,ether-r8a7779    # device is a part of R8A7779 SoC
2837a2fce0SSimon Horman          - enum:
2937a2fce0SSimon Horman              - renesas,rcar-gen1-ether  # a generic R-Car Gen1 device
3037a2fce0SSimon Horman      - items:
3137a2fce0SSimon Horman          - enum:
3275d728edSLad Prabhakar              - renesas,ether-r8a7742    # device is a part of R8A7742 SoC
3337a2fce0SSimon Horman              - renesas,ether-r8a7743    # device is a part of R8A7743 SoC
34f678d218SLad Prabhakar              - renesas,ether-r8a7745    # device is a part of R8A7745 SoC
3537a2fce0SSimon Horman              - renesas,ether-r8a7790    # device is a part of R8A7790 SoC
3637a2fce0SSimon Horman              - renesas,ether-r8a7791    # device is a part of R8A7791 SoC
3737a2fce0SSimon Horman              - renesas,ether-r8a7793    # device is a part of R8A7793 SoC
3837a2fce0SSimon Horman              - renesas,ether-r8a7794    # device is a part of R8A7794 SoC
3937a2fce0SSimon Horman          - enum:
4037a2fce0SSimon Horman              - renesas,rcar-gen2-ether  # a generic R-Car Gen2 or RZ/G1 device
4137a2fce0SSimon Horman
4237a2fce0SSimon Horman  reg:
4337a2fce0SSimon Horman    items:
4437a2fce0SSimon Horman      - description: E-DMAC/feLic registers
4537a2fce0SSimon Horman      - description: TSU registers
4637a2fce0SSimon Horman    minItems: 1
4737a2fce0SSimon Horman
4837a2fce0SSimon Horman  interrupts:
4937a2fce0SSimon Horman    maxItems: 1
5037a2fce0SSimon Horman
5137a2fce0SSimon Horman  '#address-cells':
5237a2fce0SSimon Horman    description: number of address cells for the MDIO bus
5337a2fce0SSimon Horman    const: 1
5437a2fce0SSimon Horman
5537a2fce0SSimon Horman  '#size-cells':
5637a2fce0SSimon Horman    description: number of size cells on the MDIO bus
5737a2fce0SSimon Horman    const: 0
5837a2fce0SSimon Horman
5937a2fce0SSimon Horman  clocks:
6037a2fce0SSimon Horman    maxItems: 1
6137a2fce0SSimon Horman
6241506bffSGeert Uytterhoeven  power-domains:
6341506bffSGeert Uytterhoeven    maxItems: 1
6437a2fce0SSimon Horman
6541506bffSGeert Uytterhoeven  resets:
6641506bffSGeert Uytterhoeven    maxItems: 1
6741506bffSGeert Uytterhoeven
6841506bffSGeert Uytterhoeven  phy-mode: true
6941506bffSGeert Uytterhoeven
7041506bffSGeert Uytterhoeven  phy-handle: true
7137a2fce0SSimon Horman
7237a2fce0SSimon Horman  renesas,no-ether-link:
7337a2fce0SSimon Horman    type: boolean
7437a2fce0SSimon Horman    description:
7537a2fce0SSimon Horman      specify when a board does not provide a proper Ether LINK signal
7637a2fce0SSimon Horman
7737a2fce0SSimon Horman  renesas,ether-link-active-low:
7837a2fce0SSimon Horman    type: boolean
7937a2fce0SSimon Horman    description:
8037a2fce0SSimon Horman      specify when the Ether LINK signal is active-low instead of normal
8137a2fce0SSimon Horman      active-high
8237a2fce0SSimon Horman
8341506bffSGeert UytterhoevenpatternProperties:
8441506bffSGeert Uytterhoeven  "^ethernet-phy@[0-9a-f]$":
8541506bffSGeert Uytterhoeven    type: object
8641506bffSGeert Uytterhoeven    $ref: ethernet-phy.yaml#
8741506bffSGeert Uytterhoeven
8837a2fce0SSimon Hormanrequired:
8937a2fce0SSimon Horman  - compatible
9037a2fce0SSimon Horman  - reg
9137a2fce0SSimon Horman  - interrupts
9237a2fce0SSimon Horman  - phy-mode
9337a2fce0SSimon Horman  - phy-handle
9437a2fce0SSimon Horman  - '#address-cells'
9537a2fce0SSimon Horman  - '#size-cells'
9637a2fce0SSimon Horman  - clocks
9741506bffSGeert Uytterhoeven
9841506bffSGeert UytterhoevenadditionalProperties: false
9937a2fce0SSimon Horman
10037a2fce0SSimon Hormanexamples:
10137a2fce0SSimon Horman  # Lager board
10237a2fce0SSimon Horman  - |
103*63b1bae9SGeert Uytterhoeven    #include <dt-bindings/clock/r8a7790-cpg-mssr.h>
104*63b1bae9SGeert Uytterhoeven    #include <dt-bindings/interrupt-controller/arm-gic.h>
105*63b1bae9SGeert Uytterhoeven    #include <dt-bindings/power/r8a7790-sysc.h>
106*63b1bae9SGeert Uytterhoeven    #include <dt-bindings/gpio/gpio.h>
10737a2fce0SSimon Horman
10837a2fce0SSimon Horman    ethernet@ee700000 {
10937a2fce0SSimon Horman        compatible = "renesas,ether-r8a7790", "renesas,rcar-gen2-ether";
110fba56184SRob Herring        reg = <0xee700000 0x400>;
111*63b1bae9SGeert Uytterhoeven        interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
112*63b1bae9SGeert Uytterhoeven        clocks = <&cpg CPG_MOD 813>;
113*63b1bae9SGeert Uytterhoeven        power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
114*63b1bae9SGeert Uytterhoeven        resets = <&cpg 813>;
11537a2fce0SSimon Horman        phy-mode = "rmii";
11637a2fce0SSimon Horman        phy-handle = <&phy1>;
11737a2fce0SSimon Horman        renesas,ether-link-active-low;
11837a2fce0SSimon Horman        #address-cells = <1>;
11937a2fce0SSimon Horman        #size-cells = <0>;
12037a2fce0SSimon Horman
12137a2fce0SSimon Horman        phy1: ethernet-phy@1 {
122*63b1bae9SGeert Uytterhoeven            compatible = "ethernet-phy-id0022.1537",
123*63b1bae9SGeert Uytterhoeven                         "ethernet-phy-ieee802.3-c22";
12437a2fce0SSimon Horman            reg = <1>;
12537a2fce0SSimon Horman            interrupt-parent = <&irqc0>;
12637a2fce0SSimon Horman            interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
127*63b1bae9SGeert Uytterhoeven            micrel,led-mode = <1>;
128*63b1bae9SGeert Uytterhoeven            reset-gpios = <&gpio5 31 GPIO_ACTIVE_LOW>;
12937a2fce0SSimon Horman        };
13037a2fce0SSimon Horman    };
131