18ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 28ccc0d23SEmmanuel Vadot%YAML 1.2 38ccc0d23SEmmanuel Vadot--- 48ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/net/sophgo,sg2044-dwmac.yaml# 58ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 68ccc0d23SEmmanuel Vadot 78ccc0d23SEmmanuel Vadottitle: Sophgo SG2044 DWMAC glue layer 88ccc0d23SEmmanuel Vadot 98ccc0d23SEmmanuel Vadotmaintainers: 108ccc0d23SEmmanuel Vadot - Inochi Amaoto <inochiama@gmail.com> 118ccc0d23SEmmanuel Vadot 128ccc0d23SEmmanuel Vadotselect: 138ccc0d23SEmmanuel Vadot properties: 148ccc0d23SEmmanuel Vadot compatible: 158ccc0d23SEmmanuel Vadot contains: 168ccc0d23SEmmanuel Vadot enum: 178ccc0d23SEmmanuel Vadot - sophgo,sg2044-dwmac 18*833e5d42SEmmanuel Vadot - sophgo,sg2042-dwmac 198ccc0d23SEmmanuel Vadot required: 208ccc0d23SEmmanuel Vadot - compatible 218ccc0d23SEmmanuel Vadot 228ccc0d23SEmmanuel Vadotproperties: 238ccc0d23SEmmanuel Vadot compatible: 24*833e5d42SEmmanuel Vadot oneOf: 25*833e5d42SEmmanuel Vadot - items: 26*833e5d42SEmmanuel Vadot - const: sophgo,sg2042-dwmac 27*833e5d42SEmmanuel Vadot - const: snps,dwmac-5.00a 28*833e5d42SEmmanuel Vadot - items: 298ccc0d23SEmmanuel Vadot - const: sophgo,sg2044-dwmac 308ccc0d23SEmmanuel Vadot - const: snps,dwmac-5.30a 318ccc0d23SEmmanuel Vadot 328ccc0d23SEmmanuel Vadot reg: 338ccc0d23SEmmanuel Vadot maxItems: 1 348ccc0d23SEmmanuel Vadot 358ccc0d23SEmmanuel Vadot clocks: 368ccc0d23SEmmanuel Vadot items: 378ccc0d23SEmmanuel Vadot - description: GMAC main clock 388ccc0d23SEmmanuel Vadot - description: PTP clock 398ccc0d23SEmmanuel Vadot - description: TX clock 408ccc0d23SEmmanuel Vadot 418ccc0d23SEmmanuel Vadot clock-names: 428ccc0d23SEmmanuel Vadot items: 438ccc0d23SEmmanuel Vadot - const: stmmaceth 448ccc0d23SEmmanuel Vadot - const: ptp_ref 458ccc0d23SEmmanuel Vadot - const: tx 468ccc0d23SEmmanuel Vadot 478ccc0d23SEmmanuel Vadot dma-noncoherent: true 488ccc0d23SEmmanuel Vadot 498ccc0d23SEmmanuel Vadot interrupts: 508ccc0d23SEmmanuel Vadot maxItems: 1 518ccc0d23SEmmanuel Vadot 528ccc0d23SEmmanuel Vadot interrupt-names: 538ccc0d23SEmmanuel Vadot maxItems: 1 548ccc0d23SEmmanuel Vadot 558ccc0d23SEmmanuel Vadot resets: 568ccc0d23SEmmanuel Vadot maxItems: 1 578ccc0d23SEmmanuel Vadot 588ccc0d23SEmmanuel Vadot reset-names: 598ccc0d23SEmmanuel Vadot const: stmmaceth 608ccc0d23SEmmanuel Vadot 618ccc0d23SEmmanuel Vadotrequired: 628ccc0d23SEmmanuel Vadot - compatible 638ccc0d23SEmmanuel Vadot - reg 648ccc0d23SEmmanuel Vadot - clocks 658ccc0d23SEmmanuel Vadot - clock-names 668ccc0d23SEmmanuel Vadot - interrupts 678ccc0d23SEmmanuel Vadot - interrupt-names 688ccc0d23SEmmanuel Vadot - resets 698ccc0d23SEmmanuel Vadot - reset-names 708ccc0d23SEmmanuel Vadot 718ccc0d23SEmmanuel VadotallOf: 728ccc0d23SEmmanuel Vadot - $ref: snps,dwmac.yaml# 738ccc0d23SEmmanuel Vadot 748ccc0d23SEmmanuel VadotunevaluatedProperties: false 758ccc0d23SEmmanuel Vadot 768ccc0d23SEmmanuel Vadotexamples: 778ccc0d23SEmmanuel Vadot - | 788ccc0d23SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 798ccc0d23SEmmanuel Vadot 808ccc0d23SEmmanuel Vadot ethernet@30006000 { 818ccc0d23SEmmanuel Vadot compatible = "sophgo,sg2044-dwmac", "snps,dwmac-5.30a"; 828ccc0d23SEmmanuel Vadot reg = <0x30006000 0x4000>; 838ccc0d23SEmmanuel Vadot clocks = <&clk 151>, <&clk 152>, <&clk 154>; 848ccc0d23SEmmanuel Vadot clock-names = "stmmaceth", "ptp_ref", "tx"; 858ccc0d23SEmmanuel Vadot interrupt-parent = <&intc>; 868ccc0d23SEmmanuel Vadot interrupts = <296 IRQ_TYPE_LEVEL_HIGH>; 878ccc0d23SEmmanuel Vadot interrupt-names = "macirq"; 88ae5de77eSEmmanuel Vadot phy-handle = <&phy0>; 89ae5de77eSEmmanuel Vadot phy-mode = "rgmii-id"; 908ccc0d23SEmmanuel Vadot resets = <&rst 30>; 918ccc0d23SEmmanuel Vadot reset-names = "stmmaceth"; 928ccc0d23SEmmanuel Vadot snps,multicast-filter-bins = <0>; 938ccc0d23SEmmanuel Vadot snps,perfect-filter-entries = <1>; 948ccc0d23SEmmanuel Vadot snps,aal; 958ccc0d23SEmmanuel Vadot snps,tso; 968ccc0d23SEmmanuel Vadot snps,txpbl = <32>; 978ccc0d23SEmmanuel Vadot snps,rxpbl = <32>; 988ccc0d23SEmmanuel Vadot snps,mtl-rx-config = <&gmac0_mtl_rx_setup>; 998ccc0d23SEmmanuel Vadot snps,mtl-tx-config = <&gmac0_mtl_tx_setup>; 1008ccc0d23SEmmanuel Vadot snps,axi-config = <&gmac0_stmmac_axi_setup>; 1018ccc0d23SEmmanuel Vadot 1028ccc0d23SEmmanuel Vadot gmac0_mtl_rx_setup: rx-queues-config { 1038ccc0d23SEmmanuel Vadot snps,rx-queues-to-use = <8>; 1048ccc0d23SEmmanuel Vadot snps,rx-sched-wsp; 1058ccc0d23SEmmanuel Vadot queue0 {}; 1068ccc0d23SEmmanuel Vadot queue1 {}; 1078ccc0d23SEmmanuel Vadot queue2 {}; 1088ccc0d23SEmmanuel Vadot queue3 {}; 1098ccc0d23SEmmanuel Vadot queue4 {}; 1108ccc0d23SEmmanuel Vadot queue5 {}; 1118ccc0d23SEmmanuel Vadot queue6 {}; 1128ccc0d23SEmmanuel Vadot queue7 {}; 1138ccc0d23SEmmanuel Vadot }; 1148ccc0d23SEmmanuel Vadot 1158ccc0d23SEmmanuel Vadot gmac0_mtl_tx_setup: tx-queues-config { 1168ccc0d23SEmmanuel Vadot snps,tx-queues-to-use = <8>; 1178ccc0d23SEmmanuel Vadot queue0 {}; 1188ccc0d23SEmmanuel Vadot queue1 {}; 1198ccc0d23SEmmanuel Vadot queue2 {}; 1208ccc0d23SEmmanuel Vadot queue3 {}; 1218ccc0d23SEmmanuel Vadot queue4 {}; 1228ccc0d23SEmmanuel Vadot queue5 {}; 1238ccc0d23SEmmanuel Vadot queue6 {}; 1248ccc0d23SEmmanuel Vadot queue7 {}; 1258ccc0d23SEmmanuel Vadot }; 1268ccc0d23SEmmanuel Vadot 1278ccc0d23SEmmanuel Vadot gmac0_stmmac_axi_setup: stmmac-axi-config { 1288ccc0d23SEmmanuel Vadot snps,blen = <16 8 4 0 0 0 0>; 1298ccc0d23SEmmanuel Vadot snps,wr_osr_lmt = <1>; 1308ccc0d23SEmmanuel Vadot snps,rd_osr_lmt = <2>; 1318ccc0d23SEmmanuel Vadot }; 1328ccc0d23SEmmanuel Vadot }; 133