* [PATCH 2/2] pinctrl: ingenic: Add an X1600 group for 18-bit RGB on the top lines
2026-10-23 20:42 [PATCH 1/2] pinctrl: ingenic: Add X1600 groups for each I2S system clock Olivier Louvignes
@ 2026-10-23 20:42 ` Olivier Louvignes
2026-10-24 17:18 ` H. Nikolaus Schaller
2026-10-25 22:31 ` Paul Cercueil
2026-10-24 17:20 ` [PATCH 1/2] pinctrl: ingenic: Add X1600 groups for each I2S system clock H. Nikolaus Schaller
2026-10-25 22:29 ` Paul Cercueil
2 siblings, 2 replies; 6+ messages in thread
From: Olivier Louvignes @ 2026-10-23 20:42 UTC (permalink / raw)
To: Linus Walleij
Cc: Paul Cercueil, linux-gpio, linux-mips, linux-kernel, Olivier Louvignes
Boards that wire an 18-bit panel to the six most significant lines of
each colour leave PA0, PA1, PA8, PA9, PA16 and PA17 free for other uses,
which the cumulative lcd-16bit and lcd-18bit groups would take. Add
"lcd-18bit-msb" for that wiring.
Used on a HiBy R1, which drives its panel this way and uses PA0, PA1,
PA16 and PA17 as GPIOs.
Signed-off-by: Olivier Louvignes <olivier@mgcrea.io>
---
drivers/pinctrl/pinctrl-ingenic.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index 28e7f1852054..8c424db27fd5 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -2442,6 +2442,17 @@ static int x1600_lcd_24bit_pins[] = {
0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
};
+/*
+ * 18-bit RGB on the six most significant lines of each colour of the 24-bit
+ * bus, with the clock, data enable and syncs.
+ */
+static int x1600_lcd_18bit_msb_pins[] = {
+ 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+ 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+ 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+ 0x18, 0x19, 0x1a, 0x1b,
+};
+
static int x1600_pwm_pwm0_pins[] = { 0x40, };
static int x1600_pwm_pwm1_pins[] = { 0x41, };
static int x1600_pwm_pwm2_pins[] = { 0x42, };
@@ -2503,6 +2514,7 @@ static const struct group_desc x1600_groups[] = {
INGENIC_PIN_GROUP("lcd-16bit", x1600_lcd_16bit, 0),
INGENIC_PIN_GROUP("lcd-18bit", x1600_lcd_18bit, 0),
INGENIC_PIN_GROUP("lcd-24bit", x1600_lcd_24bit, 0),
+ INGENIC_PIN_GROUP("lcd-18bit-msb", x1600_lcd_18bit_msb, 0),
INGENIC_PIN_GROUP("pwm0", x1600_pwm_pwm0, 0),
INGENIC_PIN_GROUP("pwm1", x1600_pwm_pwm1, 0),
INGENIC_PIN_GROUP("pwm2", x1600_pwm_pwm2, 0),
@@ -2549,7 +2561,7 @@ static const char * const x1600_i2s_groups[] = {
static const char * const x1600_cim_groups[] = { "cim-data", };
static const char * const x1600_lcd_groups[] = { "slcd-8bit", "slcd-16bit",
- "lcd-16bit", "lcd-18bit", "lcd-24bit", "lcd-no-pins",
+ "lcd-16bit", "lcd-18bit", "lcd-24bit", "lcd-18bit-msb", "lcd-no-pins",
};
static const char * const x1600_pwm0_groups[] = { "pwm0", };
--
2.39.5
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] pinctrl: ingenic: Add an X1600 group for 18-bit RGB on the top lines
2026-10-23 20:42 ` [PATCH 2/2] pinctrl: ingenic: Add an X1600 group for 18-bit RGB on the top lines Olivier Louvignes
@ 2026-10-24 17:18 ` H. Nikolaus Schaller
2026-10-25 22:31 ` Paul Cercueil
1 sibling, 0 replies; 6+ messages in thread
From: H. Nikolaus Schaller @ 2026-10-24 17:18 UTC (permalink / raw)
To: Olivier Louvignes
Cc: Linus Walleij, Paul Cercueil, linux-gpio, linux-mips,
linux-kernel, Discussions about the Letux Kernel, Paul Boddie,
Andreas Kemnade
Hi,
> Am 23.10.2026 um 22:42 schrieb Olivier Louvignes <olivier@mgcrea.io>:
>
> Boards that wire an 18-bit panel to the six most significant lines of
> each colour leave PA0, PA1, PA8, PA9, PA16 and PA17 free for other uses,
> which the cumulative lcd-16bit and lcd-18bit groups would take. Add
> "lcd-18bit-msb" for that wiring.
>
> Used on a HiBy R1, which drives its panel this way and uses PA0, PA1,
> PA16 and PA17 as GPIOs.
>
> Signed-off-by: Olivier Louvignes <olivier@mgcrea.io>
> ---
> drivers/pinctrl/pinctrl-ingenic.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
> index 28e7f1852054..8c424db27fd5 100644
> --- a/drivers/pinctrl/pinctrl-ingenic.c
> +++ b/drivers/pinctrl/pinctrl-ingenic.c
> @@ -2442,6 +2442,17 @@ static int x1600_lcd_24bit_pins[] = {
> 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
> };
>
> +/*
> + * 18-bit RGB on the six most significant lines of each colour of the 24-bit
> + * bus, with the clock, data enable and syncs.
> + */
> +static int x1600_lcd_18bit_msb_pins[] = {
> + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
> + 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
> + 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
> + 0x18, 0x19, 0x1a, 0x1b,
> +};
I just wonder if you can't get this by combining some existing partial pinctrl,
e.g something with lcd-16bit and lcd-18bit?
But there is no good overlap with existing settings to achieve this.
> +
> static int x1600_pwm_pwm0_pins[] = { 0x40, };
> static int x1600_pwm_pwm1_pins[] = { 0x41, };
> static int x1600_pwm_pwm2_pins[] = { 0x42, };
> @@ -2503,6 +2514,7 @@ static const struct group_desc x1600_groups[] = {
> INGENIC_PIN_GROUP("lcd-16bit", x1600_lcd_16bit, 0),
> INGENIC_PIN_GROUP("lcd-18bit", x1600_lcd_18bit, 0),
> INGENIC_PIN_GROUP("lcd-24bit", x1600_lcd_24bit, 0),
> + INGENIC_PIN_GROUP("lcd-18bit-msb", x1600_lcd_18bit_msb, 0),
> INGENIC_PIN_GROUP("pwm0", x1600_pwm_pwm0, 0),
> INGENIC_PIN_GROUP("pwm1", x1600_pwm_pwm1, 0),
> INGENIC_PIN_GROUP("pwm2", x1600_pwm_pwm2, 0),
> @@ -2549,7 +2561,7 @@ static const char * const x1600_i2s_groups[] = {
> static const char * const x1600_cim_groups[] = { "cim-data", };
>
> static const char * const x1600_lcd_groups[] = { "slcd-8bit", "slcd-16bit",
> - "lcd-16bit", "lcd-18bit", "lcd-24bit", "lcd-no-pins",
> + "lcd-16bit", "lcd-18bit", "lcd-24bit", "lcd-18bit-msb", "lcd-no-pins",
> };
>
> static const char * const x1600_pwm0_groups[] = { "pwm0", };
> --
> 2.39.5
>
>
Reviewed-By: H. Nikolaus Schaller <hns@goldelico.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 2/2] pinctrl: ingenic: Add an X1600 group for 18-bit RGB on the top lines
2026-10-23 20:42 ` [PATCH 2/2] pinctrl: ingenic: Add an X1600 group for 18-bit RGB on the top lines Olivier Louvignes
2026-10-24 17:18 ` H. Nikolaus Schaller
@ 2026-10-25 22:31 ` Paul Cercueil
1 sibling, 0 replies; 6+ messages in thread
From: Paul Cercueil @ 2026-10-25 22:31 UTC (permalink / raw)
To: Olivier Louvignes, Linus Walleij; +Cc: linux-gpio, linux-mips, linux-kernel
Hi Olivier,
Le vendredi 23 octobre 2026 à 22:42 +0200, Olivier Louvignes a écrit :
> Boards that wire an 18-bit panel to the six most significant lines of
> each colour leave PA0, PA1, PA8, PA9, PA16 and PA17 free for other
> uses,
> which the cumulative lcd-16bit and lcd-18bit groups would take. Add
> "lcd-18bit-msb" for that wiring.
>
> Used on a HiBy R1, which drives its panel this way and uses PA0, PA1,
> PA16 and PA17 as GPIOs.
>
> Signed-off-by: Olivier Louvignes <olivier@mgcrea.io>
Ugh, what a weird setup...
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Cheers,
-Paul
> ---
> drivers/pinctrl/pinctrl-ingenic.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-ingenic.c
> b/drivers/pinctrl/pinctrl-ingenic.c
> index 28e7f1852054..8c424db27fd5 100644
> --- a/drivers/pinctrl/pinctrl-ingenic.c
> +++ b/drivers/pinctrl/pinctrl-ingenic.c
> @@ -2442,6 +2442,17 @@ static int x1600_lcd_24bit_pins[] = {
> 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
> };
>
> +/*
> + * 18-bit RGB on the six most significant lines of each colour of
> the 24-bit
> + * bus, with the clock, data enable and syncs.
> + */
> +static int x1600_lcd_18bit_msb_pins[] = {
> + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
> + 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
> + 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
> + 0x18, 0x19, 0x1a, 0x1b,
> +};
> +
> static int x1600_pwm_pwm0_pins[] = { 0x40, };
> static int x1600_pwm_pwm1_pins[] = { 0x41, };
> static int x1600_pwm_pwm2_pins[] = { 0x42, };
> @@ -2503,6 +2514,7 @@ static const struct group_desc x1600_groups[] =
> {
> INGENIC_PIN_GROUP("lcd-16bit", x1600_lcd_16bit, 0),
> INGENIC_PIN_GROUP("lcd-18bit", x1600_lcd_18bit, 0),
> INGENIC_PIN_GROUP("lcd-24bit", x1600_lcd_24bit, 0),
> + INGENIC_PIN_GROUP("lcd-18bit-msb", x1600_lcd_18bit_msb, 0),
> INGENIC_PIN_GROUP("pwm0", x1600_pwm_pwm0, 0),
> INGENIC_PIN_GROUP("pwm1", x1600_pwm_pwm1, 0),
> INGENIC_PIN_GROUP("pwm2", x1600_pwm_pwm2, 0),
> @@ -2549,7 +2561,7 @@ static const char * const x1600_i2s_groups[] =
> {
> static const char * const x1600_cim_groups[] = { "cim-data", };
>
> static const char * const x1600_lcd_groups[] = { "slcd-8bit", "slcd-
> 16bit",
> - "lcd-16bit", "lcd-18bit", "lcd-24bit", "lcd-no-pins",
> + "lcd-16bit", "lcd-18bit", "lcd-24bit", "lcd-18bit-msb",
> "lcd-no-pins",
> };
>
> static const char * const x1600_pwm0_groups[] = { "pwm0", };
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] pinctrl: ingenic: Add X1600 groups for each I2S system clock
2026-10-23 20:42 [PATCH 1/2] pinctrl: ingenic: Add X1600 groups for each I2S system clock Olivier Louvignes
2026-10-23 20:42 ` [PATCH 2/2] pinctrl: ingenic: Add an X1600 group for 18-bit RGB on the top lines Olivier Louvignes
@ 2026-10-24 17:20 ` H. Nikolaus Schaller
2026-10-25 22:29 ` Paul Cercueil
2 siblings, 0 replies; 6+ messages in thread
From: H. Nikolaus Schaller @ 2026-10-24 17:20 UTC (permalink / raw)
To: Olivier Louvignes
Cc: Linus Walleij, Paul Cercueil, linux-gpio, linux-mips,
linux-kernel, Discussions about the Letux Kernel, Paul Boddie,
Andreas Kemnade
Hi,
> Am 23.10.2026 um 22:42 schrieb Olivier Louvignes <olivier@mgcrea.io>:
>
> The X1600 has a system clock (MCLK) pin for each direction: PB22 for
> receive, PB26 for transmit. "i2s-sysclk" takes both, which a board that
> only plays cannot use when PB22 has another job. Add "i2s-sysclk-rx" and
> "i2s-sysclk-tx" for one each.
That is very reasonable.
>
> Used on a HiBy R1, which only plays and has an interrupt input on PB22:
> its DAC takes MCLK from "i2s-sysclk-tx".
>
> Signed-off-by: Olivier Louvignes <olivier@mgcrea.io>
> ---
> drivers/pinctrl/pinctrl-ingenic.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
> index 1aa6a6dc1209..28e7f1852054 100644
> --- a/drivers/pinctrl/pinctrl-ingenic.c
> +++ b/drivers/pinctrl/pinctrl-ingenic.c
> @@ -2411,6 +2411,8 @@ static int x1600_i2s_data_rx_pins[] = { 0x35, };
> static int x1600_i2s_clk_rx_pins[] = { 0x37, 0x38, };
> static int x1600_i2s_clk_tx_pins[] = { 0x3b, 0x3c, };
> static int x1600_i2s_sysclk_pins[] = { 0x36, 0x3a, };
> +static int x1600_i2s_sysclk_rx_pins[] = { 0x36, };
> +static int x1600_i2s_sysclk_tx_pins[] = { 0x3a, };
Verified to match data sheet/programming manual (PB22 and PB26) in correct
mapping.
>
> static int x1600_cim_pins[] = {
> 0x14, 0x16, 0x15, 0x18, 0x13,
> @@ -2493,6 +2495,8 @@ static const struct group_desc x1600_groups[] = {
> INGENIC_PIN_GROUP("i2s-clk-rx", x1600_i2s_clk_rx, 0),
> INGENIC_PIN_GROUP("i2s-clk-tx", x1600_i2s_clk_tx, 0),
> INGENIC_PIN_GROUP("i2s-sysclk", x1600_i2s_sysclk, 0),
> + INGENIC_PIN_GROUP("i2s-sysclk-rx", x1600_i2s_sysclk_rx, 0),
> + INGENIC_PIN_GROUP("i2s-sysclk-tx", x1600_i2s_sysclk_tx, 0),
> INGENIC_PIN_GROUP("cim-data", x1600_cim, 2),
> INGENIC_PIN_GROUP("slcd-8bit", x1600_slcd_8bit, 1),
> INGENIC_PIN_GROUP("slcd-16bit", x1600_slcd_16bit, 1),
> @@ -2539,6 +2543,7 @@ static const char * const x1600_i2c1_groups[] = { "i2c1-data-b-15", "i2c1-data-b
>
> static const char * const x1600_i2s_groups[] = {
> "i2s-data-tx", "i2s-data-rx", "i2s-clk-rx", "i2s-clk-tx", "i2s-sysclk",
> + "i2s-sysclk-rx", "i2s-sysclk-tx",
> };
>
> static const char * const x1600_cim_groups[] = { "cim-data", };
>
> base-commit: f33a24cc012d34f25bb9942681bd478a1757b806
> --
> 2.39.5
>
>
Reviewed-By: H. Nikolaus Schaller <hns@goldelico.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 1/2] pinctrl: ingenic: Add X1600 groups for each I2S system clock
2026-10-23 20:42 [PATCH 1/2] pinctrl: ingenic: Add X1600 groups for each I2S system clock Olivier Louvignes
2026-10-23 20:42 ` [PATCH 2/2] pinctrl: ingenic: Add an X1600 group for 18-bit RGB on the top lines Olivier Louvignes
2026-10-24 17:20 ` [PATCH 1/2] pinctrl: ingenic: Add X1600 groups for each I2S system clock H. Nikolaus Schaller
@ 2026-10-25 22:29 ` Paul Cercueil
2 siblings, 0 replies; 6+ messages in thread
From: Paul Cercueil @ 2026-10-25 22:29 UTC (permalink / raw)
To: Olivier Louvignes, Linus Walleij; +Cc: linux-gpio, linux-mips, linux-kernel
Hi Olivier,
Le vendredi 23 octobre 2026 à 22:42 +0200, Olivier Louvignes a écrit :
> The X1600 has a system clock (MCLK) pin for each direction: PB22 for
> receive, PB26 for transmit. "i2s-sysclk" takes both, which a board
> that
> only plays cannot use when PB22 has another job. Add "i2s-sysclk-rx"
> and
> "i2s-sysclk-tx" for one each.
>
> Used on a HiBy R1, which only plays and has an interrupt input on
> PB22:
> its DAC takes MCLK from "i2s-sysclk-tx".
>
> Signed-off-by: Olivier Louvignes <olivier@mgcrea.io>
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Cheers,
-Paul
> ---
> drivers/pinctrl/pinctrl-ingenic.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/pinctrl/pinctrl-ingenic.c
> b/drivers/pinctrl/pinctrl-ingenic.c
> index 1aa6a6dc1209..28e7f1852054 100644
> --- a/drivers/pinctrl/pinctrl-ingenic.c
> +++ b/drivers/pinctrl/pinctrl-ingenic.c
> @@ -2411,6 +2411,8 @@ static int x1600_i2s_data_rx_pins[] = { 0x35,
> };
> static int x1600_i2s_clk_rx_pins[] = { 0x37, 0x38, };
> static int x1600_i2s_clk_tx_pins[] = { 0x3b, 0x3c, };
> static int x1600_i2s_sysclk_pins[] = { 0x36, 0x3a, };
> +static int x1600_i2s_sysclk_rx_pins[] = { 0x36, };
> +static int x1600_i2s_sysclk_tx_pins[] = { 0x3a, };
>
> static int x1600_cim_pins[] = {
> 0x14, 0x16, 0x15, 0x18, 0x13,
> @@ -2493,6 +2495,8 @@ static const struct group_desc x1600_groups[] =
> {
> INGENIC_PIN_GROUP("i2s-clk-rx", x1600_i2s_clk_rx, 0),
> INGENIC_PIN_GROUP("i2s-clk-tx", x1600_i2s_clk_tx, 0),
> INGENIC_PIN_GROUP("i2s-sysclk", x1600_i2s_sysclk, 0),
> + INGENIC_PIN_GROUP("i2s-sysclk-rx", x1600_i2s_sysclk_rx, 0),
> + INGENIC_PIN_GROUP("i2s-sysclk-tx", x1600_i2s_sysclk_tx, 0),
> INGENIC_PIN_GROUP("cim-data", x1600_cim, 2),
> INGENIC_PIN_GROUP("slcd-8bit", x1600_slcd_8bit, 1),
> INGENIC_PIN_GROUP("slcd-16bit", x1600_slcd_16bit, 1),
> @@ -2539,6 +2543,7 @@ static const char * const x1600_i2c1_groups[] =
> { "i2c1-data-b-15", "i2c1-data-b
>
> static const char * const x1600_i2s_groups[] = {
> "i2s-data-tx", "i2s-data-rx", "i2s-clk-rx", "i2s-clk-tx",
> "i2s-sysclk",
> + "i2s-sysclk-rx", "i2s-sysclk-tx",
> };
>
> static const char * const x1600_cim_groups[] = { "cim-data", };
>
> base-commit: f33a24cc012d34f25bb9942681bd478a1757b806
^ permalink raw reply [flat|nested] 6+ messages in thread