1*833e5d42SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*833e5d42SEmmanuel Vadot%YAML 1.2 3*833e5d42SEmmanuel Vadot--- 4*833e5d42SEmmanuel Vadot$id: http://devicetree.org/schemas/net/sophgo,cv1800b-dwmac.yaml# 5*833e5d42SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*833e5d42SEmmanuel Vadot 7*833e5d42SEmmanuel Vadottitle: Sophgo CV1800B DWMAC glue layer 8*833e5d42SEmmanuel Vadot 9*833e5d42SEmmanuel Vadotmaintainers: 10*833e5d42SEmmanuel Vadot - Inochi Amaoto <inochiama@gmail.com> 11*833e5d42SEmmanuel Vadot 12*833e5d42SEmmanuel Vadotselect: 13*833e5d42SEmmanuel Vadot properties: 14*833e5d42SEmmanuel Vadot compatible: 15*833e5d42SEmmanuel Vadot contains: 16*833e5d42SEmmanuel Vadot enum: 17*833e5d42SEmmanuel Vadot - sophgo,cv1800b-dwmac 18*833e5d42SEmmanuel Vadot required: 19*833e5d42SEmmanuel Vadot - compatible 20*833e5d42SEmmanuel Vadot 21*833e5d42SEmmanuel Vadotproperties: 22*833e5d42SEmmanuel Vadot compatible: 23*833e5d42SEmmanuel Vadot items: 24*833e5d42SEmmanuel Vadot - const: sophgo,cv1800b-dwmac 25*833e5d42SEmmanuel Vadot - const: snps,dwmac-3.70a 26*833e5d42SEmmanuel Vadot 27*833e5d42SEmmanuel Vadot reg: 28*833e5d42SEmmanuel Vadot maxItems: 1 29*833e5d42SEmmanuel Vadot 30*833e5d42SEmmanuel Vadot clocks: 31*833e5d42SEmmanuel Vadot items: 32*833e5d42SEmmanuel Vadot - description: GMAC main clock 33*833e5d42SEmmanuel Vadot - description: PTP clock 34*833e5d42SEmmanuel Vadot 35*833e5d42SEmmanuel Vadot clock-names: 36*833e5d42SEmmanuel Vadot items: 37*833e5d42SEmmanuel Vadot - const: stmmaceth 38*833e5d42SEmmanuel Vadot - const: ptp_ref 39*833e5d42SEmmanuel Vadot 40*833e5d42SEmmanuel Vadot interrupts: 41*833e5d42SEmmanuel Vadot maxItems: 1 42*833e5d42SEmmanuel Vadot 43*833e5d42SEmmanuel Vadot interrupt-names: 44*833e5d42SEmmanuel Vadot maxItems: 1 45*833e5d42SEmmanuel Vadot 46*833e5d42SEmmanuel Vadot resets: 47*833e5d42SEmmanuel Vadot maxItems: 1 48*833e5d42SEmmanuel Vadot 49*833e5d42SEmmanuel Vadot reset-names: 50*833e5d42SEmmanuel Vadot const: stmmaceth 51*833e5d42SEmmanuel Vadot 52*833e5d42SEmmanuel Vadotrequired: 53*833e5d42SEmmanuel Vadot - compatible 54*833e5d42SEmmanuel Vadot - reg 55*833e5d42SEmmanuel Vadot - clocks 56*833e5d42SEmmanuel Vadot - clock-names 57*833e5d42SEmmanuel Vadot - interrupts 58*833e5d42SEmmanuel Vadot - interrupt-names 59*833e5d42SEmmanuel Vadot - resets 60*833e5d42SEmmanuel Vadot - reset-names 61*833e5d42SEmmanuel Vadot 62*833e5d42SEmmanuel VadotallOf: 63*833e5d42SEmmanuel Vadot - $ref: snps,dwmac.yaml# 64*833e5d42SEmmanuel Vadot 65*833e5d42SEmmanuel VadotunevaluatedProperties: false 66*833e5d42SEmmanuel Vadot 67*833e5d42SEmmanuel Vadotexamples: 68*833e5d42SEmmanuel Vadot - | 69*833e5d42SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 70*833e5d42SEmmanuel Vadot 71*833e5d42SEmmanuel Vadot ethernet@4070000 { 72*833e5d42SEmmanuel Vadot compatible = "sophgo,cv1800b-dwmac", "snps,dwmac-3.70a"; 73*833e5d42SEmmanuel Vadot reg = <0x04070000 0x10000>; 74*833e5d42SEmmanuel Vadot clocks = <&clk 35>, <&clk 36>; 75*833e5d42SEmmanuel Vadot clock-names = "stmmaceth", "ptp_ref"; 76*833e5d42SEmmanuel Vadot interrupts = <31 IRQ_TYPE_LEVEL_HIGH>; 77*833e5d42SEmmanuel Vadot interrupt-names = "macirq"; 78*833e5d42SEmmanuel Vadot phy-handle = <&internal_ephy>; 79*833e5d42SEmmanuel Vadot phy-mode = "internal"; 80*833e5d42SEmmanuel Vadot resets = <&rst 12>; 81*833e5d42SEmmanuel Vadot reset-names = "stmmaceth"; 82*833e5d42SEmmanuel Vadot rx-fifo-depth = <8192>; 83*833e5d42SEmmanuel Vadot tx-fifo-depth = <8192>; 84*833e5d42SEmmanuel Vadot snps,multicast-filter-bins = <0>; 85*833e5d42SEmmanuel Vadot snps,perfect-filter-entries = <1>; 86*833e5d42SEmmanuel Vadot snps,aal; 87*833e5d42SEmmanuel Vadot snps,txpbl = <8>; 88*833e5d42SEmmanuel Vadot snps,rxpbl = <8>; 89*833e5d42SEmmanuel Vadot snps,mtl-rx-config = <&gmac0_mtl_rx_setup>; 90*833e5d42SEmmanuel Vadot snps,mtl-tx-config = <&gmac0_mtl_tx_setup>; 91*833e5d42SEmmanuel Vadot snps,axi-config = <&gmac0_stmmac_axi_setup>; 92*833e5d42SEmmanuel Vadot 93*833e5d42SEmmanuel Vadot mdio { 94*833e5d42SEmmanuel Vadot compatible = "snps,dwmac-mdio"; 95*833e5d42SEmmanuel Vadot #address-cells = <1>; 96*833e5d42SEmmanuel Vadot #size-cells = <0>; 97*833e5d42SEmmanuel Vadot }; 98*833e5d42SEmmanuel Vadot 99*833e5d42SEmmanuel Vadot gmac0_mtl_rx_setup: rx-queues-config { 100*833e5d42SEmmanuel Vadot snps,rx-queues-to-use = <1>; 101*833e5d42SEmmanuel Vadot queue0 {}; 102*833e5d42SEmmanuel Vadot }; 103*833e5d42SEmmanuel Vadot 104*833e5d42SEmmanuel Vadot gmac0_mtl_tx_setup: tx-queues-config { 105*833e5d42SEmmanuel Vadot snps,tx-queues-to-use = <1>; 106*833e5d42SEmmanuel Vadot queue0 {}; 107*833e5d42SEmmanuel Vadot }; 108*833e5d42SEmmanuel Vadot 109*833e5d42SEmmanuel Vadot gmac0_stmmac_axi_setup: stmmac-axi-config { 110*833e5d42SEmmanuel Vadot snps,blen = <16 8 4 0 0 0 0>; 111*833e5d42SEmmanuel Vadot snps,rd_osr_lmt = <2>; 112*833e5d42SEmmanuel Vadot snps,wr_osr_lmt = <1>; 113*833e5d42SEmmanuel Vadot }; 114*833e5d42SEmmanuel Vadot }; 115