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