1 /* 2 * mux_ti816x.h 3 * 4 * Copyright (C) 2013, Adeneo Embedded <www.adeneo-embedded.com> 5 * Antoine Tenart, <atenart@adeneo-embedded.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License as 9 * published by the Free Software Foundation version 2. 10 * 11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any 12 * kind, whether express or implied; without even the implied warranty 13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 */ 16 17 #ifndef _MUX_TI816X_H_ 18 #define _MUX_TI816X_H_ 19 20 #include <asm/io.h> 21 22 #define MUX_CFG(value, offset) \ 23 __raw_writel(value, (CTRL_BASE + offset)); 24 25 #define PULLDOWN_EN (0x0 << 4) /* Pull Down Selection */ 26 #define PULLUP_EN (0x1 << 4) /* Pull Up Selection */ 27 #define PULLUDEN (0x0 << 3) /* Pull up enabled */ 28 #define PULLUDDIS (0x1 << 3) /* Pull up disabled */ 29 #define MODE(val) (val) /* used for Readability */ 30 31 32 /* 33 * PAD CONTROL OFFSETS 34 * Field names corresponds to the pad signal name 35 */ 36 struct pad_signals { 37 int pincntl1; 38 int pincntl2; 39 int pincntl3; 40 int pincntl4; 41 int pincntl5; 42 int pincntl6; 43 int pincntl7; 44 int pincntl8; 45 int pincntl9; 46 int pincntl10; 47 int pincntl11; 48 int pincntl12; 49 int pincntl13; 50 int pincntl14; 51 int pincntl15; 52 int pincntl16; 53 int pincntl17; 54 int pincntl18; 55 int pincntl19; 56 int pincntl20; 57 int pincntl21; 58 int pincntl22; 59 int pincntl23; 60 int pincntl24; 61 int pincntl25; 62 int pincntl26; 63 int pincntl27; 64 int pincntl28; 65 int pincntl29; 66 int pincntl30; 67 int pincntl31; 68 int pincntl32; 69 int pincntl33; 70 int pincntl34; 71 int pincntl35; 72 int pincntl36; 73 int pincntl37; 74 int pincntl38; 75 int pincntl39; 76 int pincntl40; 77 int pincntl41; 78 int pincntl42; 79 int pincntl43; 80 int pincntl44; 81 int pincntl45; 82 int pincntl46; 83 int pincntl47; 84 int pincntl48; 85 int pincntl49; 86 int pincntl50; 87 int pincntl51; 88 int pincntl52; 89 int pincntl53; 90 int pincntl54; 91 int pincntl55; 92 int pincntl56; 93 int pincntl57; 94 int pincntl58; 95 int pincntl59; 96 int pincntl60; 97 int pincntl61; 98 int pincntl62; 99 int pincntl63; 100 int pincntl64; 101 int pincntl65; 102 int pincntl66; 103 int pincntl67; 104 int pincntl68; 105 int pincntl69; 106 int pincntl70; 107 int pincntl71; 108 int pincntl72; 109 int pincntl73; 110 int pincntl74; 111 int pincntl75; 112 int pincntl76; 113 int pincntl77; 114 int pincntl78; 115 int pincntl79; 116 int pincntl80; 117 int pincntl81; 118 int pincntl82; 119 int pincntl83; 120 int pincntl84; 121 int pincntl85; 122 int pincntl86; 123 int pincntl87; 124 int pincntl88; 125 int pincntl89; 126 int pincntl90; 127 int pincntl91; 128 int pincntl92; 129 int pincntl93; 130 int pincntl94; 131 int pincntl95; 132 int pincntl96; 133 int pincntl97; 134 int pincntl98; 135 int pincntl99; 136 int pincntl100; 137 int pincntl101; 138 int pincntl102; 139 int pincntl103; 140 int pincntl104; 141 int pincntl105; 142 int pincntl106; 143 int pincntl107; 144 int pincntl108; 145 int pincntl109; 146 int pincntl110; 147 int pincntl111; 148 int pincntl112; 149 int pincntl113; 150 int pincntl114; 151 int pincntl115; 152 int pincntl116; 153 int pincntl117; 154 int pincntl118; 155 int pincntl119; 156 int pincntl120; 157 int pincntl121; 158 int pincntl122; 159 int pincntl123; 160 int pincntl124; 161 int pincntl125; 162 int pincntl126; 163 int pincntl127; 164 int pincntl128; 165 int pincntl129; 166 int pincntl130; 167 int pincntl131; 168 int pincntl132; 169 int pincntl133; 170 int pincntl134; 171 int pincntl135; 172 int pincntl136; 173 int pincntl137; 174 int pincntl138; 175 int pincntl139; 176 int pincntl140; 177 int pincntl141; 178 int pincntl142; 179 int pincntl143; 180 int pincntl144; 181 int pincntl145; 182 int pincntl146; 183 int pincntl147; 184 int pincntl148; 185 int pincntl149; 186 int pincntl150; 187 int pincntl151; 188 int pincntl152; 189 int pincntl153; 190 int pincntl154; 191 int pincntl155; 192 int pincntl156; 193 int pincntl157; 194 int pincntl158; 195 int pincntl159; 196 int pincntl160; 197 int pincntl161; 198 int pincntl162; 199 int pincntl163; 200 int pincntl164; 201 int pincntl165; 202 int pincntl166; 203 int pincntl167; 204 int pincntl168; 205 int pincntl169; 206 int pincntl170; 207 int pincntl171; 208 int pincntl172; 209 int pincntl173; 210 int pincntl174; 211 int pincntl175; 212 int pincntl176; 213 int pincntl177; 214 int pincntl178; 215 int pincntl179; 216 int pincntl180; 217 int pincntl181; 218 int pincntl182; 219 int pincntl183; 220 int pincntl184; 221 int pincntl185; 222 int pincntl186; 223 int pincntl187; 224 int pincntl188; 225 int pincntl189; 226 int pincntl190; 227 int pincntl191; 228 int pincntl192; 229 int pincntl193; 230 int pincntl194; 231 int pincntl195; 232 int pincntl196; 233 int pincntl197; 234 int pincntl198; 235 int pincntl199; 236 int pincntl200; 237 int pincntl201; 238 int pincntl202; 239 int pincntl203; 240 int pincntl204; 241 int pincntl205; 242 int pincntl206; 243 int pincntl207; 244 int pincntl208; 245 int pincntl209; 246 int pincntl210; 247 int pincntl211; 248 int pincntl212; 249 int pincntl213; 250 int pincntl214; 251 int pincntl215; 252 int pincntl216; 253 int pincntl217; 254 int pincntl218; 255 int pincntl219; 256 int pincntl220; 257 int pincntl221; 258 int pincntl222; 259 int pincntl223; 260 int pincntl224; 261 int pincntl225; 262 int pincntl226; 263 int pincntl227; 264 int pincntl228; 265 int pincntl229; 266 int pincntl230; 267 int pincntl231; 268 int pincntl232; 269 int pincntl233; 270 int pincntl234; 271 int pincntl235; 272 int pincntl236; 273 int pincntl237; 274 int pincntl238; 275 int pincntl239; 276 int pincntl240; 277 int pincntl241; 278 int pincntl242; 279 int pincntl243; 280 int pincntl244; 281 int pincntl245; 282 int pincntl246; 283 int pincntl247; 284 int pincntl248; 285 int pincntl249; 286 int pincntl250; 287 int pincntl251; 288 int pincntl252; 289 int pincntl253; 290 int pincntl254; 291 int pincntl255; 292 int pincntl256; 293 int pincntl257; 294 int pincntl258; 295 int pincntl259; 296 int pincntl260; 297 int pincntl261; 298 int pincntl262; 299 int pincntl263; 300 int pincntl264; 301 int pincntl265; 302 int pincntl266; 303 int pincntl267; 304 int pincntl268; 305 int pincntl269; 306 int pincntl270; 307 int pincntl271; 308 int pincntl272; 309 int pincntl273; 310 int pincntl274; 311 int pincntl275; 312 int pincntl276; 313 int pincntl277; 314 int pincntl278; 315 int pincntl279; 316 int pincntl280; 317 int pincntl281; 318 int pincntl282; 319 int pincntl283; 320 int pincntl284; 321 int pincntl285; 322 int pincntl286; 323 int pincntl287; 324 int pincntl288; 325 int pincntl289; 326 int pincntl290; 327 int pincntl291; 328 int pincntl292; 329 int pincntl293; 330 int pincntl294; 331 int pincntl295; 332 int pincntl296; 333 int pincntl297; 334 int pincntl298; 335 int pincntl299; 336 int pincntl300; 337 int pincntl301; 338 int pincntl302; 339 int pincntl303; 340 int pincntl304; 341 int pincntl305; 342 int pincntl306; 343 int pincntl307; 344 int pincntl308; 345 int pincntl309; 346 int pincntl310; 347 int pincntl311; 348 int pincntl312; 349 int pincntl313; 350 int pincntl314; 351 int pincntl315; 352 int pincntl316; 353 int pincntl317; 354 int pincntl318; 355 int pincntl319; 356 int pincntl320; 357 int pincntl321; 358 int pincntl322; 359 int pincntl323; 360 }; 361 362 #endif /* endif _MUX_TI816X_H_ */ 363