xref: /openbmc/u-boot/board/zyxel/nsa310s/nsa310s.h (revision ef64e782)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2015
4  * Gerald Kerma <dreagle@doukki.net>
5  * Tony Dinh <mibodhi@gmail.com>
6  */
7 
8 #ifndef __NSA310S_H
9 #define __NSA310S_H
10 
11 /* low GPIO's */
12 #define HDD1_GREEN_LED		(1 << 16)
13 #define HDD1_RED_LED		(1 << 13)
14 #define USB_GREEN_LED		(1 << 15)
15 #define USB_POWER			(1 << 21)
16 #define SYS_GREEN_LED		(1 << 28)
17 #define SYS_ORANGE_LED		(1 << 29)
18 
19 #define COPY_GREEN_LED		(1 << 22)
20 #define COPY_RED_LED		(1 << 23)
21 
22 #define PIN_USB_GREEN_LED	15
23 #define PIN_USB_POWER		21
24 
25 #define NSA310S_OE_LOW		(~(0))
26 #define NSA310S_VAL_LOW		(SYS_GREEN_LED | USB_POWER)
27 
28 /* high GPIO's */
29 #define HDD2_GREEN_LED		(1 << 2)
30 #define HDD2_POWER			(1 << 1)
31 
32 #define NSA310S_OE_HIGH		(~(0))
33 #define NSA310S_VAL_HIGH	(HDD2_POWER)
34 
35 /* PHY related */
36 #define MV88E1318_PGADR_REG		22
37 #define MV88E1318_MAC_CTRL_PG	2
38 #define MV88E1318_MAC_CTRL_REG	21
39 #define MV88E1318_RGMII_TX_CTRL	(1 << 4)
40 #define MV88E1318_RGMII_RX_CTRL	(1 << 5)
41 #define MV88E1318_LED_PG		3
42 #define MV88E1318_LED_POL_REG	17
43 #define MV88E1318_LED2_4		(1 << 4)
44 #define MV88E1318_LED2_5		(1 << 5)
45 
46 #endif /* __NSA310S_H */
47