Jump to content

dorchain

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by dorchain

  1. Hello, still not pleased with the accuracy of the builtin rtc of my banana pi, I added a ds3231 module similar to the one described at https://thepihut.com/blogs/raspberry-pi-tutorials/17209332-adding-a-real-time-clock-to-your-raspberry-pi to it. With that, I noticed two things: - The example I started with at https://github.com/armbian/sunxi-DT-overlays/blob/master/examples/i2c-ds1307.dts contains a typo (a space too much between * and /) at line 11. - It is not completely easy to have an external rtc chip being the default rtc for the board. Anyway, here is the overlay I ended up with: /dts-v1/; /plugin/; / { compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,su n8i-h3", "allwinner,sun50i-a64", "allwinner,sun50i-h5"; /* * Aliases can be used to set the external RTC as rtc0 * Needs supplying the correct path to the I2C controller RTC is connect ed to, * this example is for I2C1 on A20 */ fragment@0 { target-path = "/aliases"; __overlay__ { rtc1 = "/soc@01c00000/rtc@01c20d00"; }; }; fragment@1 { target-path = "/aliases"; __overlay__ { rtc0 = "/soc@01c00000/i2c@01c2b400/ds3231@68"; }; }; fragment@2 { target = <&i2c2>; __overlay__ { #address-cells = <1>; #size-cells = <0>; ds3231@68 { compatible = "maxim,ds3231"; reg = <0x68>; status = "okay"; }; }; }; }; Works fine through armbian-add-overlay and is currently in works-for-me state. Added bonus: the chip has a temperature sensor: # sensors ds3231-i2c-1-68 Adapter: mv64xxx_i2c adapter temp1: +19.8°C Bye, Joerg P.s.: These rtc-board are available also from your Chinese hardware crap dealer of least distrust for less than 1 USD.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines