1 From 6bef17fa124f20723724e2a9a1d890fd1a9d5eaa Mon Sep 17 00:00:00 2001
2 From: Yanhong Wang <yanhong.wang@starfivetech.com>
3 Date: Mon, 31 Oct 2022 18:08:15 +0800
4 Subject: [PATCH 043/122] dt-bindings: net: Add support StarFive dwmac
6 Add documentation to describe StarFive dwmac driver(GMAC).
8 Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com>
9 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 Signed-off-by: Paolo Abeni <pabeni@redhat.com>
11 Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
13 .../devicetree/bindings/net/snps,dwmac.yaml | 1 +
14 .../bindings/net/starfive,jh7110-dwmac.yaml | 144 ++++++++++++++++++
16 3 files changed, 151 insertions(+)
17 create mode 100644 Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
19 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
20 +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
21 @@ -91,6 +91,7 @@ properties:
25 + - starfive,jh7110-dwmac
30 +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
32 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
33 +# Copyright (C) 2022 StarFive Technology Co., Ltd.
36 +$id: http://devicetree.org/schemas/net/starfive,jh7110-dwmac.yaml#
37 +$schema: http://devicetree.org/meta-schemas/core.yaml#
39 +title: StarFive JH7110 DWMAC glue layer
42 + - Emil Renner Berthing <kernel@esmil.dk>
43 + - Samin Guo <samin.guo@starfivetech.com>
50 + - starfive,jh7110-dwmac
58 + - starfive,jh7110-dwmac
59 + - const: snps,dwmac-5.20
66 + - description: GMAC main clock
67 + - description: GMAC AHB clock
68 + - description: PTP clock
69 + - description: TX clock
70 + - description: GTX clock
90 + - description: MAC Reset signal.
91 + - description: AHB Reset signal.
98 + starfive,tx-use-rgmii-clk:
100 + Tx clock is provided by external rgmii clock.
104 + $ref: /schemas/types.yaml#/definitions/phandle-array
107 + - description: phandle to syscon that configures phy mode
108 + - description: Offset of phy mode selection
109 + - description: Shift of phy mode selection
111 + A phandle to syscon with two arguments that configure phy mode.
112 + The argument one is the offset of phy mode selection, the
113 + argument two is the shift of phy mode selection.
126 + - $ref: snps,dwmac.yaml#
128 +unevaluatedProperties: false
132 + ethernet@16030000 {
133 + compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
134 + reg = <0x16030000 0x10000>;
135 + clocks = <&clk 3>, <&clk 2>, <&clk 109>,
136 + <&clk 6>, <&clk 111>;
137 + clock-names = "stmmaceth", "pclk", "ptp_ref",
139 + resets = <&rst 1>, <&rst 2>;
140 + reset-names = "stmmaceth", "ahb";
141 + interrupts = <7>, <6>, <5>;
142 + interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
143 + phy-mode = "rgmii-id";
144 + snps,multicast-filter-bins = <64>;
145 + snps,perfect-filter-entries = <8>;
146 + rx-fifo-depth = <2048>;
147 + tx-fifo-depth = <2048>;
151 + snps,force_thresh_dma_mode;
152 + snps,axi-config = <&stmmac_axi_setup>;
153 + snps,en-tx-lpi-clockgating;
156 + starfive,syscon = <&aon_syscon 0xc 0x12>;
157 + phy-handle = <&phy0>;
160 + #address-cells = <1>;
162 + compatible = "snps,dwmac-mdio";
164 + phy0: ethernet-phy@0 {
169 + stmmac_axi_setup: stmmac-axi-config {
171 + snps,wr_osr_lmt = <4>;
172 + snps,rd_osr_lmt = <4>;
173 + snps,blen = <256 128 64 32 0 0 0>;
178 @@ -19657,6 +19657,12 @@ M: Emil Renner Berthing <kernel@esmil.dk
180 F: arch/riscv/boot/dts/starfive/
182 +STARFIVE DWMAC GLUE LAYER
183 +M: Emil Renner Berthing <kernel@esmil.dk>
184 +M: Samin Guo <samin.guo@starfivetech.com>
186 +F: Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml
188 STARFIVE JH7110 PLL CLOCK DRIVER
189 M: Xingyu Wu <xingyu.wu@starfivetech.com>