18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * This header provides constants for hisilicon pinctrl bindings. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright (c) 2015 Hisilicon Limited. 58c2ecf20Sopenharmony_ci * Copyright (c) 2015 Linaro Limited. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify 88c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License version 2 as 98c2ecf20Sopenharmony_ci * published by the Free Software Foundation. 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * This program is distributed "as is" WITHOUT ANY WARRANTY of any 128c2ecf20Sopenharmony_ci * kind, whether express or implied; without even the implied warranty 138c2ecf20Sopenharmony_ci * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 148c2ecf20Sopenharmony_ci * GNU General Public License for more details. 158c2ecf20Sopenharmony_ci */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#ifndef _DT_BINDINGS_PINCTRL_HISI_H 188c2ecf20Sopenharmony_ci#define _DT_BINDINGS_PINCTRL_HISI_H 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* iomg bit definition */ 218c2ecf20Sopenharmony_ci#define MUX_M0 0 228c2ecf20Sopenharmony_ci#define MUX_M1 1 238c2ecf20Sopenharmony_ci#define MUX_M2 2 248c2ecf20Sopenharmony_ci#define MUX_M3 3 258c2ecf20Sopenharmony_ci#define MUX_M4 4 268c2ecf20Sopenharmony_ci#define MUX_M5 5 278c2ecf20Sopenharmony_ci#define MUX_M6 6 288c2ecf20Sopenharmony_ci#define MUX_M7 7 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* iocg bit definition */ 318c2ecf20Sopenharmony_ci#define PULL_MASK (3) 328c2ecf20Sopenharmony_ci#define PULL_DIS (0) 338c2ecf20Sopenharmony_ci#define PULL_UP (1 << 0) 348c2ecf20Sopenharmony_ci#define PULL_DOWN (1 << 1) 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* drive strength definition */ 378c2ecf20Sopenharmony_ci#define DRIVE_MASK (7 << 4) 388c2ecf20Sopenharmony_ci#define DRIVE1_02MA (0 << 4) 398c2ecf20Sopenharmony_ci#define DRIVE1_04MA (1 << 4) 408c2ecf20Sopenharmony_ci#define DRIVE1_08MA (2 << 4) 418c2ecf20Sopenharmony_ci#define DRIVE1_10MA (3 << 4) 428c2ecf20Sopenharmony_ci#define DRIVE2_02MA (0 << 4) 438c2ecf20Sopenharmony_ci#define DRIVE2_04MA (1 << 4) 448c2ecf20Sopenharmony_ci#define DRIVE2_08MA (2 << 4) 458c2ecf20Sopenharmony_ci#define DRIVE2_10MA (3 << 4) 468c2ecf20Sopenharmony_ci#define DRIVE3_04MA (0 << 4) 478c2ecf20Sopenharmony_ci#define DRIVE3_08MA (1 << 4) 488c2ecf20Sopenharmony_ci#define DRIVE3_12MA (2 << 4) 498c2ecf20Sopenharmony_ci#define DRIVE3_16MA (3 << 4) 508c2ecf20Sopenharmony_ci#define DRIVE3_20MA (4 << 4) 518c2ecf20Sopenharmony_ci#define DRIVE3_24MA (5 << 4) 528c2ecf20Sopenharmony_ci#define DRIVE3_32MA (6 << 4) 538c2ecf20Sopenharmony_ci#define DRIVE3_40MA (7 << 4) 548c2ecf20Sopenharmony_ci#define DRIVE4_02MA (0 << 4) 558c2ecf20Sopenharmony_ci#define DRIVE4_04MA (2 << 4) 568c2ecf20Sopenharmony_ci#define DRIVE4_08MA (4 << 4) 578c2ecf20Sopenharmony_ci#define DRIVE4_10MA (6 << 4) 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci/* drive strength definition for hi3660 */ 608c2ecf20Sopenharmony_ci#define DRIVE6_MASK (15 << 4) 618c2ecf20Sopenharmony_ci#define DRIVE6_04MA (0 << 4) 628c2ecf20Sopenharmony_ci#define DRIVE6_12MA (4 << 4) 638c2ecf20Sopenharmony_ci#define DRIVE6_19MA (8 << 4) 648c2ecf20Sopenharmony_ci#define DRIVE6_27MA (10 << 4) 658c2ecf20Sopenharmony_ci#define DRIVE6_32MA (15 << 4) 668c2ecf20Sopenharmony_ci#define DRIVE7_02MA (0 << 4) 678c2ecf20Sopenharmony_ci#define DRIVE7_04MA (1 << 4) 688c2ecf20Sopenharmony_ci#define DRIVE7_06MA (2 << 4) 698c2ecf20Sopenharmony_ci#define DRIVE7_08MA (3 << 4) 708c2ecf20Sopenharmony_ci#define DRIVE7_10MA (4 << 4) 718c2ecf20Sopenharmony_ci#define DRIVE7_12MA (5 << 4) 728c2ecf20Sopenharmony_ci#define DRIVE7_14MA (6 << 4) 738c2ecf20Sopenharmony_ci#define DRIVE7_16MA (7 << 4) 748c2ecf20Sopenharmony_ci#endif 75