050-ARM-dts-enable-clock-support-for-BCM5301X.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. From e96ef422d0095fe9ae39b03c0805a0db8ff7e382 Mon Sep 17 00:00:00 2001
  2. From: Jon Mason <jonmason@broadcom.com>
  3. Date: Tue, 13 Oct 2015 17:22:25 -0400
  4. Subject: [PATCH 50/50] 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. ---
  9. arch/arm/boot/dts/bcm5301x.dtsi | 88 ++++++++++++++++++++++++++++++++---------
  10. 1 file changed, 69 insertions(+), 19 deletions(-)
  11. --- a/arch/arm/boot/dts/bcm5301x.dtsi
  12. +++ b/arch/arm/boot/dts/bcm5301x.dtsi
  13. @@ -8,6 +8,7 @@
  14. * Licensed under the GNU/GPL. See COPYING for details.
  15. */
  16. +#include <dt-bindings/clock/bcm-nsp.h>
  17. #include <dt-bindings/gpio/gpio.h>
  18. #include <dt-bindings/input/input.h>
  19. #include <dt-bindings/interrupt-controller/irq.h>
  20. @@ -42,41 +43,48 @@
  21. mpcore {
  22. compatible = "simple-bus";
  23. - ranges = <0x00000000 0x19020000 0x00003000>;
  24. + ranges = <0x00000000 0x19000000 0x00023000>;
  25. #address-cells = <1>;
  26. #size-cells = <1>;
  27. - scu@0000 {
  28. + a9pll: arm_clk@00000 {
  29. + #clock-cells = <0>;
  30. + compatible = "brcm,nsp-armpll";
  31. + clocks = <&osc>;
  32. + reg = <0x00000 0x1000>;
  33. + };
  34. +
  35. + scu@20000 {
  36. compatible = "arm,cortex-a9-scu";
  37. - reg = <0x0000 0x100>;
  38. + reg = <0x20000 0x100>;
  39. };
  40. - timer@0200 {
  41. + timer@20200 {
  42. compatible = "arm,cortex-a9-global-timer";
  43. - reg = <0x0200 0x100>;
  44. + reg = <0x20200 0x100>;
  45. interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
  46. - clocks = <&clk_periph>;
  47. + clocks = <&periph_clk>;
  48. };
  49. - local-timer@0600 {
  50. + local-timer@20600 {
  51. compatible = "arm,cortex-a9-twd-timer";
  52. - reg = <0x0600 0x100>;
  53. + reg = <0x20600 0x100>;
  54. interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
  55. - clocks = <&clk_periph>;
  56. + clocks = <&periph_clk>;
  57. };
  58. - gic: interrupt-controller@1000 {
  59. + gic: interrupt-controller@21000 {
  60. compatible = "arm,cortex-a9-gic";
  61. #interrupt-cells = <3>;
  62. #address-cells = <0>;
  63. interrupt-controller;
  64. - reg = <0x1000 0x1000>,
  65. - <0x0100 0x100>;
  66. + reg = <0x21000 0x1000>,
  67. + <0x20100 0x100>;
  68. };
  69. - L2: cache-controller@2000 {
  70. + L2: cache-controller@22000 {
  71. compatible = "arm,pl310-cache";
  72. - reg = <0x2000 0x1000>;
  73. + reg = <0x22000 0x1000>;
  74. cache-unified;
  75. arm,shared-override;
  76. prefetch-data = <1>;
  77. @@ -94,14 +102,37 @@
  78. clocks {
  79. #address-cells = <1>;
  80. - #size-cells = <0>;
  81. + #size-cells = <1>;
  82. + ranges;
  83. - /* As long as we do not have a real clock driver us this
  84. - * fixed clock */
  85. - clk_periph: periph {
  86. + osc: oscillator {
  87. + #clock-cells = <0>;
  88. compatible = "fixed-clock";
  89. + clock-frequency = <25000000>;
  90. + };
  91. +
  92. + iprocmed: iprocmed {
  93. #clock-cells = <0>;
  94. - clock-frequency = <400000000>;
  95. + compatible = "fixed-factor-clock";
  96. + clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
  97. + clock-div = <2>;
  98. + clock-mult = <1>;
  99. + };
  100. +
  101. + iprocslow: iprocslow {
  102. + #clock-cells = <0>;
  103. + compatible = "fixed-factor-clock";
  104. + clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>;
  105. + clock-div = <4>;
  106. + clock-mult = <1>;
  107. + };
  108. +
  109. + periph_clk: periph_clk {
  110. + #clock-cells = <0>;
  111. + compatible = "fixed-factor-clock";
  112. + clocks = <&a9pll>;
  113. + clock-div = <2>;
  114. + clock-mult = <1>;
  115. };
  116. };
  117. @@ -189,4 +220,23 @@
  118. brcm,nand-has-wp;
  119. };
  120. +
  121. + lcpll0: lcpll0@1800c100 {
  122. + #clock-cells = <1>;
  123. + compatible = "brcm,nsp-lcpll0";
  124. + reg = <0x1800c100 0x14>;
  125. + clocks = <&osc>;
  126. + clock-output-names = "lcpll0", "pcie_phy", "sdio",
  127. + "ddr_phy";
  128. + };
  129. +
  130. + genpll: genpll@1800c140 {
  131. + #clock-cells = <1>;
  132. + compatible = "brcm,nsp-genpll";
  133. + reg = <0x1800c140 0x24>;
  134. + clocks = <&osc>;
  135. + clock-output-names = "genpll", "phy", "ethernetclk",
  136. + "usbclk", "iprocfast", "sata1",
  137. + "sata2";
  138. + };
  139. };