1 /* $NetBSD: hisi.h,v 1.1 2017/06/15 20:14:23 jmcneill Exp $ */ 2 3 /* 4 * This header provides constants for hisilicon pinctrl bindings. 5 * 6 * Copyright (c) 2015 Hisilicon Limited. 7 * Copyright (c) 2015 Linaro Limited. 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License version 2 as 11 * published by the Free Software Foundation. 12 * 13 * This program is distributed "as is" WITHOUT ANY WARRANTY of any 14 * kind, whether express or implied; without even the implied warranty 15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 */ 18 19 #ifndef _DT_BINDINGS_PINCTRL_HISI_H 20 #define _DT_BINDINGS_PINCTRL_HISI_H 21 22 /* iomg bit definition */ 23 #define MUX_M0 0 24 #define MUX_M1 1 25 #define MUX_M2 2 26 #define MUX_M3 3 27 #define MUX_M4 4 28 #define MUX_M5 5 29 #define MUX_M6 6 30 #define MUX_M7 7 31 32 /* iocg bit definition */ 33 #define PULL_MASK (3) 34 #define PULL_DIS (0) 35 #define PULL_UP (1 << 0) 36 #define PULL_DOWN (1 << 1) 37 38 /* drive strength definition */ 39 #define DRIVE_MASK (7 << 4) 40 #define DRIVE1_02MA (0 << 4) 41 #define DRIVE1_04MA (1 << 4) 42 #define DRIVE1_08MA (2 << 4) 43 #define DRIVE1_10MA (3 << 4) 44 #define DRIVE2_02MA (0 << 4) 45 #define DRIVE2_04MA (1 << 4) 46 #define DRIVE2_08MA (2 << 4) 47 #define DRIVE2_10MA (3 << 4) 48 #define DRIVE3_04MA (0 << 4) 49 #define DRIVE3_08MA (1 << 4) 50 #define DRIVE3_12MA (2 << 4) 51 #define DRIVE3_16MA (3 << 4) 52 #define DRIVE3_20MA (4 << 4) 53 #define DRIVE3_24MA (5 << 4) 54 #define DRIVE3_32MA (6 << 4) 55 #define DRIVE3_40MA (7 << 4) 56 #define DRIVE4_02MA (0 << 4) 57 #define DRIVE4_04MA (2 << 4) 58 #define DRIVE4_08MA (4 << 4) 59 #define DRIVE4_10MA (6 << 4) 60 61 #endif 62