gpio-stp-xway.yaml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/gpio/gpio-stp-xway.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Lantiq SoC Serial To Parallel (STP) GPIO controller
  7. description: |
  8. The Serial To Parallel (STP) is found on MIPS based Lantiq socs. It is a
  9. peripheral controller used to drive external shift register cascades. At most
  10. 3 groups of 8 bits can be driven. The hardware is able to allow the DSL modem
  11. and Ethernet PHYs to drive some bytes of the cascade automatically.
  12. maintainers:
  13. - John Crispin <john@phrozen.org>
  14. properties:
  15. $nodename:
  16. pattern: "^gpio@[0-9a-f]+$"
  17. compatible:
  18. const: lantiq,gpio-stp-xway
  19. reg:
  20. maxItems: 1
  21. gpio-controller: true
  22. "#gpio-cells":
  23. description:
  24. The first cell is the pin number and the second cell is used to specify
  25. consumer flags.
  26. const: 2
  27. lantiq,shadow:
  28. description:
  29. The default value that we shall assume as already set on the
  30. shift register cascade.
  31. $ref: /schemas/types.yaml#/definitions/uint32
  32. minimum: 0x000000
  33. maximum: 0xffffff
  34. lantiq,groups:
  35. description:
  36. Set the 3 bit mask to select which of the 3 groups are enabled
  37. in the shift register cascade.
  38. $ref: /schemas/types.yaml#/definitions/uint32
  39. minimum: 0x0
  40. maximum: 0x7
  41. lantiq,dsl:
  42. description:
  43. The dsl core can control the 2 LSBs of the gpio cascade. This 2 bit
  44. property can enable this feature.
  45. $ref: /schemas/types.yaml#/definitions/uint32
  46. minimum: 0x0
  47. maximum: 0x3
  48. lantiq,rising:
  49. description:
  50. Use rising instead of falling edge for the shift register.
  51. type: boolean
  52. patternProperties:
  53. "^lantiq,phy[1-4]$":
  54. description:
  55. The gphy core can control 3 bits of the gpio cascade. In the xRX200 family
  56. phy[1-2] are available, in xRX330 phy[1-3] and in XRX330 phy[1-4].
  57. $ref: /schemas/types.yaml#/definitions/uint32
  58. minimum: 0x0
  59. maximum: 0x7
  60. required:
  61. - compatible
  62. - reg
  63. - gpio-controller
  64. - "#gpio-cells"
  65. additionalProperties: false
  66. examples:
  67. - |
  68. gpio@e100bb0 {
  69. compatible = "lantiq,gpio-stp-xway";
  70. reg = <0xE100BB0 0x40>;
  71. #gpio-cells = <2>;
  72. gpio-controller;
  73. pinctrl-0 = <&stp_pins>;
  74. pinctrl-names = "default";
  75. lantiq,shadow = <0xffffff>;
  76. lantiq,groups = <0x7>;
  77. lantiq,dsl = <0x3>;
  78. lantiq,phy1 = <0x7>;
  79. lantiq,phy2 = <0x7>;
  80. };
  81. ...