Advertisement
zmatt

bb.org-overlays vs overlay-utils

Jun 23rd, 2020 (edited)
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. // UPDATE: sufficiently recent versions of dtc support syntax similar to that used by overlay-utils, except you do still need the two directives at the top, and manually add the file identification fragment.
  2.  
  3. // normal overlay syntax: | // dtsi-style syntax, converted to overlay syntax using
  4. | // bin/dtsi-to-overlay perl script from overlay-utils
  5. |
  6. /dts-v1/; |
  7. /plugin/; |
  8. |
  9. #include <dt-bindings/board/am335x-bbw-bbb-base.h> | #include <dt-bindings/board/am335x-bbw-bbb-base.h>
  10. #include <dt-bindings/pinctrl/am33xx.h> | #include <dt-bindings/pinctrl/am33xx.h>
  11. |
  12. / { |
  13. fragment@0 { |
  14. target-path= " /chosen"; |
  15. __overlay__ { |
  16. overlays { |
  17. BB-UART1-00A0 = __TIMESTAMP__; | // file identification is added automatically
  18. }; | // by dtsi-to-overlay
  19. }; |
  20. }; |
  21. |
  22. fragment@1 { |
  23. target = <&ocp>; |
  24. __overlay__ { | &ocp {
  25. P9_24_pinmux { status = "disabled"; }; | P9_24_pinmux { status = "disabled"; };
  26. P9_26_pinmux { status = "disabled"; }; | P9_26_pinmux { status = "disabled"; };
  27. }; | };
  28. }; |
  29. |
  30. fragment@2 { |
  31. target = <&am33xx_pinmux>; |
  32. __overlay__ { | &am33xx_pinmux {
  33. uart1_pins: uart1 { | uart1_pins: uart1 {
  34. pinctrl-single,pins = < | pinctrl-single,pins = <
  35. BONE_P9_24 (PIN_OUTPUT | MUX_MODE0) | BONE_P9_24 (PIN_OUTPUT | MUX_MODE0)
  36. BONE_P9_26 (PIN_INPUT | MUX_MODE0) | BONE_P9_26 (PIN_INPUT | MUX_MODE0)
  37. >; | >;
  38. }; | };
  39. }; | };
  40. }; |
  41. |
  42. fragment@3 { |
  43. target = <&uart1>; |
  44. __overlay__ { | &uart1 {
  45. status = "okay"; | status = "okay";
  46. pinctrl-names = "default"; | pinctrl-names = "default";
  47. pinctrl-0 = <&uart1_pins>; | pinctrl-0 = <&uart1_pins>;
  48. }; | };
  49. }; |
  50. }; |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement