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