0035-dt-bindings-power-Add-starfive-jh7110-pmu.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. From 35bc6491a7b24872155a616f7770d3a5d6e40344 Mon Sep 17 00:00:00 2001
  2. From: Walker Chen <[email protected]>
  3. Date: Thu, 19 Jan 2023 17:44:46 +0800
  4. Subject: [PATCH 035/122] dt-bindings: power: Add starfive,jh7110-pmu
  5. Add bindings for the Power Management Unit on the StarFive JH7110 SoC.
  6. Signed-off-by: Walker Chen <[email protected]>
  7. Reviewed-by: Krzysztof Kozlowski <[email protected]>
  8. Reviewed-by: Conor Dooley <[email protected]>
  9. Reviewed-by: Heiko Stuebner <[email protected]>
  10. ---
  11. .../bindings/power/starfive,jh7110-pmu.yaml | 45 +++++++++++++++++++
  12. .../dt-bindings/power/starfive,jh7110-pmu.h | 17 +++++++
  13. 2 files changed, 62 insertions(+)
  14. create mode 100644 Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml
  15. create mode 100644 include/dt-bindings/power/starfive,jh7110-pmu.h
  16. --- /dev/null
  17. +++ b/Documentation/devicetree/bindings/power/starfive,jh7110-pmu.yaml
  18. @@ -0,0 +1,45 @@
  19. +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  20. +%YAML 1.2
  21. +---
  22. +$id: http://devicetree.org/schemas/power/starfive,jh7110-pmu.yaml#
  23. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  24. +
  25. +title: StarFive JH7110 Power Management Unit
  26. +
  27. +maintainers:
  28. + - Walker Chen <[email protected]>
  29. +
  30. +description: |
  31. + StarFive JH7110 SoC includes support for multiple power domains which can be
  32. + powered on/off by software based on different application scenes to save power.
  33. +
  34. +properties:
  35. + compatible:
  36. + enum:
  37. + - starfive,jh7110-pmu
  38. +
  39. + reg:
  40. + maxItems: 1
  41. +
  42. + interrupts:
  43. + maxItems: 1
  44. +
  45. + "#power-domain-cells":
  46. + const: 1
  47. +
  48. +required:
  49. + - compatible
  50. + - reg
  51. + - interrupts
  52. + - "#power-domain-cells"
  53. +
  54. +additionalProperties: false
  55. +
  56. +examples:
  57. + - |
  58. + pwrc: power-controller@17030000 {
  59. + compatible = "starfive,jh7110-pmu";
  60. + reg = <0x17030000 0x10000>;
  61. + interrupts = <111>;
  62. + #power-domain-cells = <1>;
  63. + };
  64. --- /dev/null
  65. +++ b/include/dt-bindings/power/starfive,jh7110-pmu.h
  66. @@ -0,0 +1,17 @@
  67. +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
  68. +/*
  69. + * Copyright (C) 2022 StarFive Technology Co., Ltd.
  70. + * Author: Walker Chen <[email protected]>
  71. + */
  72. +#ifndef __DT_BINDINGS_POWER_JH7110_POWER_H__
  73. +#define __DT_BINDINGS_POWER_JH7110_POWER_H__
  74. +
  75. +#define JH7110_PD_SYSTOP 0
  76. +#define JH7110_PD_CPU 1
  77. +#define JH7110_PD_GPUA 2
  78. +#define JH7110_PD_VDEC 3
  79. +#define JH7110_PD_VOUT 4
  80. +#define JH7110_PD_ISP 5
  81. +#define JH7110_PD_VENC 6
  82. +
  83. +#endif