test.dts 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. /dts-v1/;
  2. / {
  3. model = "sandbox";
  4. compatible = "sandbox";
  5. #address-cells = <1>;
  6. #size-cells = <0>;
  7. aliases {
  8. console = &uart0;
  9. eth0 = "/eth@10002000";
  10. eth5 = &eth_5;
  11. i2c0 = "/i2c@0";
  12. pci0 = &pci;
  13. rtc0 = &rtc_0;
  14. rtc1 = &rtc_1;
  15. spi0 = "/spi@0";
  16. testfdt6 = "/e-test";
  17. testbus3 = "/some-bus";
  18. testfdt0 = "/some-bus/c-test@0";
  19. testfdt1 = "/some-bus/c-test@1";
  20. testfdt3 = "/b-test";
  21. testfdt5 = "/some-bus/c-test@5";
  22. testfdt8 = "/a-test";
  23. usb0 = &usb_0;
  24. usb1 = &usb_1;
  25. usb2 = &usb_2;
  26. };
  27. a-test {
  28. reg = <0>;
  29. compatible = "denx,u-boot-fdt-test";
  30. ping-expect = <0>;
  31. ping-add = <0>;
  32. u-boot,dm-pre-reloc;
  33. test-gpios = <&gpio_a 1>, <&gpio_a 4>, <&gpio_b 5 0 3 2 1>,
  34. <0>, <&gpio_a 12>;
  35. test2-gpios = <&gpio_a 1>, <&gpio_a 4>, <&gpio_b 6 1 3 2 1>,
  36. <&gpio_b 7 2 3 2 1>, <&gpio_b 8 4 3 2 1>,
  37. <&gpio_b 9 0xc 3 2 1>;
  38. };
  39. junk {
  40. reg = <1>;
  41. compatible = "not,compatible";
  42. };
  43. no-compatible {
  44. reg = <2>;
  45. };
  46. b-test {
  47. reg = <3>;
  48. compatible = "denx,u-boot-fdt-test";
  49. ping-expect = <3>;
  50. ping-add = <3>;
  51. };
  52. some-bus {
  53. #address-cells = <1>;
  54. #size-cells = <0>;
  55. compatible = "denx,u-boot-test-bus";
  56. reg = <3>;
  57. ping-expect = <4>;
  58. ping-add = <4>;
  59. c-test@5 {
  60. compatible = "denx,u-boot-fdt-test";
  61. reg = <5>;
  62. ping-expect = <5>;
  63. ping-add = <5>;
  64. };
  65. c-test@0 {
  66. compatible = "denx,u-boot-fdt-test";
  67. reg = <0>;
  68. ping-expect = <6>;
  69. ping-add = <6>;
  70. };
  71. c-test@1 {
  72. compatible = "denx,u-boot-fdt-test";
  73. reg = <1>;
  74. ping-expect = <7>;
  75. ping-add = <7>;
  76. };
  77. };
  78. d-test {
  79. reg = <3>;
  80. ping-expect = <6>;
  81. ping-add = <6>;
  82. compatible = "google,another-fdt-test";
  83. };
  84. e-test {
  85. reg = <3>;
  86. ping-expect = <6>;
  87. ping-add = <6>;
  88. compatible = "google,another-fdt-test";
  89. };
  90. f-test {
  91. compatible = "denx,u-boot-fdt-test";
  92. };
  93. g-test {
  94. compatible = "denx,u-boot-fdt-test";
  95. };
  96. clk@0 {
  97. compatible = "sandbox,clk";
  98. };
  99. eth@10002000 {
  100. compatible = "sandbox,eth";
  101. reg = <0x10002000 0x1000>;
  102. fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x00>;
  103. };
  104. eth_5: eth@10003000 {
  105. compatible = "sandbox,eth";
  106. reg = <0x10003000 0x1000>;
  107. fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x11>;
  108. };
  109. eth@10004000 {
  110. compatible = "sandbox,eth";
  111. reg = <0x10004000 0x1000>;
  112. fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x22>;
  113. };
  114. gpio_a: base-gpios {
  115. compatible = "sandbox,gpio";
  116. gpio-controller;
  117. #gpio-cells = <1>;
  118. gpio-bank-name = "a";
  119. num-gpios = <20>;
  120. };
  121. gpio_b: extra-gpios {
  122. compatible = "sandbox,gpio";
  123. gpio-controller;
  124. #gpio-cells = <5>;
  125. gpio-bank-name = "b";
  126. num-gpios = <10>;
  127. };
  128. i2c@0 {
  129. #address-cells = <1>;
  130. #size-cells = <0>;
  131. reg = <0>;
  132. compatible = "sandbox,i2c";
  133. clock-frequency = <100000>;
  134. eeprom@2c {
  135. reg = <0x2c>;
  136. compatible = "i2c-eeprom";
  137. emul {
  138. compatible = "sandbox,i2c-eeprom";
  139. sandbox,filename = "i2c.bin";
  140. sandbox,size = <256>;
  141. };
  142. };
  143. rtc_0: rtc@43 {
  144. reg = <0x43>;
  145. compatible = "sandbox-rtc";
  146. emul {
  147. compatible = "sandbox,i2c-rtc";
  148. };
  149. };
  150. rtc_1: rtc@61 {
  151. reg = <0x61>;
  152. compatible = "sandbox-rtc";
  153. emul {
  154. compatible = "sandbox,i2c-rtc";
  155. };
  156. };
  157. sandbox_pmic: sandbox_pmic {
  158. reg = <0x40>;
  159. };
  160. };
  161. leds {
  162. compatible = "gpio-leds";
  163. iracibble {
  164. gpios = <&gpio_a 1 0>;
  165. label = "sandbox:red";
  166. };
  167. martinet {
  168. gpios = <&gpio_a 2 0>;
  169. label = "sandbox:green";
  170. };
  171. };
  172. mmc {
  173. compatible = "sandbox,mmc";
  174. };
  175. pci: pci-controller {
  176. compatible = "sandbox,pci";
  177. device_type = "pci";
  178. #address-cells = <3>;
  179. #size-cells = <2>;
  180. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  181. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  182. pci@1f,0 {
  183. compatible = "pci-generic";
  184. reg = <0xf800 0 0 0 0>;
  185. emul@1f,0 {
  186. compatible = "sandbox,swap-case";
  187. };
  188. };
  189. };
  190. ram {
  191. compatible = "sandbox,ram";
  192. };
  193. reset@0 {
  194. compatible = "sandbox,warm-reset";
  195. };
  196. reset@1 {
  197. compatible = "sandbox,reset";
  198. };
  199. spi@0 {
  200. #address-cells = <1>;
  201. #size-cells = <0>;
  202. reg = <0>;
  203. compatible = "sandbox,spi";
  204. cs-gpios = <0>, <&gpio_a 0>;
  205. spi.bin@0 {
  206. reg = <0>;
  207. compatible = "spansion,m25p16", "spi-flash";
  208. spi-max-frequency = <40000000>;
  209. sandbox,filename = "spi.bin";
  210. };
  211. };
  212. syscon@0 {
  213. compatible = "sandbox,syscon0";
  214. reg = <0x10>;
  215. };
  216. syscon@1 {
  217. compatible = "sandbox,syscon1";
  218. reg = <0x20>;
  219. };
  220. uart0: serial {
  221. compatible = "sandbox,serial";
  222. u-boot,dm-pre-reloc;
  223. };
  224. usb_0: usb@0 {
  225. compatible = "sandbox,usb";
  226. status = "disabled";
  227. hub {
  228. compatible = "sandbox,usb-hub";
  229. #address-cells = <1>;
  230. #size-cells = <0>;
  231. flash-stick {
  232. reg = <0>;
  233. compatible = "sandbox,usb-flash";
  234. };
  235. };
  236. };
  237. usb_1: usb@1 {
  238. compatible = "sandbox,usb";
  239. hub {
  240. compatible = "usb-hub";
  241. usb,device-class = <9>;
  242. hub-emul {
  243. compatible = "sandbox,usb-hub";
  244. #address-cells = <1>;
  245. #size-cells = <0>;
  246. flash-stick {
  247. reg = <0>;
  248. compatible = "sandbox,usb-flash";
  249. sandbox,filepath = "testflash.bin";
  250. };
  251. };
  252. };
  253. };
  254. usb_2: usb@2 {
  255. compatible = "sandbox,usb";
  256. status = "disabled";
  257. };
  258. };
  259. #include "sandbox_pmic.dtsi"