Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: Convert socfpga-dwmac bindings to yaml

Convert the bindings for socfpga-dwmac to yaml. Since the original
text contained descriptions for two separate nodes, two separate
yaml files were created.

Signed-off-by: Mun Yew Tham <mun.yew.tham@altera.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@altera.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20250630213748.71919-1-matthew.gerlach@altera.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Matthew Gerlach and committed by
Jakub Kicinski
6d359cf4 9e2a7ad4

+221 -58
+49
Documentation/devicetree/bindings/net/altr,gmii-to-sgmii-2.0.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + # Copyright (C) 2025 Altera Corporation 3 + %YAML 1.2 4 + --- 5 + $id: http://devicetree.org/schemas/net/altr,gmii-to-sgmii-2.0.yaml# 6 + $schema: http://devicetree.org/meta-schemas/core.yaml# 7 + 8 + title: Altera GMII to SGMII Converter 9 + 10 + maintainers: 11 + - Matthew Gerlach <matthew.gerlach@altera.com> 12 + 13 + description: 14 + This binding describes the Altera GMII to SGMII converter. 15 + 16 + properties: 17 + compatible: 18 + const: altr,gmii-to-sgmii-2.0 19 + 20 + reg: 21 + items: 22 + - description: Registers for the emac splitter IP 23 + - description: Registers for the GMII to SGMII converter. 24 + - description: Registers for TSE control. 25 + 26 + reg-names: 27 + items: 28 + - const: hps_emac_interface_splitter_avalon_slave 29 + - const: gmii_to_sgmii_adapter_avalon_slave 30 + - const: eth_tse_control_port 31 + 32 + required: 33 + - compatible 34 + - reg 35 + - reg-names 36 + 37 + unevaluatedProperties: false 38 + 39 + examples: 40 + - | 41 + phy@ff000240 { 42 + compatible = "altr,gmii-to-sgmii-2.0"; 43 + reg = <0xff000240 0x00000008>, 44 + <0xff000200 0x00000040>, 45 + <0xff000250 0x00000008>; 46 + reg-names = "hps_emac_interface_splitter_avalon_slave", 47 + "gmii_to_sgmii_adapter_avalon_slave", 48 + "eth_tse_control_port"; 49 + };
+166
Documentation/devicetree/bindings/net/altr,socfpga-stmmac.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/altr,socfpga-stmmac.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Altera SOCFPGA SoC DWMAC controller 8 + 9 + maintainers: 10 + - Matthew Gerlach <matthew.gerlach@altera.com> 11 + 12 + description: 13 + This binding describes the Altera SOCFPGA SoC implementation of the 14 + Synopsys DWMAC for the Cyclone5, Arria5, Stratix10, and Agilex7 families 15 + of chips. 16 + # TODO: Determine how to handle the Arria10 reset-name, stmmaceth-ocp, that 17 + # does not validate against net/snps,dwmac.yaml. 18 + 19 + select: 20 + properties: 21 + compatible: 22 + contains: 23 + enum: 24 + - altr,socfpga-stmmac 25 + - altr,socfpga-stmmac-a10-s10 26 + 27 + required: 28 + - compatible 29 + 30 + properties: 31 + compatible: 32 + oneOf: 33 + - items: 34 + - const: altr,socfpga-stmmac 35 + - const: snps,dwmac-3.70a 36 + - const: snps,dwmac 37 + - items: 38 + - const: altr,socfpga-stmmac-a10-s10 39 + - const: snps,dwmac-3.72a 40 + - const: snps,dwmac 41 + - items: 42 + - const: altr,socfpga-stmmac-a10-s10 43 + - const: snps,dwmac-3.74a 44 + - const: snps,dwmac 45 + 46 + clocks: 47 + minItems: 1 48 + items: 49 + - description: GMAC main clock 50 + - description: 51 + PTP reference clock. This clock is used for programming the 52 + Timestamp Addend Register. If not passed then the system 53 + clock will be used and this is fine on some platforms. 54 + 55 + clock-names: 56 + minItems: 1 57 + items: 58 + - const: stmmaceth 59 + - const: ptp_ref 60 + 61 + iommus: 62 + maxItems: 2 63 + 64 + phy-mode: 65 + enum: 66 + - gmii 67 + - mii 68 + - rgmii 69 + - rgmii-id 70 + - rgmii-rxid 71 + - rgmii-txid 72 + - sgmii 73 + - 1000base-x 74 + 75 + rxc-skew-ps: 76 + description: Skew control of RXC pad 77 + 78 + rxd0-skew-ps: 79 + description: Skew control of RX data 0 pad 80 + 81 + rxd1-skew-ps: 82 + description: Skew control of RX data 1 pad 83 + 84 + rxd2-skew-ps: 85 + description: Skew control of RX data 2 pad 86 + 87 + rxd3-skew-ps: 88 + description: Skew control of RX data 3 pad 89 + 90 + rxdv-skew-ps: 91 + description: Skew control of RX CTL pad 92 + 93 + txc-skew-ps: 94 + description: Skew control of TXC pad 95 + 96 + txen-skew-ps: 97 + description: Skew control of TXC pad 98 + 99 + altr,emac-splitter: 100 + $ref: /schemas/types.yaml#/definitions/phandle 101 + description: 102 + Should be the phandle to the emac splitter soft IP node if DWMAC 103 + controller is connected an emac splitter. 104 + 105 + altr,f2h_ptp_ref_clk: 106 + $ref: /schemas/types.yaml#/definitions/phandle 107 + description: 108 + Phandle to Precision Time Protocol reference clock. This clock is 109 + common to gmac instances and defaults to osc1. 110 + 111 + altr,gmii-to-sgmii-converter: 112 + $ref: /schemas/types.yaml#/definitions/phandle 113 + description: 114 + Should be the phandle to the gmii to sgmii converter soft IP. 115 + 116 + altr,sysmgr-syscon: 117 + $ref: /schemas/types.yaml#/definitions/phandle-array 118 + description: 119 + Should be the phandle to the system manager node that encompass 120 + the glue register, the register offset, and the register shift. 121 + On Cyclone5/Arria5, the register shift represents the PHY mode 122 + bits, while on the Arria10/Stratix10/Agilex platforms, the 123 + register shift represents bit for each emac to enable/disable 124 + signals from the FPGA fabric to the EMAC modules. 125 + items: 126 + - items: 127 + - description: phandle to the system manager node 128 + - description: offset of the control register 129 + - description: shift within the control register 130 + 131 + patternProperties: 132 + "^mdio[0-9]$": 133 + type: object 134 + 135 + required: 136 + - compatible 137 + - clocks 138 + - clock-names 139 + - altr,sysmgr-syscon 140 + 141 + allOf: 142 + - $ref: snps,dwmac.yaml# 143 + 144 + unevaluatedProperties: false 145 + 146 + examples: 147 + 148 + - | 149 + #include <dt-bindings/interrupt-controller/arm-gic.h> 150 + #include <dt-bindings/interrupt-controller/irq.h> 151 + soc { 152 + #address-cells = <1>; 153 + #size-cells = <1>; 154 + ethernet@ff700000 { 155 + compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", 156 + "snps,dwmac"; 157 + altr,sysmgr-syscon = <&sysmgr 0x60 0>; 158 + reg = <0xff700000 0x2000>; 159 + interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>; 160 + interrupt-names = "macirq"; 161 + mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */ 162 + clocks = <&emac_0_clk>; 163 + clock-names = "stmmaceth"; 164 + phy-mode = "sgmii"; 165 + }; 166 + };
-57
Documentation/devicetree/bindings/net/socfpga-dwmac.txt
··· 1 - Altera SOCFPGA SoC DWMAC controller 2 - 3 - This is a variant of the dwmac/stmmac driver an inherits all descriptions 4 - present in Documentation/devicetree/bindings/net/stmmac.txt. 5 - 6 - The device node has additional properties: 7 - 8 - Required properties: 9 - - compatible : For Cyclone5/Arria5 SoCs it should contain 10 - "altr,socfpga-stmmac". For Arria10/Agilex/Stratix10 SoCs 11 - "altr,socfpga-stmmac-a10-s10". 12 - Along with "snps,dwmac" and any applicable more detailed 13 - designware version numbers documented in stmmac.txt 14 - - altr,sysmgr-syscon : Should be the phandle to the system manager node that 15 - encompasses the glue register, the register offset, and the register shift. 16 - On Cyclone5/Arria5, the register shift represents the PHY mode bits, while 17 - on the Arria10/Stratix10/Agilex platforms, the register shift represents 18 - bit for each emac to enable/disable signals from the FPGA fabric to the 19 - EMAC modules. 20 - - altr,f2h_ptp_ref_clk use f2h_ptp_ref_clk instead of default eosc1 clock 21 - for ptp ref clk. This affects all emacs as the clock is common. 22 - 23 - Optional properties: 24 - altr,emac-splitter: Should be the phandle to the emac splitter soft IP node if 25 - DWMAC controller is connected emac splitter. 26 - phy-mode: The phy mode the ethernet operates in 27 - altr,sgmii-to-sgmii-converter: phandle to the TSE SGMII converter 28 - 29 - This device node has additional phandle dependency, the sgmii converter: 30 - 31 - Required properties: 32 - - compatible : Should be altr,gmii-to-sgmii-2.0 33 - - reg-names : Should be "eth_tse_control_port" 34 - 35 - Example: 36 - 37 - gmii_to_sgmii_converter: phy@100000240 { 38 - compatible = "altr,gmii-to-sgmii-2.0"; 39 - reg = <0x00000001 0x00000240 0x00000008>, 40 - <0x00000001 0x00000200 0x00000040>; 41 - reg-names = "eth_tse_control_port"; 42 - clocks = <&sgmii_1_clk_0 &emac1 1 &sgmii_clk_125 &sgmii_clk_125>; 43 - clock-names = "tse_pcs_ref_clk_clock_connection", "tse_rx_cdr_refclk"; 44 - }; 45 - 46 - gmac0: ethernet@ff700000 { 47 - compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; 48 - altr,sysmgr-syscon = <&sysmgr 0x60 0>; 49 - reg = <0xff700000 0x2000>; 50 - interrupts = <0 115 4>; 51 - interrupt-names = "macirq"; 52 - mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ 53 - clocks = <&emac_0_clk>; 54 - clock-names = "stmmaceth"; 55 - phy-mode = "sgmii"; 56 - altr,gmii-to-sgmii-converter = <&gmii_to_sgmii_converter>; 57 - };
+6 -1
MAINTAINERS
··· 3261 3261 S: Maintained 3262 3262 F: drivers/clk/socfpga/ 3263 3263 3264 + ARM/SOCFPGA DWMAC GLUE LAYER BINDINGS 3265 + M: Matthew Gerlach <matthew.gerlach@altera.com> 3266 + S: Maintained 3267 + F: Documentation/devicetree/bindings/net/altr,gmii-to-sgmii-2.0.yaml 3268 + F: Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml 3269 + 3264 3270 ARM/SOCFPGA DWMAC GLUE LAYER 3265 3271 M: Maxime Chevallier <maxime.chevallier@bootlin.com> 3266 3272 S: Maintained 3267 - F: Documentation/devicetree/bindings/net/socfpga-dwmac.txt 3268 3273 F: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c 3269 3274 3270 3275 ARM/SOCFPGA EDAC BINDINGS