PhilE wrote: ↑
Mon Sep 27, 2021 8:04 am
The dt-bindings for DS3231 that you linked to says that "interrupts" is an optional property.
It also says "When this property is selected, clock on the SQW pin cannot be used" but isn't the clock what we want? What exactly would your showed interrupt DT code do?
The "#clock-cells" property is only useful if some other Device Tree node is going to refer to it
It's helpfull outside of the DT, too. For example it creates the folder /sys/kernel/debug/clk/ds3231_clk_sqw/.
How would you use it?
For now I'm trying to force it active without a consumer by adding flags ( https://github.com/V10lator/rpi-rt-linu ... 07.c#L1641
). That way I get a fast clock on the SQW pin which I'm able to read by connecting it with a GPIO pin on the RPI. Now I just need to figure out how to slow the clock signal down to 1 PPS (should be possible according to the datasheet but all my tries hacking the driver failed so far), then feed it back to the DS1307 driver.