sandbox.dts 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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. keypad,num-rows = <8>;
  69. keypad,num-columns = <13>;
  70. google,ghost-filter;
  71. /*
  72. * Keymap entries take the form of 0xRRCCKKKK where
  73. * RR=Row CC=Column KKKK=Key Code
  74. * The values below are for a US keyboard layout and
  75. * are taken from the Linux driver. Note that the
  76. * 102ND key is not used for US keyboards.
  77. */
  78. linux,keymap = <
  79. /* CAPSLCK F1 B F10 */
  80. 0x0001003a 0x0002003b 0x00030030 0x00040044
  81. /* N = R_ALT ESC */
  82. 0x00060031 0x0008000d 0x000a0064 0x01010001
  83. /* F4 G F7 H */
  84. 0x0102003e 0x01030022 0x01040041 0x01060023
  85. /* ' F9 BKSPACE L_CTRL */
  86. 0x01080028 0x01090043 0x010b000e 0x0200001d
  87. /* TAB F3 T F6 */
  88. 0x0201000f 0x0202003d 0x02030014 0x02040040
  89. /* ] Y 102ND [ */
  90. 0x0205001b 0x02060015 0x02070056 0x0208001a
  91. /* F8 GRAVE F2 5 */
  92. 0x02090042 0x03010029 0x0302003c 0x03030006
  93. /* F5 6 - \ */
  94. 0x0304003f 0x03060007 0x0308000c 0x030b002b
  95. /* R_CTRL A D F */
  96. 0x04000061 0x0401001e 0x04020020 0x04030021
  97. /* S K J ; */
  98. 0x0404001f 0x04050025 0x04060024 0x04080027
  99. /* L ENTER Z C */
  100. 0x04090026 0x040b001c 0x0501002c 0x0502002e
  101. /* V X , M */
  102. 0x0503002f 0x0504002d 0x05050033 0x05060032
  103. /* L_SHIFT / . SPACE */
  104. 0x0507002a 0x05080035 0x05090034 0x050B0039
  105. /* 1 3 4 2 */
  106. 0x06010002 0x06020004 0x06030005 0x06040003
  107. /* 8 7 0 9 */
  108. 0x06050009 0x06060008 0x0608000b 0x0609000a
  109. /* L_ALT DOWN RIGHT Q */
  110. 0x060a0038 0x060b006c 0x060c006a 0x07010010
  111. /* E R W I */
  112. 0x07020012 0x07030013 0x07040011 0x07050017
  113. /* U R_SHIFT P O */
  114. 0x07060016 0x07070036 0x07080019 0x07090018
  115. /* UP LEFT */
  116. 0x070b0067 0x070c0069>;
  117. };
  118. gpio_a: gpios@0 {
  119. gpio-controller;
  120. compatible = "sandbox,gpio";
  121. #gpio-cells = <1>;
  122. gpio-bank-name = "a";
  123. num-gpios = <20>;
  124. };
  125. gpio_b: gpios@1 {
  126. gpio-controller;
  127. compatible = "sandbox,gpio";
  128. #gpio-cells = <2>;
  129. gpio-bank-name = "b";
  130. num-gpios = <10>;
  131. };
  132. i2c@0 {
  133. #address-cells = <1>;
  134. #size-cells = <0>;
  135. reg = <0>;
  136. compatible = "sandbox,i2c";
  137. clock-frequency = <400000>;
  138. eeprom@2c {
  139. reg = <0x2c>;
  140. compatible = "i2c-eeprom";
  141. emul {
  142. compatible = "sandbox,i2c-eeprom";
  143. sandbox,filename = "i2c.bin";
  144. sandbox,size = <128>;
  145. };
  146. };
  147. };
  148. spi@0 {
  149. #address-cells = <1>;
  150. #size-cells = <0>;
  151. reg = <0>;
  152. compatible = "sandbox,spi";
  153. cs-gpios = <0>, <&gpio_a 0>;
  154. flash@0 {
  155. reg = <0>;
  156. compatible = "spansion,m25p16", "sandbox,spi-flash";
  157. spi-max-frequency = <40000000>;
  158. sandbox,filename = "spi.bin";
  159. };
  160. };
  161. cros-ec@0 {
  162. compatible = "google,cros-ec";
  163. #address-cells = <1>;
  164. #size-cells = <1>;
  165. firmware_storage_spi: flash@0 {
  166. reg = <0 0x400000>;
  167. };
  168. };
  169. };