spi-gpio.yaml 1.5 KB

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