On Tue, Jul 5, 2022 at 11:54 AM Marek Behún <kabel@xxxxxxxxxx> wrote: > > Add binding for CPLD bus interface of Freescale P1021RDB Combo Board > CPLD Design. > > Signed-off-by: Marek Behún <kabel@xxxxxxxxxx> > --- > .../bindings/bus/fsl,p1021rdb-pc-cpld.yaml | 73 +++++++++++++++++++ > 1 file changed, 73 insertions(+) > create mode 100644 Documentation/devicetree/bindings/bus/fsl,p1021rdb-pc-cpld.yaml > > diff --git a/Documentation/devicetree/bindings/bus/fsl,p1021rdb-pc-cpld.yaml b/Documentation/devicetree/bindings/bus/fsl,p1021rdb-pc-cpld.yaml > new file mode 100644 > index 000000000000..822dfb93dcd8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/bus/fsl,p1021rdb-pc-cpld.yaml > @@ -0,0 +1,73 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/bus/fsl,p1021rdb-pc-cpld.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: CPLD Bus Inteface for Freescale P1021RDB Combo Board CPLD Design > + > +maintainers: > + - Pali Rohár <pali@xxxxxxxxxx> > + > +description: | > + A simple bus enabling access to peripherals on boards with use Freescale > + P1021RDB Combo Board CPLD Design. > + > + The "fsl,p1021rdb-pc-cpld" follows the "simple-bus" set of properties, as > + specified in the Devicetree Specification. It is an extension of "simple-bus" > + because some registers are CPLD specific and allows to identify if board has > + wired CPLD according to Freescale P1021RDB Combo Board CPLD Design. > + > +select: > + properties: > + compatible: > + contains: > + const: fsl,p1021rdb-pc-cpld > + required: > + - compatible > + > +properties: > + $nodename: > + pattern: "^cpld(@[0-9a-f]+(,[0-9a-f]+)?)?$" > + > + compatible: > + items: > + - const: fsl,p1021rdb-pc-cpld > + - const: simple-bus > + > + '#address-cells': > + enum: [ 1, 2 ] > + > + '#size-cells': > + enum: [ 1, 2 ] > + > + reg: > + maxItems: 1 > + > + ranges: true > + > +required: > + - compatible > + - '#address-cells' > + - '#size-cells' > + - reg > + - ranges > + > +additionalProperties: > + type: object > + > +examples: > + - | > + > + localbus { > + #address-cells = <2>; > + #size-cells = <1>; > + > + cpld@3,0 { > + #address-cells = <1>; > + #size-cells = <1>; > + compatible = "fsl,p1021rdb-pc-cpld", "simple-bus"; > + reg = <0x3 0x0 0x20000>; Not really a simple-bus if it has registers to init/program the bus. > + ranges = <0x0 0x3 0x0 0x20000>; > + }; > + }; > -- > 2.35.1 >