diff options
author | Michael Pratt <mcpratt@pm.me> | 2021-05-30 02:02:47 -0400 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2021-06-23 14:22:18 +0800 |
commit | 6972e498d33ec896c676b7af91e3bfb00aa846a1 (patch) | |
tree | 87d64f51431260d109ab9641a99e9bf4dd97bb65 /target/linux/ramips/dts | |
parent | 0976b6c4262a11a8d0dab9aeb64f5cdee266c44a (diff) | |
download | upstream-6972e498d33ec896c676b7af91e3bfb00aa846a1.tar.gz upstream-6972e498d33ec896c676b7af91e3bfb00aa846a1.tar.bz2 upstream-6972e498d33ec896c676b7af91e3bfb00aa846a1.zip |
ramips: mt7620: move mt7620_mdio_mode() to ethernet driver
The function mt7620_mdio_mode is only called once
and both the function and mdio_mode block have been named incorrectly,
leading to confusion and useless commits.
These lines in the mdio_mode block of mt7620_hw_init
are only intended for boards with an external mt7530 switch.
(see commit 194ca6127ee18cd3a95da4d03f02e43b5428c0bb)
Therefore, move lines from mdio_mode to the place in soc_mt7620.c
where the type of mt7530 switch is identified,
and move lines from mt7620_mdio_mode to a main function.
mt7620_mdio_mode was called from mt7620_gsw_init
where the priv struct is available,
so the lines must stay in mt7620_gsw_init function.
In order to keep things as simple as possible,
keep the DTS property related function calls together,
by moving them from mt7620_gsw_probe to init.
Remove the now useless DTS properties and extra phy nodes.
Fixes: 5a6229a93df8 ("ramips: remove superfluous & confusing DT binding")
Fixes: b85fe43ec8c4 ("ramips: mt7620: add force use of mdio-mode")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'target/linux/ramips/dts')
-rw-r--r-- | target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi | 2 | ||||
-rw-r--r-- | target/linux/ramips/dts/mt7620a_engenius_esr600.dts | 1 | ||||
-rw-r--r-- | target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts | 23 |
3 files changed, 1 insertions, 25 deletions
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index 5cb8451547..6060fd99a6 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -155,8 +155,6 @@ mtd-mac-address = <&factory 0x4>; - mediatek,mdio-mode = <1>; - phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; phy-reset-duration = <30>; diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts index 2f0f9b256e..ea895ac6ea 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts @@ -144,7 +144,6 @@ mdio-bus { status = "okay"; - mediatek,mdio-mode; ethernet-phy@0 { reg = <0>; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index ee845c7b5e..41d69d009b 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -115,9 +115,8 @@ mdio-bus { status = "okay"; - mediatek,mdio-mode = <1>; - phy0: ethernet-phy@0 { + ethernet-phy@0 { reg = <0>; phy-mode = "rgmii"; qca,ar8327-initvals = < @@ -127,26 +126,6 @@ 0x94 0x00000000 /* PORT6_STATUS */ >; }; - - phy1: ethernet-phy@1 { - reg = <1>; - phy-mode = "rgmii"; - }; - - phy2: ethernet-phy@2 { - reg = <2>; - phy-mode = "rgmii"; - }; - - phy3: ethernet-phy@3 { - reg = <3>; - phy-mode = "rgmii"; - }; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; }; }; |