test.dts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  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. eth@10002000 {
  97. compatible = "sandbox,eth";
  98. reg = <0x10002000 0x1000>;
  99. fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x00>;
  100. };
  101. eth_5: eth@10003000 {
  102. compatible = "sandbox,eth";
  103. reg = <0x10003000 0x1000>;
  104. fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x11>;
  105. };
  106. eth@10004000 {
  107. compatible = "sandbox,eth";
  108. reg = <0x10004000 0x1000>;
  109. fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x22>;
  110. };
  111. gpio_a: base-gpios {
  112. compatible = "sandbox,gpio";
  113. gpio-controller;
  114. #gpio-cells = <1>;
  115. gpio-bank-name = "a";
  116. num-gpios = <20>;
  117. };
  118. gpio_b: extra-gpios {
  119. compatible = "sandbox,gpio";
  120. gpio-controller;
  121. #gpio-cells = <5>;
  122. gpio-bank-name = "b";
  123. num-gpios = <10>;
  124. };
  125. i2c@0 {
  126. #address-cells = <1>;
  127. #size-cells = <0>;
  128. reg = <0>;
  129. compatible = "sandbox,i2c";
  130. clock-frequency = <100000>;
  131. eeprom@2c {
  132. reg = <0x2c>;
  133. compatible = "i2c-eeprom";
  134. emul {
  135. compatible = "sandbox,i2c-eeprom";
  136. sandbox,filename = "i2c.bin";
  137. sandbox,size = <256>;
  138. };
  139. };
  140. rtc_0: rtc@43 {
  141. reg = <0x43>;
  142. compatible = "sandbox-rtc";
  143. emul {
  144. compatible = "sandbox,i2c-rtc";
  145. };
  146. };
  147. rtc_1: rtc@61 {
  148. reg = <0x61>;
  149. compatible = "sandbox-rtc";
  150. emul {
  151. compatible = "sandbox,i2c-rtc";
  152. };
  153. };
  154. sandbox_pmic: sandbox_pmic {
  155. reg = <0x40>;
  156. };
  157. };
  158. pci: pci-controller {
  159. compatible = "sandbox,pci";
  160. device_type = "pci";
  161. #address-cells = <3>;
  162. #size-cells = <2>;
  163. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  164. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  165. pci@1f,0 {
  166. compatible = "pci-generic";
  167. reg = <0xf800 0 0 0 0>;
  168. emul@1f,0 {
  169. compatible = "sandbox,swap-case";
  170. };
  171. };
  172. };
  173. spi@0 {
  174. #address-cells = <1>;
  175. #size-cells = <0>;
  176. reg = <0>;
  177. compatible = "sandbox,spi";
  178. cs-gpios = <0>, <&gpio_a 0>;
  179. spi.bin@0 {
  180. reg = <0>;
  181. compatible = "spansion,m25p16", "spi-flash";
  182. spi-max-frequency = <40000000>;
  183. sandbox,filename = "spi.bin";
  184. };
  185. };
  186. uart0: serial {
  187. compatible = "sandbox,serial";
  188. u-boot,dm-pre-reloc;
  189. };
  190. usb_0: usb@0 {
  191. compatible = "sandbox,usb";
  192. status = "disabled";
  193. hub {
  194. compatible = "sandbox,usb-hub";
  195. #address-cells = <1>;
  196. #size-cells = <0>;
  197. flash-stick {
  198. reg = <0>;
  199. compatible = "sandbox,usb-flash";
  200. };
  201. };
  202. };
  203. usb_1: usb@1 {
  204. compatible = "sandbox,usb";
  205. hub {
  206. compatible = "usb-hub";
  207. usb,device-class = <9>;
  208. hub-emul {
  209. compatible = "sandbox,usb-hub";
  210. #address-cells = <1>;
  211. #size-cells = <0>;
  212. flash-stick {
  213. reg = <0>;
  214. compatible = "sandbox,usb-flash";
  215. sandbox,filepath = "testflash.bin";
  216. };
  217. };
  218. };
  219. };
  220. usb_2: usb@2 {
  221. compatible = "sandbox,usb";
  222. status = "disabled";
  223. };
  224. };
  225. #include "sandbox_pmic.dtsi"