sandbox.dts 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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. status = "okay";
  136. pinctrl_i2c0: i2c0 {
  137. groups = "i2c";
  138. function = "i2c";
  139. bias-pull-up;
  140. };
  141. pinctrl_serial0: uart0 {
  142. groups = "serial_a";
  143. function = "serial";
  144. };
  145. pinctrl_onewire0: onewire0 {
  146. groups = "w1";
  147. function = "w1";
  148. bias-pull-up;
  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. tpm2 {
  212. compatible = "sandbox,tpm2";
  213. };
  214. triangle {
  215. compatible = "demo-shape";
  216. colour = "cyan";
  217. sides = <3>;
  218. character = <83>;
  219. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  220. };
  221. /* Needs to be available prior to relocation */
  222. uart0: serial {
  223. compatible = "sandbox,serial";
  224. sandbox,text-colour = "cyan";
  225. pinctrl-names = "default";
  226. pinctrl-0 = <&pinctrl_serial0>;
  227. };
  228. usb@0 {
  229. compatible = "sandbox,usb";
  230. status = "disabled";
  231. hub {
  232. compatible = "sandbox,usb-hub";
  233. #address-cells = <1>;
  234. #size-cells = <0>;
  235. flash-stick {
  236. reg = <0>;
  237. compatible = "sandbox,usb-flash";
  238. };
  239. };
  240. };
  241. usb@1 {
  242. compatible = "sandbox,usb";
  243. hub {
  244. compatible = "usb-hub";
  245. usb,device-class = <USB_CLASS_HUB>;
  246. hub-emul {
  247. compatible = "sandbox,usb-hub";
  248. #address-cells = <1>;
  249. #size-cells = <0>;
  250. flash-stick {
  251. reg = <0>;
  252. compatible = "sandbox,usb-flash";
  253. sandbox,filepath = "flash.bin";
  254. };
  255. };
  256. };
  257. };
  258. usb@2 {
  259. compatible = "sandbox,usb";
  260. status = "disabled";
  261. };
  262. spmi: spmi@0 {
  263. compatible = "sandbox,spmi";
  264. #address-cells = <0x1>;
  265. #size-cells = <0x1>;
  266. pm8916@0 {
  267. compatible = "qcom,spmi-pmic";
  268. reg = <0x0 0x1>;
  269. #address-cells = <0x1>;
  270. #size-cells = <0x1>;
  271. spmi_gpios: gpios@c000 {
  272. compatible = "qcom,pm8916-gpio";
  273. reg = <0xc000 0x400>;
  274. gpio-controller;
  275. gpio-count = <4>;
  276. #gpio-cells = <2>;
  277. gpio-bank-name="spmi";
  278. };
  279. };
  280. };
  281. axi: axi@0 {
  282. compatible = "sandbox,axi";
  283. #address-cells = <0x1>;
  284. #size-cells = <0x1>;
  285. store@0 {
  286. compatible = "sandbox,sandbox_store";
  287. reg = <0x0 0x400>;
  288. };
  289. };
  290. onewire0: onewire {
  291. compatible = "w1-gpio";
  292. gpios = <&gpio_a 8>;
  293. pinctrl-names = "default";
  294. pinctrl-0 = <&pinctrl_onewire0>;
  295. status = "okay";
  296. sandbox_eeprom0: sandbox_eeprom@0 {
  297. compatible = "sandbox,w1-eeprom";
  298. status = "okay";
  299. };
  300. };
  301. sandbox_tee {
  302. compatible = "sandbox,tee";
  303. };
  304. };
  305. #include "cros-ec-keyboard.dtsi"
  306. #include "sandbox_pmic.dtsi"