test-fdt-overlay.dts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (c) 2016 NextThing Co
  4. * Copyright (c) 2016 Free Electrons
  5. */
  6. /dts-v1/;
  7. /plugin/;
  8. / {
  9. /* Test that we can change an int by another */
  10. fragment@0 {
  11. target = <&test>;
  12. __overlay__ {
  13. test-int-property = <43>;
  14. };
  15. };
  16. /* Test that we can replace a string by a longer one */
  17. fragment@1 {
  18. target = <&test>;
  19. __overlay__ {
  20. test-str-property = "foobar";
  21. };
  22. };
  23. /* Test that we add a new property */
  24. fragment@2 {
  25. target = <&test>;
  26. __overlay__ {
  27. test-str-property-2 = "foobar2";
  28. };
  29. };
  30. /* Test that we add a new node (by phandle) */
  31. fragment@3 {
  32. target = <&test>;
  33. __overlay__ {
  34. new-node {
  35. new-property;
  36. };
  37. };
  38. };
  39. /* Test that we add a new node (by path) */
  40. fragment@4 {
  41. target-path = "/";
  42. __overlay__ {
  43. new-node {
  44. new-property;
  45. };
  46. };
  47. };
  48. fragment@5 {
  49. target-path = "/";
  50. __overlay__ {
  51. local: new-local-node {
  52. new-property;
  53. };
  54. };
  55. };
  56. fragment@6 {
  57. target-path = "/";
  58. __overlay__ {
  59. test-phandle = <&test>, <&local>;
  60. };
  61. };
  62. fragment@7 {
  63. target-path = "/";
  64. __overlay__ {
  65. test-several-phandle = <&local>, <&local>;
  66. };
  67. };
  68. fragment@8 {
  69. target = <&test>;
  70. __overlay__ {
  71. sub-test-node {
  72. new-sub-test-property;
  73. };
  74. };
  75. };
  76. };