Simon Glass | 28db469 | 2019-05-18 11:59:41 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This is the common sandbox device-tree nodes. This is shared between sandbox |
| 3 | * and sandbox64 builds. |
| 4 | */ |
| 5 | |
| 6 | #define USB_CLASS_HUB 9 |
| 7 | |
| 8 | / { |
| 9 | chosen { |
| 10 | stdout-path = "/serial"; |
| 11 | }; |
| 12 | |
| 13 | audio: audio-codec { |
| 14 | compatible = "sandbox,audio-codec"; |
| 15 | #sound-dai-cells = <1>; |
| 16 | }; |
| 17 | |
Philippe Reynes | f56bf0a | 2020-07-24 18:19:48 +0200 | [diff] [blame] | 18 | buttons { |
| 19 | compatible = "gpio-keys"; |
| 20 | |
Heinrich Schuchardt | 57c2fc6 | 2020-09-14 12:50:54 +0200 | [diff] [blame] | 21 | btn1 { |
Philippe Reynes | f56bf0a | 2020-07-24 18:19:48 +0200 | [diff] [blame] | 22 | gpios = <&gpio_a 3 0>; |
Heinrich Schuchardt | 57c2fc6 | 2020-09-14 12:50:54 +0200 | [diff] [blame] | 23 | label = "button1"; |
Philippe Reynes | f56bf0a | 2020-07-24 18:19:48 +0200 | [diff] [blame] | 24 | }; |
| 25 | |
Heinrich Schuchardt | 57c2fc6 | 2020-09-14 12:50:54 +0200 | [diff] [blame] | 26 | btn2 { |
Philippe Reynes | f56bf0a | 2020-07-24 18:19:48 +0200 | [diff] [blame] | 27 | gpios = <&gpio_a 4 0>; |
Heinrich Schuchardt | 57c2fc6 | 2020-09-14 12:50:54 +0200 | [diff] [blame] | 28 | label = "button2"; |
Philippe Reynes | f56bf0a | 2020-07-24 18:19:48 +0200 | [diff] [blame] | 29 | }; |
| 30 | }; |
| 31 | |
Simon Glass | 28db469 | 2019-05-18 11:59:41 -0600 | [diff] [blame] | 32 | gpio_a: gpios@0 { |
| 33 | u-boot,dm-pre-reloc; |
| 34 | gpio-controller; |
| 35 | compatible = "sandbox,gpio"; |
| 36 | #gpio-cells = <1>; |
| 37 | gpio-bank-name = "a"; |
| 38 | sandbox,gpio-count = <20>; |
| 39 | }; |
| 40 | |
| 41 | gpio_b: gpios@1 { |
| 42 | u-boot,dm-pre-reloc; |
| 43 | gpio-controller; |
| 44 | compatible = "sandbox,gpio"; |
| 45 | #gpio-cells = <2>; |
| 46 | gpio-bank-name = "b"; |
| 47 | sandbox,gpio-count = <10>; |
| 48 | }; |
| 49 | |
| 50 | hexagon { |
| 51 | compatible = "demo-simple"; |
| 52 | colour = "white"; |
| 53 | sides = <6>; |
| 54 | }; |
| 55 | |
| 56 | i2c_0: i2c@0 { |
| 57 | eeprom@2c { |
| 58 | reg = <0x2c>; |
| 59 | compatible = "i2c-eeprom"; |
| 60 | sandbox,emul = <&emul_eeprom>; |
| 61 | }; |
| 62 | |
| 63 | rtc_0: rtc@43 { |
| 64 | reg = <0x43>; |
| 65 | compatible = "sandbox-rtc"; |
| 66 | sandbox,emul = <&emul0>; |
| 67 | }; |
| 68 | sandbox_pmic: sandbox_pmic { |
| 69 | reg = <0x40>; |
| 70 | }; |
| 71 | |
| 72 | mc34708: pmic@41 { |
| 73 | reg = <0x41>; |
| 74 | }; |
| 75 | |
| 76 | i2c_emul: emul { |
| 77 | reg = <0xff>; |
| 78 | compatible = "sandbox,i2c-emul-parent"; |
| 79 | emul_eeprom: emul-eeprom { |
| 80 | compatible = "sandbox,i2c-eeprom"; |
| 81 | sandbox,filename = "i2c.bin"; |
| 82 | sandbox,size = <256>; |
| 83 | }; |
| 84 | emul0: emul0 { |
| 85 | compatible = "sandbox,i2c-rtc"; |
| 86 | }; |
| 87 | }; |
| 88 | }; |
| 89 | |
| 90 | i2s: i2s { |
| 91 | compatible = "sandbox,i2s"; |
| 92 | #sound-dai-cells = <1>; |
| 93 | }; |
| 94 | |
| 95 | lcd { |
| 96 | u-boot,dm-pre-reloc; |
| 97 | compatible = "sandbox,lcd-sdl"; |
| 98 | xres = <1366>; |
| 99 | yres = <768>; |
Simon Glass | d2caf7b | 2020-02-03 07:36:14 -0700 | [diff] [blame] | 100 | log2-depth = <5>; |
Simon Glass | 28db469 | 2019-05-18 11:59:41 -0600 | [diff] [blame] | 101 | }; |
| 102 | |
| 103 | leds { |
| 104 | compatible = "gpio-leds"; |
| 105 | |
| 106 | iracibble { |
| 107 | gpios = <&gpio_a 1 0>; |
| 108 | label = "sandbox:red"; |
| 109 | }; |
| 110 | |
| 111 | martinet { |
| 112 | gpios = <&gpio_a 2 0>; |
| 113 | label = "sandbox:green"; |
| 114 | }; |
| 115 | }; |
| 116 | |
Tom Rini | 4a3ca48 | 2020-02-11 12:41:23 -0500 | [diff] [blame] | 117 | pci@0 { |
Simon Glass | 8c50102 | 2019-12-06 21:41:54 -0700 | [diff] [blame] | 118 | pci@1e,0 { |
| 119 | compatible = "sandbox,pmc"; |
| 120 | reg = <0xf000 0 0 0 0>; |
| 121 | sandbox,emul = <&pmc_emul>; |
| 122 | gpe0-dwx-mask = <0xf>; |
| 123 | gpe0-dwx-shift-base = <4>; |
| 124 | gpe0-dw = <6 7 9>; |
| 125 | gpe0-sts = <0x20>; |
| 126 | gpe0-en = <0x30>; |
| 127 | }; |
| 128 | |
Simon Glass | 28db469 | 2019-05-18 11:59:41 -0600 | [diff] [blame] | 129 | pci@1f,0 { |
| 130 | compatible = "pci-generic"; |
| 131 | reg = <0xf800 0 0 0 0>; |
Simon Glass | b98ba4c | 2019-09-25 08:56:10 -0600 | [diff] [blame] | 132 | sandbox,emul = <&swap_case_emul>; |
| 133 | }; |
| 134 | }; |
| 135 | |
| 136 | emul { |
| 137 | compatible = "sandbox,pci-emul-parent"; |
Simon Glass | 8c50102 | 2019-12-06 21:41:54 -0700 | [diff] [blame] | 138 | pmc_emul: emul@1e,0 { |
| 139 | compatible = "sandbox,pmc-emul"; |
| 140 | }; |
Simon Glass | b98ba4c | 2019-09-25 08:56:10 -0600 | [diff] [blame] | 141 | swap_case_emul: emul@1f,0 { |
| 142 | compatible = "sandbox,swap-case"; |
Simon Glass | 28db469 | 2019-05-18 11:59:41 -0600 | [diff] [blame] | 143 | }; |
| 144 | }; |
| 145 | |
| 146 | pinctrl { |
| 147 | compatible = "sandbox,pinctrl"; |
| 148 | status = "okay"; |
| 149 | |
| 150 | pinctrl_i2c0: i2c0 { |
| 151 | groups = "i2c"; |
| 152 | function = "i2c"; |
| 153 | bias-pull-up; |
| 154 | }; |
| 155 | |
| 156 | pinctrl_serial0: uart0 { |
| 157 | groups = "serial_a"; |
| 158 | function = "serial"; |
| 159 | }; |
| 160 | |
| 161 | pinctrl_onewire0: onewire0 { |
| 162 | groups = "w1"; |
| 163 | function = "w1"; |
| 164 | bias-pull-up; |
| 165 | }; |
| 166 | }; |
| 167 | |
| 168 | reset@1 { |
| 169 | compatible = "sandbox,reset"; |
| 170 | }; |
| 171 | |
| 172 | sound { |
| 173 | compatible = "sandbox,sound"; |
| 174 | cpu { |
| 175 | sound-dai = <&i2s 0>; |
| 176 | }; |
| 177 | |
| 178 | codec { |
| 179 | sound-dai = <&audio 0>; |
| 180 | }; |
| 181 | }; |
| 182 | |
| 183 | spi@0 { |
| 184 | firmware_storage_spi: flash@0 { |
| 185 | u-boot,dm-pre-reloc; |
| 186 | reg = <0>; |
Simon Glass | 7e36868 | 2019-05-18 11:59:49 -0600 | [diff] [blame] | 187 | compatible = "spansion,m25p16", "jedec,spi-nor"; |
Simon Glass | 28db469 | 2019-05-18 11:59:41 -0600 | [diff] [blame] | 188 | spi-max-frequency = <40000000>; |
| 189 | sandbox,filename = "spi.bin"; |
| 190 | }; |
| 191 | }; |
| 192 | |
| 193 | spl-test { |
| 194 | u-boot,dm-pre-reloc; |
| 195 | compatible = "sandbox,spl-test"; |
| 196 | boolval; |
| 197 | intval = <1>; |
| 198 | intarray = <2 3 4>; |
| 199 | byteval = [05]; |
| 200 | bytearray = [06]; |
| 201 | longbytearray = [09 0a 0b 0c 0d 0e 0f 10 11]; |
| 202 | stringval = "message"; |
| 203 | stringarray = "multi-word", "message"; |
| 204 | }; |
| 205 | |
| 206 | spl-test2 { |
| 207 | u-boot,dm-pre-reloc; |
| 208 | compatible = "sandbox,spl-test"; |
| 209 | intval = <3>; |
| 210 | intarray = <5>; |
| 211 | byteval = [08]; |
| 212 | bytearray = [01 23 34]; |
| 213 | longbytearray = [09 0a 0b 0c]; |
| 214 | stringval = "message2"; |
| 215 | stringarray = "another", "multi-word", "message"; |
| 216 | }; |
| 217 | |
| 218 | spl-test3 { |
| 219 | u-boot,dm-pre-reloc; |
| 220 | compatible = "sandbox,spl-test"; |
| 221 | stringarray = "one"; |
| 222 | }; |
| 223 | |
| 224 | spl-test4 { |
| 225 | u-boot,dm-pre-reloc; |
| 226 | compatible = "sandbox,spl-test.2"; |
| 227 | }; |
| 228 | |
Patrick Delaunay | ae84ff1 | 2019-05-21 19:19:11 +0200 | [diff] [blame] | 229 | spl-test5 { |
| 230 | u-boot,dm-tpl; |
| 231 | compatible = "sandbox,spl-test"; |
| 232 | stringarray = "tpl"; |
| 233 | }; |
| 234 | |
| 235 | spl-test6 { |
| 236 | u-boot,dm-pre-proper; |
| 237 | compatible = "sandbox,spl-test"; |
| 238 | stringarray = "pre-proper"; |
| 239 | }; |
| 240 | |
| 241 | spl-test7 { |
| 242 | u-boot,dm-spl; |
| 243 | compatible = "sandbox,spl-test"; |
| 244 | stringarray = "spl"; |
| 245 | }; |
| 246 | |
Simon Glass | 28db469 | 2019-05-18 11:59:41 -0600 | [diff] [blame] | 247 | square { |
| 248 | compatible = "demo-shape"; |
| 249 | colour = "blue"; |
| 250 | sides = <4>; |
| 251 | }; |
| 252 | |
| 253 | timer { |
| 254 | compatible = "sandbox,timer"; |
| 255 | clock-frequency = <1000000>; |
| 256 | }; |
| 257 | |
| 258 | tpm { |
| 259 | u-boot,dm-pre-reloc; |
| 260 | compatible = "google,sandbox-tpm"; |
| 261 | }; |
| 262 | |
| 263 | tpm2 { |
| 264 | compatible = "sandbox,tpm2"; |
| 265 | }; |
| 266 | |
| 267 | triangle { |
| 268 | compatible = "demo-shape"; |
| 269 | colour = "cyan"; |
| 270 | sides = <3>; |
| 271 | character = <83>; |
| 272 | light-gpios = <&gpio_a 2>, <&gpio_b 6 0>; |
| 273 | }; |
| 274 | |
| 275 | /* Needs to be available prior to relocation */ |
| 276 | uart0: serial { |
| 277 | u-boot,dm-spl; |
| 278 | compatible = "sandbox,serial"; |
| 279 | sandbox,text-colour = "cyan"; |
| 280 | pinctrl-names = "default"; |
| 281 | pinctrl-0 = <&pinctrl_serial0>; |
| 282 | }; |
| 283 | |
| 284 | usb@0 { |
| 285 | compatible = "sandbox,usb"; |
| 286 | status = "disabled"; |
| 287 | hub { |
| 288 | compatible = "sandbox,usb-hub"; |
| 289 | #address-cells = <1>; |
| 290 | #size-cells = <0>; |
| 291 | flash-stick { |
| 292 | reg = <0>; |
| 293 | compatible = "sandbox,usb-flash"; |
| 294 | }; |
| 295 | }; |
| 296 | }; |
| 297 | |
| 298 | usb@1 { |
| 299 | compatible = "sandbox,usb"; |
| 300 | hub { |
| 301 | compatible = "usb-hub"; |
| 302 | usb,device-class = <USB_CLASS_HUB>; |
| 303 | hub-emul { |
| 304 | compatible = "sandbox,usb-hub"; |
| 305 | #address-cells = <1>; |
| 306 | #size-cells = <0>; |
| 307 | flash-stick { |
| 308 | reg = <0>; |
| 309 | compatible = "sandbox,usb-flash"; |
| 310 | sandbox,filepath = "flash.bin"; |
| 311 | }; |
| 312 | }; |
| 313 | }; |
| 314 | }; |
| 315 | |
| 316 | usb@2 { |
| 317 | compatible = "sandbox,usb"; |
| 318 | status = "disabled"; |
| 319 | }; |
| 320 | |
| 321 | spmi: spmi@0 { |
| 322 | compatible = "sandbox,spmi"; |
| 323 | #address-cells = <0x1>; |
| 324 | #size-cells = <0x1>; |
| 325 | pm8916@0 { |
| 326 | compatible = "qcom,spmi-pmic"; |
| 327 | reg = <0x0 0x1>; |
| 328 | #address-cells = <0x1>; |
| 329 | #size-cells = <0x1>; |
| 330 | |
| 331 | spmi_gpios: gpios@c000 { |
| 332 | compatible = "qcom,pm8916-gpio"; |
| 333 | reg = <0xc000 0x400>; |
| 334 | gpio-controller; |
| 335 | gpio-count = <4>; |
| 336 | #gpio-cells = <2>; |
| 337 | gpio-bank-name="spmi"; |
| 338 | }; |
| 339 | }; |
| 340 | }; |
| 341 | |
| 342 | axi: axi@0 { |
| 343 | compatible = "sandbox,axi"; |
| 344 | #address-cells = <0x1>; |
| 345 | #size-cells = <0x1>; |
| 346 | store@0 { |
| 347 | compatible = "sandbox,sandbox_store"; |
| 348 | reg = <0x0 0x400>; |
| 349 | }; |
| 350 | }; |
| 351 | |
| 352 | onewire0: onewire { |
| 353 | compatible = "w1-gpio"; |
| 354 | gpios = <&gpio_a 8>; |
| 355 | pinctrl-names = "default"; |
| 356 | pinctrl-0 = <&pinctrl_onewire0>; |
| 357 | status = "okay"; |
| 358 | |
| 359 | sandbox_eeprom0: sandbox_eeprom@0 { |
| 360 | compatible = "sandbox,w1-eeprom"; |
| 361 | status = "okay"; |
| 362 | }; |
| 363 | }; |
| 364 | |
| 365 | sandbox_tee { |
| 366 | compatible = "sandbox,tee"; |
| 367 | }; |
| 368 | }; |
| 369 | |
| 370 | &cros_ec { |
| 371 | /* |
| 372 | * This describes the flash memory within the EC. Note |
| 373 | * that the STM32L flash erases to 0, not 0xff. |
| 374 | */ |
| 375 | flash { |
| 376 | image-pos = <0x08000000>; |
| 377 | size = <0x20000>; |
| 378 | erase-value = <0>; |
| 379 | |
| 380 | /* Information for sandbox */ |
| 381 | ro { |
| 382 | image-pos = <0>; |
| 383 | size = <0xf000>; |
| 384 | }; |
| 385 | wp-ro { |
| 386 | image-pos = <0xf000>; |
| 387 | size = <0x1000>; |
| 388 | }; |
| 389 | rw { |
| 390 | image-pos = <0x10000>; |
| 391 | size = <0x10000>; |
| 392 | }; |
| 393 | }; |
| 394 | |
| 395 | keyboard-controller { |
| 396 | u-boot,dm-pre-reloc; |
| 397 | }; |
| 398 | }; |