8d1d22eea71a88c24025b8a29858f99ec7956884
[openwrt.git] / target / linux / ar71xx / files / arch / mips / include / asm / mach-ath79 / mach-rb750.h
1 /*
2 * MikroTik RouterBOARD 750 definitions
3 *
4 * Copyright (C) 2010-2012 Gabor Juhos <juhosg@openwrt.org>
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published
8 * by the Free Software Foundation.
9 */
10 #ifndef _MACH_RB750_H
11 #define _MACH_RB750_H
12
13 #include <linux/bitops.h>
14
15 #define RB750_GPIO_LVC573_LE 0 /* Latch enable on LVC573 */
16 #define RB750_GPIO_NAND_IO0 1 /* NAND I/O 0 */
17 #define RB750_GPIO_NAND_IO1 2 /* NAND I/O 1 */
18 #define RB750_GPIO_NAND_IO2 3 /* NAND I/O 2 */
19 #define RB750_GPIO_NAND_IO3 4 /* NAND I/O 3 */
20 #define RB750_GPIO_NAND_IO4 5 /* NAND I/O 4 */
21 #define RB750_GPIO_NAND_IO5 6 /* NAND I/O 5 */
22 #define RB750_GPIO_NAND_IO6 7 /* NAND I/O 6 */
23 #define RB750_GPIO_NAND_IO7 8 /* NAND I/O 7 */
24 #define RB750_GPIO_NAND_NCE 11 /* NAND Chip Enable (active low) */
25 #define RB750_GPIO_NAND_RDY 12 /* NAND Ready */
26 #define RB750_GPIO_NAND_CLE 14 /* NAND Command Latch Enable */
27 #define RB750_GPIO_NAND_ALE 15 /* NAND Address Latch Enable */
28 #define RB750_GPIO_NAND_NRE 16 /* NAND Read Enable (active low) */
29 #define RB750_GPIO_NAND_NWE 17 /* NAND Write Enable (active low) */
30
31 #define RB750_GPIO_BTN_RESET 1
32 #define RB750_GPIO_SPI_CS0 2
33 #define RB750_GPIO_LED_ACT 12
34 #define RB750_GPIO_LED_PORT1 13
35 #define RB750_GPIO_LED_PORT2 14
36 #define RB750_GPIO_LED_PORT3 15
37 #define RB750_GPIO_LED_PORT4 16
38 #define RB750_GPIO_LED_PORT5 17
39
40 #define RB750_LED_ACT BIT(RB750_GPIO_LED_ACT)
41 #define RB750_LED_PORT1 BIT(RB750_GPIO_LED_PORT1)
42 #define RB750_LED_PORT2 BIT(RB750_GPIO_LED_PORT2)
43 #define RB750_LED_PORT3 BIT(RB750_GPIO_LED_PORT3)
44 #define RB750_LED_PORT4 BIT(RB750_GPIO_LED_PORT4)
45 #define RB750_LED_PORT5 BIT(RB750_GPIO_LED_PORT5)
46 #define RB750_NAND_NCE BIT(RB750_GPIO_NAND_NCE)
47
48 #define RB750_LVC573_LE BIT(RB750_GPIO_LVC573_LE)
49
50 #define RB750_LED_BITS (RB750_LED_PORT1 | RB750_LED_PORT2 | RB750_LED_PORT3 | \
51 RB750_LED_PORT4 | RB750_LED_PORT5 | RB750_LED_ACT)
52
53 struct rb750_led_data {
54 char *name;
55 char *default_trigger;
56 u32 mask;
57 int active_low;
58 };
59
60 struct rb750_led_platform_data {
61 int num_leds;
62 struct rb750_led_data *leds;
63 void (*latch_change)(u32 clear, u32 set);
64 };
65
66 struct rb7xx_nand_platform_data {
67 u32 nce_line;
68
69 void (*enable_pins)(void);
70 void (*disable_pins)(void);
71 void (*latch_change)(u32, u32);
72 };
73
74 #endif /* _MACH_RB750_H */
This page took 0.040311 seconds and 3 git commands to generate.