10cfeca62SWells Lu# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 20cfeca62SWells Lu# Copyright (C) Sunplus Co., Ltd. 2021 30cfeca62SWells Lu%YAML 1.2 40cfeca62SWells Lu--- 50cfeca62SWells Lu$id: http://devicetree.org/schemas/net/sunplus,sp7021-emac.yaml# 60cfeca62SWells Lu$schema: http://devicetree.org/meta-schemas/core.yaml# 70cfeca62SWells Lu 80cfeca62SWells Lutitle: Sunplus SP7021 Dual Ethernet MAC 90cfeca62SWells Lu 100cfeca62SWells Lumaintainers: 110cfeca62SWells Lu - Wells Lu <wellslutw@gmail.com> 120cfeca62SWells Lu 130cfeca62SWells Ludescription: | 140cfeca62SWells Lu Sunplus SP7021 dual 10M/100M Ethernet MAC controller. 150cfeca62SWells Lu Device node of the controller has following properties. 160cfeca62SWells Lu 170cfeca62SWells Luproperties: 180cfeca62SWells Lu compatible: 190cfeca62SWells Lu const: sunplus,sp7021-emac 200cfeca62SWells Lu 210cfeca62SWells Lu reg: 220cfeca62SWells Lu maxItems: 1 230cfeca62SWells Lu 240cfeca62SWells Lu interrupts: 250cfeca62SWells Lu maxItems: 1 260cfeca62SWells Lu 270cfeca62SWells Lu clocks: 280cfeca62SWells Lu maxItems: 1 290cfeca62SWells Lu 300cfeca62SWells Lu resets: 310cfeca62SWells Lu maxItems: 1 320cfeca62SWells Lu 330cfeca62SWells Lu ethernet-ports: 340cfeca62SWells Lu type: object 35*057062adSRob Herring additionalProperties: false 360cfeca62SWells Lu description: Ethernet ports to PHY 370cfeca62SWells Lu 380cfeca62SWells Lu properties: 390cfeca62SWells Lu "#address-cells": 400cfeca62SWells Lu const: 1 410cfeca62SWells Lu 420cfeca62SWells Lu "#size-cells": 430cfeca62SWells Lu const: 0 440cfeca62SWells Lu 450cfeca62SWells Lu patternProperties: 460cfeca62SWells Lu "^port@[0-1]$": 470cfeca62SWells Lu type: object 48*057062adSRob Herring additionalProperties: false 490cfeca62SWells Lu description: Port to PHY 500cfeca62SWells Lu 510cfeca62SWells Lu properties: 520cfeca62SWells Lu reg: 530cfeca62SWells Lu minimum: 0 540cfeca62SWells Lu maximum: 1 550cfeca62SWells Lu 560cfeca62SWells Lu phy-handle: 570cfeca62SWells Lu maxItems: 1 580cfeca62SWells Lu 590cfeca62SWells Lu phy-mode: 600cfeca62SWells Lu maxItems: 1 610cfeca62SWells Lu 620cfeca62SWells Lu nvmem-cells: 630cfeca62SWells Lu items: 640cfeca62SWells Lu - description: nvmem cell address of MAC address 650cfeca62SWells Lu 660cfeca62SWells Lu nvmem-cell-names: 670cfeca62SWells Lu description: names corresponding to the nvmem cells 680cfeca62SWells Lu items: 690cfeca62SWells Lu - const: mac-address 700cfeca62SWells Lu 710cfeca62SWells Lu required: 720cfeca62SWells Lu - reg 730cfeca62SWells Lu - phy-handle 740cfeca62SWells Lu - phy-mode 750cfeca62SWells Lu - nvmem-cells 760cfeca62SWells Lu - nvmem-cell-names 770cfeca62SWells Lu 780cfeca62SWells Lu mdio: 790cfeca62SWells Lu $ref: mdio.yaml# 800cfeca62SWells Lu unevaluatedProperties: false 810cfeca62SWells Lu 820cfeca62SWells LuadditionalProperties: false 830cfeca62SWells Lu 840cfeca62SWells Lurequired: 850cfeca62SWells Lu - compatible 860cfeca62SWells Lu - reg 870cfeca62SWells Lu - interrupts 880cfeca62SWells Lu - clocks 890cfeca62SWells Lu - resets 900cfeca62SWells Lu - pinctrl-0 910cfeca62SWells Lu - pinctrl-names 920cfeca62SWells Lu - ethernet-ports 930cfeca62SWells Lu - mdio 940cfeca62SWells Lu 950cfeca62SWells Luexamples: 960cfeca62SWells Lu - | 970cfeca62SWells Lu #include <dt-bindings/interrupt-controller/irq.h> 980cfeca62SWells Lu 990cfeca62SWells Lu ethernet@9c108000 { 1000cfeca62SWells Lu compatible = "sunplus,sp7021-emac"; 1010cfeca62SWells Lu reg = <0x9c108000 0x400>; 1020cfeca62SWells Lu interrupt-parent = <&intc>; 1030cfeca62SWells Lu interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; 1040cfeca62SWells Lu clocks = <&clkc 0xa7>; 1050cfeca62SWells Lu resets = <&rstc 0x97>; 1060cfeca62SWells Lu pinctrl-0 = <&emac_demo_board_v3_pins>; 1070cfeca62SWells Lu pinctrl-names = "default"; 1080cfeca62SWells Lu 1090cfeca62SWells Lu ethernet-ports { 1100cfeca62SWells Lu #address-cells = <1>; 1110cfeca62SWells Lu #size-cells = <0>; 1120cfeca62SWells Lu 1130cfeca62SWells Lu port@0 { 1140cfeca62SWells Lu reg = <0>; 1150cfeca62SWells Lu phy-handle = <ð_phy0>; 1160cfeca62SWells Lu phy-mode = "rmii"; 1170cfeca62SWells Lu nvmem-cells = <&mac_addr0>; 1180cfeca62SWells Lu nvmem-cell-names = "mac-address"; 1190cfeca62SWells Lu }; 1200cfeca62SWells Lu 1210cfeca62SWells Lu port@1 { 1220cfeca62SWells Lu reg = <1>; 1230cfeca62SWells Lu phy-handle = <ð_phy1>; 1240cfeca62SWells Lu phy-mode = "rmii"; 1250cfeca62SWells Lu nvmem-cells = <&mac_addr1>; 1260cfeca62SWells Lu nvmem-cell-names = "mac-address"; 1270cfeca62SWells Lu }; 1280cfeca62SWells Lu }; 1290cfeca62SWells Lu 1300cfeca62SWells Lu mdio { 1310cfeca62SWells Lu #address-cells = <1>; 1320cfeca62SWells Lu #size-cells = <0>; 1330cfeca62SWells Lu 1340cfeca62SWells Lu eth_phy0: ethernet-phy@0 { 1350cfeca62SWells Lu reg = <0>; 1360cfeca62SWells Lu }; 1370cfeca62SWells Lu 1380cfeca62SWells Lu eth_phy1: ethernet-phy@1 { 1390cfeca62SWells Lu reg = <1>; 1400cfeca62SWells Lu }; 1410cfeca62SWells Lu }; 1420cfeca62SWells Lu }; 1430cfeca62SWells Lu... 144