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

dt-bindings: spi: tegra-slink: Convert to json-schema

Convert the Tegra SLINK bindings from the free-form text format to
json-schema.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230705152603.2514235-1-thierry.reding@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Thierry Reding and committed by
Mark Brown
8c87a46e 4f81b540

+90 -37
-37
Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.txt
··· 1 - NVIDIA Tegra20/Tegra30 SLINK controller. 2 - 3 - Required properties: 4 - - compatible : should be "nvidia,tegra20-slink", "nvidia,tegra30-slink". 5 - - reg: Should contain SLINK registers location and length. 6 - - interrupts: Should contain SLINK interrupts. 7 - - clocks : Must contain one entry, for the module clock. 8 - See ../clocks/clock-bindings.txt for details. 9 - - resets : Must contain an entry for each entry in reset-names. 10 - See ../reset/reset.txt for details. 11 - - reset-names : Must include the following entries: 12 - - spi 13 - - dmas : Must contain an entry for each entry in clock-names. 14 - See ../dma/dma.txt for details. 15 - - dma-names : Must include the following entries: 16 - - rx 17 - - tx 18 - 19 - Recommended properties: 20 - - spi-max-frequency: Definition as per 21 - Documentation/devicetree/bindings/spi/spi-bus.txt 22 - 23 - Example: 24 - 25 - spi@7000d600 { 26 - compatible = "nvidia,tegra20-slink"; 27 - reg = <0x7000d600 0x200>; 28 - interrupts = <0 82 0x04>; 29 - spi-max-frequency = <25000000>; 30 - #address-cells = <1>; 31 - #size-cells = <0>; 32 - clocks = <&tegra_car 44>; 33 - resets = <&tegra_car 44>; 34 - reset-names = "spi"; 35 - dmas = <&apbdma 16>, <&apbdma 16>; 36 - dma-names = "rx", "tx"; 37 - };
+90
Documentation/devicetree/bindings/spi/nvidia,tegra20-slink.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/nvidia,tegra20-slink.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: NVIDIA Tegra20/30 SLINK controller 8 + 9 + maintainers: 10 + - Thierry Reding <thierry.reding@gmail.com> 11 + - Jon Hunter <jonathanh@nvidia.com> 12 + 13 + properties: 14 + compatible: 15 + enum: 16 + - nvidia,tegra20-slink 17 + - nvidia,tegra30-slink 18 + 19 + reg: 20 + maxItems: 1 21 + 22 + interrupts: 23 + maxItems: 1 24 + 25 + clocks: 26 + items: 27 + - description: module clock 28 + 29 + resets: 30 + items: 31 + - description: module reset 32 + 33 + reset-names: 34 + items: 35 + - const: spi 36 + 37 + dmas: 38 + items: 39 + - description: DMA channel used for reception 40 + - description: DMA channel used for transmission 41 + 42 + dma-names: 43 + items: 44 + - const: rx 45 + - const: tx 46 + 47 + operating-points-v2: 48 + $ref: /schemas/types.yaml#/definitions/phandle 49 + 50 + power-domains: 51 + items: 52 + - description: phandle to the core power domain 53 + 54 + spi-max-frequency: 55 + description: Maximum SPI clocking speed of the controller in Hz. 56 + $ref: /schemas/types.yaml#/definitions/uint32 57 + 58 + allOf: 59 + - $ref: spi-controller.yaml 60 + 61 + unevaluatedProperties: false 62 + 63 + required: 64 + - compatible 65 + - reg 66 + - interrupts 67 + - clocks 68 + - resets 69 + - reset-names 70 + - dmas 71 + - dma-names 72 + 73 + examples: 74 + - | 75 + #include <dt-bindings/clock/tegra20-car.h> 76 + #include <dt-bindings/interrupt-controller/arm-gic.h> 77 + 78 + spi@7000d600 { 79 + compatible = "nvidia,tegra20-slink"; 80 + reg = <0x7000d600 0x200>; 81 + interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 82 + spi-max-frequency = <25000000>; 83 + #address-cells = <1>; 84 + #size-cells = <0>; 85 + clocks = <&tegra_car TEGRA20_CLK_SBC2>; 86 + resets = <&tegra_car 44>; 87 + reset-names = "spi"; 88 + dmas = <&apbdma 16>, <&apbdma 16>; 89 + dma-names = "rx", "tx"; 90 + };