[rtc-linux] Re: [PATCH 1/15] clk: divider: Make divider_round_rate take the parent clock

2017-03-09 Thread Maxime Ripard
Hi Stephen, On Tue, Mar 07, 2017 at 06:11:57AM -0800, Stephen Boyd wrote: > On 03/07, Maxime Ripard wrote: > > So far, divider_round_rate only considers the parent clock returned by > > clk_hw_get_parent. > > > > This works fine on clocks that have a single pa

[rtc-linux] [PATCH 1/15] clk: divider: Make divider_round_rate take the parent clock

2017-03-07 Thread Maxime Ripard
_rate(hw, clk_hw_get_parent(hw), E2, E3, E4, E5, E6) ...> } Signed-off-by: Maxime Ripard Cc: Carlo Caione Cc: Kevin Hilman Cc: Vladimir Zapolskiy Cc: Sylvain Lemieux Cc: Andy Gross Cc: David Brown Cc: Alessandro Zummo Cc: Alexandre Belloni Cc: linux-amlo...@lists.infradead.org Cc

[rtc-linux] Re: [PATCH -next] rtc: sun6i: Fix return value check in sun6i_rtc_clk_init()

2017-02-08 Thread Maxime Ripard
s: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") > Signed-off-by: Wei Yongjun Acked-by: Maxime Ripard Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to

[rtc-linux] Re: [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy

2017-01-25 Thread Maxime Ripard
On Tue, Jan 24, 2017 at 06:49:35PM +0100, Alexandre Belloni wrote: > Hi, > > On 23/01/2017 at 11:41:45 +0100, Maxime Ripard wrote : > > Hi, > > > > The RTC used in the A31 and later SoC has an accuracy issue, which is > > already significant even after a couple

[rtc-linux] [PATCH v2 5/7] rtc: sun6i: Switch to devm_rtc_device_register

2017-01-23 Thread Maxime Ripard
Now that we have a devm variant of rtc_device_register, switch to it. Signed-off-by: Maxime Ripard --- drivers/rtc/rtc-sun6i.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c index 37f65c50ab2d..613f42ade533

[rtc-linux] [PATCH v2 4/7] rtc: sun6i: Expose the 32kHz oscillator

2017-01-23 Thread Maxime Ripard
r) in the case where we're missing that phandle. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/rtc/sun6i-rtc.txt | 10 +- drivers/rtc/rtc-sun6i.c | 146 +++-- 2 files changed, 143 insertions(+), 13 deletions(-) diff --git a/Doc

[rtc-linux] [PATCH v2 3/7] rtc: sun6i: Switch to the external oscillator

2017-01-23 Thread Maxime Ripard
external oscillator is reported to be mandatory in the Allwinner datasheet, so we can just switch to it. Cc: sta...@vger.kernel.org Fixes: 9765d2d94309 ("rtc: sun6i: Add sun6i RTC driver") Signed-off-by: Maxime Ripard --- drivers/rtc/rtc-sun6i.c | 6 ++ 1 file changed, 6 insertions(+), 0

[rtc-linux] [PATCH v2 2/7] rtc: sun6i: Add some locking

2017-01-23 Thread Maxime Ripard
Some registers have a read-modify-write access pattern that are not atomic. Add some locking to prevent from concurrent accesses. Cc: sta...@vger.kernel.org Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- drivers/rtc/rtc-sun6i.c | 17 +++-- 1 file changed, 15 insertions

[rtc-linux] [PATCH v2 1/7] rtc: sun6i: Disable the build as a module

2017-01-23 Thread Maxime Ripard
Since we have to provide the clock very early on, the RTC driver cannot be built as a module. Make sure that won't happen. Cc: sta...@vger.kernel.org Signed-off-by: Maxime Ripard --- drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sun6i.c | 7 +-- 2 files changed, 2 insertions(

[rtc-linux] [PATCH v2 6/7] ARM: sun8i: a23/a33: Enable the real LOSC and use it

2017-01-23 Thread Maxime Ripard
So far, the LOSC was generated through the RTC internal oscillator, which was a pretty poor and inaccurate choice. Now that the RTC properly exposes its internal mux between its oscillator and the external oscillator, we can use it were relevant. Signed-off-by: Maxime Ripard --- arch/arm/boot

[rtc-linux] [PATCH v2 7/7] ARM: sun8i: a23/a33: Add the oscillators accuracy

2017-01-23 Thread Maxime Ripard
The datasheet provided by Allwinner requires oscillators with an accuracy of 50ppm. Add it to our fixed clocks so that we can properly track the accuracy chain. Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff

[rtc-linux] [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy

2017-01-23 Thread Maxime Ripard
witched to devm - Reordered the patches Maxime Ripard (7): rtc: sun6i: Disable the build as a module rtc: sun6i: Add some locking rtc: sun6i: Switch to the external oscillator rtc: sun6i: Expose the 32kHz oscillator rtc: sun6i: Switch to devm_rtc_device_register ARM: sun8i: a23/a33: Enabl

[rtc-linux] [PATCH 0/6] rtc: sun6i: Fix the RTC accuracy

2017-01-20 Thread Maxime Ripard
is time by making it part of the CCF. It turned out to be a bit more complicated than one would expect since the mux found inside the RTC also controls one of the input of the main clock unit. Therefore, it needs to be probed before the main clock unit driver. Let me know what you think, Maxime Max

[rtc-linux] [PATCH 6/6] ARM: sun8i: a23/a33: Add the oscillators accuracy

2017-01-20 Thread Maxime Ripard
The datasheet provided by Allwinner requires oscillators with an accuracy of 50ppm. Add it to our fixed clocks so that we can properly track the accuracy chain. Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun8i-a23-a33.dtsi | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff

[rtc-linux] [PATCH 3/6] rtc: sun6i: Disable the build as a module

2017-01-20 Thread Maxime Ripard
Since we have to provide the clock very early on, the RTC driver cannot be built as a module. Make sure that won't happen. Signed-off-by: Maxime Ripard --- drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-sun6i.c | 17 + 2 files changed, 2 insertions(+), 17 deletions(-)

[rtc-linux] [PATCH 5/6] ARM: sun8i: a23/a33: Enable the real LOSC and use it

2017-01-20 Thread Maxime Ripard
So far, the LOSC was generated through the RTC internal oscillator, which was a pretty poor and inaccurate choice. Now that the RTC properly exposes its internal mux between its oscillator and the external oscillator, we can use it were relevant. Signed-off-by: Maxime Ripard --- arch/arm/boot

[rtc-linux] [PATCH 4/6] rtc: sun6i: Force the mux to the external oscillator

2017-01-20 Thread Maxime Ripard
The internal oscillator is way too inaccurate to do something useful with it. Switch to the external oscillator if it is available. Signed-off-by: Maxime Ripard --- drivers/rtc/rtc-sun6i.c | 12 1 file changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/rtc/rtc-sun6i.c

[rtc-linux] [PATCH 2/6] rtc: sun6i: Add some locking

2017-01-20 Thread Maxime Ripard
Some registers have a read-modify-write access pattern that are not atomic. Add some locking to prevent from concurrent accesses. Signed-off-by: Maxime Ripard --- drivers/rtc/rtc-sun6i.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc

[rtc-linux] [PATCH 1/6] rtc: sun6i: Expose the 32kHz oscillator

2017-01-20 Thread Maxime Ripard
r) in the case where we're missing that phandle. Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/rtc/sun6i-rtc.txt | 8 +- drivers/rtc/rtc-sun6i.c | 140 - 2 files changed, 139 insertions(+), 9 deletions(-) diff --git a/Doc

[rtc-linux] Re: [PATCH] rtc: sun6i: Switch to the external oscillator

2017-01-16 Thread Maxime Ripard
Hi, On Mon, Jan 16, 2017 at 04:39:59PM +0100, Alexandre Belloni wrote: > On 16/01/2017 at 16:21:48 +0100, Maxime Ripard wrote : > > The RTC is clocked from either an internal, imprecise, oscillator or an > > external one, which is usually much more accurate. > > > &g

[rtc-linux] [PATCH] rtc: sun6i: Switch to the external oscillator

2017-01-16 Thread Maxime Ripard
external oscillator is reported to be mandatory in the Allwinner datasheet, so we can just switch to it. Cc: sta...@vger.kernel.org Fixes: 9765d2d94309 ("rtc: sun6i: Add sun6i RTC driver") Signed-off-by: Maxime Ripard --- drivers/rtc/rtc-sun6i.c | 6 ++ 1 file changed, 6 insertions(+)

[rtc-linux] Re: [PATCH v6 0/4] ARM: dts: sun9i: Enable X-Powers AC100 RTC

2016-08-22 Thread Maxime Ripard
Hi, On Fri, Aug 19, 2016 at 03:42:22PM +0800, Chen-Yu Tsai wrote: > Hi everyone, > > This was "mfd: ac100: Add support for X-Powers AC100 audio codec / RTC > combo IC". The driver bits have all been merged. Applied the DT patches. Thanks! Maxime -- Maxime Ripard, Free El

[rtc-linux] Re: [PATCH v5 7/7] ARM: dts: sun9i: Switch to the AC100 RTC clock outputs for osc32k

2016-07-10 Thread Maxime Ripard
that an unresolved dependency when the driver has not loaded yet, or is not even compiled ? How is it working then? Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribed to "rtc

[rtc-linux] Re: [PATCH] rtc: sunxi: use external oscillator

2016-07-07 Thread Maxime Ripard
; is absolutely no use in a 32KHz +- 20% oscillator, if a 32.768KHz crystal is > available. Yes, poking into the registers in drivers/clk would also work. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you

[rtc-linux] Re: [PATCH] rtc: sunxi: use external oscillator

2016-07-06 Thread Maxime Ripard
xed > 32.768 KHz clk. So this patch actually makes things right. On the condition that the driver gets loaded, which is not guaranteed. Maxime -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message bec

[rtc-linux] Re: [PATCH] rtc: sunxi: use external oscillator

2016-07-06 Thread Maxime Ripard
'm guessing you could do a clock driver that maps the registers, register its clock, and then when the RTC probes just takes over what has been setup already by the clock driver. This also means removing the ability for the RTC to be compiled as a module. Maxime -- Maxime Ripard, Free Elect

[rtc-linux] Re: [PATCH v3 5/8] rtc: ac100: Add clk output support

2016-06-27 Thread Maxime Ripard
On Wed, Jun 22, 2016 at 06:11:55PM +0800, Chen-Yu Tsai wrote: > On Wed, Jun 22, 2016 at 6:02 PM, Maxime Ripard > wrote: > > Hi, > > > > On Mon, Jun 20, 2016 at 10:52:15AM +0800, Chen-Yu Tsai wrote: > >> + /* > >> + * The ADDA 4 MHz

[rtc-linux] Re: [PATCH v3 5/8] rtc: ac100: Add clk output support

2016-06-22 Thread Maxime Ripard
mpossible to > + * test this. > + */ If that ADDA clock is exposed by the codec, why are you putting it in the RTC? Thanks, Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- You received this message because you are subscr

[rtc-linux] Re: [PATCH v2 08/10] ARM: dts: sun9i: cubieboard4: Order nodes by alphabetical order

2016-06-16 Thread Maxime Ripard
On Wed, Jun 15, 2016 at 06:27:45PM +0800, Chen-Yu Tsai wrote: > Move the &pio node below the mmc nodes for proper ordering by name. > > Signed-off-by: Chen-Yu Tsai Applied, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineerin

[rtc-linux] Re: [PATCH v2 09/10] ARM: dts: sun9i: a80-optimus: Order nodes by alphabetical order

2016-06-16 Thread Maxime Ripard
On Wed, Jun 15, 2016 at 06:27:46PM +0800, Chen-Yu Tsai wrote: > Move the mmc nodes above the ohci nodes for proper ordering by name. > > Signed-off-by: Chen-Yu Tsai Applied, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering ht