sandbox.dts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. /dts-v1/;
  2. / {
  3. #address-cells = <1>;
  4. #size-cells = <1>;
  5. aliases {
  6. pci0 = &pci;
  7. };
  8. chosen {
  9. stdout-path = "/serial";
  10. };
  11. /* Needs to be available prior to relocation */
  12. uart0: serial {
  13. compatible = "sandbox,serial";
  14. sandbox,text-colour = "cyan";
  15. };
  16. triangle {
  17. compatible = "demo-shape";
  18. colour = "cyan";
  19. sides = <3>;
  20. character = <83>;
  21. light-gpios = <&gpio_a 2>, <&gpio_b 6 0>;
  22. };
  23. square {
  24. compatible = "demo-shape";
  25. colour = "blue";
  26. sides = <4>;
  27. };
  28. hexagon {
  29. compatible = "demo-simple";
  30. colour = "white";
  31. sides = <6>;
  32. };
  33. host@0 {
  34. #address-cells = <1>;
  35. #size-cells = <0>;
  36. compatible = "sandbox,host-emulation";
  37. cros-ec@0 {
  38. reg = <0>;
  39. compatible = "google,cros-ec";
  40. /*
  41. * This describes the flash memory within the EC. Note
  42. * that the STM32L flash erases to 0, not 0xff.
  43. */
  44. #address-cells = <1>;
  45. #size-cells = <1>;
  46. flash@8000000 {
  47. reg = <0x08000000 0x20000>;
  48. erase-value = <0>;
  49. #address-cells = <1>;
  50. #size-cells = <1>;
  51. /* Information for sandbox */
  52. ro {
  53. reg = <0 0xf000>;
  54. };
  55. wp-ro {
  56. reg = <0xf000 0x1000>;
  57. };
  58. rw {
  59. reg = <0x10000 0x10000>;
  60. };
  61. };
  62. };
  63. };
  64. lcd {
  65. compatible = "sandbox,lcd-sdl";
  66. xres = <800>;
  67. yres = <600>;
  68. };
  69. cros-ec-keyb {
  70. compatible = "google,cros-ec-keyb";
  71. keypad,num-rows = <8>;
  72. keypad,num-columns = <13>;
  73. google,ghost-filter;
  74. /*
  75. * Keymap entries take the form of 0xRRCCKKKK where
  76. * RR=Row CC=Column KKKK=Key Code
  77. * The values below are for a US keyboard layout and
  78. * are taken from the Linux driver. Note that the
  79. * 102ND key is not used for US keyboards.
  80. */
  81. linux,keymap = <
  82. /* CAPSLCK F1 B F10 */
  83. 0x0001003a 0x0002003b 0x00030030 0x00040044
  84. /* N = R_ALT ESC */
  85. 0x00060031 0x0008000d 0x000a0064 0x01010001
  86. /* F4 G F7 H */
  87. 0x0102003e 0x01030022 0x01040041 0x01060023
  88. /* ' F9 BKSPACE L_CTRL */
  89. 0x01080028 0x01090043 0x010b000e 0x0200001d
  90. /* TAB F3 T F6 */
  91. 0x0201000f 0x0202003d 0x02030014 0x02040040
  92. /* ] Y 102ND [ */
  93. 0x0205001b 0x02060015 0x02070056 0x0208001a
  94. /* F8 GRAVE F2 5 */
  95. 0x02090042 0x03010029 0x0302003c 0x03030006
  96. /* F5 6 - \ */
  97. 0x0304003f 0x03060007 0x0308000c 0x030b002b
  98. /* R_CTRL A D F */
  99. 0x04000061 0x0401001e 0x04020020 0x04030021
  100. /* S K J ; */
  101. 0x0404001f 0x04050025 0x04060024 0x04080027
  102. /* L ENTER Z C */
  103. 0x04090026 0x040b001c 0x0501002c 0x0502002e
  104. /* V X , M */
  105. 0x0503002f 0x0504002d 0x05050033 0x05060032
  106. /* L_SHIFT / . SPACE */
  107. 0x0507002a 0x05080035 0x05090034 0x050B0039
  108. /* 1 3 4 2 */
  109. 0x06010002 0x06020004 0x06030005 0x06040003
  110. /* 8 7 0 9 */
  111. 0x06050009 0x06060008 0x0608000b 0x0609000a
  112. /* L_ALT DOWN RIGHT Q */
  113. 0x060a0038 0x060b006c 0x060c006a 0x07010010
  114. /* E R W I */
  115. 0x07020012 0x07030013 0x07040011 0x07050017
  116. /* U R_SHIFT P O */
  117. 0x07060016 0x07070036 0x07080019 0x07090018
  118. /* UP LEFT */
  119. 0x070b0067 0x070c0069>;
  120. };
  121. gpio_a: gpios@0 {
  122. gpio-controller;
  123. compatible = "sandbox,gpio";
  124. #gpio-cells = <1>;
  125. gpio-bank-name = "a";
  126. num-gpios = <20>;
  127. };
  128. gpio_b: gpios@1 {
  129. gpio-controller;
  130. compatible = "sandbox,gpio";
  131. #gpio-cells = <2>;
  132. gpio-bank-name = "b";
  133. num-gpios = <10>;
  134. };
  135. i2c@0 {
  136. #address-cells = <1>;
  137. #size-cells = <0>;
  138. reg = <0 0>;
  139. compatible = "sandbox,i2c";
  140. clock-frequency = <400000>;
  141. eeprom@2c {
  142. reg = <0x2c>;
  143. compatible = "i2c-eeprom";
  144. emul {
  145. compatible = "sandbox,i2c-eeprom";
  146. sandbox,filename = "i2c.bin";
  147. sandbox,size = <128>;
  148. };
  149. };
  150. };
  151. spi@0 {
  152. #address-cells = <1>;
  153. #size-cells = <0>;
  154. reg = <0 0>;
  155. compatible = "sandbox,spi";
  156. cs-gpios = <0>, <&gpio_a 0>;
  157. flash@0 {
  158. reg = <0>;
  159. compatible = "spansion,m25p16", "sandbox,spi-flash";
  160. spi-max-frequency = <40000000>;
  161. sandbox,filename = "spi.bin";
  162. };
  163. };
  164. cros-ec@0 {
  165. compatible = "google,cros-ec";
  166. #address-cells = <1>;
  167. #size-cells = <1>;
  168. firmware_storage_spi: flash@0 {
  169. reg = <0 0x400000>;
  170. };
  171. };
  172. pci: pci-controller {
  173. compatible = "sandbox,pci";
  174. device_type = "pci";
  175. #address-cells = <3>;
  176. #size-cells = <2>;
  177. ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000
  178. 0x01000000 0 0x20000000 0x20000000 0 0x2000>;
  179. pci@1f,0 {
  180. compatible = "pci-generic";
  181. reg = <0xf800 0 0 0 0>;
  182. emul@1f,0 {
  183. compatible = "sandbox,swap-case";
  184. };
  185. };
  186. };
  187. eth@10002000 {
  188. compatible = "sandbox,eth";
  189. reg = <0x10002000 0x1000>;
  190. };
  191. };