am33xx.h revision 1.1.1.1
1/*	$NetBSD: am33xx.h,v 1.1.1.1 2017/06/15 20:14:23 jmcneill Exp $	*/
2
3/*
4 * This header provides constants specific to AM33XX pinctrl bindings.
5 */
6
7#ifndef _DT_BINDINGS_PINCTRL_AM33XX_H
8#define _DT_BINDINGS_PINCTRL_AM33XX_H
9
10#include <dt-bindings/pinctrl/omap.h>
11
12/* am33xx specific mux bit defines */
13#undef PULL_ENA
14#undef INPUT_EN
15
16#define PULL_DISABLE		(1 << 3)
17#define INPUT_EN		(1 << 5)
18#define SLEWCTRL_SLOW		(1 << 6)
19#define SLEWCTRL_FAST		0
20
21/* update macro depending on INPUT_EN and PULL_ENA */
22#undef PIN_OUTPUT
23#undef PIN_OUTPUT_PULLUP
24#undef PIN_OUTPUT_PULLDOWN
25#undef PIN_INPUT
26#undef PIN_INPUT_PULLUP
27#undef PIN_INPUT_PULLDOWN
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/* undef non-existing modes */
37#undef PIN_OFF_NONE
38#undef PIN_OFF_OUTPUT_HIGH
39#undef PIN_OFF_OUTPUT_LOW
40#undef PIN_OFF_INPUT_PULLUP
41#undef PIN_OFF_INPUT_PULLDOWN
42#undef PIN_OFF_WAKEUPENABLE
43
44#endif
45
46