ARM: dts: meson: add support for the RTC
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 13 Apr 2019 16:34:21 +0000 (18:34 +0200)
committerKevin Hilman <khilman@baylibre.com>
Tue, 16 Apr 2019 18:57:48 +0000 (11:57 -0700)
The 32-bit Meson SoCs have an RTC block in the AO (always on) area. The
RTC requires an external 32.768 kHz oscillator to work properly. Whether
or not this crystal exists depends on the board, so it has to be added
for each board.dts (instead of adding it somewhere in a generic .dtsi).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
arch/arm/boot/dts/meson.dtsi
arch/arm/boot/dts/meson8.dtsi
arch/arm/boot/dts/meson8b.dtsi

index 6f54a88..8841783 100644 (file)
                                #size-cells = <0>;
                                status = "disabled";
                        };
+
+                       rtc: rtc@740 {
+                               compatible = "amlogic,meson6-rtc";
+                               reg = <0x740 0x14>;
+                               interrupts = <GIC_SPI 72 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <1>;
+                               status = "disabled";
+                       };
                };
 
                usb0: usb@c9040000 {
index d2ec4af..7ef4424 100644 (file)
        compatible = "amlogic,meson8-pwm", "amlogic,meson8b-pwm";
 };
 
+&rtc {
+       compatible = "amlogic,meson8-rtc";
+       resets = <&reset RESET_RTC>;
+};
+
 &saradc {
        compatible = "amlogic,meson8-saradc", "amlogic,meson-saradc";
        clocks = <&clkc CLKID_XTAL>,
index df42e48..800cd65 100644 (file)
        compatible = "amlogic,meson8b-pwm";
 };
 
+&rtc {
+       compatible = "amlogic,meson8b-rtc";
+       resets = <&reset RESET_RTC>;
+};
+
 &saradc {
        compatible = "amlogic,meson8b-saradc", "amlogic,meson-saradc";
        clocks = <&clkc CLKID_XTAL>,