apple,smc.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/apple,smc.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Apple Mac System Management Controller
  7. maintainers:
  8. - Sven Peter <sven@kernel.org>
  9. description:
  10. Apple Mac System Management Controller implements various functions
  11. such as GPIO, RTC, power, reboot.
  12. properties:
  13. compatible:
  14. oneOf:
  15. - items:
  16. - const: apple,t6020-smc
  17. - const: apple,t8103-smc
  18. - items:
  19. - enum:
  20. # Do not add additional SoC to this list.
  21. - apple,t6000-smc
  22. - apple,t8103-smc
  23. - apple,t8112-smc
  24. - const: apple,smc
  25. reg:
  26. items:
  27. - description: SMC area
  28. - description: SRAM area
  29. reg-names:
  30. items:
  31. - const: smc
  32. - const: sram
  33. mboxes:
  34. maxItems: 1
  35. gpio:
  36. $ref: /schemas/gpio/apple,smc-gpio.yaml
  37. reboot:
  38. $ref: /schemas/power/reset/apple,smc-reboot.yaml
  39. rtc:
  40. $ref: /schemas/rtc/apple,smc-rtc.yaml
  41. additionalProperties: false
  42. required:
  43. - compatible
  44. - reg
  45. - reg-names
  46. - mboxes
  47. examples:
  48. - |
  49. soc {
  50. #address-cells = <2>;
  51. #size-cells = <2>;
  52. smc@23e400000 {
  53. compatible = "apple,t8103-smc", "apple,smc";
  54. reg = <0x2 0x3e400000 0x0 0x4000>,
  55. <0x2 0x3fe00000 0x0 0x100000>;
  56. reg-names = "smc", "sram";
  57. mboxes = <&smc_mbox>;
  58. smc_gpio: gpio {
  59. compatible = "apple,smc-gpio";
  60. gpio-controller;
  61. #gpio-cells = <2>;
  62. };
  63. reboot {
  64. compatible = "apple,smc-reboot";
  65. nvmem-cells = <&shutdown_flag>, <&boot_stage>,
  66. <&boot_error_count>, <&panic_count>;
  67. nvmem-cell-names = "shutdown_flag", "boot_stage",
  68. "boot_error_count", "panic_count";
  69. };
  70. rtc {
  71. compatible = "apple,smc-rtc";
  72. nvmem-cells = <&rtc_offset>;
  73. nvmem-cell-names = "rtc_offset";
  74. };
  75. };
  76. };