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

spi: dt-bindings: Convert Freescale SPI bindings to YAML

fsl-spi.txt contains the bindings for the fsl,spi and fsl,espi
contollers. Convert them to YAML.

Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Link: https://patch.msgid.link/20250220-ppcyaml-spi-v3-1-e340613c7875@posteo.net
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

J. Neuschäfer and committed by
Mark Brown
f3bfa0f0 cb15abd4

+139 -62
+65
Documentation/devicetree/bindings/spi/fsl,espi.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/fsl,espi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale eSPI (Enhanced Serial Peripheral Interface) controller 8 + 9 + maintainers: 10 + - J. Neuschäfer <j.ne@posteo.net> 11 + 12 + properties: 13 + compatible: 14 + const: fsl,mpc8536-espi 15 + 16 + reg: 17 + maxItems: 1 18 + 19 + interrupts: 20 + maxItems: 1 21 + 22 + fsl,espi-num-chipselects: 23 + $ref: /schemas/types.yaml#/definitions/uint32 24 + enum: [ 1, 4 ] 25 + description: The number of the chipselect signals. 26 + 27 + fsl,csbef: 28 + $ref: /schemas/types.yaml#/definitions/uint32 29 + minimum: 0 30 + maximum: 15 31 + description: Chip select assertion time in bits before frame starts 32 + 33 + fsl,csaft: 34 + $ref: /schemas/types.yaml#/definitions/uint32 35 + minimum: 0 36 + maximum: 15 37 + description: Chip select negation time in bits after frame ends 38 + 39 + required: 40 + - compatible 41 + - reg 42 + - interrupts 43 + - fsl,espi-num-chipselects 44 + 45 + allOf: 46 + - $ref: spi-controller.yaml# 47 + 48 + unevaluatedProperties: false 49 + 50 + examples: 51 + - | 52 + #include <dt-bindings/interrupt-controller/irq.h> 53 + 54 + spi@110000 { 55 + compatible = "fsl,mpc8536-espi"; 56 + reg = <0x110000 0x1000>; 57 + #address-cells = <1>; 58 + #size-cells = <0>; 59 + interrupts = <53 IRQ_TYPE_EDGE_FALLING>; 60 + fsl,espi-num-chipselects = <4>; 61 + fsl,csbef = <1>; 62 + fsl,csaft = <1>; 63 + }; 64 + 65 + ...
+74
Documentation/devicetree/bindings/spi/fsl,spi.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/fsl,spi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale SPI (Serial Peripheral Interface) controller 8 + 9 + maintainers: 10 + - J. Neuschäfer <j.ne@posteo.net> 11 + 12 + properties: 13 + compatible: 14 + enum: 15 + - fsl,spi 16 + - aeroflexgaisler,spictrl 17 + 18 + reg: 19 + maxItems: 1 20 + 21 + cell-index: 22 + $ref: /schemas/types.yaml#/definitions/uint32 23 + description: | 24 + QE SPI subblock index. 25 + 0: QE subblock SPI1 26 + 1: QE subblock SPI2 27 + 28 + mode: 29 + description: SPI operation mode 30 + enum: 31 + - cpu 32 + - cpu-qe 33 + 34 + interrupts: 35 + maxItems: 1 36 + 37 + clock-frequency: 38 + description: input clock frequency to non FSL_SOC cores 39 + 40 + cs-gpios: true 41 + 42 + fsl,spisel_boot: 43 + $ref: /schemas/types.yaml#/definitions/flag 44 + description: 45 + For the MPC8306 and MPC8309, specifies that the SPISEL_BOOT signal is used 46 + as chip select for a slave device. Use reg = <number of gpios> in the 47 + corresponding child node, i.e. 0 if the cs-gpios property is not present. 48 + 49 + required: 50 + - compatible 51 + - reg 52 + - mode 53 + - interrupts 54 + 55 + allOf: 56 + - $ref: spi-controller.yaml# 57 + 58 + unevaluatedProperties: false 59 + 60 + examples: 61 + - | 62 + #include <dt-bindings/interrupt-controller/irq.h> 63 + 64 + spi@4c0 { 65 + compatible = "fsl,spi"; 66 + reg = <0x4c0 0x40>; 67 + cell-index = <0>; 68 + interrupts = <82 0>; 69 + mode = "cpu"; 70 + cs-gpios = <&gpio 18 IRQ_TYPE_EDGE_RISING // device reg=<0> 71 + &gpio 19 IRQ_TYPE_EDGE_RISING>; // device reg=<1> 72 + }; 73 + 74 + ...
-62
Documentation/devicetree/bindings/spi/fsl-spi.txt
··· 1 - * SPI (Serial Peripheral Interface) 2 - 3 - Required properties: 4 - - cell-index : QE SPI subblock index. 5 - 0: QE subblock SPI1 6 - 1: QE subblock SPI2 7 - - compatible : should be "fsl,spi" or "aeroflexgaisler,spictrl". 8 - - mode : the SPI operation mode, it can be "cpu" or "cpu-qe". 9 - - reg : Offset and length of the register set for the device 10 - - interrupts : <a b> where a is the interrupt number and b is a 11 - field that represents an encoding of the sense and level 12 - information for the interrupt. This should be encoded based on 13 - the information in section 2) depending on the type of interrupt 14 - controller you have. 15 - - clock-frequency : input clock frequency to non FSL_SOC cores 16 - 17 - Optional properties: 18 - - cs-gpios : specifies the gpio pins to be used for chipselects. 19 - The gpios will be referred to as reg = <index> in the SPI child nodes. 20 - If unspecified, a single SPI device without a chip select can be used. 21 - - fsl,spisel_boot : for the MPC8306 and MPC8309, specifies that the 22 - SPISEL_BOOT signal is used as chip select for a slave device. Use 23 - reg = <number of gpios> in the corresponding child node, i.e. 0 if 24 - the cs-gpios property is not present. 25 - 26 - Example: 27 - spi@4c0 { 28 - cell-index = <0>; 29 - compatible = "fsl,spi"; 30 - reg = <4c0 40>; 31 - interrupts = <82 0>; 32 - interrupt-parent = <700>; 33 - mode = "cpu"; 34 - cs-gpios = <&gpio 18 1 // device reg=<0> 35 - &gpio 19 1>; // device reg=<1> 36 - }; 37 - 38 - 39 - * eSPI (Enhanced Serial Peripheral Interface) 40 - 41 - Required properties: 42 - - compatible : should be "fsl,mpc8536-espi". 43 - - reg : Offset and length of the register set for the device. 44 - - interrupts : should contain eSPI interrupt, the device has one interrupt. 45 - - fsl,espi-num-chipselects : the number of the chipselect signals. 46 - 47 - Optional properties: 48 - - fsl,csbef: chip select assertion time in bits before frame starts 49 - - fsl,csaft: chip select negation time in bits after frame ends 50 - 51 - Example: 52 - spi@110000 { 53 - #address-cells = <1>; 54 - #size-cells = <0>; 55 - compatible = "fsl,mpc8536-espi"; 56 - reg = <0x110000 0x1000>; 57 - interrupts = <53 0x2>; 58 - interrupt-parent = <&mpic>; 59 - fsl,espi-num-chipselects = <4>; 60 - fsl,csbef = <1>; 61 - fsl,csaft = <1>; 62 - };