Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Device Tree defines for Arizona devices
0004  *
0005  * Copyright 2015 Cirrus Logic Inc.
0006  *
0007  * Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
0008  */
0009 
0010 #ifndef _DT_BINDINGS_MFD_ARIZONA_H
0011 #define _DT_BINDINGS_MFD_ARIZONA_H
0012 
0013 /* GPIO Function Definitions */
0014 #define ARIZONA_GP_FN_TXLRCLK                    0x00
0015 #define ARIZONA_GP_FN_GPIO                       0x01
0016 #define ARIZONA_GP_FN_IRQ1                       0x02
0017 #define ARIZONA_GP_FN_IRQ2                       0x03
0018 #define ARIZONA_GP_FN_OPCLK                      0x04
0019 #define ARIZONA_GP_FN_FLL1_OUT                   0x05
0020 #define ARIZONA_GP_FN_FLL2_OUT                   0x06
0021 #define ARIZONA_GP_FN_PWM1                       0x08
0022 #define ARIZONA_GP_FN_PWM2                       0x09
0023 #define ARIZONA_GP_FN_SYSCLK_UNDERCLOCKED        0x0A
0024 #define ARIZONA_GP_FN_ASYNCCLK_UNDERCLOCKED      0x0B
0025 #define ARIZONA_GP_FN_FLL1_LOCK                  0x0C
0026 #define ARIZONA_GP_FN_FLL2_LOCK                  0x0D
0027 #define ARIZONA_GP_FN_FLL1_CLOCK_OK              0x0F
0028 #define ARIZONA_GP_FN_FLL2_CLOCK_OK              0x10
0029 #define ARIZONA_GP_FN_HEADPHONE_DET              0x12
0030 #define ARIZONA_GP_FN_MIC_DET                    0x13
0031 #define ARIZONA_GP_FN_WSEQ_STATUS                0x15
0032 #define ARIZONA_GP_FN_CIF_ADDRESS_ERROR          0x16
0033 #define ARIZONA_GP_FN_ASRC1_LOCK                 0x1A
0034 #define ARIZONA_GP_FN_ASRC2_LOCK                 0x1B
0035 #define ARIZONA_GP_FN_ASRC_CONFIG_ERROR          0x1C
0036 #define ARIZONA_GP_FN_DRC1_SIGNAL_DETECT         0x1D
0037 #define ARIZONA_GP_FN_DRC1_ANTICLIP              0x1E
0038 #define ARIZONA_GP_FN_DRC1_DECAY                 0x1F
0039 #define ARIZONA_GP_FN_DRC1_NOISE                 0x20
0040 #define ARIZONA_GP_FN_DRC1_QUICK_RELEASE         0x21
0041 #define ARIZONA_GP_FN_DRC2_SIGNAL_DETECT         0x22
0042 #define ARIZONA_GP_FN_DRC2_ANTICLIP              0x23
0043 #define ARIZONA_GP_FN_DRC2_DECAY                 0x24
0044 #define ARIZONA_GP_FN_DRC2_NOISE                 0x25
0045 #define ARIZONA_GP_FN_DRC2_QUICK_RELEASE         0x26
0046 #define ARIZONA_GP_FN_MIXER_DROPPED_SAMPLE       0x27
0047 #define ARIZONA_GP_FN_AIF1_CONFIG_ERROR          0x28
0048 #define ARIZONA_GP_FN_AIF2_CONFIG_ERROR          0x29
0049 #define ARIZONA_GP_FN_AIF3_CONFIG_ERROR          0x2A
0050 #define ARIZONA_GP_FN_SPK_TEMP_SHUTDOWN          0x2B
0051 #define ARIZONA_GP_FN_SPK_TEMP_WARNING           0x2C
0052 #define ARIZONA_GP_FN_UNDERCLOCKED               0x2D
0053 #define ARIZONA_GP_FN_OVERCLOCKED                0x2E
0054 #define ARIZONA_GP_FN_DSP_IRQ1                   0x35
0055 #define ARIZONA_GP_FN_DSP_IRQ2                   0x36
0056 #define ARIZONA_GP_FN_ASYNC_OPCLK                0x3D
0057 #define ARIZONA_GP_FN_BOOT_DONE                  0x44
0058 #define ARIZONA_GP_FN_DSP1_RAM_READY             0x45
0059 #define ARIZONA_GP_FN_SYSCLK_ENA_STATUS          0x4B
0060 #define ARIZONA_GP_FN_ASYNCCLK_ENA_STATUS        0x4C
0061 
0062 /* GPIO Configuration Bits */
0063 #define ARIZONA_GPN_DIR                          0x8000
0064 #define ARIZONA_GPN_PU                           0x4000
0065 #define ARIZONA_GPN_PD                           0x2000
0066 #define ARIZONA_GPN_LVL                          0x0800
0067 #define ARIZONA_GPN_POL                          0x0400
0068 #define ARIZONA_GPN_OP_CFG                       0x0200
0069 #define ARIZONA_GPN_DB                           0x0100
0070 
0071 /* Provide some defines for the most common configs */
0072 #define ARIZONA_GP_DEFAULT             0xffffffff
0073 #define ARIZONA_GP_OUTPUT              (ARIZONA_GP_FN_GPIO)
0074 #define ARIZONA_GP_INPUT               (ARIZONA_GP_FN_GPIO | \
0075                     ARIZONA_GPN_DIR)
0076 
0077 #define ARIZONA_32KZ_MCLK1 1
0078 #define ARIZONA_32KZ_MCLK2 2
0079 #define ARIZONA_32KZ_NONE  3
0080 
0081 #define ARIZONA_DMIC_MICVDD   0
0082 #define ARIZONA_DMIC_MICBIAS1 1
0083 #define ARIZONA_DMIC_MICBIAS2 2
0084 #define ARIZONA_DMIC_MICBIAS3 3
0085 
0086 #define ARIZONA_INMODE_DIFF 0
0087 #define ARIZONA_INMODE_SE   1
0088 #define ARIZONA_INMODE_DMIC 2
0089 
0090 #define ARIZONA_MICD_TIME_CONTINUOUS                 0
0091 #define ARIZONA_MICD_TIME_250US                      1
0092 #define ARIZONA_MICD_TIME_500US                      2
0093 #define ARIZONA_MICD_TIME_1MS                        3
0094 #define ARIZONA_MICD_TIME_2MS                        4
0095 #define ARIZONA_MICD_TIME_4MS                        5
0096 #define ARIZONA_MICD_TIME_8MS                        6
0097 #define ARIZONA_MICD_TIME_16MS                       7
0098 #define ARIZONA_MICD_TIME_32MS                       8
0099 #define ARIZONA_MICD_TIME_64MS                       9
0100 #define ARIZONA_MICD_TIME_128MS                      10
0101 #define ARIZONA_MICD_TIME_256MS                      11
0102 #define ARIZONA_MICD_TIME_512MS                      12
0103 
0104 #define ARIZONA_ACCDET_MODE_MIC 0
0105 #define ARIZONA_ACCDET_MODE_HPL 1
0106 #define ARIZONA_ACCDET_MODE_HPR 2
0107 #define ARIZONA_ACCDET_MODE_HPM 4
0108 #define ARIZONA_ACCDET_MODE_ADC 7
0109 
0110 #define ARIZONA_GPSW_OPEN           0
0111 #define ARIZONA_GPSW_CLOSED         1
0112 #define ARIZONA_GPSW_CLAMP_ENABLED  2
0113 #define ARIZONA_GPSW_CLAMP_DISABLED 3
0114 
0115 #endif