d1: add new target
[openwrt/staging/mans0n.git] / target / linux / d1 / patches-6.1 / 0071-ASoC-sun4i-spdif-Add-support-for-the-D1-variant.patch
1 From af01261bf4e334cad158519291e5bc38765c955f Mon Sep 17 00:00:00 2001
2 From: Samuel Holland <samuel@sholland.org>
3 Date: Sun, 13 Jun 2021 23:53:26 -0500
4 Subject: [PATCH 071/117] ASoC: sun4i-spdif: Add support for the D1 variant
5
6 The D1 variant is similar to the H6 variant, except for its clock setup.
7 The clock tree changes impact some register fields on the RX side, but
8 those are not yet relevant, because RX is not supported by this driver.
9
10 Signed-off-by: Samuel Holland <samuel@sholland.org>
11 ---
12 sound/soc/sunxi/sun4i-spdif.c | 10 ++++++++++
13 1 file changed, 10 insertions(+)
14
15 --- a/sound/soc/sunxi/sun4i-spdif.c
16 +++ b/sound/soc/sunxi/sun4i-spdif.c
17 @@ -556,6 +556,12 @@ static const struct sun4i_spdif_quirks s
18 .val_fctl_ftx = SUN4I_SPDIF_FCTL_FTX,
19 };
20
21 +static const struct sun4i_spdif_quirks sun20i_d1_spdif_quirks = {
22 + .tx_clk_name = "tx",
23 + .reg_dac_txdata = SUN8I_SPDIF_TXFIFO,
24 + .val_fctl_ftx = SUN50I_H6_SPDIF_FCTL_FTX,
25 +};
26 +
27 static const struct sun4i_spdif_quirks sun50i_h6_spdif_quirks = {
28 .tx_clk_name = "spdif",
29 .reg_dac_txdata = SUN8I_SPDIF_TXFIFO,
30 @@ -576,6 +582,10 @@ static const struct of_device_id sun4i_s
31 .data = &sun8i_h3_spdif_quirks,
32 },
33 {
34 + .compatible = "allwinner,sun20i-d1-spdif",
35 + .data = &sun20i_d1_spdif_quirks,
36 + },
37 + {
38 .compatible = "allwinner,sun50i-h6-spdif",
39 .data = &sun50i_h6_spdif_quirks,
40 },