]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
b08b4f8e G |
2 | /* |
3 | * PKUnity General-Purpose Input/Output (GPIO) Registers | |
4 | */ | |
5 | ||
6 | /* | |
7 | * Voltage Status Reg GPIO_GPLR. | |
8 | */ | |
1cf46c42 | 9 | #define GPIO_GPLR (PKUNITY_GPIO_BASE + 0x0000) |
b08b4f8e G |
10 | /* |
11 | * Pin Direction Reg GPIO_GPDR. | |
12 | */ | |
1cf46c42 | 13 | #define GPIO_GPDR (PKUNITY_GPIO_BASE + 0x0004) |
b08b4f8e G |
14 | /* |
15 | * Output Pin Set Reg GPIO_GPSR. | |
16 | */ | |
1cf46c42 | 17 | #define GPIO_GPSR (PKUNITY_GPIO_BASE + 0x0008) |
b08b4f8e G |
18 | /* |
19 | * Output Pin Clear Reg GPIO_GPCR. | |
20 | */ | |
1cf46c42 | 21 | #define GPIO_GPCR (PKUNITY_GPIO_BASE + 0x000C) |
b08b4f8e G |
22 | /* |
23 | * Raise Edge Detect Reg GPIO_GRER. | |
24 | */ | |
1cf46c42 | 25 | #define GPIO_GRER (PKUNITY_GPIO_BASE + 0x0010) |
b08b4f8e G |
26 | /* |
27 | * Fall Edge Detect Reg GPIO_GFER. | |
28 | */ | |
1cf46c42 | 29 | #define GPIO_GFER (PKUNITY_GPIO_BASE + 0x0014) |
b08b4f8e G |
30 | /* |
31 | * Edge Status Reg GPIO_GEDR. | |
32 | */ | |
1cf46c42 | 33 | #define GPIO_GEDR (PKUNITY_GPIO_BASE + 0x0018) |
b08b4f8e G |
34 | /* |
35 | * Sepcial Voltage Detect Reg GPIO_GPIR. | |
36 | */ | |
1cf46c42 | 37 | #define GPIO_GPIR (PKUNITY_GPIO_BASE + 0x0020) |
b08b4f8e G |
38 | |
39 | #define GPIO_MIN (0) | |
40 | #define GPIO_MAX (27) | |
41 | ||
42 | #define GPIO_GPIO(Nb) (0x00000001 << (Nb)) /* GPIO [0..27] */ | |
43 | #define GPIO_GPIO0 GPIO_GPIO(0) /* GPIO [0] */ | |
44 | #define GPIO_GPIO1 GPIO_GPIO(1) /* GPIO [1] */ | |
45 | #define GPIO_GPIO2 GPIO_GPIO(2) /* GPIO [2] */ | |
46 | #define GPIO_GPIO3 GPIO_GPIO(3) /* GPIO [3] */ | |
47 | #define GPIO_GPIO4 GPIO_GPIO(4) /* GPIO [4] */ | |
48 | #define GPIO_GPIO5 GPIO_GPIO(5) /* GPIO [5] */ | |
49 | #define GPIO_GPIO6 GPIO_GPIO(6) /* GPIO [6] */ | |
50 | #define GPIO_GPIO7 GPIO_GPIO(7) /* GPIO [7] */ | |
51 | #define GPIO_GPIO8 GPIO_GPIO(8) /* GPIO [8] */ | |
52 | #define GPIO_GPIO9 GPIO_GPIO(9) /* GPIO [9] */ | |
53 | #define GPIO_GPIO10 GPIO_GPIO(10) /* GPIO [10] */ | |
54 | #define GPIO_GPIO11 GPIO_GPIO(11) /* GPIO [11] */ | |
55 | #define GPIO_GPIO12 GPIO_GPIO(12) /* GPIO [12] */ | |
56 | #define GPIO_GPIO13 GPIO_GPIO(13) /* GPIO [13] */ | |
57 | #define GPIO_GPIO14 GPIO_GPIO(14) /* GPIO [14] */ | |
58 | #define GPIO_GPIO15 GPIO_GPIO(15) /* GPIO [15] */ | |
59 | #define GPIO_GPIO16 GPIO_GPIO(16) /* GPIO [16] */ | |
60 | #define GPIO_GPIO17 GPIO_GPIO(17) /* GPIO [17] */ | |
61 | #define GPIO_GPIO18 GPIO_GPIO(18) /* GPIO [18] */ | |
62 | #define GPIO_GPIO19 GPIO_GPIO(19) /* GPIO [19] */ | |
63 | #define GPIO_GPIO20 GPIO_GPIO(20) /* GPIO [20] */ | |
64 | #define GPIO_GPIO21 GPIO_GPIO(21) /* GPIO [21] */ | |
65 | #define GPIO_GPIO22 GPIO_GPIO(22) /* GPIO [22] */ | |
66 | #define GPIO_GPIO23 GPIO_GPIO(23) /* GPIO [23] */ | |
67 | #define GPIO_GPIO24 GPIO_GPIO(24) /* GPIO [24] */ | |
68 | #define GPIO_GPIO25 GPIO_GPIO(25) /* GPIO [25] */ | |
69 | #define GPIO_GPIO26 GPIO_GPIO(26) /* GPIO [26] */ | |
70 | #define GPIO_GPIO27 GPIO_GPIO(27) /* GPIO [27] */ | |
71 |