18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This header provides constants for Keystone pinctrl bindings. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 78c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License version 2 as 88c2ecf20Sopenharmony_ci * published by the Free Software Foundation. 98c2ecf20Sopenharmony_ci * 108c2ecf20Sopenharmony_ci * This program is distributed "as is" WITHOUT ANY WARRANTY of any 118c2ecf20Sopenharmony_ci * kind, whether express or implied; without even the implied warranty 128c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 138c2ecf20Sopenharmony_ci * GNU General Public License for more details. 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#ifndef _DT_BINDINGS_PINCTRL_KEYSTONE_H 178c2ecf20Sopenharmony_ci#define _DT_BINDINGS_PINCTRL_KEYSTONE_H 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#define MUX_MODE0 0 208c2ecf20Sopenharmony_ci#define MUX_MODE1 1 218c2ecf20Sopenharmony_ci#define MUX_MODE2 2 228c2ecf20Sopenharmony_ci#define MUX_MODE3 3 238c2ecf20Sopenharmony_ci#define MUX_MODE4 4 248c2ecf20Sopenharmony_ci#define MUX_MODE5 5 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#define BUFFER_CLASS_B (0 << 19) 278c2ecf20Sopenharmony_ci#define BUFFER_CLASS_C (1 << 19) 288c2ecf20Sopenharmony_ci#define BUFFER_CLASS_D (2 << 19) 298c2ecf20Sopenharmony_ci#define BUFFER_CLASS_E (3 << 19) 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci#define PULL_DISABLE (1 << 16) 328c2ecf20Sopenharmony_ci#define PIN_PULLUP (1 << 17) 338c2ecf20Sopenharmony_ci#define PIN_PULLDOWN (0 << 17) 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#define KEYSTONE_IOPAD_OFFSET(pa, offset) (((pa) & 0xffff) - (offset)) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#define K2G_CORE_IOPAD(pa) KEYSTONE_IOPAD_OFFSET((pa), 0x1000) 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#endif 40