12d91a977SSimon Glass /* 22d91a977SSimon Glass * This header provides constants for OMAP pinctrl bindings. 32d91a977SSimon Glass * 42d91a977SSimon Glass * Copyright (C) 2009 Nokia 52d91a977SSimon Glass * Copyright (C) 2009-2010 Texas Instruments 6*f41d6b7dSSimon Glass * 7*f41d6b7dSSimon Glass * SPDX-License-Identifier: GPL-2.0 82d91a977SSimon Glass */ 92d91a977SSimon Glass 102d91a977SSimon Glass #ifndef _DT_BINDINGS_PINCTRL_OMAP_H 112d91a977SSimon Glass #define _DT_BINDINGS_PINCTRL_OMAP_H 122d91a977SSimon Glass 132d91a977SSimon Glass /* 34xx mux mode options for each pin. See TRM for options */ 142d91a977SSimon Glass #define MUX_MODE0 0 152d91a977SSimon Glass #define MUX_MODE1 1 162d91a977SSimon Glass #define MUX_MODE2 2 172d91a977SSimon Glass #define MUX_MODE3 3 182d91a977SSimon Glass #define MUX_MODE4 4 192d91a977SSimon Glass #define MUX_MODE5 5 202d91a977SSimon Glass #define MUX_MODE6 6 212d91a977SSimon Glass #define MUX_MODE7 7 222d91a977SSimon Glass 232d91a977SSimon Glass /* 24xx/34xx mux bit defines */ 242d91a977SSimon Glass #define PULL_ENA (1 << 3) 252d91a977SSimon Glass #define PULL_UP (1 << 4) 262d91a977SSimon Glass #define ALTELECTRICALSEL (1 << 5) 272d91a977SSimon Glass 282d91a977SSimon Glass /* 34xx specific mux bit defines */ 292d91a977SSimon Glass #define INPUT_EN (1 << 8) 302d91a977SSimon Glass #define OFF_EN (1 << 9) 312d91a977SSimon Glass #define OFFOUT_EN (1 << 10) 322d91a977SSimon Glass #define OFFOUT_VAL (1 << 11) 332d91a977SSimon Glass #define OFF_PULL_EN (1 << 12) 342d91a977SSimon Glass #define OFF_PULL_UP (1 << 13) 352d91a977SSimon Glass #define WAKEUP_EN (1 << 14) 362d91a977SSimon Glass 372d91a977SSimon Glass /* 44xx specific mux bit defines */ 382d91a977SSimon Glass #define WAKEUP_EVENT (1 << 15) 392d91a977SSimon Glass 402d91a977SSimon Glass /* Active pin states */ 412d91a977SSimon Glass #define PIN_OUTPUT 0 422d91a977SSimon Glass #define PIN_OUTPUT_PULLUP (PIN_OUTPUT | PULL_ENA | PULL_UP) 432d91a977SSimon Glass #define PIN_OUTPUT_PULLDOWN (PIN_OUTPUT | PULL_ENA) 442d91a977SSimon Glass #define PIN_INPUT INPUT_EN 452d91a977SSimon Glass #define PIN_INPUT_PULLUP (PULL_ENA | INPUT_EN | PULL_UP) 462d91a977SSimon Glass #define PIN_INPUT_PULLDOWN (PULL_ENA | INPUT_EN) 472d91a977SSimon Glass 482d91a977SSimon Glass /* Off mode states */ 492d91a977SSimon Glass #define PIN_OFF_NONE 0 502d91a977SSimon Glass #define PIN_OFF_OUTPUT_HIGH (OFF_EN | OFFOUT_EN | OFFOUT_VAL) 512d91a977SSimon Glass #define PIN_OFF_OUTPUT_LOW (OFF_EN | OFFOUT_EN) 522d91a977SSimon Glass #define PIN_OFF_INPUT_PULLUP (OFF_EN | OFF_PULL_EN | OFF_PULL_UP) 532d91a977SSimon Glass #define PIN_OFF_INPUT_PULLDOWN (OFF_EN | OFF_PULL_EN) 542d91a977SSimon Glass #define PIN_OFF_WAKEUPENABLE WAKEUP_EN 552d91a977SSimon Glass 562d91a977SSimon Glass #endif 572d91a977SSimon Glass 58