Skip to content

Commit

Permalink
ASoC: rockchip: add bindings for spdif controller
Browse files Browse the repository at this point in the history
this patch add compatible for rk3366/rk3368/rk3399 spdif,
these three spdifs share the same type.

Signed-off-by: Sugar Zhang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Sugar Zhang authored and broonie committed Mar 5, 2016
1 parent d8fc219 commit ab87739
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Documentation/devicetree/bindings/sound/rockchip-spdif.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ a fibre cable.
Required properties:

- compatible: should be one of the following:
- "rockchip,rk3288-spdif", "rockchip,rk3188-spdif" or
"rockchip,rk3066-spdif"
- "rockchip,rk3066-spdif"
- "rockchip,rk3188-spdif"
- "rockchip,rk3288-spdif"
- "rockchip,rk3366-spdif"
- "rockchip,rk3368-spdif"
- "rockchip,rk3399-spdif"
- reg: physical base address of the controller and length of memory mapped
region.
- interrupts: should contain the SPDIF interrupt.
Expand Down
13 changes: 10 additions & 3 deletions sound/soc/rockchip/rockchip_spdif.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ enum rk_spdif_type {
RK_SPDIF_RK3066,
RK_SPDIF_RK3188,
RK_SPDIF_RK3288,
RK_SPDIF_RK3366,
};

#define RK3288_GRF_SOC_CON2 0x24c
Expand All @@ -45,11 +46,17 @@ struct rk_spdif_dev {

static const struct of_device_id rk_spdif_match[] = {
{ .compatible = "rockchip,rk3066-spdif",
.data = (void *) RK_SPDIF_RK3066 },
.data = (void *)RK_SPDIF_RK3066 },
{ .compatible = "rockchip,rk3188-spdif",
.data = (void *) RK_SPDIF_RK3188 },
.data = (void *)RK_SPDIF_RK3188 },
{ .compatible = "rockchip,rk3288-spdif",
.data = (void *) RK_SPDIF_RK3288 },
.data = (void *)RK_SPDIF_RK3288 },
{ .compatible = "rockchip,rk3366-spdif",
.data = (void *)RK_SPDIF_RK3366 },
{ .compatible = "rockchip,rk3368-spdif",
.data = (void *)RK_SPDIF_RK3366 },
{ .compatible = "rockchip,rk3399-spdif",
.data = (void *)RK_SPDIF_RK3366 },
{},
};
MODULE_DEVICE_TABLE(of, rk_spdif_match);
Expand Down

0 comments on commit ab87739

Please sign in to comment.