Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: dt-bindings: nuvoton,npcm-pspi: Convert to DT schema

Convert the Nuvoton NPCM PSPI binding to DT schema format.

Also update the binding to fix shortcoming:
* Drop clock-frequency property: it is never read in the NPCM PSPI
driver and has no effect.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20251112150950.1680154-1-tmaimon77@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Tomer Maimon and committed by
Mark Brown
1d562ba0 4a58f60d

+72 -36
-36
Documentation/devicetree/bindings/spi/nuvoton,npcm-pspi.txt
··· 1 - Nuvoton NPCM Peripheral Serial Peripheral Interface(PSPI) controller driver 2 - 3 - Nuvoton NPCM7xx SOC support two PSPI channels. 4 - 5 - Required properties: 6 - - compatible : "nuvoton,npcm750-pspi" for Poleg NPCM7XX. 7 - "nuvoton,npcm845-pspi" for Arbel NPCM8XX. 8 - - #address-cells : should be 1. see spi-bus.txt 9 - - #size-cells : should be 0. see spi-bus.txt 10 - - specifies physical base address and size of the register. 11 - - interrupts : contain PSPI interrupt. 12 - - clocks : phandle of PSPI reference clock. 13 - - clock-names: Should be "clk_apb5". 14 - - pinctrl-names : a pinctrl state named "default" must be defined. 15 - - pinctrl-0 : phandle referencing pin configuration of the device. 16 - - resets : phandle to the reset control for this device. 17 - - cs-gpios: Specifies the gpio pins to be used for chipselects. 18 - See: Documentation/devicetree/bindings/spi/spi-bus.txt 19 - 20 - Optional properties: 21 - - clock-frequency : Input clock frequency to the PSPI block in Hz. 22 - Default is 25000000 Hz. 23 - 24 - spi0: spi@f0200000 { 25 - compatible = "nuvoton,npcm750-pspi"; 26 - reg = <0xf0200000 0x1000>; 27 - pinctrl-names = "default"; 28 - pinctrl-0 = <&pspi1_pins>; 29 - #address-cells = <1>; 30 - #size-cells = <0>; 31 - interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 32 - clocks = <&clk NPCM7XX_CLK_APB5>; 33 - clock-names = "clk_apb5"; 34 - resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_PSPI1> 35 - cs-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; 36 - };
+72
Documentation/devicetree/bindings/spi/nuvoton,npcm-pspi.yaml
··· 1 + # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/nuvoton,npcm-pspi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Nuvoton NPCM Peripheral SPI (PSPI) Controller 8 + 9 + maintainers: 10 + - Tomer Maimon <tmaimon77@gmail.com> 11 + 12 + allOf: 13 + - $ref: spi-controller.yaml# 14 + 15 + description: 16 + Nuvoton NPCM Peripheral Serial Peripheral Interface (PSPI) controller. 17 + Nuvoton NPCM7xx SOC supports two PSPI channels. 18 + Nuvoton NPCM8xx SOC support one PSPI channel. 19 + 20 + properties: 21 + compatible: 22 + enum: 23 + - nuvoton,npcm750-pspi # Poleg NPCM7XX 24 + - nuvoton,npcm845-pspi # Arbel NPCM8XX 25 + 26 + reg: 27 + maxItems: 1 28 + 29 + interrupts: 30 + maxItems: 1 31 + 32 + clocks: 33 + maxItems: 1 34 + description: PSPI reference clock. 35 + 36 + clock-names: 37 + items: 38 + - const: clk_apb5 39 + 40 + resets: 41 + maxItems: 1 42 + 43 + required: 44 + - compatible 45 + - reg 46 + - interrupts 47 + - clocks 48 + - clock-names 49 + - resets 50 + 51 + unevaluatedProperties: false 52 + 53 + examples: 54 + - | 55 + #include <dt-bindings/clock/nuvoton,npcm7xx-clock.h> 56 + #include <dt-bindings/interrupt-controller/arm-gic.h> 57 + #include <dt-bindings/reset/nuvoton,npcm7xx-reset.h> 58 + #include "dt-bindings/gpio/gpio.h" 59 + spi0: spi@f0200000 { 60 + compatible = "nuvoton,npcm750-pspi"; 61 + reg = <0xf0200000 0x1000>; 62 + pinctrl-names = "default"; 63 + pinctrl-0 = <&pspi1_pins>; 64 + #address-cells = <1>; 65 + #size-cells = <0>; 66 + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; 67 + clocks = <&clk NPCM7XX_CLK_APB5>; 68 + clock-names = "clk_apb5"; 69 + resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_PSPI1>; 70 + cs-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>; 71 + }; 72 +