Advertisement
zmatt

modern vs raw dts overlay syntax

Apr 4th, 2023
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.79 KB | None | 0 0
  1. /dts-v1/;                                                       /dts-v1/;
  2. /plugin/;                                                       /plugin/;
  3.                                                                
  4. // modern overlay syntax                                        // raw overlay syntax
  5. //                                                              //
  6. // pretty much like normal dts as long as you stick to          // make sure each fragment has a unique name!  typically
  7. // &label and &{/path} top-level blocks, since a  / {};         // they'll be sequentially numbered as shown here but I
  8. // block will put stuff into the raw overlay.                   // don't know if that's actually required.
  9.                                                                
  10. / {                                                             / {
  11.         OPTIONAL OVERLAY METADATA HERE;                                 OPTIONAL OVERLAY METADATA HERE;
  12. };                                                              
  13.                                                                         fragment@0 {
  14.                                                                                 target = <&foo>;
  15. &foo {                                                                          __overlay__ {
  16.         STUFF HERE;                                                                     STUFF HERE;
  17. };                                                                              };
  18.                                                                         };
  19.                                                                
  20.                                                                         fragment@1 {
  21.                                                                                 target = <&bar>;
  22. &bar {                                                                          __overlay__ {
  23.         MORE STUFF HERE;                                                                MORE STUFF HERE;
  24. };                                                                              };
  25.                                                                         };
  26.                                                                
  27.                                                                         fragment@2 {
  28.                                                                                 target-path = "/foo/bar";
  29. &{/foo/bar} {                                                                   __overlay__ {
  30.         YADA YADA;                                                                      YADA YADA;
  31. };                                                                              };
  32.                                                                         };
  33.                                                                 };
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement