File Index
Files and directories
Sign in
FILE

sophgo,sg2044-dwmac.yaml

File preview with syntax highlighting.

linux-6.19.14/Documentation/devicetree/bindings/net/sophgo,sg2044-dwmac.yaml YAML
  1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2%YAML 1.2
  3---
  4$id: http://devicetree.org/schemas/net/sophgo,sg2044-dwmac.yaml#
  5$schema: http://devicetree.org/meta-schemas/core.yaml#
  6
  7title: Sophgo SG2044 DWMAC glue layer
  8
  9maintainers:
 10  - Inochi Amaoto <inochiama@gmail.com>
 11
 12select:
 13  properties:
 14    compatible:
 15      contains:
 16        enum:
 17          - sophgo,sg2044-dwmac
 18          - sophgo,sg2042-dwmac
 19  required:
 20    - compatible
 21
 22properties:
 23  compatible:
 24    oneOf:
 25      - items:
 26          - const: sophgo,sg2042-dwmac
 27          - const: snps,dwmac-5.00a
 28      - items:
 29          - const: sophgo,sg2044-dwmac
 30          - const: snps,dwmac-5.30a
 31
 32  reg:
 33    maxItems: 1
 34
 35  clocks:
 36    items:
 37      - description: GMAC main clock
 38      - description: PTP clock
 39      - description: TX clock
 40
 41  clock-names:
 42    items:
 43      - const: stmmaceth
 44      - const: ptp_ref
 45      - const: tx
 46
 47  dma-noncoherent: true
 48
 49  interrupts:
 50    maxItems: 1
 51
 52  interrupt-names:
 53    maxItems: 1
 54
 55  resets:
 56    maxItems: 1
 57
 58  reset-names:
 59    const: stmmaceth
 60
 61required:
 62  - compatible
 63  - reg
 64  - clocks
 65  - clock-names
 66  - interrupts
 67  - interrupt-names
 68  - resets
 69  - reset-names
 70
 71allOf:
 72  - $ref: snps,dwmac.yaml#
 73  - if:
 74      properties:
 75        compatible:
 76          contains:
 77            const: sophgo,sg2042-dwmac
 78    then:
 79      properties:
 80        phy-mode:
 81          enum:
 82            - rgmii-rxid
 83            - rgmii-id
 84    else:
 85      properties:
 86        phy-mode:
 87          enum:
 88            - rgmii
 89            - rgmii-rxid
 90            - rgmii-txid
 91            - rgmii-id
 92
 93unevaluatedProperties: false
 94
 95examples:
 96  - |
 97    #include <dt-bindings/interrupt-controller/irq.h>
 98
 99    ethernet@30006000 {
100      compatible = "sophgo,sg2044-dwmac", "snps,dwmac-5.30a";
101      reg = <0x30006000 0x4000>;
102      clocks = <&clk 151>, <&clk 152>, <&clk 154>;
103      clock-names = "stmmaceth", "ptp_ref", "tx";
104      interrupt-parent = <&intc>;
105      interrupts = <296 IRQ_TYPE_LEVEL_HIGH>;
106      interrupt-names = "macirq";
107      phy-handle = <&phy0>;
108      phy-mode = "rgmii-id";
109      resets = <&rst 30>;
110      reset-names = "stmmaceth";
111      snps,multicast-filter-bins = <0>;
112      snps,perfect-filter-entries = <1>;
113      snps,aal;
114      snps,tso;
115      snps,txpbl = <32>;
116      snps,rxpbl = <32>;
117      snps,mtl-rx-config = <&gmac0_mtl_rx_setup>;
118      snps,mtl-tx-config = <&gmac0_mtl_tx_setup>;
119      snps,axi-config = <&gmac0_stmmac_axi_setup>;
120
121      gmac0_mtl_rx_setup: rx-queues-config {
122        snps,rx-queues-to-use = <8>;
123        snps,rx-sched-wsp;
124        queue0 {};
125        queue1 {};
126        queue2 {};
127        queue3 {};
128        queue4 {};
129        queue5 {};
130        queue6 {};
131        queue7 {};
132      };
133
134      gmac0_mtl_tx_setup: tx-queues-config {
135        snps,tx-queues-to-use = <8>;
136        queue0 {};
137        queue1 {};
138        queue2 {};
139        queue3 {};
140        queue4 {};
141        queue5 {};
142        queue6 {};
143        queue7 {};
144      };
145
146      gmac0_stmmac_axi_setup: stmmac-axi-config {
147        snps,blen = <16 8 4 0 0 0 0>;
148        snps,wr_osr_lmt = <1>;
149        snps,rd_osr_lmt = <2>;
150      };
151    };
~/ Read-only file preview.