xref: /OK3568_Linux_fs/external/rkwifibt/drivers/rtl8821cs/hal/halmac/halmac_gpio_cmd.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /******************************************************************************
2  *
3  * Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  ******************************************************************************/
15 
16 #ifndef HALMAC_GPIO_CMD
17 #define HALMAC_GPIO_CMD
18 
19 #include "halmac_2_platform.h"
20 
21 /* GPIO ID */
22 #define HALMAC_GPIO0		0
23 #define HALMAC_GPIO1		1
24 #define HALMAC_GPIO2		2
25 #define HALMAC_GPIO3		3
26 #define HALMAC_GPIO4		4
27 #define HALMAC_GPIO5		5
28 #define HALMAC_GPIO6		6
29 #define HALMAC_GPIO7		7
30 #define HALMAC_GPIO8		8
31 #define HALMAC_GPIO9		9
32 #define HALMAC_GPIO10		10
33 #define HALMAC_GPIO11		11
34 #define HALMAC_GPIO12		12
35 #define HALMAC_GPIO13		13
36 #define HALMAC_GPIO14		14
37 #define HALMAC_GPIO15		15
38 #define HALMAC_GPIO_NUM		16
39 
40 /* GPIO type */
41 #define HALMAC_GPIO_IN		0
42 #define HALMAC_GPIO_OUT		1
43 #define HALMAC_GPIO_IN_OUT	2
44 
45 /* Function name */
46 #define HALMAC_WL_HWPDN			0
47 #define HALMAC_BT_HWPDN			1
48 #define HALMAC_BT_GPIO			2
49 #define HALMAC_WL_HW_EXTWOL		3
50 #define HALMAC_BT_HW_EXTWOL		4
51 #define HALMAC_BT_SFLASH		5
52 #define HALMAC_WL_SFLASH		6
53 #define HALMAC_WL_LED			7
54 #define HALMAC_SDIO_INT			8
55 #define HALMAC_UART0			9
56 #define HALMAC_EEPROM			10
57 #define HALMAC_JTAG			11
58 #define HALMAC_LTE_COEX_UART		12
59 #define HALMAC_3W_LTE_WL_GPIO		13
60 #define HALMAC_GPIO2_3_WL_CTRL_EN	14
61 #define HALMAC_GPIO13_14_WL_CTRL_EN	15
62 #define HALMAC_DBG_GNT_WL_BT		16
63 #define HALMAC_BT_3DDLS_A		17
64 #define HALMAC_BT_3DDLS_B		18
65 #define HALMAC_BT_PTA			19
66 #define HALMAC_WL_PTA			20
67 #define HALMAC_WL_UART			21
68 #define HALMAC_WLMAC_DBG		22
69 #define HALMAC_WLPHY_DBG		23
70 #define HALMAC_BT_DBG			24
71 #define HALMAC_WLPHY_RFE_CTRL2GPIO	25
72 #define HALMAC_EXT_XTAL			26
73 #define HALMAC_SW_IO			27
74 #define HALMAC_BT_SDIO_INT		28
75 #define HALMAC_BT_JTAG			29
76 #define HALMAC_WL_JTAG			30
77 #define HALMAC_BT_RF			31
78 #define HALMAC_WLPHY_RFE_CTRL2GPIO_2	32
79 #define HALMAC_MAILBOX_3W		33
80 #define HALMAC_MAILBOX_1W		34
81 #define HALMAC_SW_DPDT_SEL		35
82 #define HALMAC_BT_DPDT_SEL		36
83 #define HALMAC_WL_DPDT_SEL		37
84 #define HALMAC_BT_PAPE_SEL		38
85 #define HALMAC_SW_PAPE_SEL		39
86 #define HALMAC_WL_PAPE_SEL		40
87 #define HALMAC_SW_LNAON_SET		41
88 #define HALMAC_BT_LNAON_SEL		42
89 #define HALMAC_WL_LNAON_SEL		43
90 #define HALMAC_SWR_CTRL_EN		44
91 #define HALMAC_UART_BRIDGE		45
92 #define HALMAC_BT_I2C			46
93 #define HALMAC_BTCOEX_CMD		47
94 #define HALMAC_BT_UART_INTF		48
95 #define HALMAC_DATA_CPU_JTAG		49
96 #define HALMAC_DATA_CPU_SFLASH		50
97 #define HALMAC_DATA_CPU_UART		51
98 
99 struct halmac_gpio_pimux_list {
100 	u16 func;
101 	u8 id;
102 	u8 type;
103 	u16 offset;
104 	u8 msk;
105 	u8 value;
106 };
107 
108 #endif
109