From 7774b86019377fa4aae0f0612d8cb67201eb13bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= Date: Mon, 14 Feb 2022 10:00:40 +0300 Subject: [PATCH] ramips: mt7621-dts: add pinctrl properties for ethernet MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add the missing pinctrl properties on the ethernet node. GMAC1 will start working with this change. Link: https://lore.kernel.org/netdev/83a35aa3-6cb8-2bc4-2ff4-64278bbcd8c8@arinc9.com/ Overwrite pinctrl-0 property without rgmii2_pins on devicetrees which use the rgmii2 pins as GPIO (22 - 33). Give gpio function to rgmii2 pin group on mt7621_tplink_archer-x6-v3.dtsi which uses GPIO 28. Signed-off-by: Arınç ÜNAL --- target/linux/ramips/dts/mt7621.dtsi | 3 +++ target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts | 4 ++++ target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts | 4 ++++ target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts | 4 ++++ target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts | 4 ++++ target/linux/ramips/dts/mt7621_firefly_firewrt.dts | 4 ++++ target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts | 4 ++++ target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts | 4 ++++ target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts | 4 ++++ .../linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts | 4 ++++ .../linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts | 4 ++++ target/linux/ramips/dts/mt7621_mtc_wr1201.dts | 4 ++++ target/linux/ramips/dts/mt7621_netgear_ex6150.dts | 4 ++++ target/linux/ramips/dts/mt7621_sercomm_na502.dts | 4 ++++ target/linux/ramips/dts/mt7621_telco-electronics_x1.dts | 4 ++++ target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi | 6 +++++- target/linux/ramips/dts/mt7621_tplink_re350-v1.dts | 4 ++++ target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi | 4 ++++ target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 4 ++++ target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts | 4 ++++ target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi | 4 ++++ target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts | 4 ++++ target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts | 4 ++++ target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi | 4 ++++ target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts | 4 ++++ target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi | 4 ++++ target/linux/ramips/dts/mt7621_zyxel_nr7101.dts | 4 ++++ 27 files changed, 108 insertions(+), 1 deletion(-) diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index bfb66740a21..09124072bd7 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -456,6 +456,9 @@ mediatek,ethsys = <&sysc>; + pinctrl-names = "default"; + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>, <&rgmii2_pins>; + gmac0: mac@0 { compatible = "mediatek,eth-mac"; reg = <0>; diff --git a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts index 8c6fdab04f8..cc048d44879 100644 --- a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts +++ b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts @@ -147,6 +147,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index f9211463f85..74d8fbe1d1e 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -152,6 +152,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &switch0 { ports { port@0 { diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index 5d20b6e28a8..0f3b0fd8f01 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -172,6 +172,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts index d30e4d19536..03b593e093d 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -174,6 +174,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index 9da515f017b..46954b616f0 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -104,6 +104,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index db760381a45..6854d56266e 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -99,6 +99,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index a3ef3a01043..de113c2a5ab 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -109,6 +109,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts index 73dfbef27fc..43cf502b0b2 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -112,6 +112,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_5>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts index c86eea0de57..ce627d6621a 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts @@ -39,6 +39,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &switch0 { ports { port@0 { diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts index 20a834a3ebf..eacbbda54d6 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts @@ -66,6 +66,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &switch0 { ports { port@0 { diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index b1b020b3a85..0f45743d6f4 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -98,6 +98,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 360bcbb77d4..1695e9c845c 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -227,6 +227,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index ee77e303624..9ec4cf77888 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -95,6 +95,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts index ce700e0c2b9..23e85f99022 100644 --- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts +++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts @@ -120,6 +120,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi index 3cc738530cc..6454273f496 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi @@ -115,7 +115,7 @@ &state_default { gpio { - groups = "i2c", "uart2", "uart3", "jtag", "wdt"; + groups = "i2c", "rgmii2", "uart2", "uart3", "jtag", "wdt"; function = "gpio"; }; }; @@ -153,6 +153,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_config_8>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index 3df4bc5d64f..866abf87c61 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -147,6 +147,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_config_10008>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 6cb6c0e460b..f67c0e3c6d9 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -167,6 +167,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_config_10008>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index e968c4e6850..dcc84d7ccc1 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -19,6 +19,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_22>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts index 252ade4854f..f8c6bffb403 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts @@ -137,6 +137,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index 005cc619c61..cfd2344d21c 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -108,6 +108,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index af6181b6d01..ec81839d1d2 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -118,6 +118,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index 6e04f9a4934..32f7e5056a3 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -152,6 +152,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi index e377a134448..4830206ae14 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi @@ -148,6 +148,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index e33fac8db10..a1d6af94662 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -106,6 +106,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 01269e1c1cf..9af057378d1 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -110,6 +110,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts index 2a0bc6f8fd0..71eb4c9414b 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts @@ -143,6 +143,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; -- 2.30.2