openbmc / docs

OpenBMC Documentation
Creative Commons Attribution 4.0 International
267 stars 305 forks source link

Clarification of "button" type, in devicetree GPIO names #72

Closed neuschaefer closed 2 years ago

neuschaefer commented 2 years ago

Currently, the Device Tree GPIO Naming in OpenBMC document is rather short on words about buttons. However, I think there is potential for ambiguity here.

In my experience, a GPIO labeled a "button" could mean either of two things:

  1. An output of the BMC, connected to an input of other circuitry, which acts like a botton. For example, a power button GPIO in this context would be asserted for a short time and then released, to change the host power state.
  2. An input of the BMC, connected to an actual physical button. For example, a UID botton can be pressed by the user to show local presence.

I think both cases can occur in hardware designs and are useful, but they are quite different. The DT GPIO name document should, IMHO, be extended to clarify what *-button currently means, and potentially also to accomodate the other meaning of "button".

williamspatrick commented 2 years ago

We can get it clarified but I believe every one of our definitions is as an input. Typically we describe signals as from the BMCs perspective, so calling an output a button wouldn’t make much sense.

neuschaefer commented 2 years ago

Thanks.

Well, as I mentioned, there are BMC-outputs that act just like virtual buttons, "pressed" by code on the BMC. Hence my confusion. To be more explicit: I've seen BMC-output signals that act like the familiar PC power button: "Press" shortly to power on or request power-off, "press" for 4-5 seconds to force power-off.

williamspatrick commented 2 years ago

Yep, I'm aware. Today most of that is buried in a repository called 'x86-power-control' (even though it also supports some other architectures as long as they use the "standard" power sequence). There is a pending commit to better document those GPIOs you might want to take a look at. https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/49863

williamspatrick commented 2 years ago

Attempted a clarification:

neuschaefer commented 2 years ago

Attempted a clarification:

* https://gerrit.openbmc-project.xyz/c/openbmc/docs/+/51527 gpio-naming: clarify button definition [NEW]

This answers the question for me. Thanks!