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

spi: dt-bindings: fsl-dspi: Convert to yaml format

Convert dt-binding spi-fsl-dspi.txt to yaml format.
Use part Vladimir Oltean's work at of
https://lore.kernel.org/linux-spi/20221111224651.577729-1-vladimir.oltean@nxp.com/

Additional changes during convert:
- compatible string "fsl,ls1028a-dspi" can be followed by
fsl,ls1021a-v1.0-dspi.
- Change "dspi0@4002c000" to "spi@4002c000" in example.
- Reorder properties in example.
- Use GIC include in example.
- Deprecated fsl,spi-cs-sck-delay and fsl,spi-sck-cs-delay by use common SPI
property.
- Use compatible string 'jedec,spi-nor' in example.
- Split peripheral part to fsl,dspi-peripheral-props.yaml.
- Remove 'interrupts' and 'pinctrl' from required list.
- Update 'bus-num' description.
- Update 'spi-num-chipselects' description by add "cs-gpios don't count
against this number".
- Remove 'big-endian' description.

Co-developed-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
Co-developed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240624-ls_qspi-v4-2-3d1c6f5005bf@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Frank Li and committed by
Mark Brown
94f19d07 52e78777

+135 -66
+30
Documentation/devicetree/bindings/spi/fsl,dspi-peripheral-props.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/fsl,dspi-peripheral-props.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Peripheral-specific properties for Freescale DSPI controller 8 + 9 + maintainers: 10 + - Vladimir Oltean <olteanv@gmail.com> 11 + 12 + description: 13 + See spi-peripheral-props.yaml for more info. 14 + 15 + properties: 16 + fsl,spi-cs-sck-delay: 17 + deprecated: true 18 + description: 19 + Delay in nanoseconds between activating chip select and the start of 20 + clock signal, at the start of a transfer. 21 + $ref: /schemas/types.yaml#/definitions/uint32 22 + 23 + fsl,spi-sck-cs-delay: 24 + deprecated: true 25 + description: 26 + Delay in nanoseconds between stopping the clock signal and 27 + deactivating chip select, at the end of a transfer. 28 + $ref: /schemas/types.yaml#/definitions/uint32 29 + 30 + additionalProperties: true
+103
Documentation/devicetree/bindings/spi/fsl,dspi.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,dspi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: ARM Freescale DSPI controller 8 + 9 + maintainers: 10 + - Frank Li <Frank.Li@nxp.com> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - enum: 16 + - fsl,vf610-dspi 17 + - fsl,ls1021a-v1.0-dspi 18 + - fsl,ls1012a-dspi 19 + - fsl,ls1028a-dspi 20 + - fsl,ls1043a-dspi 21 + - fsl,ls1046a-dspi 22 + - fsl,ls1088a-dspi 23 + - fsl,ls2080a-dspi 24 + - fsl,ls2085a-dspi 25 + - fsl,lx2160a-dspi 26 + - items: 27 + - enum: 28 + - fsl,ls1012a-dspi 29 + - fsl,ls1028a-dspi 30 + - fsl,ls1043a-dspi 31 + - fsl,ls1046a-dspi 32 + - fsl,ls1088a-dspi 33 + - const: fsl,ls1021a-v1.0-dspi 34 + - items: 35 + - const: fsl,ls2080a-dspi 36 + - const: fsl,ls2085a-dspi 37 + 38 + reg: 39 + maxItems: 1 40 + 41 + interrupts: 42 + maxItems: 1 43 + 44 + clocks: 45 + maxItems: 1 46 + 47 + clock-names: 48 + items: 49 + - const: dspi 50 + 51 + spi-num-chipselects: 52 + $ref: /schemas/types.yaml#/definitions/uint32 53 + description: 54 + The number of the chip native chipselect signals. 55 + cs-gpios don't count against this number. 56 + 57 + big-endian: true 58 + 59 + bus-num: 60 + $ref: /schemas/types.yaml#/definitions/uint32 61 + description: SoC-specific identifier for the SPI controller. 62 + 63 + required: 64 + - compatible 65 + - reg 66 + - clocks 67 + - clock-names 68 + - spi-num-chipselects 69 + 70 + allOf: 71 + - $ref: spi-controller.yaml# 72 + 73 + unevaluatedProperties: false 74 + 75 + examples: 76 + - | 77 + #include <dt-bindings/interrupt-controller/arm-gic.h> 78 + #include <dt-bindings/clock/vf610-clock.h> 79 + 80 + spi@4002c000 { 81 + compatible = "fsl,vf610-dspi"; 82 + reg = <0x4002c000 0x1000>; 83 + #address-cells = <1>; 84 + #size-cells = <0>; 85 + interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>; 86 + clocks = <&clks VF610_CLK_DSPI0>; 87 + clock-names = "dspi"; 88 + spi-num-chipselects = <5>; 89 + bus-num = <0>; 90 + pinctrl-names = "default"; 91 + pinctrl-0 = <&pinctrl_dspi0_1>; 92 + big-endian; 93 + 94 + flash@0 { 95 + compatible = "jedec,spi-nor"; 96 + reg = <0>; 97 + spi-max-frequency = <16000000>; 98 + spi-cpol; 99 + spi-cpha; 100 + spi-cs-setup-delay-ns = <100>; 101 + spi-cs-hold-delay-ns = <50>; 102 + }; 103 + };
-65
Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt
··· 1 - ARM Freescale DSPI controller 2 - 3 - Required properties: 4 - - compatible : must be one of: 5 - "fsl,vf610-dspi", 6 - "fsl,ls1021a-v1.0-dspi", 7 - "fsl,ls1012a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), 8 - "fsl,ls1028a-dspi", 9 - "fsl,ls1043a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), 10 - "fsl,ls1046a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), 11 - "fsl,ls1088a-dspi" (optionally followed by "fsl,ls1021a-v1.0-dspi"), 12 - "fsl,ls2080a-dspi" (optionally followed by "fsl,ls2085a-dspi"), 13 - "fsl,ls2085a-dspi", 14 - "fsl,lx2160a-dspi", 15 - - reg : Offset and length of the register set for the device 16 - - interrupts : Should contain SPI controller interrupt 17 - - clocks: from common clock binding: handle to dspi clock. 18 - - clock-names: from common clock binding: Shall be "dspi". 19 - - pinctrl-0: pin control group to be used for this controller. 20 - - pinctrl-names: must contain a "default" entry. 21 - - spi-num-chipselects : the number of the chipselect signals. 22 - 23 - Optional property: 24 - - big-endian: If present the dspi device's registers are implemented 25 - in big endian mode. 26 - - bus-num : the slave chip chipselect signal number. 27 - 28 - Optional SPI slave node properties: 29 - - fsl,spi-cs-sck-delay: a delay in nanoseconds between activating chip 30 - select and the start of clock signal, at the start of a transfer. 31 - - fsl,spi-sck-cs-delay: a delay in nanoseconds between stopping the clock 32 - signal and deactivating chip select, at the end of a transfer. 33 - 34 - Example: 35 - 36 - dspi0@4002c000 { 37 - #address-cells = <1>; 38 - #size-cells = <0>; 39 - compatible = "fsl,vf610-dspi"; 40 - reg = <0x4002c000 0x1000>; 41 - interrupts = <0 67 0x04>; 42 - clocks = <&clks VF610_CLK_DSPI0>; 43 - clock-names = "dspi"; 44 - spi-num-chipselects = <5>; 45 - bus-num = <0>; 46 - pinctrl-names = "default"; 47 - pinctrl-0 = <&pinctrl_dspi0_1>; 48 - big-endian; 49 - 50 - sflash: at26df081a@0 { 51 - #address-cells = <1>; 52 - #size-cells = <1>; 53 - compatible = "atmel,at26df081a"; 54 - spi-max-frequency = <16000000>; 55 - spi-cpol; 56 - spi-cpha; 57 - reg = <0>; 58 - linux,modalias = "m25p80"; 59 - modal = "at26df081a"; 60 - fsl,spi-cs-sck-delay = <100>; 61 - fsl,spi-sck-cs-delay = <50>; 62 - }; 63 - }; 64 - 65 -
+1
Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
··· 122 122 allOf: 123 123 - $ref: arm,pl022-peripheral-props.yaml# 124 124 - $ref: cdns,qspi-nor-peripheral-props.yaml# 125 + - $ref: fsl,dspi-peripheral-props.yaml# 125 126 - $ref: samsung,spi-peripheral-props.yaml# 126 127 - $ref: nvidia,tegra210-quad-peripheral-props.yaml# 127 128
+1 -1
MAINTAINERS
··· 8708 8708 M: Vladimir Oltean <olteanv@gmail.com> 8709 8709 L: linux-spi@vger.kernel.org 8710 8710 S: Maintained 8711 - F: Documentation/devicetree/bindings/spi/spi-fsl-dspi.txt 8711 + F: Documentation/devicetree/bindings/spi/fsl,dspi*.yaml 8712 8712 F: drivers/spi/spi-fsl-dspi.c 8713 8713 F: include/linux/spi/spi-fsl-dspi.h 8714 8714