sandbox.dts 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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. status = "okay";
  142. pinctrl_i2c0: i2c0 {
  143. groups = "i2c";
  144. function = "i2c";
  145. bias-pull-up;
  146. };
  147. pinctrl_serial0: uart0 {
  148. groups = "serial_a";
  149. function = "serial";
  150. };
  151. pinctrl_onewire0: onewire0 {
  152. groups = "w1";
  153. function = "w1";
  154. bias-pull-up;
  155. };
  156. };
  157. reset@1 {
  158. compatible = "sandbox,reset";
  159. };
  160. spi@0 {
  161. #address-cells = <1>;
  162. #size-cells = <0>;
  163. reg = <0 0>;
  164. compatible = "sandbox,spi";
  165. cs-gpios = <0>, <&gpio_a 0>;
  166. firmware_storage_spi: flash@0 {
  167. reg = <0>;
  168. compatible = "spansion,m25p16", "sandbox,spi-flash";
  169. spi-max-frequency = <40000000>;
  170. sandbox,filename = "spi.bin";
  171. };
  172. };
  173. spl-test {
  174. u-boot,dm-pre-reloc;
  175. compatible = "sandbox,spl-test";
  176. boolval;
  177. intval = <1>;
  178. intarray = <2 3 4>;
  179. byteval = [05];
  180. bytearray = [06];
  181. longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11];
  182. stringval = "message";
  183. stringarray = "multi-word", "message";
  184. };
  185. spl-test2 {
  186. u-boot,dm-pre-reloc;
  187. compatible = "sandbox,spl-test";
  188. intval = <3>;
  189. intarray = <5>;
  190. byteval = [08];
  191. bytearray = [01 23 34];
  192. longbytearray = [09 0a 0b 0c];
  193. stringval = "message2";
  194. stringarray = "another", "multi-word", "message";
  195. };
  196. spl-test3 {
  197. u-boot,dm-pre-reloc;
  198. compatible = "sandbox,spl-test";
  199. stringarray = "one";
  200. };
  201. spl-test4 {
  202. u-boot,dm-pre-reloc;
  203. compatible = "sandbox,spl-test.2";
  204. };
  205. square {
  206. compatible = "demo-shape";
  207. colour = "blue";
  208. sides = <4>;
  209. };
  210. timer {
  211. compatible = "sandbox,timer";
  212. clock-frequency = <1000000>;
  213. };
  214. tpm {
  215. compatible = "google,sandbox-tpm";
  216. };
  217. tpm2 {
  218. compatible = "sandbox,tpm2";
  219. };
  220. triangle {
  221. compatible = "demo-shape";
  222. colour = "cyan";
  223. sides = <3>;
  224. character = <83>;
  225. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  226. };
  227. /* Needs to be available prior to relocation */
  228. uart0: serial {
  229. compatible = "sandbox,serial";
  230. sandbox,text-colour = "cyan";
  231. pinctrl-names = "default";
  232. pinctrl-0 = <&pinctrl_serial0>;
  233. };
  234. usb@0 {
  235. compatible = "sandbox,usb";
  236. status = "disabled";
  237. hub {
  238. compatible = "sandbox,usb-hub";
  239. #address-cells = <1>;
  240. #size-cells = <0>;
  241. flash-stick {
  242. reg = <0>;
  243. compatible = "sandbox,usb-flash";
  244. };
  245. };
  246. };
  247. usb@1 {
  248. compatible = "sandbox,usb";
  249. hub {
  250. compatible = "usb-hub";
  251. usb,device-class = <USB_CLASS_HUB>;
  252. hub-emul {
  253. compatible = "sandbox,usb-hub";
  254. #address-cells = <1>;
  255. #size-cells = <0>;
  256. flash-stick {
  257. reg = <0>;
  258. compatible = "sandbox,usb-flash";
  259. sandbox,filepath = "flash.bin";
  260. };
  261. };
  262. };
  263. };
  264. usb@2 {
  265. compatible = "sandbox,usb";
  266. status = "disabled";
  267. };
  268. spmi: spmi@0 {
  269. compatible = "sandbox,spmi";
  270. #address-cells = <0x1>;
  271. #size-cells = <0x1>;
  272. pm8916@0 {
  273. compatible = "qcom,spmi-pmic";
  274. reg = <0x0 0x1>;
  275. #address-cells = <0x1>;
  276. #size-cells = <0x1>;
  277. spmi_gpios: gpios@c000 {
  278. compatible = "qcom,pm8916-gpio";
  279. reg = <0xc000 0x400>;
  280. gpio-controller;
  281. gpio-count = <4>;
  282. #gpio-cells = <2>;
  283. gpio-bank-name="spmi";
  284. };
  285. };
  286. };
  287. onewire0: onewire {
  288. compatible = "w1-gpio";
  289. gpios = <&gpio_a 8>;
  290. pinctrl-names = "default";
  291. pinctrl-0 = <&pinctrl_onewire0>;
  292. status = "okay";
  293. sandbox_eeprom0: sandbox_eeprom@0 {
  294. compatible = "sandbox,w1-eeprom";
  295. status = "okay";
  296. };
  297. };
  298. };
  299. #include "cros-ec-keyboard.dtsi"
  300. #include "sandbox_pmic.dtsi"