12c394ca7SJames Schulman /* 22c394ca7SJames Schulman * cs42l42.h -- CS42L42 ALSA SoC audio driver DT bindings header 32c394ca7SJames Schulman * 42c394ca7SJames Schulman * Copyright 2016 Cirrus Logic, Inc. 52c394ca7SJames Schulman * 62c394ca7SJames Schulman * Author: James Schulman <james.schulman@cirrus.com> 72c394ca7SJames Schulman * Author: Brian Austin <brian.austin@cirrus.com> 82c394ca7SJames Schulman * Author: Michael White <michael.white@cirrus.com> 92c394ca7SJames Schulman * 102c394ca7SJames Schulman * This program is free software; you can redistribute it and/or modify 112c394ca7SJames Schulman * it under the terms of the GNU General Public License version 2 as 122c394ca7SJames Schulman * published by the Free Software Foundation. 132c394ca7SJames Schulman * 142c394ca7SJames Schulman */ 152c394ca7SJames Schulman 162c394ca7SJames Schulman #ifndef __DT_CS42L42_H 172c394ca7SJames Schulman #define __DT_CS42L42_H 182c394ca7SJames Schulman 192c394ca7SJames Schulman /* HPOUT Load Capacity */ 202c394ca7SJames Schulman #define CS42L42_HPOUT_LOAD_1NF 0 212c394ca7SJames Schulman #define CS42L42_HPOUT_LOAD_10NF 1 222c394ca7SJames Schulman 23505d3085SMasahiro Yamada /* HPOUT Clamp to GND Override */ 242c394ca7SJames Schulman #define CS42L42_HPOUT_CLAMP_EN 0 252c394ca7SJames Schulman #define CS42L42_HPOUT_CLAMP_DIS 1 262c394ca7SJames Schulman 272c394ca7SJames Schulman /* Tip Sense Inversion */ 282c394ca7SJames Schulman #define CS42L42_TS_INV_DIS 0 292c394ca7SJames Schulman #define CS42L42_TS_INV_EN 1 302c394ca7SJames Schulman 312c394ca7SJames Schulman /* Tip Sense Debounce */ 322c394ca7SJames Schulman #define CS42L42_TS_DBNCE_0 0 332c394ca7SJames Schulman #define CS42L42_TS_DBNCE_125 1 342c394ca7SJames Schulman #define CS42L42_TS_DBNCE_250 2 352c394ca7SJames Schulman #define CS42L42_TS_DBNCE_500 3 362c394ca7SJames Schulman #define CS42L42_TS_DBNCE_750 4 372c394ca7SJames Schulman #define CS42L42_TS_DBNCE_1000 5 382c394ca7SJames Schulman #define CS42L42_TS_DBNCE_1250 6 392c394ca7SJames Schulman #define CS42L42_TS_DBNCE_1500 7 402c394ca7SJames Schulman 412c394ca7SJames Schulman /* Button Press Software Debounce Times */ 422c394ca7SJames Schulman #define CS42L42_BTN_DET_INIT_DBNCE_MIN 0 432c394ca7SJames Schulman #define CS42L42_BTN_DET_INIT_DBNCE_DEFAULT 100 442c394ca7SJames Schulman #define CS42L42_BTN_DET_INIT_DBNCE_MAX 200 452c394ca7SJames Schulman 462c394ca7SJames Schulman #define CS42L42_BTN_DET_EVENT_DBNCE_MIN 0 472c394ca7SJames Schulman #define CS42L42_BTN_DET_EVENT_DBNCE_DEFAULT 10 482c394ca7SJames Schulman #define CS42L42_BTN_DET_EVENT_DBNCE_MAX 20 492c394ca7SJames Schulman 502c394ca7SJames Schulman /* Button Detect Level Sensitivities */ 512c394ca7SJames Schulman #define CS42L42_NUM_BIASES 4 522c394ca7SJames Schulman 532c394ca7SJames Schulman #define CS42L42_HS_DET_LEVEL_15 0x0F 542c394ca7SJames Schulman #define CS42L42_HS_DET_LEVEL_8 0x08 552c394ca7SJames Schulman #define CS42L42_HS_DET_LEVEL_4 0x04 562c394ca7SJames Schulman #define CS42L42_HS_DET_LEVEL_1 0x01 572c394ca7SJames Schulman 582c394ca7SJames Schulman #define CS42L42_HS_DET_LEVEL_MIN 0 592c394ca7SJames Schulman #define CS42L42_HS_DET_LEVEL_MAX 0x3F 602c394ca7SJames Schulman 612c394ca7SJames Schulman /* HS Bias Ramp Rate */ 622c394ca7SJames Schulman 632c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_FAST_RISE_SLOW_FALL 0 642c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_FAST 1 652c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_SLOW 2 662c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_SLOWEST 3 672c394ca7SJames Schulman 682c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_TIME0 10 692c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_TIME1 40 702c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_TIME2 90 712c394ca7SJames Schulman #define CS42L42_HSBIAS_RAMP_TIME3 170 722c394ca7SJames Schulman 732c394ca7SJames Schulman #endif /* __DT_CS42L42_H */ 74