diff options
| -rw-r--r-- | sound/soc/codecs/rt5663.c | 11 | ||||
| -rw-r--r-- | sound/soc/codecs/rt5663.h | 10 |
2 files changed, 20 insertions, 1 deletions
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c index 01a18d88f1eb..f30e0b461602 100644 --- a/sound/soc/codecs/rt5663.c +++ b/sound/soc/codecs/rt5663.c | |||
| @@ -3140,12 +3140,21 @@ static int rt5663_i2c_probe(struct i2c_client *i2c, | |||
| 3140 | RT5668_LDO1_DVO_0_9V | RT5668_AMP_HP_3X); | 3140 | RT5668_LDO1_DVO_0_9V | RT5668_AMP_HP_3X); |
| 3141 | break; | 3141 | break; |
| 3142 | case CODEC_TYPE_RT5663: | 3142 | case CODEC_TYPE_RT5663: |
| 3143 | regmap_update_bits(rt5663->regmap, RT5663_DIG_MISC, | ||
| 3144 | RT5668_DIG_GATE_CTRL_MASK, RT5668_DIG_GATE_CTRL_EN); | ||
| 3145 | regmap_update_bits(rt5663->regmap, RT5663_AUTO_1MRC_CLK, | ||
| 3146 | RT5668_IRQ_POW_SAV_MASK, RT5668_IRQ_POW_SAV_EN); | ||
| 3147 | regmap_update_bits(rt5663->regmap, RT5663_IRQ_1, | ||
| 3148 | RT5663_EN_IRQ_JD1_MASK, RT5663_EN_IRQ_JD1_EN); | ||
| 3149 | regmap_update_bits(rt5663->regmap, RT5663_GPIO_1, | ||
| 3150 | RT5663_GPIO1_TYPE_MASK, RT5663_GPIO1_TYPE_EN); | ||
| 3143 | regmap_write(rt5663->regmap, RT5663_VREF_RECMIX, 0x0032); | 3151 | regmap_write(rt5663->regmap, RT5663_VREF_RECMIX, 0x0032); |
| 3144 | regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xa2be); | 3152 | regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xa2be); |
| 3145 | msleep(20); | 3153 | msleep(20); |
| 3146 | regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xf2be); | 3154 | regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xf2be); |
| 3147 | regmap_update_bits(rt5663->regmap, RT5663_GPIO_2, | 3155 | regmap_update_bits(rt5663->regmap, RT5663_GPIO_2, |
| 3148 | RT5663_GP1_PIN_CONF_MASK, RT5663_GP1_PIN_CONF_OUTPUT); | 3156 | RT5663_GP1_PIN_CONF_MASK | RT5663_SEL_GPIO1_MASK, |
| 3157 | RT5663_GP1_PIN_CONF_OUTPUT | RT5663_SEL_GPIO1_EN); | ||
| 3149 | /* DACREF LDO control */ | 3158 | /* DACREF LDO control */ |
| 3150 | regmap_update_bits(rt5663->regmap, RT5663_DACREF_LDO, 0x3e0e, | 3159 | regmap_update_bits(rt5663->regmap, RT5663_DACREF_LDO, 0x3e0e, |
| 3151 | 0x3a0a); | 3160 | 0x3a0a); |
diff --git a/sound/soc/codecs/rt5663.h b/sound/soc/codecs/rt5663.h index 2cc8f28080f6..252c2761791e 100644 --- a/sound/soc/codecs/rt5663.h +++ b/sound/soc/codecs/rt5663.h | |||
| @@ -996,11 +996,21 @@ | |||
| 996 | #define RT5663_EN_IRQ_INLINE_NOR (0x1 << 3) | 996 | #define RT5663_EN_IRQ_INLINE_NOR (0x1 << 3) |
| 997 | #define RT5663_EN_IRQ_INLINE_BYP (0x0 << 3) | 997 | #define RT5663_EN_IRQ_INLINE_BYP (0x0 << 3) |
| 998 | 998 | ||
| 999 | /* RT5663: GPIO Control 1 (0x00c0) */ | ||
| 1000 | #define RT5663_GPIO1_TYPE_MASK (0x1 << 15) | ||
| 1001 | #define RT5663_GPIO1_TYPE_SHIFT 15 | ||
| 1002 | #define RT5663_GPIO1_TYPE_EN (0x1 << 15) | ||
| 1003 | #define RT5663_GPIO1_TYPE_DIS (0x0 << 15) | ||
| 1004 | |||
| 999 | /* RT5663: IRQ Control 1 (0x00c1) */ | 1005 | /* RT5663: IRQ Control 1 (0x00c1) */ |
| 1000 | #define RT5663_EN_IRQ_JD1_MASK (0x1 << 6) | 1006 | #define RT5663_EN_IRQ_JD1_MASK (0x1 << 6) |
| 1001 | #define RT5663_EN_IRQ_JD1_SHIFT 6 | 1007 | #define RT5663_EN_IRQ_JD1_SHIFT 6 |
| 1002 | #define RT5663_EN_IRQ_JD1_EN (0x1 << 6) | 1008 | #define RT5663_EN_IRQ_JD1_EN (0x1 << 6) |
| 1003 | #define RT5663_EN_IRQ_JD1_DIS (0x0 << 6) | 1009 | #define RT5663_EN_IRQ_JD1_DIS (0x0 << 6) |
| 1010 | #define RT5663_SEL_GPIO1_MASK (0x1 << 2) | ||
| 1011 | #define RT5663_SEL_GPIO1_SHIFT 6 | ||
| 1012 | #define RT5663_SEL_GPIO1_EN (0x1 << 2) | ||
| 1013 | #define RT5663_SEL_GPIO1_DIS (0x0 << 2) | ||
| 1004 | 1014 | ||
| 1005 | /* RT5663: Inline Command Function 2 (0x00dc) */ | 1015 | /* RT5663: Inline Command Function 2 (0x00dc) */ |
| 1006 | #define RT5663_PWR_MIC_DET_MASK (0x1) | 1016 | #define RT5663_PWR_MIC_DET_MASK (0x1) |
