10 #define __LINUX_CH11_H
12 #include <linux/types.h>
18 #define USB_RT_HUB (USB_TYPE_CLASS | USB_RECIP_DEVICE)
19 #define USB_RT_PORT (USB_TYPE_CLASS | USB_RECIP_OTHER)
25 #define HUB_CLEAR_TT_BUFFER 8
26 #define HUB_RESET_TT 9
27 #define HUB_GET_TT_STATE 10
28 #define HUB_STOP_TT 11
34 #define HUB_SET_DEPTH 12
35 #define HUB_GET_PORT_ERR_COUNT 13
41 #define C_HUB_LOCAL_POWER 0
42 #define C_HUB_OVER_CURRENT 1
48 #define USB_PORT_FEAT_CONNECTION 0
49 #define USB_PORT_FEAT_ENABLE 1
50 #define USB_PORT_FEAT_SUSPEND 2
51 #define USB_PORT_FEAT_OVER_CURRENT 3
52 #define USB_PORT_FEAT_RESET 4
53 #define USB_PORT_FEAT_L1 5
54 #define USB_PORT_FEAT_POWER 8
55 #define USB_PORT_FEAT_LOWSPEED 9
56 #define USB_PORT_FEAT_C_CONNECTION 16
57 #define USB_PORT_FEAT_C_ENABLE 17
58 #define USB_PORT_FEAT_C_SUSPEND 18
59 #define USB_PORT_FEAT_C_OVER_CURRENT 19
60 #define USB_PORT_FEAT_C_RESET 20
61 #define USB_PORT_FEAT_TEST 21
62 #define USB_PORT_FEAT_INDICATOR 22
63 #define USB_PORT_FEAT_C_PORT_L1 23
69 #define USB_PORT_FEAT_LINK_STATE 5
70 #define USB_PORT_FEAT_U1_TIMEOUT 23
71 #define USB_PORT_FEAT_U2_TIMEOUT 24
72 #define USB_PORT_FEAT_C_PORT_LINK_STATE 25
73 #define USB_PORT_FEAT_C_PORT_CONFIG_ERROR 26
74 #define USB_PORT_FEAT_REMOTE_WAKE_MASK 27
75 #define USB_PORT_FEAT_BH_PORT_RESET 28
76 #define USB_PORT_FEAT_C_BH_PORT_RESET 29
77 #define USB_PORT_FEAT_FORCE_LINKPM_ACCEPT 30
79 #define USB_PORT_LPM_TIMEOUT(p) (((p) & 0xff) << 8)
82 #define USB_PORT_FEAT_REMOTE_WAKE_CONNECT (1 << 8)
83 #define USB_PORT_FEAT_REMOTE_WAKE_DISCONNECT (1 << 9)
84 #define USB_PORT_FEAT_REMOTE_WAKE_OVER_CURRENT (1 << 10)
99 #define USB_PORT_STAT_CONNECTION 0x0001
100 #define USB_PORT_STAT_ENABLE 0x0002
101 #define USB_PORT_STAT_SUSPEND 0x0004
102 #define USB_PORT_STAT_OVERCURRENT 0x0008
103 #define USB_PORT_STAT_RESET 0x0010
104 #define USB_PORT_STAT_L1 0x0020
106 #define USB_PORT_STAT_POWER 0x0100
107 #define USB_PORT_STAT_LOW_SPEED 0x0200
108 #define USB_PORT_STAT_HIGH_SPEED 0x0400
109 #define USB_PORT_STAT_TEST 0x0800
110 #define USB_PORT_STAT_INDICATOR 0x1000
117 #define USB_PORT_STAT_LINK_STATE 0x01e0
118 #define USB_SS_PORT_STAT_POWER 0x0200
119 #define USB_SS_PORT_STAT_SPEED 0x1c00
120 #define USB_PORT_STAT_SPEED_5GBPS 0x0000
123 #define USB_SS_PORT_STAT_MASK (USB_PORT_STAT_CONNECTION | \
124 USB_PORT_STAT_ENABLE | \
125 USB_PORT_STAT_OVERCURRENT | \
132 #define USB_SS_PORT_LS_U0 0x0000
133 #define USB_SS_PORT_LS_U1 0x0020
134 #define USB_SS_PORT_LS_U2 0x0040
135 #define USB_SS_PORT_LS_U3 0x0060
136 #define USB_SS_PORT_LS_SS_DISABLED 0x0080
137 #define USB_SS_PORT_LS_RX_DETECT 0x00a0
138 #define USB_SS_PORT_LS_SS_INACTIVE 0x00c0
139 #define USB_SS_PORT_LS_POLLING 0x00e0
140 #define USB_SS_PORT_LS_RECOVERY 0x0100
141 #define USB_SS_PORT_LS_HOT_RESET 0x0120
142 #define USB_SS_PORT_LS_COMP_MOD 0x0140
143 #define USB_SS_PORT_LS_LOOPBACK 0x0160
150 #define USB_PORT_STAT_C_CONNECTION 0x0001
151 #define USB_PORT_STAT_C_ENABLE 0x0002
152 #define USB_PORT_STAT_C_SUSPEND 0x0004
153 #define USB_PORT_STAT_C_OVERCURRENT 0x0008
154 #define USB_PORT_STAT_C_RESET 0x0010
155 #define USB_PORT_STAT_C_L1 0x0020
160 #define USB_PORT_STAT_C_BH_RESET 0x0020
161 #define USB_PORT_STAT_C_LINK_STATE 0x0040
162 #define USB_PORT_STAT_C_CONFIG_ERROR 0x0080
168 #define HUB_CHAR_LPSM 0x0003
169 #define HUB_CHAR_COMMON_LPSM 0x0000
170 #define HUB_CHAR_INDV_PORT_LPSM 0x0001
171 #define HUB_CHAR_NO_LPSM 0x0002
173 #define HUB_CHAR_COMPOUND 0x0004
175 #define HUB_CHAR_OCPM 0x0018
176 #define HUB_CHAR_COMMON_OCPM 0x0000
177 #define HUB_CHAR_INDV_PORT_OCPM 0x0008
178 #define HUB_CHAR_NO_OCPM 0x0010
180 #define HUB_CHAR_TTTT 0x0060
181 #define HUB_CHAR_PORTIND 0x0080
194 #define HUB_STATUS_LOCAL_POWER 0x0001
195 #define HUB_STATUS_OVERCURRENT 0x0002
196 #define HUB_CHANGE_LOCAL_POWER 0x0001
197 #define HUB_CHANGE_OVERCURRENT 0x0002
205 #define USB_DT_HUB (USB_TYPE_CLASS | 0x09)
206 #define USB_DT_SS_HUB (USB_TYPE_CLASS | 0x0a)
207 #define USB_DT_HUB_NONVAR_SIZE 7
208 #define USB_DT_SS_HUB_SIZE 12
215 #define USB_HUB_PR_FS 0
216 #define USB_HUB_PR_HS_NO_TT 0
217 #define USB_HUB_PR_HS_SINGLE_TT 1
218 #define USB_HUB_PR_HS_MULTI_TT 2
219 #define USB_HUB_PR_SS 3
246 #define HUB_LED_AUTO 0
247 #define HUB_LED_AMBER 1
248 #define HUB_LED_GREEN 2
249 #define HUB_LED_OFF 3
261 #define HUB_TTTT_8_BITS 0x00
262 #define HUB_TTTT_16_BITS 0x20
263 #define HUB_TTTT_24_BITS 0x40
264 #define HUB_TTTT_32_BITS 0x60