diff options
author | Sugar Zhang <sugar.zhang@rock-chips.com> | 2016-03-04 05:31:54 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-03-04 22:59:06 -0500 |
commit | ab8773943ab3126d39eb41531c8e06aea2107aa1 (patch) | |
tree | c9c0e9dadfc58c3f47df3385ab8b57aabe9c0617 | |
parent | d8fc2198aab117a4bc16ee305caef19c4c7e7f5c (diff) |
ASoC: rockchip: add bindings for spdif controller
this patch add compatible for rk3366/rk3368/rk3399 spdif,
these three spdifs share the same type.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 8 | ||||
-rw-r--r-- | sound/soc/rockchip/rockchip_spdif.c | 13 |
2 files changed, 16 insertions, 5 deletions
diff --git a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt index e64dbdea7db9..11046429a118 100644 --- a/Documentation/devicetree/bindings/sound/rockchip-spdif.txt +++ b/Documentation/devicetree/bindings/sound/rockchip-spdif.txt | |||
@@ -7,8 +7,12 @@ a fibre cable. | |||
7 | Required properties: | 7 | Required properties: |
8 | 8 | ||
9 | - compatible: should be one of the following: | 9 | - compatible: should be one of the following: |
10 | - "rockchip,rk3288-spdif", "rockchip,rk3188-spdif" or | 10 | - "rockchip,rk3066-spdif" |
11 | "rockchip,rk3066-spdif" | 11 | - "rockchip,rk3188-spdif" |
12 | - "rockchip,rk3288-spdif" | ||
13 | - "rockchip,rk3366-spdif" | ||
14 | - "rockchip,rk3368-spdif" | ||
15 | - "rockchip,rk3399-spdif" | ||
12 | - reg: physical base address of the controller and length of memory mapped | 16 | - reg: physical base address of the controller and length of memory mapped |
13 | region. | 17 | region. |
14 | - interrupts: should contain the SPDIF interrupt. | 18 | - interrupts: should contain the SPDIF interrupt. |
diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c index 274599d4caeb..100781e37848 100644 --- a/sound/soc/rockchip/rockchip_spdif.c +++ b/sound/soc/rockchip/rockchip_spdif.c | |||
@@ -28,6 +28,7 @@ enum rk_spdif_type { | |||
28 | RK_SPDIF_RK3066, | 28 | RK_SPDIF_RK3066, |
29 | RK_SPDIF_RK3188, | 29 | RK_SPDIF_RK3188, |
30 | RK_SPDIF_RK3288, | 30 | RK_SPDIF_RK3288, |
31 | RK_SPDIF_RK3366, | ||
31 | }; | 32 | }; |
32 | 33 | ||
33 | #define RK3288_GRF_SOC_CON2 0x24c | 34 | #define RK3288_GRF_SOC_CON2 0x24c |
@@ -45,11 +46,17 @@ struct rk_spdif_dev { | |||
45 | 46 | ||
46 | static const struct of_device_id rk_spdif_match[] = { | 47 | static const struct of_device_id rk_spdif_match[] = { |
47 | { .compatible = "rockchip,rk3066-spdif", | 48 | { .compatible = "rockchip,rk3066-spdif", |
48 | .data = (void *) RK_SPDIF_RK3066 }, | 49 | .data = (void *)RK_SPDIF_RK3066 }, |
49 | { .compatible = "rockchip,rk3188-spdif", | 50 | { .compatible = "rockchip,rk3188-spdif", |
50 | .data = (void *) RK_SPDIF_RK3188 }, | 51 | .data = (void *)RK_SPDIF_RK3188 }, |
51 | { .compatible = "rockchip,rk3288-spdif", | 52 | { .compatible = "rockchip,rk3288-spdif", |
52 | .data = (void *) RK_SPDIF_RK3288 }, | 53 | .data = (void *)RK_SPDIF_RK3288 }, |
54 | { .compatible = "rockchip,rk3366-spdif", | ||
55 | .data = (void *)RK_SPDIF_RK3366 }, | ||
56 | { .compatible = "rockchip,rk3368-spdif", | ||
57 | .data = (void *)RK_SPDIF_RK3366 }, | ||
58 | { .compatible = "rockchip,rk3399-spdif", | ||
59 | .data = (void *)RK_SPDIF_RK3366 }, | ||
53 | {}, | 60 | {}, |
54 | }; | 61 | }; |
55 | MODULE_DEVICE_TABLE(of, rk_spdif_match); | 62 | MODULE_DEVICE_TABLE(of, rk_spdif_match); |