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