test-fdt-overlay.dts 1.3 KB

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