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. 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. ethrawbus {
  42. compatible = "sandbox,eth-raw-bus";
  43. skip-localhost = <0>;
  44. };
  45. eth@10002000 {
  46. compatible = "sandbox,eth";
  47. reg = <0x10002000 0x1000>;
  48. fake-host-hwaddr = [00 00 66 44 22 00];
  49. };
  50. gpio_a: gpios@0 {
  51. gpio-controller;
  52. compatible = "sandbox,gpio";
  53. #gpio-cells = <1>;
  54. gpio-bank-name = "a";
  55. sandbox,gpio-count = <20>;
  56. };
  57. gpio_b: gpios@1 {
  58. gpio-controller;
  59. compatible = "sandbox,gpio";
  60. #gpio-cells = <2>;
  61. gpio-bank-name = "b";
  62. sandbox,gpio-count = <10>;
  63. };
  64. hexagon {
  65. compatible = "demo-simple";
  66. colour = "white";
  67. sides = <6>;
  68. };
  69. i2c_0: i2c@0 {
  70. #address-cells = <1>;
  71. #size-cells = <0>;
  72. reg = <0 0>;
  73. compatible = "sandbox,i2c";
  74. clock-frequency = <400000>;
  75. pinctrl-names = "default";
  76. pinctrl-0 = <&pinctrl_i2c0>;
  77. eeprom@2c {
  78. reg = <0x2c>;
  79. compatible = "i2c-eeprom";
  80. emul {
  81. compatible = "sandbox,i2c-eeprom";
  82. sandbox,filename = "i2c.bin";
  83. sandbox,size = <128>;
  84. };
  85. };
  86. rtc_0: rtc@43 {
  87. reg = <0x43>;
  88. compatible = "sandbox-rtc";
  89. emul {
  90. compatible = "sandbox,i2c-rtc";
  91. };
  92. };
  93. sandbox_pmic: sandbox_pmic {
  94. reg = <0x40>;
  95. };
  96. mc34708: pmic@41 {
  97. reg = <0x41>;
  98. };
  99. };
  100. lcd {
  101. u-boot,dm-pre-reloc;
  102. compatible = "sandbox,lcd-sdl";
  103. xres = <1366>;
  104. yres = <768>;
  105. };
  106. leds {
  107. compatible = "gpio-leds";
  108. iracibble {
  109. gpios = <&gpio_a 1 0>;
  110. label = "sandbox:red";
  111. };
  112. martinet {
  113. gpios = <&gpio_a 2 0>;
  114. label = "sandbox:green";
  115. };
  116. };
  117. pci: pci-controller {
  118. compatible = "sandbox,pci";
  119. device_type = "pci";
  120. #address-cells = <3>;
  121. #size-cells = <2>;
  122. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  123. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  124. pci@1f,0 {
  125. compatible = "pci-generic";
  126. reg = <0xf800 0 0 0 0>;
  127. emul@1f,0 {
  128. compatible = "sandbox,swap-case";
  129. };
  130. };
  131. };
  132. pinctrl {
  133. compatible = "sandbox,pinctrl";
  134. pinctrl_i2c0: i2c0 {
  135. groups = "i2c";
  136. function = "i2c";
  137. bias-pull-up;
  138. };
  139. pinctrl_serial0: uart0 {
  140. groups = "serial_a";
  141. function = "serial";
  142. };
  143. };
  144. reset@1 {
  145. compatible = "sandbox,reset";
  146. };
  147. spi@0 {
  148. #address-cells = <1>;
  149. #size-cells = <0>;
  150. reg = <0 0>;
  151. compatible = "sandbox,spi";
  152. cs-gpios = <0>, <&gpio_a 0>;
  153. firmware_storage_spi: flash@0 {
  154. reg = <0>;
  155. compatible = "spansion,m25p16", "sandbox,spi-flash";
  156. spi-max-frequency = <40000000>;
  157. sandbox,filename = "spi.bin";
  158. };
  159. };
  160. spl-test {
  161. u-boot,dm-pre-reloc;
  162. compatible = "sandbox,spl-test";
  163. boolval;
  164. intval = <1>;
  165. intarray = <2 3 4>;
  166. byteval = [05];
  167. bytearray = [06];
  168. longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
  169. stringval = "message";
  170. stringarray = "multi-word", "message";
  171. };
  172. spl-test2 {
  173. u-boot,dm-pre-reloc;
  174. compatible = "sandbox,spl-test";
  175. intval = <3>;
  176. intarray = <5>;
  177. byteval = [08];
  178. bytearray = [01 23 34];
  179. longbytearray = [09 0a 0b 0c];
  180. stringval = "message2";
  181. stringarray = "another", "multi-word", "message";
  182. };
  183. spl-test3 {
  184. u-boot,dm-pre-reloc;
  185. compatible = "sandbox,spl-test";
  186. stringarray = "one";
  187. };
  188. spl-test4 {
  189. u-boot,dm-pre-reloc;
  190. compatible = "sandbox,spl-test.2";
  191. };
  192. square {
  193. compatible = "demo-shape";
  194. colour = "blue";
  195. sides = <4>;
  196. };
  197. timer {
  198. compatible = "sandbox,timer";
  199. clock-frequency = <1000000>;
  200. };
  201. tpm {
  202. compatible = "google,sandbox-tpm";
  203. };
  204. tpm2 {
  205. compatible = "sandbox,tpm2";
  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"