silver2row

some DS1340 for a BBGG and things...

Oct 20th, 2020
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.80 KB | None | 0 0
  1. /* Used and molded from bb.org-overlays on github.com/beagleboard/bb.org-overlays */
  2. /*
  3.  * Copyright (C) 2018 Tim Small <tim@seoss.co.uk>
  4.  *
  5.  * Based on PB-I2C2-RTC-PCF8523.dts:
  6.  *
  7.  * Copyright (C) 2018 Robert Nelson <robertcnelson@gmail.com>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License version 2 as
  11.  * published by the Free Software Foundation.
  12.  *
  13.  * This overlay is for a Maxim (Dallas) DS1338 RTC connected via the
  14.  * BeagleBone's second I2C bus.
  15. * https://www.maximintegrated.com/en/products/digital/real-time-clocks/DS1338.html
  16. *
  17. * It was built for the South Coast Science "DFE" air quality monitoring
  18. * cape, but may be useful for any hardware which includes a DS1338
  19. *
  20. * https://www.southcoastscience.com/products/
  21. *
  22. * https://github.com/south-coast-science/scs_documentation/wiki/Digital-Front-End-%28DFE%29-for-BeagleBone-v1
  23. */
  24.  
  25.  
  26. /dts-v1/;
  27. /plugin/;
  28.  
  29. #include <dt-bindings/board/am335x-bbw-bbb-base.h>
  30. #include <dt-bindings/gpio/gpio.h>
  31. #include <dt-bindings/pinctrl/am33xx.h>
  32.  
  33. / {
  34.  fragment@0 {
  35.    target-path="/";
  36.    __overlay__ {
  37.  
  38.      chosen {
  39.        overlays {
  40.          BB-I2C0-DS1340-0A00 = __TIMESTAMP__;
  41.        };
  42.      };
  43.    };
  44.  };
  45.  
  46.  fragment@1 {
  47.    target-path="/";
  48.    __overlay__ {
  49.      aliases {
  50.        rtc0 = &extrtc;
  51.  
  52.        rtc1 = "/ocp/rtc@44e3e000";
  53.      };
  54.    };
  55.  };
  56.  fragment@2 {
  57.    target = <&i2c0>;
  58.     __overlay__ {
  59.       status = "okay";
  60.  
  61.       #address-cells = <1>;
  62.       #size-cells = <0>;
  63.  
  64.       extrtc: ds1340@6h {
  65.         compatible = "maxim,ds1340";
  66.         reg = <0x60>;
  67.         /* DS1340: This is the last address seen before 0x7h that ends it all and returns to 0x0h (the start) */
  68.       };
  69.     };
  70.  };
  71. };
Add Comment
Please, Sign In to add comment