xref: /openbmc/u-boot/include/sandbox-adc.h (revision d0dd7397)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2015 Samsung Electronics
4  * Przemyslaw Marczak <p.marczak@samsung.com>
5  */
6 
7 #ifndef _SANDBOX_ADC_H_
8 #define _SANDBOX_ADC_H_
9 
10 #define SANDBOX_ADC_DEVNAME		"adc@0"
11 #define SANDBOX_ADC_DATA_MASK		0xffff /* 16-bits resolution */
12 #define SANDBOX_ADC_CHANNELS		4
13 #define SANDBOX_ADC_CHANNEL0_DATA	0x0
14 #define SANDBOX_ADC_CHANNEL1_DATA	0x1000
15 #define SANDBOX_ADC_CHANNEL2_DATA	0x2000
16 #define SANDBOX_ADC_CHANNEL3_DATA	0x3000
17 
18 enum sandbox_adc_mode {
19 	SANDBOX_ADC_MODE_SINGLE_CHANNEL = 0,
20 	SANDBOX_ADC_MODE_MULTI_CHANNEL,
21 };
22 
23 enum sandbox_adc_status {
24 	SANDBOX_ADC_INACTIVE = 0,
25 	SANDBOX_ADC_ACTIVE,
26 };
27 
28 #define SANDBOX_ADC_VSS_VALUE		0
29 
30 #endif
31