sandbox.dts 4.4 KB

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