18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * cs42l42.h -- CS42L42 ALSA SoC audio driver DT bindings header 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2016 Cirrus Logic, Inc. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Author: James Schulman <james.schulman@cirrus.com> 88c2ecf20Sopenharmony_ci * Author: Brian Austin <brian.austin@cirrus.com> 98c2ecf20Sopenharmony_ci * Author: Michael White <michael.white@cirrus.com> 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef __DT_CS42L42_H 138c2ecf20Sopenharmony_ci#define __DT_CS42L42_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* HPOUT Load Capacity */ 168c2ecf20Sopenharmony_ci#define CS42L42_HPOUT_LOAD_1NF 0 178c2ecf20Sopenharmony_ci#define CS42L42_HPOUT_LOAD_10NF 1 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* HPOUT Clamp to GND Override */ 208c2ecf20Sopenharmony_ci#define CS42L42_HPOUT_CLAMP_EN 0 218c2ecf20Sopenharmony_ci#define CS42L42_HPOUT_CLAMP_DIS 1 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci/* Tip Sense Inversion */ 248c2ecf20Sopenharmony_ci#define CS42L42_TS_INV_DIS 0 258c2ecf20Sopenharmony_ci#define CS42L42_TS_INV_EN 1 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci/* Tip Sense Debounce */ 288c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_0 0 298c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_125 1 308c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_250 2 318c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_500 3 328c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_750 4 338c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_1000 5 348c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_1250 6 358c2ecf20Sopenharmony_ci#define CS42L42_TS_DBNCE_1500 7 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* Button Press Software Debounce Times */ 388c2ecf20Sopenharmony_ci#define CS42L42_BTN_DET_INIT_DBNCE_MIN 0 398c2ecf20Sopenharmony_ci#define CS42L42_BTN_DET_INIT_DBNCE_DEFAULT 100 408c2ecf20Sopenharmony_ci#define CS42L42_BTN_DET_INIT_DBNCE_MAX 200 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define CS42L42_BTN_DET_EVENT_DBNCE_MIN 0 438c2ecf20Sopenharmony_ci#define CS42L42_BTN_DET_EVENT_DBNCE_DEFAULT 10 448c2ecf20Sopenharmony_ci#define CS42L42_BTN_DET_EVENT_DBNCE_MAX 20 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci/* Button Detect Level Sensitivities */ 478c2ecf20Sopenharmony_ci#define CS42L42_NUM_BIASES 4 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci#define CS42L42_HS_DET_LEVEL_15 0x0F 508c2ecf20Sopenharmony_ci#define CS42L42_HS_DET_LEVEL_8 0x08 518c2ecf20Sopenharmony_ci#define CS42L42_HS_DET_LEVEL_4 0x04 528c2ecf20Sopenharmony_ci#define CS42L42_HS_DET_LEVEL_1 0x01 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci#define CS42L42_HS_DET_LEVEL_MIN 0 558c2ecf20Sopenharmony_ci#define CS42L42_HS_DET_LEVEL_MAX 0x3F 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci/* HS Bias Ramp Rate */ 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_FAST_RISE_SLOW_FALL 0 608c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_FAST 1 618c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_SLOW 2 628c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_SLOWEST 3 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_TIME0 10 658c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_TIME1 40 668c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_TIME2 90 678c2ecf20Sopenharmony_ci#define CS42L42_HSBIAS_RAMP_TIME3 170 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci#endif /* __DT_CS42L42_H */ 70