sandbox.dtsi 7.3 KB

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