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