canaan,k210-sysctl.yaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/canaan,k210-sysctl.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Canaan Kendryte K210 System Controller
  7. maintainers:
  8. - Damien Le Moal <dlemoal@kernel.org>
  9. description:
  10. Canaan Inc. Kendryte K210 SoC system controller which provides a
  11. register map for controlling the clocks, reset signals and pin power
  12. domains of the SoC.
  13. properties:
  14. compatible:
  15. items:
  16. - const: canaan,k210-sysctl
  17. - const: syscon
  18. - const: simple-mfd
  19. clocks:
  20. maxItems: 1
  21. description:
  22. System controller Advanced Power Bus (APB) interface clock source.
  23. clock-names:
  24. items:
  25. - const: pclk
  26. reg:
  27. maxItems: 1
  28. clock-controller:
  29. # Child node
  30. type: object
  31. $ref: /schemas/clock/canaan,k210-clk.yaml
  32. description:
  33. Clock controller for the SoC clocks. This child node definition
  34. should follow the bindings specified in
  35. Documentation/devicetree/bindings/clock/canaan,k210-clk.yaml.
  36. reset-controller:
  37. # Child node
  38. type: object
  39. $ref: /schemas/reset/canaan,k210-rst.yaml
  40. description:
  41. Reset controller for the SoC. This child node definition
  42. should follow the bindings specified in
  43. Documentation/devicetree/bindings/reset/canaan,k210-rst.yaml.
  44. syscon-reboot:
  45. # Child node
  46. type: object
  47. $ref: /schemas/power/reset/syscon-reboot.yaml
  48. description:
  49. Reboot method for the SoC. This child node definition
  50. should follow the bindings specified in
  51. Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml.
  52. required:
  53. - compatible
  54. - clocks
  55. - reg
  56. - clock-controller
  57. additionalProperties: false
  58. examples:
  59. - |
  60. #include <dt-bindings/clock/k210-clk.h>
  61. #include <dt-bindings/reset/k210-rst.h>
  62. clocks {
  63. in0: oscllator {
  64. compatible = "fixed-clock";
  65. #clock-cells = <0>;
  66. clock-frequency = <26000000>;
  67. };
  68. };
  69. sysctl: syscon@50440000 {
  70. compatible = "canaan,k210-sysctl",
  71. "syscon", "simple-mfd";
  72. reg = <0x50440000 0x100>;
  73. clocks = <&sysclk K210_CLK_APB1>;
  74. clock-names = "pclk";
  75. sysclk: clock-controller {
  76. #clock-cells = <1>;
  77. compatible = "canaan,k210-clk";
  78. clocks = <&in0>;
  79. };
  80. sysrst: reset-controller {
  81. compatible = "canaan,k210-rst";
  82. #reset-cells = <1>;
  83. };
  84. reboot: syscon-reboot {
  85. compatible = "syscon-reboot";
  86. regmap = <&sysctl>;
  87. offset = <48>;
  88. mask = <1>;
  89. value = <1>;
  90. };
  91. };