pinctrl: keep the same GPIO ID after adding GPIOV_0 for G12A

PD#163124: pinctrl: keep the same GPIO ID after adding GPIOV_0 for G12A

Change-Id: I45b99df3a15e2bf0f7ad34ae8705dc4a509c70a1
Signed-off-by: Xingyu Chen <xingyu.chen@amlogic.com>
This commit is contained in:
Xingyu Chen
2018-03-27 18:59:13 +08:00
committed by Jianxin Pan
parent ae1d0b86a4
commit 3fcf2b78e4
2 changed files with 93 additions and 95 deletions

View File

@@ -14,6 +14,7 @@
#include "pinconf-meson-g12a.h"
static const struct pinctrl_pin_desc meson_g12a_periphs_pins[] = {
MESON_PIN(GPIOV_0),
MESON_PIN(GPIOZ_0),
MESON_PIN(GPIOZ_1),
MESON_PIN(GPIOZ_2),
@@ -99,7 +100,6 @@ static const struct pinctrl_pin_desc meson_g12a_periphs_pins[] = {
MESON_PIN(GPIOX_17),
MESON_PIN(GPIOX_18),
MESON_PIN(GPIOX_19),
MESON_PIN(GPIOV_0),
};
static const struct pinctrl_pin_desc meson_g12a_aobus_pins[] = {
@@ -459,6 +459,7 @@ static const unsigned int tdmc_dout2_z_pins[] = {GPIOZ_4};
static const unsigned int tdmc_dout3_z_pins[] = {GPIOZ_5};
static struct meson_pmx_group meson_g12a_periphs_groups[] = {
GPIO_GROUP(GPIOV_0),
GPIO_GROUP(GPIOZ_0),
GPIO_GROUP(GPIOZ_1),
GPIO_GROUP(GPIOZ_2),
@@ -544,7 +545,6 @@ static struct meson_pmx_group meson_g12a_periphs_groups[] = {
GPIO_GROUP(GPIOX_17),
GPIO_GROUP(GPIOX_18),
GPIO_GROUP(GPIOX_19),
GPIO_GROUP(GPIOV_0),
/* bank BOOT */
GROUP(emmc_nand_d0, 1),
@@ -956,6 +956,8 @@ static struct meson_pmx_group meson_g12a_aobus_groups[] = {
};
static const char * const gpio_periphs_groups[] = {
"GPIOV_0",
"GPIOZ_0", "GPIOZ_1", "GPIOZ_2", "GPIOZ_3", "GPIOZ_4",
"GPIOZ_5", "GPIOZ_6", "GPIOZ_7", "GPIOZ_8", "GPIOZ_9",
"GPIOZ_10", "GPIOZ_11", "GPIOZ_12", "GPIOZ_13", "GPIOZ_14",
@@ -981,8 +983,6 @@ static const char * const gpio_periphs_groups[] = {
"GPIOX_5", "GPIOX_6", "GPIOX_7", "GPIOX_8", "GPIOX_9",
"GPIOX_10", "GPIOX_11", "GPIOX_12", "GPIOX_13", "GPIOX_14",
"GPIOX_15", "GPIOX_16", "GPIOX_17", "GPIOX_18", "GPIOX_19",
"GPIOV_0",
};
static const char * const emmc_groups[] = {
@@ -1347,6 +1347,8 @@ static struct meson_pmx_func meson_g12a_aobus_functions[] = {
static struct meson_bank meson_g12a_periphs_banks[] = {
/* name first last irq pullen pull dir out in */
BANK("V", GPIOV_0, GPIOV_0, -1,
5, 17, 5, 17, 16, 17, 17, 17, 18, 17),
BANK("Z", GPIOZ_0, GPIOZ_15, 12,
4, 0, 4, 0, 12, 0, 13, 0, 14, 0),
BANK("H", GPIOH_0, GPIOH_8, 28,
@@ -1359,8 +1361,6 @@ static struct meson_bank meson_g12a_periphs_banks[] = {
5, 0, 5, 0, 16, 0, 17, 0, 18, 0),
BANK("X", GPIOX_0, GPIOX_19, 77,
2, 0, 2, 0, 6, 0, 7, 0, 8, 0),
BANK("V", GPIOV_0, GPIOV_0, -1,
5, 17, 5, 17, 16, 17, 17, 17, 18, 17),
};
static struct meson_bank meson_g12a_aobus_banks[] = {
@@ -1375,13 +1375,13 @@ static struct meson_bank meson_g12a_aobus_banks[] = {
static struct meson_pmx_bank meson_g12a_periphs_pmx_banks[] = {
/* name first lask reg offset */
BANK_PMX("V", GPIOV_0, GPIOV_0, 0x2, 24),
BANK_PMX("Z", GPIOZ_0, GPIOZ_15, 0x6, 0),
BANK_PMX("H", GPIOH_0, GPIOH_8, 0xb, 0),
BANK_PMX("BOOT", BOOT_0, BOOT_15, 0x0, 0),
BANK_PMX("C", GPIOC_0, GPIOC_7, 0x9, 0),
BANK_PMX("A", GPIOA_0, GPIOA_15, 0xd, 0),
BANK_PMX("X", GPIOX_0, GPIOX_19, 0x3, 0),
BANK_PMX("V", GPIOV_0, GPIOV_0, 0x2, 24),
};
static struct meson_axg_pmx_data meson_g12a_periphs_pmx_banks_data = {

View File

@@ -27,93 +27,91 @@
#define GPIO_TEST_N 15
/* Second GPIO chip */
#define GPIOZ_0 0
#define GPIOZ_1 1
#define GPIOZ_2 2
#define GPIOZ_3 3
#define GPIOZ_4 4
#define GPIOZ_5 5
#define GPIOZ_6 6
#define GPIOZ_7 7
#define GPIOZ_8 8
#define GPIOZ_9 9
#define GPIOZ_10 10
#define GPIOZ_11 11
#define GPIOZ_12 12
#define GPIOZ_13 13
#define GPIOZ_14 14
#define GPIOZ_15 15
#define GPIOH_0 16
#define GPIOH_1 17
#define GPIOH_2 18
#define GPIOH_3 19
#define GPIOH_4 20
#define GPIOH_5 21
#define GPIOH_6 22
#define GPIOH_7 23
#define GPIOH_8 24
#define BOOT_0 25
#define BOOT_1 26
#define BOOT_2 27
#define BOOT_3 28
#define BOOT_4 29
#define BOOT_5 30
#define BOOT_6 31
#define BOOT_7 32
#define BOOT_8 33
#define BOOT_9 34
#define BOOT_10 35
#define BOOT_11 36
#define BOOT_12 37
#define BOOT_13 38
#define BOOT_14 39
#define BOOT_15 40
#define GPIOC_0 41
#define GPIOC_1 42
#define GPIOC_2 43
#define GPIOC_3 44
#define GPIOC_4 45
#define GPIOC_5 46
#define GPIOC_6 47
#define GPIOC_7 48
#define GPIOA_0 49
#define GPIOA_1 50
#define GPIOA_2 51
#define GPIOA_3 52
#define GPIOA_4 53
#define GPIOA_5 54
#define GPIOA_6 55
#define GPIOA_7 56
#define GPIOA_8 57
#define GPIOA_9 58
#define GPIOA_10 59
#define GPIOA_11 60
#define GPIOA_12 61
#define GPIOA_13 62
#define GPIOA_14 63
#define GPIOA_15 64
#define GPIOX_0 65
#define GPIOX_1 66
#define GPIOX_2 67
#define GPIOX_3 68
#define GPIOX_4 69
#define GPIOX_5 70
#define GPIOX_6 71
#define GPIOX_7 72
#define GPIOX_8 73
#define GPIOX_9 74
#define GPIOX_10 75
#define GPIOX_11 76
#define GPIOX_12 77
#define GPIOX_13 78
#define GPIOX_14 79
#define GPIOX_15 80
#define GPIOX_16 81
#define GPIOX_17 82
#define GPIOX_18 83
#define GPIOX_19 84
/* virtual GPIO bank for G12A Rev.B */
#define GPIOV_0 85
#define GPIOV_0 0 /* virtual pin for G12A Rev.B */
#define GPIOZ_0 1
#define GPIOZ_1 2
#define GPIOZ_2 3
#define GPIOZ_3 4
#define GPIOZ_4 5
#define GPIOZ_5 6
#define GPIOZ_6 7
#define GPIOZ_7 8
#define GPIOZ_8 9
#define GPIOZ_9 10
#define GPIOZ_10 11
#define GPIOZ_11 12
#define GPIOZ_12 13
#define GPIOZ_13 14
#define GPIOZ_14 15
#define GPIOZ_15 16
#define GPIOH_0 17
#define GPIOH_1 18
#define GPIOH_2 19
#define GPIOH_3 20
#define GPIOH_4 21
#define GPIOH_5 22
#define GPIOH_6 23
#define GPIOH_7 24
#define GPIOH_8 25
#define BOOT_0 26
#define BOOT_1 27
#define BOOT_2 28
#define BOOT_3 29
#define BOOT_4 30
#define BOOT_5 31
#define BOOT_6 32
#define BOOT_7 33
#define BOOT_8 34
#define BOOT_9 35
#define BOOT_10 36
#define BOOT_11 37
#define BOOT_12 38
#define BOOT_13 39
#define BOOT_14 40
#define BOOT_15 41
#define GPIOC_0 42
#define GPIOC_1 43
#define GPIOC_2 44
#define GPIOC_3 45
#define GPIOC_4 46
#define GPIOC_5 47
#define GPIOC_6 48
#define GPIOC_7 49
#define GPIOA_0 50
#define GPIOA_1 51
#define GPIOA_2 52
#define GPIOA_3 53
#define GPIOA_4 54
#define GPIOA_5 55
#define GPIOA_6 56
#define GPIOA_7 57
#define GPIOA_8 58
#define GPIOA_9 59
#define GPIOA_10 60
#define GPIOA_11 61
#define GPIOA_12 62
#define GPIOA_13 63
#define GPIOA_14 64
#define GPIOA_15 65
#define GPIOX_0 66
#define GPIOX_1 67
#define GPIOX_2 68
#define GPIOX_3 69
#define GPIOX_4 70
#define GPIOX_5 71
#define GPIOX_6 72
#define GPIOX_7 73
#define GPIOX_8 74
#define GPIOX_9 75
#define GPIOX_10 76
#define GPIOX_11 77
#define GPIOX_12 78
#define GPIOX_13 79
#define GPIOX_14 80
#define GPIOX_15 81
#define GPIOX_16 82
#define GPIOX_17 83
#define GPIOX_18 84
#define GPIOX_19 85
#endif /* _DT_BINDINGS_MESON_G12A_GPIO_H */