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