Advertisement
zmatt

BB-I2C2-PCF8523-00A0.dtsi (for overlay-utils)

May 5th, 2023 (edited)
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // make the pcf8523 rtc0 (the primary rtc), renumber the internal rtc to rtc1
  2. &{/aliases} {
  3. #if 0
  4.     // this is what we want:
  5.     rtc0 = &extrtc;
  6.     rtc1 = &rtc;
  7.     // and this would work in a base dts, but path references are not
  8.     // supported in overlay properties.  as workaround you need to hardcode
  9.     // the paths, which unfortunately are kernel version dependent:
  10. #elif 0
  11.     // kernel 4.19
  12.     rtc0 = "/ocp/i2c@4819c000/pcf8523@68";
  13.     rtc1 = "/ocp/rtc@44e3e000";
  14. #elif 1
  15.     // kernel 5.10
  16.     rtc0 = "/ocp/interconnect@48000000/segment@100000/target-module@9c000/i2c@0/pcf8523@68";
  17.     rtc1 = "/ocp/interconnect@44c00000/segment@200000/target-module@3e000/rtc@0";
  18. #endif
  19. };
  20.  
  21. &i2c2 {
  22.     extrtc: pcf8523@68 {
  23.         compatible = "nxp,pcf8523";
  24.         reg = <0x68>;
  25.     };
  26. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement