If a property has an 'items' list, then a 'minItems' or 'maxItems' with the same size as the list is redundant and can be dropped. Note that is DT schema specific behavior and not standard json-schema behavior. The tooling will fixup the final schema adding any unspecified minItems/maxItems. This condition is partially checked with the meta-schema already, but only if both 'minItems' and 'maxItems' are equal to the 'items' length. An improved meta-schema is pending. Cc: Jens Axboe <axboe@kernel.dk> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: Kamal Dasu <kdasu.kdev@gmail.com> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Marc Zyngier <maz@kernel.org> Cc: Joerg Roedel <joro@8bytes.org> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Vivien Didelot <vivien.didelot@gmail.com> Cc: Vladimir Oltean <olteanv@gmail.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Kishon Vijay Abraham I <kishon@ti.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> Cc: Lee Jones <lee.jones@linaro.org> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Wim Van Sebroeck <wim@linux-watchdog.org> Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # for MMC Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Acked-By: Vinod Koul <vkoul@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Wolfram Sang <wsa@kernel.org> # for I2C Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20210615191543.1043414-1-robh@kernel.org
172 lines
3.8 KiB
YAML
172 lines
3.8 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/net/dsa/brcm,sf2.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Broadcom Starfighter 2 integrated swich
|
|
|
|
maintainers:
|
|
- Florian Fainelli <f.fainelli@gmail.com>
|
|
|
|
properties:
|
|
compatible:
|
|
items:
|
|
- enum:
|
|
- brcm,bcm4908-switch
|
|
- brcm,bcm7278-switch-v4.0
|
|
- brcm,bcm7278-switch-v4.8
|
|
- brcm,bcm7445-switch-v4.0
|
|
|
|
reg:
|
|
minItems: 6
|
|
maxItems: 6
|
|
|
|
reg-names:
|
|
items:
|
|
- const: core
|
|
- const: reg
|
|
- const: intrl2_0
|
|
- const: intrl2_1
|
|
- const: fcb
|
|
- const: acb
|
|
|
|
interrupts:
|
|
minItems: 2
|
|
maxItems: 2
|
|
|
|
interrupt-names:
|
|
items:
|
|
- const: switch_0
|
|
- const: switch_1
|
|
|
|
resets:
|
|
maxItems: 1
|
|
|
|
reset-names:
|
|
const: switch
|
|
|
|
clocks:
|
|
minItems: 1
|
|
items:
|
|
- description: switch's main clock
|
|
- description: dividing of the switch core clock
|
|
|
|
clock-names:
|
|
minItems: 1
|
|
items:
|
|
- const: sw_switch
|
|
- const: sw_switch_mdiv
|
|
|
|
brcm,num-gphy:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description: maximum number of integrated gigabit PHYs in the switch
|
|
|
|
brcm,num-rgmii-ports:
|
|
$ref: /schemas/types.yaml#/definitions/uint32
|
|
description: maximum number of RGMII interfaces supported by the switch
|
|
|
|
brcm,fcb-pause-override:
|
|
description: if present indicates that the switch supports Failover Control
|
|
Block pause override capability
|
|
type: boolean
|
|
|
|
brcm,acb-packets-inflight:
|
|
description: if present indicates that the switch Admission Control Block
|
|
supports reporting the number of packets in-flight in a switch queue
|
|
type: boolean
|
|
|
|
"#address-cells":
|
|
const: 1
|
|
|
|
"#size-cells":
|
|
const: 0
|
|
|
|
ports:
|
|
type: object
|
|
|
|
properties:
|
|
brcm,use-bcm-hdr:
|
|
description: if present, indicates that the switch port has Broadcom
|
|
tags enabled (per-packet metadata)
|
|
type: boolean
|
|
|
|
required:
|
|
- reg
|
|
- interrupts
|
|
- "#address-cells"
|
|
- "#size-cells"
|
|
|
|
allOf:
|
|
- $ref: "dsa.yaml#"
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
enum:
|
|
- brcm,bcm7278-switch-v4.0
|
|
- brcm,bcm7278-switch-v4.8
|
|
then:
|
|
properties:
|
|
clocks:
|
|
minItems: 1
|
|
maxItems: 1
|
|
clock-names:
|
|
minItems: 1
|
|
maxItems: 1
|
|
required:
|
|
- clocks
|
|
- clock-names
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: brcm,bcm7445-switch-v4.0
|
|
then:
|
|
properties:
|
|
clocks:
|
|
minItems: 2
|
|
maxItems: 2
|
|
clock-names:
|
|
minItems: 2
|
|
maxItems: 2
|
|
required:
|
|
- clocks
|
|
- clock-names
|
|
|
|
additionalProperties: false
|
|
|
|
examples:
|
|
- |
|
|
switch@f0b00000 {
|
|
compatible = "brcm,bcm7445-switch-v4.0";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
reg = <0xf0b00000 0x40000>,
|
|
<0xf0b40000 0x110>,
|
|
<0xf0b40340 0x30>,
|
|
<0xf0b40380 0x30>,
|
|
<0xf0b40400 0x34>,
|
|
<0xf0b40600 0x208>;
|
|
reg-names = "core", "reg", "intrl2_0", "intrl2_1",
|
|
"fcb", "acb";
|
|
interrupts = <0 0x18 0>,
|
|
<0 0x19 0>;
|
|
clocks = <&sw_switch>, <&sw_switch_mdiv>;
|
|
clock-names = "sw_switch", "sw_switch_mdiv";
|
|
brcm,num-gphy = <1>;
|
|
brcm,num-rgmii-ports = <2>;
|
|
brcm,fcb-pause-override;
|
|
brcm,acb-packets-inflight;
|
|
|
|
ports {
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
port@0 {
|
|
label = "gphy";
|
|
reg = <0>;
|
|
};
|
|
};
|
|
};
|