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

spi: dt-bindings: qcom,spi-qup: convert to dtschema

Convert the Qualcomm Universal Peripheral (QUP) Serial Peripheral
Interface (SPI) bindings to DT Schema.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Kuldeep Singh <singh.kuldeep87k@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220405063451.12011-7-krzysztof.kozlowski@linaro.org

authored by

Krzysztof Kozlowski and committed by
Rob Herring
d6a4371c 92298ea3

+81 -103
-103
Documentation/devicetree/bindings/spi/qcom,spi-qup.txt
··· 1 - Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI) 2 - 3 - The QUP core is an AHB slave that provides a common data path (an output FIFO 4 - and an input FIFO) for serial peripheral interface (SPI) mini-core. 5 - 6 - SPI in master mode supports up to 50MHz, up to four chip selects, programmable 7 - data path from 4 bits to 32 bits and numerous protocol variants. 8 - 9 - Required properties: 10 - - compatible: Should contain: 11 - "qcom,spi-qup-v1.1.1" for 8660, 8960 and 8064. 12 - "qcom,spi-qup-v2.1.1" for 8974 and later 13 - "qcom,spi-qup-v2.2.1" for 8974 v2 and later. 14 - 15 - - reg: Should contain base register location and length 16 - - interrupts: Interrupt number used by this controller 17 - 18 - - clocks: Should contain the core clock and the AHB clock. 19 - - clock-names: Should be "core" for the core clock and "iface" for the 20 - AHB clock. 21 - 22 - - #address-cells: Number of cells required to define a chip select 23 - address on the SPI bus. Should be set to 1. 24 - - #size-cells: Should be zero. 25 - 26 - Optional properties: 27 - - spi-max-frequency: Specifies maximum SPI clock frequency, 28 - Units - Hz. Definition as per 29 - Documentation/devicetree/bindings/spi/spi-bus.txt 30 - - num-cs: total number of chipselects 31 - - cs-gpios: should specify GPIOs used for chipselects. 32 - The gpios will be referred to as reg = <index> in the SPI child 33 - nodes. If unspecified, a single SPI device without a chip 34 - select can be used. 35 - 36 - - dmas: Two DMA channel specifiers following the convention outlined 37 - in bindings/dma/dma.txt 38 - - dma-names: Names for the dma channels, if present. There must be at 39 - least one channel named "tx" for transmit and named "rx" for 40 - receive. 41 - 42 - SPI slave nodes must be children of the SPI master node and can contain 43 - properties described in Documentation/devicetree/bindings/spi/spi-bus.txt 44 - 45 - Example: 46 - 47 - spi_8: spi@f9964000 { /* BLSP2 QUP2 */ 48 - 49 - compatible = "qcom,spi-qup-v2"; 50 - #address-cells = <1>; 51 - #size-cells = <0>; 52 - reg = <0xf9964000 0x1000>; 53 - interrupts = <0 102 0>; 54 - spi-max-frequency = <19200000>; 55 - 56 - clocks = <&gcc GCC_BLSP2_QUP2_SPI_APPS_CLK>, <&gcc GCC_BLSP2_AHB_CLK>; 57 - clock-names = "core", "iface"; 58 - 59 - dmas = <&blsp1_bam 13>, <&blsp1_bam 12>; 60 - dma-names = "rx", "tx"; 61 - 62 - pinctrl-names = "default"; 63 - pinctrl-0 = <&spi8_default>; 64 - 65 - device@0 { 66 - compatible = "arm,pl022-dummy"; 67 - #address-cells = <1>; 68 - #size-cells = <1>; 69 - reg = <0>; /* Chip select 0 */ 70 - spi-max-frequency = <19200000>; 71 - spi-cpol; 72 - }; 73 - 74 - device@1 { 75 - compatible = "arm,pl022-dummy"; 76 - #address-cells = <1>; 77 - #size-cells = <1>; 78 - reg = <1>; /* Chip select 1 */ 79 - spi-max-frequency = <9600000>; 80 - spi-cpha; 81 - }; 82 - 83 - device@2 { 84 - compatible = "arm,pl022-dummy"; 85 - #address-cells = <1>; 86 - #size-cells = <1>; 87 - reg = <2>; /* Chip select 2 */ 88 - spi-max-frequency = <19200000>; 89 - spi-cpol; 90 - spi-cpha; 91 - }; 92 - 93 - device@3 { 94 - compatible = "arm,pl022-dummy"; 95 - #address-cells = <1>; 96 - #size-cells = <1>; 97 - reg = <3>; /* Chip select 3 */ 98 - spi-max-frequency = <19200000>; 99 - spi-cpol; 100 - spi-cpha; 101 - spi-cs-high; 102 - }; 103 - };
+81
Documentation/devicetree/bindings/spi/qcom,spi-qup.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/qcom,spi-qup.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Qualcomm Universal Peripheral (QUP) Serial Peripheral Interface (SPI) 8 + 9 + maintainers: 10 + - Andy Gross <agross@kernel.org> 11 + - Bjorn Andersson <bjorn.andersson@linaro.org> 12 + - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 13 + 14 + description: 15 + The QUP core is an AHB slave that provides a common data path (an output FIFO 16 + and an input FIFO) for serial peripheral interface (SPI) mini-core. 17 + 18 + SPI in master mode supports up to 50MHz, up to four chip selects, 19 + programmable data path from 4 bits to 32 bits and numerous protocol variants. 20 + 21 + allOf: 22 + - $ref: /schemas/spi/spi-controller.yaml# 23 + 24 + properties: 25 + compatible: 26 + enum: 27 + - qcom,spi-qup-v1.1.1 # for 8660, 8960 and 8064 28 + - qcom,spi-qup-v2.1.1 # for 8974 and later 29 + - qcom,spi-qup-v2.2.1 # for 8974 v2 and later 30 + 31 + clocks: 32 + maxItems: 2 33 + 34 + clock-names: 35 + items: 36 + - const: core 37 + - const: iface 38 + 39 + dmas: 40 + maxItems: 2 41 + 42 + dma-names: 43 + items: 44 + - const: tx 45 + - const: rx 46 + 47 + interrupts: 48 + maxItems: 1 49 + 50 + reg: 51 + maxItems: 1 52 + 53 + required: 54 + - compatible 55 + - clocks 56 + - clock-names 57 + - interrupts 58 + - reg 59 + 60 + unevaluatedProperties: false 61 + 62 + examples: 63 + - | 64 + #include <dt-bindings/clock/qcom,gcc-msm8996.h> 65 + #include <dt-bindings/interrupt-controller/arm-gic.h> 66 + 67 + spi@7575000 { 68 + compatible = "qcom,spi-qup-v2.2.1"; 69 + reg = <0x07575000 0x600>; 70 + interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; 71 + clocks = <&gcc GCC_BLSP1_QUP1_SPI_APPS_CLK>, 72 + <&gcc GCC_BLSP1_AHB_CLK>; 73 + clock-names = "core", "iface"; 74 + pinctrl-names = "default", "sleep"; 75 + pinctrl-0 = <&blsp1_spi1_default>; 76 + pinctrl-1 = <&blsp1_spi1_sleep>; 77 + dmas = <&blsp1_dma 12>, <&blsp1_dma 13>; 78 + dma-names = "tx", "rx"; 79 + #address-cells = <1>; 80 + #size-cells = <0>; 81 + };