hifive1.dts 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /dts-v1/;
  2. / {
  3. #address-cells = <1>;
  4. #size-cells = <1>;
  5. compatible = "sifive,hifive1";
  6. model = "sifive,hifive1";
  7. chosen {
  8. stdout-path = "/soc/serial@10013000:115200";
  9. mee,entry = <&sip0 0x400000>;
  10. };
  11. cpus {
  12. #address-cells = <1>;
  13. #size-cells = <0>;
  14. compatible = "sifive,fe310-g000";
  15. L6: cpu@0 {
  16. clocks = <&hfclk>;
  17. compatible = "sifive,rocket0", "riscv";
  18. device_type = "cpu";
  19. i-cache-block-size = <64>;
  20. i-cache-sets = <128>;
  21. i-cache-size = <16384>;
  22. next-level-cache = <&sip0>;
  23. reg = <0>;
  24. riscv,isa = "rv32imac";
  25. sifive,dtim = <&dtim>;
  26. sifive,itim = <&itim>;
  27. status = "okay";
  28. timebase-frequency = <1000000>;
  29. hlic: interrupt-controller {
  30. #interrupt-cells = <1>;
  31. compatible = "riscv,cpu-intc";
  32. interrupt-controller;
  33. };
  34. };
  35. };
  36. soc {
  37. #address-cells = <1>;
  38. #size-cells = <1>;
  39. #clock-cells = <1>;
  40. compatible = "sifive,hifive1";
  41. ranges;
  42. hfxoscin: clock@0 {
  43. #clock-cells = <0>;
  44. compatible = "fixed-clock";
  45. clock-frequency = <16000000>;
  46. };
  47. hfxoscout: clock@1 {
  48. compatible = "sifive,fe310-g000,hfxosc";
  49. clocks = <&hfxoscin>;
  50. reg = <&prci 0x4>;
  51. reg-names = "config";
  52. };
  53. hfroscin: clock@2 {
  54. #clock-cells = <0>;
  55. compatible = "fixed-clock";
  56. clock-frequency = <72000000>;
  57. };
  58. hfroscout: clock@3 {
  59. compatible = "sifive,fe310-g000,hfrosc";
  60. clocks = <&hfroscin>;
  61. reg = <&prci 0x0>;
  62. reg-names = "config";
  63. };
  64. hfclk: clock@4 {
  65. compatible = "sifive,fe310-g000,pll";
  66. clocks = <&hfxoscout &hfroscout>;
  67. clock-names = "pllref", "pllsel0";
  68. reg = <&prci 0x8 &prci 0xc>;
  69. reg-names = "config", "divider";
  70. clock-frequency = <256000000>;
  71. };
  72. lfroscin: clock@5 {
  73. #clock-cells = <0>;
  74. compatible = "fixed-clock";
  75. clock-frequency = <32768>;
  76. };
  77. lfclk: clock@6 {
  78. compatible = "sifive,fe310-g000,lfrosc";
  79. clocks = <&lfroscin>;
  80. reg = <&aon 0x70>;
  81. reg-names = "config";
  82. };
  83. aon: aon@10000000 {
  84. compatible = "sifive,aon0";
  85. reg = <0x10000000 0x8000>;
  86. reg-names = "mem";
  87. };
  88. prci: prci@10008000 {
  89. compatible = "sifive,fe310-g000,prci";
  90. reg = <0x10008000 0x8000>;
  91. reg-names = "mem";
  92. };
  93. clint: clint@2000000 {
  94. compatible = "riscv,clint0";
  95. interrupts-extended = <&hlic 3 &hlic 7>;
  96. reg = <0x2000000 0x10000>;
  97. reg-names = "control";
  98. };
  99. local-external-interrupts-0 {
  100. compatible = "sifive,local-external-interrupts0";
  101. interrupt-parent = <&hlic>;
  102. interrupts = <16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31>;
  103. };
  104. plic: interrupt-controller@c000000 {
  105. #interrupt-cells = <1>;
  106. compatible = "riscv,plic0";
  107. interrupt-controller;
  108. interrupts-extended = <&hlic 11>;
  109. reg = <0xc000000 0x4000000>;
  110. reg-names = "control";
  111. riscv,max-priority = <7>;
  112. riscv,ndev = <26>;
  113. };
  114. global-external-interrupts {
  115. compatile = "sifive,global-external-interrupts0";
  116. interrupt-parent = <&plic>;
  117. interrupts = <1 2 3 4>;
  118. };
  119. debug-controller@0 {
  120. compatible = "sifive,debug-011", "riscv,debug-011";
  121. interrupts-extended = <&hlic 65535>;
  122. reg = <0x0 0x100>;
  123. reg-names = "control";
  124. };
  125. maskrom@1000 {
  126. reg = <0x1000 0x2000>;
  127. reg-names = "mem";
  128. };
  129. otp@20000 {
  130. reg = <0x20000 0x2000 0x10010000 0x1000>;
  131. reg-names = "mem", "control";
  132. };
  133. dtim: dtim@80000000 {
  134. compatible = "sifive,dtim0";
  135. reg = <0x80000000 0x4000>;
  136. reg-names = "mem";
  137. };
  138. itim: itim@8000000 {
  139. compatible = "sifive,itim0";
  140. reg = <0x8000000 0x4000>;
  141. reg-names = "mem";
  142. };
  143. pwm@10015000 {
  144. compatible = "sifive,pwm0";
  145. interrupt-parent = <&plic>;
  146. interrupts = <23 24 25 26>;
  147. reg = <0x10015000 0x1000>;
  148. reg-names = "control";
  149. };
  150. gpio0: gpio@10012000 {
  151. compatible = "sifive,gpio0";
  152. interrupt-parent = <&plic>;
  153. interrupts = <7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22>;
  154. reg = <0x10012000 0x1000>;
  155. reg-names = "control";
  156. };
  157. uart0: serial@10013000 {
  158. compatible = "sifive,uart0";
  159. interrupt-parent = <&plic>;
  160. interrupts = <5>;
  161. reg = <0x10013000 0x1000>;
  162. reg-names = "control";
  163. clocks = <&hfclk>;
  164. pinmux = <&gpio0 0x00030000 0x00030000>;
  165. };
  166. sip0: spi@10014000 {
  167. compatible = "sifive,spi0";
  168. interrupt-parent = <&plic>;
  169. interrupts = <6>;
  170. reg = <0x10014000 0x1000 0x20000000 0xF42400>;
  171. reg-names = "control", "mem";
  172. };
  173. };
  174. };