Question regarding clock-provider and m41t80.c

Patrick Schneider patrick.schneider at bhtronik.de
Thu Feb 28 07:18:44 EST 2019


Hi everyone,
I recently went mainline with our embedded device and so far I am happy that I've done it. Coming from a quite old kernel (4.1.15) there are some new features and changes I need to get my head around and one is bugging me for quite some time now.

We are using an RTC which depends on the m41t80 kernel driver. This RTC has a CLK-OUT feature which is per default to ON and 32kHz. We have another chip wired and depending to that clock signal.
On kernel version 4.1.15 there was no feature to enable/disable square wave output for this rtc driver, so it was always on per default.
In newer kernel versions is a change which is adding clock-provider feature to use and enable/disable that CLK-OUT feature.
Which results in the clock output signal being turned of as default option. Now I am totally lost on how to activate that feature in - I think the device tree?
I read through all documentation regarding the matter and tried adding clock attributes in the dts but with no luck so far. My entry is:

/* external real time clock */
i2c_rtc: rtc at 68 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_rtc_int>;
compatible = "st,rv4162", "fixed-clock", "microcrystal,rv4162"; 
reg = <0x68>; 
interrupt-parent = <&gpio5>; 
interrupts = <1 IRQ_TYPE_LEVEL_LOW>; 
status = "okay"; 
#clock-cells = <1>; 
clock-frequency = <32678>; 
clock-output-names = "rtcosc"; 
};

Any help is appreciated!

Best regards,
Patrick



More information about the Kernelnewbies mailing list