SPI-GPIO

Schema identifier ($id): "http://devicetree.org/schemas/spi/spi-gpio.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Rob Herring <robh@kernel.org>"

This represents a group of 3-n GPIO lines used for bit-banged SPI on dedicated GPIO lines.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/spi/spi-controller.yaml#

Properties and child nodes (properties) #

compatible — required here #

Exact value (const): "spi-gpio"

sck-gpios — required here #

GPIO spec for the SCK line to use

Maximum number of items (maxItems): 1

miso-gpios — not listed as required here #

GPIO spec for the MISO line to use

Maximum number of items (maxItems): 1

mosi-gpios — not listed as required here #

GPIO spec for the MOSI line to use

Maximum number of items (maxItems): 1

cs-gpios — not listed as required here #

GPIOs to use for chipselect lines. Not needed if num-chipselects = <0>.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 1024

num-chipselects — required here #

Number of chipselect lines. Should be <0> if a single device with no chip select is connected.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

gpio-sck — not listed as required here #

false — Not permitted by this property rule.

gpio-miso — not listed as required here #

false — Not permitted by this property rule.

gpio-mosi — not listed as required here #

false — Not permitted by this property rule.

Required in this object (required): "compatible", "num-chipselects", "sck-gpios"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (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 */
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Line 46: Deprecated properties

Edit this page