From 62742bbbb05388f34cf14555087b8dca14216508 Mon Sep 17 00:00:00 2001 From: Raghavendra Kakarla Date: Mon, 26 Jul 2021 13:25:51 +0530 Subject: [PATCH] irqchip: mpm: Add mpm mapping for Khaje Currently both Bengal and Khaje use the same MPM pins mapping configuration as they use the same compatible string. USB PHY has a different GIC IRQ on Khaje, so different MPM configuration is required. Change-Id: I680bb0529145dfe2166f5b26d934da34e5c52f98 Signed-off-by: Raghavendra Kakarla --- drivers/irqchip/Makefile | 2 +- drivers/irqchip/qcom-mpm-khaje.c | 17 +++++++++++++++++ drivers/irqchip/qcom-mpm.c | 4 ++++ include/soc/qcom/mpm.h | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 drivers/irqchip/qcom-mpm-khaje.c diff --git a/drivers/irqchip/Makefile b/drivers/irqchip/Makefile index 2c28f3a072b9..ff212b652f52 100644 --- a/drivers/irqchip/Makefile +++ b/drivers/irqchip/Makefile @@ -88,5 +88,5 @@ obj-$(CONFIG_MESON_IRQ_GPIO) += irq-meson-gpio.o obj-$(CONFIG_GOLDFISH_PIC) += irq-goldfish-pic.o obj-$(CONFIG_NDS32) += irq-ativic32.o obj-$(CONFIG_QCOM_PDC) += qcom-pdc.o -obj-$(CONFIG_QCOM_MPM) += qcom-mpm.o qcom-mpm-bengal.o qcom-mpm-scuba.o qcom-mpm-sdm660.o qcom-mpm-msm8937.o qcom-mpm-msm8953.o +obj-$(CONFIG_QCOM_MPM) += qcom-mpm.o qcom-mpm-bengal.o qcom-mpm-scuba.o qcom-mpm-sdm660.o qcom-mpm-msm8937.o qcom-mpm-msm8953.o qcom-mpm-khaje.o obj-$(CONFIG_SIFIVE_PLIC) += irq-sifive-plic.o diff --git a/drivers/irqchip/qcom-mpm-khaje.c b/drivers/irqchip/qcom-mpm-khaje.c new file mode 100644 index 000000000000..f62edabb52d2 --- /dev/null +++ b/drivers/irqchip/qcom-mpm-khaje.c @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0-only + +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include +const struct mpm_pin mpm_khaje_gic_chip_data[] = { + {2, 222}, + {12, 454}, /* b3_lfps_rxterm_irq */ + {86, 215}, /* mpm_wake,spmi_m */ + {91, 216}, /* eud_p0_dpse_int_mx */ + {90, 220}, /* eud_p0_dmse_int_mx */ + {5, 328}, /* lpass_irq_out_sdc */ + {24, 111}, /* bi_px_lpi_1_aoss_mx */ + {-1}, +}; diff --git a/drivers/irqchip/qcom-mpm.c b/drivers/irqchip/qcom-mpm.c index 7540a4600b16..95fc7fb218f0 100644 --- a/drivers/irqchip/qcom-mpm.c +++ b/drivers/irqchip/qcom-mpm.c @@ -604,6 +604,10 @@ static const struct of_device_id mpm_gic_chip_data_table[] = { .compatible = "qcom,mpm-gic-msm8953", .data = mpm_msm8953_gic_chip_data, }, + { + .compatible = "qcom,mpm-gic-khaje", + .data = mpm_khaje_gic_chip_data, + }, {} }; MODULE_DEVICE_TABLE(of, mpm_gic_chip_data_table); diff --git a/include/soc/qcom/mpm.h b/include/soc/qcom/mpm.h index 8209ebef6849..22b2fe4fefdc 100644 --- a/include/soc/qcom/mpm.h +++ b/include/soc/qcom/mpm.h @@ -19,5 +19,6 @@ extern const struct mpm_pin mpm_scuba_gic_chip_data[]; extern const struct mpm_pin mpm_sdm660_gic_chip_data[]; extern const struct mpm_pin mpm_msm8937_gic_chip_data[]; extern const struct mpm_pin mpm_msm8953_gic_chip_data[]; +extern const struct mpm_pin mpm_khaje_gic_chip_data[]; #endif /* __QCOM_MPM_H__ */