mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
i2s : add config for i2s output Voltage(3.3v/1.8v)
This commit is contained in:
@@ -14,7 +14,7 @@ config SND_RK29_SOC_I2S_8CH
|
||||
default y
|
||||
depends on SND_RK29_SOC_I2S && !ARCH_RK3066B && !ARCH_RK3188
|
||||
help
|
||||
This supports the use of the 8 Channel I2S interface on rk29 processors.
|
||||
This supports the use of the 8 Channel I2S interface on rk29 processors.
|
||||
|
||||
if SND_RK29_SOC_I2S_8CH
|
||||
choice
|
||||
@@ -33,7 +33,19 @@ config SND_RK29_SOC_I2S_2CH
|
||||
depends on SND_RK29_SOC_I2S && !ARCH_RK2928
|
||||
default y if (ARCH_RK3066B || ARCH_RK3188)
|
||||
help
|
||||
This supports the use of the 2 Channel I2S interface on rk29 processors.
|
||||
This supports the use of the 2 Channel I2S interface on rk29 processors.
|
||||
|
||||
if (ARCH_RK3066B || ARCH_RK3188) && SND_RK29_SOC_I2S_2CH
|
||||
choice
|
||||
bool "Set I2S GRF Output Voltage"
|
||||
default SND_I2S_USE_33V
|
||||
config SND_I2S_USE_33V
|
||||
tristate "I2S use 3.3V"
|
||||
|
||||
config SND_I2S_USE_18V
|
||||
tristate "I2S use 1.8V"
|
||||
endchoice
|
||||
endif
|
||||
|
||||
config SND_RK_SOC_I2S2_2CH
|
||||
bool "Soc RK29 I2S 2 Channel support(I2S2)"
|
||||
|
||||
@@ -557,9 +557,18 @@ static int __devinit rockchip_i2s_probe(struct platform_device *pdev)
|
||||
struct rk29_i2s_info *i2s;
|
||||
struct snd_soc_dai_driver *dai;
|
||||
int ret;
|
||||
int v;
|
||||
|
||||
#if defined(CONFIG_SND_I2S_USE_18V)
|
||||
v = 0x2000200;//bit9: 1,1.8v;0,3.3v
|
||||
writel_relaxed(v,RK30_GRF_BASE + GRF_IO_CON4);
|
||||
#elif defined(CONFIG_SND_I2S_USE_33V)
|
||||
v = 0x2000000;
|
||||
writel_relaxed(v,RK30_GRF_BASE + GRF_IO_CON4);
|
||||
#endif
|
||||
|
||||
I2S_DBG("Enter %s, %d pdev->id = %d >>>>>>>>>>>\n", __func__, __LINE__, pdev->id);
|
||||
|
||||
|
||||
if(pdev->id >= MAX_I2S) {
|
||||
dev_err(&pdev->dev, "id %d out of range\n", pdev->id);
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user