Nuvoton NPCM FIU DTS fixes and binding conversion
Subsystems (3)
Tomer Maimon
maintainerv2 cover Nuvoton NPCM FIU DTS fixes and binding conversion
This series fixes the in-tree NPCM7xx FIU controller nodes so their resources match what the DTS actually describes, and converts the legacy Nuvoton NPCM FIU binding to YAML DT schema.
Patch 1 drops the bogus "memory" entry from reg-names on the NPCM7xx FIU nodes, which only describe the control register window today.
Patch 2 replaces the TXT binding with a YAML schema, documents the optional memory-mapped flash window explicitly, and accepts the existing FIU clock-names used by the in-tree DTS users.
Addressed comments from:
- Krzysztof Kozlowski : https://lkml.org/lkml/2025/11/13/473
Changes since version 1:
- Drop interrupts property.
- Drop unused label.
- Keep reg as the second property, followed by reg-names.
Tomer Maimon (2):
arm: dts: nuvoton: npcm7xx: Drop bogus FIU memory reg-names
spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
.../bindings/spi/nuvoton,npcm-fiu.txt | 58 ------------ .../bindings/spi/nuvoton,npcm-fiu.yaml | 91 +++++++++++++++++++ .../dts/nuvoton/nuvoton-common-npcm7xx.dtsi | 6 +- 3 files changed, 94 insertions(+), 61 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt create mode 100644 Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml
Signature · 1 line
2.34.1
Tomer Maimon
maintainerPATCH v2 1/2 arm: dts: nuvoton: npcm7xx: Drop bogus FIU memory reg-names
The NPCM7xx FIU controller nodes only describe the control register block, but they still advertise a second "memory" entry in reg-names. Drop the bogus name so the DTS matches the resources actually present in each node.
--- arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi +3 -3
@@ -191,7 +191,7 @@ fiu0: spi@fb000000 { #address-cells = <1>; #size-cells = <0>; reg = <0xfb000000 0x1000>; - reg-names = "control", "memory"; + reg-names = "control"; clocks = <&clk NPCM7XX_CLK_SPI0>; clock-names = "clk_spi0"; status = "disabled";
@@ -202,7 +202,7 @@ fiu3: spi@c0000000 { #address-cells = <1>; #size-cells = <0>; reg = <0xc0000000 0x1000>; - reg-names = "control", "memory"; + reg-names = "control"; clocks = <&clk NPCM7XX_CLK_SPI3>; clock-names = "clk_spi3"; pinctrl-names = "default";
@@ -215,7 +215,7 @@ fiux: spi@fb001000 { #address-cells = <1>; #size-cells = <0>; reg = <0xfb001000 0x1000>; - reg-names = "control", "memory"; + reg-names = "control"; clocks = <&clk NPCM7XX_CLK_SPIX>; clock-names = "clk_spix"; status = "disabled";
Signature · 1 line
2.34.1
Re: [PATCH v2 1/2] arm: dts: nuvoton: npcm7xx: Drop bogus FIU memory reg-names
Quoted 8 lines · Tomer Maimon
The NPCM7xx FIU controller nodes only describe the control register block, but they still advertise a second "memory" entry in reg-names. Drop the bogus name so the DTS matches the resources actually present in each node.
Signed-off-by Tomer Maimon <[email protected]>--- arch/arm/boot/dts/nuvoton/nuvoton-common-npcm7xx.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Best regards,
Krzysztof
Tomer Maimon
maintainerPATCH v2 2/2 spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
In reply to Tomer MaimonConvert the Nuvoton NPCM FIU binding to DT schema format.
--- .../bindings/spi/nuvoton,npcm-fiu.txt | 58 ------------ .../bindings/spi/nuvoton,npcm-fiu.yaml | 91 +++++++++++++++++++ 2 files changed, 91 insertions(+), 58 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt create mode 100644 Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.txt deleted +0 -58
@@ -1,58 +0,0 @@ -* Nuvoton FLASH Interface Unit (FIU) SPI Controller - -NPCM FIU supports single, dual and quad communication interface. - -The NPCM7XX supports three FIU modules, -FIU0 and FIUx supports two chip selects, -FIU3 support four chip select. - -The NPCM8XX supports four FIU modules, -FIU0 and FIUx supports two chip selects, -FIU1 and FIU3 supports four chip selects. - -Required properties: - - compatible : "nuvoton,npcm750-fiu" for Poleg NPCM7XX BMC - "nuvoton,npcm845-fiu" for Arbel NPCM8XX BMC - - #address-cells : should be 1. - - #size-cells : should be 0. - - reg : the first contains the register location and length, - the second contains the memory mapping address and length - - reg-names: Should contain the reg names "control" and "memory" - - clocks : phandle of FIU reference clock. - -Required properties in case the pins can be muxed: - - pinctrl-names : a pinctrl state named "default" must be defined. - - pinctrl-0 : phandle referencing pin configuration of the device. - -Optional property: - - nuvoton,spix-mode: enable spix-mode for an expansion bus to an ASIC or CPLD. - -Aliases: -- All the FIU controller nodes should be represented in the aliases node using - the following format 'fiu{n}' where n is a unique number for the alias. - In the NPCM7XX BMC: - fiu0 represent fiu 0 controller - fiu1 represent fiu 3 controller - fiu2 represent fiu x controller - - In the NPCM8XX BMC: - fiu0 represent fiu 0 controller - fiu1 represent fiu 1 controller - fiu2 represent fiu 3 controller - fiu3 represent fiu x controller - -Example: -fiu3: spi@c00000000 { - compatible = "nuvoton,npcm750-fiu"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0xfb000000 0x1000>, <0x80000000 0x10000000>; - reg-names = "control", "memory"; - clocks = <&clk NPCM7XX_CLK_AHB>; - pinctrl-names = "default"; - pinctrl-0 = <&spi3_pins>; - flash@0 { - ... - }; -}; -
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +91 -0
91 lines not on this page · raw message
Signature · 1 line
2.34.1
[email protected]
AI reviewRe: [PATCH v2 2/2] spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The alias mapping convention for NPCM8XX was corrupted during the conversion to YAML. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The alias mapping convention for NPCM8XX was corrupted during the conversion to YAML. --
commit 04ac00da42e73e1f171a2c2d3fdb84bc4768096a
Author: Tomer Maimon <[email protected]>
spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
This commit converts the Nuvoton NPCM FIU binding to the DT schema format.
Quoted 5 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +0
-0
[ ... ]
Quoted 5 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +5
-0+description: | + NPCM FIU supports single, dual and quad communication interface. + + The NPCM7XX supports three FIU modules: + FIU0 and FIUx support two chip selects
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml line 29
Quoted 10 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +10
-0+ 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;
[Severity: Low]
Does this new alias mapping for NPCM8xx correctly match the original text binding?
The original text binding in nuvoton,npcm-fiu.txt mapped the aliases as:
In the NPCM8XX BMC:
fiu0 represent fiu 0 controller
fiu1 represent fiu 1 controller
fiu2 represent fiu 3 controller
fiu3 represent fiu x controller
The converted documentation maps fiu1 to fiu3, fiu2 to fiux, and fiu3 to fiu1. Could you confirm if this change in the documentation was intentional?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Tomer Maimon
maintainerRe: [PATCH v2 2/2] spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
Thanks for the review.
Quoted 42 lines · On Mon, 8 Jun 2026 at 21:01, <[email protected]> wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The alias mapping convention for NPCM8XX was corrupted during the conversion to YAML. --commit
04ac00da42e73e1f171a2c2d3fdb84bc4768096a
Author: Tomer Maimon <[email protected]>spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
This commit converts the Nuvoton NPCM FIU binding to the DT schema format.
Quoted 5 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +0
-0[ ... ]
Quoted 5 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +5
-0+description: | + NPCM FIU supports single, dual and quad communication interface. + + The NPCM7XX supports three FIU modules: + FIU0 and FIUx support two chip selectsDocumentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml line 29
Quoted 10 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +10
-0+ 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;[Severity: Low]
Does this new alias mapping for NPCM8xx correctly match the original text binding?The original text binding in nuvoton,npcm-fiu.txt mapped the aliases as:
Quoted 8 lines
In the NPCM8XX BMC:
fiu0 represent fiu 0 controller
fiu1 represent fiu 1 controller
fiu2 represent fiu 3 controller
fiu3 represent fiu x controllerThe converted documentation maps fiu1 to fiu3, fiu2 to fiux, and fiu3 to fiu1. Could you confirm if this change in the documentation was intentional?
Yes, it is intentional; the map in the text document file was wrong.
Quoted 3 lines
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Best regards,
Tomer
Re: [PATCH v2 2/2] spi: dt-bindings: nuvoton,npcm-fiu: Convert to DT schema
In reply to Tomer MaimonQuoted 1 line · Tomer Maimon
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.
...
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml
Quoted 6 lines
(quoted diff) +0
-1-Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +0
-0
Filename: nuvoton,npcm750-fiu.yaml
Quoted 49 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +48
-0@@ -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 +
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml line 58
Quoted 10 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +10
-0+ 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.
Quoted 12 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +12
-0+ + 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
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml line 80
Quoted 10 lines
Documentation/devicetree/bindings/spi/nuvoton,npcm-fiu.yaml new file +10
-0+ +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