ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing
authorArınç ÜNAL <arinc.unal@arinc9.com>
Sun, 28 Apr 2024 19:52:51 +0000 (22:52 +0300)
committerDaniel Golle <daniel@makrotopia.org>
Wed, 1 May 2024 12:50:54 +0000 (13:50 +0100)
commit3ea6125c501e3adc81227cc69fb9e28eec69f2b8
treea6ed0b068efa0741b996f1eb8f36959d2520bcbe
parent622131671198b6f02f1fd45dd0514a65873e2569
ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing

Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
bus the switch listens on. The PHY muxing feature makes use of this.

This is problematic as the PHY may be attached before the switch is
initialised, in which case, the PHY will fail to be attached.

Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
of switch MDIO bus") on mainline Linux, we can describe the switch PHYs on
the MDIO bus of the switch on the device tree.

When the PHY is described this way, the switch will be initialised first,
then the switch MDIO bus will be registered. Only after these steps, the
PHY will be attached.

Describe the switch PHYs on mt7621.dtsi and remove defining the switch PHY
on the SoC's mdio bus node. When the PHY muxing is in use, the interrupts
for the muxed PHY won't work, therefore delete the "interrupts" property on
the devices where the PHY muxing feature is in use.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
125 files changed:
target/linux/ramips/dts/mt7621.dtsi
target/linux/ramips/dts/mt7621_adslr_g7.dts
target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts
target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts
target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi
target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts
target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts
target/linux/ramips/dts/mt7621_asus_rt-ax54.dts
target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
target/linux/ramips/dts/mt7621_belkin_rt1800.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
target/linux/ramips/dts/mt7621_cudy_m1800.dts
target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts
target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi
target/linux/ramips/dts/mt7621_cudy_wr2100.dts
target/linux/ramips/dts/mt7621_cudy_x6.dtsi
target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi
target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi
target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
target/linux/ramips/dts/mt7621_etisalat_s3.dts
target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi
target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
target/linux/ramips/dts/mt7621_humax_e10.dts
target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts
target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts
target/linux/ramips/dts/mt7621_iptime_a3004t.dts
target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi
target/linux/ramips/dts/mt7621_iptime_a8004t.dts
target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
target/linux/ramips/dts/mt7621_iptime_t5004.dts
target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
target/linux/ramips/dts/mt7621_jcg_q20.dts
target/linux/ramips/dts/mt7621_jcg_y2.dts
target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts
target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
target/linux/ramips/dts/mt7621_linksys_e5600.dts
target/linux/ramips/dts/mt7621_linksys_e7350.dts
target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts
target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
target/linux/ramips/dts/mt7621_linksys_re6500.dts
target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
target/linux/ramips/dts/mt7621_meig_slt866.dts
target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts
target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
target/linux/ramips/dts/mt7621_netgear_wac104.dts
target/linux/ramips/dts/mt7621_netgear_wax202.dts
target/linux/ramips/dts/mt7621_netis_wf2881.dts
target/linux/ramips/dts/mt7621_oraybox_x3a.dts
target/linux/ramips/dts/mt7621_phicomm_k2p.dts
target/linux/ramips/dts/mt7621_planex_vr500.dts
target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts
target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts
target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts
target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi
target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts
target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
target/linux/ramips/dts/mt7621_totolink_a7000r.dts
target/linux/ramips/dts/mt7621_totolink_x5000r.dts
target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts
target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts
target/linux/ramips/dts/mt7621_tplink_er605-v2.dts
target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts
target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts
target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts
target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts
target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi
target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
target/linux/ramips/dts/mt7621_youku_yk-l2.dts
target/linux/ramips/dts/mt7621_yuncore_ax820.dts
target/linux/ramips/dts/mt7621_yuncore_fap640.dts
target/linux/ramips/dts/mt7621_yuncore_g720.dts
target/linux/ramips/dts/mt7621_z-router_zr-2660.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi
target/linux/ramips/dts/mt7621_zyxel_wsm20.dts