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 6f54a8897574da85b663d7b1631502e1c4351781..8841783aceec93e4158d0539fd89269243524529 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 d2ec4af82cc569f955bb9e8ea0ac6e171f7f66db..7ef442462ea474460796b03ebe63462f28e5b65e 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 df42e48f1cc16a155249f1bf1c90b654aea3de3c..800cd65fc50a4f0e59c2278eee74d49f117aea63 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>,