sandbox.dts 5.5 KB

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