Merge "pinctrl: qcom: Add pinctrl support for VMs"
This commit is contained in:
commit
7d2ff3384d
2
arch/arm64/configs/vendor/waipio_GKI.config
vendored
2
arch/arm64/configs/vendor/waipio_GKI.config
vendored
@ -108,7 +108,7 @@ CONFIG_PHY_QCOM_UFS_QRBTC_SDM845=m
|
|||||||
CONFIG_PHY_QCOM_UFS_V4=m
|
CONFIG_PHY_QCOM_UFS_V4=m
|
||||||
CONFIG_PINCTRL_DIWALI=m
|
CONFIG_PINCTRL_DIWALI=m
|
||||||
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
|
CONFIG_PINCTRL_QCOM_SPMI_PMIC=m
|
||||||
CONFIG_PINCTRL_WAIPIO=m
|
CONFIG_QCOM_PINCTRL=m
|
||||||
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=m
|
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE=m
|
||||||
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
|
CONFIG_POWER_RESET_QCOM_DOWNLOAD_MODE_DEFAULT=y
|
||||||
CONFIG_POWER_RESET_QCOM_PON=m
|
CONFIG_POWER_RESET_QCOM_PON=m
|
||||||
|
@ -49,14 +49,14 @@ config PINCTRL_HOLI
|
|||||||
Say Y here to compile statically, or M here to compile it as a module.
|
Say Y here to compile statically, or M here to compile it as a module.
|
||||||
If unsure, say N.
|
If unsure, say N.
|
||||||
|
|
||||||
config PINCTRL_WAIPIO
|
config QCOM_PINCTRL
|
||||||
tristate "Qualcomm Technologies Inc WAIPIO pin controller driver"
|
tristate "Qualcomm Technologies Inc pin controller driver"
|
||||||
depends on GPIOLIB && OF
|
depends on GPIOLIB && OF
|
||||||
select PINCTRL_MSM
|
select PINCTRL_MSM
|
||||||
help
|
help
|
||||||
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
This is the pinctrl, pinmux, pinconf and gpiolib driver for the
|
||||||
Qualcomm Technologies Inc Top Level Mode Multiplexer block (TLMM)
|
Qualcomm Technologies Inc Top Level Mode Multiplexer block (TLMM)
|
||||||
block found on the Qualcomm Technologies Inc WAIPIO platform.
|
block found on the Qualcomm Technologies Inc platforms.
|
||||||
Say Y here to compile statically, or M here to compile it as a module.
|
Say Y here to compile statically, or M here to compile it as a module.
|
||||||
If unsure, say N.
|
If unsure, say N.
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ obj-$(CONFIG_PINCTRL_MSM) += pinctrl-msm.o
|
|||||||
obj-$(CONFIG_PINCTRL_LAHAINA) += pinctrl-lahaina.o
|
obj-$(CONFIG_PINCTRL_LAHAINA) += pinctrl-lahaina.o
|
||||||
obj-$(CONFIG_PINCTRL_SHIMA) += pinctrl-shima.o
|
obj-$(CONFIG_PINCTRL_SHIMA) += pinctrl-shima.o
|
||||||
obj-$(CONFIG_PINCTRL_HOLI) += pinctrl-holi.o
|
obj-$(CONFIG_PINCTRL_HOLI) += pinctrl-holi.o
|
||||||
obj-$(CONFIG_PINCTRL_WAIPIO) += pinctrl-waipio.o
|
obj-$(CONFIG_QCOM_PINCTRL) += qcom-msm-pinctrl.o
|
||||||
obj-$(CONFIG_PINCTRL_DIWALI) += pinctrl-diwali.o
|
obj-$(CONFIG_PINCTRL_DIWALI) += pinctrl-diwali.o
|
||||||
obj-$(CONFIG_PINCTRL_APQ8064) += pinctrl-apq8064.o
|
obj-$(CONFIG_PINCTRL_APQ8064) += pinctrl-apq8064.o
|
||||||
obj-$(CONFIG_PINCTRL_APQ8084) += pinctrl-apq8084.o
|
obj-$(CONFIG_PINCTRL_APQ8084) += pinctrl-apq8084.o
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/of.h>
|
|
||||||
#include <linux/platform_device.h>
|
|
||||||
#include <linux/pinctrl/pinctrl.h>
|
|
||||||
|
|
||||||
#include "pinctrl-msm.h"
|
|
||||||
|
|
||||||
#define FUNCTION(fname) \
|
#define FUNCTION(fname) \
|
||||||
[msm_mux_##fname] = { \
|
[msm_mux_##fname] = { \
|
||||||
.name = #fname, \
|
.name = #fname, \
|
||||||
@ -1866,6 +1859,7 @@ static const struct msm_pingroup waipio_groups[] = {
|
|||||||
[212] = SDC_QDSD_PINGROUP(sdc2_cmd, 0x1d6000, 11, 3),
|
[212] = SDC_QDSD_PINGROUP(sdc2_cmd, 0x1d6000, 11, 3),
|
||||||
[213] = SDC_QDSD_PINGROUP(sdc2_data, 0x1d6000, 9, 0),
|
[213] = SDC_QDSD_PINGROUP(sdc2_data, 0x1d6000, 9, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct pinctrl_qup waipio_qup_regs[] = {
|
static struct pinctrl_qup waipio_qup_regs[] = {
|
||||||
QUP_I3C(8, QUP_I3C_8_MODE_OFFSET),
|
QUP_I3C(8, QUP_I3C_8_MODE_OFFSET),
|
||||||
QUP_I3C(9, QUP_I3C_9_MODE_OFFSET),
|
QUP_I3C(9, QUP_I3C_9_MODE_OFFSET),
|
||||||
@ -1891,52 +1885,3 @@ static const struct msm_gpio_wakeirq_map waipio_pdc_map[] = {
|
|||||||
{ 182, 110 }, { 185, 112 }, { 187, 113 }, { 188, 118 }, { 190, 122 },
|
{ 182, 110 }, { 185, 112 }, { 187, 113 }, { 188, 118 }, { 190, 122 },
|
||||||
{ 192, 123 }, { 195, 124 }, { 201, 119 }, { 203, 120 }, { 205, 121 },
|
{ 192, 123 }, { 195, 124 }, { 201, 119 }, { 203, 120 }, { 205, 121 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct msm_pinctrl_soc_data waipio_pinctrl = {
|
|
||||||
.pins = waipio_pins,
|
|
||||||
.npins = ARRAY_SIZE(waipio_pins),
|
|
||||||
.functions = waipio_functions,
|
|
||||||
.nfunctions = ARRAY_SIZE(waipio_functions),
|
|
||||||
.groups = waipio_groups,
|
|
||||||
.ngroups = ARRAY_SIZE(waipio_groups),
|
|
||||||
.ngpios = 211,
|
|
||||||
.wakeirq_map = waipio_pdc_map,
|
|
||||||
.nwakeirq_map = ARRAY_SIZE(waipio_pdc_map),
|
|
||||||
.qup_regs = waipio_qup_regs,
|
|
||||||
.nqup_regs = ARRAY_SIZE(waipio_qup_regs),
|
|
||||||
};
|
|
||||||
|
|
||||||
static int waipio_pinctrl_probe(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
return msm_pinctrl_probe(pdev, &waipio_pinctrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct of_device_id waipio_pinctrl_of_match[] = {
|
|
||||||
{ .compatible = "qcom,waipio-pinctrl", },
|
|
||||||
{ },
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct platform_driver waipio_pinctrl_driver = {
|
|
||||||
.driver = {
|
|
||||||
.name = "waipio-pinctrl",
|
|
||||||
.of_match_table = waipio_pinctrl_of_match,
|
|
||||||
},
|
|
||||||
.probe = waipio_pinctrl_probe,
|
|
||||||
.remove = msm_pinctrl_remove,
|
|
||||||
};
|
|
||||||
|
|
||||||
static int __init waipio_pinctrl_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_register(&waipio_pinctrl_driver);
|
|
||||||
}
|
|
||||||
arch_initcall(waipio_pinctrl_init);
|
|
||||||
|
|
||||||
static void __exit waipio_pinctrl_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&waipio_pinctrl_driver);
|
|
||||||
}
|
|
||||||
module_exit(waipio_pinctrl_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("QTI waipio pinctrl driver");
|
|
||||||
MODULE_LICENSE("GPL v2");
|
|
||||||
MODULE_DEVICE_TABLE(of, waipio_pinctrl_of_match);
|
|
79
drivers/pinctrl/qcom/qcom-msm-pinctrl.c
Normal file
79
drivers/pinctrl/qcom/qcom-msm-pinctrl.c
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/of_device.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <linux/pinctrl/pinctrl.h>
|
||||||
|
|
||||||
|
#include "pinctrl-msm.h"
|
||||||
|
#include "pinctrl-waipio.h"
|
||||||
|
|
||||||
|
static const struct msm_pinctrl_soc_data waipio_pinctrl = {
|
||||||
|
.pins = waipio_pins,
|
||||||
|
.npins = ARRAY_SIZE(waipio_pins),
|
||||||
|
.functions = waipio_functions,
|
||||||
|
.nfunctions = ARRAY_SIZE(waipio_functions),
|
||||||
|
.groups = waipio_groups,
|
||||||
|
.ngroups = ARRAY_SIZE(waipio_groups),
|
||||||
|
.ngpios = 211,
|
||||||
|
.wakeirq_map = waipio_pdc_map,
|
||||||
|
.nwakeirq_map = ARRAY_SIZE(waipio_pdc_map),
|
||||||
|
.qup_regs = waipio_qup_regs,
|
||||||
|
.nqup_regs = ARRAY_SIZE(waipio_qup_regs),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct msm_pinctrl_soc_data waipio_vm_pinctrl = {
|
||||||
|
.pins = waipio_pins,
|
||||||
|
.npins = ARRAY_SIZE(waipio_pins),
|
||||||
|
.functions = waipio_functions,
|
||||||
|
.nfunctions = ARRAY_SIZE(waipio_functions),
|
||||||
|
.groups = waipio_groups,
|
||||||
|
.ngroups = ARRAY_SIZE(waipio_groups),
|
||||||
|
.ngpios = 211,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int qcom_msm_pinctrl_probe(struct platform_device *pdev)
|
||||||
|
{
|
||||||
|
const struct msm_pinctrl_soc_data *pinctrl_data;
|
||||||
|
|
||||||
|
pinctrl_data = of_device_get_match_data(&pdev->dev);
|
||||||
|
if (!pinctrl_data)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
return msm_pinctrl_probe(pdev, pinctrl_data);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct of_device_id qcom_pinctrl_of_match[] = {
|
||||||
|
{ .compatible = "qcom,waipio-pinctrl", .data = &waipio_pinctrl},
|
||||||
|
{ .compatible = "qcom,waipio-vm-pinctrl", .data = &waipio_vm_pinctrl},
|
||||||
|
{ },
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_driver qcom_msm_pinctrl_driver = {
|
||||||
|
.driver = {
|
||||||
|
.name = "qcom_msm_pinctrl",
|
||||||
|
.of_match_table = qcom_pinctrl_of_match,
|
||||||
|
},
|
||||||
|
.probe = qcom_msm_pinctrl_probe,
|
||||||
|
.remove = msm_pinctrl_remove,
|
||||||
|
};
|
||||||
|
|
||||||
|
static int __init qcom_msm_pinctrl_init(void)
|
||||||
|
{
|
||||||
|
return platform_driver_register(&qcom_msm_pinctrl_driver);
|
||||||
|
}
|
||||||
|
arch_initcall(qcom_msm_pinctrl_init);
|
||||||
|
|
||||||
|
static void __exit qcom_msm_pinctrl_exit(void)
|
||||||
|
{
|
||||||
|
platform_driver_unregister(&qcom_msm_pinctrl_driver);
|
||||||
|
}
|
||||||
|
module_exit(qcom_msm_pinctrl_exit);
|
||||||
|
|
||||||
|
MODULE_DESCRIPTION("QTI pinctrl driver");
|
||||||
|
MODULE_LICENSE("GPL v2");
|
||||||
|
MODULE_DEVICE_TABLE(of, qcom_pinctrl_of_match);
|
@ -41,7 +41,6 @@ phy-qcom-ufs-qmp-v4-lahaina.ko
|
|||||||
phy-qcom-ufs-qrbtc-sdm845.ko
|
phy-qcom-ufs-qrbtc-sdm845.ko
|
||||||
pinctrl-diwali.ko
|
pinctrl-diwali.ko
|
||||||
pinctrl-msm.ko
|
pinctrl-msm.ko
|
||||||
pinctrl-waipio.ko
|
|
||||||
proxy-consumer.ko
|
proxy-consumer.ko
|
||||||
qcom-cpufreq-hw.ko
|
qcom-cpufreq-hw.ko
|
||||||
qcom_cpu_vendor_hooks.ko
|
qcom_cpu_vendor_hooks.ko
|
||||||
@ -53,6 +52,7 @@ qcom_iommu_util.ko
|
|||||||
qcom_ipcc.ko
|
qcom_ipcc.ko
|
||||||
qcom_ipc_logging.ko
|
qcom_ipc_logging.ko
|
||||||
qcom_llcc_pmu.ko
|
qcom_llcc_pmu.ko
|
||||||
|
qcom-msm-pinctrl.ko
|
||||||
qcom-pdc.ko
|
qcom-pdc.ko
|
||||||
qcom-pmu-lib.ko
|
qcom-pmu-lib.ko
|
||||||
qcom-reboot-reason.ko
|
qcom-reboot-reason.ko
|
||||||
|
Loading…
Reference in New Issue
Block a user