ath79: mikrotik: fix reference clock of Routerboard 911G
authorLech Perczak <lech.perczak@gmail.com>
Wed, 12 Feb 2025 01:25:53 +0000 (02:25 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 12 Feb 2025 23:24:14 +0000 (00:24 +0100)
When support for Routerboard 911G was introduced, Routerboad 912UAG
device tree was used as a base, and the common part. This led to use of
40MHz as the reference clock frequency for both [1], while RB911G uses 25MHz
crystal on the board, causing heavy system clock drift.

Split the definition, and set the reference clock frequency for RB911G
back to 25MHz.

[1] a716ac556497 ("ath79: fix reference clock for RouterBoard 912UAG")

Fixes: bcc44b1212b2 ("ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17944
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g-xhpnd.dts
target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts

index 5fa44b4412ca788a4968b4cf7df0fcfb547e7481..655c590f8c9bda6e1fb2707d64ef59648332d172 100644 (file)
@@ -9,3 +9,7 @@
        compatible = "mikrotik,routerboard-911g-xhpnd", "qca,ar9342";
        model = "MikroTik RouterBOARD 911G-(2,5)HPnD";
 };
+
+&ref {
+       clock-frequency = <25000000>;
+};
index 0c98a6634ee4b737d884ef77c42ce28397b1c9dd..3a8c60456f8f8ebdb2b2f62f923137ab19fb23fe 100644 (file)
        };
 };
 
-&ref {
-       clock-frequency = <40000000>;
-};
-
 &spi {
        status = "okay";
 
index 81d7284b3da1e09b4e6499413d18b7112d14022c..4cf62349f5bbd6d62e7ab81e1c326c94ad3d57c9 100644 (file)
        model = "MikroTik RouterBOARD 912UAG-(2,5)HPnD";
 };
 
+&ref {
+       clock-frequency = <40000000>;
+};
+
 &pcie {
        status = "okay";
 };