sandbox.dts 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. /dts-v1/;
  2. #define USB_CLASS_HUB 9
  3. / {
  4. #address-cells = <1>;
  5. #size-cells = <1>;
  6. model = "sandbox";
  7. aliases {
  8. eth5 = "/eth@90000000";
  9. i2c0 = &i2c_0;
  10. pci0 = &pci;
  11. rtc0 = &rtc_0;
  12. };
  13. chosen {
  14. stdout-path = "/serial";
  15. };
  16. cros_ec: cros-ec@0 {
  17. reg = <0 0>;
  18. compatible = "google,cros-ec-sandbox";
  19. /*
  20. * This describes the flash memory within the EC. Note
  21. * that the STM32L flash erases to 0, not 0xff.
  22. */
  23. #address-cells = <1>;
  24. #size-cells = <1>;
  25. flash@8000000 {
  26. reg = <0x08000000 0x20000>;
  27. erase-value = <0>;
  28. #address-cells = <1>;
  29. #size-cells = <1>;
  30. /* Information for sandbox */
  31. ro {
  32. reg = <0 0xf000>;
  33. };
  34. wp-ro {
  35. reg = <0xf000 0x1000>;
  36. };
  37. rw {
  38. reg = <0x10000 0x10000>;
  39. };
  40. };
  41. };
  42. eth@10002000 {
  43. compatible = "sandbox,eth";
  44. reg = <0x10002000 0x1000>;
  45. fake-host-hwaddr = [00 00 66 44 22 00];
  46. };
  47. eth@80000000 {
  48. compatible = "sandbox,eth-raw";
  49. reg = <0x80000000 0x1000>;
  50. host-raw-interface = "eth0";
  51. };
  52. eth@90000000 {
  53. compatible = "sandbox,eth-raw";
  54. reg = <0x90000000 0x1000>;
  55. host-raw-interface = "lo";
  56. };
  57. gpio_a: gpios@0 {
  58. gpio-controller;
  59. compatible = "sandbox,gpio";
  60. #gpio-cells = <1>;
  61. gpio-bank-name = "a";
  62. sandbox,gpio-count = <20>;
  63. };
  64. gpio_b: gpios@1 {
  65. gpio-controller;
  66. compatible = "sandbox,gpio";
  67. #gpio-cells = <2>;
  68. gpio-bank-name = "b";
  69. sandbox,gpio-count = <10>;
  70. };
  71. hexagon {
  72. compatible = "demo-simple";
  73. colour = "white";
  74. sides = <6>;
  75. };
  76. i2c_0: i2c@0 {
  77. #address-cells = <1>;
  78. #size-cells = <0>;
  79. reg = <0 0>;
  80. compatible = "sandbox,i2c";
  81. clock-frequency = <400000>;
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&pinctrl_i2c0>;
  84. eeprom@2c {
  85. reg = <0x2c>;
  86. compatible = "i2c-eeprom";
  87. emul {
  88. compatible = "sandbox,i2c-eeprom";
  89. sandbox,filename = "i2c.bin";
  90. sandbox,size = <128>;
  91. };
  92. };
  93. rtc_0: rtc@43 {
  94. reg = <0x43>;
  95. compatible = "sandbox-rtc";
  96. emul {
  97. compatible = "sandbox,i2c-rtc";
  98. };
  99. };
  100. sandbox_pmic: sandbox_pmic {
  101. reg = <0x40>;
  102. };
  103. };
  104. lcd {
  105. u-boot,dm-pre-reloc;
  106. compatible = "sandbox,lcd-sdl";
  107. xres = <1366>;
  108. yres = <768>;
  109. };
  110. leds {
  111. compatible = "gpio-leds";
  112. iracibble {
  113. gpios = <&gpio_a 1 0>;
  114. label = "sandbox:red";
  115. };
  116. martinet {
  117. gpios = <&gpio_a 2 0>;
  118. label = "sandbox:green";
  119. };
  120. };
  121. pci: pci-controller {
  122. compatible = "sandbox,pci";
  123. device_type = "pci";
  124. #address-cells = <3>;
  125. #size-cells = <2>;
  126. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  127. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  128. pci@1f,0 {
  129. compatible = "pci-generic";
  130. reg = <0xf800 0 0 0 0>;
  131. emul@1f,0 {
  132. compatible = "sandbox,swap-case";
  133. };
  134. };
  135. };
  136. pinctrl {
  137. compatible = "sandbox,pinctrl";
  138. pinctrl_i2c0: i2c0 {
  139. groups = "i2c";
  140. function = "i2c";
  141. bias-pull-up;
  142. };
  143. pinctrl_serial0: uart0 {
  144. groups = "serial_a";
  145. function = "serial";
  146. };
  147. };
  148. reset@1 {
  149. compatible = "sandbox,reset";
  150. };
  151. spi@0 {
  152. #address-cells = <1>;
  153. #size-cells = <0>;
  154. reg = <0 0>;
  155. compatible = "sandbox,spi";
  156. cs-gpios = <0>, <&gpio_a 0>;
  157. firmware_storage_spi: flash@0 {
  158. reg = <0>;
  159. compatible = "spansion,m25p16", "sandbox,spi-flash";
  160. spi-max-frequency = <40000000>;
  161. sandbox,filename = "spi.bin";
  162. };
  163. };
  164. spl-test {
  165. u-boot,dm-pre-reloc;
  166. compatible = "sandbox,spl-test";
  167. boolval;
  168. intval = <1>;
  169. intarray = <2 3 4>;
  170. byteval = [05];
  171. bytearray = [06];
  172. longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
  173. stringval = "message";
  174. stringarray = "multi-word", "message";
  175. };
  176. spl-test2 {
  177. u-boot,dm-pre-reloc;
  178. compatible = "sandbox,spl-test";
  179. intval = <3>;
  180. intarray = <5>;
  181. byteval = [08];
  182. bytearray = [01 23 34];
  183. longbytearray = [09 0a 0b 0c];
  184. stringval = "message2";
  185. stringarray = "another", "multi-word", "message";
  186. };
  187. spl-test3 {
  188. u-boot,dm-pre-reloc;
  189. compatible = "sandbox,spl-test";
  190. stringarray = "one";
  191. };
  192. spl-test4 {
  193. u-boot,dm-pre-reloc;
  194. compatible = "sandbox,spl-test.2";
  195. };
  196. square {
  197. compatible = "demo-shape";
  198. colour = "blue";
  199. sides = <4>;
  200. };
  201. timer {
  202. compatible = "sandbox,timer";
  203. clock-frequency = <1000000>;
  204. };
  205. tpm {
  206. compatible = "google,sandbox-tpm";
  207. };
  208. triangle {
  209. compatible = "demo-shape";
  210. colour = "cyan";
  211. sides = <3>;
  212. character = <83>;
  213. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  214. };
  215. /* Needs to be available prior to relocation */
  216. uart0: serial {
  217. compatible = "sandbox,serial";
  218. sandbox,text-colour = "cyan";
  219. pinctrl-names = "default";
  220. pinctrl-0 = <&pinctrl_serial0>;
  221. };
  222. usb@0 {
  223. compatible = "sandbox,usb";
  224. status = "disabled";
  225. hub {
  226. compatible = "sandbox,usb-hub";
  227. #address-cells = <1>;
  228. #size-cells = <0>;
  229. flash-stick {
  230. reg = <0>;
  231. compatible = "sandbox,usb-flash";
  232. };
  233. };
  234. };
  235. usb@1 {
  236. compatible = "sandbox,usb";
  237. hub {
  238. compatible = "usb-hub";
  239. usb,device-class = <USB_CLASS_HUB>;
  240. hub-emul {
  241. compatible = "sandbox,usb-hub";
  242. #address-cells = <1>;
  243. #size-cells = <0>;
  244. flash-stick {
  245. reg = <0>;
  246. compatible = "sandbox,usb-flash";
  247. sandbox,filepath = "flash.bin";
  248. };
  249. };
  250. };
  251. };
  252. usb@2 {
  253. compatible = "sandbox,usb";
  254. status = "disabled";
  255. };
  256. spmi: spmi@0 {
  257. compatible = "sandbox,spmi";
  258. #address-cells = <0x1>;
  259. #size-cells = <0x1>;
  260. pm8916@0 {
  261. compatible = "qcom,spmi-pmic";
  262. reg = <0x0 0x1>;
  263. #address-cells = <0x1>;
  264. #size-cells = <0x1>;
  265. spmi_gpios: gpios@c000 {
  266. compatible = "qcom,pm8916-gpio";
  267. reg = <0xc000 0x400>;
  268. gpio-controller;
  269. gpio-count = <4>;
  270. #gpio-cells = <2>;
  271. gpio-bank-name="spmi";
  272. };
  273. };
  274. };
  275. };
  276. #include "cros-ec-keyboard.dtsi"
  277. #include "sandbox_pmic.dtsi"