mstar-v7.dtsi 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright (c) 2020 thingy.jp.
  4. * Author: Daniel Palmer <[email protected]>
  5. */
  6. #include <dt-bindings/interrupt-controller/irq.h>
  7. #include <dt-bindings/interrupt-controller/arm-gic.h>
  8. #include <dt-bindings/clock/mstar-msc313-mpll.h>
  9. / {
  10. #address-cells = <1>;
  11. #size-cells = <1>;
  12. interrupt-parent = <&gic>;
  13. cpus: cpus {
  14. #address-cells = <1>;
  15. #size-cells = <0>;
  16. cpu0: cpu@0 {
  17. device_type = "cpu";
  18. compatible = "arm,cortex-a7";
  19. reg = <0x0>;
  20. clocks = <&cpupll>;
  21. clock-names = "cpuclk";
  22. };
  23. };
  24. arch_timer {
  25. compatible = "arm,armv7-timer";
  26. interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2)
  27. | IRQ_TYPE_LEVEL_LOW)>,
  28. <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2)
  29. | IRQ_TYPE_LEVEL_LOW)>,
  30. <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2)
  31. | IRQ_TYPE_LEVEL_LOW)>,
  32. <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2)
  33. | IRQ_TYPE_LEVEL_LOW)>;
  34. /*
  35. * we shouldn't need this but the vendor
  36. * u-boot is broken
  37. */
  38. clock-frequency = <6000000>;
  39. arm,cpu-registers-not-fw-configured;
  40. };
  41. pmu: pmu {
  42. compatible = "arm,cortex-a7-pmu";
  43. interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
  44. interrupt-affinity = <&cpu0>;
  45. };
  46. clocks: clocks {
  47. xtal: xtal {
  48. #clock-cells = <0>;
  49. compatible = "fixed-clock";
  50. clock-frequency = <24000000>;
  51. };
  52. rtc_xtal: rtc_xtal {
  53. #clock-cells = <0>;
  54. compatible = "fixed-clock";
  55. clock-frequency = <32768>;
  56. status = "disabled";
  57. };
  58. xtal_div2: xtal_div2 {
  59. #clock-cells = <0>;
  60. compatible = "fixed-factor-clock";
  61. clocks = <&xtal>;
  62. clock-div = <2>;
  63. clock-mult = <1>;
  64. };
  65. };
  66. soc: soc {
  67. compatible = "simple-bus";
  68. #address-cells = <1>;
  69. #size-cells = <1>;
  70. ranges = <0x16001000 0x16001000 0x00007000>,
  71. <0x1f000000 0x1f000000 0x00400000>,
  72. <0xa0000000 0xa0000000 0x20000>;
  73. gic: interrupt-controller@16001000 {
  74. compatible = "arm,cortex-a7-gic";
  75. reg = <0x16001000 0x1000>,
  76. <0x16002000 0x2000>,
  77. <0x16004000 0x2000>,
  78. <0x16006000 0x2000>;
  79. #interrupt-cells = <3>;
  80. interrupt-controller;
  81. interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2)
  82. | IRQ_TYPE_LEVEL_LOW)>;
  83. };
  84. riu: bus@1f000000 {
  85. compatible = "simple-bus";
  86. reg = <0x1f000000 0x00400000>;
  87. #address-cells = <1>;
  88. #size-cells = <1>;
  89. ranges = <0x0 0x1f000000 0x00400000>;
  90. pmsleep: syscon@1c00 {
  91. compatible = "mstar,msc313-pmsleep", "syscon";
  92. reg = <0x1c00 0x100>;
  93. };
  94. reboot {
  95. compatible = "syscon-reboot";
  96. regmap = <&pmsleep>;
  97. offset = <0xb8>;
  98. mask = <0x79>;
  99. };
  100. rtc@2400 {
  101. compatible = "mstar,msc313-rtc";
  102. reg = <0x2400 0x40>;
  103. clocks = <&xtal_div2>;
  104. interrupts-extended = <&intc_irq GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
  105. };
  106. watchdog@6000 {
  107. compatible = "mstar,msc313e-wdt";
  108. reg = <0x6000 0x1f>;
  109. clocks = <&xtal_div2>;
  110. };
  111. intc_fiq: interrupt-controller@201310 {
  112. compatible = "mstar,mst-intc";
  113. reg = <0x201310 0x40>;
  114. #interrupt-cells = <3>;
  115. interrupt-controller;
  116. interrupt-parent = <&gic>;
  117. mstar,irqs-map-range = <96 127>;
  118. };
  119. intc_irq: interrupt-controller@201350 {
  120. compatible = "mstar,mst-intc";
  121. reg = <0x201350 0x40>;
  122. #interrupt-cells = <3>;
  123. interrupt-controller;
  124. interrupt-parent = <&gic>;
  125. mstar,irqs-map-range = <32 95>;
  126. mstar,intc-no-eoi;
  127. };
  128. l3bridge: l3bridge@204400 {
  129. compatible = "mstar,l3bridge";
  130. reg = <0x204400 0x200>;
  131. };
  132. mpll: mpll@206000 {
  133. compatible = "mstar,msc313-mpll";
  134. #clock-cells = <1>;
  135. reg = <0x206000 0x200>;
  136. clocks = <&xtal>;
  137. };
  138. cpupll: cpupll@206400 {
  139. compatible = "mstar,msc313-cpupll";
  140. reg = <0x206400 0x200>;
  141. #clock-cells = <0>;
  142. clocks = <&mpll MSTAR_MSC313_MPLL_DIV2>;
  143. };
  144. gpio: gpio@207800 {
  145. #gpio-cells = <2>;
  146. reg = <0x207800 0x200>;
  147. gpio-controller;
  148. #interrupt-cells = <2>;
  149. interrupt-controller;
  150. interrupt-parent = <&intc_fiq>;
  151. status = "disabled";
  152. };
  153. pm_uart: uart@221000 {
  154. compatible = "ns16550a";
  155. reg = <0x221000 0x100>;
  156. reg-shift = <3>;
  157. interrupts-extended = <&intc_irq GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
  158. clock-frequency = <172000000>;
  159. status = "disabled";
  160. };
  161. };
  162. imi: sram@a0000000 {
  163. compatible = "mmio-sram";
  164. reg = <0xa0000000 0x10000>;
  165. };
  166. };
  167. };