sandbox.dts 5.7 KB

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