2019-06-04 16:11:33 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2010-08-05 20:20:59 +08:00
|
|
|
/*
|
|
|
|
* wm8962.h -- WM8962 Soc Audio driver platform data
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _WM8962_PDATA_H
|
|
|
|
#define _WM8962_PDATA_H
|
|
|
|
|
|
|
|
#define WM8962_MAX_GPIO 6
|
|
|
|
|
|
|
|
/* Use to set GPIO default values to zero */
|
|
|
|
#define WM8962_GPIO_SET 0x10000
|
|
|
|
|
2011-04-26 03:01:42 +08:00
|
|
|
#define WM8962_GPIO_FN_CLKOUT 0
|
|
|
|
#define WM8962_GPIO_FN_LOGIC 1
|
|
|
|
#define WM8962_GPIO_FN_SDOUT 2
|
|
|
|
#define WM8962_GPIO_FN_IRQ 3
|
|
|
|
#define WM8962_GPIO_FN_THERMAL 4
|
|
|
|
#define WM8962_GPIO_FN_PLL2_LOCK 6
|
|
|
|
#define WM8962_GPIO_FN_PLL3_LOCK 7
|
|
|
|
#define WM8962_GPIO_FN_FLL_LOCK 9
|
|
|
|
#define WM8962_GPIO_FN_DRC_ACT 10
|
|
|
|
#define WM8962_GPIO_FN_WSEQ_DONE 11
|
|
|
|
#define WM8962_GPIO_FN_ALC_NG_ACT 12
|
|
|
|
#define WM8962_GPIO_FN_ALC_PEAK_LIMIT 13
|
|
|
|
#define WM8962_GPIO_FN_ALC_SATURATION 14
|
|
|
|
#define WM8962_GPIO_FN_ALC_LEVEL_THR 15
|
|
|
|
#define WM8962_GPIO_FN_ALC_LEVEL_LOCK 16
|
|
|
|
#define WM8962_GPIO_FN_FIFO_ERR 17
|
|
|
|
#define WM8962_GPIO_FN_OPCLK 18
|
|
|
|
#define WM8962_GPIO_FN_DMICCLK 19
|
|
|
|
#define WM8962_GPIO_FN_DMICDAT 20
|
|
|
|
#define WM8962_GPIO_FN_MICD 21
|
|
|
|
#define WM8962_GPIO_FN_MICSCD 22
|
|
|
|
|
2010-08-05 20:20:59 +08:00
|
|
|
struct wm8962_pdata {
|
2014-07-29 18:38:39 +08:00
|
|
|
struct clk *mclk;
|
2010-09-21 00:34:58 +08:00
|
|
|
int gpio_base;
|
2010-08-05 20:20:59 +08:00
|
|
|
u32 gpio_init[WM8962_MAX_GPIO];
|
|
|
|
|
2010-09-30 04:24:35 +08:00
|
|
|
/* Setup for microphone detection, raw value to be written to
|
|
|
|
* R48(0x30) - only microphone related bits will be updated.
|
|
|
|
* Detection may be enabled here for use with signals brought
|
|
|
|
* out on the GPIOs. */
|
|
|
|
u32 mic_cfg;
|
|
|
|
|
2010-09-29 07:01:20 +08:00
|
|
|
bool irq_active_low;
|
|
|
|
|
2010-08-05 20:20:59 +08:00
|
|
|
bool spk_mono; /* Speaker outputs tied together as mono */
|
2012-01-25 05:07:55 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This flag should be set if one or both IN4 inputs is wired
|
|
|
|
* in a DC measurement configuration.
|
|
|
|
*/
|
|
|
|
bool in4_dc_measure;
|
2010-08-05 20:20:59 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|