From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Yuntian Zhang <yt@radxa.com>
Date: Mon, 25 Jul 2022 15:31:31 +0800
Subject: pinctrl: meson-g12a: add missing ir options

Those pins are defined in S905Y2 and A311D reference manuals.

Signed-off-by: Yuntian Zhang <yt@radxa.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 16 ++++++++++
 drivers/pinctrl/meson/pinctrl-meson-g12a.c        |  9 ++++++
 2 files changed, 25 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
index abc0483ff3b4..64ca8767cb83 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -563,6 +563,14 @@ mux {
 						};
 					};
 
+					remote_input_pins: remote-input {
+						mux {
+							groups = "remote_input";
+							function = "remote_input";
+							bias-disable;
+						};
+					};
+
 					mclk0_a_pins: mclk0-a {
 						mux {
 							groups = "mclk0_a";
@@ -2015,6 +2023,14 @@ mux {
 							bias-disable;
 						};
 					};
+
+					remote_out_ao_pins: remote-out {
+						mux {
+							groups = "remote_ao_out";
+							function = "remote_ao_out";
+							bias-disable;
+						};
+					};
 				};
 			};
 
diff --git a/drivers/pinctrl/meson/pinctrl-meson-g12a.c b/drivers/pinctrl/meson/pinctrl-meson-g12a.c
index 2c17891ba6a9..e80a5897d9f2 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-g12a.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-g12a.c
@@ -216,6 +216,9 @@ static const unsigned int i2c3_sck_h_pins[]		= { GPIOH_1 };
 static const unsigned int i2c3_sda_a_pins[]		= { GPIOA_14 };
 static const unsigned int i2c3_sck_a_pins[]		= { GPIOA_15 };
 
+/* ir_in */
+static const unsigned int remote_input_pins[]	= { GPIOA_15 };
+
 /* uart_a */
 static const unsigned int uart_a_tx_pins[]		= { GPIOX_12 };
 static const unsigned int uart_a_rx_pins[]		= { GPIOX_13 };
@@ -737,6 +740,7 @@ static struct meson_pmx_group meson_g12a_periphs_groups[] = {
 	/* bank GPIOA */
 	GROUP(i2c3_sda_a,		2),
 	GROUP(i2c3_sck_a,		2),
+	GROUP(remote_input,		1),
 	GROUP(pdm_din0_a,		1),
 	GROUP(pdm_din1_a,		1),
 	GROUP(pdm_din2_a,		1),
@@ -1022,6 +1026,10 @@ static const char * const i2c3_groups[] = {
 	"i2c3_sda_a", "i2c3_sck_a",
 };
 
+static const char * const remote_input_groups[] = {
+	"remote_input",
+};
+
 static const char * const uart_a_groups[] = {
 	"uart_a_tx", "uart_a_rx", "uart_a_cts", "uart_a_rts",
 };
@@ -1266,6 +1274,7 @@ static struct meson_pmx_func meson_g12a_periphs_functions[] = {
 	FUNCTION(i2c1),
 	FUNCTION(i2c2),
 	FUNCTION(i2c3),
+	FUNCTION(remote_input),
 	FUNCTION(uart_a),
 	FUNCTION(uart_b),
 	FUNCTION(uart_c),
-- 
Armbian

