summaryrefslogtreecommitdiff
path: root/Documentation/devicetree
diff options
context:
space:
mode:
authorandy.hu <andy.hu@starfivetech.com>2022-09-07 10:31:30 +0300
committerandy.hu <andy.hu@starfivetech.com>2022-09-07 10:31:30 +0300
commita5414613a6288e9c27fb81431b9f772e1deee89e (patch)
treeb6cab2be283e8a5614a16bcfea7e3d45ee227442 /Documentation/devicetree
parentcdd8188717e0d82cc19df2b9837fd7e9727e2c30 (diff)
parent0afaf165e1e76fddb26230afd9fe6ae15028bded (diff)
downloadlinux-a5414613a6288e9c27fb81431b9f772e1deee89e.tar.xz
Merge branch 'CR_1946_515_GMAC_yanhong.wang' into 'jh7110-5.15.y-devel'
Cr 1946 515 gmac yanhong.wang See merge request sdk/linux!416
Diffstat (limited to 'Documentation/devicetree')
-rw-r--r--Documentation/devicetree/bindings/net/starfive,dwmac-plat.yaml105
1 files changed, 105 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/net/starfive,dwmac-plat.yaml b/Documentation/devicetree/bindings/net/starfive,dwmac-plat.yaml
new file mode 100644
index 000000000000..b88069e7fc4f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/starfive,dwmac-plat.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/starfive,dwmac-plat.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive DWMAC glue layer Device Tree Bindings
+
+maintainers:
+ - Tan Chun Hau <chunhau.tan@starfivetech.com>
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - starfive,dwmac
+ required:
+ - compatible
+
+allOf:
+ - $ref: "snps,dwmac.yaml#"
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - starfive,dwmac
+ - const: snps,dwmac-5.10a
+
+ clocks:
+ items:
+ - description: Gtx clock
+ - description: Tx clock
+ - description: PTP reference clock
+ - description: GMAC main clock
+ - description: PTP reference clock
+ - description: Gtxc clock
+
+ clock-names:
+ items:
+ - const: gtx
+ - const: tx
+ - const: ptp_ref
+ - const: stmmaceth
+ - const: pclk
+ - const: gtxc
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+
+unevaluatedProperties: false
+
+Example:
+ - |
+ #include <dt-bindings/reset/starfive-jh7110.h>
+ #include <dt-bindings/clock/starfive-jh7110-clkgen.h>
+
+ /* gmac device configuration */
+ stmmac_axi_setup: stmmac-axi-config {
+ snps,wr_osr_lmt = <0xf>;
+ snps,rd_osr_lmt = <0xf>;
+ snps,blen = <256 128 64 32 0 0 0>;
+ };
+
+ gmac0: gmac@17020000 {
+ compatible = "starfive,dwmac","snps,dwmac-5.10a";
+ reg = <0x0 0x17020000 0x0 0x10000>;
+ interrupts = <7>, <6>, <5>;
+ interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
+ phy-reset-gpios = <&gpio 63 0>;
+ clock-names = "gtx",
+ "tx",
+ "ptp_ref",
+ "stmmaceth",
+ "pclk",
+ "gtxc";
+ clocks = <&clkgen JH7110_GMAC0_GTXCLK>,
+ <&clkgen JH7110_U0_GMAC5_CLK_TX>,
+ <&clkgen JH7110_GMAC0_PTP>,
+ <&clkgen JH7110_U0_GMAC5_CLK_AHB>,
+ <&clkgen JH7110_U0_GMAC5_CLK_AXI>,
+ <&clkgen JH7110_GMAC0_GTXC>;
+ resets = <&rstgen RSTN_U0_DW_GMAC5_AXI64_AHB>,
+ <&rstgen RSTN_U0_DW_GMAC5_AXI64_AXI>;
+ reset-names = "ahb", "stmmaceth";
+ max-frame-size = <1500>;
+ phy-mode = "rgmii-id";
+ snps,multicast-filter-bins = <64>;
+ snps,perfect-filter-entries = <128>;
+ rx-fifo-depth = <2048>;
+ tx-fifo-depth = <2048>;
+ snps,fixed-burst;
+ snps,no-pbl-x8;
+ snps,force_thresh_dma_mode;
+ snps,axi-config = <&stmmac_axi_setup>;
+ snps,tso;
+ snps,en-tx-lpi-clockgating;
+ snps,txpbl = <4>;
+ snps,rxpbl = <4>;
+ };
+