SM6115 TX Macro
Merge series from Konrad Dybcio <konrad.dybcio@linaro.org>: Like most Qualcomm SoCs, SM6115 has a TX Macro. Only some minor changes were required.
This commit is contained in:
commit
2b3357dc41
@ -13,6 +13,7 @@ properties:
|
|||||||
compatible:
|
compatible:
|
||||||
enum:
|
enum:
|
||||||
- qcom,sc7280-lpass-tx-macro
|
- qcom,sc7280-lpass-tx-macro
|
||||||
|
- qcom,sm6115-lpass-tx-macro
|
||||||
- qcom,sm8250-lpass-tx-macro
|
- qcom,sm8250-lpass-tx-macro
|
||||||
- qcom,sm8450-lpass-tx-macro
|
- qcom,sm8450-lpass-tx-macro
|
||||||
- qcom,sm8550-lpass-tx-macro
|
- qcom,sm8550-lpass-tx-macro
|
||||||
@ -97,6 +98,23 @@ allOf:
|
|||||||
- const: dcodec
|
- const: dcodec
|
||||||
- const: fsgen
|
- 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:
|
- if:
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
/* NPL clock is expected */
|
/* NPL clock is expected */
|
||||||
#define LPASS_MACRO_FLAG_HAS_NPL_CLOCK BIT(0)
|
#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 lpass_macro {
|
||||||
struct device *macro_pd;
|
struct device *macro_pd;
|
||||||
|
@ -2045,15 +2045,19 @@ static int tx_macro_probe(struct platform_device *pdev)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_fsgen;
|
goto err_fsgen;
|
||||||
|
|
||||||
|
|
||||||
/* reset soundwire block */
|
/* reset soundwire block */
|
||||||
regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
if (flags & LPASS_MACRO_FLAG_RESET_SWR)
|
||||||
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_RESET_MASK, CDC_TX_SWR_RESET_ENABLE);
|
||||||
|
|
||||||
regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
regmap_update_bits(tx->regmap, CDC_TX_CLK_RST_CTRL_SWR_CONTROL,
|
||||||
CDC_TX_SWR_CLK_EN_MASK,
|
CDC_TX_SWR_CLK_EN_MASK,
|
||||||
CDC_TX_SWR_CLK_ENABLE);
|
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,
|
ret = devm_snd_soc_register_component(dev, &tx_macro_component_drv,
|
||||||
tx_macro_dai,
|
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[] = {
|
static const struct of_device_id tx_macro_dt_match[] = {
|
||||||
{
|
{
|
||||||
.compatible = "qcom,sc7280-lpass-tx-macro",
|
.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,
|
.data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK,
|
||||||
}, {
|
}, {
|
||||||
.compatible = "qcom,sm8250-lpass-tx-macro",
|
.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",
|
.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",
|
.compatible = "qcom,sm8550-lpass-tx-macro",
|
||||||
|
.data = (void *)LPASS_MACRO_FLAG_RESET_SWR,
|
||||||
}, {
|
}, {
|
||||||
.compatible = "qcom,sc8280xp-lpass-tx-macro",
|
.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),
|
||||||
},
|
},
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user