162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * wm8962.h -- WM8962 Soc Audio driver platform data 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#ifndef _WM8962_PDATA_H 762306a36Sopenharmony_ci#define _WM8962_PDATA_H 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#define WM8962_MAX_GPIO 6 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci/* Use to set GPIO default values to zero */ 1262306a36Sopenharmony_ci#define WM8962_GPIO_SET 0x10000 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci#define WM8962_GPIO_FN_CLKOUT 0 1562306a36Sopenharmony_ci#define WM8962_GPIO_FN_LOGIC 1 1662306a36Sopenharmony_ci#define WM8962_GPIO_FN_SDOUT 2 1762306a36Sopenharmony_ci#define WM8962_GPIO_FN_IRQ 3 1862306a36Sopenharmony_ci#define WM8962_GPIO_FN_THERMAL 4 1962306a36Sopenharmony_ci#define WM8962_GPIO_FN_PLL2_LOCK 6 2062306a36Sopenharmony_ci#define WM8962_GPIO_FN_PLL3_LOCK 7 2162306a36Sopenharmony_ci#define WM8962_GPIO_FN_FLL_LOCK 9 2262306a36Sopenharmony_ci#define WM8962_GPIO_FN_DRC_ACT 10 2362306a36Sopenharmony_ci#define WM8962_GPIO_FN_WSEQ_DONE 11 2462306a36Sopenharmony_ci#define WM8962_GPIO_FN_ALC_NG_ACT 12 2562306a36Sopenharmony_ci#define WM8962_GPIO_FN_ALC_PEAK_LIMIT 13 2662306a36Sopenharmony_ci#define WM8962_GPIO_FN_ALC_SATURATION 14 2762306a36Sopenharmony_ci#define WM8962_GPIO_FN_ALC_LEVEL_THR 15 2862306a36Sopenharmony_ci#define WM8962_GPIO_FN_ALC_LEVEL_LOCK 16 2962306a36Sopenharmony_ci#define WM8962_GPIO_FN_FIFO_ERR 17 3062306a36Sopenharmony_ci#define WM8962_GPIO_FN_OPCLK 18 3162306a36Sopenharmony_ci#define WM8962_GPIO_FN_DMICCLK 19 3262306a36Sopenharmony_ci#define WM8962_GPIO_FN_DMICDAT 20 3362306a36Sopenharmony_ci#define WM8962_GPIO_FN_MICD 21 3462306a36Sopenharmony_ci#define WM8962_GPIO_FN_MICSCD 22 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_cistruct wm8962_pdata { 3762306a36Sopenharmony_ci struct clk *mclk; 3862306a36Sopenharmony_ci int gpio_base; 3962306a36Sopenharmony_ci u32 gpio_init[WM8962_MAX_GPIO]; 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci /* Setup for microphone detection, raw value to be written to 4262306a36Sopenharmony_ci * R48(0x30) - only microphone related bits will be updated. 4362306a36Sopenharmony_ci * Detection may be enabled here for use with signals brought 4462306a36Sopenharmony_ci * out on the GPIOs. */ 4562306a36Sopenharmony_ci u32 mic_cfg; 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci bool irq_active_low; 4862306a36Sopenharmony_ci 4962306a36Sopenharmony_ci bool spk_mono; /* Speaker outputs tied together as mono */ 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci /** 5262306a36Sopenharmony_ci * This flag should be set if one or both IN4 inputs is wired 5362306a36Sopenharmony_ci * in a DC measurement configuration. 5462306a36Sopenharmony_ci */ 5562306a36Sopenharmony_ci bool in4_dc_measure; 5662306a36Sopenharmony_ci}; 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#endif 59