* [PATCH 0/2] SM6115 TX Macro
@ 2023-08-25 17:23 Konrad Dybcio
2023-08-25 17:23 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115 Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Konrad Dybcio @ 2023-08-25 17:23 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Andy Gross, Bjorn Andersson,
Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Jaroslav Kysela, Takashi Iwai
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel, Konrad Dybcio
Like most Qualcomm SoCs, SM6115 has a TX Macro.
Only some minor changes were required.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Konrad Dybcio (2):
ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115
ASoC: codecs: lpass-tx-macro: Add SM6115 support
.../bindings/sound/qcom,lpass-tx-macro.yaml | 18 ++++++++++++++++++
sound/soc/codecs/lpass-macro-common.h | 2 ++
sound/soc/codecs/lpass-tx-macro.c | 22 +++++++++++++++-------
3 files changed, 35 insertions(+), 7 deletions(-)
---
base-commit: 6269320850097903b30be8f07a5c61d9f7592393
change-id: 20230825-topic-6115tx-b523a0209639
Best regards,
--
Konrad Dybcio <konrad.dybcio@linaro.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115
2023-08-25 17:23 [PATCH 0/2] SM6115 TX Macro Konrad Dybcio
@ 2023-08-25 17:23 ` Konrad Dybcio
2023-08-26 9:32 ` Krzysztof Kozlowski
2023-08-25 17:23 ` [PATCH 2/2] ASoC: codecs: lpass-tx-macro: Add SM6115 support Konrad Dybcio
2023-09-12 18:52 ` [PATCH 0/2] SM6115 TX Macro Mark Brown
2 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2023-08-25 17:23 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Andy Gross, Bjorn Andersson,
Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Jaroslav Kysela, Takashi Iwai
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel, Konrad Dybcio
SM6115 has a TX Macro, requiring an NPL clock, but not DCODEC.
Document it.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
.../devicetree/bindings/sound/qcom,lpass-tx-macro.yaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
index 4156981fe02b..962701e9eb42 100644
--- a/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,lpass-tx-macro.yaml
@@ -13,6 +13,7 @@ properties:
compatible:
enum:
- qcom,sc7280-lpass-tx-macro
+ - qcom,sm6115-lpass-tx-macro
- qcom,sm8250-lpass-tx-macro
- qcom,sm8450-lpass-tx-macro
- qcom,sm8550-lpass-tx-macro
@@ -97,6 +98,23 @@ allOf:
- const: dcodec
- const: fsgen
+ - if:
+ properties:
+ compatible:
+ enum:
+ - qcom,sm6115-lpass-tx-macro
+ then:
+ properties:
+ clocks:
+ minItems: 4
+ maxItems: 4
+ clock-names:
+ items:
+ - const: mclk
+ - const: npl
+ - const: dcodec
+ - const: fsgen
+
- if:
properties:
compatible:
--
2.42.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] ASoC: codecs: lpass-tx-macro: Add SM6115 support
2023-08-25 17:23 [PATCH 0/2] SM6115 TX Macro Konrad Dybcio
2023-08-25 17:23 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115 Konrad Dybcio
@ 2023-08-25 17:23 ` Konrad Dybcio
2023-08-26 9:31 ` Krzysztof Kozlowski
2023-09-12 18:52 ` [PATCH 0/2] SM6115 TX Macro Mark Brown
2 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2023-08-25 17:23 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Andy Gross, Bjorn Andersson,
Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Jaroslav Kysela, Takashi Iwai
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel, Konrad Dybcio
SM6115 has a TX macro, which surprisingly doesn't host a SWR master.
Conditionally skip the SWR reset sequence on this platform.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
sound/soc/codecs/lpass-macro-common.h | 2 ++
sound/soc/codecs/lpass-tx-macro.c | 22 +++++++++++++++-------
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/lpass-macro-common.h b/sound/soc/codecs/lpass-macro-common.h
index 4eb886565ea3..d3684c7ab930 100644
--- a/sound/soc/codecs/lpass-macro-common.h
+++ b/sound/soc/codecs/lpass-macro-common.h
@@ -8,6 +8,8 @@
/* NPL clock is expected */
#define LPASS_MACRO_FLAG_HAS_NPL_CLOCK BIT(0)
+/* The soundwire block should be internally reset at probe */
+#define LPASS_MACRO_FLAG_RESET_SWR BIT(1)
struct lpass_macro {
struct device *macro_pd;
diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
index 3e33418898e8..82f9873ffada 100644
--- a/sound/soc/codecs/lpass-tx-macro.c
+++ b/sound/soc/codecs/lpass-tx-macro.c
@@ -2045,15 +2045,19 @@ static int tx_macro_probe(struct platform_device *pdev)
if (ret)
goto err_fsgen;
+
/* reset soundwire block */
- regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
- CDC_TX_SWR_RESET_MASK, CDC_TX_SWR_RESET_ENABLE);
+ if (flags & LPASS_MACRO_FLAG_RESET_SWR)
+ regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
+ CDC_TX_SWR_RESET_MASK, CDC_TX_SWR_RESET_ENABLE);
regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
CDC_TX_SWR_CLK_EN_MASK,
CDC_TX_SWR_CLK_ENABLE);
- regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
- CDC_TX_SWR_RESET_MASK, 0x0);
+
+ if (flags & LPASS_MACRO_FLAG_RESET_SWR)
+ regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
+ CDC_TX_SWR_RESET_MASK, 0x0);
ret = devm_snd_soc_register_component(dev, &tx_macro_component_drv,
tx_macro_dai,
@@ -2158,18 +2162,22 @@ static const struct dev_pm_ops tx_macro_pm_ops = {
static const struct of_device_id tx_macro_dt_match[] = {
{
.compatible = "qcom,sc7280-lpass-tx-macro",
+ .data = (void *)(LPASS_MACRO_FLAG_HAS_NPL_CLOCK | LPASS_MACRO_FLAG_RESET_SWR),
+ }, {
+ .compatible = "qcom,sm6115-lpass-tx-macro",
.data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK,
}, {
.compatible = "qcom,sm8250-lpass-tx-macro",
- .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK,
+ .data = (void *)(LPASS_MACRO_FLAG_HAS_NPL_CLOCK | LPASS_MACRO_FLAG_RESET_SWR),
}, {
.compatible = "qcom,sm8450-lpass-tx-macro",
- .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK,
+ .data = (void *)(LPASS_MACRO_FLAG_HAS_NPL_CLOCK | LPASS_MACRO_FLAG_RESET_SWR),
}, {
.compatible = "qcom,sm8550-lpass-tx-macro",
+ .data = (void *)LPASS_MACRO_FLAG_RESET_SWR,
}, {
.compatible = "qcom,sc8280xp-lpass-tx-macro",
- .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK,
+ .data = (void *)(LPASS_MACRO_FLAG_HAS_NPL_CLOCK | LPASS_MACRO_FLAG_RESET_SWR),
},
{ }
};
--
2.42.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ASoC: codecs: lpass-tx-macro: Add SM6115 support
2023-08-25 17:23 ` [PATCH 2/2] ASoC: codecs: lpass-tx-macro: Add SM6115 support Konrad Dybcio
@ 2023-08-26 9:31 ` Krzysztof Kozlowski
0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-26 9:31 UTC (permalink / raw)
To: Konrad Dybcio, Srinivas Kandagatla, Banajit Goswami, Andy Gross,
Bjorn Andersson, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel
On 25/08/2023 19:23, Konrad Dybcio wrote:
> SM6115 has a TX macro, which surprisingly doesn't host a SWR master.
> Conditionally skip the SWR reset sequence on this platform.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> sound/soc/codecs/lpass-macro-common.h | 2 ++
> sound/soc/codecs/lpass-tx-macro.c | 22 +++++++++++++++-------
> 2 files changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/sound/soc/codecs/lpass-macro-common.h b/sound/soc/codecs/lpass-macro-common.h
> index 4eb886565ea3..d3684c7ab930 100644
> --- a/sound/soc/codecs/lpass-macro-common.h
> +++ b/sound/soc/codecs/lpass-macro-common.h
> @@ -8,6 +8,8 @@
>
> /* NPL clock is expected */
> #define LPASS_MACRO_FLAG_HAS_NPL_CLOCK BIT(0)
> +/* The soundwire block should be internally reset at probe */
> +#define LPASS_MACRO_FLAG_RESET_SWR BIT(1)
>
> struct lpass_macro {
> struct device *macro_pd;
> diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c
> index 3e33418898e8..82f9873ffada 100644
> --- a/sound/soc/codecs/lpass-tx-macro.c
> +++ b/sound/soc/codecs/lpass-tx-macro.c
> @@ -2045,15 +2045,19 @@ static int tx_macro_probe(struct platform_device *pdev)
> if (ret)
> goto err_fsgen;
>
> +
Stray link line.
Rest looks good:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115
2023-08-25 17:23 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115 Konrad Dybcio
@ 2023-08-26 9:32 ` Krzysztof Kozlowski
2023-08-26 9:37 ` Konrad Dybcio
0 siblings, 1 reply; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-26 9:32 UTC (permalink / raw)
To: Konrad Dybcio, Srinivas Kandagatla, Banajit Goswami, Andy Gross,
Bjorn Andersson, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel
On 25/08/2023 19:23, Konrad Dybcio wrote:
> SM6115 has a TX Macro, requiring an NPL clock, but not DCODEC.
> Document it.
>
...
>
> + - if:
> + properties:
> + compatible:
> + enum:
> + - qcom,sm6115-lpass-tx-macro
> + then:
> + properties:
> + clocks:
> + minItems: 4
> + maxItems: 4
> + clock-names:
> + items:
> + - const: mclk
> + - const: npl
> + - const: dcodec
> + - const: fsgen
Are you sure there is no macro? This means there will be no
LPASS_HW_MACRO_VOTE vote. Do you have downstream sources somewhere?
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115
2023-08-26 9:32 ` Krzysztof Kozlowski
@ 2023-08-26 9:37 ` Konrad Dybcio
2023-08-26 9:46 ` Krzysztof Kozlowski
0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2023-08-26 9:37 UTC (permalink / raw)
To: Krzysztof Kozlowski, Srinivas Kandagatla, Banajit Goswami,
Andy Gross, Bjorn Andersson, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel
On 26.08.2023 11:32, Krzysztof Kozlowski wrote:
> On 25/08/2023 19:23, Konrad Dybcio wrote:
>> SM6115 has a TX Macro, requiring an NPL clock, but not DCODEC.
>> Document it.
>>
>
> ...
>
>>
>> + - if:
>> + properties:
>> + compatible:
>> + enum:
>> + - qcom,sm6115-lpass-tx-macro
>> + then:
>> + properties:
>> + clocks:
>> + minItems: 4
>> + maxItems: 4
>> + clock-names:
>> + items:
>> + - const: mclk
>> + - const: npl
>> + - const: dcodec
>> + - const: fsgen
>
> Are you sure there is no macro? This means there will be no
> LPASS_HW_MACRO_VOTE vote.
Yes.
Do you have downstream sources somewhere?
Also yes, but they're not public..
Konrad
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115
2023-08-26 9:37 ` Konrad Dybcio
@ 2023-08-26 9:46 ` Krzysztof Kozlowski
0 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-26 9:46 UTC (permalink / raw)
To: Konrad Dybcio, Srinivas Kandagatla, Banajit Goswami, Andy Gross,
Bjorn Andersson, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel
On 26/08/2023 11:37, Konrad Dybcio wrote:
> On 26.08.2023 11:32, Krzysztof Kozlowski wrote:
>> On 25/08/2023 19:23, Konrad Dybcio wrote:
>>> SM6115 has a TX Macro, requiring an NPL clock, but not DCODEC.
>>> Document it.
>>>
>>
>> ...
>>
>>>
>>> + - if:
>>> + properties:
>>> + compatible:
>>> + enum:
>>> + - qcom,sm6115-lpass-tx-macro
>>> + then:
>>> + properties:
>>> + clocks:
>>> + minItems: 4
>>> + maxItems: 4
>>> + clock-names:
>>> + items:
>>> + - const: mclk
>>> + - const: npl
>>> + - const: dcodec
>>> + - const: fsgen
>>
>> Are you sure there is no macro? This means there will be no
>> LPASS_HW_MACRO_VOTE vote.
> Yes.
>
> Do you have downstream sources somewhere?
> Also yes, but they're not public..
Indeed. Looks correct:
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/2] SM6115 TX Macro
2023-08-25 17:23 [PATCH 0/2] SM6115 TX Macro Konrad Dybcio
2023-08-25 17:23 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115 Konrad Dybcio
2023-08-25 17:23 ` [PATCH 2/2] ASoC: codecs: lpass-tx-macro: Add SM6115 support Konrad Dybcio
@ 2023-09-12 18:52 ` Mark Brown
2 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2023-09-12 18:52 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Andy Gross, Bjorn Andersson,
Liam Girdwood, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jaroslav Kysela, Takashi Iwai, Konrad Dybcio
Cc: Marijn Suijten, alsa-devel, linux-arm-msm, devicetree,
linux-kernel
On Fri, 25 Aug 2023 19:23:11 +0200, Konrad Dybcio wrote:
> Like most Qualcomm SoCs, SM6115 has a TX Macro.
>
> Only some minor changes were required.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115
commit: 9ff143aaabba989f275612de0d83cf9d39274828
[2/2] ASoC: codecs: lpass-tx-macro: Add SM6115 support
commit: 510c46884299cf8da8e9d7db27572eafa9a0c567
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-09-12 18:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 17:23 [PATCH 0/2] SM6115 TX Macro Konrad Dybcio
2023-08-25 17:23 ` [PATCH 1/2] ASoC: dt-bindings: qcom,lpass-tx-macro: Add SM6115 Konrad Dybcio
2023-08-26 9:32 ` Krzysztof Kozlowski
2023-08-26 9:37 ` Konrad Dybcio
2023-08-26 9:46 ` Krzysztof Kozlowski
2023-08-25 17:23 ` [PATCH 2/2] ASoC: codecs: lpass-tx-macro: Add SM6115 support Konrad Dybcio
2023-08-26 9:31 ` Krzysztof Kozlowski
2023-09-12 18:52 ` [PATCH 0/2] SM6115 TX Macro Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).