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