From 62abbd587dc9a6c6ea8e46da9a1352b8bdc8cfd5 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 19 Jun 2019 00:07:12 +0200 Subject: [PATCH] ath79: correct various phy-mode properties Upstream commit 6d4cd04 changes how the internal delays of the AR803x based PHYs are enabled. With this commit, all internal delays are disabled on driver probe and enabled based on the 'phy-mode' property in the device-tree. Before this commit, the RX delay was always enabled upon soft-reset while the TX delay retained it's previous state. A hard reset enabled the RX delay while the TX delay was disabled. Because of this inconsistency, wrongly specified PHY-modes were working correctly while the hardware was in a different state. Fix the PHY-modes of some affected devices (and clean up misplaced properties along the way) to keep the devices working flawlessly with kernels >= 5.1. Signed-off-by: David Bauer --- target/linux/ath79/dts/ar9344_ocedo_raccoon.dts | 3 +-- target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts | 1 + target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts | 4 ++++ target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts | 1 + target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 1 + target/linux/ath79/dts/qca9558_ocedo_koala.dts | 2 -- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts index a1a912383f62..812da3dea585 100644 --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts @@ -162,7 +162,6 @@ phy0: ethernet-phy@0 { reg = <0>; - phy-mode = "rgmii"; }; }; @@ -173,6 +172,6 @@ mtd-mac-address = <&art 0x0>; - phy-mode = "rgmii"; + phy-mode = "rgmii-id"; phy-handle = <&phy0>; }; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts index 5900d8b487d7..a844ce777ce1 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts @@ -40,6 +40,7 @@ ð0 { pll-data = <0xbe000000 0x80000101 0x80001313>; + phy-mode = "rgmii-id"; }; &gmac_config { diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts index b5a295440641..567f3c9ee483 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750c.dts @@ -38,6 +38,10 @@ }; }; +ð0 { + phy-mode = "rgmii-id"; +}; + &gmac_config { rxdv-delay = <3>; rxd-delay = <3>; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts index bd3702eb3695..e0bdd209374a 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts @@ -40,6 +40,7 @@ ð0 { pll-data = <0xbe000000 0x80000101 0x80001313>; + phy-mode = "rgmii-id"; }; &gmac_config { diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi index 9937186b1eea..cfd43c8e8a23 100644 --- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi @@ -115,6 +115,7 @@ mtd-mac-address = <&art 0x00>; phy-handle = <&phy4>; + phy-mode = "rgmii-rxid"; pll-data = <0xae000000 0x80000101 0x80001313>; gmac_config: gmac-config { diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index 23835492a314..a80155b08c88 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -142,8 +142,6 @@ phy5: ethernet-phy@5 { reg = <5>; - phy-mode = "rgmii-rxid"; - at803x-disable-smarteee; }; }; -- 2.30.2