18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * cs4265.h -- CS4265 ALSA SoC audio driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2014 Cirrus Logic, Inc. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Author: Paul Handrigan <paul.handrigan@cirrus.com> 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef __CS4265_H__ 118c2ecf20Sopenharmony_ci#define __CS4265_H__ 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#define CS4265_CHIP_ID 0x1 148c2ecf20Sopenharmony_ci#define CS4265_CHIP_ID_VAL 0xD0 158c2ecf20Sopenharmony_ci#define CS4265_CHIP_ID_MASK 0xF0 168c2ecf20Sopenharmony_ci#define CS4265_REV_ID_MASK 0x0F 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci#define CS4265_PWRCTL 0x02 198c2ecf20Sopenharmony_ci#define CS4265_PWRCTL_PDN 1 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci#define CS4265_DAC_CTL 0x3 228c2ecf20Sopenharmony_ci#define CS4265_DAC_CTL_MUTE (1 << 2) 238c2ecf20Sopenharmony_ci#define CS4265_DAC_CTL_DIF (3 << 4) 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#define CS4265_ADC_CTL 0x4 268c2ecf20Sopenharmony_ci#define CS4265_ADC_MASTER 1 278c2ecf20Sopenharmony_ci#define CS4265_ADC_DIF (1 << 4) 288c2ecf20Sopenharmony_ci#define CS4265_ADC_FM (3 << 6) 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define CS4265_MCLK_FREQ 0x5 318c2ecf20Sopenharmony_ci#define CS4265_MCLK_FREQ_MASK (7 << 4) 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#define CS4265_SIG_SEL 0x6 348c2ecf20Sopenharmony_ci#define CS4265_SIG_SEL_LOOP (1 << 1) 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci#define CS4265_CHB_PGA_CTL 0x7 378c2ecf20Sopenharmony_ci#define CS4265_CHA_PGA_CTL 0x8 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define CS4265_ADC_CTL2 0x9 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci#define CS4265_DAC_CHA_VOL 0xA 428c2ecf20Sopenharmony_ci#define CS4265_DAC_CHB_VOL 0xB 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#define CS4265_DAC_CTL2 0xC 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci#define CS4265_INT_STATUS 0xD 478c2ecf20Sopenharmony_ci#define CS4265_INT_MASK 0xE 488c2ecf20Sopenharmony_ci#define CS4265_STATUS_MODE_MSB 0xF 498c2ecf20Sopenharmony_ci#define CS4265_STATUS_MODE_LSB 0x10 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#define CS4265_SPDIF_CTL1 0x11 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci#define CS4265_SPDIF_CTL2 0x12 548c2ecf20Sopenharmony_ci#define CS4265_SPDIF_CTL2_MUTE (1 << 4) 558c2ecf20Sopenharmony_ci#define CS4265_SPDIF_CTL2_DIF (3 << 6) 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci#define CS4265_C_DATA_BUFF 0x13 588c2ecf20Sopenharmony_ci#define CS4265_MAX_REGISTER 0x2A 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci#endif 61