ARM: dts: stm32: Fill GPIO line names on AV96
PATCH 1/1 ARM: dts: stm32: Fill GPIO line names on AV96
Fill in the custom GPIO line names used by DH.
--- .../boot/dts/stm32mp15xx-dhcor-avenger96.dtsi | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +35 -0
@@ -162,6 +162,41 @@ phy0: ethernet-phy@7 { }; }; +&gpioa { + gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; + +&gpiob { + gpio-line-names = "", "", "", "", + "", "DH-GPIO-J", "", "", + "", "", "", "DH-GPIO-B", + "", "DH-GPIO-L", "", ""; +}; + +&gpioc { + gpio-line-names = "", "", "", "DH-GPIO-C", + "", "", "", "", + "", "", "", "", + "", "", "", ""; +}; + +&gpiod { + gpio-line-names = "", "", "", "", + "", "", "", "", + "DH-GPIO-D", "", "", "", + "", "", "DH-GPIO-E", "DH-GPIO-F"; +}; + +&gpiof { + gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "", + "DH-GPIO-G", "DH-GPIO-H", "", ""; +}; + &i2c1 { /* X6 I2C1 */ pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins_b>;
Signature · 7 lines
2.27.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Christoph Niedermaier
maintainerFrom: Marek Vasut <[email protected]>
Sent: Friday, July 24, 2020 12:16 PM
Quoted 3 lines
Fill in the custom GPIO line names used by DH.
[...]
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi phy0: ethernet-phy@7 { · line 171
Quoted 7 lines
+&gpioa {
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +
[...]
Hello Marek,
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Regards,
Christoph
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 15 lines · Christoph Niedermaier
From: Marek Vasut <[email protected]>
Sent: Friday, July 24, 2020 12:16 PMQuoted 3 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 1 line
Hello Marek,
Hello Christoph,
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Christoph Niedermaier
maintainerFrom: Marek Vasut [mailto:[email protected]]
Sent: Thursday, August 6, 2020 9:30 AM
Quoted 23 lines · Christoph Niedermaier
Quoted 15 lines
From: Marek Vasut <[email protected]>
Sent: Friday, July 24, 2020 12:16 PMQuoted 3 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Quoted 7 lines
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
Hello Marek,
after an internal discussion, we decided the following:
Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
Moreover for the SOM layer (stm32mp15xx-dhcom-som.dtsi) we would prefer "DHCOM-n". It would be nice if you could create a patch for it.
Regards,
Christoph
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 34 lines · Christoph Niedermaier
From: Marek Vasut [mailto:[email protected]]
Sent: Thursday, August 6, 2020 9:30 AMQuoted 23 lines · Christoph Niedermaier
Quoted 15 lines
From: Marek Vasut <[email protected]>
Sent: Friday, July 24, 2020 12:16 PMQuoted 3 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Quoted 7 lines
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
Quoted 8 lines
Hello Marek,
after an internal discussion, we decided the following:
Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
Moreover for the SOM layer (
stm32mp15xx-dhcom-som.dtsi) we would prefer "DHCOM-n". It would be nice if you could create a patch for it.
I don't think we should have any SoM-side gpio-line-names, because once you plug the SoM into new carrier board, the gpio-lane-names will no longer make sense. So, I think all the gpio-line-names should be implemented in the carrier board DTS.
As for the naming scheme, I was also hoping Linus might jump in and provide some suggestion on best practice here.
I think naming carrier board GPIOs "A", "B", "C",... is too opaque and can easily collide e.g. with GPIO expanders which might be on I2C or so.
A naming scheme which encodes the carrier board name is clearer and less likely to cause collision, so "AV96-A", "AV96-B", etc. looks good to me. It is obvious where the GPIO is located and unlikely to collide with any other GPIO name.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Christoph Niedermaier
maintainerFrom: Marek Vasut [mailto:[email protected]]
Sent: Friday, March 12, 2021 5:17 PM
Quoted 54 lines
To: Christoph Niedermaier <[email protected]>; linux-arm- [email protected]; [email protected]
Cc: Alexandre Torgue <[email protected]>; Patrice Chotard <[email protected]>; Patrick Delaunay <[email protected]>; Maxime Coquelin <[email protected]>; linux-stm32@st-md- mailman.stormreply.com
Subject: Re: [PATCH] ARM: dts: stm32: Fill GPIO line names on AV96ACHTUNG: Diese E-Mail kommt aus dem Internet und nicht aus unserem Firmennetzwerk!
Quoted 40 lines · Christoph Niedermaier
From: Marek Vasut [mailto:[email protected]]
Sent: Thursday, August 6, 2020 9:30 AMQuoted 23 lines · Christoph Niedermaier
Quoted 15 lines
From: Marek Vasut <[email protected]>
Sent: Friday, July 24, 2020 12:16 PMQuoted 3 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Quoted 7 lines
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
Hello Marek,
after an internal discussion, we decided the following:
Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
Quoted 7 lines
Quoted 2 lines
Moreover for the SOM layer (
stm32mp15xx-dhcom-som.dtsi) we would prefer "DHCOM-n". It would be nice if you could create a patch for it.I don't think we should have any SoM-side gpio-line-names, because once you plug the SoM into new carrier board, the gpio-lane-names will no longer make sense. So, I think all the gpio-line-names should be implemented in the carrier board DTS.
The idea is to define the GPIO names on the SOM layer and then overwrite them on the carrier board DTS if needed. If there is no naming on the carrier board, at least you have access via the DHCOM GPIO names. The DHCOM GPIO names are standardized, so that you can be sure that the assignment to a pin always fits.
Quoted 11 lines
As for the naming scheme, I was also hoping Linus might jump in and provide some suggestion on best practice here.
I think naming carrier board GPIOs "A", "B", "C",... is too opaque and can easily collide e.g. with GPIO expanders which might be on I2C or so.
A naming scheme which encodes the carrier board name is clearer and less likely to cause collision, so "AV96-A", "AV96-B", etc. looks good to me. It is obvious where the GPIO is located and unlikely to collide with any other GPIO name.
Regards,
Christoph
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 64 lines · Christoph Niedermaier
From: Marek Vasut [mailto:[email protected]]
Sent: Friday, March 12, 2021 5:17 PMQuoted 54 lines
To: Christoph Niedermaier <[email protected]>; linux-arm- [email protected]; [email protected]
Cc: Alexandre Torgue <[email protected]>; Patrice Chotard <[email protected]>; Patrick Delaunay <[email protected]>; Maxime Coquelin <[email protected]>; linux-stm32@st-md- mailman.stormreply.com
Subject: Re: [PATCH] ARM: dts: stm32: Fill GPIO line names on AV96ACHTUNG: Diese E-Mail kommt aus dem Internet und nicht aus unserem Firmennetzwerk!
Quoted 40 lines · Christoph Niedermaier
From: Marek Vasut [mailto:[email protected]]
Sent: Thursday, August 6, 2020 9:30 AMQuoted 23 lines · Christoph Niedermaier
Quoted 15 lines
From: Marek Vasut <[email protected]>
Sent: Friday, July 24, 2020 12:16 PMQuoted 3 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
arch/arm/boot/dts/stm32mp15xx-dhcor-avenger96.dtsi +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Quoted 7 lines
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
Hello Marek,
after an internal discussion, we decided the following:
Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
Quoted 7 lines
Quoted 2 lines
Moreover for the SOM layer (
stm32mp15xx-dhcom-som.dtsi) we would prefer "DHCOM-n". It would be nice if you could create a patch for it.I don't think we should have any SoM-side gpio-line-names, because once you plug the SoM into new carrier board, the gpio-lane-names will no longer make sense. So, I think all the gpio-line-names should be implemented in the carrier board DTS.
Quoted 5 lines
The idea is to define the GPIO names on the SOM layer and then overwrite them on the carrier board DTS if needed. If there is no naming on the carrier board, at least you have access via the DHCOM GPIO names. The DHCOM GPIO names are standardized, so that you can be sure that the assignment to a pin always fits.
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
If that is OK, then the above approach is then also OK.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Christoph Niedermaier
maintainerFrom: Marek Vasut <[email protected]>
Sent: Friday, March 12, 2021 10:01 PM
Quoted 58 lines · Christoph Niedermaier
Quoted 51 lines
From: Marek Vasut [mailto:[email protected]]
Sent: Friday, March 12, 2021 5:17 PMQuoted 41 lines · Christoph Niedermaier
Quoted 40 lines
From: Marek Vasut [mailto:[email protected]]
Sent: Thursday, August 6, 2020 9:30 AMQuoted 23 lines · Christoph Niedermaier
Quoted 15 lines
From: Marek Vasut <[email protected]>
Sent: Friday, July 24, 2020 12:16 PMQuoted 3 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
(quoted diff) +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Quoted 7 lines
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
Hello Marek,
after an internal discussion, we decided the following:
Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
Quoted 7 lines
Quoted 2 lines
Moreover for the SOM layer (
stm32mp15xx-dhcom-som.dtsi) we would prefer "DHCOM-n". It would be nice if you could create a patch for it.I don't think we should have any SoM-side gpio-line-names, because once you plug the SoM into new carrier board, the gpio-lane-names will no longer make sense. So, I think all the gpio-line-names should be implemented in the carrier board DTS.
Quoted 5 lines
The idea is to define the GPIO names on the SOM layer and then overwrite them on the carrier board DTS if needed. If there is no naming on the carrier board, at least you have access via the DHCOM GPIO names. The DHCOM GPIO names are standardized, so that you can be sure that the assignment to a pin always fits.
Quoted 7 lines
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
If that is OK, then the above approach is then also OK.
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM). So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
Regards,
Christoph
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 6 lines · Christoph Niedermaier
Quoted 6 lines
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
Quoted 6 lines
Quoted 1 line
If that is OK, then the above approach is then also OK.
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM). So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
For standards like SMARC, where the interface is predefined, I think it makes much sense to have the SoM dtsi contain not only the line-names, but also ready-to-use, pinmuxing settings.
Base boards can then either enable peripherals with just a status = "okay" if they follow the standard or just override it if they choose to do stuff differently.
Cheers,
Ahmad
Quoted 8 lines
Regards,
Christoph
_______________________________________________
Linux-stm32 mailing list
[email protected]
https://st-md-mailman.stormreply.com/mailman/listinfo/linux-stm32
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 14 lines · Ahmad Fatoum
Quoted 6 lines · Christoph Niedermaier
Quoted 6 lines
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
Quoted 6 lines
Quoted 1 line
If that is OK, then the above approach is then also OK.
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM). So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
Quoted 7 lines
For standards like SMARC, where the interface is predefined, I think it makes much sense to have the SoM dtsi contain not only the line-names, but also ready-to-use, pinmuxing settings.
Base boards can then either enable peripherals with just a status = "okay" if they follow the standard or just override it if they choose to do stuff differently.
Sadly, I think I have to remind you of the discussion around pinctrl groups we have in stm32mp15-pinctrl.dtsi and how that does not scale. This is a very similar situation here, since the SoM is rather universal.
And the other thing I would like to point out here are the discussions around DT connector. What you described above is exactly that, except the implementation is still not finished. Let's CC Frank.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hello,
Quoted 19 lines · Marek Vasut
Quoted 18 lines · Ahmad Fatoum
Quoted 6 lines · Christoph Niedermaier
Quoted 6 lines
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
Quoted 6 lines
Quoted 1 line
If that is OK, then the above approach is then also OK.
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM). So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
For standards like SMARC, where the interface is predefined, I think it makes much sense to have the SoM dtsi contain not only the line-names, but also ready-to-use, pinmuxing settings.
Quoted 5 lines
Quoted 3 lines
Base boards can then either enable peripherals with just a status = "okay" if they follow the standard or just override it if they choose to do stuff differently.
Sadly, I think I have to remind you of the discussion around pinctrl groups we have in
stm32mp15-pinctrl.dtsiand how that does not scale. This is a very similar situation here, since the SoM is rather universal.
I don't think this is directly comparable. A SoC has _lots_ of possible way to mux and conf pads. A SMARC, AFAIU, has exactly one official pinout. That one you can add into the dtsi and the bast board either extends that or overrides it if it diverges.
Quoted 1 line
And the other thing I would like to point out here are the discussions around DT connector. What you described above is exactly that, except the implementation is still not finished. Let's CC Frank.
Thanks for the pointer. I'll check it out.
Cheers,
Ahmad
Signature · 9 lines
Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 26 lines · Ahmad Fatoum
Hello,
Quoted 23 lines · Marek Vasut
Quoted 21 lines · Ahmad Fatoum
Quoted 6 lines · Christoph Niedermaier
Quoted 6 lines
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
Quoted 6 lines
Quoted 1 line
If that is OK, then the above approach is then also OK.
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM). So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
For standards like SMARC, where the interface is predefined, I think it makes much sense to have the SoM dtsi contain not only the line-names, but also ready-to-use, pinmuxing settings.
Base boards can then either enable peripherals with just a status = "okay" if they follow the standard or just override it if they choose to do stuff differently.
Quoted 5 lines
Quoted 1 line
Sadly, I think I have to remind you of the discussion around pinctrl groups we have in
stm32mp15-pinctrl.dtsiand how that does not scale. This is a very similar situation here, since the SoM is rather universal.I don't think this is directly comparable. A SoC has _lots_ of possible way to mux and conf pads. A SMARC, AFAIU, has exactly one official pinout. That one you can add into the dtsi and the bast board either extends that or overrides it if it diverges.
That's not the case here.
Quoted 2 lines
Quoted 1 line
And the other thing I would like to point out here are the discussions around DT connector. What you described above is exactly that, except the implementation is still not finished. Let's CC Frank.
Thanks for the pointer. I'll check it out.
Sure
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On 3/15/21 12:41 PM, Christoph Niedermaier wrote:
[...]
Quoted 49 lines
Quoted 49 lines
Quoted 41 lines
Quoted 33 lines
Quoted 33 lines
Quoted 19 lines
Quoted 12 lines
Quoted 2 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
(quoted diff) +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Quoted 7 lines
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
Hello Marek,
after an internal discussion, we decided the following:
Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
Quoted 7 lines
Quoted 2 lines
Moreover for the SOM layer (
stm32mp15xx-dhcom-som.dtsi) we would prefer "DHCOM-n". It would be nice if you could create a patch for it.I don't think we should have any SoM-side gpio-line-names, because once you plug the SoM into new carrier board, the gpio-lane-names will no longer make sense. So, I think all the gpio-line-names should be implemented in the carrier board DTS.
Quoted 5 lines
The idea is to define the GPIO names on the SOM layer and then overwrite them on the carrier board DTS if needed. If there is no naming on the carrier board, at least you have access via the DHCOM GPIO names. The DHCOM GPIO names are standardized, so that you can be sure that the assignment to a pin always fits.
So I'll pose another question here to the GPIO maintainers.
Quoted 8 lines
Quoted 5 lines
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
If that is OK, then the above approach is then also OK.
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM).
You can, assume you take two of the SoM GPIO-X and GPIO-Y signals which are present e.g. on the PDK2 jumper header and connect I2C EEPROM to those two pins. Then you mux those two pins as I2C bus. And that happens on the carrier board level (or a DTO, but that's out of scope here).
Quoted 2 lines
So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
In the above example, the mux function becomes i2c in the carrier board DT and the gpio-line-names remains the same since its included from the SoM DTSI. I would like to know whether this is OK or whether we need to patch the gpio-line-names in the carrier board DT and remove the GPIO-X and GPIO-Y from the gpio-line-names there.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Christoph Niedermaier
maintainerFrom: Marek Vasut <[email protected]>
Sent: Monday, March 15, 2021 3:26 PM
Quoted 72 lines
To: Christoph Niedermaier <[email protected]>; linux-arm- [email protected]; [email protected]
Cc: Alexandre Torgue <[email protected]>; Patrice Chotard <[email protected]>; Patrick Delaunay <[email protected]>; Maxime Coquelin <[email protected]>; linux-stm32@st-md- mailman.stormreply.com
Subject: Re: [PATCH] ARM: dts: stm32: Fill GPIO line names on AV96ACHTUNG: Diese E-Mail kommt aus dem Internet und nicht aus unserem Firmennetzwerk!
On 3/15/21 12:41 PM, Christoph Niedermaier wrote:
[...]
Quoted 55 lines
Quoted 54 lines
Quoted 41 lines
Quoted 33 lines
Quoted 33 lines
Quoted 19 lines
Quoted 12 lines
Quoted 2 lines
Fill in the custom GPIO line names used by DH.
[...]
Quoted 7 lines
+&gpioa {
(quoted diff) +6
-0+ gpio-line-names = "", "", "", "", + "", "", "", "", + "", "", "", "DH-GPIO-K", + "DH-GPIO-I", "", "DH-GPIO-A", ""; +}; +[...]
Quoted 6 lines
We have been using the GPIO names at DH electronics for some time and also on other SOMs, but have not yet streamed them. We started with the naming only with a capital letter "A-W" since then without problems. To avoid a hard cut or patching for us and our customers it would be good if we could use the same naming in the mainline kernel as well. Marek, we would be happy if you would adopt our valued GPIO naming in your patch.
Quoted 7 lines
My counter-argument to this is that the naming should be unique and provide a hint where those GPIO lines come from, so maybe even DH-GPIO-n should rather be DHCOM-n . I can't say I'm particularly fond of the plain 'n' naming of GPIO lines, because then the GPIO label (and e.g. listing in libgpiod tools) does not give any hint what the GPIO is or where it comes from. Also, I worry a plain 'n' naming might clash with other GPIO IPs easily, while a more unique name can not.
Hello Marek,
after an internal discussion, we decided the following:
Could you update the patch for the Avenger96 to the GPIO naming "AV96-n".
Quoted 7 lines
Quoted 2 lines
Moreover for the SOM layer (
stm32mp15xx-dhcom-som.dtsi) we would prefer "DHCOM-n". It would be nice if you could create a patch for it.I don't think we should have any SoM-side gpio-line-names, because once you plug the SoM into new carrier board, the gpio-lane-names will no longer make sense. So, I think all the gpio-line-names should be implemented in the carrier board DTS.
Quoted 5 lines
The idea is to define the GPIO names on the SOM layer and then overwrite them on the carrier board DTS if needed. If there is no naming on the carrier board, at least you have access via the DHCOM GPIO names. The DHCOM GPIO names are standardized, so that you can be sure that the assignment to a pin always fits.
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
If that is OK, then the above approach is then also OK.
Quoted 7 lines
Quoted 2 lines
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM).
You can, assume you take two of the SoM GPIO-X and GPIO-Y signals which are present e.g. on the PDK2 jumper header and connect I2C EEPROM to those two pins. Then you mux those two pins as I2C bus. And that happens on the carrier board level (or a DTO, but that's out of scope here).
This is a very absurd example, because we have I2C on the PDK2 board and if you want to use I2C use our given I2C buses. We don't want that a costumer uses a GPIO pin as I2C, because it breaks our SOM standard (DHCOM) and we cannot exchange the SOM module without breaking the function. A GPIO is intended to be a GPIO and we don't want to have a carrier board upstream, that breaks your standard. So if we label the GPIOs on the SOM layer, it will never be wrong.
Quoted 8 lines
Quoted 2 lines
So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
In the above example, the mux function becomes i2c in the carrier board DT and the gpio-line-names remains the same since its included from the SoM DTSI. I would like to know whether this is OK or whether we need to patch the gpio-line-names in the carrier board DT and remove the GPIO-X and GPIO-Y from the gpio-line-names there.
In the carrier board the GPIO becomes an input, output, led, button, etc., but the function is still GPIO. So the labeling on the SOM layer is never been wrong. A relabeling on the carrier board then improves it to the real usage, but it is not mandatory.
Regards
Christoph
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
On 3/15/21 7:58 PM, Christoph Niedermaier wrote:
[...]
Quoted 27 lines
Quoted 19 lines
Quoted 19 lines
Quoted 18 lines
Quoted 10 lines
Quoted 4 lines
I don't think we should have any SoM-side gpio-line-names, because once you plug the SoM into new carrier board, the gpio-lane-names will no longer make sense. So, I think all the gpio-line-names should be implemented in the carrier board DTS.
The idea is to define the GPIO names on the SOM layer and then overwrite them on the carrier board DTS if needed. If there is no naming on the carrier board, at least you have access via the DHCOM GPIO names. The DHCOM GPIO names are standardized, so that you can be sure that the assignment to a pin always fits.
So I'll pose another question here to the GPIO maintainers.
Is it OK to define gpio-line-names in SoM DTSI even for pins which will not be used as GPIOs e.g. because they are muxed differently in the carrier board DTS ?
If that is OK, then the above approach is then also OK.
Quoted 7 lines
Quoted 2 lines
In our case, we cannot mux the GPIO pins in the carrier board DTS to another functions, because then we break our SOM standard (DHCOM).
You can, assume you take two of the SoM GPIO-X and GPIO-Y signals which are present e.g. on the PDK2 jumper header and connect I2C EEPROM to those two pins. Then you mux those two pins as I2C bus. And that happens on the carrier board level (or a DTO, but that's out of scope here).
Quoted 7 lines
This is a very absurd example, because we have I2C on the PDK2 board and if you want to use I2C use our given I2C buses. We don't want that a costumer uses a GPIO pin as I2C, because it breaks our SOM standard (DHCOM) and we cannot exchange the SOM module without breaking the function. A GPIO is intended to be a GPIO and we don't want to have a carrier board upstream, that breaks your standard. So if we label the GPIOs on the SOM layer, it will never be wrong.
I can see how this could work on SoM level if the muxing requirement is constrained like this.
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
So in the case we relabel a GPIO in the carrier board e.g. "DHCOM-I" becomes "LED1" the mux function have to be GPIO.
In the above example, the mux function becomes i2c in the carrier board DT and the gpio-line-names remains the same since its included from the SoM DTSI. I would like to know whether this is OK or whether we need to patch the gpio-line-names in the carrier board DT and remove the GPIO-X and GPIO-Y from the gpio-line-names there.
Quoted 4 lines
In the carrier board the GPIO becomes an input, output, led, button, etc., but the function is still GPIO. So the labeling on the SOM layer is never been wrong. A relabeling on the carrier board then improves it to the real usage, but it is not mandatory.
Right, see above.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel