staging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet
Subsystems (2)
PATCH 1/2 staging: mt7621-dts: fix pinctrl-0 items to be size-1 items on ethernet
Fix pinctrl-0 items under the ethernet node to be size-1 items. Current notation would be used on specifications with non-zero cells.
--- drivers/staging/mt7621-dts/mt7621.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/mt7621-dts/mt7621.dtsi +1 -1
@@ -323,7 +323,7 @@ ethernet: ethernet@1e100000 { mediatek,ethsys = <&sysc>; pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>, <&rgmii2_pins>; gmac0: mac@0 { compatible = "mediatek,eth-mac";
Signature · 1 line
2.25.1
PATCH 2/2 staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node without rgmii2_pins on the GB-PC1 devicetree.
--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)
drivers/staging/mt7621-dts/gbpc1.dts +4 -0
@@ -114,6 +114,10 @@ default_gpio: gpio { }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &switch0 { ports { port@0 {
Signature · 1 line
2.25.1
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Hi Arinc,
Quoted 10 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)
No issues in GB-PC1. So:
Thanks,
Sergio Paracuellos
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>
Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the rgmii2_pins as GPIO.
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.
Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Best regards,
Sergio Paracuellos
Quoted 2 lines
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22
Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
I hacked together something to run 5.17-rc1 for RE650 on OpenWrt. Here's what I found:
When I still have rgmii2_pins on the ethernet node, I don't get any of the warnings above but this happens:
- failsafe button lights_toggle was pressed -
- failsafe -
When I apply this patch and test again I don't get into failsafe anymore.
The key for LIGHTS_TOGGLE is on GPIO 30 which is one of the rgmii2 pins.
https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi#L34
What I make of this is, with newer kernels, pinctrl doesn't care and just claims the pin group for ethernet anyway. This would explain why the lights_toggle key GPIO goes from active low to high. So this patch is still a necessity.
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Hi Arinc,
Quoted 53 lines · Arınç ÜNAL
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Quoted 2 lines
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
I think is this commit which I did according to a review after moving the driver from staging into 'drivers/pincrtl/ralink':
You can also check other changes from where the driver was moved:
Quoted 12 lines
I hacked together something to run 5.17-rc1 for RE650 on OpenWrt. Here's what I found:
When I still have
rgmii2_pinson the ethernet node, I don't get any of the warnings above but this happens:- failsafe button
lights_togglewas pressed -
- failsafe -When I apply this patch and test again I don't get into failsafe anymore.
Quoted 7 lines
The key for
LIGHTS_TOGGLEis on GPIO 30 which is one of the rgmii2 pins.
https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi#L34What I make of this is, with newer kernels, pinctrl doesn't care and just claims the pin group for ethernet anyway. This would explain why the
lights_togglekey GPIO goes from active low to high. So this patch is still a necessity.
Agreed, applying this patch is the correct thing to do.
Best regards,
Sergio Paracuellos
Quoted 2 lines
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Quoted 59 lines · Sergio Paracuellos
Hi Arinc,
Quoted 53 lines · Arınç ÜNAL
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Quoted 2 lines
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
Quoted 8 lines
I think is this commit which I did according to a review after moving the driver from staging into '
drivers/pincrtl/ralink':You can also check other changes from where the driver was moved:
I realised current mt7621.dtsi does not apply the functions we specify for the pin groups on device-specific devicetrees. I believe we need to add this like on OpenWrt's mt7621.dtsi.
https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621.dtsi#L249-L253
Can you apply the patch below to see if you get the error like above? I also put it in attachments in case of space characters replacing tab on the mail.
Arınç
---
drivers/staging/mt7621-dts/gbpc1.dts +0 -4
@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {
drivers/staging/mt7621-dts/mt7621.dtsi +5 -0
@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + }; i2c_pins: i2c0-pins { pinmux {
drivers/staging/mt7621-dts/gbpc1.dts +0 -4
@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {
drivers/staging/mt7621-dts/mt7621.dtsi +5 -0
@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + }; i2c_pins: i2c0-pins { pinmux {
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Hi Arinc,
Quoted 107 lines · Arınç ÜNAL
Quoted 59 lines · Sergio Paracuellos
Hi Arinc,
Quoted 53 lines · Arınç ÜNAL
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Quoted 2 lines
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
Quoted 8 lines
I think is this commit which I did according to a review after moving the driver from staging into '
drivers/pincrtl/ralink':You can also check other changes from where the driver was moved:
I realised current
mt7621.dtsidoes not apply the functions we specify for the pin groups on device-specific devicetrees. I believe we need to add this like on OpenWrt'smt7621.dtsi.https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621.dtsi#L249-L253
Can you apply the patch below to see if you get the error like above? I also put it in attachments in case of space characters replacing tab on the mail.
Arınç
---
drivers/staging/mt7621-dts/gbpc1.dts +0
-4@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {drivers/staging/mt7621-dts/mt7621.dtsi +0
-0
drivers/staging/mt7621-dts/mt7621.dtsi spi0: spi@b00 { · line 159
Quoted 8 lines
drivers/staging/mt7621-dts/mt7621.dtsi +5
-0@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + };
This should not be in the pinctrl node. I was told to remove it when bindings were reviewed since these properties must be in consumer nodes [0]. See binding documentation [1]:
[0]: https://www.mail-archive.com/[email protected]/msg102634.html
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinmux.yaml?h=staging-linus&id=b6821b0d9b56386d2bf14806f90ec401468c799f
Best regards,
Sergio Paracuellos
Quoted 3 lines
drivers/staging/mt7621-dts/mt7621.dtsi +0
-0i2c_pins: i2c0-pins { pinmux {
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Quoted 123 lines · Sergio Paracuellos
Hi Arinc,
Quoted 107 lines · Arınç ÜNAL
Quoted 59 lines · Sergio Paracuellos
Hi Arinc,
Quoted 53 lines · Arınç ÜNAL
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Quoted 2 lines
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
Quoted 8 lines
I think is this commit which I did according to a review after moving the driver from staging into '
drivers/pincrtl/ralink':You can also check other changes from where the driver was moved:
I realised current
mt7621.dtsidoes not apply the functions we specify for the pin groups on device-specific devicetrees. I believe we need to add this like on OpenWrt'smt7621.dtsi.https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621.dtsi#L249-L253
Can you apply the patch below to see if you get the error like above? I also put it in attachments in case of space characters replacing tab on the mail.
Arınç
---
drivers/staging/mt7621-dts/gbpc1.dts +0
-4@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {drivers/staging/mt7621-dts/mt7621.dtsi +0
-0drivers/staging/mt7621-dts/mt7621.dtsi spi0: spi@b00 { · line 159
Quoted 8 lines
drivers/staging/mt7621-dts/mt7621.dtsi +5
-0@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + };This should not be in the pinctrl node. I was told to remove it when bindings were reviewed since these properties must be in consumer nodes [0]. See binding documentation [1]:
Quoted 2 lines
[0]: https://www.mail-archive.com/[email protected]/msg102634.html
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinmux.yaml?h=staging-linus&id=b6821b0d9b56386d2bf14806f90ec401468c799f
I'm not sure what a consumer node would be in this context so we can claim the pin groups with the given function under it.
Is the ethernet node a consumer node since I claim the rgmii2_pins pin group under it for example?
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Quoted 125 lines · Arınç ÜNAL
Quoted 123 lines · Sergio Paracuellos
Hi Arinc,
Quoted 107 lines · Arınç ÜNAL
Quoted 59 lines · Sergio Paracuellos
Hi Arinc,
Quoted 53 lines · Arınç ÜNAL
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Quoted 2 lines
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
Quoted 8 lines
I think is this commit which I did according to a review after moving the driver from staging into '
drivers/pincrtl/ralink':You can also check other changes from where the driver was moved:
I realised current
mt7621.dtsidoes not apply the functions we specify for the pin groups on device-specific devicetrees. I believe we need to add this like on OpenWrt'smt7621.dtsi.https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621.dtsi#L249-L253
Can you apply the patch below to see if you get the error like above? I also put it in attachments in case of space characters replacing tab on the mail.
Arınç
---
drivers/staging/mt7621-dts/gbpc1.dts +0
-4@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {drivers/staging/mt7621-dts/mt7621.dtsi +0
-0drivers/staging/mt7621-dts/mt7621.dtsi spi0: spi@b00 { · line 159
Quoted 8 lines
drivers/staging/mt7621-dts/mt7621.dtsi +5
-0@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + };This should not be in the pinctrl node. I was told to remove it when bindings were reviewed since these properties must be in consumer nodes [0]. See binding documentation [1]:
Quoted 8 lines
Quoted 2 lines
[0]: https://www.mail-archive.com/[email protected]/msg102634.html
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinmux.yaml?h=staging-linus&id=b6821b0d9b56386d2bf14806f90ec401468c799fI'm not sure what a consumer node would be in this context so we can claim the pin groups with the given function under it.
Is the ethernet node a consumer node since I claim the
rgmii2_pinspin group under it for example?
That is my understanding, yes.
Best regards,
Sergio Paracuellos
Quoted 2 lines
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Quoted 129 lines · Sergio Paracuellos
Quoted 128 lines · Arınç ÜNAL
Quoted 125 lines · Sergio Paracuellos
Hi Arinc,
Quoted 107 lines · Arınç ÜNAL
Quoted 59 lines · Sergio Paracuellos
Hi Arinc,
Quoted 53 lines · Arınç ÜNAL
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failed with error -22Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Quoted 2 lines
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
Quoted 8 lines
I think is this commit which I did according to a review after moving the driver from staging into '
drivers/pincrtl/ralink':You can also check other changes from where the driver was moved:
I realised current
mt7621.dtsidoes not apply the functions we specify for the pin groups on device-specific devicetrees. I believe we need to add this like on OpenWrt'smt7621.dtsi.https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621.dtsi#L249-L253
Can you apply the patch below to see if you get the error like above? I also put it in attachments in case of space characters replacing tab on the mail.
Arınç
---
drivers/staging/mt7621-dts/gbpc1.dts +0
-4@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {drivers/staging/mt7621-dts/mt7621.dtsi +0
-0drivers/staging/mt7621-dts/mt7621.dtsi spi0: spi@b00 { · line 159
Quoted 8 lines
drivers/staging/mt7621-dts/mt7621.dtsi +5
-0@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + };This should not be in the pinctrl node. I was told to remove it when bindings were reviewed since these properties must be in consumer nodes [0]. See binding documentation [1]:
[0]: https://www.mail-archive.com/[email protected]/msg102634.html
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/Documentation/devicetree/bindings/pinctrl/ralink,rt2880-pinmux.yaml?h=staging-linus&id=b6821b0d9b56386d2bf14806f90ec401468c799f
Quoted 7 lines
Quoted 5 lines
I'm not sure what a consumer node would be in this context so we can claim the pin groups with the given function under it.
Is the ethernet node a consumer node since I claim the
rgmii2_pinspin group under it for example?That is my understanding, yes.
Adding Rob on Cc.
Solutions that come to my mind:
We can overwrite the pin group node with the function we want to set it. Then claim it under a node where pins from the pin group is used.
Example:
drivers/staging/mt7621-dts/gbpc1.dts +9 -0
@@ -38,6 +38,9 @@ reset { gpio-leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins>; + power { label = "green:power"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
@@ -103,6 +106,12 @@ gpio { }; }; +&uart3_pins { + pinmux { + function = "gpio"; + }; +}; + ðernet { pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; };
A few issues with this:
- Some used pins might not be defined on the devicetree. We cannot claim these pin groups because the consumer node doesn't exist.
For example, check JTAG pins of GB-PC2 on page 15:
https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf
- Pins on the same pin group can be used under different nodes. We cannot claim a pin group under multiple nodes.
So we can get back to this:
Treat pinctrl node as a consumer node. We might not need to refer to the pinctrl-0 & pinctrl-names properties on the rt2880-pinmux documentation since they're generic pinctrl properties.
Example:
(quoted diff) +0 -0
b/drivers/staging/mt7621-dts/mt7621.dtsi
index 4da20da243e6..8e181d6f70ae 100644
drivers/staging/mt7621-dts/mt7621.dtsi +6 -0
@@ -152,6 +152,12 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: state-default { + + }; i2c_pins: i2c0-pins { pinmux {
On any mt7621 devicetree:
&state_default {
gpio-pinmux {
groups = "rgmii2", "uart3", "wdt";
function = "gpio";
};
};By the way, is there a reason why wdt and jtag pin groups are missing from the documentation and mt7621.dtsi? If they are used as GPIO by default we can explicitly define them on mt7621.dtsi and mention them on the documentation.
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Quoted 218 lines · Arınç ÜNAL
Quoted 135 lines · Sergio Paracuellos
Quoted 134 lines · Arınç ÜNAL
Quoted 131 lines · Sergio Paracuellos
Hi Arinc,
Quoted 111 lines · Arınç ÜNAL
Quoted 62 lines · Sergio Paracuellos
Hi Arinc,
Quoted 53 lines · Arınç ÜNAL
Quoted 43 lines · Sergio Paracuellos
Hi Arinc,
Quoted 31 lines · Arınç ÜNAL
Hey Sergio,
Quoted 9 lines · Sergio Paracuellos
Hi Arinc,
Quoted 6 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the rgmii2 bus cannot be used on this device.
Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>---
drivers/staging/mt7621-dts/gbpc1.dts| 4 ++++1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying this patch series.
rgmii2 pin group is given gpio function so calling it from ethernet node would cause this on my TP-Link RE650 v1 which also uses the
rgmii2_pinsas GPIO.Quoted 8 lines
[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet
[ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux
[ 1.230058]mtk_soc_eth1e100000.ethernet: Error applying setting, reverse things back
[ 1.245853]mtk_soc_eth: probe of 1e100000.ethernet failed with error -22Quoted 7 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't have any issues now also with your new patch series. Your new changes make sense since as you have said "rgmii2" pins are requested as GPIO but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.
Quoted 2 lines
I think this must have something to do with pinctrl on newer kernels as the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).
I think is this commit which I did according to a review after moving the driver from staging into '
drivers/pincrtl/ralink':Quoted 7 lines
You can also check other changes from where the driver was moved:
I realised current
mt7621.dtsidoes not apply the functions we specify for the pin groups on device-specific devicetrees. I believe we need to add this like on OpenWrt'smt7621.dtsi.https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621.dtsi#L249-L253
Can you apply the patch below to see if you get the error like above? I also put it in attachments in case of space characters replacing tab on the mail.
Arınç
---
drivers/staging/mt7621-dts/gbpc1.dts +0
-4@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {drivers/staging/mt7621-dts/mt7621.dtsi +0
-0drivers/staging/mt7621-dts/mt7621.dtsi spi0: spi@b00 { · line 159
Quoted 8 lines
drivers/staging/mt7621-dts/mt7621.dtsi +5
-0@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + };This should not be in the pinctrl node. I was told to remove it when bindings were reviewed since these properties must be in consumer nodes [0]. See binding documentation [1]:
[0]: https://www.mail-archive.com/[email protected]/msg102634.html
Quoted 7 lines
Quoted 5 lines
I'm not sure what a consumer node would be in this context so we can claim the pin groups with the given function under it.
Is the ethernet node a consumer node since I claim the
rgmii2_pinspin group under it for example?That is my understanding, yes.
Adding Rob on Cc.
Solutions that come to my mind:
We can overwrite the pin group node with the function we want to set it. Then claim it under a node where pins from the pin group is used.
Example:
drivers/staging/mt7621-dts/gbpc1.dts +9
-0@@ -38,6 +38,9 @@ reset { gpio-leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins>; + power { label = "green:power"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>;@@ -103,6 +106,12 @@ gpio { }; }; +&uart3_pins { + pinmux { + function = "gpio"; + }; +}; + ðernet { pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; };A few issues with this:
- Some used pins might not be defined on the devicetree. We cannot claim these pin groups because the consumer node doesn't exist.
For example, check JTAG pins of GB-PC2 on page 15:
https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf- Pins on the same pin group can be used under different nodes. We cannot claim a pin group under multiple nodes.
So we can get back to this:
Treat pinctrl node as a consumer node. We might not need to refer to the pinctrl-0 & pinctrl-names properties on the rt2880-pinmux documentation since they're generic pinctrl properties.
Example:
drivers/staging/mt7621-dts/mt7621.dtsi +6
-0@@ -152,6 +152,12 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: state-default { + + }; i2c_pins: i2c0-pins { pinmux {
Quoted 8 lines
On any mt7621 devicetree:
&state_default{
gpio-pinmux {
groups = "rgmii2", "uart3", "wdt";
function = "gpio";
};
};
I think a better solution would be to claim default_state under a device specific devicetree so we don't touch mt7621.dtsi at all. An mt7621 device might not need to use any pin groups as gpio so putting a state_default node under mt7621.dtsi doesn't make sense.
I'll send patches for GB-PC1 & GB-PC2 for you to comment on.
Arınç
Re: [PATCH 2/2] staging: mt7621-dts: do not use rgmii2_pins for ethernet on GB-PC1
Quoted 259 lines · Arınç ÜNAL
Quoted 243 lines · Arınç ÜNAL
Quoted 157 lines · Sergio Paracuellos
Quoted 156 lines · Arınç ÜNAL
Quoted 153 lines · Sergio Paracuellos
Hi Arinc,
Quoted 130 lines · Arınç ÜNAL
Quoted 80 lines · Sergio Paracuellos
Hi Arinc,
Quoted 68 lines · Arınç ÜNAL
Quoted 55 lines · Sergio Paracuellos
Hi Arinc,
Quoted 49 lines · Arınç ÜNAL
Hey Sergio,
Quoted 12 lines · Sergio Paracuellos
Hi Arinc,
Quoted 8 lines · Arınç ÜNAL
GB-PC1 uses some of the rgmii2 pins (22 - 33) as GPIO. Therefore, the
rgmii2 bus cannot be used on this device. Overwrite pinctrl-0 property under the ethernet node withoutrgmii2_pinson
the GB-PC1 devicetree.Quoted 8 lines
Quoted 4 lines
Signed-off-by Arınç ÜNAL <[email protected]>--- drivers/staging/mt7621-dts/gbpc1.dts | 4 ++++ 1 file changed, 4 insertions(+)No issues in GB-PC1. So:
Tested-by Sergio Paracuellos <[email protected]>Thanks for testing it so quickly!
I was wondering if you got pinctrl errors on the bootlog before applying
this patch series.rgmii2 pin group is given gpio function so calling it from ethernet node
would cause this on my TP-Link RE650 v1 which also uses thergmii2_pins
as GPIO.[ 1.177349] rt2880-pinmux pinctrl: pin io22 already requested by pinctrl; cannot claim for 1e100000.ethernet [ 1.196966] rt2880-pinmux pinctrl: pin-22 (1e100000.ethernet) status -22 [ 1.210312] rt2880-pinmux pinctrl: could not request pin 22 (io22) from group rgmii2 on device rt2880-pinmux [ 1.230058] mtk_soc_eth 1e100000.ethernet: Error applying setting, reverse things back [ 1.245853] mtk_soc_eth: probe of 1e100000.ethernet failedQuoted 1 line
with error -22
Quoted 10 lines
No, I was not getting any kind of error since when I test your last patch series I was not experimenting any kind of regression. I don't
have any issues now also with your new patch series. Your new changes
make sense since as you have said "rgmii2" pins are requested as GPIO
but it seems are not really being requested? I don't have time to check the datasheet now but will try to get time to see what is happening there.Quoted 4 lines
I think this must have something to do with pinctrl on newer kernels as
the TP-Link RE650 that I tested uses the OpenWrt master branch (Linux 5.10).I think is this commit which I did according to a review after moving the driver from staging into '
drivers/pincrtl/ralink':Quoted 7 lines
You can also check other changes from where the driver was moved:
I realised current
mt7621.dtsidoes not apply the functions we specify for the pin groups on device-specific devicetrees. I believe we need to
add this like on OpenWrt'smt7621.dtsi.https://github.com/openwrt/openwrt/blob/master/target/linux/ramips/dts/mt7621.dtsi#L249-L253
Can you apply the patch below to see if you get the error like above? I also put it in attachments in case of space characters replacing tab on the mail.
Arınç
---
drivers/staging/mt7621-dts/gbpc1.dts +0
-4@@ -114,10 +114,6 @@ default_gpio: gpio { }; }; -ðernet { - pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; -}; - &switch0 { ports { port@0 {drivers/staging/mt7621-dts/mt7621.dtsi +0
-0drivers/staging/mt7621-dts/mt7621.dtsi spi0: spi@b00 { · line 159
Quoted 8 lines
drivers/staging/mt7621-dts/mt7621.dtsi +5
-0@@ -152,6 +152,11 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinctrl0 { + };This should not be in the pinctrl node. I was told to remove it when bindings were reviewed since these properties must be in consumer nodes [0]. See binding documentation [1]:
[0]:
https://www.mail-archive.com/[email protected]/msg102634.htmlQuoted 7 lines
Quoted 5 lines
I'm not sure what a consumer node would be in this context so we can claim the pin groups with the given function under it.
Is the ethernet node a consumer node since I claim the
rgmii2_pinspin group under it for example?That is my understanding, yes.
Adding Rob on Cc.
Solutions that come to my mind:
We can overwrite the pin group node with the function we want to set it. Then claim it under a node where pins from the pin group is used.
Example:
drivers/staging/mt7621-dts/gbpc1.dts +9
-0@@ -38,6 +38,9 @@ reset { gpio-leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&uart3_pins>; + power { label = "green:power"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>;@@ -103,6 +106,12 @@ gpio { }; }; +&uart3_pins { + pinmux { + function = "gpio"; + }; +}; + ðernet { pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; };A few issues with this:
- Some used pins might not be defined on the devicetree. We cannot claim these pin groups because the consumer node doesn't exist.
For example, check JTAG pins of GB-PC2 on page 15:
https://github.com/ngiger/GnuBee_Docs/blob/master/GB-PCx/Documents/GB-PC2_V1.1_schematic.pdf- Pins on the same pin group can be used under different nodes. We cannot claim a pin group under multiple nodes.
So we can get back to this:
Treat pinctrl node as a consumer node. We might not need to refer to the pinctrl-0 & pinctrl-names properties on the rt2880-pinmux documentation since they're generic pinctrl properties.
Example:
drivers/staging/mt7621-dts/mt7621.dtsi +6
-0@@ -152,6 +152,12 @@ spi0: spi@b00 { pinctrl: pinctrl { compatible = "ralink,rt2880-pinmux"; + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: state-default { + + }; i2c_pins: i2c0-pins { pinmux {Quoted 8 lines
On any mt7621 devicetree:
&state_default { gpio-pinmux { groups = "rgmii2", "uart3", "wdt"; function = "gpio"; }; };I think a better solution would be to claim
default_stateunder a device specific devicetree so we don't touchmt7621.dtsiat all. An mt7621 device might not need to use any pin groups as gpio so putting astate_defaultnode undermt7621.dtsidoesn't make sense.
Quoted 1 line
I'll send patches for GB-PC1 & GB-PC2 for you to comment on.
Please, do. Thanks,
Sergio Paracuellos
Quoted 2 lines
Arınç