leds-lgm.yaml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/leds/leds-lgm.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Intel Lightning Mountain (LGM) SoC LED Serial Shift Output (SSO) Controller driver
  7. maintainers:
  8. - Zhu, Yi Xin <Yixin.zhu@intel.com>
  9. - Amireddy Mallikarjuna reddy <mallikarjunax.reddy@intel.com>
  10. properties:
  11. compatible:
  12. const: intel,lgm-ssoled
  13. reg:
  14. maxItems: 1
  15. clocks:
  16. maxItems: 2
  17. clock-names:
  18. items:
  19. - const: sso
  20. - const: fpid
  21. gpio-controller: true
  22. '#gpio-cells':
  23. const: 2
  24. ngpios:
  25. minimum: 0
  26. maximum: 32
  27. description:
  28. Number of GPIOs this controller provides.
  29. intel,sso-update-rate-hz:
  30. description:
  31. Blink frequency for SOUTs in Hz.
  32. led-controller:
  33. type: object
  34. description:
  35. This sub-node must contain a sub-node for each leds.
  36. additionalProperties: false
  37. properties:
  38. '#address-cells':
  39. const: 1
  40. '#size-cells':
  41. const: 0
  42. patternProperties:
  43. "^led@[0-2]$":
  44. $ref: common.yaml#
  45. unevaluatedProperties: false
  46. properties:
  47. reg:
  48. description: Index of the LED.
  49. minimum: 0
  50. maximum: 2
  51. led-gpios:
  52. maxItems: 1
  53. intel,sso-hw-trigger:
  54. type: boolean
  55. description: This property indicates Hardware driven/control LED.
  56. intel,sso-hw-blink:
  57. type: boolean
  58. description: This property indicates Enable LED blink by Hardware.
  59. intel,sso-blink-rate-hz:
  60. description: LED HW blink frequency.
  61. retain-state-suspended:
  62. type: boolean
  63. description: The suspend state of LED can be retained.
  64. retain-state-shutdown:
  65. type: boolean
  66. description: Retain the state of the LED on shutdown.
  67. required:
  68. - compatible
  69. - reg
  70. - clocks
  71. - clock-names
  72. - "#gpio-cells"
  73. - gpio-controller
  74. additionalProperties: false
  75. examples:
  76. - |
  77. #include <dt-bindings/clock/intel,lgm-clk.h>
  78. #include <dt-bindings/leds/common.h>
  79. ssogpio: ssogpio@e0d40000 {
  80. compatible = "intel,lgm-ssoled";
  81. reg = <0xE0D40000 0x2E4>;
  82. gpio-controller;
  83. #gpio-cells = <2>;
  84. ngpios = <32>;
  85. pinctrl-names = "default";
  86. pinctrl-0 = <&pinctrl_ledc>;
  87. clocks = <&cgu0 LGM_GCLK_LEDC0>, <&afeclk>;
  88. clock-names = "sso", "fpid";
  89. intel,sso-update-rate-hz = <250000>;
  90. led-controller {
  91. #address-cells = <1>;
  92. #size-cells = <0>;
  93. led@0 {
  94. reg = <0>;
  95. function = "gphy";
  96. color = <LED_COLOR_ID_GREEN>;
  97. led-gpios = <&ssogpio 0 0>;
  98. };
  99. led@2 {
  100. reg = <2>;
  101. function = LED_FUNCTION_POWER;
  102. color = <LED_COLOR_ID_GREEN>;
  103. led-gpios = <&ssogpio 23 0>;
  104. };
  105. };
  106. };