^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) %YAML 1.2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) $id: http://devicetree.org/schemas/spi/spi-gpio.yaml#
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) $schema: http://devicetree.org/meta-schemas/core.yaml#
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) title: SPI-GPIO devicetree bindings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) maintainers:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - Rob Herring <robh@kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) This represents a group of 3-n GPIO lines used for bit-banged SPI on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) dedicated GPIO lines.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) allOf:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) - $ref: "/schemas/spi/spi-controller.yaml#"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) compatible:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) const: spi-gpio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) sck-gpios:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) description: GPIO spec for the SCK line to use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) maxItems: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) miso-gpios:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) description: GPIO spec for the MISO line to use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) maxItems: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) mosi-gpios:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) description: GPIO spec for the MOSI line to use
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) maxItems: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) cs-gpios:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) description: GPIOs to use for chipselect lines.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) Not needed if num-chipselects = <0>.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) minItems: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) maxItems: 1024
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) num-chipselects:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) description: Number of chipselect lines. Should be <0> if a single device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) with no chip select is connected.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) $ref: "/schemas/types.yaml#/definitions/uint32"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) # Deprecated properties
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) gpio-sck: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) gpio-miso: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) gpio-mosi: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) required:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) - compatible
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) - num-chipselects
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) - sck-gpios
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) unevaluatedProperties: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) examples:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) - |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) spi {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) compatible = "spi-gpio";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) #address-cells = <0x1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) #size-cells = <0x0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) sck-gpios = <&gpio 95 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) miso-gpios = <&gpio 98 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) mosi-gpios = <&gpio 97 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) cs-gpios = <&gpio 125 0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) num-chipselects = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) /* clients */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) ...