162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * This header provides constants for hisilicon pinctrl bindings. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2015 HiSilicon Limited. 662306a36Sopenharmony_ci * Copyright (c) 2015 Linaro Limited. 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#ifndef _DT_BINDINGS_PINCTRL_HISI_H 1062306a36Sopenharmony_ci#define _DT_BINDINGS_PINCTRL_HISI_H 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci/* iomg bit definition */ 1362306a36Sopenharmony_ci#define MUX_M0 0 1462306a36Sopenharmony_ci#define MUX_M1 1 1562306a36Sopenharmony_ci#define MUX_M2 2 1662306a36Sopenharmony_ci#define MUX_M3 3 1762306a36Sopenharmony_ci#define MUX_M4 4 1862306a36Sopenharmony_ci#define MUX_M5 5 1962306a36Sopenharmony_ci#define MUX_M6 6 2062306a36Sopenharmony_ci#define MUX_M7 7 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* iocg bit definition */ 2362306a36Sopenharmony_ci#define PULL_MASK (3) 2462306a36Sopenharmony_ci#define PULL_DIS (0) 2562306a36Sopenharmony_ci#define PULL_UP (1 << 0) 2662306a36Sopenharmony_ci#define PULL_DOWN (1 << 1) 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci/* drive strength definition */ 2962306a36Sopenharmony_ci#define DRIVE_MASK (7 << 4) 3062306a36Sopenharmony_ci#define DRIVE1_02MA (0 << 4) 3162306a36Sopenharmony_ci#define DRIVE1_04MA (1 << 4) 3262306a36Sopenharmony_ci#define DRIVE1_08MA (2 << 4) 3362306a36Sopenharmony_ci#define DRIVE1_10MA (3 << 4) 3462306a36Sopenharmony_ci#define DRIVE2_02MA (0 << 4) 3562306a36Sopenharmony_ci#define DRIVE2_04MA (1 << 4) 3662306a36Sopenharmony_ci#define DRIVE2_08MA (2 << 4) 3762306a36Sopenharmony_ci#define DRIVE2_10MA (3 << 4) 3862306a36Sopenharmony_ci#define DRIVE3_04MA (0 << 4) 3962306a36Sopenharmony_ci#define DRIVE3_08MA (1 << 4) 4062306a36Sopenharmony_ci#define DRIVE3_12MA (2 << 4) 4162306a36Sopenharmony_ci#define DRIVE3_16MA (3 << 4) 4262306a36Sopenharmony_ci#define DRIVE3_20MA (4 << 4) 4362306a36Sopenharmony_ci#define DRIVE3_24MA (5 << 4) 4462306a36Sopenharmony_ci#define DRIVE3_32MA (6 << 4) 4562306a36Sopenharmony_ci#define DRIVE3_40MA (7 << 4) 4662306a36Sopenharmony_ci#define DRIVE4_02MA (0 << 4) 4762306a36Sopenharmony_ci#define DRIVE4_04MA (2 << 4) 4862306a36Sopenharmony_ci#define DRIVE4_08MA (4 << 4) 4962306a36Sopenharmony_ci#define DRIVE4_10MA (6 << 4) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci/* drive strength definition for hi3660 */ 5262306a36Sopenharmony_ci#define DRIVE6_MASK (15 << 4) 5362306a36Sopenharmony_ci#define DRIVE6_04MA (0 << 4) 5462306a36Sopenharmony_ci#define DRIVE6_12MA (4 << 4) 5562306a36Sopenharmony_ci#define DRIVE6_19MA (8 << 4) 5662306a36Sopenharmony_ci#define DRIVE6_27MA (10 << 4) 5762306a36Sopenharmony_ci#define DRIVE6_32MA (15 << 4) 5862306a36Sopenharmony_ci#define DRIVE7_02MA (0 << 4) 5962306a36Sopenharmony_ci#define DRIVE7_04MA (1 << 4) 6062306a36Sopenharmony_ci#define DRIVE7_06MA (2 << 4) 6162306a36Sopenharmony_ci#define DRIVE7_08MA (3 << 4) 6262306a36Sopenharmony_ci#define DRIVE7_10MA (4 << 4) 6362306a36Sopenharmony_ci#define DRIVE7_12MA (5 << 4) 6462306a36Sopenharmony_ci#define DRIVE7_14MA (6 << 4) 6562306a36Sopenharmony_ci#define DRIVE7_16MA (7 << 4) 6662306a36Sopenharmony_ci#endif 67