build/patch/kernel/archive/meson64-6.4/meson-g12a-pinctrl-add-missing-ir-options.patch

92 lines
2.7 KiB
Diff

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 0c49655cc90c..bb7cf0805219 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
@@ -562,6 +562,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";
@@ -2005,6 +2013,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 d182a575981e..74c0fd368586 100644
--- a/drivers/pinctrl/meson/pinctrl-meson-g12a.c
+++ b/drivers/pinctrl/meson/pinctrl-meson-g12a.c
@@ -215,6 +215,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 };
@@ -736,6 +739,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),
@@ -1021,6 +1025,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",
};
@@ -1265,6 +1273,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