Abstract Pio register layout to support more SoC - #251
Open
dlan17 wants to merge 2 commits into
Open
Conversation
added 2 commits
August 1, 2026 01:06
The GPIO bank controller has different register layout information among different SoC generations, abstract those info in the driver. Take T153 SoC chip GPIO controller as example 1) base: The BASE address of GPIO controller 17.9.5.1 page-1085 (1115/1759) of datasheet GPIO Base address 0x03604000 2) offs: First GPIO bank offset to GPIO base address, usually it's PA PA_CFG0 - 0x0080 (PA Configure Register 0) Usually it's the PA_CFG0 register offset 3) size: Register space of each GPIO bank, can be caculated from size = (PB_CFG0 - PA_CFG0) = (0x100 - 0x80) = 0x80 4) pull: GPIO PULL register offset to its bank base address PA_PULL0 - 0x00B0 pull = (PA_PULL0 - PA_CFG0) = 0xB0 - 0x80 = 0x30 In the driver, only update SoC which support FLAG_NEW_GPIO to new layout. Signed-off-by: Yixun Lan <dlan@kernel.org>
Update SoC which support FLAG_NCAT2 (FLAG_NEW_GPIO) Signed-off-by: Yixun Lan <dlan@kernel.org>
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.
This is a prerequisite patch to support T153 SoC, also A733 can be adapted to this new model too.