sandbox.dtsi 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  1. /*
  2. * This is the common sandbox device-tree nodes. This is shared between sandbox
  3. * and sandbox64 builds.
  4. */
  5. #define USB_CLASS_HUB 9
  6. / {
  7. chosen {
  8. stdout-path = "/serial";
  9. };
  10. audio: audio-codec {
  11. compatible = "sandbox,audio-codec";
  12. #sound-dai-cells = <1>;
  13. };
  14. gpio_a: gpios@0 {
  15. u-boot,dm-pre-reloc;
  16. gpio-controller;
  17. compatible = "sandbox,gpio";
  18. #gpio-cells = <1>;
  19. gpio-bank-name = "a";
  20. sandbox,gpio-count = <20>;
  21. };
  22. gpio_b: gpios@1 {
  23. u-boot,dm-pre-reloc;
  24. gpio-controller;
  25. compatible = "sandbox,gpio";
  26. #gpio-cells = <2>;
  27. gpio-bank-name = "b";
  28. sandbox,gpio-count = <10>;
  29. };
  30. hexagon {
  31. compatible = "demo-simple";
  32. colour = "white";
  33. sides = <6>;
  34. };
  35. i2c_0: i2c@0 {
  36. eeprom@2c {
  37. reg = <0x2c>;
  38. compatible = "i2c-eeprom";
  39. sandbox,emul = <&emul_eeprom>;
  40. };
  41. rtc_0: rtc@43 {
  42. reg = <0x43>;
  43. compatible = "sandbox-rtc";
  44. sandbox,emul = <&emul0>;
  45. };
  46. sandbox_pmic: sandbox_pmic {
  47. reg = <0x40>;
  48. };
  49. mc34708: pmic@41 {
  50. reg = <0x41>;
  51. };
  52. i2c_emul: emul {
  53. reg = <0xff>;
  54. compatible = "sandbox,i2c-emul-parent";
  55. emul_eeprom: emul-eeprom {
  56. compatible = "sandbox,i2c-eeprom";
  57. sandbox,filename = "i2c.bin";
  58. sandbox,size = <256>;
  59. };
  60. emul0: emul0 {
  61. compatible = "sandbox,i2c-rtc";
  62. };
  63. };
  64. };
  65. i2s: i2s {
  66. compatible = "sandbox,i2s";
  67. #sound-dai-cells = <1>;
  68. };
  69. lcd {
  70. u-boot,dm-pre-reloc;
  71. compatible = "sandbox,lcd-sdl";
  72. xres = <1366>;
  73. yres = <768>;
  74. log2-depth = <5>;
  75. };
  76. leds {
  77. compatible = "gpio-leds";
  78. iracibble {
  79. gpios = <&gpio_a 1 0>;
  80. label = "sandbox:red";
  81. };
  82. martinet {
  83. gpios = <&gpio_a 2 0>;
  84. label = "sandbox:green";
  85. };
  86. };
  87. pci-controller {
  88. pci@1e,0 {
  89. compatible = "sandbox,pmc";
  90. reg = <0xf000 0 0 0 0>;
  91. sandbox,emul = <&pmc_emul>;
  92. gpe0-dwx-mask = <0xf>;
  93. gpe0-dwx-shift-base = <4>;
  94. gpe0-dw = <6 7 9>;
  95. gpe0-sts = <0x20>;
  96. gpe0-en = <0x30>;
  97. };
  98. pci@1f,0 {
  99. compatible = "pci-generic";
  100. reg = <0xf800 0 0 0 0>;
  101. sandbox,emul = <&swap_case_emul>;
  102. };
  103. };
  104. emul {
  105. compatible = "sandbox,pci-emul-parent";
  106. pmc_emul: emul@1e,0 {
  107. compatible = "sandbox,pmc-emul";
  108. };
  109. swap_case_emul: emul@1f,0 {
  110. compatible = "sandbox,swap-case";
  111. };
  112. };
  113. pinctrl {
  114. compatible = "sandbox,pinctrl";
  115. status = "okay";
  116. pinctrl_i2c0: i2c0 {
  117. groups = "i2c";
  118. function = "i2c";
  119. bias-pull-up;
  120. };
  121. pinctrl_serial0: uart0 {
  122. groups = "serial_a";
  123. function = "serial";
  124. };
  125. pinctrl_onewire0: onewire0 {
  126. groups = "w1";
  127. function = "w1";
  128. bias-pull-up;
  129. };
  130. };
  131. reset@1 {
  132. compatible = "sandbox,reset";
  133. };
  134. sound {
  135. compatible = "sandbox,sound";
  136. cpu {
  137. sound-dai = <&i2s 0>;
  138. };
  139. codec {
  140. sound-dai = <&audio 0>;
  141. };
  142. };
  143. spi@0 {
  144. firmware_storage_spi: flash@0 {
  145. u-boot,dm-pre-reloc;
  146. reg = <0>;
  147. compatible = "spansion,m25p16", "jedec,spi-nor";
  148. spi-max-frequency = <40000000>;
  149. sandbox,filename = "spi.bin";
  150. };
  151. };
  152. spl-test {
  153. u-boot,dm-pre-reloc;
  154. compatible = "sandbox,spl-test";
  155. boolval;
  156. intval = <1>;
  157. intarray = <2 3 4>;
  158. byteval = [05];
  159. bytearray = [06];
  160. longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
  161. stringval = "message";
  162. stringarray = "multi-word", "message";
  163. };
  164. spl-test2 {
  165. u-boot,dm-pre-reloc;
  166. compatible = "sandbox,spl-test";
  167. intval = <3>;
  168. intarray = <5>;
  169. byteval = [08];
  170. bytearray = [01 23 34];
  171. longbytearray = [09 0a 0b 0c];
  172. stringval = "message2";
  173. stringarray = "another", "multi-word", "message";
  174. };
  175. spl-test3 {
  176. u-boot,dm-pre-reloc;
  177. compatible = "sandbox,spl-test";
  178. stringarray = "one";
  179. };
  180. spl-test4 {
  181. u-boot,dm-pre-reloc;
  182. compatible = "sandbox,spl-test.2";
  183. };
  184. spl-test5 {
  185. u-boot,dm-tpl;
  186. compatible = "sandbox,spl-test";
  187. stringarray = "tpl";
  188. };
  189. spl-test6 {
  190. u-boot,dm-pre-proper;
  191. compatible = "sandbox,spl-test";
  192. stringarray = "pre-proper";
  193. };
  194. spl-test7 {
  195. u-boot,dm-spl;
  196. compatible = "sandbox,spl-test";
  197. stringarray = "spl";
  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. u-boot,dm-pre-reloc;
  210. compatible = "google,sandbox-tpm";
  211. };
  212. tpm2 {
  213. compatible = "sandbox,tpm2";
  214. };
  215. triangle {
  216. compatible = "demo-shape";
  217. colour = "cyan";
  218. sides = <3>;
  219. character = <83>;
  220. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  221. };
  222. /* Needs to be available prior to relocation */
  223. uart0: serial {
  224. u-boot,dm-spl;
  225. compatible = "sandbox,serial";
  226. sandbox,text-colour = "cyan";
  227. pinctrl-names = "default";
  228. pinctrl-0 = <&pinctrl_serial0>;
  229. };
  230. usb@0 {
  231. compatible = "sandbox,usb";
  232. status = "disabled";
  233. hub {
  234. compatible = "sandbox,usb-hub";
  235. #address-cells = <1>;
  236. #size-cells = <0>;
  237. flash-stick {
  238. reg = <0>;
  239. compatible = "sandbox,usb-flash";
  240. };
  241. };
  242. };
  243. usb@1 {
  244. compatible = "sandbox,usb";
  245. hub {
  246. compatible = "usb-hub";
  247. usb,device-class = <USB_CLASS_HUB>;
  248. hub-emul {
  249. compatible = "sandbox,usb-hub";
  250. #address-cells = <1>;
  251. #size-cells = <0>;
  252. flash-stick {
  253. reg = <0>;
  254. compatible = "sandbox,usb-flash";
  255. sandbox,filepath = "flash.bin";
  256. };
  257. };
  258. };
  259. };
  260. usb@2 {
  261. compatible = "sandbox,usb";
  262. status = "disabled";
  263. };
  264. spmi: spmi@0 {
  265. compatible = "sandbox,spmi";
  266. #address-cells = <0x1>;
  267. #size-cells = <0x1>;
  268. pm8916@0 {
  269. compatible = "qcom,spmi-pmic";
  270. reg = <0x0 0x1>;
  271. #address-cells = <0x1>;
  272. #size-cells = <0x1>;
  273. spmi_gpios: gpios@c000 {
  274. compatible = "qcom,pm8916-gpio";
  275. reg = <0xc000 0x400>;
  276. gpio-controller;
  277. gpio-count = <4>;
  278. #gpio-cells = <2>;
  279. gpio-bank-name="spmi";
  280. };
  281. };
  282. };
  283. axi: axi@0 {
  284. compatible = "sandbox,axi";
  285. #address-cells = <0x1>;
  286. #size-cells = <0x1>;
  287. store@0 {
  288. compatible = "sandbox,sandbox_store";
  289. reg = <0x0 0x400>;
  290. };
  291. };
  292. onewire0: onewire {
  293. compatible = "w1-gpio";
  294. gpios = <&gpio_a 8>;
  295. pinctrl-names = "default";
  296. pinctrl-0 = <&pinctrl_onewire0>;
  297. status = "okay";
  298. sandbox_eeprom0: sandbox_eeprom@0 {
  299. compatible = "sandbox,w1-eeprom";
  300. status = "okay";
  301. };
  302. };
  303. sandbox_tee {
  304. compatible = "sandbox,tee";
  305. };
  306. };
  307. &cros_ec {
  308. /*
  309. * This describes the flash memory within the EC. Note
  310. * that the STM32L flash erases to 0, not 0xff.
  311. */
  312. flash {
  313. image-pos = <0x08000000>;
  314. size = <0x20000>;
  315. erase-value = <0>;
  316. /* Information for sandbox */
  317. ro {
  318. image-pos = <0>;
  319. size = <0xf000>;
  320. };
  321. wp-ro {
  322. image-pos = <0xf000>;
  323. size = <0x1000>;
  324. };
  325. rw {
  326. image-pos = <0x10000>;
  327. size = <0x10000>;
  328. };
  329. };
  330. keyboard-controller {
  331. u-boot,dm-pre-reloc;
  332. };
  333. };