sandbox.dts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. pci0 = &pci;
  9. };
  10. chosen {
  11. stdout-path = "/serial";
  12. };
  13. /* Needs to be available prior to relocation */
  14. uart0: serial {
  15. compatible = "sandbox,serial";
  16. sandbox,text-colour = "cyan";
  17. };
  18. triangle {
  19. compatible = "demo-shape";
  20. colour = "cyan";
  21. sides = <3>;
  22. character = <83>;
  23. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  24. };
  25. square {
  26. compatible = "demo-shape";
  27. colour = "blue";
  28. sides = <4>;
  29. };
  30. hexagon {
  31. compatible = "demo-simple";
  32. colour = "white";
  33. sides = <6>;
  34. };
  35. cros_ec: cros-ec@0 {
  36. reg = <0 0>;
  37. compatible = "google,cros-ec-sandbox";
  38. /*
  39. * This describes the flash memory within the EC. Note
  40. * that the STM32L flash erases to 0, not 0xff.
  41. */
  42. #address-cells = <1>;
  43. #size-cells = <1>;
  44. flash@8000000 {
  45. reg = <0x08000000 0x20000>;
  46. erase-value = <0>;
  47. #address-cells = <1>;
  48. #size-cells = <1>;
  49. /* Information for sandbox */
  50. ro {
  51. reg = <0 0xf000>;
  52. };
  53. wp-ro {
  54. reg = <0xf000 0x1000>;
  55. };
  56. rw {
  57. reg = <0x10000 0x10000>;
  58. };
  59. };
  60. };
  61. lcd {
  62. compatible = "sandbox,lcd-sdl";
  63. xres = <800>;
  64. yres = <600>;
  65. };
  66. gpio_a: gpios@0 {
  67. gpio-controller;
  68. compatible = "sandbox,gpio";
  69. #gpio-cells = <1>;
  70. gpio-bank-name = "a";
  71. num-gpios = <20>;
  72. };
  73. gpio_b: gpios@1 {
  74. gpio-controller;
  75. compatible = "sandbox,gpio";
  76. #gpio-cells = <2>;
  77. gpio-bank-name = "b";
  78. num-gpios = <10>;
  79. };
  80. i2c@0 {
  81. #address-cells = <1>;
  82. #size-cells = <0>;
  83. reg = <0 0>;
  84. compatible = "sandbox,i2c";
  85. clock-frequency = <400000>;
  86. eeprom@2c {
  87. reg = <0x2c>;
  88. compatible = "i2c-eeprom";
  89. emul {
  90. compatible = "sandbox,i2c-eeprom";
  91. sandbox,filename = "i2c.bin";
  92. sandbox,size = <128>;
  93. };
  94. };
  95. };
  96. spi@0 {
  97. #address-cells = <1>;
  98. #size-cells = <0>;
  99. reg = <0 0>;
  100. compatible = "sandbox,spi";
  101. cs-gpios = <0>, <&gpio_a 0>;
  102. firmware_storage_spi: flash@0 {
  103. reg = <0>;
  104. compatible = "spansion,m25p16", "sandbox,spi-flash";
  105. spi-max-frequency = <40000000>;
  106. sandbox,filename = "spi.bin";
  107. };
  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. eth@10002000 {
  125. compatible = "sandbox,eth";
  126. reg = <0x10002000 0x1000>;
  127. fake-host-hwaddr = [00 00 66 44 22 00];
  128. };
  129. eth@80000000 {
  130. compatible = "sandbox,eth-raw";
  131. reg = <0x80000000 0x1000>;
  132. host-raw-interface = "eth0";
  133. };
  134. eth@90000000 {
  135. compatible = "sandbox,eth-raw";
  136. reg = <0x90000000 0x1000>;
  137. host-raw-interface = "lo";
  138. };
  139. usb@0 {
  140. compatible = "sandbox,usb";
  141. status = "disabled";
  142. hub {
  143. compatible = "sandbox,usb-hub";
  144. #address-cells = <1>;
  145. #size-cells = <0>;
  146. flash-stick {
  147. reg = <0>;
  148. compatible = "sandbox,usb-flash";
  149. };
  150. };
  151. };
  152. usb@1 {
  153. compatible = "sandbox,usb";
  154. hub {
  155. compatible = "usb-hub";
  156. usb,device-class = <USB_CLASS_HUB>;
  157. hub-emul {
  158. compatible = "sandbox,usb-hub";
  159. #address-cells = <1>;
  160. #size-cells = <0>;
  161. flash-stick {
  162. reg = <0>;
  163. compatible = "sandbox,usb-flash";
  164. sandbox,filepath = "flash.bin";
  165. };
  166. };
  167. };
  168. };
  169. usb@2 {
  170. compatible = "sandbox,usb";
  171. status = "disabled";
  172. };
  173. };
  174. #include "cros-ec-keyboard.dtsi"