linux/include/dt-bindings/mfd/arizona.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Device Tree defines for Arizona devices
 *
 * Copyright 2015 Cirrus Logic Inc.
 *
 * Author: Charles Keepax <[email protected]>
 */

#ifndef _DT_BINDINGS_MFD_ARIZONA_H
#define _DT_BINDINGS_MFD_ARIZONA_H

/* GPIO Function Definitions */
#define ARIZONA_GP_FN_TXLRCLK
#define ARIZONA_GP_FN_GPIO
#define ARIZONA_GP_FN_IRQ1
#define ARIZONA_GP_FN_IRQ2
#define ARIZONA_GP_FN_OPCLK
#define ARIZONA_GP_FN_FLL1_OUT
#define ARIZONA_GP_FN_FLL2_OUT
#define ARIZONA_GP_FN_PWM1
#define ARIZONA_GP_FN_PWM2
#define ARIZONA_GP_FN_SYSCLK_UNDERCLOCKED
#define ARIZONA_GP_FN_ASYNCCLK_UNDERCLOCKED
#define ARIZONA_GP_FN_FLL1_LOCK
#define ARIZONA_GP_FN_FLL2_LOCK
#define ARIZONA_GP_FN_FLL1_CLOCK_OK
#define ARIZONA_GP_FN_FLL2_CLOCK_OK
#define ARIZONA_GP_FN_HEADPHONE_DET
#define ARIZONA_GP_FN_MIC_DET
#define ARIZONA_GP_FN_WSEQ_STATUS
#define ARIZONA_GP_FN_CIF_ADDRESS_ERROR
#define ARIZONA_GP_FN_ASRC1_LOCK
#define ARIZONA_GP_FN_ASRC2_LOCK
#define ARIZONA_GP_FN_ASRC_CONFIG_ERROR
#define ARIZONA_GP_FN_DRC1_SIGNAL_DETECT
#define ARIZONA_GP_FN_DRC1_ANTICLIP
#define ARIZONA_GP_FN_DRC1_DECAY
#define ARIZONA_GP_FN_DRC1_NOISE
#define ARIZONA_GP_FN_DRC1_QUICK_RELEASE
#define ARIZONA_GP_FN_DRC2_SIGNAL_DETECT
#define ARIZONA_GP_FN_DRC2_ANTICLIP
#define ARIZONA_GP_FN_DRC2_DECAY
#define ARIZONA_GP_FN_DRC2_NOISE
#define ARIZONA_GP_FN_DRC2_QUICK_RELEASE
#define ARIZONA_GP_FN_MIXER_DROPPED_SAMPLE
#define ARIZONA_GP_FN_AIF1_CONFIG_ERROR
#define ARIZONA_GP_FN_AIF2_CONFIG_ERROR
#define ARIZONA_GP_FN_AIF3_CONFIG_ERROR
#define ARIZONA_GP_FN_SPK_TEMP_SHUTDOWN
#define ARIZONA_GP_FN_SPK_TEMP_WARNING
#define ARIZONA_GP_FN_UNDERCLOCKED
#define ARIZONA_GP_FN_OVERCLOCKED
#define ARIZONA_GP_FN_DSP_IRQ1
#define ARIZONA_GP_FN_DSP_IRQ2
#define ARIZONA_GP_FN_ASYNC_OPCLK
#define ARIZONA_GP_FN_BOOT_DONE
#define ARIZONA_GP_FN_DSP1_RAM_READY
#define ARIZONA_GP_FN_SYSCLK_ENA_STATUS
#define ARIZONA_GP_FN_ASYNCCLK_ENA_STATUS

/* GPIO Configuration Bits */
#define ARIZONA_GPN_DIR
#define ARIZONA_GPN_PU
#define ARIZONA_GPN_PD
#define ARIZONA_GPN_LVL
#define ARIZONA_GPN_POL
#define ARIZONA_GPN_OP_CFG
#define ARIZONA_GPN_DB

/* Provide some defines for the most common configs */
#define ARIZONA_GP_DEFAULT
#define ARIZONA_GP_OUTPUT
#define ARIZONA_GP_INPUT

#define ARIZONA_32KZ_MCLK1
#define ARIZONA_32KZ_MCLK2
#define ARIZONA_32KZ_NONE

#define ARIZONA_DMIC_MICVDD
#define ARIZONA_DMIC_MICBIAS1
#define ARIZONA_DMIC_MICBIAS2
#define ARIZONA_DMIC_MICBIAS3

#define ARIZONA_INMODE_DIFF
#define ARIZONA_INMODE_SE
#define ARIZONA_INMODE_DMIC

#define ARIZONA_MICD_TIME_CONTINUOUS
#define ARIZONA_MICD_TIME_250US
#define ARIZONA_MICD_TIME_500US
#define ARIZONA_MICD_TIME_1MS
#define ARIZONA_MICD_TIME_2MS
#define ARIZONA_MICD_TIME_4MS
#define ARIZONA_MICD_TIME_8MS
#define ARIZONA_MICD_TIME_16MS
#define ARIZONA_MICD_TIME_32MS
#define ARIZONA_MICD_TIME_64MS
#define ARIZONA_MICD_TIME_128MS
#define ARIZONA_MICD_TIME_256MS
#define ARIZONA_MICD_TIME_512MS

#define ARIZONA_ACCDET_MODE_MIC
#define ARIZONA_ACCDET_MODE_HPL
#define ARIZONA_ACCDET_MODE_HPR
#define ARIZONA_ACCDET_MODE_HPM
#define ARIZONA_ACCDET_MODE_ADC

#define ARIZONA_GPSW_OPEN
#define ARIZONA_GPSW_CLOSED
#define ARIZONA_GPSW_CLAMP_ENABLED
#define ARIZONA_GPSW_CLAMP_DISABLED

#endif