spi: dt-bindings: Convert spi-gpio binding to json-schema
Convert the spi-gpio binding to DT schema format. Cc: Mark Brown <broonie@kernel.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-spi@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
101e6fce89
commit
97266c4d05
@ -1,43 +0,0 @@
|
||||
SPI-GPIO devicetree bindings
|
||||
|
||||
This represents a group of 3-n GPIO lines used for bit-banged SPI on dedicated
|
||||
GPIO lines.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: should be set to "spi-gpio"
|
||||
- #address-cells: should be set to <0x1>
|
||||
- ranges
|
||||
- sck-gpios: GPIO spec for the SCK line to use
|
||||
- miso-gpios: GPIO spec for the MISO line to use
|
||||
- mosi-gpios: GPIO spec for the MOSI line to use
|
||||
- cs-gpios: GPIOs to use for chipselect lines.
|
||||
Not needed if num-chipselects = <0>.
|
||||
- num-chipselects: Number of chipselect lines. Should be <0> if a single device
|
||||
with no chip select is connected.
|
||||
|
||||
Deprecated bindings:
|
||||
|
||||
These legacy GPIO line bindings can alternatively be used to define the
|
||||
GPIO lines used, they should not be used in new device trees.
|
||||
|
||||
- gpio-sck: GPIO spec for the SCK line to use
|
||||
- gpio-miso: GPIO spec for the MISO line to use
|
||||
- gpio-mosi: GPIO spec for the MOSI line to use
|
||||
|
||||
Example:
|
||||
|
||||
spi {
|
||||
compatible = "spi-gpio";
|
||||
#address-cells = <0x1>;
|
||||
ranges;
|
||||
|
||||
sck-gpios = <&gpio 95 0>;
|
||||
miso-gpios = <&gpio 98 0>;
|
||||
mosi-gpios = <&gpio 97 0>;
|
||||
cs-gpios = <&gpio 125 0>;
|
||||
num-chipselects = <1>;
|
||||
|
||||
/* clients */
|
||||
};
|
||||
|
72
Documentation/devicetree/bindings/spi/spi-gpio.yaml
Normal file
72
Documentation/devicetree/bindings/spi/spi-gpio.yaml
Normal file
@ -0,0 +1,72 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/spi/spi-gpio.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: SPI-GPIO devicetree bindings
|
||||
|
||||
maintainers:
|
||||
- Rob Herring <robh@kernel.org>
|
||||
|
||||
description:
|
||||
This represents a group of 3-n GPIO lines used for bit-banged SPI on
|
||||
dedicated GPIO lines.
|
||||
|
||||
allOf:
|
||||
- $ref: "/schemas/spi/spi-controller.yaml#"
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
const: spi-gpio
|
||||
|
||||
sck-gpios:
|
||||
description: GPIO spec for the SCK line to use
|
||||
maxItems: 1
|
||||
|
||||
miso-gpios:
|
||||
description: GPIO spec for the MISO line to use
|
||||
maxItems: 1
|
||||
|
||||
mosi-gpios:
|
||||
description: GPIO spec for the MOSI line to use
|
||||
maxItems: 1
|
||||
|
||||
cs-gpios:
|
||||
description: GPIOs to use for chipselect lines.
|
||||
Not needed if num-chipselects = <0>.
|
||||
minItems: 1
|
||||
maxItems: 1024
|
||||
|
||||
num-chipselects:
|
||||
description: Number of chipselect lines. Should be <0> if a single device
|
||||
with no chip select is connected.
|
||||
$ref: "/schemas/types.yaml#/definitions/uint32"
|
||||
|
||||
# Deprecated properties
|
||||
gpio-sck: false
|
||||
gpio-miso: false
|
||||
gpio-mosi: false
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- num-chipselects
|
||||
- sck-gpios
|
||||
|
||||
examples:
|
||||
- |
|
||||
spi {
|
||||
compatible = "spi-gpio";
|
||||
#address-cells = <0x1>;
|
||||
#size-cells = <0x0>;
|
||||
|
||||
sck-gpios = <&gpio 95 0>;
|
||||
miso-gpios = <&gpio 98 0>;
|
||||
mosi-gpios = <&gpio 97 0>;
|
||||
cs-gpios = <&gpio 125 0>;
|
||||
num-chipselects = <1>;
|
||||
|
||||
/* clients */
|
||||
};
|
||||
|
||||
...
|
Loading…
Reference in New Issue
Block a user