031-ARM-dts-enable-clock-support-for-BCM5301X.patch 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. From cdc36b22f0e4b8badf3db14395f0aa44dcbce4b3 Mon Sep 17 00:00:00 2001
  2. From: Jon Mason <jonmason@broadcom.com>
  3. Date: Fri, 20 Nov 2015 10:17:18 -0500
  4. Subject: [PATCH] ARM: dts: enable clock support for BCM5301X
  5. Replace current device tree dummy clocks with real clock support for
  6. Broadcom Northstar SoCs.
  7. Signed-off-by: Jon Mason <jonmason@broadcom.com>
  8. Reviewed-by: Ray Jui <rjui@broadcom.com>
  9. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
  10. ---
  11. arch/arm/boot/dts/bcm5301x.dtsi | 92 +++++++++++++++++++++++++++++++----------
  12. 1 file changed, 71 insertions(+), 21 deletions(-)
  13. --- a/arch/arm/boot/dts/bcm5301x.dtsi
  14. +++ b/arch/arm/boot/dts/bcm5301x.dtsi
  15. @@ -8,6 +8,7 @@
  16. * Licensed under the GNU/GPL. See COPYING for details.
  17. */
  18. +#include <dt-bindings/clock/bcm-nsp.h>
  19. #include <dt-bindings/gpio/gpio.h>
  20. #include <dt-bindings/input/input.h>
  21. #include <dt-bindings/interrupt-controller/irq.h>
  22. @@ -27,7 +28,7 @@
  23. compatible = "ns16550";
  24. reg = <0x0300 0x100>;
  25. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
  26. - clock-frequency = <100000000>;
  27. + clocks = <&iprocslow>;
  28. status = "disabled";
  29. };
  30. @@ -35,48 +36,55 @@
  31. compatible = "ns16550";
  32. reg = <0x0400 0x100>;
  33. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
  34. - clock-frequency = <100000000>;
  35. + clocks = <&iprocslow>;
  36. status = "disabled";
  37. };
  38. };
  39. mpcore {
  40. compatible = "simple-bus";
  41. - ranges = <0x00000000 0x19020000 0x00003000>;
  42. + ranges = <0x00000000 0x19000000 0x00023000>;
  43. #address-cells = <1>;
  44. #size-cells = <1>;
  45. - scu@0000 {
  46. + a9pll: arm_clk@00000 {
  47. + #clock-cells = <0>;
  48. + compatible = "brcm,nsp-armpll";
  49. + clocks = <&osc>;
  50. + reg = <0x00000 0x1000>;
  51. + };
  52. +
  53. + scu@20000 {
  54. compatible = "arm,cortex-a9-scu";
  55. - reg = <0x0000 0x100>;
  56. + reg = <0x20000 0x100>;
  57. };
  58. - timer@0200 {
  59. + timer@20200 {
  60. compatible = "arm,cortex-a9-global-timer";
  61. - reg = <0x0200 0x100>;
  62. + reg = <0x20200 0x100>;
  63. interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
  64. - clocks = <&clk_periph>;
  65. + clocks = <&periph_clk>;
  66. };
  67. - local-timer@0600 {
  68. + local-timer@20600 {
  69. compatible = "arm,cortex-a9-twd-timer";
  70. - reg = <0x0600 0x100>;
  71. + reg = <0x20600 0x100>;
  72. interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
  73. - clocks = <&clk_periph>;
  74. + clocks = <&periph_clk>;
  75. };
  76. - gic: interrupt-controller@1000 {
  77. + gic: interrupt-controller@21000 {
  78. compatible = "arm,cortex-a9-gic";
  79. #interrupt-cells = <3>;
  80. #address-cells = <0>;
  81. interrupt-controller;
  82. - reg = <0x1000 0x1000>,
  83. - <0x0100 0x100>;
  84. + reg = <0x21000 0x1000>,
  85. + <0x20100 0x100>;
  86. };
  87. - L2: cache-controller@2000 {
  88. + L2: cache-controller@22000 {
  89. compatible = "arm,pl310-cache";
  90. - reg = <0x2000 0x1000>;
  91. + reg = <0x22000 0x1000>;
  92. cache-unified;
  93. arm,shared-override;
  94. prefetch-data = <1>;
  95. @@ -94,14 +102,37 @@
  96. clocks {
  97. #address-cells = <1>;
  98. - #size-cells = <0>;
  99. + #size-cells = <1>;
  100. + ranges;
  101. - /* As long as we do not have a real clock driver us this
  102. - * fixed clock */
  103. - clk_periph: periph {
  104. + osc: oscillator {
  105. + #clock-cells = <0>;
  106. compatible = "fixed-clock";
  107. + clock-frequency = <25000000>;
  108. + };
  109. +
  110. + iprocmed: iprocmed {
  111. #clock-cells = <0>;
  112. - clock-frequency = <400000000>;
  113. + compatible = "fixed-factor-clock";
  114. + clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
  115. + clock-div = <2>;
  116. + clock-mult = <1>;
  117. + };
  118. +
  119. + iprocslow: iprocslow {
  120. + #clock-cells = <0>;
  121. + compatible = "fixed-factor-clock";
  122. + clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
  123. + clock-div = <4>;
  124. + clock-mult = <1>;
  125. + };
  126. +
  127. + periph_clk: periph_clk {
  128. + #clock-cells = <0>;
  129. + compatible = "fixed-factor-clock";
  130. + clocks = <&a9pll>;
  131. + clock-div = <2>;
  132. + clock-mult = <1>;
  133. };
  134. };
  135. @@ -178,6 +209,25 @@
  136. };
  137. };
  138. + lcpll0: lcpll0@1800c100 {
  139. + #clock-cells = <1>;
  140. + compatible = "brcm,nsp-lcpll0";
  141. + reg = <0x1800c100 0x14>;
  142. + clocks = <&osc>;
  143. + clock-output-names = "lcpll0", "pcie_phy", "sdio",
  144. + "ddr_phy";
  145. + };
  146. +
  147. + genpll: genpll@1800c140 {
  148. + #clock-cells = <1>;
  149. + compatible = "brcm,nsp-genpll";
  150. + reg = <0x1800c140 0x24>;
  151. + clocks = <&osc>;
  152. + clock-output-names = "genpll", "phy", "ethernetclk",
  153. + "usbclk", "iprocfast", "sata1",
  154. + "sata2";
  155. + };
  156. +
  157. nand: nand@18028000 {
  158. compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand";
  159. reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>;