1/* 2 * Copyright (c) 2020 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Application overlay for testing the devicetree.h API. 7 * 8 * Names in this file should be chosen in a way that won't conflict 9 * with real-world devicetree nodes, to allow these tests to run on 10 * (and be extended to test) real hardware. 11 */ 12 13/ { 14 aliases { 15 test-alias = &test_nodelabel; 16 }; 17 18 chosen { 19 ztest,gpio = &test_nodelabel; 20 }; 21 22 zephyr,user { 23 ph = <&test_gpio_1>; 24 string = "foo"; 25 }; 26 27 test { 28 #address-cells = < 0x1 >; 29 #size-cells = < 0x1 >; 30 interrupt-parent = <&test_intc>; 31 32 test_cpu_intc: interrupt-controller { 33 compatible = "vnd,cpu-intc"; 34 #address-cells = <0>; 35 #interrupt-cells = < 0x01 >; 36 interrupt-controller; 37 }; 38 39 test_pinctrl: pin-controller { 40 compatible = "vnd,pinctrl"; 41 test_pincfg_a: pincfg-a {}; 42 test_pincfg_b: pincfg-b {}; 43 test_pincfg_c: pincfg-c {}; 44 test_pincfg_d: pincfg-d {}; 45 }; 46 47 test_arrays: array-holder { 48 /* 49 * vnd,undefined-compat is for DT_NODE_HAS_COMPAT_STATUS(..,okay). 50 * There should only be one vnd,array-holder in the entire DTS. 51 */ 52 compatible = "vnd,array-holder", "vnd,undefined-compat"; 53 a = <1000 2000 3000>; 54 b = [aa bb cc dd]; 55 c = "bar", "baz"; 56 }; 57 58 test_phandles: phandle-holder-0 { 59 /* 60 * There should only be one vnd,phandle-holder in the entire DTS. 61 */ 62 compatible = "vnd,phandle-holder"; 63 /* 64 * At least one of these phandles must refer to 65 * test_gpio_1, or dependency ordinal tests may fail. 66 */ 67 ph = <&test_gpio_1>; 68 phs = <&test_i2c &test_spi>; 69 phs-or = <&test_enum_default_0 &test_enum_default_1>; 70 gpios = <&test_gpio_1 10 20>, <&test_gpio_2 30 40>; 71 pha-gpios = <&test_gpio_1 50 60>, <0>, <&test_gpio_3 70>, <&test_gpio_2 80 90>; 72 foos = <&test_gpio_1 100>, <&test_gpio_2 110>; 73 foo-names = "A", "b-c"; 74 pwms = <&test_pwm1 8 200 3>, <&test_pwm2 5 100 1>; 75 pwm-names = "red", "green"; 76 bar = <&test_gpio_1 200>, <&test_gpio_2 210>; 77 baz-names = "john", "doe"; 78 }; 79 80 test_enum_0: enum-0 { 81 compatible = "vnd,enum-holder"; 82 val = "zero"; 83 }; 84 85 test_enum_1: enum-1 { 86 compatible = "vnd,enum-holder"; 87 val = "two"; 88 }; 89 90 test_enum_default_0: enum-2 { 91 compatible = "vnd,enum-required-false-holder"; 92 val = "one"; 93 }; 94 95 test_enum_default_1: enum-3 { 96 compatible = "vnd,enum-required-false-holder"; 97 }; 98 99 test_enum_int_default_0: enum-4 { 100 compatible = "vnd,enum-int-required-false-holder"; 101 val = < 5 >; 102 }; 103 104 test_enum_int_default_1: enum-5 { 105 compatible = "vnd,enum-int-required-false-holder"; 106 }; 107 108 enum-6 { 109 compatible = "vnd,enum-holder-inst"; 110 val = "zero"; 111 }; 112 113 enum-7 { 114 compatible = "vnd,enum-required-false-holder-inst"; 115 }; 116 117 test_enum_string_array: enum-8 { 118 compatible = "vnd,enum-string-array-holder"; 119 val = "foo", "zoo", "foo"; 120 }; 121 122 test_enum_int_array: enum-9 { 123 compatible = "vnd,enum-int-array-holder"; 124 val = <4 3 4 0>; 125 }; 126 127 /* 128 * disabled/reserved should be the only nodes with their 129 * compatible in the tree. 130 */ 131 disabled-node@0 { 132 compatible = "vnd,disabled-compat"; 133 reg = < 0x0 0x1000 >; 134 status = "disabled"; 135 }; 136 137 reserved-node@0 { 138 compatible = "vnd,reserved-node"; 139 reg = < 0x0 0x1000 >; 140 status = "reserved"; 141 }; 142 143 disabled_gpio: gpio@0 { 144 compatible = "vnd,gpio-device"; 145 gpio-controller; 146 reg = < 0x0 0x1000 >; 147 interrupts = <3 1>; 148 #gpio-cells = < 0x2 >; 149 status = "disabled"; 150 }; 151 152 reserved_gpio: gpio@1 { 153 compatible = "vnd,gpio-device"; 154 gpio-controller; 155 reg = < 0x1 0x1000 >; 156 interrupts = <3 1>; 157 #gpio-cells = < 0x2 >; 158 status = "reserved"; 159 }; 160 161 test_no_status: intc_no_status@0 { 162 compatible = "vnd,intc"; 163 reg = <0x0 0x1000>; 164 interrupt-controller; 165 #interrupt-cells = <2>; 166 }; 167 168 test_nodelabel: TEST_NODELABEL_ALLCAPS: test_gpio_1: gpio@deadbeef { 169 compatible = "vnd,gpio-device"; 170 gpio-controller; 171 reg = < 0xdeadbeef 0x1000 >; 172 #gpio-cells = < 0x2 >; 173 #foo-cells = < 0x1 >; 174 #baz-cells = < 0x1 >; 175 interrupts = <4 3>; 176 status = "okay"; 177 ngpios = <100>; 178 179 test_gpio_hog_1 { 180 gpio-hog; 181 gpios = <0x0 0x00>, <0x1 0x10>; 182 output-high; 183 }; 184 185 test_gpio_hog_2 { 186 gpio-hog; 187 gpios = <0x3 0x20>; 188 output-low; 189 }; 190 }; 191 192 test_gpio_2: gpio@abcd1234 { 193 compatible = "vnd,gpio-device"; 194 gpio-controller; 195 reg = < 0xabcd1234 0x500 0x98765432 0xff >; 196 reg-names = "one", "two"; 197 #gpio-cells = < 0x2 >; 198 #foo-cells = < 0x1 >; 199 #baz-cells = < 0x1 >; 200 interrupts = <5 2>; 201 status = "okay"; 202 ngpios = <200>; 203 204 test_gpio_hog_3 { 205 gpio-hog; 206 gpios = <0x4 0x30>; 207 input; 208 line-name = "TEST_GPIO_HOG_3"; 209 }; 210 }; 211 212 test_gpio_3: gpio@1234 { 213 compatible = "vnd,gpio-one-cell"; 214 gpio-controller; 215 reg = < 0x1234 0x500 >; 216 #gpio-cells = < 0x1 >; 217 status = "okay"; 218 }; 219 220 test_gpio_4: gpio@1234abcd { 221 compatible = "vnd,gpio-intc-device"; 222 reg = <0x1234abcd 0x500>; 223 gpio-controller; 224 #gpio-cells = <0x2>; 225 interrupt-controller; 226 #interrupt-cells = <0x2>; 227 status = "okay"; 228 }; 229 230 test_i2c: i2c@11112222 { 231 #address-cells = < 1 >; 232 #size-cells = < 0 >; 233 compatible = "vnd,i2c"; 234 reg = < 0x11112222 0x1000 >; 235 status = "okay"; 236 clock-frequency = < 100000 >; 237 interrupts = <6 2 7 1>; 238 interrupt-names = "status", "error"; 239 240 test-i2c-dev@10 { 241 compatible = "vnd,i2c-device"; 242 reg = < 0x10 >; 243 }; 244 245 gpio@11 { 246 gpio-controller; 247 #gpio-cells = <2>; 248 compatible = "vnd,gpio-expander"; 249 reg = <0x11>; 250 }; 251 252 test_i2c_mux: i2c-mux@12 { 253 compatible = "vnd,i2c-mux"; 254 reg = <0x12>; 255 i2c-mux-ctlr-1 { 256 compatible = "vnd,i2c-mux-controller"; 257 #address-cells = <1>; 258 #size-cells = <0>; 259 test_muxed_i2c_dev_1: muxed-i2c-dev@10 { 260 compatible = "vnd,i2c-device"; 261 status = "disabled"; 262 reg = <0x10>; 263 }; 264 }; 265 i2c-mux-ctlr-2 { 266 compatible = "vnd,i2c-mux-controller"; 267 #address-cells = <1>; 268 #size-cells = <0>; 269 test_muxed_i2c_dev_2: muxed-i2c-dev@10 { 270 compatible = "vnd,i2c-device"; 271 status = "disabled"; 272 reg = <0x10>; 273 }; 274 }; 275 }; 276 }; 277 278 test_i2c_no_reg: i2c { 279 #address-cells = < 1 >; 280 #size-cells = < 0 >; 281 compatible = "vnd,i2c"; 282 status = "okay"; 283 clock-frequency = < 100000 >; 284 285 test-i2c-dev@12 { 286 compatible = "vnd,i2c-device"; 287 reg = < 0x12 >; 288 }; 289 }; 290 291 test_i3c: i3c@88889999 { 292 #address-cells = < 3 >; 293 #size-cells = < 0 >; 294 compatible = "vnd,i3c"; 295 reg = < 0x88889999 0x1000 >; 296 status = "okay"; 297 298 test-i3c-dev@420000ABCD12345678 { 299 compatible = "vnd,i3c-device"; 300 reg = < 0x42 0xABCD 0x12345678 >; 301 }; 302 303 test-i3c-i2c-dev@380000000000000050 { 304 compatible = "vnd,i3c-i2c-device"; 305 reg = < 0x38 0x0 0x50 >; 306 }; 307 }; 308 309 test_mbox: mbox { 310 compatible = "vnd,mbox"; 311 #mbox-cells = <1>; 312 status = "okay"; 313 }; 314 315 test_mbox_zero_cell: mbox_zero_cell { 316 compatible = "vnd,mbox-zero-cell"; 317 #mbox-cells = <0>; 318 status = "okay"; 319 }; 320 321 test_spi: spi@33334444 { 322 #address-cells = < 1 >; 323 #size-cells = < 0 >; 324 compatible = "vnd,spi"; 325 reg = < 0x33334444 0x1000 >; 326 interrupts = <8 3 9 0 10 1>; 327 status = "okay"; 328 clock-frequency = < 2000000 >; 329 330 cs-gpios = <&test_gpio_1 0x10 0x20>, 331 <&test_gpio_2 0x30 0x40>, 332 <&test_gpio_2 0x50 0x60>; 333 334 /* all vnd,spi-device instances should have CS */ 335 336 test-spi-dev@0 { 337 compatible = "vnd,spi-device"; 338 reg = <0>; 339 spi-max-frequency = < 2000000 >; 340 }; 341 342 test-spi-dev@1 { 343 compatible = "vnd,spi-device"; 344 reg = <1>; 345 spi-max-frequency = < 2000000 >; 346 }; 347 348 gpio@2 { 349 gpio-controller; 350 #gpio-cells = <2>; 351 compatible = "vnd,gpio-expander"; 352 reg = <2>; 353 spi-max-frequency = <(1 * 1000 * 1000)>; 354 }; 355 }; 356 357 test_spi_no_cs: spi@55556666 { 358 #address-cells = < 1 >; 359 #size-cells = < 0 >; 360 compatible = "vnd,spi"; 361 reg = < 0x55556666 0x1000 >; 362 status = "okay"; 363 clock-frequency = < 2000000 >; 364 365 /* 366 * There should only be one spi-device-2 node. 367 * It should not have a CS GPIO. 368 */ 369 test_spi_dev_no_cs: test-spi-dev@0 { 370 compatible = "vnd,spi-device-2"; 371 reg = <0>; 372 spi-max-frequency = < 2000000 >; 373 }; 374 }; 375 376 test_i2c_1: i2c@77778888 { 377 #address-cells = < 1 >; 378 #size-cells = < 0 >; 379 compatible = "vnd,i2c"; 380 reg = < 0x77778888 0x1000 >; 381 status = "okay"; 382 clock-frequency = < 100000 >; 383 interrupts = <11 3 12 2>; 384 interrupt-names = "status", "error"; 385 }; 386 387 test_adc_1: adc@10002000 { 388 reg = <0x10002000 0x1000>; 389 compatible = "vnd,adc"; 390 status = "okay"; 391 #io-channel-cells = <1>; 392 }; 393 394 test_adc_2: adc@10003000 { 395 reg = <0x10003000 0x1000>; 396 compatible = "vnd,adc"; 397 status = "okay"; 398 #io-channel-cells = <1>; 399 }; 400 401 /* there should only be one of these */ 402 test_temp_sensor: temperature-sensor { 403 compatible = "vnd,adc-temp-sensor"; 404 io-channels = <&test_adc_1 10>, <&test_adc_2 20>; 405 io-channel-names = "ch1", "ch2"; 406 dmas = <&test_dma1 1 2>, <&test_dma2 3 4>; 407 dma-names = "tx", "rx"; 408 clocks = <&test_clk 3 7>, <&test_fixed_clk>, <&test_clk 8 2>; 409 clock-names = "clk-a", "clk-fixed", "clk-b"; 410 resets = <&test_reset 10>, <&test_reset 20>; 411 reset-names = "reset-a", "reset-b"; 412 pinctrl-0 = <&test_pincfg_a &test_pincfg_b>; 413 pinctrl-1 = <&test_pincfg_c &test_pincfg_d>; 414 pinctrl-2 = <&test_pincfg_d>; 415 pinctrl-names = "default", "sleep", "f.o.o2"; 416 mboxes = <&test_mbox 1>, <&test_mbox 2>, <&test_mbox_zero_cell>; 417 mbox-names = "tx", "rx", "zero"; 418 }; 419 420 /* there should only be one of these */ 421 test_reg: reg-holder@9999aaaa { 422 compatible = "vnd,reg-holder"; 423 reg = < 0x9999aaaa 0x1000 0xbbbbcccc 0x3f >; 424 status = "okay"; 425 reg-names = "first", "second"; 426 misc-prop = <1234>; 427 }; 428 429 test_vendor: vendor { 430 compatible = "vnd,model1", "gpio", "zephyr,model2"; 431 status = "okay"; 432 }; 433 434 test_intc: interrupt-controller@bbbbcccc { 435 compatible = "vnd,intc"; 436 reg = <0xbbbbcccc 0x1000>; 437 interrupt-controller; 438 #interrupt-cells = <2>; 439 interrupts = <11 0>; 440 interrupt-parent = <&test_cpu_intc>; 441 }; 442 443 /* same as `test_intc` but extends a different L1 interrupt. 444 * Required for testing if interrupts are encoded properly for 445 * nodes consuming interrupts from different aggregators. 446 */ 447 test_intc2: interrupt-controller@bbbbdccc { 448 compatible = "vnd,intc"; 449 reg = <0xbbbbdccc 0x1000>; 450 interrupt-controller; 451 #interrupt-cells = <2>; 452 interrupts = <12 0>; 453 interrupt-parent = <&test_cpu_intc>; 454 }; 455 456 /* there should only be one of these */ 457 test_irq: interrupt-holder { 458 compatible = "vnd,interrupt-holder"; 459 status = "okay"; 460 interrupts = <30 3 40 5 60 7>; 461 interrupt-parent = <&test_intc>; 462 interrupt-names = "err", "stat", "done"; 463 }; 464 465 /* there should only be one of these */ 466 test_irq_extended: interrupt-holder-extended { 467 compatible = "vnd,interrupt-holder-extended"; 468 status = "okay"; 469 interrupts-extended = <&test_intc 70 7>, 470 <&test_gpio_4 30 3>, 471 <&test_intc2 42 7>; 472 interrupt-names = "int1", "int2", "int3"; 473 }; 474 475 test_fixed_clk: test-fixed-clock { 476 compatible = "fixed-clock"; 477 clock-frequency = <25000000>; 478 #clock-cells = <0>; 479 }; 480 481 test_clk: test-clock { 482 compatible = "vnd,clock"; 483 #clock-cells = <2>; 484 }; 485 486 test_reset: test-reset@abcd1234 { 487 compatible = "vnd,reset"; 488 reg-width = <4>; 489 reg = <0xabcd1234 0x100>; 490 #reset-cells = <1>; 491 }; 492 493 test_dma1: dma@44443333 { 494 compatible = "vnd,dma"; 495 #dma-cells = <2>; 496 reg = < 0x44443333 0x1000 >; 497 interrupts = <11 3>; 498 status = "okay"; 499 }; 500 501 test_dma2: dma@44442222 { 502 compatible = "vnd,dma"; 503 #dma-cells = <2>; 504 reg = < 0x44442222 0x1000 >; 505 interrupts = <12 3>; 506 status = "okay"; 507 }; 508 509 test_video0: video@10010000 { 510 compatible = "vnd,video-single-port"; 511 reg = <0x10010000 0x1000>; 512 513 test_video0_port: port { 514 test_video0_out: endpoint { 515 remote-endpoint-label = "test_video2_port0_in0"; 516 }; 517 }; 518 }; 519 520 test_video1: video@10011000 { 521 compatible = "vnd,video-single-port"; 522 reg = <0x10011000 0x1000>; 523 524 test_video1_port: port { 525 #address-cells = <1>; 526 #size-cells = <0>; 527 528 test_video1_out0: endpoint@0 { 529 reg = <0x0>; 530 remote-endpoint-label = "test_video2_port0_in1"; 531 }; 532 533 test_video1_out1: endpoint@1 { 534 reg = <0x1>; 535 remote-endpoint-label = "test_video2_port1_in"; 536 }; 537 }; 538 }; 539 540 test_video2: video@10012000 { 541 compatible = "vnd,video-multi-port"; 542 reg = <0x10012000 0x1000>; 543 544 ports { 545 #address-cells = <1>; 546 #size-cells = <0>; 547 548 test_video2_port0: port@0 { 549 reg = <0x0>; 550 #address-cells = <1>; 551 #size-cells = <0>; 552 553 test_video2_port0_in0: endpoint@0 { 554 reg = <0x0>; 555 remote-endpoint-label = "test_video0_out"; 556 }; 557 558 test_video2_port0_in1: endpoint@1 { 559 reg = <0x1>; 560 remote-endpoint-label = "test_video1_out0"; 561 }; 562 }; 563 564 test_video2_port1: port@1 { 565 reg = <0x1>; 566 567 test_video2_port1_in: endpoint { 568 remote-endpoint-label = "test_video1_out1"; 569 }; 570 }; 571 }; 572 }; 573 574 test_pwm1: pwm@55551111 { 575 compatible = "vnd,pwm"; 576 #pwm-cells = <3>; 577 reg = < 0x55551111 0x1000 >; 578 status = "okay"; 579 }; 580 581 test_pwm2: pwm@55552222 { 582 compatible = "vnd,pwm"; 583 #pwm-cells = <3>; 584 reg = < 0x55552222 0x1000 >; 585 status = "okay"; 586 }; 587 588 test_transceiver0: can-phy0 { 589 compatible = "vnd,can-transceiver"; 590 status = "okay"; 591 #phy-cells = <0>; 592 min-bitrate = <10000>; 593 max-bitrate = <5000000>; 594 }; 595 596 test_transceiver1: can-phy1 { 597 compatible = "vnd,can-transceiver"; 598 status = "okay"; 599 #phy-cells = <0>; 600 max-bitrate = <1000000>; 601 }; 602 603 test_can0: can@55553333 { 604 compatible = "vnd,can-controller"; 605 reg = < 0x55553333 0x1000 >; 606 status = "okay"; 607 phys = <&test_transceiver0>; 608 }; 609 610 test_can1: can@55554444 { 611 compatible = "vnd,can-controller"; 612 reg = < 0x55554444 0x1000 >; 613 status = "okay"; 614 615 can-transceiver { 616 min-bitrate = <50000>; 617 max-bitrate = <2000000>; 618 }; 619 }; 620 621 test_can2: can@55555555 { 622 compatible = "vnd,can-controller"; 623 reg = < 0x55555555 0x1000 >; 624 status = "okay"; 625 626 can-transceiver { 627 max-bitrate = <1000000>; 628 }; 629 }; 630 631 test_can3: can@55557777 { 632 compatible = "vnd,can-controller"; 633 reg = < 0x55556666 0x1000 >; 634 status = "okay"; 635 phys = <&test_transceiver1>; 636 }; 637 638 test_parent: test-parent { 639 compatible = "vnd,parent-bindings"; 640 641 test_parent_a: parent-a { 642 val = <0>; 643 644 test_parent_b: parent-b { 645 val = <0>; 646 }; 647 }; 648 }; 649 650 /* there should only be one of these */ 651 test_children: test-children { 652 compatible = "vnd,child-bindings"; 653 654 test_child_a: child-a { 655 val = <0>; 656 status = "okay"; 657 }; 658 test_child_b: child-b { 659 val = <1>; 660 status = "okay"; 661 }; 662 test_child_c: child-c { 663 val = <2>; 664 status = "disabled"; 665 }; 666 }; 667 668 test-great-grandchildren { 669 compatible = "vnd,great-grandchild-bindings"; 670 671 child { 672 grandchild { 673 test_ggc: great-grandchild { 674 ggc-prop = <42>; 675 }; 676 }; 677 }; 678 }; 679 680 test-ranges { 681 #address-cells = <2>; 682 #size-cells = <1>; 683 684 test_ranges_pcie: pcie@0 { 685 compatible = "vnd,pcie"; 686 reg = <0 0 1>; 687 #address-cells = <3>; 688 #size-cells = <2>; 689 690 ranges = <0x1000000 0 0 0 0x3eff0000 0 0x10000>, 691 <0x2000000 0 0x10000000 0 0x10000000 0 0x2eff0000>, 692 <0x3000000 0x80 0 0x80 0 0x80 0>; 693 }; 694 695 test_ranges_other: other@1 { 696 reg = <0 1 1>; 697 #address-cells = <2>; 698 #size-cells = <1>; 699 700 ranges = <0x0 0x0 0x0 0x3eff0000 0x10000>, 701 <0x0 0x10000000 0x0 0x10000000 0x2eff0000>; 702 }; 703 704 test_ranges_empty: empty@2 { 705 reg = <0 2 1>; 706 #address-cells = <2>; 707 #size-cells = <1>; 708 709 ranges; 710 }; 711 }; 712 713 device-with-props-0 { 714 compatible = "vnd,device-with-props"; 715 status = "okay"; 716 foo = <1>; 717 bar = <2>; 718 bool-foo; 719 bool-bar; 720 }; 721 722 device-with-props-1 { 723 compatible = "vnd,device-with-props"; 724 status = "okay"; 725 foo = <2>; 726 bool-foo; 727 }; 728 729 device-with-props-2 { 730 compatible = "vnd,device-with-props"; 731 status = "disabled"; 732 baz = <1>; 733 bool-baz; 734 }; 735 736 test_string_token_0: string-token-0 { 737 compatible = "vnd,string-token"; 738 val = "token_zero"; 739 }; 740 741 test_string_token_1: string-token-1 { 742 compatible = "vnd,string-token"; 743 val = "token_one"; 744 }; 745 746 test_string_token_2: string-token-2 { 747 compatible = "vnd,string-token"; 748 val = "token_two"; 749 }; 750 751 test_str_array_token_0: string-array-token-0 { 752 compatible = "vnd,string-array-token"; 753 val = "token_first_idx_zero", 754 "token_first_idx_one", 755 "token_first_idx_two"; 756 }; 757 758 test_str_array_token_1: string-array-token-1 { 759 compatible = "vnd,string-array-token"; 760 val = "token_second_idx_zero", 761 "token_second_idx_one", 762 "token_second_idx_two", 763 "token_second_idx_three"; 764 }; 765 766 test_str_unquoted_f0: string-unquoted-f0 { 767 compatible = "vnd,string-unquoted"; 768 val = "0.1234"; 769 }; 770 771 test_str_unquoted_f1: string-unquoted-f1 { 772 compatible = "vnd,string-unquoted"; 773 val = "0.9e-3"; 774 }; 775 776 test_str_unquoted_t: string-unquoted-t { 777 compatible = "vnd,string-unquoted"; 778 val = "XA XPLUS XB"; 779 }; 780 781 test_str_unquoted_esc_t: string-unquoted-escape-t { 782 compatible = "vnd,string-unquoted"; 783 val = "XA\nXPLUS\nXB"; 784 }; 785 786 /* 787 * Tests expect all vnd,string-unquoted instances to evaluate to doubles, 788 * so use vnd,string instead. 789 */ 790 test_str_unquoted_esc_s: string-unquoted-escape-s { 791 compatible = "vnd,string"; 792 val = "XSTR1 \" plus \" XSTR2"; 793 }; 794 795 test_stra_unquoted_f0: string-array-unquoted-f0 { 796 compatible = "vnd,string-array-unquoted"; 797 val = "1.0e2", "2.0e2", "3.0e2", "4.0e2"; 798 }; 799 800 test_stra_unquoted_f1: string-array-unquoted-f1 { 801 compatible = "vnd,string-array-unquoted"; 802 val = "0.01", "0.1", "1.0", "10.0"; 803 }; 804 805 test_stra_unquoted_t: string-array-unquoted-t { 806 compatible = "vnd,string-array-unquoted"; 807 val = "XA XPLUS XB", "XC XPLUS XD", "XA XMINUS XB", "XC XMINUS XD"; 808 }; 809 810 /* 811 * Tests expect all vnd,string-array-unquoted instances to evaluate to doubles, 812 * so use vnd,string-array instead. 813 */ 814 test_stra_unquoted_esc: string-array-unquoted-escape { 815 compatible = "vnd,string-array"; 816 val = "XA\nXPLUS\nXB", "XSTR1 \" plus \" XSTR2"; 817 }; 818 819 test_str_escape_0: string-escape-0 { 820 compatible = "vnd,string"; 821 val = "\a\b\f\n\r\t\v"; 822 }; 823 824 test_str_escape_1: string-escape-1 { 825 compatible = "vnd,string"; 826 val = "\'single\' \"double\""; 827 }; 828 829 test_str_escape_2: string-escape-2 { 830 compatible = "vnd,string"; 831 val = "first\nsecond"; 832 }; 833 834 test_str_escape_3: string-escape-3 { 835 compatible = "vnd,string"; 836 val = "\x01\x7F"; 837 }; 838 839 test_stra_escape: string-array-escape { 840 compatible = "vnd,string-array"; 841 val = "\a\b\f\n\r\t\v", 842 "\'single\' \"double\"", 843 "first\nsecond", 844 "\x01\x7F"; 845 }; 846 847 test-mtd@ffeeddcc { 848 reg = < 0xffeeddcc 0x1000 >; 849 #address-cells = < 1 >; 850 #size-cells = < 1 >; 851 852 flash@20000000 { 853 compatible = "soc-nv-flash"; 854 reg = < 0x20000000 0x100 >; 855 partitions { 856 compatible = "fixed-partitions"; 857 #address-cells = < 1 >; 858 #size-cells = < 1 >; 859 860 partition@0 { 861 reg = < 0x0 0xc0 >; 862 label = "test-partition-0"; 863 }; 864 partition@c0 { 865 reg = < 0xc0 0x40 >; 866 label = "test-partition-1"; 867 }; 868 }; 869 }; 870 }; 871 872 test-mtd@33221100 { 873 reg = < 0x33221100 0x1000 >; 874 875 partitions { 876 compatible = "fixed-partitions"; 877 #address-cells = < 1 >; 878 #size-cells = < 1 >; 879 880 partition@6ff80 { 881 reg = < 0x6ff80 0x80 >; 882 label = "test-partition-2"; 883 }; 884 }; 885 }; 886 }; 887 888 test_64 { 889 #address-cells = < 2 >; 890 #size-cells = < 0 >; 891 892 test_reg_64: reg-holder-64@ffffffff11223344 { 893 compatible = "vnd,reg-holder-64"; 894 reg = < 0xffffffff 0x11223344>; 895 status = "okay"; 896 reg-names = "test_name"; 897 }; 898 }; 899 900 non-deprecated-label { 901 compatible = "vnd,non-deprecated-label"; 902 label = "FOO"; 903 }; 904}; 905