1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * This header provides constants for Keystone pinctrl bindings. 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (C) 2016 Texas Instruments Incorporated - http://www.ti.com/ 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify 7*4882a593Smuzhiyun * it under the terms of the GNU General Public License version 2 as 8*4882a593Smuzhiyun * published by the Free Software Foundation. 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * This program is distributed "as is" WITHOUT ANY WARRANTY of any 11*4882a593Smuzhiyun * kind, whether express or implied; without even the implied warranty 12*4882a593Smuzhiyun * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*4882a593Smuzhiyun * GNU General Public License for more details. 14*4882a593Smuzhiyun */ 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun #ifndef _DT_BINDINGS_PINCTRL_KEYSTONE_H 17*4882a593Smuzhiyun #define _DT_BINDINGS_PINCTRL_KEYSTONE_H 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #define MUX_MODE0 0 20*4882a593Smuzhiyun #define MUX_MODE1 1 21*4882a593Smuzhiyun #define MUX_MODE2 2 22*4882a593Smuzhiyun #define MUX_MODE3 3 23*4882a593Smuzhiyun #define MUX_MODE4 4 24*4882a593Smuzhiyun #define MUX_MODE5 5 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #define BUFFER_CLASS_B (0 << 19) 27*4882a593Smuzhiyun #define BUFFER_CLASS_C (1 << 19) 28*4882a593Smuzhiyun #define BUFFER_CLASS_D (2 << 19) 29*4882a593Smuzhiyun #define BUFFER_CLASS_E (3 << 19) 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun #define PULL_DISABLE (1 << 16) 32*4882a593Smuzhiyun #define PIN_PULLUP (1 << 17) 33*4882a593Smuzhiyun #define PIN_PULLDOWN (0 << 17) 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun #define KEYSTONE_IOPAD_OFFSET(pa, offset) (((pa) & 0xffff) - (offset)) 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun #define K2G_CORE_IOPAD(pa) KEYSTONE_IOPAD_OFFSET((pa), 0x1000) 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun #endif 40