mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
pinctrl: sunxi: add support for the Allwinner A733
The Allwinner A733 changes the layout of the pinctrl MMIO register frame, but stays otherwise rather close to the previous IP. The main PIO looks similar to the one in the A523, with ports B-K being implemented, each also with the same number of pins per port as on the A523. Use the DT based pinctrl driver to describe just the generic pinctrl properties, so advertise the number of pins per bank, interrupt capabilities and the new quirks. The actual function/mux assignment will be taken from the devicetree. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Linus Walleij <linusw@kernel.org>
This commit is contained in:
parent
31d68e1038
commit
0535bfbfa9
|
|
@ -141,4 +141,9 @@ config PINCTRL_SUN55I_A523_R
|
|||
default ARM64 && ARCH_SUNXI
|
||||
select PINCTRL_SUNXI
|
||||
|
||||
config PINCTRL_SUN60I_A733
|
||||
bool "Support for the Allwinner A733 PIO"
|
||||
default ARM64 && ARCH_SUNXI
|
||||
select PINCTRL_SUNXI
|
||||
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -29,5 +29,6 @@ obj-$(CONFIG_PINCTRL_SUN50I_H616) += pinctrl-sun50i-h616.o
|
|||
obj-$(CONFIG_PINCTRL_SUN50I_H616_R) += pinctrl-sun50i-h616-r.o
|
||||
obj-$(CONFIG_PINCTRL_SUN55I_A523) += pinctrl-sun55i-a523.o
|
||||
obj-$(CONFIG_PINCTRL_SUN55I_A523_R) += pinctrl-sun55i-a523-r.o
|
||||
obj-$(CONFIG_PINCTRL_SUN60I_A733) += pinctrl-sun60i-a733.o
|
||||
obj-$(CONFIG_PINCTRL_SUN9I_A80) += pinctrl-sun9i-a80.o
|
||||
obj-$(CONFIG_PINCTRL_SUN9I_A80_R) += pinctrl-sun9i-a80-r.o
|
||||
|
|
|
|||
50
drivers/pinctrl/sunxi/pinctrl-sun60i-a733.c
Normal file
50
drivers/pinctrl/sunxi/pinctrl-sun60i-a733.c
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* Allwinner A733 SoC pinctrl driver.
|
||||
*
|
||||
* Copyright (C) 2025 Arm Ltd.
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/pinctrl/pinctrl.h>
|
||||
|
||||
#include "pinctrl-sunxi.h"
|
||||
|
||||
static const u8 a733_nr_bank_pins[SUNXI_PINCTRL_MAX_BANKS] =
|
||||
/* PA PB PC PD PE PF PG PH PI PJ PK */
|
||||
{ 0, 11, 17, 24, 16, 7, 15, 20, 17, 28, 26 };
|
||||
|
||||
static const u8 a733_irq_bank_muxes[SUNXI_PINCTRL_MAX_BANKS] =
|
||||
/* PA PB PC PD PE PF PG PH PI PJ PK */
|
||||
{ 0, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14};
|
||||
|
||||
static struct sunxi_pinctrl_desc a733_pinctrl_data = {
|
||||
.irq_banks = 10,
|
||||
.irq_read_needs_mux = true,
|
||||
.io_bias_cfg_variant = BIAS_VOLTAGE_PIO_POW_MODE_SEL,
|
||||
};
|
||||
|
||||
static int a733_pinctrl_probe(struct platform_device *pdev)
|
||||
{
|
||||
return sunxi_pinctrl_dt_table_init(pdev, a733_nr_bank_pins,
|
||||
a733_irq_bank_muxes,
|
||||
&a733_pinctrl_data,
|
||||
SUNXI_PINCTRL_NCAT3_REG_LAYOUT);
|
||||
}
|
||||
|
||||
static const struct of_device_id a733_pinctrl_match[] = {
|
||||
{ .compatible = "allwinner,sun60i-a733-pinctrl", },
|
||||
{}
|
||||
};
|
||||
|
||||
static struct platform_driver a733_pinctrl_driver = {
|
||||
.probe = a733_pinctrl_probe,
|
||||
.driver = {
|
||||
.name = "sun60i-a733-pinctrl",
|
||||
.of_match_table = a733_pinctrl_match,
|
||||
},
|
||||
};
|
||||
builtin_platform_driver(a733_pinctrl_driver);
|
||||
Loading…
Reference in New Issue
Block a user