linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] pinctrl: meson: add audio output pins
@ 2017-03-26 17:19 Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 1/8] pinctrl: meson: gxbb: add i2s " Jerome Brunet
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic,
	devicetree, linux-kernel

This patchset adds the pinctrl definition and the related device-tree
bindings of the i2s output and spdif output pins on the meson gxbb and
gxl SoCs.

This is part of the ongoing work to bring audio output support on the
meson family. It was tested on the gxbb p200 and gxl p230.

Changes since v1: [0]
* add a few comments in the changelog
* patched rebased on pinctrl/for-next + Neil patch on missing pins [1]

[0]: https://marc.info/?i=20170323165101.29262-1-jbrunet%40baylibre.com
[1]: https://marc.info/?i=20170323104112.16558-2-narmstrong%40baylibre.com

Jerome Brunet (8):
  pinctrl: meson: gxbb: add i2s output pins
  pinctrl: meson: gxbb: add spdif output pins
  pinctrl: meson: gxl: add i2s output pins
  pinctrl: meson: gxl: add spdif output pins
  ARM64: dts: meson-gxbb: add i2s output pins
  ARM64: dts: meson-gxbb: add spdif output pins
  ARM64: dts: meson-gxl: add i2s output pins
  ARM64: dts: meson-gxl: add spdif output pins

 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 84 +++++++++++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi  | 83 ++++++++++++++++++++++++++++
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c  | 49 +++++++++++++++++
 drivers/pinctrl/meson/pinctrl-meson-gxl.c   | 49 +++++++++++++++++
 4 files changed, 265 insertions(+)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2 1/8] pinctrl: meson: gxbb: add i2s output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 2/8] pinctrl: meson: gxbb: add spdif " Jerome Brunet
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic, linux-kernel

Add EE and AO domains pins for the i2s output clocks and data.
I2S output channel 6/7 on TEST_N pin is missing from this patch and will
be added later on.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 31 ++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index 31a3a98d067c..b9772a124a82 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -236,6 +236,10 @@ static const unsigned int hdmi_hpd_pins[]	= { PIN(GPIOH_0, EE_OFF) };
 static const unsigned int hdmi_sda_pins[]	= { PIN(GPIOH_1, EE_OFF) };
 static const unsigned int hdmi_scl_pins[]	= { PIN(GPIOH_2, EE_OFF) };
 
+static const unsigned int i2s_out_ch23_y_pins[]	= { PIN(GPIOY_8, EE_OFF) };
+static const unsigned int i2s_out_ch45_y_pins[]	= { PIN(GPIOY_9, EE_OFF) };
+static const unsigned int i2s_out_ch67_y_pins[]	= { PIN(GPIOY_10, EE_OFF) };
+
 static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = {
 	MESON_PIN(GPIOAO_0, 0),
 	MESON_PIN(GPIOAO_1, 0),
@@ -274,6 +278,13 @@ static const unsigned int pwm_ao_a_6_pins[]	= { PIN(GPIOAO_6, 0) };
 static const unsigned int pwm_ao_a_12_pins[]	= { PIN(GPIOAO_12, 0) };
 static const unsigned int pwm_ao_b_pins[]	= { PIN(GPIOAO_13, 0) };
 
+static const unsigned int i2s_am_clk_pins[]	 = { PIN(GPIOAO_8, 0) };
+static const unsigned int i2s_out_ao_clk_pins[]	 = { PIN(GPIOAO_9, 0) };
+static const unsigned int i2s_out_lr_clk_pins[]	 = { PIN(GPIOAO_10, 0) };
+static const unsigned int i2s_out_ch01_ao_pins[] = { PIN(GPIOAO_11, 0) };
+static const unsigned int i2s_out_ch23_ao_pins[] = { PIN(GPIOAO_12, 0) };
+static const unsigned int i2s_out_ch45_ao_pins[] = { PIN(GPIOAO_13, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -426,6 +437,9 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GROUP(uart_rx_c,	1,	16),
 	GROUP(pwm_a_y,		1,	21),
 	GROUP(pwm_f_y,		1,	20),
+	GROUP(i2s_out_ch23_y,	1,	5),
+	GROUP(i2s_out_ch45_y,	1,	6),
+	GROUP(i2s_out_ch67_y,	1,	7),
 
 	/* Bank Z */
 	GROUP(eth_mdio,		6,	1),
@@ -523,6 +537,12 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(pwm_ao_a_6,	0,	18),
 	GROUP(pwm_ao_a_12,	0,	17),
 	GROUP(pwm_ao_b,		0,	3),
+	GROUP(i2s_am_clk,	0,	30),
+	GROUP(i2s_out_ao_clk,	0,	29),
+	GROUP(i2s_out_lr_clk,	0,	28),
+	GROUP(i2s_out_ch01_ao,	0,	27),
+	GROUP(i2s_out_ch23_ao,	1,	0),
+	GROUP(i2s_out_ch45_ao,	1,	1),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -652,6 +672,10 @@ static const char * const hdmi_i2c_groups[] = {
 	"hdmi_sda", "hdmi_scl",
 };
 
+static const char * const i2s_out_groups[] = {
+	"i2s_out_ch23_y", "i2s_out_ch45_y", "i2s_out_ch67_y",
+};
+
 static const char * const gpio_aobus_groups[] = {
 	"GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
 	"GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
@@ -694,6 +718,11 @@ static const char * const pwm_ao_b_groups[] = {
 	"pwm_ao_b",
 };
 
+static const char * const i2s_out_ao_groups[] = {
+	"i2s_am_clk", "i2s_out_ao_clk", "i2s_out_lr_clk",
+	"i2s_out_ch01_ao", "i2s_out_ch23_ao", "i2s_out_ch45_ao",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -717,6 +746,7 @@ static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(pwm_f_y),
 	FUNCTION(hdmi_hpd),
 	FUNCTION(hdmi_i2c),
+	FUNCTION(i2s_out),
 };
 
 static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
@@ -730,6 +760,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(pwm_ao_a_6),
 	FUNCTION(pwm_ao_a_12),
 	FUNCTION(pwm_ao_b),
+	FUNCTION(i2s_out_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 2/8] pinctrl: meson: gxbb: add spdif output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 1/8] pinctrl: meson: gxbb: add i2s " Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 3/8] pinctrl: meson: gxl: add i2s " Jerome Brunet
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic, linux-kernel

Add EE and AO domains pins for the spdif output.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
index b9772a124a82..9b00be15d258 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxbb.c
@@ -240,6 +240,8 @@ static const unsigned int i2s_out_ch23_y_pins[]	= { PIN(GPIOY_8, EE_OFF) };
 static const unsigned int i2s_out_ch45_y_pins[]	= { PIN(GPIOY_9, EE_OFF) };
 static const unsigned int i2s_out_ch67_y_pins[]	= { PIN(GPIOY_10, EE_OFF) };
 
+static const unsigned int spdif_out_y_pins[]	= { PIN(GPIOY_12, EE_OFF) };
+
 static const struct pinctrl_pin_desc meson_gxbb_aobus_pins[] = {
 	MESON_PIN(GPIOAO_0, 0),
 	MESON_PIN(GPIOAO_1, 0),
@@ -285,6 +287,9 @@ static const unsigned int i2s_out_ch01_ao_pins[] = { PIN(GPIOAO_11, 0) };
 static const unsigned int i2s_out_ch23_ao_pins[] = { PIN(GPIOAO_12, 0) };
 static const unsigned int i2s_out_ch45_ao_pins[] = { PIN(GPIOAO_13, 0) };
 
+static const unsigned int spdif_out_ao_6_pins[]	= { PIN(GPIOAO_6, 0) };
+static const unsigned int spdif_out_ao_13_pins[] = { PIN(GPIOAO_13, 0) };
+
 static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -440,6 +445,7 @@ static struct meson_pmx_group meson_gxbb_periphs_groups[] = {
 	GROUP(i2s_out_ch23_y,	1,	5),
 	GROUP(i2s_out_ch45_y,	1,	6),
 	GROUP(i2s_out_ch67_y,	1,	7),
+	GROUP(spdif_out_y,	1,	9),
 
 	/* Bank Z */
 	GROUP(eth_mdio,		6,	1),
@@ -543,6 +549,8 @@ static struct meson_pmx_group meson_gxbb_aobus_groups[] = {
 	GROUP(i2s_out_ch01_ao,	0,	27),
 	GROUP(i2s_out_ch23_ao,	1,	0),
 	GROUP(i2s_out_ch45_ao,	1,	1),
+	GROUP(spdif_out_ao_6,	0,	16),
+	GROUP(spdif_out_ao_13,	0,	4),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -676,6 +684,10 @@ static const char * const i2s_out_groups[] = {
 	"i2s_out_ch23_y", "i2s_out_ch45_y", "i2s_out_ch67_y",
 };
 
+static const char * const spdif_out_groups[] = {
+	"spdif_out_y",
+};
+
 static const char * const gpio_aobus_groups[] = {
 	"GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
 	"GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
@@ -723,6 +735,10 @@ static const char * const i2s_out_ao_groups[] = {
 	"i2s_out_ch01_ao", "i2s_out_ch23_ao", "i2s_out_ch45_ao",
 };
 
+static const char * const spdif_out_ao_groups[] = {
+	"spdif_out_ao_6", "spdif_out_ao_13",
+};
+
 static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -747,6 +763,7 @@ static struct meson_pmx_func meson_gxbb_periphs_functions[] = {
 	FUNCTION(hdmi_hpd),
 	FUNCTION(hdmi_i2c),
 	FUNCTION(i2s_out),
+	FUNCTION(spdif_out),
 };
 
 static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
@@ -761,6 +778,7 @@ static struct meson_pmx_func meson_gxbb_aobus_functions[] = {
 	FUNCTION(pwm_ao_a_12),
 	FUNCTION(pwm_ao_b),
 	FUNCTION(i2s_out_ao),
+	FUNCTION(spdif_out_ao),
 };
 
 static struct meson_bank meson_gxbb_periphs_banks[] = {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 3/8] pinctrl: meson: gxl: add i2s output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 1/8] pinctrl: meson: gxbb: add i2s " Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 2/8] pinctrl: meson: gxbb: add spdif " Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 4/8] pinctrl: meson: gxl: add spdif " Jerome Brunet
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic, linux-kernel

Add EE and AO domains pins for the i2s output clocks and data.
I2S output channel 6/7 on TEST_N pin is missing from this patch and will
be added later on.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
index 6c2a15dde99f..e472213fd673 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -224,6 +224,14 @@ static const unsigned int hdmi_hpd_pins[]	= { PIN(GPIOH_0, EE_OFF) };
 static const unsigned int hdmi_sda_pins[]	= { PIN(GPIOH_1, EE_OFF) };
 static const unsigned int hdmi_scl_pins[]	= { PIN(GPIOH_2, EE_OFF) };
 
+static const unsigned int i2s_am_clk_pins[]	= { PIN(GPIOH_6, EE_OFF) };
+static const unsigned int i2s_out_ao_clk_pins[]	= { PIN(GPIOH_7, EE_OFF) };
+static const unsigned int i2s_out_lr_clk_pins[]	= { PIN(GPIOH_8, EE_OFF) };
+static const unsigned int i2s_out_ch01_pins[]	= { PIN(GPIOH_9, EE_OFF) };
+static const unsigned int i2s_out_ch23_z_pins[]	= { PIN(GPIOZ_5, EE_OFF) };
+static const unsigned int i2s_out_ch45_z_pins[]	= { PIN(GPIOZ_6, EE_OFF) };
+static const unsigned int i2s_out_ch67_z_pins[]	= { PIN(GPIOZ_7, EE_OFF) };
+
 static const struct pinctrl_pin_desc meson_gxl_aobus_pins[] = {
 	MESON_PIN(GPIOAO_0, 0),
 	MESON_PIN(GPIOAO_1, 0),
@@ -261,6 +269,9 @@ static const unsigned int pwm_ao_a_8_pins[]	= { PIN(GPIOAO_8, 0) };
 static const unsigned int pwm_ao_b_pins[]	= { PIN(GPIOAO_9, 0) };
 static const unsigned int pwm_ao_b_6_pins[]	= { PIN(GPIOAO_6, 0) };
 
+static const unsigned int i2s_out_ch23_ao_pins[] = { PIN(GPIOAO_8, EE_OFF) };
+static const unsigned int i2s_out_ch45_ao_pins[] = { PIN(GPIOAO_9, EE_OFF) };
+
 static struct meson_pmx_group meson_gxl_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -406,11 +417,18 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
 	GROUP(eth_txd2,		4,	11),
 	GROUP(eth_txd3,		4,	10),
 	GROUP(pwm_c,		3,	20),
+	GROUP(i2s_out_ch23_z,	3,	26),
+	GROUP(i2s_out_ch45_z,	3,	25),
+	GROUP(i2s_out_ch67_z,	3,	24),
 
 	/* Bank H */
 	GROUP(hdmi_hpd,		6,	31),
 	GROUP(hdmi_sda,		6,	30),
 	GROUP(hdmi_scl,		6,	29),
+	GROUP(i2s_am_clk,	6,	26),
+	GROUP(i2s_out_ao_clk,	6,	25),
+	GROUP(i2s_out_lr_clk,	6,	24),
+	GROUP(i2s_out_ch01,	6,	23),
 
 	/* Bank DV */
 	GROUP(uart_tx_b,	2,	16),
@@ -490,6 +508,8 @@ static struct meson_pmx_group meson_gxl_aobus_groups[] = {
 	GROUP(pwm_ao_b_6,	0,	18),
 	GROUP(pwm_ao_a_8,	0,	17),
 	GROUP(pwm_ao_b,		0,	3),
+	GROUP(i2s_out_ch23_ao,	1,	0),
+	GROUP(i2s_out_ch45_ao,	1,	1),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -610,6 +630,11 @@ static const char * const hdmi_i2c_groups[] = {
 	"hdmi_sda", "hdmi_scl",
 };
 
+static const char * const i2s_out_groups[] = {
+	"i2s_am_clk", "i2s_out_ao_clk", "i2s_out_lr_clk",
+	"i2s_out_ch01", "i2s_out_ch23_z", "i2s_out_ch45_z", "i2s_out_ch67_z",
+};
+
 static const char * const gpio_aobus_groups[] = {
 	"GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
 	"GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
@@ -644,6 +669,10 @@ static const char * const pwm_ao_b_groups[] = {
 	"pwm_ao_b", "pwm_ao_b_6",
 };
 
+static const char * const i2s_out_ao_groups[] = {
+	"i2s_out_ch23_ao", "i2s_out_ch45_ao",
+};
+
 static struct meson_pmx_func meson_gxl_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -666,6 +695,7 @@ static struct meson_pmx_func meson_gxl_periphs_functions[] = {
 	FUNCTION(pwm_f),
 	FUNCTION(hdmi_hpd),
 	FUNCTION(hdmi_i2c),
+	FUNCTION(i2s_out),
 };
 
 static struct meson_pmx_func meson_gxl_aobus_functions[] = {
@@ -677,6 +707,7 @@ static struct meson_pmx_func meson_gxl_aobus_functions[] = {
 	FUNCTION(remote_input_ao),
 	FUNCTION(pwm_ao_a),
 	FUNCTION(pwm_ao_b),
+	FUNCTION(i2s_out_ao),
 };
 
 static struct meson_bank meson_gxl_periphs_banks[] = {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 4/8] pinctrl: meson: gxl: add spdif output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
                   ` (2 preceding siblings ...)
  2017-03-26 17:19 ` [PATCH v2 3/8] pinctrl: meson: gxl: add i2s " Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 5/8] ARM64: dts: meson-gxbb: add i2s " Jerome Brunet
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic, linux-kernel

Add EE and AO domains pins for the spdif output.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 drivers/pinctrl/meson/pinctrl-meson-gxl.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/pinctrl/meson/pinctrl-meson-gxl.c b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
index e472213fd673..998210eacf37 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-gxl.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-gxl.c
@@ -232,6 +232,8 @@ static const unsigned int i2s_out_ch23_z_pins[]	= { PIN(GPIOZ_5, EE_OFF) };
 static const unsigned int i2s_out_ch45_z_pins[]	= { PIN(GPIOZ_6, EE_OFF) };
 static const unsigned int i2s_out_ch67_z_pins[]	= { PIN(GPIOZ_7, EE_OFF) };
 
+static const unsigned int spdif_out_h_pins[]	= { PIN(GPIOH_4, EE_OFF) };
+
 static const struct pinctrl_pin_desc meson_gxl_aobus_pins[] = {
 	MESON_PIN(GPIOAO_0, 0),
 	MESON_PIN(GPIOAO_1, 0),
@@ -272,6 +274,9 @@ static const unsigned int pwm_ao_b_6_pins[]	= { PIN(GPIOAO_6, 0) };
 static const unsigned int i2s_out_ch23_ao_pins[] = { PIN(GPIOAO_8, EE_OFF) };
 static const unsigned int i2s_out_ch45_ao_pins[] = { PIN(GPIOAO_9, EE_OFF) };
 
+static const unsigned int spdif_out_ao_6_pins[]	= { PIN(GPIOAO_6, EE_OFF) };
+static const unsigned int spdif_out_ao_9_pins[]	= { PIN(GPIOAO_9, EE_OFF) };
+
 static struct meson_pmx_group meson_gxl_periphs_groups[] = {
 	GPIO_GROUP(GPIOZ_0, EE_OFF),
 	GPIO_GROUP(GPIOZ_1, EE_OFF),
@@ -429,6 +434,7 @@ static struct meson_pmx_group meson_gxl_periphs_groups[] = {
 	GROUP(i2s_out_ao_clk,	6,	25),
 	GROUP(i2s_out_lr_clk,	6,	24),
 	GROUP(i2s_out_ch01,	6,	23),
+	GROUP(spdif_out_h,	6,	28),
 
 	/* Bank DV */
 	GROUP(uart_tx_b,	2,	16),
@@ -510,6 +516,8 @@ static struct meson_pmx_group meson_gxl_aobus_groups[] = {
 	GROUP(pwm_ao_b,		0,	3),
 	GROUP(i2s_out_ch23_ao,	1,	0),
 	GROUP(i2s_out_ch45_ao,	1,	1),
+	GROUP(spdif_out_ao_6,	0,	16),
+	GROUP(spdif_out_ao_9,	0,	4),
 };
 
 static const char * const gpio_periphs_groups[] = {
@@ -635,6 +643,10 @@ static const char * const i2s_out_groups[] = {
 	"i2s_out_ch01", "i2s_out_ch23_z", "i2s_out_ch45_z", "i2s_out_ch67_z",
 };
 
+static const char * const spdif_out_groups[] = {
+	"spdif_out_h",
+};
+
 static const char * const gpio_aobus_groups[] = {
 	"GPIOAO_0", "GPIOAO_1", "GPIOAO_2", "GPIOAO_3", "GPIOAO_4",
 	"GPIOAO_5", "GPIOAO_6", "GPIOAO_7", "GPIOAO_8", "GPIOAO_9",
@@ -673,6 +685,10 @@ static const char * const i2s_out_ao_groups[] = {
 	"i2s_out_ch23_ao", "i2s_out_ch45_ao",
 };
 
+static const char * const spdif_out_ao_groups[] = {
+	"spdif_out_ao_6", "spdif_out_ao_9",
+};
+
 static struct meson_pmx_func meson_gxl_periphs_functions[] = {
 	FUNCTION(gpio_periphs),
 	FUNCTION(emmc),
@@ -696,6 +712,7 @@ static struct meson_pmx_func meson_gxl_periphs_functions[] = {
 	FUNCTION(hdmi_hpd),
 	FUNCTION(hdmi_i2c),
 	FUNCTION(i2s_out),
+	FUNCTION(spdif_out),
 };
 
 static struct meson_pmx_func meson_gxl_aobus_functions[] = {
@@ -708,6 +725,7 @@ static struct meson_pmx_func meson_gxl_aobus_functions[] = {
 	FUNCTION(pwm_ao_a),
 	FUNCTION(pwm_ao_b),
 	FUNCTION(i2s_out_ao),
+	FUNCTION(spdif_out_ao),
 };
 
 static struct meson_bank meson_gxl_periphs_banks[] = {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 5/8] ARM64: dts: meson-gxbb: add i2s output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
                   ` (3 preceding siblings ...)
  2017-03-26 17:19 ` [PATCH v2 4/8] pinctrl: meson: gxl: add spdif " Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 6/8] ARM64: dts: meson-gxbb: add spdif " Jerome Brunet
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic,
	devicetree, linux-kernel

Add EE and AO domains pins for the i2s output clocks and data to the gxbb
device tree.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 63 +++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 34168a3b0dd1..a9cacbd6a1d6 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -192,6 +192,48 @@
 				function = "pwm_ao_b";
 			};
 		};
+
+		i2s_am_clk_pins: i2s_am_clk {
+			mux {
+				groups = "i2s_am_clk";
+				function = "i2s_out_ao";
+			};
+		};
+
+		i2s_out_ao_clk_pins: i2s_out_ao_clk {
+			mux {
+				groups = "i2s_out_ao_clk";
+				function = "i2s_out_ao";
+			};
+		};
+
+		i2s_out_lr_clk_pins: i2s_out_lr_clk {
+			mux {
+				groups = "i2s_out_lr_clk";
+				function = "i2s_out_ao";
+			};
+		};
+
+		i2s_out_ch01_ao_pins: i2s_out_ch01_ao {
+			mux {
+				groups = "i2s_out_ch01_ao";
+				function = "i2s_out_ao";
+			};
+		};
+
+		i2s_out_ch23_ao_pins: i2s_out_ch23_ao {
+			mux {
+				groups = "i2s_out_ch23_ao";
+				function = "i2s_out_ao";
+			};
+		};
+
+		i2s_out_ch45_ao_pins: i2s_out_ch45_ao {
+			mux {
+				groups = "i2s_out_ch45_ao";
+				function = "i2s_out_ao";
+			};
+		};
 	};
 };
 
@@ -432,6 +474,27 @@
 				function = "hdmi_i2c";
 			};
 		};
+
+		i2sout_ch23_y_pins: i2sout_ch23_y {
+			mux {
+				groups = "i2sout_ch23_y";
+				function = "i2s_out";
+			};
+		};
+
+		i2sout_ch45_y_pins: i2sout_ch45_y {
+			mux {
+				groups = "i2sout_ch45_y";
+				function = "i2s_out";
+			};
+		};
+
+		i2sout_ch67_y_pins: i2sout_ch67_y {
+			mux {
+				groups = "i2sout_ch67_y";
+				function = "i2s_out";
+			};
+		};
 	};
 };
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 6/8] ARM64: dts: meson-gxbb: add spdif output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
                   ` (4 preceding siblings ...)
  2017-03-26 17:19 ` [PATCH v2 5/8] ARM64: dts: meson-gxbb: add i2s " Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 7/8] ARM64: dts: meson-gxl: add i2s " Jerome Brunet
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic,
	devicetree, linux-kernel

Add EE and AO domains pins for the spdif output to the gxbb device tree.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index a9cacbd6a1d6..d1dc6a49df13 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -234,6 +234,20 @@
 				function = "i2s_out_ao";
 			};
 		};
+
+		spdif_out_ao_6_pins: spdif_out_ao_6 {
+			mux {
+				groups = "spdif_out_ao_6";
+				function = "spdif_out_ao";
+			};
+		};
+
+		spdif_out_ao_13_pins: spdif_out_ao_13 {
+			mux {
+				groups = "spdif_out_ao_13";
+				function = "spdif_out_ao";
+			};
+		};
 	};
 };
 
@@ -495,6 +509,13 @@
 				function = "i2s_out";
 			};
 		};
+
+		spdif_out_y_pins: spdif_out_y {
+			mux {
+				groups = "spdif_out_y";
+				function = "spdif_out";
+			};
+		};
 	};
 };
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 7/8] ARM64: dts: meson-gxl: add i2s output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
                   ` (5 preceding siblings ...)
  2017-03-26 17:19 ` [PATCH v2 6/8] ARM64: dts: meson-gxbb: add spdif " Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-26 17:19 ` [PATCH v2 8/8] ARM64: dts: meson-gxl: add spdif " Jerome Brunet
  2017-03-28 19:33 ` [PATCH v2 0/8] pinctrl: meson: add audio " Kevin Hilman
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic,
	devicetree, linux-kernel

Add EE and AO domains pins for the i2s output clocks and data the gxl
device tree

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 62 ++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 269458b05fd4..3dde55856234 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -160,6 +160,20 @@
 				function = "pwm_ao_b";
 			};
 		};
+
+		i2s_out_ch23_ao_pins: i2s_out_ch23_ao {
+			mux {
+				groups = "i2s_out_ch23_ao";
+				function = "i2s_out_ao";
+			};
+		};
+
+		i2s_out_ch45_ao_pins: i2s_out_ch45_ao {
+			mux {
+				groups = "i2s_out_ch45_ao";
+				function = "i2s_out_ao";
+			};
+		};
 	};
 };
 
@@ -385,6 +399,54 @@
 				function = "hdmi_i2c";
 			};
 		};
+
+		i2s_am_clk_pins: i2s_am_clk {
+			mux {
+				groups = "i2s_am_clk";
+				function = "i2s_out";
+			};
+		};
+
+		i2s_out_ao_clk_pins: i2s_out_ao_clk {
+			mux {
+				groups = "i2s_out_ao_clk";
+				function = "i2s_out";
+			};
+		};
+
+		i2s_out_lr_clk_pins: i2s_out_lr_clk {
+			mux {
+				groups = "i2s_out_lr_clk";
+				function = "i2s_out";
+			};
+		};
+
+		i2s_out_ch01_pins: i2s_out_ch01 {
+			mux {
+				groups = "i2s_out_ch01";
+				function = "i2s_out";
+			};
+		};
+		i2sout_ch23_z_pins: i2sout_ch23_z {
+			mux {
+				groups = "i2sout_ch23_z";
+				function = "i2s_out";
+			};
+		};
+
+		i2sout_ch45_z_pins: i2sout_ch45_z {
+			mux {
+				groups = "i2sout_ch45_z";
+				function = "i2s_out";
+			};
+		};
+
+		i2sout_ch67_z_pins: i2sout_ch67_z {
+			mux {
+				groups = "i2sout_ch67_z";
+				function = "i2s_out";
+			};
+		};
 	};
 
 	eth-phy-mux {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v2 8/8] ARM64: dts: meson-gxl: add spdif output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
                   ` (6 preceding siblings ...)
  2017-03-26 17:19 ` [PATCH v2 7/8] ARM64: dts: meson-gxl: add i2s " Jerome Brunet
@ 2017-03-26 17:19 ` Jerome Brunet
  2017-03-28 19:33 ` [PATCH v2 0/8] pinctrl: meson: add audio " Kevin Hilman
  8 siblings, 0 replies; 10+ messages in thread
From: Jerome Brunet @ 2017-03-26 17:19 UTC (permalink / raw)
  To: Linus Walleij, Carlo Caione, Kevin Hilman
  Cc: Jerome Brunet, linux-gpio, linux-arm-kernel, linux-amlogic,
	devicetree, linux-kernel

Add EE and AO domains pins for the spdif output to the gxl device tree.

Acked-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
index 3dde55856234..8a08ad552e7a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl.dtsi
@@ -174,6 +174,20 @@
 				function = "i2s_out_ao";
 			};
 		};
+
+		spdif_out_ao_6_pins: spdif_out_ao_6 {
+			mux {
+				groups = "spdif_out_ao_6";
+				function = "spdif_out_ao";
+			};
+		};
+
+		spdif_out_ao_9_pins: spdif_out_ao_9 {
+			mux {
+				groups = "spdif_out_ao_9";
+				function = "spdif_out_ao";
+			};
+		};
 	};
 };
 
@@ -447,6 +461,13 @@
 				function = "i2s_out";
 			};
 		};
+
+		spdif_out_h_pins: spdif_out_ao_h {
+			mux {
+				groups = "spdif_out_h";
+				function = "spdif_out";
+			};
+		};
 	};
 
 	eth-phy-mux {
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2 0/8] pinctrl: meson: add audio output pins
  2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
                   ` (7 preceding siblings ...)
  2017-03-26 17:19 ` [PATCH v2 8/8] ARM64: dts: meson-gxl: add spdif " Jerome Brunet
@ 2017-03-28 19:33 ` Kevin Hilman
  8 siblings, 0 replies; 10+ messages in thread
From: Kevin Hilman @ 2017-03-28 19:33 UTC (permalink / raw)
  To: Jerome Brunet
  Cc: Linus Walleij, Carlo Caione, linux-gpio, linux-arm-kernel,
	linux-amlogic, devicetree, linux-kernel

Jerome Brunet <jbrunet@baylibre.com> writes:

> This patchset adds the pinctrl definition and the related device-tree
> bindings of the i2s output and spdif output pins on the meson gxbb and
> gxl SoCs.
>
> This is part of the ongoing work to bring audio output support on the
> meson family. It was tested on the gxbb p200 and gxl p230.
>
> Changes since v1: [0]
> * add a few comments in the changelog
> * patched rebased on pinctrl/for-next + Neil patch on missing pins [1]
>
> [0]: https://marc.info/?i=20170323165101.29262-1-jbrunet%40baylibre.com
> [1]: https://marc.info/?i=20170323104112.16558-2-narmstrong%40baylibre.com
>
> Jerome Brunet (8):
>   pinctrl: meson: gxbb: add i2s output pins
>   pinctrl: meson: gxbb: add spdif output pins
>   pinctrl: meson: gxl: add i2s output pins
>   pinctrl: meson: gxl: add spdif output pins
>   ARM64: dts: meson-gxbb: add i2s output pins
>   ARM64: dts: meson-gxbb: add spdif output pins
>   ARM64: dts: meson-gxl: add i2s output pins
>   ARM64: dts: meson-gxl: add spdif output pins

DT patches applied to amlogic v4.12/dt64 branch,

Thanks for the respin,

Kevin

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-03-28 19:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-26 17:19 [PATCH v2 0/8] pinctrl: meson: add audio output pins Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 1/8] pinctrl: meson: gxbb: add i2s " Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 2/8] pinctrl: meson: gxbb: add spdif " Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 3/8] pinctrl: meson: gxl: add i2s " Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 4/8] pinctrl: meson: gxl: add spdif " Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 5/8] ARM64: dts: meson-gxbb: add i2s " Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 6/8] ARM64: dts: meson-gxbb: add spdif " Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 7/8] ARM64: dts: meson-gxl: add i2s " Jerome Brunet
2017-03-26 17:19 ` [PATCH v2 8/8] ARM64: dts: meson-gxl: add spdif " Jerome Brunet
2017-03-28 19:33 ` [PATCH v2 0/8] pinctrl: meson: add audio " Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).