summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
diff options
context:
space:
mode:
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>2022-01-28 22:35:02 +0900
committerLinus Walleij <linus.walleij@linaro.org>2022-02-11 01:37:21 +0100
commitdfc04955c821be518a12b244ebb9583e69b4807e (patch)
tree4616f078082ed8ed9447cee29a50c0621f6b56ed /drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
parent8e703784ed0f45a4d9858f0877b2053002e4822d (diff)
pinctrl: uniphier: Divide pinmux group to support 1ch and 2ch I2S
Current pinmux group for audio in/out assumes 4ch I2S case but the UniPhier AIO hardware also supports 1ch and 2ch I2S. So divide current ain1 group into ain1, ain1_dat2 and ain1_dat4 groups. Divide other ain and aout in the same way. Signed-off-by: Ryuta NAKANISHI <nakanishi.ryuta@socionext.com> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Link: https://lore.kernel.org/r/1643376903-18623-3-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c')
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c54
1 files changed, 42 insertions, 12 deletions
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
index 6ef892543cb9..7da8616f8d47 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
@@ -719,18 +719,34 @@ static const struct pinctrl_pin_desc uniphier_pxs2_pins[] = {
234, UNIPHIER_PIN_PULL_DOWN),
};
-static const unsigned ain1_pins[] = {161, 162, 173, 174, 127, 128, 129};
-static const int ain1_muxvals[] = {8, 8, 8, 8, 3, 3, 3};
-static const unsigned ain2_pins[] = {98, 99, 100, 101, 102, 103, 104};
-static const int ain2_muxvals[] = {8, 8, 8, 8, 8, 8, 8};
+static const unsigned ain1_pins[] = {161, 162, 173, 174};
+static const int ain1_muxvals[] = {8, 8, 8, 8};
+static const unsigned ain1_dat2_pins[] = {127};
+static const int ain1_dat2_muxvals[] = {3};
+static const unsigned ain1_dat4_pins[] = {128, 129};
+static const int ain1_dat4_muxvals[] = {3, 3};
+static const unsigned ain2_pins[] = {98, 99, 100, 101};
+static const int ain2_muxvals[] = {8, 8, 8, 8};
+static const unsigned ain2_dat2_pins[] = {102};
+static const int ain2_dat2_muxvals[] = {8};
+static const unsigned ain2_dat4_pins[] = {103, 104};
+static const int ain2_dat4_muxvals[] = {8, 8};
static const unsigned ain3_pins[] = {132, 133, 134, 131};
static const int ain3_muxvals[] = {5, 5, 5, 5};
static const unsigned ainiec1_pins[] = {91};
static const int ainiec1_muxvals[] = {11};
-static const unsigned aout1_pins[] = {87, 88, 89, 90, 92, 93, 94};
-static const int aout1_muxvals[] = {11, 11, 11, 11, 11, 11, 11};
-static const unsigned aout2_pins[] = {175, 176, 177, 178, 183, 184, 185};
-static const int aout2_muxvals[] = {8, 8, 8, 8, 9, 9, 9};
+static const unsigned aout1_pins[] = {87, 88, 89, 90};
+static const int aout1_muxvals[] = {11, 11, 11, 11};
+static const unsigned aout1_dat2_pins[] = {92};
+static const int aout1_dat2_muxvals[] = {11};
+static const unsigned aout1_dat4_pins[] = {93, 94};
+static const int aout1_dat4_muxvals[] = {11, 11};
+static const unsigned aout2_pins[] = {177, 178, 175, 176};
+static const int aout2_muxvals[] = {8, 8, 8, 8};
+static const unsigned aout2_dat2_pins[] = {183};
+static const int aout2_dat2_muxvals[] = {9};
+static const unsigned aout2_dat4_pins[] = {184, 185};
+static const int aout2_dat4_muxvals[] = {9, 9};
static const unsigned aout3_pins[] = {105, 106, 107, 108};
static const int aout3_muxvals[] = {8, 8, 8, 8};
static const unsigned aoutiec1_pins[] = {95};
@@ -842,11 +858,19 @@ static const unsigned int gpio_range1_pins[] = {
static const struct uniphier_pinctrl_group uniphier_pxs2_groups[] = {
UNIPHIER_PINCTRL_GROUP(ain1),
+ UNIPHIER_PINCTRL_GROUP(ain1_dat2),
+ UNIPHIER_PINCTRL_GROUP(ain1_dat4),
UNIPHIER_PINCTRL_GROUP(ain2),
+ UNIPHIER_PINCTRL_GROUP(ain2_dat2),
+ UNIPHIER_PINCTRL_GROUP(ain2_dat4),
UNIPHIER_PINCTRL_GROUP(ain3),
UNIPHIER_PINCTRL_GROUP(ainiec1),
UNIPHIER_PINCTRL_GROUP(aout1),
+ UNIPHIER_PINCTRL_GROUP(aout1_dat2),
+ UNIPHIER_PINCTRL_GROUP(aout1_dat4),
UNIPHIER_PINCTRL_GROUP(aout2),
+ UNIPHIER_PINCTRL_GROUP(aout2_dat2),
+ UNIPHIER_PINCTRL_GROUP(aout2_dat4),
UNIPHIER_PINCTRL_GROUP(aout3),
UNIPHIER_PINCTRL_GROUP(aoutiec1),
UNIPHIER_PINCTRL_GROUP(aoutiec2),
@@ -884,12 +908,16 @@ static const struct uniphier_pinctrl_group uniphier_pxs2_groups[] = {
UNIPHIER_PINCTRL_GROUP_GPIO(gpio_range1),
};
-static const char * const ain1_groups[] = {"ain1"};
-static const char * const ain2_groups[] = {"ain2"};
+static const char * const ain1_groups[] = {"ain1", "ain1_dat2",
+ "ain1_dat4"};
+static const char * const ain2_groups[] = {"ain2", "ain2_dat2",
+ "ain2_dat4"};
static const char * const ain3_groups[] = {"ain3"};
static const char * const ainiec1_groups[] = {"ainiec1"};
-static const char * const aout1_groups[] = {"aout1"};
-static const char * const aout2_groups[] = {"aout2"};
+static const char * const aout1_groups[] = {"aout1", "aout1_dat2",
+ "aout1_dat4"};
+static const char * const aout2_groups[] = {"aout2", "aout2_dat2",
+ "aout2_dat4"};
static const char * const aout3_groups[] = {"aout3"};
static const char * const aoutiec1_groups[] = {"aoutiec1"};
static const char * const aoutiec2_groups[] = {"aoutiec2"};
@@ -922,7 +950,9 @@ static const char * const usb3_groups[] = {"usb3"};
static const struct uniphier_pinmux_function uniphier_pxs2_functions[] = {
UNIPHIER_PINMUX_FUNCTION(ain1),
UNIPHIER_PINMUX_FUNCTION(ain2),
+ UNIPHIER_PINMUX_FUNCTION(ain3),
UNIPHIER_PINMUX_FUNCTION(ainiec1),
+ UNIPHIER_PINMUX_FUNCTION(aout1),
UNIPHIER_PINMUX_FUNCTION(aout2),
UNIPHIER_PINMUX_FUNCTION(aout3),
UNIPHIER_PINMUX_FUNCTION(aoutiec1),