Commit a326b052 authored by Wasim Nazir's avatar Wasim Nazir Committed by Linus Walleij
Browse files

pinctrl: qcom: sa8775p: Enable egpio function



Egpio feature allows IsLand Domain IOs to be reused as TLMM GPIOs.
sa8775p supports egpio feature for GPIOs ranging from 126 to 148.

Signed-off-by: default avatarWasim Nazir <quic_wasimn@quicinc.com>
Reviewed-by: default avatarDmitry Baryshkov <lumag@kernel.org>
Link: https://lore.kernel.org/20250312072509.3247885-3-quic_wasimn@quicinc.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent dc4a7029
Loading
Loading
Loading
Loading
+34 −24
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2022,2025, Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2023, Linaro Limited
 */

@@ -467,6 +467,7 @@ enum sa8775p_functions {
	msm_mux_edp2_lcd,
	msm_mux_edp3_hot,
	msm_mux_edp3_lcd,
	msm_mux_egpio,
	msm_mux_emac0_mcg0,
	msm_mux_emac0_mcg1,
	msm_mux_emac0_mcg2,
@@ -744,6 +745,13 @@ static const char * const edp3_lcd_groups[] = {
	"gpio49",
};

static const char *const egpio_groups[] = {
	"gpio126", "gpio127", "gpio128", "gpio129", "gpio130", "gpio131",
	"gpio132", "gpio133", "gpio134", "gpio135", "gpio136", "gpio137",
	"gpio138", "gpio139", "gpio140", "gpio141", "gpio142", "gpio143",
	"gpio144", "gpio145", "gpio146", "gpio147", "gpio148",
};

static const char * const emac0_mcg0_groups[] = {
	"gpio12",
};
@@ -1209,6 +1217,7 @@ static const struct pinfunction sa8775p_functions[] = {
	MSM_PIN_FUNCTION(edp2_lcd),
	MSM_PIN_FUNCTION(edp3_hot),
	MSM_PIN_FUNCTION(edp3_lcd),
	MSM_PIN_FUNCTION(egpio),
	MSM_PIN_FUNCTION(emac0_mcg0),
	MSM_PIN_FUNCTION(emac0_mcg1),
	MSM_PIN_FUNCTION(emac0_mcg2),
@@ -1454,29 +1463,29 @@ static const struct msm_pingroup sa8775p_groups[] = {
	[123] = PINGROUP(123, hs2_mi2s, phase_flag, _, _, _, _, _, _, _),
	[124] = PINGROUP(124, hs2_mi2s, phase_flag, _, _, _, _, _, _, _),
	[125] = PINGROUP(125, hs2_mi2s, phase_flag, _, _, _, _, _, _, _),
	[126] = PINGROUP(126, _, _, _, _, _, _, _, _, _),
	[127] = PINGROUP(127, _, _, _, _, _, _, _, _, _),
	[128] = PINGROUP(128, _, _, _, _, _, _, _, _, _),
	[129] = PINGROUP(129, _, _, _, _, _, _, _, _, _),
	[130] = PINGROUP(130, _, _, _, _, _, _, _, _, _),
	[131] = PINGROUP(131, _, _, _, _, _, _, _, _, _),
	[132] = PINGROUP(132, _, _, _, _, _, _, _, _, _),
	[133] = PINGROUP(133, _, _, _, _, _, _, _, _, _),
	[134] = PINGROUP(134, _, _, _, _, _, _, _, _, _),
	[135] = PINGROUP(135, _, _, _, _, _, _, _, _, _),
	[136] = PINGROUP(136, _, _, _, _, _, _, _, _, _),
	[137] = PINGROUP(137, _, _, _, _, _, _, _, _, _),
	[138] = PINGROUP(138, _, _, _, _, _, _, _, _, _),
	[139] = PINGROUP(139, _, _, _, _, _, _, _, _, _),
	[140] = PINGROUP(140, _, _, _, _, _, _, _, _, _),
	[141] = PINGROUP(141, _, _, _, _, _, _, _, _, _),
	[142] = PINGROUP(142, _, _, _, _, _, _, _, _, _),
	[143] = PINGROUP(143, _, _, _, _, _, _, _, _, _),
	[144] = PINGROUP(144, dbg_out, _, _, _, _, _, _, _, _),
	[145] = PINGROUP(145, _, _, _, _, _, _, _, _, _),
	[146] = PINGROUP(146, _, _, _, _, _, _, _, _, _),
	[147] = PINGROUP(147, _, _, _, _, _, _, _, _, _),
	[148] = PINGROUP(148, _, _, _, _, _, _, _, _, _),
	[126] = PINGROUP(126, _, _, _, _, _, _, _, _, egpio),
	[127] = PINGROUP(127, _, _, _, _, _, _, _, _, egpio),
	[128] = PINGROUP(128, _, _, _, _, _, _, _, _, egpio),
	[129] = PINGROUP(129, _, _, _, _, _, _, _, _, egpio),
	[130] = PINGROUP(130, _, _, _, _, _, _, _, _, egpio),
	[131] = PINGROUP(131, _, _, _, _, _, _, _, _, egpio),
	[132] = PINGROUP(132, _, _, _, _, _, _, _, _, egpio),
	[133] = PINGROUP(133, _, _, _, _, _, _, _, _, egpio),
	[134] = PINGROUP(134, _, _, _, _, _, _, _, _, egpio),
	[135] = PINGROUP(135, _, _, _, _, _, _, _, _, egpio),
	[136] = PINGROUP(136, _, _, _, _, _, _, _, _, egpio),
	[137] = PINGROUP(137, _, _, _, _, _, _, _, _, egpio),
	[138] = PINGROUP(138, _, _, _, _, _, _, _, _, egpio),
	[139] = PINGROUP(139, _, _, _, _, _, _, _, _, egpio),
	[140] = PINGROUP(140, _, _, _, _, _, _, _, _, egpio),
	[141] = PINGROUP(141, _, _, _, _, _, _, _, _, egpio),
	[142] = PINGROUP(142, _, _, _, _, _, _, _, _, egpio),
	[143] = PINGROUP(143, _, _, _, _, _, _, _, _, egpio),
	[144] = PINGROUP(144, dbg_out, _, _, _, _, _, _, _, egpio),
	[145] = PINGROUP(145, _, _, _, _, _, _, _, _, egpio),
	[146] = PINGROUP(146, _, _, _, _, _, _, _, _, egpio),
	[147] = PINGROUP(147, _, _, _, _, _, _, _, _, egpio),
	[148] = PINGROUP(148, _, _, _, _, _, _, _, _, egpio),
	[149] = UFS_RESET(ufs_reset, 0x1a2000),
	[150] = SDC_QDSD_PINGROUP(sdc1_rclk, 0x199000, 15, 0),
	[151] = SDC_QDSD_PINGROUP(sdc1_clk, 0x199000, 13, 6),
@@ -1511,6 +1520,7 @@ static const struct msm_pinctrl_soc_data sa8775p_pinctrl = {
	.ngpios = 150,
	.wakeirq_map = sa8775p_pdc_map,
	.nwakeirq_map = ARRAY_SIZE(sa8775p_pdc_map),
	.egpio_func = 9,
};

static int sa8775p_pinctrl_probe(struct platform_device *pdev)