[PATCH v2 3/3] ramips: mt7621-dts: add pinctrl properties for ethernet
Rosen Penev
rosenp at gmail.com
Fri Feb 11 13:53:35 PST 2022
On Fri, Feb 11, 2022 at 4:46 AM Arınç ÜNAL <arinc.unal at arinc9.com> wrote:
>
> 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).
>
> Add rgmii2 pin group to gpio function on mt7621_tplink_archer-x6-v3.dtsi
> which uses GPIO 28.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
> ---
> 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 bfb66740a2..56799201c0 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 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
> +
> gmac0: mac at 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 8c6fdab04f..73c125e496 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 = <&rgmii1_pins &mdio_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 f9211463f8..7b82008ff7 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 = <&rgmii1_pins &mdio_pins>;
> +};
> +
> &switch0 {
> ports {
> port at 0 {
> diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
> index 5d20b6e28a..5e295791a3 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 = <&rgmii1_pins &mdio_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 d30e4d1953..dc537cf504 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 = <&rgmii1_pins &mdio_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 9da515f017..247d9b797e 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 = <&rgmii1_pins &mdio_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 db760381a4..e7545736aa 100644
> --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
> +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
this device does not have the second GMAC connected to another
ethernet interface. The PC2 does.
> @@ -99,6 +99,10 @@
> status = "okay";
> };
>
> +ðernet {
> + pinctrl-0 = <&rgmii1_pins &mdio_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 a3ef3a0104..eb19f2faae 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 = <&rgmii1_pins &mdio_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 73dfbef27f..7778da1c95 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 = <&rgmii1_pins &mdio_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 c86eea0de5..245688d7ac 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 = <&rgmii1_pins &mdio_pins>;
> +};
> +
> &switch0 {
> ports {
> port at 0 {
> diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts
> index 20a834a3eb..aaf395d345 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 = <&rgmii1_pins &mdio_pins>;
> +};
> +
> &switch0 {
> ports {
> port at 0 {
> diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
> index b1b020b3a8..3e1a1d77f0 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 = <&rgmii1_pins &mdio_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 360bcbb77d..72a722336d 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 = <&rgmii1_pins &mdio_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 ee77e30362..89da09cc1b 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 = <&rgmii1_pins &mdio_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 ce700e0c2b..593f2b7e00 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 = <&rgmii1_pins &mdio_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 3cc738530c..3c0aab83b6 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 = <&rgmii1_pins &mdio_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 3df4bc5d64..53abc0184f 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 = <&rgmii1_pins &mdio_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 6cb6c0e460..c1a429b870 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 = <&rgmii1_pins &mdio_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 e968c4e685..91b8049808 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 = <&rgmii1_pins &mdio_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 252ade4854..884a0d1da9 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 = <&rgmii1_pins &mdio_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 005cc619c6..ac0d222573 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 = <&rgmii1_pins &mdio_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 af6181b6d0..bdeb7d97c8 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 = <&rgmii1_pins &mdio_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 6e04f9a493..e9b4e73746 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 = <&rgmii1_pins &mdio_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 e377a13444..c9b12615e6 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 = <&rgmii1_pins &mdio_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 e33fac8db1..e6337b4fa7 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 = <&rgmii1_pins &mdio_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 01269e1c1c..264e7b3cb9 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 = <&rgmii1_pins &mdio_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 2a0bc6f8fd..a5edd57ce3 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 = <&rgmii1_pins &mdio_pins>;
> +};
> +
> &gmac0 {
> nvmem-cells = <&macaddr_factory_e000>;
> nvmem-cell-names = "mac-address";
> --
> 2.25.1
>
More information about the openwrt-devel
mailing list