Proposed deprecation of device-tree-gpio-naming.md

Patrick Williams patrick at stwcx.xyz
Wed Aug 13 07:14:17 AEST 2025


On Wed, Aug 06, 2025 at 09:24:37AM +0930, Andrew Jeffery wrote:

> Devicetrees represent the hardware, and from experience
> over time I think it's best that they reflect the information from the
> schematics without influence from software implementation choices.

Can you elaborate on what this experience is?  I'm not sure what this is
referring to or what issues you've observed with it.

Devicetrees do often represent the hardware but they don't just represent the
hardware.  For example, we have the flash layout in there.  That's
strictly a software function that has no connection to the hardware
(except for the flash size itself).  I'm not convinced we have enough
words as to why it is okay to specify the flash layout but not okay to
represent the intended purpose of a GPIO.

If GPIO names were to reflect the "information from the schematics", I
assume this is to mean the net-name?  Which net-name are we going to
use?  The one on the DC-SCM, the one on the connector the DC-SCM is
plugged into, etc.  There are probably, on average, 4 different names
from a source of a signal to the BMC.

You could of course say "whatever the person implementing the devicetree
wants" for the pin name, but usually that's the least useful name to
anyone else.  On top of that, schematics are often times closed and
unavailable to more than a handful of people.  Having a devicetree named
"power-sequence-start" is way better than "DC_SCM_GPIO_P7", right? 

Sure, we can have this translation in entity-manager or wherever, if
someone contributes the entity-manager config for their board.  But,
that means it's only available to BMC code.  When I'm actively debugging
something, I have yet another hoop to jump through to go from
"DC_SCM_GPIO_P7" to "this is the power sequence start".  If it is in the
device tree it shows up right in "gpioinfo".

> However, perhaps it's still a reasonable set of suggestions for
> consumption of pins with the translation from net names done by the
> applications themselves?

I think it is.

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20250812/be0a2cdd/attachment.sig>


More information about the openbmc mailing list