[Aspeed][Nexthop]: Add gpio-line-names to the B27 gpio1 node - #616
Open
jack-nexthop wants to merge 1 commit into
Open
[Aspeed][Nexthop]: Add gpio-line-names to the B27 gpio1 node#616jack-nexthop wants to merge 1 commit into
jack-nexthop wants to merge 1 commit into
Conversation
Name the lines on the AST2700 gpio1 controller (0x14c0b000) so userspace can address them by name with libgpiod v2, which dropped gpiofind and addresses lines by name. In particular cpe_ctrl (GPIOE2, line offset 34) drives the switch-host CPU reset and is managed at boot by the cpe-ctrl-init service added in sonic-buildimage PR #29142; without the line names that service has no line to request and skips. Names are copied verbatim from the device tree NextHop ships on these boards. No gpio-hogs are added: cpe_ctrl must not be hogged, because a hog is re-applied on every gpiochip probe and would clobber the level the pin's reset-tolerance bit preserved across a BMC warm reset. Signed-off-by: Jack Cai <jack@nexthop.ai>
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
libgpiod v2 (shipped in Debian Trixie) dropped
gpiofindand addresses GPIO lines by name. The NextHop B27 device tree names none of its GPIO lines, so userspace cannot request them by name. In particularcpe_ctrl(GPIOE2, line offset 34 on the AST2700 gpio1 controller at 0x14c0b000) drives the switch-host CPU reset and is managed at boot by thecpe-ctrl-initservice added in sonic-net/sonic-buildimage#29142 — without the line names, that service has no line to request and skips.How I did it
Add a
gpio-line-namesproperty to the&gpio1node inpatches-sonic/nexthop-b27-dts.patch, copied verbatim from the device tree NextHop ships on these boards.No gpio-hogs are added:
cpe_ctrlmust not be hogged, because a hog is re-applied on every gpiochip probe and would clobber the level that the pin's reset-tolerance bit preserved across a BMC warm reset — holding that level across BMC reboots is the point of the service in sonic-net/sonic-buildimage#29142.How to verify it
On a NextHop B27 BMC running an image with this kernel:
Verified on B27 hardware with the equivalent change in NextHop's internal kernel tree.