0053-dt-bindings-clock-Add-StarFive-JH7110-Image-Signal-P.patch 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. From 70df2590923e262ce8bf2b4f497f3481511d4fd6 Mon Sep 17 00:00:00 2001
  2. From: Xingyu Wu <[email protected]>
  3. Date: Thu, 18 May 2023 18:12:26 +0800
  4. Subject: [PATCH 053/122] dt-bindings: clock: Add StarFive JH7110
  5. Image-Signal-Process clock and reset generator
  6. Add bindings for the Image-Signal-Process clock and reset
  7. generator (ISPCRG) on the JH7110 RISC-V SoC by StarFive Ltd.
  8. Reviewed-by: Krzysztof Kozlowski <[email protected]>
  9. Signed-off-by: Xingyu Wu <[email protected]>
  10. ---
  11. .../clock/starfive,jh7110-ispcrg.yaml | 87 +++++++++++++++++++
  12. .../dt-bindings/clock/starfive,jh7110-crg.h | 18 ++++
  13. .../dt-bindings/reset/starfive,jh7110-crg.h | 16 ++++
  14. 3 files changed, 121 insertions(+)
  15. create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-ispcrg.yaml
  16. --- /dev/null
  17. +++ b/Documentation/devicetree/bindings/clock/starfive,jh7110-ispcrg.yaml
  18. @@ -0,0 +1,87 @@
  19. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  20. +%YAML 1.2
  21. +---
  22. +$id: http://devicetree.org/schemas/clock/starfive,jh7110-ispcrg.yaml#
  23. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  24. +
  25. +title: StarFive JH7110 Image-Signal-Process Clock and Reset Generator
  26. +
  27. +maintainers:
  28. + - Xingyu Wu <[email protected]>
  29. +
  30. +properties:
  31. + compatible:
  32. + const: starfive,jh7110-ispcrg
  33. +
  34. + reg:
  35. + maxItems: 1
  36. +
  37. + clocks:
  38. + items:
  39. + - description: ISP Top core
  40. + - description: ISP Top Axi
  41. + - description: NOC ISP Bus
  42. + - description: external DVP
  43. +
  44. + clock-names:
  45. + items:
  46. + - const: isp_top_core
  47. + - const: isp_top_axi
  48. + - const: noc_bus_isp_axi
  49. + - const: dvp_clk
  50. +
  51. + resets:
  52. + items:
  53. + - description: ISP Top core
  54. + - description: ISP Top Axi
  55. + - description: NOC ISP Bus
  56. +
  57. + '#clock-cells':
  58. + const: 1
  59. + description:
  60. + See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
  61. +
  62. + '#reset-cells':
  63. + const: 1
  64. + description:
  65. + See <dt-bindings/reset/starfive,jh7110-crg.h> for valid indices.
  66. +
  67. + power-domains:
  68. + maxItems: 1
  69. + description:
  70. + ISP domain power
  71. +
  72. +required:
  73. + - compatible
  74. + - reg
  75. + - clocks
  76. + - clock-names
  77. + - resets
  78. + - '#clock-cells'
  79. + - '#reset-cells'
  80. + - power-domains
  81. +
  82. +additionalProperties: false
  83. +
  84. +examples:
  85. + - |
  86. + #include <dt-bindings/clock/starfive,jh7110-crg.h>
  87. + #include <dt-bindings/power/starfive,jh7110-pmu.h>
  88. + #include <dt-bindings/reset/starfive,jh7110-crg.h>
  89. +
  90. + ispcrg: clock-controller@19810000 {
  91. + compatible = "starfive,jh7110-ispcrg";
  92. + reg = <0x19810000 0x10000>;
  93. + clocks = <&syscrg JH7110_SYSCLK_ISP_TOP_CORE>,
  94. + <&syscrg JH7110_SYSCLK_ISP_TOP_AXI>,
  95. + <&syscrg JH7110_SYSCLK_NOC_BUS_ISP_AXI>,
  96. + <&dvp_clk>;
  97. + clock-names = "isp_top_core", "isp_top_axi",
  98. + "noc_bus_isp_axi", "dvp_clk";
  99. + resets = <&syscrg JH7110_SYSRST_ISP_TOP>,
  100. + <&syscrg JH7110_SYSRST_ISP_TOP_AXI>,
  101. + <&syscrg JH7110_SYSRST_NOC_BUS_ISP_AXI>;
  102. + #clock-cells = <1>;
  103. + #reset-cells = <1>;
  104. + power-domains = <&pwrc JH7110_PD_ISP>;
  105. + };
  106. --- a/include/dt-bindings/clock/starfive,jh7110-crg.h
  107. +++ b/include/dt-bindings/clock/starfive,jh7110-crg.h
  108. @@ -258,4 +258,22 @@
  109. #define JH7110_STGCLK_END 29
  110. +/* ISPCRG clocks */
  111. +#define JH7110_ISPCLK_DOM4_APB_FUNC 0
  112. +#define JH7110_ISPCLK_MIPI_RX0_PXL 1
  113. +#define JH7110_ISPCLK_DVP_INV 2
  114. +#define JH7110_ISPCLK_M31DPHY_CFG_IN 3
  115. +#define JH7110_ISPCLK_M31DPHY_REF_IN 4
  116. +#define JH7110_ISPCLK_M31DPHY_TX_ESC_LAN0 5
  117. +#define JH7110_ISPCLK_VIN_APB 6
  118. +#define JH7110_ISPCLK_VIN_SYS 7
  119. +#define JH7110_ISPCLK_VIN_PIXEL_IF0 8
  120. +#define JH7110_ISPCLK_VIN_PIXEL_IF1 9
  121. +#define JH7110_ISPCLK_VIN_PIXEL_IF2 10
  122. +#define JH7110_ISPCLK_VIN_PIXEL_IF3 11
  123. +#define JH7110_ISPCLK_VIN_P_AXI_WR 12
  124. +#define JH7110_ISPCLK_ISPV2_TOP_WRAPPER_C 13
  125. +
  126. +#define JH7110_ISPCLK_END 14
  127. +
  128. #endif /* __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__ */
  129. --- a/include/dt-bindings/reset/starfive,jh7110-crg.h
  130. +++ b/include/dt-bindings/reset/starfive,jh7110-crg.h
  131. @@ -179,4 +179,20 @@
  132. #define JH7110_STGRST_END 23
  133. +/* ISPCRG resets */
  134. +#define JH7110_ISPRST_ISPV2_TOP_WRAPPER_P 0
  135. +#define JH7110_ISPRST_ISPV2_TOP_WRAPPER_C 1
  136. +#define JH7110_ISPRST_M31DPHY_HW 2
  137. +#define JH7110_ISPRST_M31DPHY_B09_AON 3
  138. +#define JH7110_ISPRST_VIN_APB 4
  139. +#define JH7110_ISPRST_VIN_PIXEL_IF0 5
  140. +#define JH7110_ISPRST_VIN_PIXEL_IF1 6
  141. +#define JH7110_ISPRST_VIN_PIXEL_IF2 7
  142. +#define JH7110_ISPRST_VIN_PIXEL_IF3 8
  143. +#define JH7110_ISPRST_VIN_SYS 9
  144. +#define JH7110_ISPRST_VIN_P_AXI_RD 10
  145. +#define JH7110_ISPRST_VIN_P_AXI_WR 11
  146. +
  147. +#define JH7110_ISPRST_END 12
  148. +
  149. #endif /* __DT_BINDINGS_RESET_STARFIVE_JH7110_CRG_H__ */