xref: /linux/Documentation/devicetree/bindings/net/qcom,ethqos.yaml (revision f08a1e912d3e60bf3028ea1c5199a609d12cd37c)
102e98ce3SBhupesh Sharma# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
202e98ce3SBhupesh Sharma%YAML 1.2
302e98ce3SBhupesh Sharma---
402e98ce3SBhupesh Sharma$id: http://devicetree.org/schemas/net/qcom,ethqos.yaml#
502e98ce3SBhupesh Sharma$schema: http://devicetree.org/meta-schemas/core.yaml#
602e98ce3SBhupesh Sharma
702e98ce3SBhupesh Sharmatitle: Qualcomm Ethernet ETHQOS device
802e98ce3SBhupesh Sharma
902e98ce3SBhupesh Sharmamaintainers:
1002e98ce3SBhupesh Sharma  - Bhupesh Sharma <bhupesh.sharma@linaro.org>
1102e98ce3SBhupesh Sharma
1202e98ce3SBhupesh Sharmadescription:
1302e98ce3SBhupesh Sharma  dwmmac based Qualcomm ethernet devices which support Gigabit
1402e98ce3SBhupesh Sharma  ethernet (version v2.3.0 and onwards).
1502e98ce3SBhupesh Sharma
1602e98ce3SBhupesh SharmaallOf:
1702e98ce3SBhupesh Sharma  - $ref: snps,dwmac.yaml#
1802e98ce3SBhupesh Sharma
1902e98ce3SBhupesh Sharmaproperties:
2002e98ce3SBhupesh Sharma  compatible:
2102e98ce3SBhupesh Sharma    enum:
2202e98ce3SBhupesh Sharma      - qcom,qcs404-ethqos
23d0e3d29fSBartosz Golaszewski      - qcom,sa8775p-ethqos
2425926a70SAndrew Halaney      - qcom,sc8280xp-ethqos
2502e98ce3SBhupesh Sharma      - qcom,sm8150-ethqos
2602e98ce3SBhupesh Sharma
2702e98ce3SBhupesh Sharma  reg:
2802e98ce3SBhupesh Sharma    maxItems: 2
2902e98ce3SBhupesh Sharma
3002e98ce3SBhupesh Sharma  reg-names:
3102e98ce3SBhupesh Sharma    items:
3202e98ce3SBhupesh Sharma      - const: stmmaceth
3302e98ce3SBhupesh Sharma      - const: rgmii
3402e98ce3SBhupesh Sharma
3502e98ce3SBhupesh Sharma  interrupts:
36d0e3d29fSBartosz Golaszewski    minItems: 1
3702e98ce3SBhupesh Sharma    items:
3802e98ce3SBhupesh Sharma      - description: Combined signal for various interrupt events
3902e98ce3SBhupesh Sharma      - description: The interrupt that occurs when Rx exits the LPI state
401963e65bSSuraj Jaiswal      - description: The interrupt that occurs when HW safety error triggered
4102e98ce3SBhupesh Sharma
4202e98ce3SBhupesh Sharma  interrupt-names:
43d0e3d29fSBartosz Golaszewski    minItems: 1
4402e98ce3SBhupesh Sharma    items:
4502e98ce3SBhupesh Sharma      - const: macirq
461963e65bSSuraj Jaiswal      - enum: [eth_lpi, sfty]
471963e65bSSuraj Jaiswal      - const: sfty
4802e98ce3SBhupesh Sharma
4902e98ce3SBhupesh Sharma  clocks:
5002e98ce3SBhupesh Sharma    maxItems: 4
5102e98ce3SBhupesh Sharma
5202e98ce3SBhupesh Sharma  clock-names:
5302e98ce3SBhupesh Sharma    items:
5402e98ce3SBhupesh Sharma      - const: stmmaceth
5502e98ce3SBhupesh Sharma      - const: pclk
5602e98ce3SBhupesh Sharma      - const: ptp_ref
57d0e3d29fSBartosz Golaszewski      - enum:
58d0e3d29fSBartosz Golaszewski          - rgmii
59d0e3d29fSBartosz Golaszewski          - phyaux
6002e98ce3SBhupesh Sharma
6102e98ce3SBhupesh Sharma  iommus:
6202e98ce3SBhupesh Sharma    maxItems: 1
6302e98ce3SBhupesh Sharma
64*fe326227SSagar Cheluvegowda  dma-coherent: true
65*fe326227SSagar Cheluvegowda
66d0e3d29fSBartosz Golaszewski  phys: true
67d0e3d29fSBartosz Golaszewski
68d0e3d29fSBartosz Golaszewski  phy-names:
69d0e3d29fSBartosz Golaszewski    const: serdes
70d0e3d29fSBartosz Golaszewski
7102e98ce3SBhupesh Sharmarequired:
7202e98ce3SBhupesh Sharma  - compatible
7302e98ce3SBhupesh Sharma  - clocks
7402e98ce3SBhupesh Sharma  - clock-names
7502e98ce3SBhupesh Sharma  - reg-names
7602e98ce3SBhupesh Sharma
7702e98ce3SBhupesh SharmaunevaluatedProperties: false
7802e98ce3SBhupesh Sharma
7902e98ce3SBhupesh Sharmaexamples:
8002e98ce3SBhupesh Sharma  - |
8102e98ce3SBhupesh Sharma    #include <dt-bindings/interrupt-controller/arm-gic.h>
8202e98ce3SBhupesh Sharma    #include <dt-bindings/clock/qcom,gcc-qcs404.h>
8302e98ce3SBhupesh Sharma    #include <dt-bindings/gpio/gpio.h>
8402e98ce3SBhupesh Sharma
8502e98ce3SBhupesh Sharma    ethernet: ethernet@7a80000 {
8602e98ce3SBhupesh Sharma      compatible = "qcom,qcs404-ethqos";
8702e98ce3SBhupesh Sharma      reg = <0x07a80000 0x10000>,
8802e98ce3SBhupesh Sharma            <0x07a96000 0x100>;
8902e98ce3SBhupesh Sharma      reg-names = "stmmaceth", "rgmii";
9002e98ce3SBhupesh Sharma      clock-names = "stmmaceth", "pclk", "ptp_ref", "rgmii";
9102e98ce3SBhupesh Sharma      clocks = <&gcc GCC_ETH_AXI_CLK>,
9202e98ce3SBhupesh Sharma               <&gcc GCC_ETH_SLAVE_AHB_CLK>,
9302e98ce3SBhupesh Sharma               <&gcc GCC_ETH_PTP_CLK>,
9402e98ce3SBhupesh Sharma               <&gcc GCC_ETH_RGMII_CLK>;
9502e98ce3SBhupesh Sharma      interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
961963e65bSSuraj Jaiswal                   <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
971963e65bSSuraj Jaiswal                   <GIC_SPI 782 IRQ_TYPE_LEVEL_HIGH>;
981963e65bSSuraj Jaiswal      interrupt-names = "macirq", "eth_lpi", "sfty";
9902e98ce3SBhupesh Sharma
10002e98ce3SBhupesh Sharma      rx-fifo-depth = <4096>;
10102e98ce3SBhupesh Sharma      tx-fifo-depth = <4096>;
10202e98ce3SBhupesh Sharma
10302e98ce3SBhupesh Sharma      snps,tso;
10402e98ce3SBhupesh Sharma      snps,reset-gpio = <&tlmm 60 GPIO_ACTIVE_LOW>;
10502e98ce3SBhupesh Sharma      snps,reset-active-low;
10602e98ce3SBhupesh Sharma      snps,reset-delays-us = <0 10000 10000>;
10702e98ce3SBhupesh Sharma
10802e98ce3SBhupesh Sharma      pinctrl-names = "default";
10902e98ce3SBhupesh Sharma      pinctrl-0 = <&ethernet_defaults>;
11002e98ce3SBhupesh Sharma
11102e98ce3SBhupesh Sharma      phy-handle = <&phy1>;
11202e98ce3SBhupesh Sharma      phy-mode = "rgmii";
11302e98ce3SBhupesh Sharma      mdio {
11402e98ce3SBhupesh Sharma        #address-cells = <0x1>;
11502e98ce3SBhupesh Sharma        #size-cells = <0x0>;
11602e98ce3SBhupesh Sharma
11702e98ce3SBhupesh Sharma        compatible = "snps,dwmac-mdio";
11802e98ce3SBhupesh Sharma        phy1: phy@4 {
11902e98ce3SBhupesh Sharma          compatible = "ethernet-phy-ieee802.3-c22";
12002e98ce3SBhupesh Sharma          device_type = "ethernet-phy";
12102e98ce3SBhupesh Sharma          reg = <0x4>;
12202e98ce3SBhupesh Sharma
12302e98ce3SBhupesh Sharma          #phy-cells = <0>;
12402e98ce3SBhupesh Sharma        };
12502e98ce3SBhupesh Sharma      };
12602e98ce3SBhupesh Sharma    };
127