ath79: set mib-poll-interval on mdio0 attached ar83xx switch
authorPetr Štetiar <ynezz@true.cz>
Sun, 14 Apr 2019 15:26:04 +0000 (17:26 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 20 May 2019 19:19:48 +0000 (21:19 +0200)
Commit "generic: ar8216: add mib_poll_interval switch attribute" sets
mib-poll-interval as disabled by default (was set to 2s), so it makes
switch LEDs trigger disfunctional on devices which don't have
mib-poll-interval set.

So this patch sets mib-poll-interval to 500ms on devices which have
ar83xx switch connected to mdio0 bus, as the same value was set for
built in switches in 443fc9ac35 ("ath79: use ar8216 for builtin
switch").

Some measurements performed on TP-Link Archer C7-v5:

 mib-type=0, mib-poll-interval=500ms (10s pidstat)

  Average:  %usr %system  %guest   %wait    %CPU   CPU  Command
  Average:  0.00    1.93    0.00    0.00    1.93     -  kworker/0:2

  iperf3 (30s): 334 Mbits/sec

 mib-type=0, mib-poll-interval=2s (10s pidstat)

  Average:  %usr %system  %guest   %wait    %CPU   CPU  Command
  Average:  0.00    1.14    0.00    0.00    1.14     -  kworker/0:2

  iperf3 (30s): 334 Mbits/sec

So it seems like we get 4x faster LED refresh rate for additional 0.8%
CPU load.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
target/linux/ath79/dts/qca9563_dlink_dir-859-a1.dts
target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi
target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi
target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi

index 23b4cc512604cd12a8e633678e90cc6ea339394f..8bd9067afa34384e7107a38cc58bc81cf22de0d1 100644 (file)
        phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "sgmii";
+               qca,mib-poll-interval = <500>;
 
                qca,ar8327-initvals = <
                        0x04 0x00080080 /* PORT0 PAD MODE CTRL */
index 7a88f56a0262da47a9efe3f1e6f5aa72fb0e6a41..ebc9177a39d552bf87066468f9f68ea3d1d5b576 100644 (file)
        phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "sgmii";
+               qca,mib-poll-interval = <500>;
 
                qca,ar8327-initvals = <
                        0x04 0x00080080 /* PORT0 PAD MODE CTRL */
index db8869cf165fc8339377f9b9b137533478b04e47..b278c9304b9afc290a9457278f3dbab684028c22 100644 (file)
        phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "sgmii";
+               qca,mib-poll-interval = <500>;
 
                qca,ar8327-initvals = <
                        0x04 0x80080080 /* PORT0 PAD MODE CTRL */
index 37ab16453b60196873e486401efdbbec2b20247a..ac10d9134a64f4c14941e5ee24abdb7332abab5a 100644 (file)
        phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "sgmii";
+               qca,mib-poll-interval = <500>;
 
                qca,ar8327-initvals = <
                        0x04 0x00080080 /* PORT0 PAD MODE CTRL */
index 6e1d5d9b09f36c56cb3ea4c98e54488c3e934562..324d8312492a958a82f17789a5587f165d3ffe80 100644 (file)
        phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "sgmii";
+               qca,mib-poll-interval = <500>;
 
                qca,ar8327-initvals = <
                        0x04 0x80080080 /* PORT0 PAD MODE CTRL */
index c778cf90bafdb4b1acf9cbdc127089d1d54fdf1a..42b4b6b8c6746ca05aaffd66d4719d0abb5df35b 100644 (file)
        phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "sgmii";
+               qca,mib-poll-interval = <500>;
 
                qca,ar8327-initvals = <
                        0x04 0x00080080 /* PORT0 PAD MODE CTRL */