1
2
3
4
5
6
7
8
9
10
11
12
13
14 #ifndef _RC32434_GPIO_H_
15 #define _RC32434_GPIO_H_
16
17 struct rb532_gpio_reg {
18 u32 gpiofunc;
19
20
21
22 u32 gpiocfg;
23
24
25
26 u32 gpiod;
27
28
29 u32 gpioilevel;
30
31
32 u32 gpioistat;
33
34
35
36 u32 gpionmien;
37 };
38
39
40 #define RC32434_UART0_SOUT (1 << 0)
41 #define RC32434_UART0_SIN (1 << 1)
42 #define RC32434_UART0_RTS (1 << 2)
43 #define RC32434_UART0_CTS (1 << 3)
44
45
46 #define RC32434_MP_BIT_22 (1 << 4)
47 #define RC32434_MP_BIT_23 (1 << 5)
48 #define RC32434_MP_BIT_24 (1 << 6)
49 #define RC32434_MP_BIT_25 (1 << 7)
50
51
52 #define RC32434_CPU_GPIO (1 << 8)
53
54
55 #define RC32434_AF_SPARE_6 (1 << 9)
56 #define RC32434_AF_SPARE_4 (1 << 10)
57 #define RC32434_AF_SPARE_3 (1 << 11)
58 #define RC32434_AF_SPARE_2 (1 << 12)
59
60
61 #define RC32434_PCI_MSU_GPIO (1 << 13)
62
63
64 #define GPIO_RDY 8
65 #define GPIO_WPX 9
66 #define GPIO_ALE 10
67 #define GPIO_CLE 11
68
69
70 #define CF_GPIO_NUM 13
71
72
73 #define GPIO_BTN_S1 1
74
75 extern void rb532_gpio_set_ilevel(int bit, unsigned gpio);
76 extern void rb532_gpio_set_istat(int bit, unsigned gpio);
77 extern void rb532_gpio_set_func(unsigned gpio);
78
79 #endif