pinctrl: qcom: sc7280-lpass-lpi: add ext_mclk1_c function
Subsystems (5)
PATCH 1/1 pinctrl: qcom: sc7280-lpass-lpi: add ext_mclk1_c function
LPASS LPI gpio5 can mux EXT_MCLK1_C, but that function slot is left unnamed, so a device tree cannot select it. SC8280XP already names the same slot ext_mclk1_c.
Name the slot on SC7280 and assign it to gpio5. The third slot stays empty; on SC8280XP it is qua_mi2s_data.
This file also provides the SM8350 LPASS LPI driver, which uses the same pin table, so the function becomes available on SM8350 as well.
Tested on the Vicharak Axon Mini (QCS6490): selecting this mux slot drives the codec master clock, and ES8388 playback and headset capture work. Not tested on SM8350.
--- drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +4 -1
@@ -34,6 +34,7 @@ enum lpass_lpi_functions { LPI_MUX_swr_tx_data, LPI_MUX_wsa_swr_clk, LPI_MUX_wsa_swr_data, + LPI_MUX_ext_mclk1_c, LPI_MUX_gpio, LPI_MUX__, };
@@ -77,6 +78,7 @@ static const char * const i2s1_data_groups[] = { "gpio8", "gpio9" };static const char *const wsa_swr_clk_groups[] = {"gpio10" };static const char *const wsa_swr_data_groups[] = {"gpio11" };static const char *const i2s2_data_groups[] = {"gpio12" ,"gpio13" }; +static const char *const ext_mclk1_c_groups[] = {"gpio5" };static const struct lpi_pingroup sc7280_groups[] = {LPI_PINGROUP (0 ,0 , swr_tx_clk, qua_mi2s_sclk, _, _),
@@ -84,7 +86,7 @@ static const struct lpi_pingroup sc7280_groups[] = {LPI_PINGROUP (2 ,4 , swr_tx_data, qua_mi2s_data, _, _),LPI_PINGROUP (3 ,8 , swr_rx_clk, qua_mi2s_data, _, _),LPI_PINGROUP (4 ,10 , swr_rx_data, qua_mi2s_data, _, _), -LPI_PINGROUP (5 ,12 , swr_rx_data, _, _, _), +LPI_PINGROUP (5 ,12 , swr_rx_data, ext_mclk1_c, _, _),LPI_PINGROUP (6 ,LPI_NO_SLEW , dmic1_clk, i2s1_clk, _, _),LPI_PINGROUP (7 ,LPI_NO_SLEW , dmic1_data, i2s1_ws, _, _), LPI_PINGROUP(8, LPI_NO_SLEW, dmic2_clk, i2s1_data, _, _),
@@ -118,6 +120,7 @@ static const struct lpi_function sc7280_functions[] = {LPI_FUNCTION (swr_tx_data),LPI_FUNCTION (wsa_swr_clk ),LPI_FUNCTION (wsa_swr_data ), + LPI_FUNCTION(ext_mclk1_c), };static const struct lpi_pinctrl_variant_data sc7280_lpi_data = {
base-commit: cbbddb6b08cc9900a87cccaa9b22bbe06aa4f50a
Signature · 1 line
2.34.1
Quoted 24 lines · Suraj Sonawane
LPASS LPI gpio5 can mux
EXT_MCLK1_C, but that function slot is left unnamed, so a device tree cannot select it. SC8280XP already names the same slotext_mclk1_c.Name the slot on SC7280 and assign it to gpio5. The third slot stays empty; on SC8280XP it is
qua_mi2s_data.This file also provides the SM8350 LPASS LPI driver, which uses the same pin table, so the function becomes available on SM8350 as well.
Tested on the Vicharak Axon Mini (QCS6490): selecting this mux slot drives the codec master clock, and ES8388 playback and headset capture work. Not tested on SM8350.
Signed-off-by Suraj Sonawane <[email protected]>--- drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +0
-0
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c enum lpass_lpi_functions { · line 37
Quoted 4 lines
drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +1
-0@@ -34,6 +34,7 @@ enum lpass_lpi_functions { LPI_MUX_swr_tx_data, LPI_MUX_wsa_swr_clk, LPI_MUX_wsa_swr_data, + LPI_MUX_ext_mclk1_c,
This name happens to match the kodiak hw specification too
FWIW you need to update the dt-bindings to accomodate it
otherwise
Konrad
Linus Walleij
maintainerQuoted 7 lines · Suraj Sonawane
LPASS LPI gpio5 can mux
EXT_MCLK1_C, but that function slot is left unnamed, so a device tree cannot select it. SC8280XP already names the same slotext_mclk1_c.Name the slot on SC7280 and assign it to gpio5. The third slot stays empty; on SC8280XP it is
qua_mi2s_data.
Quoted 8 lines
This file also provides the SM8350 LPASS LPI driver, which uses the same pin table, so the function becomes available on SM8350 as well.
Tested on the Vicharak Axon Mini (QCS6490): selecting this mux slot drives the codec master clock, and ES8388 playback and headset capture work. Not tested on SM8350.
Signed-off-by Suraj Sonawane <[email protected]>
I'll wait for a v2 which comes with a DT binding patch.
Yours,
Linus Walleij
Bartosz Golaszewski
maintainerQuoted 13 lines · Linus Walleij
Quoted 10 lines · Suraj Sonawane
LPASS LPI gpio5 can mux
EXT_MCLK1_C, but that function slot is left unnamed, so a device tree cannot select it. SC8280XP already names the same slotext_mclk1_c.Name the slot on SC7280 and assign it to gpio5. The third slot stays empty; on SC8280XP it is
qua_mi2s_data.This file also provides the SM8350 LPASS LPI driver, which uses the same pin table, so the function becomes available on SM8350 as well.
Quoted 8 lines
Quoted 5 lines
Tested on the Vicharak Axon Mini (QCS6490): selecting this mux slot drives the codec master clock, and ES8388 playback and headset capture work. Not tested on SM8350.
Signed-off-by Suraj Sonawane <[email protected]>I'll wait for a v2 which comes with a DT binding patch.
No worries, I'm on it.
Bart