root/scripts/dtc/include-prefixes/dt-bindings/pinctrl/hisi.h

/* [<][>][^][v][top][bottom][index][help] */
   1 /*
   2  * This header provides constants for hisilicon pinctrl bindings.
   3  *
   4  * Copyright (c) 2015 Hisilicon Limited.
   5  * Copyright (c) 2015 Linaro Limited.
   6  *
   7  * This program is free software; you can redistribute it and/or modify
   8  * it under the terms of the GNU General Public License version 2 as
   9  * published by the Free Software Foundation.
  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 _DT_BINDINGS_PINCTRL_HISI_H
  18 #define _DT_BINDINGS_PINCTRL_HISI_H
  19 
  20 /* iomg bit definition */
  21 #define MUX_M0          0
  22 #define MUX_M1          1
  23 #define MUX_M2          2
  24 #define MUX_M3          3
  25 #define MUX_M4          4
  26 #define MUX_M5          5
  27 #define MUX_M6          6
  28 #define MUX_M7          7
  29 
  30 /* iocg bit definition */
  31 #define PULL_MASK       (3)
  32 #define PULL_DIS        (0)
  33 #define PULL_UP         (1 << 0)
  34 #define PULL_DOWN       (1 << 1)
  35 
  36 /* drive strength definition */
  37 #define DRIVE_MASK      (7 << 4)
  38 #define DRIVE1_02MA     (0 << 4)
  39 #define DRIVE1_04MA     (1 << 4)
  40 #define DRIVE1_08MA     (2 << 4)
  41 #define DRIVE1_10MA     (3 << 4)
  42 #define DRIVE2_02MA     (0 << 4)
  43 #define DRIVE2_04MA     (1 << 4)
  44 #define DRIVE2_08MA     (2 << 4)
  45 #define DRIVE2_10MA     (3 << 4)
  46 #define DRIVE3_04MA     (0 << 4)
  47 #define DRIVE3_08MA     (1 << 4)
  48 #define DRIVE3_12MA     (2 << 4)
  49 #define DRIVE3_16MA     (3 << 4)
  50 #define DRIVE3_20MA     (4 << 4)
  51 #define DRIVE3_24MA     (5 << 4)
  52 #define DRIVE3_32MA     (6 << 4)
  53 #define DRIVE3_40MA     (7 << 4)
  54 #define DRIVE4_02MA     (0 << 4)
  55 #define DRIVE4_04MA     (2 << 4)
  56 #define DRIVE4_08MA     (4 << 4)
  57 #define DRIVE4_10MA     (6 << 4)
  58 
  59 /* drive strength definition for hi3660 */
  60 #define DRIVE6_MASK     (15 << 4)
  61 #define DRIVE6_04MA     (0 << 4)
  62 #define DRIVE6_12MA     (4 << 4)
  63 #define DRIVE6_19MA     (8 << 4)
  64 #define DRIVE6_27MA     (10 << 4)
  65 #define DRIVE6_32MA     (15 << 4)
  66 #define DRIVE7_02MA     (0 << 4)
  67 #define DRIVE7_04MA     (1 << 4)
  68 #define DRIVE7_06MA     (2 << 4)
  69 #define DRIVE7_08MA     (3 << 4)
  70 #define DRIVE7_10MA     (4 << 4)
  71 #define DRIVE7_12MA     (5 << 4)
  72 #define DRIVE7_14MA     (6 << 4)
  73 #define DRIVE7_16MA     (7 << 4)
  74 #endif

/* [<][>][^][v][top][bottom][index][help] */