]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 6.1
authorSasha Levin <sashal@kernel.org>
Fri, 13 Oct 2023 00:02:25 +0000 (20:02 -0400)
committerSasha Levin <sashal@kernel.org>
Fri, 13 Oct 2023 00:02:25 +0000 (20:02 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-6.1/alsa-hda-realtek-change-model-for-intel-rvp-board.patch-13328 [new file with mode: 0644]
queue-6.1/arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch [new file with mode: 0644]
queue-6.1/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch [new file with mode: 0644]
queue-6.1/asoc-fsl_sai-mclk-bind-with-tx-rx-enable-bit.patch [new file with mode: 0644]
queue-6.1/asoc-simple-card-utils-fixup-simple_util_startup-err.patch [new file with mode: 0644]
queue-6.1/asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch [new file with mode: 0644]
queue-6.1/asoc-use-of_property_read_bool-for-boolean-propertie.patch [new file with mode: 0644]
queue-6.1/irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch [new file with mode: 0644]
queue-6.1/series

diff --git a/queue-6.1/alsa-hda-realtek-change-model-for-intel-rvp-board.patch-13328 b/queue-6.1/alsa-hda-realtek-change-model-for-intel-rvp-board.patch-13328
new file mode 100644 (file)
index 0000000..387b512
--- /dev/null
@@ -0,0 +1,46 @@
+From a14ed1d15dcfb52a82e5290ce1bc987117d35225 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 6 Oct 2023 14:47:37 +0800
+Subject: ALSA: hda/realtek: Change model for Intel RVP board
+
+From: Kailang Yang <kailang@realtek.com>
+
+[ Upstream commit ccbd88be057a38531f835e8a04948ebf80cb0c5d ]
+
+Intel RVP board (0x12cc) has Headset Mic issue for reboot.
+If system plugged headset when system reboot the headset Mic was gone.
+
+Fixes: 1a93f10c5b12 ("ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256")
+Signed-off-by: Kailang Yang <kailang@realtek.com>
+Link: https://lore.kernel.org/r/28112f54c0c6496f97ac845645bc0256@realtek.com
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/pci/hda/patch_realtek.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
+index 57e07aa4e136c..33fbf42fe502b 100644
+--- a/sound/pci/hda/patch_realtek.c
++++ b/sound/pci/hda/patch_realtek.c
+@@ -9697,7 +9697,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+       SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+       SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+       SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+-      SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC225_FIXUP_HEADSET_JACK),
++      SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+       SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
+       SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
+       SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
+@@ -9920,7 +9920,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
+       SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
+       SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
+       SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
+-      SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC225_FIXUP_HEADSET_JACK),
++      SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC295_FIXUP_CHROME_BOOK),
+       SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
+ #if 0
+-- 
+2.40.1
+
diff --git a/queue-6.1/arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch b/queue-6.1/arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch
new file mode 100644 (file)
index 0000000..fda8fc3
--- /dev/null
@@ -0,0 +1,40 @@
+From 496318b0e3cd7c0e00ee66579620cc1a58f45e44 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 5 Sep 2023 15:19:26 +0200
+Subject: arm64: dts: qcom: sm8150: extend the size of the PDC resource
+
+From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+
+[ Upstream commit cf5716acbfc6190b3f97f4614affdf5991aed7b2 ]
+
+Follow the example of other platforms and extend the PDC resource region
+to 0x30000, so that the PDC driver can read the PDC_VERSION register.
+
+Fixes: 397ad94668c1 ("arm64: dts: qcom: sm8150: Add pdc interrupt controller node")
+Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
+Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
+Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
+Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Link: https://lore.kernel.org/r/20230905-topic-sm8x50-upstream-pdc-ver-v4-2-fc633c7df84b@linaro.org
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
+index f049fb42e3ca8..de794a5078dfc 100644
+--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
++++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
+@@ -3701,7 +3701,7 @@
+               pdc: interrupt-controller@b220000 {
+                       compatible = "qcom,sm8150-pdc", "qcom,pdc";
+-                      reg = <0 0x0b220000 0 0x400>;
++                      reg = <0 0x0b220000 0 0x30000>;
+                       qcom,pdc-ranges = <0 480 94>, <94 609 31>,
+                                         <125 63 1>;
+                       #interrupt-cells = <2>;
+-- 
+2.40.1
+
diff --git a/queue-6.1/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch b/queue-6.1/asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch
new file mode 100644 (file)
index 0000000..4a04b0c
--- /dev/null
@@ -0,0 +1,58 @@
+From c4cce292c39da98ee276aa00288bad14ac393569 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 19 Sep 2023 17:42:13 +0800
+Subject: ASoC: fsl_sai: Don't disable bitclock for i.MX8MP
+
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+
+[ Upstream commit 197c53c8ecb34f2cd5922f4bdcffa8f701a134eb ]
+
+On i.MX8MP, the BCE and TERE bit are binding with mclk
+enablement, if BCE and TERE are cleared the MCLK also be
+disabled on output pin, that cause the external codec (wm8960)
+in wrong state.
+
+Codec (wm8960) is using the mclk to generate PLL clock,
+if mclk is disabled before disabling PLL, the codec (wm8960)
+won't generate bclk and frameclk when sysclk switch to
+MCLK source in next test case.
+
+The test case:
+$aplay -r44100 test1.wav (PLL source)
+$aplay -r48000 test2.wav (MCLK source)
+aplay: pcm_write:2127: write error: Input/output error
+
+Fixes: 269f399dc19f ("ASoC: fsl_sai: Disable bit clock with transmitter")
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
+Link: https://lore.kernel.org/r/1695116533-23287-1-git-send-email-shengjiu.wang@nxp.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/fsl/fsl_sai.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
+index 08a33832f6b3f..96fd9095e544b 100644
+--- a/sound/soc/fsl/fsl_sai.c
++++ b/sound/soc/fsl/fsl_sai.c
+@@ -710,10 +710,15 @@ static void fsl_sai_config_disable(struct fsl_sai *sai, int dir)
+ {
+       unsigned int ofs = sai->soc_data->reg_offset;
+       bool tx = dir == TX;
+-      u32 xcsr, count = 100;
++      u32 xcsr, count = 100, mask;
++
++      if (sai->soc_data->mclk_with_tere && sai->mclk_direction_output)
++              mask = FSL_SAI_CSR_TERE;
++      else
++              mask = FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE;
+       regmap_update_bits(sai->regmap, FSL_SAI_xCSR(tx, ofs),
+-                         FSL_SAI_CSR_TERE | FSL_SAI_CSR_BCE, 0);
++                         mask, 0);
+       /* TERE will remain set till the end of current frame */
+       do {
+-- 
+2.40.1
+
diff --git a/queue-6.1/asoc-fsl_sai-mclk-bind-with-tx-rx-enable-bit.patch b/queue-6.1/asoc-fsl_sai-mclk-bind-with-tx-rx-enable-bit.patch
new file mode 100644 (file)
index 0000000..c80d7d9
--- /dev/null
@@ -0,0 +1,127 @@
+From a2dc690e8bd815d5d83c49e9bd4c6f674d8958a6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 5 May 2023 15:55:22 +0800
+Subject: ASoC: fsl_sai: MCLK bind with TX/RX enable bit
+
+From: Shengjiu Wang <shengjiu.wang@nxp.com>
+
+[ Upstream commit 3e4a826129980fed0e3e746a7822f2f204dfc24a ]
+
+On i.MX8MP, the sai MCLK is bound with TX/RX enable bit,
+which means the TX/RE enable bit need to be enabled then
+MCLK can be output on PAD.
+
+Some codec (for example: WM8962) needs the MCLK output
+earlier, otherwise there will be issue for codec
+configuration.
+
+Add new soc data "mclk_with_tere" for this platform and
+enable the MCLK output in startup stage.
+
+As "mclk_with_tere" only applied to i.MX8MP, currently
+The soc data is shared with i.MX8MN, so need to add
+an i.MX8MN own soc data with "mclk_with_tere" disabled.
+
+Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com
+Link: https://lore.kernel.org/r/1683273322-2525-1-git-send-email-shengjiu.wang@nxp.com
+Signed-off-by: Mark Brown <broonie@kernel.org
+Stable-dep-of: 197c53c8ecb3 ("ASoC: fsl_sai: Don't disable bitclock for i.MX8MP")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/fsl/fsl_sai.c | 24 +++++++++++++++++++++---
+ sound/soc/fsl/fsl_sai.h |  2 ++
+ 2 files changed, 23 insertions(+), 3 deletions(-)
+
+diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
+index 2c17d16f842ea..08a33832f6b3f 100644
+--- a/sound/soc/fsl/fsl_sai.c
++++ b/sound/soc/fsl/fsl_sai.c
+@@ -1401,7 +1401,9 @@ static int fsl_sai_probe(struct platform_device *pdev)
+               sai->cpu_dai_drv.symmetric_sample_bits = 0;
+       }
+-      if (of_property_read_bool(np, "fsl,sai-mclk-direction-output") &&
++      sai->mclk_direction_output = of_property_read_bool(np, "fsl,sai-mclk-direction-output");
++
++      if (sai->mclk_direction_output &&
+           of_device_is_compatible(np, "fsl,imx6ul-sai")) {
+               gpr = syscon_regmap_lookup_by_compatible("fsl,imx6ul-iomuxc-gpr");
+               if (IS_ERR(gpr)) {
+@@ -1442,7 +1444,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
+               dev_warn(dev, "Error reading SAI version: %d\n", ret);
+       /* Select MCLK direction */
+-      if (of_property_read_bool(np, "fsl,sai-mclk-direction-output") &&
++      if (sai->mclk_direction_output &&
+           sai->soc_data->max_register >= FSL_SAI_MCTL) {
+               regmap_update_bits(sai->regmap, FSL_SAI_MCTL,
+                                  FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN);
+@@ -1560,6 +1562,17 @@ static const struct fsl_sai_soc_data fsl_sai_imx8mm_data = {
+       .max_register = FSL_SAI_MCTL,
+ };
++static const struct fsl_sai_soc_data fsl_sai_imx8mn_data = {
++      .use_imx_pcm = true,
++      .use_edma = false,
++      .fifo_depth = 128,
++      .reg_offset = 8,
++      .mclk0_is_mclk1 = false,
++      .pins = 8,
++      .flags = 0,
++      .max_register = FSL_SAI_MDIV,
++};
++
+ static const struct fsl_sai_soc_data fsl_sai_imx8mp_data = {
+       .use_imx_pcm = true,
+       .use_edma = false,
+@@ -1569,6 +1582,7 @@ static const struct fsl_sai_soc_data fsl_sai_imx8mp_data = {
+       .pins = 8,
+       .flags = 0,
+       .max_register = FSL_SAI_MDIV,
++      .mclk_with_tere = true,
+ };
+ static const struct fsl_sai_soc_data fsl_sai_imx8ulp_data = {
+@@ -1592,7 +1606,7 @@ static const struct of_device_id fsl_sai_ids[] = {
+       { .compatible = "fsl,imx8mm-sai", .data = &fsl_sai_imx8mm_data },
+       { .compatible = "fsl,imx8mp-sai", .data = &fsl_sai_imx8mp_data },
+       { .compatible = "fsl,imx8ulp-sai", .data = &fsl_sai_imx8ulp_data },
+-      { .compatible = "fsl,imx8mn-sai", .data = &fsl_sai_imx8mp_data },
++      { .compatible = "fsl,imx8mn-sai", .data = &fsl_sai_imx8mn_data },
+       { /* sentinel */ }
+ };
+ MODULE_DEVICE_TABLE(of, fsl_sai_ids);
+@@ -1656,6 +1670,10 @@ static int fsl_sai_runtime_resume(struct device *dev)
+       if (ret)
+               goto disable_rx_clk;
++      if (sai->soc_data->mclk_with_tere && sai->mclk_direction_output)
++              regmap_update_bits(sai->regmap, FSL_SAI_TCSR(ofs),
++                                 FSL_SAI_CSR_TERE, FSL_SAI_CSR_TERE);
++
+       return 0;
+ disable_rx_clk:
+diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
+index caad5b0ac4ff4..b4d616a44023c 100644
+--- a/sound/soc/fsl/fsl_sai.h
++++ b/sound/soc/fsl/fsl_sai.h
+@@ -232,6 +232,7 @@ struct fsl_sai_soc_data {
+       bool use_imx_pcm;
+       bool use_edma;
+       bool mclk0_is_mclk1;
++      bool mclk_with_tere;
+       unsigned int fifo_depth;
+       unsigned int pins;
+       unsigned int reg_offset;
+@@ -288,6 +289,7 @@ struct fsl_sai {
+       bool synchronous[2];
+       struct fsl_sai_dl_cfg *dl_cfg;
+       unsigned int dl_cfg_cnt;
++      bool mclk_direction_output;
+       unsigned int mclk_id[2];
+       unsigned int mclk_streams;
+-- 
+2.40.1
+
diff --git a/queue-6.1/asoc-simple-card-utils-fixup-simple_util_startup-err.patch b/queue-6.1/asoc-simple-card-utils-fixup-simple_util_startup-err.patch
new file mode 100644 (file)
index 0000000..a6b0c9f
--- /dev/null
@@ -0,0 +1,41 @@
+From c2e24d602d5a3bcae85b985ca8cb9585f5853dd6 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 19 Sep 2023 01:22:57 +0000
+Subject: ASoC: simple-card-utils: fixup simple_util_startup() error handling
+
+From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+[ Upstream commit 69cf63b6560205a390a736b88d112374655adb28 ]
+
+It should use "goto" instead of "return"
+
+Fixes: 5ca2ab459817 ("ASoC: simple-card-utils: Add new system-clock-fixed flag")
+Reported-by: kernel test robot <lkp@intel.com>
+Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
+Closes: https://lore.kernel.org/all/202309141205.ITZeDJxV-lkp@intel.com/
+Closes: https://lore.kernel.org/all/202309151840.au9Aa2W4-lkp@intel.com/
+Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+Link: https://lore.kernel.org/r/87v8c76jnz.wl-kuninori.morimoto.gx@renesas.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/generic/simple-card-utils.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
+index 8811321717fbb..c719354635a3a 100644
+--- a/sound/soc/generic/simple-card-utils.c
++++ b/sound/soc/generic/simple-card-utils.c
+@@ -331,7 +331,8 @@ int asoc_simple_startup(struct snd_pcm_substream *substream)
+               if (fixed_sysclk % props->mclk_fs) {
+                       dev_err(rtd->dev, "fixed sysclk %u not divisible by mclk_fs %u\n",
+                               fixed_sysclk, props->mclk_fs);
+-                      return -EINVAL;
++                      ret = -EINVAL;
++                      goto codec_err;
+               }
+               ret = snd_pcm_hw_constraint_minmax(substream->runtime, SNDRV_PCM_HW_PARAM_RATE,
+                       fixed_rate, fixed_rate);
+-- 
+2.40.1
+
diff --git a/queue-6.1/asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch b/queue-6.1/asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch
new file mode 100644 (file)
index 0000000..bcea7bb
--- /dev/null
@@ -0,0 +1,56 @@
+From 10499930bee2dcbbc41d53c47b1a165530fdda4f Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Wed, 27 Sep 2023 12:44:10 +0530
+Subject: ASoC: SOF: amd: fix for firmware reload failure after playback
+
+From: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
+
+[ Upstream commit 7e1fe5d9e7eae67e218f878195d1d348d01f9af7 ]
+
+Setting ACP ACLK as clock source when ACP enters D0 state causing
+firmware load failure as mentioned in below scenario.
+
+- Load snd_sof_amd_rembrandt
+- Play or Record audio
+- Stop audio
+- Unload snd_sof_amd_rembrandt
+- Reload snd_sof_amd_rembrandt
+
+If acp_clkmux_sel register field is set, then clock source will be
+set to ACP ACLK when ACP enters D0 state.
+
+During stream stop, if there is no active stream is running then
+acp firmware will set the ACP ACLK value to zero.
+
+When driver is reloaded and clock source is selected as ACP ACLK,
+as ACP ACLK is programmed to zero, firmware loading will fail.
+
+For RMB platform, remove the clock mux selection field so that
+ACP will use internal clock source when ACP enters D0 state.
+
+Fixes: 41cb85bc4b52 ("ASoC: SOF: amd: Add support for Rembrandt plaform.")
+Reported-by: coolstar <coolstarorganization@gmail.com>
+Closes: https://github.com/thesofproject/sof/issues/8137
+Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
+Link: https://lore.kernel.org/r/20230927071412.2416250-1-Vijendar.Mukunda@amd.com
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/sof/amd/pci-rmb.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/sound/soc/sof/amd/pci-rmb.c b/sound/soc/sof/amd/pci-rmb.c
+index 5698d910b26f3..6fa060cab657e 100644
+--- a/sound/soc/sof/amd/pci-rmb.c
++++ b/sound/soc/sof/amd/pci-rmb.c
+@@ -54,7 +54,6 @@ static const struct sof_amd_acp_desc rembrandt_chip_info = {
+       .sram_pte_offset = ACP6X_SRAM_PTE_OFFSET,
+       .i2s_pin_config_offset = ACP6X_I2S_PIN_CONFIG,
+       .hw_semaphore_offset = ACP6X_AXI2DAGB_SEM_0,
+-      .acp_clkmux_sel = ACP6X_CLKMUX_SEL,
+       .fusion_dsp_offset = ACP6X_DSP_FUSION_RUNSTALL,
+ };
+-- 
+2.40.1
+
diff --git a/queue-6.1/asoc-use-of_property_read_bool-for-boolean-propertie.patch b/queue-6.1/asoc-use-of_property_read_bool-for-boolean-propertie.patch
new file mode 100644 (file)
index 0000000..12cfc7e
--- /dev/null
@@ -0,0 +1,278 @@
+From c0bd6c72d8b17771b2fe71522f0423055120a299 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Fri, 10 Mar 2023 08:47:32 -0600
+Subject: ASoC: Use of_property_read_bool() for boolean properties
+
+From: Rob Herring <robh@kernel.org>
+
+[ Upstream commit 2d2998b84330899bf88a0414f3356869be4a69eb ]
+
+It is preferred to use typed property access functions (i.e.
+of_property_read_<type> functions) rather than low-level
+of_get_property/of_find_property functions for reading properties.
+Convert reading boolean properties to to of_property_read_bool().
+
+Signed-off-by: Rob Herring <robh@kernel.org>
+Link: https://lore.kernel.org/r/20230310144733.1546413-1-robh@kernel.org
+Signed-off-by: Mark Brown <broonie@kernel.org>
+Stable-dep-of: 197c53c8ecb3 ("ASoC: fsl_sai: Don't disable bitclock for i.MX8MP")
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ sound/soc/codecs/sta32x.c  | 39 +++++++++++------------
+ sound/soc/codecs/sta350.c  | 63 +++++++++++++++++---------------------
+ sound/soc/codecs/tas5086.c |  2 +-
+ sound/soc/fsl/fsl_sai.c    | 12 ++++----
+ sound/soc/fsl/fsl_ssi.c    |  2 +-
+ sound/soc/fsl/imx-card.c   |  2 +-
+ sound/soc/sh/rcar/ssi.c    |  4 +--
+ 7 files changed, 57 insertions(+), 67 deletions(-)
+
+diff --git a/sound/soc/codecs/sta32x.c b/sound/soc/codecs/sta32x.c
+index 8c86b578eba83..29af9595dac19 100644
+--- a/sound/soc/codecs/sta32x.c
++++ b/sound/soc/codecs/sta32x.c
+@@ -1054,35 +1054,32 @@ static int sta32x_probe_dt(struct device *dev, struct sta32x_priv *sta32x)
+       of_property_read_u8(np, "st,ch3-output-mapping",
+                           &pdata->ch3_output_mapping);
+-      if (of_get_property(np, "st,fault-detect-recovery", NULL))
+-              pdata->fault_detect_recovery = 1;
+-      if (of_get_property(np, "st,thermal-warning-recovery", NULL))
+-              pdata->thermal_warning_recovery = 1;
+-      if (of_get_property(np, "st,thermal-warning-adjustment", NULL))
+-              pdata->thermal_warning_adjustment = 1;
+-      if (of_get_property(np, "st,needs_esd_watchdog", NULL))
+-              pdata->needs_esd_watchdog = 1;
++      pdata->fault_detect_recovery =
++              of_property_read_bool(np, "st,fault-detect-recovery");
++      pdata->thermal_warning_recovery =
++              of_property_read_bool(np, "st,thermal-warning-recovery");
++      pdata->thermal_warning_adjustment =
++              of_property_read_bool(np, "st,thermal-warning-adjustment");
++      pdata->needs_esd_watchdog =
++              of_property_read_bool(np, "st,needs_esd_watchdog");
+       tmp = 140;
+       of_property_read_u16(np, "st,drop-compensation-ns", &tmp);
+       pdata->drop_compensation_ns = clamp_t(u16, tmp, 0, 300) / 20;
+       /* CONFE */
+-      if (of_get_property(np, "st,max-power-use-mpcc", NULL))
+-              pdata->max_power_use_mpcc = 1;
+-
+-      if (of_get_property(np, "st,max-power-correction", NULL))
+-              pdata->max_power_correction = 1;
+-
+-      if (of_get_property(np, "st,am-reduction-mode", NULL))
+-              pdata->am_reduction_mode = 1;
+-
+-      if (of_get_property(np, "st,odd-pwm-speed-mode", NULL))
+-              pdata->odd_pwm_speed_mode = 1;
++      pdata->max_power_use_mpcc =
++              of_property_read_bool(np, "st,max-power-use-mpcc");
++      pdata->max_power_correction =
++              of_property_read_bool(np, "st,max-power-correction");
++      pdata->am_reduction_mode =
++              of_property_read_bool(np, "st,am-reduction-mode");
++      pdata->odd_pwm_speed_mode =
++              of_property_read_bool(np, "st,odd-pwm-speed-mode");
+       /* CONFF */
+-      if (of_get_property(np, "st,invalid-input-detect-mute", NULL))
+-              pdata->invalid_input_detect_mute = 1;
++      pdata->invalid_input_detect_mute =
++              of_property_read_bool(np, "st,invalid-input-detect-mute");
+       sta32x->pdata = pdata;
+diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c
+index 9ed13aeb3cbdc..b033a5fcd6c04 100644
+--- a/sound/soc/codecs/sta350.c
++++ b/sound/soc/codecs/sta350.c
+@@ -1106,12 +1106,12 @@ static int sta350_probe_dt(struct device *dev, struct sta350_priv *sta350)
+       of_property_read_u8(np, "st,ch3-output-mapping",
+                           &pdata->ch3_output_mapping);
+-      if (of_get_property(np, "st,thermal-warning-recovery", NULL))
+-              pdata->thermal_warning_recovery = 1;
+-      if (of_get_property(np, "st,thermal-warning-adjustment", NULL))
+-              pdata->thermal_warning_adjustment = 1;
+-      if (of_get_property(np, "st,fault-detect-recovery", NULL))
+-              pdata->fault_detect_recovery = 1;
++      pdata->thermal_warning_recovery =
++              of_property_read_bool(np, "st,thermal-warning-recovery");
++      pdata->thermal_warning_adjustment =
++              of_property_read_bool(np, "st,thermal-warning-adjustment");
++      pdata->fault_detect_recovery =
++              of_property_read_bool(np, "st,fault-detect-recovery");
+       pdata->ffx_power_output_mode = STA350_FFX_PM_VARIABLE_DROP_COMP;
+       if (!of_property_read_string(np, "st,ffx-power-output-mode",
+@@ -1133,41 +1133,34 @@ static int sta350_probe_dt(struct device *dev, struct sta350_priv *sta350)
+       of_property_read_u16(np, "st,drop-compensation-ns", &tmp);
+       pdata->drop_compensation_ns = clamp_t(u16, tmp, 0, 300) / 20;
+-      if (of_get_property(np, "st,overcurrent-warning-adjustment", NULL))
+-              pdata->oc_warning_adjustment = 1;
++      pdata->oc_warning_adjustment =
++              of_property_read_bool(np, "st,overcurrent-warning-adjustment");
+       /* CONFE */
+-      if (of_get_property(np, "st,max-power-use-mpcc", NULL))
+-              pdata->max_power_use_mpcc = 1;
+-
+-      if (of_get_property(np, "st,max-power-correction", NULL))
+-              pdata->max_power_correction = 1;
+-
+-      if (of_get_property(np, "st,am-reduction-mode", NULL))
+-              pdata->am_reduction_mode = 1;
+-
+-      if (of_get_property(np, "st,odd-pwm-speed-mode", NULL))
+-              pdata->odd_pwm_speed_mode = 1;
+-
+-      if (of_get_property(np, "st,distortion-compensation", NULL))
+-              pdata->distortion_compensation = 1;
++      pdata->max_power_use_mpcc =
++              of_property_read_bool(np, "st,max-power-use-mpcc");
++      pdata->max_power_correction =
++              of_property_read_bool(np, "st,max-power-correction");
++      pdata->am_reduction_mode =
++              of_property_read_bool(np, "st,am-reduction-mode");
++      pdata->odd_pwm_speed_mode =
++              of_property_read_bool(np, "st,odd-pwm-speed-mode");
++      pdata->distortion_compensation =
++              of_property_read_bool(np, "st,distortion-compensation");
+       /* CONFF */
+-      if (of_get_property(np, "st,invalid-input-detect-mute", NULL))
+-              pdata->invalid_input_detect_mute = 1;
++      pdata->invalid_input_detect_mute =
++              of_property_read_bool(np, "st,invalid-input-detect-mute");
+       /* MISC */
+-      if (of_get_property(np, "st,activate-mute-output", NULL))
+-              pdata->activate_mute_output = 1;
+-
+-      if (of_get_property(np, "st,bridge-immediate-off", NULL))
+-              pdata->bridge_immediate_off = 1;
+-
+-      if (of_get_property(np, "st,noise-shape-dc-cut", NULL))
+-              pdata->noise_shape_dc_cut = 1;
+-
+-      if (of_get_property(np, "st,powerdown-master-volume", NULL))
+-              pdata->powerdown_master_vol = 1;
++      pdata->activate_mute_output =
++              of_property_read_bool(np, "st,activate-mute-output");
++      pdata->bridge_immediate_off =
++              of_property_read_bool(np, "st,bridge-immediate-off");
++      pdata->noise_shape_dc_cut =
++              of_property_read_bool(np, "st,noise-shape-dc-cut");
++      pdata->powerdown_master_vol =
++              of_property_read_bool(np, "st,powerdown-master-volume");
+       if (!of_property_read_u8(np, "st,powerdown-delay-divider", &tmp8)) {
+               if (is_power_of_2(tmp8) && tmp8 >= 1 && tmp8 <= 128)
+diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
+index 22143cc5afa70..f9e7122894bd2 100644
+--- a/sound/soc/codecs/tas5086.c
++++ b/sound/soc/codecs/tas5086.c
+@@ -840,7 +840,7 @@ static int tas5086_probe(struct snd_soc_component *component)
+                       snprintf(name, sizeof(name),
+                                "ti,mid-z-channel-%d", i + 1);
+-                      if (of_get_property(of_node, name, NULL) != NULL)
++                      if (of_property_read_bool(of_node, name))
+                               priv->pwm_start_mid_z |= 1 << i;
+               }
+       }
+diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
+index b7552b0df7c3c..2c17d16f842ea 100644
+--- a/sound/soc/fsl/fsl_sai.c
++++ b/sound/soc/fsl/fsl_sai.c
+@@ -1381,18 +1381,18 @@ static int fsl_sai_probe(struct platform_device *pdev)
+       sai->cpu_dai_drv.symmetric_channels = 1;
+       sai->cpu_dai_drv.symmetric_sample_bits = 1;
+-      if (of_find_property(np, "fsl,sai-synchronous-rx", NULL) &&
+-          of_find_property(np, "fsl,sai-asynchronous", NULL)) {
++      if (of_property_read_bool(np, "fsl,sai-synchronous-rx") &&
++          of_property_read_bool(np, "fsl,sai-asynchronous")) {
+               /* error out if both synchronous and asynchronous are present */
+               dev_err(dev, "invalid binding for synchronous mode\n");
+               return -EINVAL;
+       }
+-      if (of_find_property(np, "fsl,sai-synchronous-rx", NULL)) {
++      if (of_property_read_bool(np, "fsl,sai-synchronous-rx")) {
+               /* Sync Rx with Tx */
+               sai->synchronous[RX] = false;
+               sai->synchronous[TX] = true;
+-      } else if (of_find_property(np, "fsl,sai-asynchronous", NULL)) {
++      } else if (of_property_read_bool(np, "fsl,sai-asynchronous")) {
+               /* Discard all settings for asynchronous mode */
+               sai->synchronous[RX] = false;
+               sai->synchronous[TX] = false;
+@@ -1401,7 +1401,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
+               sai->cpu_dai_drv.symmetric_sample_bits = 0;
+       }
+-      if (of_find_property(np, "fsl,sai-mclk-direction-output", NULL) &&
++      if (of_property_read_bool(np, "fsl,sai-mclk-direction-output") &&
+           of_device_is_compatible(np, "fsl,imx6ul-sai")) {
+               gpr = syscon_regmap_lookup_by_compatible("fsl,imx6ul-iomuxc-gpr");
+               if (IS_ERR(gpr)) {
+@@ -1442,7 +1442,7 @@ static int fsl_sai_probe(struct platform_device *pdev)
+               dev_warn(dev, "Error reading SAI version: %d\n", ret);
+       /* Select MCLK direction */
+-      if (of_find_property(np, "fsl,sai-mclk-direction-output", NULL) &&
++      if (of_property_read_bool(np, "fsl,sai-mclk-direction-output") &&
+           sai->soc_data->max_register >= FSL_SAI_MCTL) {
+               regmap_update_bits(sai->regmap, FSL_SAI_MCTL,
+                                  FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN);
+diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
+index 46a53551b955c..6af00b62a60fa 100644
+--- a/sound/soc/fsl/fsl_ssi.c
++++ b/sound/soc/fsl/fsl_ssi.c
+@@ -1447,7 +1447,7 @@ static int fsl_ssi_probe_from_dt(struct fsl_ssi *ssi)
+                       return -EINVAL;
+               }
+               strcpy(ssi->card_name, "ac97-codec");
+-      } else if (!of_find_property(np, "fsl,ssi-asynchronous", NULL)) {
++      } else if (!of_property_read_bool(np, "fsl,ssi-asynchronous")) {
+               /*
+                * In synchronous mode, STCK and STFS ports are used by RX
+                * as well. So the software should limit the sample rates,
+diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
+index 3f128ced41809..64a4d7e9db603 100644
+--- a/sound/soc/fsl/imx-card.c
++++ b/sound/soc/fsl/imx-card.c
+@@ -563,7 +563,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
+                       link_data->cpu_sysclk_id = FSL_SAI_CLK_MAST1;
+                       /* sai may support mclk/bclk = 1 */
+-                      if (of_find_property(np, "fsl,mclk-equal-bclk", NULL)) {
++                      if (of_property_read_bool(np, "fsl,mclk-equal-bclk")) {
+                               link_data->one2one_ratio = true;
+                       } else {
+                               int i;
+diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
+index 7ade6c5ed96ff..cb7fff48959a2 100644
+--- a/sound/soc/sh/rcar/ssi.c
++++ b/sound/soc/sh/rcar/ssi.c
+@@ -1208,10 +1208,10 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
+                       goto rsnd_ssi_probe_done;
+               }
+-              if (of_get_property(np, "shared-pin", NULL))
++              if (of_property_read_bool(np, "shared-pin"))
+                       rsnd_flags_set(ssi, RSND_SSI_CLK_PIN_SHARE);
+-              if (of_get_property(np, "no-busif", NULL))
++              if (of_property_read_bool(np, "no-busif"))
+                       rsnd_flags_set(ssi, RSND_SSI_NO_BUSIF);
+               ssi->irq = irq_of_parse_and_map(np, 0);
+-- 
+2.40.1
+
diff --git a/queue-6.1/irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch b/queue-6.1/irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch
new file mode 100644 (file)
index 0000000..089ce45
--- /dev/null
@@ -0,0 +1,43 @@
+From d0dae254540d28c0430682f4130f9df1eafc83bc Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 18 Sep 2023 13:24:09 +0100
+Subject: irqchip: renesas-rzg2l: Fix logic to clear TINT interrupt source
+
+From: Biju Das <biju.das.jz@bp.renesas.com>
+
+[ Upstream commit 9b8df572ba3f4e544366196820a719a40774433e ]
+
+The logic to clear the TINT interrupt source in rzg2l_irqc_irq_disable()
+is wrong as the mask is correct only for LSB on the TSSR register.
+This issue is found when testing with two TINT interrupt sources. So fix
+the logic for all TINTs by using the macro TSSEL_SHIFT() to multiply
+tssr_offset with 8.
+
+Fixes: 3fed09559cd8 ("irqchip: Add RZ/G2L IA55 Interrupt Controller driver")
+Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
+Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
+Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
+Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
+Signed-off-by: Marc Zyngier <maz@kernel.org>
+Link: https://lore.kernel.org/r/20230918122411.237635-2-biju.das.jz@bp.renesas.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/irqchip/irq-renesas-rzg2l.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/irqchip/irq-renesas-rzg2l.c b/drivers/irqchip/irq-renesas-rzg2l.c
+index 25fd8ee66565b..10c3e85c90c23 100644
+--- a/drivers/irqchip/irq-renesas-rzg2l.c
++++ b/drivers/irqchip/irq-renesas-rzg2l.c
+@@ -118,7 +118,7 @@ static void rzg2l_irqc_irq_disable(struct irq_data *d)
+               raw_spin_lock(&priv->lock);
+               reg = readl_relaxed(priv->base + TSSR(tssr_index));
+-              reg &= ~(TSSEL_MASK << tssr_offset);
++              reg &= ~(TSSEL_MASK << TSSEL_SHIFT(tssr_offset));
+               writel_relaxed(reg, priv->base + TSSR(tssr_index));
+               raw_spin_unlock(&priv->lock);
+       }
+-- 
+2.40.1
+
index c5362001f2f1d310af4e9a73939930e3e47ffc05..a7885bdb792fdafa1d26a172520f07eaf135e71e 100644 (file)
@@ -28,3 +28,11 @@ asoc-simple-card-utils-fixup-simple_util_startup-error-handling.patch
 asoc-intel-soc-acpi-add-entry-for-hdmi_in-capture-support-in-mtl-match-table.patch
 asoc-intel-sof_sdw-add-support-for-sku-0b14.patch
 asoc-intel-soc-acpi-add-entry-for-sof_es8336-in-mtl-match-table.patch
+arm64-dts-qcom-sm8150-extend-the-size-of-the-pdc-res.patch
+asoc-simple-card-utils-fixup-simple_util_startup-err.patch
+irqchip-renesas-rzg2l-fix-logic-to-clear-tint-interr.patch
+asoc-use-of_property_read_bool-for-boolean-propertie.patch
+asoc-fsl_sai-mclk-bind-with-tx-rx-enable-bit.patch
+asoc-fsl_sai-don-t-disable-bitclock-for-i.mx8mp.patch
+asoc-sof-amd-fix-for-firmware-reload-failure-after-p.patch
+alsa-hda-realtek-change-model-for-intel-rvp-board.patch-13328