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