lkml.org 
[lkml]   [2020]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 06/33] ARM: dts: exynos: Correct S3C RTC bindings and enable it in Universal C210
From
Date

On 30.08.2020 15:51, Krzysztof Kozlowski wrote:
> The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
> However there is no clock provided for the PMIC and the driver registers
> the clock as regulator. This is an old driver which will not be updated
> so add a workaround - add a fixed-clock to fill missing clock phandle
> reference in S3C RTC. The "clock" regulator in PMIC is already present
> and enabled.
>
> This allows to enable the S3C RTC and fixes dtbs_check warnings:
>
> arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml: rtc@10070000: clocks: [[5, 346]] is too short
> arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml: rtc@10070000: clock-names: ['rtc'] is too short
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Confirmed, this workaround enables s3c-rtc driver operation on this board.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
> arch/arm/boot/dts/exynos4210-universal_c210.dts | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
> index 99ce53b120ac..9479e41bdc2a 100644
> --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
> +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
> @@ -39,6 +39,13 @@
> compatible = "samsung,clock-xusbxti";
> clock-frequency = <24000000>;
> };
> +
> + pmic_ap_clk: pmic-ap-clk {
> + /* Workaround for missing clock on PMIC */
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <32768>;
> + };
> };
>
> vemmc_reg: voltage-regulator {
> @@ -537,6 +544,12 @@
> status = "okay";
> };
>
> +&rtc {
> + status = "okay";
> + clocks = <&clock CLK_RTC>, <&pmic_ap_clk>;
> + clock-names = "rtc", "rtc_src";
> +};
> +
> &sdhci_0 {
> bus-width = <8>;
> non-removable;

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland

\
 
 \ /
  Last update: 2020-08-31 11:49    [W:0.609 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site