sandbox.dts 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. /dts-v1/;
  2. #define USB_CLASS_HUB 9
  3. / {
  4. #address-cells = <1>;
  5. #size-cells = <1>;
  6. aliases {
  7. eth5 = "/eth@90000000";
  8. i2c0 = &i2c_0;
  9. pci0 = &pci;
  10. rtc0 = &rtc_0;
  11. };
  12. chosen {
  13. stdout-path = "/serial";
  14. };
  15. cros_ec: cros-ec@0 {
  16. reg = <0 0>;
  17. compatible = "google,cros-ec-sandbox";
  18. /*
  19. * This describes the flash memory within the EC. Note
  20. * that the STM32L flash erases to 0, not 0xff.
  21. */
  22. #address-cells = <1>;
  23. #size-cells = <1>;
  24. flash@8000000 {
  25. reg = <0x08000000 0x20000>;
  26. erase-value = <0>;
  27. #address-cells = <1>;
  28. #size-cells = <1>;
  29. /* Information for sandbox */
  30. ro {
  31. reg = <0 0xf000>;
  32. };
  33. wp-ro {
  34. reg = <0xf000 0x1000>;
  35. };
  36. rw {
  37. reg = <0x10000 0x10000>;
  38. };
  39. };
  40. };
  41. eth@10002000 {
  42. compatible = "sandbox,eth";
  43. reg = <0x10002000 0x1000>;
  44. fake-host-hwaddr = [00 00 66 44 22 00];
  45. };
  46. eth@80000000 {
  47. compatible = "sandbox,eth-raw";
  48. reg = <0x80000000 0x1000>;
  49. host-raw-interface = "eth0";
  50. };
  51. eth@90000000 {
  52. compatible = "sandbox,eth-raw";
  53. reg = <0x90000000 0x1000>;
  54. host-raw-interface = "lo";
  55. };
  56. gpio_a: gpios@0 {
  57. gpio-controller;
  58. compatible = "sandbox,gpio";
  59. #gpio-cells = <1>;
  60. gpio-bank-name = "a";
  61. num-gpios = <20>;
  62. };
  63. gpio_b: gpios@1 {
  64. gpio-controller;
  65. compatible = "sandbox,gpio";
  66. #gpio-cells = <2>;
  67. gpio-bank-name = "b";
  68. num-gpios = <10>;
  69. };
  70. hexagon {
  71. compatible = "demo-simple";
  72. colour = "white";
  73. sides = <6>;
  74. };
  75. i2c_0: i2c@0 {
  76. #address-cells = <1>;
  77. #size-cells = <0>;
  78. reg = <0 0>;
  79. compatible = "sandbox,i2c";
  80. clock-frequency = <400000>;
  81. pinctrl-names = "default";
  82. pinctrl-0 = <&pinctrl_i2c0>;
  83. eeprom@2c {
  84. reg = <0x2c>;
  85. compatible = "i2c-eeprom";
  86. emul {
  87. compatible = "sandbox,i2c-eeprom";
  88. sandbox,filename = "i2c.bin";
  89. sandbox,size = <128>;
  90. };
  91. };
  92. rtc_0: rtc@43 {
  93. reg = <0x43>;
  94. compatible = "sandbox-rtc";
  95. emul {
  96. compatible = "sandbox,i2c-rtc";
  97. };
  98. };
  99. sandbox_pmic: sandbox_pmic {
  100. reg = <0x40>;
  101. };
  102. };
  103. lcd {
  104. u-boot,dm-pre-reloc;
  105. compatible = "sandbox,lcd-sdl";
  106. xres = <1366>;
  107. yres = <768>;
  108. };
  109. pci: pci-controller {
  110. compatible = "sandbox,pci";
  111. device_type = "pci";
  112. #address-cells = <3>;
  113. #size-cells = <2>;
  114. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  115. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  116. pci@1f,0 {
  117. compatible = "pci-generic";
  118. reg = <0xf800 0 0 0 0>;
  119. emul@1f,0 {
  120. compatible = "sandbox,swap-case";
  121. };
  122. };
  123. };
  124. pinctrl {
  125. compatible = "sandbox,pinctrl";
  126. pinctrl_i2c0: i2c0 {
  127. groups = "i2c";
  128. function = "i2c";
  129. bias-pull-up;
  130. };
  131. pinctrl_serial0: uart0 {
  132. groups = "serial_a";
  133. function = "serial";
  134. };
  135. };
  136. reset@1 {
  137. compatible = "sandbox,reset";
  138. };
  139. spi@0 {
  140. #address-cells = <1>;
  141. #size-cells = <0>;
  142. reg = <0 0>;
  143. compatible = "sandbox,spi";
  144. cs-gpios = <0>, <&gpio_a 0>;
  145. firmware_storage_spi: flash@0 {
  146. reg = <0>;
  147. compatible = "spansion,m25p16", "sandbox,spi-flash";
  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. square {
  181. compatible = "demo-shape";
  182. colour = "blue";
  183. sides = <4>;
  184. };
  185. timer {
  186. compatible = "sandbox,timer";
  187. clock-frequency = <1000000>;
  188. };
  189. tpm {
  190. compatible = "google,sandbox-tpm";
  191. };
  192. triangle {
  193. compatible = "demo-shape";
  194. colour = "cyan";
  195. sides = <3>;
  196. character = <83>;
  197. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  198. };
  199. /* Needs to be available prior to relocation */
  200. uart0: serial {
  201. compatible = "sandbox,serial";
  202. sandbox,text-colour = "cyan";
  203. pinctrl-names = "default";
  204. pinctrl-0 = <&pinctrl_serial0>;
  205. };
  206. usb@0 {
  207. compatible = "sandbox,usb";
  208. status = "disabled";
  209. hub {
  210. compatible = "sandbox,usb-hub";
  211. #address-cells = <1>;
  212. #size-cells = <0>;
  213. flash-stick {
  214. reg = <0>;
  215. compatible = "sandbox,usb-flash";
  216. };
  217. };
  218. };
  219. usb@1 {
  220. compatible = "sandbox,usb";
  221. hub {
  222. compatible = "usb-hub";
  223. usb,device-class = <USB_CLASS_HUB>;
  224. hub-emul {
  225. compatible = "sandbox,usb-hub";
  226. #address-cells = <1>;
  227. #size-cells = <0>;
  228. flash-stick {
  229. reg = <0>;
  230. compatible = "sandbox,usb-flash";
  231. sandbox,filepath = "flash.bin";
  232. };
  233. };
  234. };
  235. };
  236. usb@2 {
  237. compatible = "sandbox,usb";
  238. status = "disabled";
  239. };
  240. spmi: spmi@0 {
  241. compatible = "sandbox,spmi";
  242. #address-cells = <0x1>;
  243. #size-cells = <0x1>;
  244. pm8916@0 {
  245. compatible = "qcom,spmi-pmic";
  246. reg = <0x0 0x1>;
  247. #address-cells = <0x1>;
  248. #size-cells = <0x1>;
  249. spmi_gpios: gpios@c000 {
  250. compatible = "qcom,pm8916-gpio";
  251. reg = <0xc000 0x400>;
  252. gpio-controller;
  253. gpio-count = <4>;
  254. #gpio-cells = <2>;
  255. gpio-bank-name="spmi";
  256. };
  257. };
  258. };
  259. };
  260. #include "cros-ec-keyboard.dtsi"
  261. #include "sandbox_pmic.dtsi"