]> git.ipfire.org Git - thirdparty/u-boot.git/blob - board/buffalo/lsxl/lsxl.h
ARC: dwmmc: Adding DesignWare MMC driver support for ARC devboards
[thirdparty/u-boot.git] / board / buffalo / lsxl / lsxl.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * Copyright (c) 2012 Michael Walle
4 * Michael Walle <michael@walle.cc>
5 */
6
7 #ifndef __LSXL_H
8 #define __LSXL_H
9
10 #define GPIO_HDD_POWER 10
11 #define GPIO_USB_VBUS 11
12 #define GPIO_FAN_HIGH 18
13 #define GPIO_FAN_LOW 19
14 #define GPIO_FUNC_LED 36
15 #define GPIO_ALARM_LED 37
16 #define GPIO_INFO_LED 38
17 #define GPIO_POWER_LED 39
18 #define GPIO_FAN_LOCK 40
19 #define GPIO_FUNC_BUTTON 41
20 #define GPIO_POWER_SWITCH 42
21 #define GPIO_POWER_AUTO_SWITCH 43
22 #define GPIO_FUNC_RED_LED 48
23
24 #define _BIT(x) (1<<(x))
25
26 #define LSXL_OE_LOW (~(_BIT(GPIO_HDD_POWER) \
27 | _BIT(GPIO_USB_VBUS) \
28 | _BIT(GPIO_FAN_HIGH) \
29 | _BIT(GPIO_FAN_LOW)))
30
31 #define LSXL_OE_HIGH (~(_BIT(GPIO_FUNC_LED - 32) \
32 | _BIT(GPIO_ALARM_LED - 32) \
33 | _BIT(GPIO_INFO_LED - 32) \
34 | _BIT(GPIO_POWER_LED - 32) \
35 | _BIT(GPIO_FUNC_RED_LED - 32)))
36
37 #define LSXL_OE_VAL_LOW (_BIT(GPIO_HDD_POWER) \
38 | _BIT(GPIO_USB_VBUS))
39
40 #define LSXL_OE_VAL_HIGH (_BIT(GPIO_FUNC_LED - 32) \
41 | _BIT(GPIO_ALARM_LED - 32) \
42 | _BIT(GPIO_INFO_LED - 32) \
43 | _BIT(GPIO_POWER_LED - 32) \
44 | _BIT(GPIO_FUNC_RED_LED - 32))
45
46 #define LSXL_POL_VAL_LOW (_BIT(GPIO_FAN_HIGH) \
47 | _BIT(GPIO_FAN_LOW))
48
49 #define LSXL_POL_VAL_HIGH (_BIT(GPIO_FUNC_LED - 32) \
50 | _BIT(GPIO_ALARM_LED - 32) \
51 | _BIT(GPIO_INFO_LED - 32) \
52 | _BIT(GPIO_POWER_LED - 32) \
53 | _BIT(GPIO_FUNC_BUTTON - 32) \
54 | _BIT(GPIO_POWER_SWITCH - 32) \
55 | _BIT(GPIO_POWER_AUTO_SWITCH - 32) \
56 | _BIT(GPIO_FUNC_RED_LED - 32))
57
58 #endif /* __LSXL_H */