Simon Glass | 66c164b | 2014-02-26 15:59:14 -0700 | [diff] [blame] | 1 | /dts-v1/; |
| 2 | |
Simon Glass | ce3ca2e | 2015-03-25 12:22:42 -0600 | [diff] [blame] | 3 | #define USB_CLASS_HUB 9 |
| 4 | |
Simon Glass | 66c164b | 2014-02-26 15:59:14 -0700 | [diff] [blame] | 5 | / { |
Simon Glass | fd91fc9 | 2014-10-13 23:41:48 -0600 | [diff] [blame] | 6 | #address-cells = <1>; |
Simon Glass | f905be8 | 2015-03-05 12:25:13 -0700 | [diff] [blame] | 7 | #size-cells = <1>; |
Simon Glass | fd91fc9 | 2014-10-13 23:41:48 -0600 | [diff] [blame] | 8 | |
Simon Glass | 70778bc | 2015-03-05 12:25:26 -0700 | [diff] [blame] | 9 | aliases { |
Joe Hershberger | a892192 | 2015-03-22 17:09:23 -0500 | [diff] [blame] | 10 | eth5 = "/eth@90000000"; |
Simon Glass | 72138b9 | 2015-04-20 12:37:28 -0600 | [diff] [blame] | 11 | i2c0 = &i2c_0; |
Simon Glass | 70778bc | 2015-03-05 12:25:26 -0700 | [diff] [blame] | 12 | pci0 = &pci; |
Simon Glass | 72138b9 | 2015-04-20 12:37:28 -0600 | [diff] [blame] | 13 | rtc0 = &rtc_0; |
Simon Glass | 70778bc | 2015-03-05 12:25:26 -0700 | [diff] [blame] | 14 | }; |
| 15 | |
Simon Glass | cdbbfe3 | 2014-09-04 16:27:29 -0600 | [diff] [blame] | 16 | chosen { |
| 17 | stdout-path = "/serial"; |
| 18 | }; |
| 19 | |
Simon Glass | 73f220c | 2015-03-26 09:29:39 -0600 | [diff] [blame] | 20 | cros_ec: cros-ec@0 { |
| 21 | reg = <0 0>; |
| 22 | compatible = "google,cros-ec-sandbox"; |
Simon Glass | 1f6acb5 | 2014-02-27 13:25:59 -0700 | [diff] [blame] | 23 | |
Simon Glass | 73f220c | 2015-03-26 09:29:39 -0600 | [diff] [blame] | 24 | /* |
| 25 | * This describes the flash memory within the EC. Note |
| 26 | * that the STM32L flash erases to 0, not 0xff. |
| 27 | */ |
| 28 | #address-cells = <1>; |
| 29 | #size-cells = <1>; |
| 30 | flash@8000000 { |
| 31 | reg = <0x08000000 0x20000>; |
| 32 | erase-value = <0>; |
Simon Glass | 1f6acb5 | 2014-02-27 13:25:59 -0700 | [diff] [blame] | 33 | #address-cells = <1>; |
| 34 | #size-cells = <1>; |
Simon Glass | 1f6acb5 | 2014-02-27 13:25:59 -0700 | [diff] [blame] | 35 | |
Simon Glass | 73f220c | 2015-03-26 09:29:39 -0600 | [diff] [blame] | 36 | /* Information for sandbox */ |
| 37 | ro { |
| 38 | reg = <0 0xf000>; |
| 39 | }; |
| 40 | wp-ro { |
| 41 | reg = <0xf000 0x1000>; |
| 42 | }; |
| 43 | rw { |
| 44 | reg = <0x10000 0x10000>; |
Simon Glass | 1f6acb5 | 2014-02-27 13:25:59 -0700 | [diff] [blame] | 45 | }; |
| 46 | }; |
| 47 | }; |
| 48 | |
Simon Glass | 45ab008 | 2015-05-22 15:42:16 -0600 | [diff] [blame] | 49 | eth@10002000 { |
| 50 | compatible = "sandbox,eth"; |
| 51 | reg = <0x10002000 0x1000>; |
| 52 | fake-host-hwaddr = [00 00 66 44 22 00]; |
| 53 | }; |
| 54 | |
| 55 | eth@80000000 { |
| 56 | compatible = "sandbox,eth-raw"; |
| 57 | reg = <0x80000000 0x1000>; |
| 58 | host-raw-interface = "eth0"; |
| 59 | }; |
| 60 | |
| 61 | eth@90000000 { |
| 62 | compatible = "sandbox,eth-raw"; |
| 63 | reg = <0x90000000 0x1000>; |
| 64 | host-raw-interface = "lo"; |
Simon Glass | 1f6acb5 | 2014-02-27 13:25:59 -0700 | [diff] [blame] | 65 | }; |
| 66 | |
Simon Glass | 120834d | 2015-01-05 20:05:31 -0700 | [diff] [blame] | 67 | gpio_a: gpios@0 { |
Simon Glass | 093f3a7 | 2014-08-11 09:24:03 -0600 | [diff] [blame] | 68 | gpio-controller; |
| 69 | compatible = "sandbox,gpio"; |
| 70 | #gpio-cells = <1>; |
| 71 | gpio-bank-name = "a"; |
| 72 | num-gpios = <20>; |
| 73 | }; |
| 74 | |
Simon Glass | 120834d | 2015-01-05 20:05:31 -0700 | [diff] [blame] | 75 | gpio_b: gpios@1 { |
| 76 | gpio-controller; |
| 77 | compatible = "sandbox,gpio"; |
| 78 | #gpio-cells = <2>; |
| 79 | gpio-bank-name = "b"; |
| 80 | num-gpios = <10>; |
| 81 | }; |
| 82 | |
Simon Glass | 45ab008 | 2015-05-22 15:42:16 -0600 | [diff] [blame] | 83 | hexagon { |
| 84 | compatible = "demo-simple"; |
| 85 | colour = "white"; |
| 86 | sides = <6>; |
| 87 | }; |
| 88 | |
Simon Glass | 72138b9 | 2015-04-20 12:37:28 -0600 | [diff] [blame] | 89 | i2c_0: i2c@0 { |
Simon Glass | 4f46a59 | 2014-12-10 08:55:53 -0700 | [diff] [blame] | 90 | #address-cells = <1>; |
| 91 | #size-cells = <0>; |
Simon Glass | f905be8 | 2015-03-05 12:25:13 -0700 | [diff] [blame] | 92 | reg = <0 0>; |
Simon Glass | 4f46a59 | 2014-12-10 08:55:53 -0700 | [diff] [blame] | 93 | compatible = "sandbox,i2c"; |
| 94 | clock-frequency = <400000>; |
Masahiro Yamada | 0b53a75 | 2015-08-27 12:44:30 +0900 | [diff] [blame] | 95 | pinctrl-names = "default"; |
| 96 | pinctrl-0 = <&pinctrl_i2c0>; |
Simon Glass | 4f46a59 | 2014-12-10 08:55:53 -0700 | [diff] [blame] | 97 | eeprom@2c { |
| 98 | reg = <0x2c>; |
| 99 | compatible = "i2c-eeprom"; |
| 100 | emul { |
| 101 | compatible = "sandbox,i2c-eeprom"; |
| 102 | sandbox,filename = "i2c.bin"; |
| 103 | sandbox,size = <128>; |
| 104 | }; |
| 105 | }; |
Simon Glass | 72138b9 | 2015-04-20 12:37:28 -0600 | [diff] [blame] | 106 | |
| 107 | rtc_0: rtc@43 { |
| 108 | reg = <0x43>; |
| 109 | compatible = "sandbox-rtc"; |
| 110 | emul { |
| 111 | compatible = "sandbox,i2c-rtc"; |
| 112 | }; |
| 113 | }; |
Przemyslaw Marczak | 77bee05 | 2015-05-13 13:38:35 +0200 | [diff] [blame] | 114 | sandbox_pmic: sandbox_pmic { |
| 115 | reg = <0x40>; |
| 116 | }; |
Simon Glass | 4f46a59 | 2014-12-10 08:55:53 -0700 | [diff] [blame] | 117 | }; |
| 118 | |
Simon Glass | 45ab008 | 2015-05-22 15:42:16 -0600 | [diff] [blame] | 119 | lcd { |
Simon Glass | 38a2ae2 | 2016-01-18 19:52:25 -0700 | [diff] [blame] | 120 | u-boot,dm-pre-reloc; |
Simon Glass | 45ab008 | 2015-05-22 15:42:16 -0600 | [diff] [blame] | 121 | compatible = "sandbox,lcd-sdl"; |
| 122 | xres = <1366>; |
| 123 | yres = <768>; |
Simon Glass | fd91fc9 | 2014-10-13 23:41:48 -0600 | [diff] [blame] | 124 | }; |
| 125 | |
Simon Glass | 70778bc | 2015-03-05 12:25:26 -0700 | [diff] [blame] | 126 | pci: pci-controller { |
| 127 | compatible = "sandbox,pci"; |
| 128 | device_type = "pci"; |
| 129 | #address-cells = <3>; |
| 130 | #size-cells = <2>; |
| 131 | ranges = <0x02000000 0 0x10000000 0x10000000 0 0x2000 |
| 132 | 0x01000000 0 0x20000000 0x20000000 0 0x2000>; |
| 133 | pci@1f,0 { |
| 134 | compatible = "pci-generic"; |
| 135 | reg = <0xf800 0 0 0 0>; |
| 136 | emul@1f,0 { |
| 137 | compatible = "sandbox,swap-case"; |
| 138 | }; |
| 139 | }; |
| 140 | }; |
| 141 | |
Masahiro Yamada | 0b53a75 | 2015-08-27 12:44:30 +0900 | [diff] [blame] | 142 | pinctrl { |
| 143 | compatible = "sandbox,pinctrl"; |
| 144 | |
| 145 | pinctrl_i2c0: i2c0 { |
| 146 | groups = "i2c"; |
| 147 | function = "i2c"; |
| 148 | bias-pull-up; |
| 149 | }; |
| 150 | |
| 151 | pinctrl_serial0: uart0 { |
| 152 | groups = "serial_a"; |
| 153 | function = "serial"; |
| 154 | }; |
| 155 | }; |
| 156 | |
Simon Glass | 68a3d49 | 2015-10-03 11:21:16 -0600 | [diff] [blame] | 157 | reset@1 { |
| 158 | compatible = "sandbox,reset"; |
| 159 | }; |
| 160 | |
Simon Glass | 45ab008 | 2015-05-22 15:42:16 -0600 | [diff] [blame] | 161 | spi@0 { |
| 162 | #address-cells = <1>; |
| 163 | #size-cells = <0>; |
| 164 | reg = <0 0>; |
| 165 | compatible = "sandbox,spi"; |
| 166 | cs-gpios = <0>, <&gpio_a 0>; |
| 167 | firmware_storage_spi: flash@0 { |
| 168 | reg = <0>; |
| 169 | compatible = "spansion,m25p16", "sandbox,spi-flash"; |
| 170 | spi-max-frequency = <40000000>; |
| 171 | sandbox,filename = "spi.bin"; |
| 172 | }; |
Joe Hershberger | 6ab7699 | 2015-03-22 17:09:13 -0500 | [diff] [blame] | 173 | }; |
Joe Hershberger | 586cbd1 | 2015-03-22 17:09:21 -0500 | [diff] [blame] | 174 | |
Simon Glass | 4e9c131 | 2016-07-04 11:57:55 -0600 | [diff] [blame] | 175 | spl-test { |
| 176 | u-boot,dm-pre-reloc; |
| 177 | compatible = "sandbox,spl-test"; |
| 178 | boolval; |
| 179 | intval = <1>; |
| 180 | intarray = <2 3 4>; |
| 181 | byteval = [05]; |
| 182 | bytearray = [06]; |
| 183 | longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11]; |
| 184 | stringval = "message"; |
| 185 | stringarray = "multi-word", "message"; |
| 186 | }; |
| 187 | |
| 188 | spl-test2 { |
| 189 | u-boot,dm-pre-reloc; |
| 190 | compatible = "sandbox,spl-test"; |
| 191 | intval = <3>; |
| 192 | intarray = <5>; |
| 193 | byteval = [08]; |
| 194 | bytearray = [01 23 34]; |
| 195 | longbytearray = [09 0a 0b 0c]; |
| 196 | stringval = "message2"; |
| 197 | stringarray = "another", "multi-word", "message"; |
| 198 | }; |
| 199 | |
| 200 | spl-test3 { |
| 201 | u-boot,dm-pre-reloc; |
| 202 | compatible = "sandbox,spl-test"; |
| 203 | stringarray = "one"; |
| 204 | }; |
| 205 | |
Simon Glass | b17ab15 | 2017-01-15 21:09:08 -0700 | [diff] [blame] | 206 | spl-test4 { |
| 207 | u-boot,dm-pre-reloc; |
| 208 | compatible = "sandbox,spl-test.2"; |
| 209 | }; |
| 210 | |
Simon Glass | 45ab008 | 2015-05-22 15:42:16 -0600 | [diff] [blame] | 211 | square { |
| 212 | compatible = "demo-shape"; |
| 213 | colour = "blue"; |
| 214 | sides = <4>; |
Joe Hershberger | 586cbd1 | 2015-03-22 17:09:21 -0500 | [diff] [blame] | 215 | }; |
Joe Hershberger | a892192 | 2015-03-22 17:09:23 -0500 | [diff] [blame] | 216 | |
Thomas Chou | 7b059dc | 2015-10-30 15:35:52 +0800 | [diff] [blame] | 217 | timer { |
| 218 | compatible = "sandbox,timer"; |
Bin Meng | d041c42 | 2015-11-13 00:11:17 -0800 | [diff] [blame] | 219 | clock-frequency = <1000000>; |
Thomas Chou | 7b059dc | 2015-10-30 15:35:52 +0800 | [diff] [blame] | 220 | }; |
| 221 | |
Simon Glass | a425f76 | 2015-08-22 18:31:35 -0600 | [diff] [blame] | 222 | tpm { |
| 223 | compatible = "google,sandbox-tpm"; |
| 224 | }; |
| 225 | |
Simon Glass | 45ab008 | 2015-05-22 15:42:16 -0600 | [diff] [blame] | 226 | triangle { |
| 227 | compatible = "demo-shape"; |
| 228 | colour = "cyan"; |
| 229 | sides = <3>; |
| 230 | character = <83>; |
| 231 | light-gpios = <&gpio_a 2>, <&gpio_b 6 0>; |
| 232 | }; |
| 233 | |
| 234 | /* Needs to be available prior to relocation */ |
| 235 | uart0: serial { |
| 236 | compatible = "sandbox,serial"; |
| 237 | sandbox,text-colour = "cyan"; |
Masahiro Yamada | 0b53a75 | 2015-08-27 12:44:30 +0900 | [diff] [blame] | 238 | pinctrl-names = "default"; |
| 239 | pinctrl-0 = <&pinctrl_serial0>; |
Joe Hershberger | a892192 | 2015-03-22 17:09:23 -0500 | [diff] [blame] | 240 | }; |
Simon Glass | ce3ca2e | 2015-03-25 12:22:42 -0600 | [diff] [blame] | 241 | |
| 242 | usb@0 { |
| 243 | compatible = "sandbox,usb"; |
| 244 | status = "disabled"; |
| 245 | hub { |
| 246 | compatible = "sandbox,usb-hub"; |
| 247 | #address-cells = <1>; |
| 248 | #size-cells = <0>; |
| 249 | flash-stick { |
| 250 | reg = <0>; |
| 251 | compatible = "sandbox,usb-flash"; |
| 252 | }; |
| 253 | }; |
| 254 | }; |
| 255 | |
| 256 | usb@1 { |
| 257 | compatible = "sandbox,usb"; |
| 258 | hub { |
| 259 | compatible = "usb-hub"; |
| 260 | usb,device-class = <USB_CLASS_HUB>; |
| 261 | hub-emul { |
| 262 | compatible = "sandbox,usb-hub"; |
| 263 | #address-cells = <1>; |
| 264 | #size-cells = <0>; |
| 265 | flash-stick { |
| 266 | reg = <0>; |
| 267 | compatible = "sandbox,usb-flash"; |
| 268 | sandbox,filepath = "flash.bin"; |
| 269 | }; |
| 270 | }; |
| 271 | }; |
| 272 | }; |
| 273 | |
| 274 | usb@2 { |
| 275 | compatible = "sandbox,usb"; |
| 276 | status = "disabled"; |
| 277 | }; |
| 278 | |
Mateusz Kulikowski | c7e4fbb | 2016-03-31 23:12:28 +0200 | [diff] [blame] | 279 | spmi: spmi@0 { |
| 280 | compatible = "sandbox,spmi"; |
| 281 | #address-cells = <0x1>; |
| 282 | #size-cells = <0x1>; |
| 283 | pm8916@0 { |
| 284 | compatible = "qcom,spmi-pmic"; |
| 285 | reg = <0x0 0x1>; |
| 286 | #address-cells = <0x1>; |
| 287 | #size-cells = <0x1>; |
| 288 | |
| 289 | spmi_gpios: gpios@c000 { |
| 290 | compatible = "qcom,pm8916-gpio"; |
| 291 | reg = <0xc000 0x400>; |
| 292 | gpio-controller; |
| 293 | gpio-count = <4>; |
| 294 | #gpio-cells = <2>; |
| 295 | gpio-bank-name="spmi"; |
| 296 | }; |
| 297 | }; |
| 298 | }; |
Simon Glass | 66c164b | 2014-02-26 15:59:14 -0700 | [diff] [blame] | 299 | }; |
Simon Glass | 73f220c | 2015-03-26 09:29:39 -0600 | [diff] [blame] | 300 | |
| 301 | #include "cros-ec-keyboard.dtsi" |
Przemyslaw Marczak | 77bee05 | 2015-05-13 13:38:35 +0200 | [diff] [blame] | 302 | #include "sandbox_pmic.dtsi" |