• Xingyu Chen's avatar
    pinctrl: meson: fix G12A ao pull registers base address · e66dd48e
    Xingyu Chen authored
    Since Meson G12A SoC, Introduce new ao registers AO_RTI_PULL_UP_EN_REG
    and AO_GPIO_O.
    
    These bits of controlling output level are remapped to the new register
    AO_GPIO_O, and the AO_GPIO_O_EN_N support only controlling output enable.
    
    These bits of controlling pull enable are remapped to the new register
    AO_RTI_PULL_UP_EN_REG, and the AO_RTI_PULL_UP_REG support only controlling
    pull type(up/down).
    
    The new layout of ao gpio/pull registers is as follows:
    - AO_GPIO_O_EN_N        [offset: 0x9 << 2]
    - AO_GPIO_I             [offset: 0xa << 2]
    - AO_RTI_PULL_UP_REG    [offset: 0xb << 2]
    - AO_RTI_PULL_UP_EN_REG [offset: 0xc << 2]
    - AO_GPIO_O             [offset: 0xd << 2]
    
    From above, we can see ao GPIO registers region has been separated by the
    ao pull registers. In order to ensure the continuity of the region on
    software, the ao GPIO and ao pull registers use the same base address, but
    can be identified by the offset.
    
    Fixes: 29ae0952 ("pinctrl: meson-g12a: add pinctrl driver support")
    Signed-off-by: default avatarXingyu Chen <xingyu.chen@amlogic.com>
    Signed-off-by: default avatarJianxin Pan <jianxin.pan@amlogic.com>
    Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    e66dd48e
pinctrl-meson.c 13.8 KB