mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 08:04:22 +08:00
d6ed935513
Add support for pinctrl on MT7622 SoC. The IO core found on the SoC has the registers for pinctrl, pinconf and gpio mixed up in the same register range. However, the IO core for the MT7622 SoC is completely distinct from anyone of previous MediaTek SoCs which already had support, such as the hardware internal, register address map and register detailed definition for each pin. Therefore, instead, the driver is being newly implemented by reusing generic methods provided from the core layer with GENERIC_PINCONF, GENERIC_PINCTRL_GROUPS, and GENERIC_PINMUX_FUNCTIONS for the sake of code simplicity and rid of superfluous code. Where the function of pins determined by groups is utilized in this driver which can help developers less confused with what combinations of pins effective on the SoC and even reducing the mistakes during the integration of those relevant boards. As the gpio_chip handling is also only a few lines, the driver also implements the gpio functionality directly through GPIOLIB. Signed-off-by: Sean Wang <sean.wang@mediatek.com> Reviewed-by: Biao Huang <biao.huang@mediatek.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
61 lines
1.2 KiB
Plaintext
61 lines
1.2 KiB
Plaintext
menu "MediaTek pinctrl drivers"
|
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
|
|
|
config PINCTRL_MTK
|
|
bool
|
|
depends on OF
|
|
select PINMUX
|
|
select GENERIC_PINCONF
|
|
select GPIOLIB
|
|
select OF_GPIO
|
|
|
|
# For ARMv7 SoCs
|
|
config PINCTRL_MT2701
|
|
bool "Mediatek MT2701 pin control"
|
|
depends on MACH_MT7623 || MACH_MT2701 || COMPILE_TEST
|
|
depends on OF
|
|
default MACH_MT2701
|
|
select PINCTRL_MTK
|
|
|
|
config PINCTRL_MT8135
|
|
bool "Mediatek MT8135 pin control"
|
|
depends on MACH_MT8135 || COMPILE_TEST
|
|
depends on OF
|
|
default MACH_MT8135
|
|
select PINCTRL_MTK
|
|
|
|
config PINCTRL_MT8127
|
|
bool "Mediatek MT8127 pin control"
|
|
depends on MACH_MT8127 || COMPILE_TEST
|
|
depends on OF
|
|
default MACH_MT8127
|
|
select PINCTRL_MTK
|
|
|
|
# For ARMv8 SoCs
|
|
config PINCTRL_MT7622
|
|
bool "MediaTek MT7622 pin control"
|
|
depends on OF
|
|
depends on ARM64 || COMPILE_TEST
|
|
select GENERIC_PINCONF
|
|
select GENERIC_PINCTRL_GROUPS
|
|
select GENERIC_PINMUX_FUNCTIONS
|
|
select GPIOLIB
|
|
select OF_GPIO
|
|
|
|
config PINCTRL_MT8173
|
|
bool "Mediatek MT8173 pin control"
|
|
depends on OF
|
|
depends on ARM64 || COMPILE_TEST
|
|
default ARM64 && ARCH_MEDIATEK
|
|
select PINCTRL_MTK
|
|
|
|
# For PMIC
|
|
config PINCTRL_MT6397
|
|
bool "Mediatek MT6397 pin control"
|
|
depends on MFD_MT6397 || COMPILE_TEST
|
|
depends on OF
|
|
default MFD_MT6397
|
|
select PINCTRL_MTK
|
|
|
|
endmenu
|