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

dt-bindings: spi: sprd,sc9860-spi: convert to YAML

Convert the Spreadtrum SC9860 SPI controller bindings to DT schema.
Adjust filename to match compatible.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/ZyH2P3FlneLtGxXo@standask-GA-A55M-S2HP
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Stanislav Jakubek and committed by
Mark Brown
8a9c1323 a992197b

+72 -33
-33
Documentation/devicetree/bindings/spi/spi-sprd.txt
··· 1 - Spreadtrum SPI Controller 2 - 3 - Required properties: 4 - - compatible: Should be "sprd,sc9860-spi". 5 - - reg: Offset and length of SPI controller register space. 6 - - interrupts: Should contain SPI interrupt. 7 - - clock-names: Should contain following entries: 8 - "spi" for SPI clock, 9 - "source" for SPI source (parent) clock, 10 - "enable" for SPI module enable clock. 11 - - clocks: List of clock input name strings sorted in the same order 12 - as the clock-names property. 13 - - #address-cells: The number of cells required to define a chip select 14 - address on the SPI bus. Should be set to 1. 15 - - #size-cells: Should be set to 0. 16 - 17 - Optional properties: 18 - dma-names: Should contain names of the SPI used DMA channel. 19 - dmas: Should contain DMA channels and DMA slave ids which the SPI used 20 - sorted in the same order as the dma-names property. 21 - 22 - Example: 23 - spi0: spi@70a00000{ 24 - compatible = "sprd,sc9860-spi"; 25 - reg = <0 0x70a00000 0 0x1000>; 26 - interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 27 - clock-names = "spi", "source","enable"; 28 - clocks = <&clk_spi0>, <&ext_26m>, <&clk_ap_apb_gates 5>; 29 - dma-names = "rx_chn", "tx_chn"; 30 - dmas = <&apdma 11 11>, <&apdma 12 12>; 31 - #address-cells = <1>; 32 - #size-cells = <0>; 33 - };
+72
Documentation/devicetree/bindings/spi/sprd,sc9860-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/sprd,sc9860-spi.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Spreadtrum SC9860 SPI Controller 8 + 9 + maintainers: 10 + - Orson Zhai <orsonzhai@gmail.com> 11 + - Baolin Wang <baolin.wang7@gmail.com> 12 + - Chunyan Zhang <zhang.lyra@gmail.com> 13 + 14 + properties: 15 + compatible: 16 + const: sprd,sc9860-spi 17 + 18 + reg: 19 + maxItems: 1 20 + 21 + interrupts: 22 + maxItems: 1 23 + 24 + clocks: 25 + items: 26 + - description: SPI clock 27 + - description: SPI source (parent) clock 28 + - description: SPI module enable clock 29 + 30 + clock-names: 31 + items: 32 + - const: spi 33 + - const: source 34 + - const: enable 35 + 36 + dmas: 37 + maxItems: 2 38 + 39 + dma-names: 40 + items: 41 + - const: rx_chn 42 + - const: tx_chn 43 + 44 + required: 45 + - compatible 46 + - reg 47 + - interrupts 48 + - clocks 49 + - clock-names 50 + 51 + allOf: 52 + - $ref: spi-controller.yaml# 53 + 54 + unevaluatedProperties: false 55 + 56 + examples: 57 + - | 58 + #include <dt-bindings/interrupt-controller/arm-gic.h> 59 + #include <dt-bindings/interrupt-controller/irq.h> 60 + 61 + spi@70a00000 { 62 + compatible = "sprd,sc9860-spi"; 63 + reg = <0x70a00000 0x1000>; 64 + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; 65 + clocks = <&clk_spi0>, <&ext_26m>, <&clk_ap_apb_gates 5>; 66 + clock-names = "spi", "source", "enable"; 67 + dmas = <&apdma 11 11>, <&apdma 12 12>; 68 + dma-names = "rx_chn", "tx_chn"; 69 + #address-cells = <1>; 70 + #size-cells = <0>; 71 + }; 72 + ...