Re: [PATCH v2 2/2] spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
Krzysztof Kozlowski <[email protected]> Tue, 9 Jun 2026 09:16:43 +0200
| Newsgroups | org.ozlabs.lists.openbmc,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-spi |
|---|---|
| Message-ID | <20260609-rebel-advanced-dragonfly-efdafe@quoll> |
On Mon, Jun 08, 2026 at 08:54:18PM +0300, Tomer Maimon wrote: > Convert the Nuvoton NPCM FIU binding to DT schema format. You should explain here why second 'reg' is optional. It wasn't in original binding, so you made a change to the binding during conversion. ... > - > diff --git a/Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml b/Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml > new file mode 100644 > index 000000000000..0f95def01910 > --- /dev/null > +++ b/Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml Filename: nuvoton,npcm750-fiu.yaml > @@ -0,0 +1,91 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/spi/nuvoton,npcm-fiu.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Nuvoton NPCM Flash Interface Unit (FIU) SPI Controller > + > +maintainers: > + - Tomer Maimon <[email protected]> > + > +allOf: > + - $ref: spi-controller.yaml# > + > +description: | > + NPCM FIU supports single, dual and quad communication interface. > + > + The NPCM7XX supports three FIU modules: > + FIU0 and FIUx support two chip selects > + FIU3 supports four chip selects. > + > + The NPCM8XX supports four FIU modules: > + FIU0 and FIUx support two chip selects > + FIU1 and FIU3 support four chip selects. > + > + Alias convention: > + The '/aliases' node should define: > + For NPCM7xx: fiu0=&fiu0; fiu1=&fiu3; fiu2=&fiux; > + For NPCM8xx: fiu0=&fiu0; fiu1=&fiu3; fiu2=&fiux; fiu3=&fiu1; > + > +properties: > + compatible: > + enum: > + - nuvoton,npcm750-fiu # Poleg NPCM7XX > + - nuvoton,npcm845-fiu # Arbel NPCM8XX > + > + reg: > + minItems: 1 > + items: > + - description: FIU registers > + - description: Memory-mapped flash contents (optional) > + > + reg-names: > + minItems: 1 > + items: > + - const: control > + - const: memory > + > + clocks: > + maxItems: 1 > + > + clock-names: > + items: > + - enum: > + - clk_spi0 > + - clk_spi1 > + - clk_spi3 > + - clk_spix This wasn't in the original binding. Nothing explains why it was added. > + > + nuvoton,spix-mode: > + type: boolean > + description: Enable SPIX mode for an expansion bus to an ASIC or CPLD. > + > +required: > + - compatible > + - reg > + - reg-names > + - clocks > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h> > + spi@fb000000 { > + compatible = "nuvoton,npcm750-fiu"; > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; > + reg-names = "control", "memory"; reg and reg-names follow compatible. Best regards, Krzysztof