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