Unverified Commit 5b887b4d authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: codecs: qcom add support for SM8450 and SC8280XP

Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

This patchset adds support for SM8450 and SC8280XP SoC and also some of
the fixes requried to get stable audio on X13s.

Tested SmartSpeakers and Headset on SM8450 MTP and
Lenovo Thinkpad X13s.
parents 179f69fa 0f47dd21
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ properties:
    enum:
      - qcom,sc7280-lpass-rx-macro
      - qcom,sm8250-lpass-rx-macro
      - qcom,sm8450-lpass-rx-macro
      - qcom,sc8280xp-lpass-rx-macro

  reg:
    maxItems: 1
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ properties:
    enum:
      - qcom,sc7280-lpass-tx-macro
      - qcom,sm8250-lpass-tx-macro
      - qcom,sm8450-lpass-tx-macro
      - qcom,sc8280xp-lpass-tx-macro

  reg:
    maxItems: 1
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ properties:
    enum:
      - qcom,sc7280-lpass-va-macro
      - qcom,sm8250-lpass-va-macro
      - qcom,sm8450-lpass-va-macro
      - qcom,sc8280xp-lpass-va-macro

  reg:
    maxItems: 1
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ properties:
    enum:
      - qcom,sc7280-lpass-wsa-macro
      - qcom,sm8250-lpass-wsa-macro
      - qcom,sm8450-lpass-wsa-macro
      - qcom,sc8280xp-lpass-wsa-macro

  reg:
    maxItems: 1
+7 −11
Original line number Diff line number Diff line
@@ -596,7 +596,6 @@ struct rx_macro {
	int rx_port_value[RX_MACRO_PORTS_MAX];
	u16 prim_int_users[INTERP_MAX];
	int rx_mclk_users;
	bool reset_swr;
	int clsh_users;
	int rx_mclk_cnt;
	bool is_ear_mode_on;
@@ -3442,7 +3441,6 @@ static int swclk_gate_enable(struct clk_hw *hw)
	}

	rx_macro_mclk_enable(rx, true);
	if (rx->reset_swr)
	regmap_update_bits(rx->regmap, CDC_RX_CLK_RST_CTRL_SWR_CONTROL,
			   CDC_RX_SWR_RESET_MASK,
			   CDC_RX_SWR_RESET);
@@ -3450,10 +3448,8 @@ static int swclk_gate_enable(struct clk_hw *hw)
	regmap_update_bits(rx->regmap, CDC_RX_CLK_RST_CTRL_SWR_CONTROL,
			   CDC_RX_SWR_CLK_EN_MASK, 1);

	if (rx->reset_swr)
	regmap_update_bits(rx->regmap, CDC_RX_CLK_RST_CTRL_SWR_CONTROL,
			   CDC_RX_SWR_RESET_MASK, 0);
	rx->reset_swr = false;

	return 0;
}
@@ -3579,7 +3575,6 @@ static int rx_macro_probe(struct platform_device *pdev)

	dev_set_drvdata(dev, rx);

	rx->reset_swr = true;
	rx->dev = dev;

	/* set MCLK and NPL rates */
@@ -3659,6 +3654,8 @@ static int rx_macro_remove(struct platform_device *pdev)
static const struct of_device_id rx_macro_dt_match[] = {
	{ .compatible = "qcom,sc7280-lpass-rx-macro" },
	{ .compatible = "qcom,sm8250-lpass-rx-macro" },
	{ .compatible = "qcom,sm8450-lpass-rx-macro" },
	{ .compatible = "qcom,sc8280xp-lpass-rx-macro" },
	{ }
};
MODULE_DEVICE_TABLE(of, rx_macro_dt_match);
@@ -3701,7 +3698,6 @@ static int __maybe_unused rx_macro_runtime_resume(struct device *dev)
	}
	regcache_cache_only(rx->regmap, false);
	regcache_sync(rx->regmap);
	rx->reset_swr = true;

	return 0;
err_fsgen:
Loading