ARM: dts: exynos: Correct S3C RTC bindings in SMDK5410
authorKrzysztof Kozlowski <krzk@kernel.org>
Tue, 1 Sep 2020 07:54:08 +0000 (09:54 +0200)
committerKrzysztof Kozlowski <krzk@kernel.org>
Thu, 3 Sep 2020 20:46:44 +0000 (22:46 +0200)
The S3C RTC requires 32768 Hz clock as input which is provided by PMIC.
However the PMIC is not described in DTS at all so at least add
a workaround to model its clock with a fixed-clock.  This fixes S3C RTC
and silences dtbs_check warnings like:

  arch/arm/boot/dts/exynos5410-smdk5410.dt.yaml: rtc@101e0000: clocks: [[5, 317]] is too short
  arch/arm/boot/dts/exynos5410-smdk5410.dt.yaml: rtc@101e0000: clock-names: ['rtc'] is too short

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200901075417.22481-5-krzk@kernel.org
arch/arm/boot/dts/exynos5410-smdk5410.dts

index 5282b5d..2a3ade7 100644 (file)
                #clock-cells = <0>;
        };
 
+       pmic_ap_clk: pmic-ap-clk {
+               /* Workaround for missing PMIC and its clock */
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-frequency = <32768>;
+       };
+
        firmware@2037000 {
                compatible = "samsung,secure-firmware";
                reg = <0x02037000 0x1000>;
        };
 };
 
+&rtc {
+       clocks = <&clock CLK_RTC>, <&pmic_ap_clk>;
+       clock-names = "rtc", "rtc_src";
+};
+
 &sromc {
        pinctrl-names = "default";
        pinctrl-0 = <&srom_ctl>, <&srom_ebi>;