Home | History | Annotate | Line # | Download | only in pinctrl
am43xx.h revision 1.1
      1 /*	$NetBSD: am43xx.h,v 1.1 2017/06/15 20:14:23 jmcneill Exp $	*/
      2 
      3 /*
      4  * This header provides constants specific to AM43XX pinctrl bindings.
      5  */
      6 
      7 #ifndef _DT_BINDINGS_PINCTRL_AM43XX_H
      8 #define _DT_BINDINGS_PINCTRL_AM43XX_H
      9 
     10 #define MUX_MODE0	0
     11 #define MUX_MODE1	1
     12 #define MUX_MODE2	2
     13 #define MUX_MODE3	3
     14 #define MUX_MODE4	4
     15 #define MUX_MODE5	5
     16 #define MUX_MODE6	6
     17 #define MUX_MODE7	7
     18 #define MUX_MODE8	8
     19 #define MUX_MODE9	9
     20 
     21 #define PULL_DISABLE		(1 << 16)
     22 #define PULL_UP			(1 << 17)
     23 #define INPUT_EN		(1 << 18)
     24 #define SLEWCTRL_SLOW		(1 << 19)
     25 #define SLEWCTRL_FAST		0
     26 #define DS0_PULL_UP_DOWN_EN	(1 << 27)
     27 #define WAKEUP_ENABLE		(1 << 29)
     28 
     29 #define PIN_OUTPUT		(PULL_DISABLE)
     30 #define PIN_OUTPUT_PULLUP	(PULL_UP)
     31 #define PIN_OUTPUT_PULLDOWN	0
     32 #define PIN_INPUT		(INPUT_EN | PULL_DISABLE)
     33 #define PIN_INPUT_PULLUP	(INPUT_EN | PULL_UP)
     34 #define PIN_INPUT_PULLDOWN	(INPUT_EN)
     35 
     36 /*
     37  * Macro to allow using the absolute physical address instead of the
     38  * padconf registers instead of the offset from padconf base.
     39  */
     40 #define AM4372_IOPAD(pa, val)	(((pa) & 0xffff) - 0x0800) (val)
     41 
     42 #endif
     43 
     44