1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright Openedhand Ltd. 4 * 5 * Author: Richard Purdie <richard@openedhand.com> 6 * Binbin Zhou <zhoubinbin@loongson.cn> 7 * 8 */ 9 10 #ifndef _ES8323_H 11 #define _ES8323_H 12 13 /* ES8323 register space */ 14 15 /* Chip Control and Power Management */ 16 #define ES8323_CONTROL1 0x00 17 #define ES8323_CONTROL2 0x01 18 #define ES8323_CHIPPOWER 0x02 19 #define ES8323_ADCPOWER 0x03 20 #define ES8323_DACPOWER 0x04 21 #define ES8323_CHIPLOPOW1 0x05 22 #define ES8323_CHIPLOPOW2 0x06 23 #define ES8323_ANAVOLMANAG 0x07 24 #define ES8323_MASTERMODE 0x08 25 26 /* ADC Control */ 27 #define ES8323_ADCCONTROL1 0x09 28 #define ES8323_ADCCONTROL2 0x0a 29 #define ES8323_ADCCONTROL3 0x0b 30 #define ES8323_ADCCONTROL4 0x0c 31 #define ES8323_ADCCONTROL5 0x0d 32 #define ES8323_ADCCONTROL6 0x0e 33 #define ES8323_ADC_MUTE 0x0f 34 #define ES8323_LADC_VOL 0x10 35 #define ES8323_RADC_VOL 0x11 36 #define ES8323_ADCCONTROL10 0x12 37 #define ES8323_ADCCONTROL11 0x13 38 #define ES8323_ADCCONTROL12 0x14 39 #define ES8323_ADCCONTROL13 0x15 40 #define ES8323_ADCCONTROL14 0x16 41 42 /* DAC Control */ 43 #define ES8323_DACCONTROL1 0x17 44 #define ES8323_DACCONTROL2 0x18 45 #define ES8323_DAC_MUTE 0x19 46 #define ES8323_LDAC_VOL 0x1a 47 #define ES8323_RDAC_VOL 0x1b 48 #define ES8323_DACCONTROL6 0x1c 49 #define ES8323_DACCONTROL7 0x1d 50 #define ES8323_DACCONTROL8 0x1e 51 #define ES8323_DACCONTROL9 0x1f 52 #define ES8323_DACCONTROL10 0x20 53 #define ES8323_DACCONTROL11 0x21 54 #define ES8323_DACCONTROL12 0x22 55 #define ES8323_DACCONTROL13 0x23 56 #define ES8323_DACCONTROL14 0x24 57 #define ES8323_DACCONTROL15 0x25 58 #define ES8323_DACCONTROL16 0x26 59 #define ES8323_DACCONTROL17 0x27 60 #define ES8323_DACCONTROL18 0x28 61 #define ES8323_DACCONTROL19 0x29 62 #define ES8323_DACCONTROL20 0x2a 63 #define ES8323_DACCONTROL21 0x2b 64 #define ES8323_DACCONTROL22 0x2c 65 #define ES8323_DACCONTROL23 0x2d 66 #define ES8323_LOUT1_VOL 0x2e 67 #define ES8323_ROUT1_VOL 0x2f 68 #define ES8323_LOUT2_VOL 0x30 69 #define ES8323_ROUT2_VOL 0x31 70 #define ES8323_DACCONTROL28 0x32 71 #define ES8323_DACCONTROL29 0x33 72 #define ES8323_DACCONTROL30 0x34 73 74 #define ES8323_ADC_IFACE ES8323_ADCCONTROL4 75 #define ES8323_ADC_SRATE ES8323_ADCCONTROL5 76 #define ES8323_DAC_IFACE ES8323_DACCONTROL1 77 #define ES8323_DAC_SRATE ES8323_DACCONTROL2 78 #endif 79