18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Device Tree defines for Arizona devices 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2015 Cirrus Logic Inc. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Author: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef _DT_BINDINGS_MFD_ARIZONA_H 118c2ecf20Sopenharmony_ci#define _DT_BINDINGS_MFD_ARIZONA_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* GPIO Function Definitions */ 148c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_TXLRCLK 0x00 158c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_GPIO 0x01 168c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_IRQ1 0x02 178c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_IRQ2 0x03 188c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_OPCLK 0x04 198c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_FLL1_OUT 0x05 208c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_FLL2_OUT 0x06 218c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_PWM1 0x08 228c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_PWM2 0x09 238c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_SYSCLK_UNDERCLOCKED 0x0A 248c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_ASYNCCLK_UNDERCLOCKED 0x0B 258c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_FLL1_LOCK 0x0C 268c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_FLL2_LOCK 0x0D 278c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_FLL1_CLOCK_OK 0x0F 288c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_FLL2_CLOCK_OK 0x10 298c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_HEADPHONE_DET 0x12 308c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_MIC_DET 0x13 318c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_WSEQ_STATUS 0x15 328c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_CIF_ADDRESS_ERROR 0x16 338c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_ASRC1_LOCK 0x1A 348c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_ASRC2_LOCK 0x1B 358c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_ASRC_CONFIG_ERROR 0x1C 368c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC1_SIGNAL_DETECT 0x1D 378c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC1_ANTICLIP 0x1E 388c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC1_DECAY 0x1F 398c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC1_NOISE 0x20 408c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC1_QUICK_RELEASE 0x21 418c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC2_SIGNAL_DETECT 0x22 428c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC2_ANTICLIP 0x23 438c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC2_DECAY 0x24 448c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC2_NOISE 0x25 458c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DRC2_QUICK_RELEASE 0x26 468c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_MIXER_DROPPED_SAMPLE 0x27 478c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_AIF1_CONFIG_ERROR 0x28 488c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_AIF2_CONFIG_ERROR 0x29 498c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_AIF3_CONFIG_ERROR 0x2A 508c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_SPK_TEMP_SHUTDOWN 0x2B 518c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_SPK_TEMP_WARNING 0x2C 528c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_UNDERCLOCKED 0x2D 538c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_OVERCLOCKED 0x2E 548c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DSP_IRQ1 0x35 558c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DSP_IRQ2 0x36 568c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_ASYNC_OPCLK 0x3D 578c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_BOOT_DONE 0x44 588c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_DSP1_RAM_READY 0x45 598c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_SYSCLK_ENA_STATUS 0x4B 608c2ecf20Sopenharmony_ci#define ARIZONA_GP_FN_ASYNCCLK_ENA_STATUS 0x4C 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_ci/* GPIO Configuration Bits */ 638c2ecf20Sopenharmony_ci#define ARIZONA_GPN_DIR 0x8000 648c2ecf20Sopenharmony_ci#define ARIZONA_GPN_PU 0x4000 658c2ecf20Sopenharmony_ci#define ARIZONA_GPN_PD 0x2000 668c2ecf20Sopenharmony_ci#define ARIZONA_GPN_LVL 0x0800 678c2ecf20Sopenharmony_ci#define ARIZONA_GPN_POL 0x0400 688c2ecf20Sopenharmony_ci#define ARIZONA_GPN_OP_CFG 0x0200 698c2ecf20Sopenharmony_ci#define ARIZONA_GPN_DB 0x0100 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci/* Provide some defines for the most common configs */ 728c2ecf20Sopenharmony_ci#define ARIZONA_GP_DEFAULT 0xffffffff 738c2ecf20Sopenharmony_ci#define ARIZONA_GP_OUTPUT (ARIZONA_GP_FN_GPIO) 748c2ecf20Sopenharmony_ci#define ARIZONA_GP_INPUT (ARIZONA_GP_FN_GPIO | \ 758c2ecf20Sopenharmony_ci ARIZONA_GPN_DIR) 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci#define ARIZONA_32KZ_MCLK1 1 788c2ecf20Sopenharmony_ci#define ARIZONA_32KZ_MCLK2 2 798c2ecf20Sopenharmony_ci#define ARIZONA_32KZ_NONE 3 808c2ecf20Sopenharmony_ci 818c2ecf20Sopenharmony_ci#define ARIZONA_DMIC_MICVDD 0 828c2ecf20Sopenharmony_ci#define ARIZONA_DMIC_MICBIAS1 1 838c2ecf20Sopenharmony_ci#define ARIZONA_DMIC_MICBIAS2 2 848c2ecf20Sopenharmony_ci#define ARIZONA_DMIC_MICBIAS3 3 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_ci#define ARIZONA_INMODE_DIFF 0 878c2ecf20Sopenharmony_ci#define ARIZONA_INMODE_SE 1 888c2ecf20Sopenharmony_ci#define ARIZONA_INMODE_DMIC 2 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_CONTINUOUS 0 918c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_250US 1 928c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_500US 2 938c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_1MS 3 948c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_2MS 4 958c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_4MS 5 968c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_8MS 6 978c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_16MS 7 988c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_32MS 8 998c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_64MS 9 1008c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_128MS 10 1018c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_256MS 11 1028c2ecf20Sopenharmony_ci#define ARIZONA_MICD_TIME_512MS 12 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ci#define ARIZONA_ACCDET_MODE_MIC 0 1058c2ecf20Sopenharmony_ci#define ARIZONA_ACCDET_MODE_HPL 1 1068c2ecf20Sopenharmony_ci#define ARIZONA_ACCDET_MODE_HPR 2 1078c2ecf20Sopenharmony_ci#define ARIZONA_ACCDET_MODE_HPM 4 1088c2ecf20Sopenharmony_ci#define ARIZONA_ACCDET_MODE_ADC 7 1098c2ecf20Sopenharmony_ci 1108c2ecf20Sopenharmony_ci#define ARIZONA_GPSW_OPEN 0 1118c2ecf20Sopenharmony_ci#define ARIZONA_GPSW_CLOSED 1 1128c2ecf20Sopenharmony_ci#define ARIZONA_GPSW_CLAMP_ENABLED 2 1138c2ecf20Sopenharmony_ci#define ARIZONA_GPSW_CLAMP_DISABLED 3 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci#endif 116