sandbox.dts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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. compatible = "sandbox,lcd-sdl";
  105. xres = <1366>;
  106. yres = <768>;
  107. };
  108. pci: pci-controller {
  109. compatible = "sandbox,pci";
  110. device_type = "pci";
  111. #address-cells = <3>;
  112. #size-cells = <2>;
  113. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  114. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  115. pci@1f,0 {
  116. compatible = "pci-generic";
  117. reg = <0xf800 0 0 0 0>;
  118. emul@1f,0 {
  119. compatible = "sandbox,swap-case";
  120. };
  121. };
  122. };
  123. pinctrl {
  124. compatible = "sandbox,pinctrl";
  125. pinctrl_i2c0: i2c0 {
  126. groups = "i2c";
  127. function = "i2c";
  128. bias-pull-up;
  129. };
  130. pinctrl_serial0: uart0 {
  131. groups = "serial_a";
  132. function = "serial";
  133. };
  134. };
  135. reset@1 {
  136. compatible = "sandbox,reset";
  137. };
  138. spi@0 {
  139. #address-cells = <1>;
  140. #size-cells = <0>;
  141. reg = <0 0>;
  142. compatible = "sandbox,spi";
  143. cs-gpios = <0>, <&gpio_a 0>;
  144. firmware_storage_spi: flash@0 {
  145. reg = <0>;
  146. compatible = "spansion,m25p16", "sandbox,spi-flash";
  147. spi-max-frequency = <40000000>;
  148. sandbox,filename = "spi.bin";
  149. };
  150. };
  151. square {
  152. compatible = "demo-shape";
  153. colour = "blue";
  154. sides = <4>;
  155. };
  156. timer {
  157. compatible = "sandbox,timer";
  158. };
  159. tpm {
  160. compatible = "google,sandbox-tpm";
  161. };
  162. triangle {
  163. compatible = "demo-shape";
  164. colour = "cyan";
  165. sides = <3>;
  166. character = <83>;
  167. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  168. };
  169. /* Needs to be available prior to relocation */
  170. uart0: serial {
  171. compatible = "sandbox,serial";
  172. sandbox,text-colour = "cyan";
  173. pinctrl-names = "default";
  174. pinctrl-0 = <&pinctrl_serial0>;
  175. };
  176. usb@0 {
  177. compatible = "sandbox,usb";
  178. status = "disabled";
  179. hub {
  180. compatible = "sandbox,usb-hub";
  181. #address-cells = <1>;
  182. #size-cells = <0>;
  183. flash-stick {
  184. reg = <0>;
  185. compatible = "sandbox,usb-flash";
  186. };
  187. };
  188. };
  189. usb@1 {
  190. compatible = "sandbox,usb";
  191. hub {
  192. compatible = "usb-hub";
  193. usb,device-class = <USB_CLASS_HUB>;
  194. hub-emul {
  195. compatible = "sandbox,usb-hub";
  196. #address-cells = <1>;
  197. #size-cells = <0>;
  198. flash-stick {
  199. reg = <0>;
  200. compatible = "sandbox,usb-flash";
  201. sandbox,filepath = "flash.bin";
  202. };
  203. };
  204. };
  205. };
  206. usb@2 {
  207. compatible = "sandbox,usb";
  208. status = "disabled";
  209. };
  210. };
  211. #include "cros-ec-keyboard.dtsi"
  212. #include "sandbox_pmic.dtsi"