sandbox.dts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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. mc34708: pmic@41 {
  104. reg = <0x41>;
  105. };
  106. };
  107. lcd {
  108. u-boot,dm-pre-reloc;
  109. compatible = "sandbox,lcd-sdl";
  110. xres = <1366>;
  111. yres = <768>;
  112. };
  113. leds {
  114. compatible = "gpio-leds";
  115. iracibble {
  116. gpios = <&gpio_a 1 0>;
  117. label = "sandbox:red";
  118. };
  119. martinet {
  120. gpios = <&gpio_a 2 0>;
  121. label = "sandbox:green";
  122. };
  123. };
  124. pci: pci-controller {
  125. compatible = "sandbox,pci";
  126. device_type = "pci";
  127. #address-cells = <3>;
  128. #size-cells = <2>;
  129. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  130. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  131. pci@1f,0 {
  132. compatible = "pci-generic";
  133. reg = <0xf800 0 0 0 0>;
  134. emul@1f,0 {
  135. compatible = "sandbox,swap-case";
  136. };
  137. };
  138. };
  139. pinctrl {
  140. compatible = "sandbox,pinctrl";
  141. pinctrl_i2c0: i2c0 {
  142. groups = "i2c";
  143. function = "i2c";
  144. bias-pull-up;
  145. };
  146. pinctrl_serial0: uart0 {
  147. groups = "serial_a";
  148. function = "serial";
  149. };
  150. };
  151. reset@1 {
  152. compatible = "sandbox,reset";
  153. };
  154. spi@0 {
  155. #address-cells = <1>;
  156. #size-cells = <0>;
  157. reg = <0 0>;
  158. compatible = "sandbox,spi";
  159. cs-gpios = <0>, <&gpio_a 0>;
  160. firmware_storage_spi: flash@0 {
  161. reg = <0>;
  162. compatible = "spansion,m25p16", "sandbox,spi-flash";
  163. spi-max-frequency = <40000000>;
  164. sandbox,filename = "spi.bin";
  165. };
  166. };
  167. spl-test {
  168. u-boot,dm-pre-reloc;
  169. compatible = "sandbox,spl-test";
  170. boolval;
  171. intval = <1>;
  172. intarray = <2 3 4>;
  173. byteval = [05];
  174. bytearray = [06];
  175. longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
  176. stringval = "message";
  177. stringarray = "multi-word", "message";
  178. };
  179. spl-test2 {
  180. u-boot,dm-pre-reloc;
  181. compatible = "sandbox,spl-test";
  182. intval = <3>;
  183. intarray = <5>;
  184. byteval = [08];
  185. bytearray = [01 23 34];
  186. longbytearray = [09 0a 0b 0c];
  187. stringval = "message2";
  188. stringarray = "another", "multi-word", "message";
  189. };
  190. spl-test3 {
  191. u-boot,dm-pre-reloc;
  192. compatible = "sandbox,spl-test";
  193. stringarray = "one";
  194. };
  195. spl-test4 {
  196. u-boot,dm-pre-reloc;
  197. compatible = "sandbox,spl-test.2";
  198. };
  199. square {
  200. compatible = "demo-shape";
  201. colour = "blue";
  202. sides = <4>;
  203. };
  204. timer {
  205. compatible = "sandbox,timer";
  206. clock-frequency = <1000000>;
  207. };
  208. tpm {
  209. compatible = "google,sandbox-tpm";
  210. };
  211. triangle {
  212. compatible = "demo-shape";
  213. colour = "cyan";
  214. sides = <3>;
  215. character = <83>;
  216. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  217. };
  218. /* Needs to be available prior to relocation */
  219. uart0: serial {
  220. compatible = "sandbox,serial";
  221. sandbox,text-colour = "cyan";
  222. pinctrl-names = "default";
  223. pinctrl-0 = <&pinctrl_serial0>;
  224. };
  225. usb@0 {
  226. compatible = "sandbox,usb";
  227. status = "disabled";
  228. hub {
  229. compatible = "sandbox,usb-hub";
  230. #address-cells = <1>;
  231. #size-cells = <0>;
  232. flash-stick {
  233. reg = <0>;
  234. compatible = "sandbox,usb-flash";
  235. };
  236. };
  237. };
  238. usb@1 {
  239. compatible = "sandbox,usb";
  240. hub {
  241. compatible = "usb-hub";
  242. usb,device-class = <USB_CLASS_HUB>;
  243. hub-emul {
  244. compatible = "sandbox,usb-hub";
  245. #address-cells = <1>;
  246. #size-cells = <0>;
  247. flash-stick {
  248. reg = <0>;
  249. compatible = "sandbox,usb-flash";
  250. sandbox,filepath = "flash.bin";
  251. };
  252. };
  253. };
  254. };
  255. usb@2 {
  256. compatible = "sandbox,usb";
  257. status = "disabled";
  258. };
  259. spmi: spmi@0 {
  260. compatible = "sandbox,spmi";
  261. #address-cells = <0x1>;
  262. #size-cells = <0x1>;
  263. pm8916@0 {
  264. compatible = "qcom,spmi-pmic";
  265. reg = <0x0 0x1>;
  266. #address-cells = <0x1>;
  267. #size-cells = <0x1>;
  268. spmi_gpios: gpios@c000 {
  269. compatible = "qcom,pm8916-gpio";
  270. reg = <0xc000 0x400>;
  271. gpio-controller;
  272. gpio-count = <4>;
  273. #gpio-cells = <2>;
  274. gpio-bank-name="spmi";
  275. };
  276. };
  277. };
  278. };
  279. #include "cros-ec-keyboard.dtsi"
  280. #include "sandbox_pmic.dtsi"