xref: /linux/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml (revision 8be4d31cb8aaeea27bde4b7ddb26e28a89062ebf)
16d359cf4SMatthew Gerlach# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
26d359cf4SMatthew Gerlach%YAML 1.2
36d359cf4SMatthew Gerlach---
46d359cf4SMatthew Gerlach$id: http://devicetree.org/schemas/net/altr,socfpga-stmmac.yaml#
56d359cf4SMatthew Gerlach$schema: http://devicetree.org/meta-schemas/core.yaml#
66d359cf4SMatthew Gerlach
76d359cf4SMatthew Gerlachtitle: Altera SOCFPGA SoC DWMAC controller
86d359cf4SMatthew Gerlach
96d359cf4SMatthew Gerlachmaintainers:
106d359cf4SMatthew Gerlach  - Matthew Gerlach <matthew.gerlach@altera.com>
116d359cf4SMatthew Gerlach
126d359cf4SMatthew Gerlachdescription:
136d359cf4SMatthew Gerlach  This binding describes the Altera SOCFPGA SoC implementation of the
14*92068a32SMatthew Gerlach  Synopsys DWMAC for the Cyclone5, Arria5, Stratix10, Agilex5 and Agilex7
15*92068a32SMatthew Gerlach  families of chips.
166d359cf4SMatthew Gerlach  # TODO: Determine how to handle the Arria10 reset-name, stmmaceth-ocp, that
176d359cf4SMatthew Gerlach  # does not validate against net/snps,dwmac.yaml.
186d359cf4SMatthew Gerlach
196d359cf4SMatthew Gerlachselect:
206d359cf4SMatthew Gerlach  properties:
216d359cf4SMatthew Gerlach    compatible:
226d359cf4SMatthew Gerlach      contains:
236d359cf4SMatthew Gerlach        enum:
246d359cf4SMatthew Gerlach          - altr,socfpga-stmmac
256d359cf4SMatthew Gerlach          - altr,socfpga-stmmac-a10-s10
26*92068a32SMatthew Gerlach          - altr,socfpga-stmmac-agilex5
276d359cf4SMatthew Gerlach
286d359cf4SMatthew Gerlach  required:
296d359cf4SMatthew Gerlach    - compatible
306d359cf4SMatthew Gerlach
316d359cf4SMatthew Gerlachproperties:
326d359cf4SMatthew Gerlach  compatible:
336d359cf4SMatthew Gerlach    oneOf:
346d359cf4SMatthew Gerlach      - items:
356d359cf4SMatthew Gerlach          - const: altr,socfpga-stmmac
366d359cf4SMatthew Gerlach          - const: snps,dwmac-3.70a
376d359cf4SMatthew Gerlach          - const: snps,dwmac
386d359cf4SMatthew Gerlach      - items:
396d359cf4SMatthew Gerlach          - const: altr,socfpga-stmmac-a10-s10
406d359cf4SMatthew Gerlach          - const: snps,dwmac-3.72a
416d359cf4SMatthew Gerlach          - const: snps,dwmac
426d359cf4SMatthew Gerlach      - items:
436d359cf4SMatthew Gerlach          - const: altr,socfpga-stmmac-a10-s10
446d359cf4SMatthew Gerlach          - const: snps,dwmac-3.74a
456d359cf4SMatthew Gerlach          - const: snps,dwmac
46*92068a32SMatthew Gerlach      - items:
47*92068a32SMatthew Gerlach          - const: altr,socfpga-stmmac-agilex5
48*92068a32SMatthew Gerlach          - const: snps,dwxgmac-2.10
496d359cf4SMatthew Gerlach
506d359cf4SMatthew Gerlach  clocks:
516d359cf4SMatthew Gerlach    minItems: 1
526d359cf4SMatthew Gerlach    items:
536d359cf4SMatthew Gerlach      - description: GMAC main clock
546d359cf4SMatthew Gerlach      - description:
556d359cf4SMatthew Gerlach          PTP reference clock. This clock is used for programming the
566d359cf4SMatthew Gerlach          Timestamp Addend Register. If not passed then the system
576d359cf4SMatthew Gerlach          clock will be used and this is fine on some platforms.
586d359cf4SMatthew Gerlach
596d359cf4SMatthew Gerlach  clock-names:
606d359cf4SMatthew Gerlach    minItems: 1
616d359cf4SMatthew Gerlach    items:
626d359cf4SMatthew Gerlach      - const: stmmaceth
636d359cf4SMatthew Gerlach      - const: ptp_ref
646d359cf4SMatthew Gerlach
656d359cf4SMatthew Gerlach  iommus:
668a00a173SMatthew Gerlach    minItems: 1
676d359cf4SMatthew Gerlach    maxItems: 2
686d359cf4SMatthew Gerlach
696d359cf4SMatthew Gerlach  phy-mode:
706d359cf4SMatthew Gerlach    enum:
716d359cf4SMatthew Gerlach      - gmii
726d359cf4SMatthew Gerlach      - mii
736d359cf4SMatthew Gerlach      - rgmii
746d359cf4SMatthew Gerlach      - rgmii-id
756d359cf4SMatthew Gerlach      - rgmii-rxid
766d359cf4SMatthew Gerlach      - rgmii-txid
776d359cf4SMatthew Gerlach      - sgmii
786d359cf4SMatthew Gerlach      - 1000base-x
796d359cf4SMatthew Gerlach
806d359cf4SMatthew Gerlach  rxc-skew-ps:
816d359cf4SMatthew Gerlach    description: Skew control of RXC pad
826d359cf4SMatthew Gerlach
836d359cf4SMatthew Gerlach  rxd0-skew-ps:
846d359cf4SMatthew Gerlach    description: Skew control of RX data 0 pad
856d359cf4SMatthew Gerlach
866d359cf4SMatthew Gerlach  rxd1-skew-ps:
876d359cf4SMatthew Gerlach    description: Skew control of RX data 1 pad
886d359cf4SMatthew Gerlach
896d359cf4SMatthew Gerlach  rxd2-skew-ps:
906d359cf4SMatthew Gerlach    description: Skew control of RX data 2 pad
916d359cf4SMatthew Gerlach
926d359cf4SMatthew Gerlach  rxd3-skew-ps:
936d359cf4SMatthew Gerlach    description: Skew control of RX data 3 pad
946d359cf4SMatthew Gerlach
956d359cf4SMatthew Gerlach  rxdv-skew-ps:
966d359cf4SMatthew Gerlach    description: Skew control of RX CTL pad
976d359cf4SMatthew Gerlach
986d359cf4SMatthew Gerlach  txc-skew-ps:
996d359cf4SMatthew Gerlach    description: Skew control of TXC pad
1006d359cf4SMatthew Gerlach
1016d359cf4SMatthew Gerlach  txen-skew-ps:
1026d359cf4SMatthew Gerlach    description: Skew control of TXC pad
1036d359cf4SMatthew Gerlach
1046d359cf4SMatthew Gerlach  altr,emac-splitter:
1056d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle
1066d359cf4SMatthew Gerlach    description:
1076d359cf4SMatthew Gerlach      Should be the phandle to the emac splitter soft IP node if DWMAC
1086d359cf4SMatthew Gerlach      controller is connected an emac splitter.
1096d359cf4SMatthew Gerlach
1106d359cf4SMatthew Gerlach  altr,f2h_ptp_ref_clk:
1116d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle
1126d359cf4SMatthew Gerlach    description:
1136d359cf4SMatthew Gerlach      Phandle to Precision Time Protocol reference clock. This clock is
1146d359cf4SMatthew Gerlach      common to gmac instances and defaults to osc1.
1156d359cf4SMatthew Gerlach
1166d359cf4SMatthew Gerlach  altr,gmii-to-sgmii-converter:
1176d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle
1186d359cf4SMatthew Gerlach    description:
1196d359cf4SMatthew Gerlach      Should be the phandle to the gmii to sgmii converter soft IP.
1206d359cf4SMatthew Gerlach
1216d359cf4SMatthew Gerlach  altr,sysmgr-syscon:
1226d359cf4SMatthew Gerlach    $ref: /schemas/types.yaml#/definitions/phandle-array
1236d359cf4SMatthew Gerlach    description:
1246d359cf4SMatthew Gerlach      Should be the phandle to the system manager node that encompass
1256d359cf4SMatthew Gerlach      the glue register, the register offset, and the register shift.
1266d359cf4SMatthew Gerlach      On Cyclone5/Arria5, the register shift represents the PHY mode
1276d359cf4SMatthew Gerlach      bits, while on the Arria10/Stratix10/Agilex platforms, the
1286d359cf4SMatthew Gerlach      register shift represents bit for each emac to enable/disable
1296d359cf4SMatthew Gerlach      signals from the FPGA fabric to the EMAC modules.
1306d359cf4SMatthew Gerlach    items:
1316d359cf4SMatthew Gerlach      - items:
1326d359cf4SMatthew Gerlach          - description: phandle to the system manager node
1336d359cf4SMatthew Gerlach          - description: offset of the control register
1346d359cf4SMatthew Gerlach          - description: shift within the control register
1356d359cf4SMatthew Gerlach
1366d359cf4SMatthew GerlachpatternProperties:
1376d359cf4SMatthew Gerlach  "^mdio[0-9]$":
1386d359cf4SMatthew Gerlach    type: object
1396d359cf4SMatthew Gerlach
1406d359cf4SMatthew Gerlachrequired:
1416d359cf4SMatthew Gerlach  - compatible
1426d359cf4SMatthew Gerlach  - clocks
1436d359cf4SMatthew Gerlach  - clock-names
1446d359cf4SMatthew Gerlach  - altr,sysmgr-syscon
1456d359cf4SMatthew Gerlach
1466d359cf4SMatthew GerlachallOf:
1476d359cf4SMatthew Gerlach  - $ref: snps,dwmac.yaml#
1486d359cf4SMatthew Gerlach
1496d359cf4SMatthew GerlachunevaluatedProperties: false
1506d359cf4SMatthew Gerlach
1516d359cf4SMatthew Gerlachexamples:
1526d359cf4SMatthew Gerlach
1536d359cf4SMatthew Gerlach  - |
1546d359cf4SMatthew Gerlach    #include <dt-bindings/interrupt-controller/arm-gic.h>
1556d359cf4SMatthew Gerlach    #include <dt-bindings/interrupt-controller/irq.h>
1566d359cf4SMatthew Gerlach    soc {
1576d359cf4SMatthew Gerlach        #address-cells = <1>;
1586d359cf4SMatthew Gerlach        #size-cells = <1>;
1596d359cf4SMatthew Gerlach        ethernet@ff700000 {
1606d359cf4SMatthew Gerlach            compatible = "altr,socfpga-stmmac", "snps,dwmac-3.70a",
1616d359cf4SMatthew Gerlach            "snps,dwmac";
1626d359cf4SMatthew Gerlach            altr,sysmgr-syscon = <&sysmgr 0x60 0>;
1636d359cf4SMatthew Gerlach            reg = <0xff700000 0x2000>;
1646d359cf4SMatthew Gerlach            interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
1656d359cf4SMatthew Gerlach            interrupt-names = "macirq";
1666d359cf4SMatthew Gerlach            mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
1676d359cf4SMatthew Gerlach            clocks = <&emac_0_clk>;
1686d359cf4SMatthew Gerlach            clock-names = "stmmaceth";
1696d359cf4SMatthew Gerlach            phy-mode = "sgmii";
1706d359cf4SMatthew Gerlach        };
1716d359cf4SMatthew Gerlach    };
172