diff options
author | Michael Pratt <mcpratt@pm.me> | 2021-04-03 14:42:51 -0400 |
---|---|---|
committer | Chuanhong Guo <gch981213@gmail.com> | 2021-06-23 14:22:18 +0800 |
commit | 0976b6c4262a11a8d0dab9aeb64f5cdee266c44a (patch) | |
tree | 87b1b5830ce2614e04e34d5301bf462e123e416e /target/linux/ramips/dts | |
parent | de5394a29dae9356a830d043e76591698411e97a (diff) | |
download | upstream-0976b6c4262a11a8d0dab9aeb64f5cdee266c44a.tar.gz upstream-0976b6c4262a11a8d0dab9aeb64f5cdee266c44a.tar.bz2 upstream-0976b6c4262a11a8d0dab9aeb64f5cdee266c44a.zip |
ramips: mt7620: use DTS to set PHY base address for external PHYs
Set the PHY base address to 12 for mt7530 and 8 for others,
which is based on the default setting for some devices
from printing the register with the following command
after it is written to by uboot during the boot cycle.
`md 0x10117014 1`
PHY_BASE option only uses 5 bits of the register,
bits 16 to 20, so use 8-bit integer type.
Set the option using the DTS property mediatek,ephy-base
and create the gsw node if missing.
Also, added a kernel message to display the EPHY base address.
Note:
If anything is written to a PHY address that is greater than 1 hex char (greater than 0xf)
then there is adverse effects with Atheros switches.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'target/linux/ramips/dts')
23 files changed, 56 insertions, 1 deletions
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts index 71b532fc34..b86ab1449b 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts @@ -186,4 +186,5 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts index 9ea28706aa..b0dd31cafc 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts @@ -174,5 +174,5 @@ &gsw { mediatek,port4-gmac; - mediatek,ephy-base-address = /bits/ 16 < 2 >; + mediatek,ephy-base = /bits/ 8 <2>; }; diff --git a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts index 068f75bd96..ba1a2becda 100644 --- a/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts +++ b/target/linux/ramips/dts/mt7620a_dovado_tiny-ac.dts @@ -136,6 +136,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &pcie { diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts index 2337c0f9d3..03a4c96f6b 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts @@ -177,6 +177,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; + &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts index 09763db388..986b047e47 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts @@ -169,6 +169,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; + &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi index 07b03f5c06..5cb8451547 100644 --- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi +++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi @@ -201,6 +201,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <8>; +}; + &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts index 35d0b3dbec..2f0f9b256e 100644 --- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts +++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts @@ -160,6 +160,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <8>; +}; + &state_default { gpio { groups = "i2c", "uartf", "nd_sd", "wled"; diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts index b47d63be85..373205e725 100644 --- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts +++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts @@ -137,6 +137,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts index 487f6aaf6e..7d807bff4b 100644 --- a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts +++ b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts @@ -151,6 +151,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts index 7044a511bc..d59b481a61 100644 --- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts +++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts @@ -184,6 +184,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; + &state_default { gpio { groups = "i2c", "uartf"; diff --git a/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts index 20d0557916..6270af3b15 100644 --- a/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts +++ b/target/linux/ramips/dts/mt7620a_iptime_a1004ns.dts @@ -101,3 +101,7 @@ }; }; }; + +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index 962ef3371d..ee845c7b5e 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -150,6 +150,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <8>; +}; + &pcie { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts index bb1303d4fb..9e0b817163 100644 --- a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts +++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts @@ -135,6 +135,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; + &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts index 0997d8a00e..0544550bf9 100644 --- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts +++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts @@ -112,4 +112,5 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts index 2672d54f36..c38ea8082c 100644 --- a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts +++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts @@ -144,6 +144,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; + &wmac { ralink,mtd-eeprom = <&factory 0x0>; }; diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts index ab8c61b1d8..f839048865 100644 --- a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts +++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts @@ -142,6 +142,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; + &pcie { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts index 4c5baf1e50..ae35941507 100644 --- a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts +++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-evb.dts @@ -106,6 +106,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &sdhci { diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7530-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7530-evb.dts index b76ab2aa59..f7d8cae160 100644 --- a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7530-evb.dts +++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-mt7530-evb.dts @@ -99,6 +99,10 @@ }; }; +&gsw { + mediatek,ephy-base = /bits/ 8 <12>; +}; + &pcie { status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts index 6e8eff50bc..0e963e1f02 100644 --- a/target/linux/ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts +++ b/target/linux/ramips/dts/mt7620a_ralink_mt7620a-v22sg-evb.dts @@ -100,6 +100,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &pcie { diff --git a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts index 329ecc5ea8..1ffc0a2bc8 100644 --- a/target/linux/ramips/dts/mt7620a_sercomm_na930.dts +++ b/target/linux/ramips/dts/mt7620a_sercomm_na930.dts @@ -167,6 +167,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &ehci { diff --git a/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts index 247b5752ef..57cd0ed539 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_re210-v1.dts @@ -62,6 +62,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; ðernet { diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts index 55ab939d15..bfec806c12 100644 --- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts +++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts @@ -196,6 +196,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &wmac { diff --git a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts index 506b828ec8..1a5ff2d0df 100644 --- a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts +++ b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts @@ -158,6 +158,7 @@ &gsw { mediatek,port4-gmac; + mediatek,ephy-base = /bits/ 8 <8>; }; &wmac { |