mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-31 22:23:05 +00:00

The `snps,dwmac.yaml` binding currently sets `maxItems: 3` for the `interrupts` and `interrupt-names` properties, but vendor bindings selecting `snps,dwmac.yaml` do not impose these limits. Define constraints for `interrupts` and `interrupt-names` properties in various DWMAC vendor bindings to ensure proper validation and consistency. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Acked-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp> Link: https://patch.msgid.link/20250309003301.1152228-1-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
93 lines
2.0 KiB
YAML
93 lines
2.0 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/net/toshiba,visconti-dwmac.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Toshiba Visconti DWMAC Ethernet controller
|
|
|
|
maintainers:
|
|
- Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
|
|
|
|
select:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
enum:
|
|
- toshiba,visconti-dwmac
|
|
required:
|
|
- compatible
|
|
|
|
allOf:
|
|
- $ref: snps,dwmac.yaml#
|
|
|
|
properties:
|
|
compatible:
|
|
oneOf:
|
|
- items:
|
|
- enum:
|
|
- toshiba,visconti-dwmac
|
|
- const: snps,dwmac-4.20a
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
clocks:
|
|
items:
|
|
- description: main clock
|
|
- description: PHY reference clock
|
|
|
|
clock-names:
|
|
items:
|
|
- const: stmmaceth
|
|
- const: phy_ref_clk
|
|
|
|
interrupts:
|
|
maxItems: 1
|
|
|
|
interrupt-names:
|
|
const: macirq
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- clocks
|
|
- clock-names
|
|
|
|
unevaluatedProperties: false
|
|
|
|
examples:
|
|
- |
|
|
#include <dt-bindings/clock/toshiba,tmpv770x.h>
|
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
|
|
|
soc {
|
|
#address-cells = <2>;
|
|
#size-cells = <2>;
|
|
|
|
piether: ethernet@28000000 {
|
|
compatible = "toshiba,visconti-dwmac", "snps,dwmac-4.20a";
|
|
reg = <0 0x28000000 0 0x10000>;
|
|
interrupts = <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
|
|
interrupt-names = "macirq";
|
|
clocks = <&pismu TMPV770X_CLK_PIETHER_BUS>, <&pismu TMPV770X_CLK_PIETHER_125M>;
|
|
clock-names = "stmmaceth", "phy_ref_clk";
|
|
snps,txpbl = <4>;
|
|
snps,rxpbl = <4>;
|
|
snps,tso;
|
|
phy-mode = "rgmii-id";
|
|
phy-handle = <&phy0>;
|
|
|
|
mdio {
|
|
#address-cells = <0x1>;
|
|
#size-cells = <0x0>;
|
|
compatible = "snps,dwmac-mdio";
|
|
|
|
phy0: ethernet-phy@1 {
|
|
device_type = "ethernet-phy";
|
|
reg = <0x1>;
|
|
};
|
|
};
|
|
};
|
|
};
|