public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: serial: samsung: add dedicated compatible for exynosauto SoCs
       [not found] <CGME20260424100201epcas5p371dd69955076938ee41ed0d823433056@epcas5p3.samsung.com>
@ 2026-04-24 10:18 ` Alim Akhtar
  2026-04-24 16:12   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 3+ messages in thread
From: Alim Akhtar @ 2026-04-24 10:18 UTC (permalink / raw)
  To: krzk, gregkh, jirislaby
  Cc: linux-serial, linux-samsung-soc, linux-kernel, Alim Akhtar

Currently Exynosautov-{9,920} getting probed based on exynos850
fallback. It is recommended to have a dedicated compatible for
proper driver binding.

Add specific platfrom_device_id and of_device_id for
unique identification and proper driver binding.

While at it, also declare earlycon for these SoC which is helpful
in debugging early kernel crashes which might occures before
serial driver initialization.

Signed-off-by: Alim Akhtar <alim.akhtar@samsung.com>
---
 drivers/tty/serial/samsung_tty.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index e27806bf2cf3..49409cb6fd25 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -2500,6 +2500,12 @@ static const struct s3c24xx_serial_drv_data exynos8895_serial_drv_data = {
 	.fifosize = { 0 },
 };
 
+static const struct s3c24xx_serial_drv_data exynosauto_serial_drv_data = {
+	EXYNOS_COMMON_SERIAL_DRV_DATA,
+	/* samsung,uart-fifosize must be specified in the device tree. */
+	.fifosize = { 0 },
+};
+
 static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = {
 	.info = {
 		.name		= "Google GS101 UART",
@@ -2531,6 +2537,7 @@ static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = {
 #define EXYNOS5433_SERIAL_DRV_DATA (&exynos5433_serial_drv_data)
 #define EXYNOS850_SERIAL_DRV_DATA (&exynos850_serial_drv_data)
 #define EXYNOS8895_SERIAL_DRV_DATA (&exynos8895_serial_drv_data)
+#define EXYNOSAUTO_SERIAL_DRV_DATA (&exynosauto_serial_drv_data)
 #define GS101_SERIAL_DRV_DATA (&gs101_serial_drv_data)
 
 #else
@@ -2538,6 +2545,7 @@ static const struct s3c24xx_serial_drv_data gs101_serial_drv_data = {
 #define EXYNOS5433_SERIAL_DRV_DATA NULL
 #define EXYNOS850_SERIAL_DRV_DATA NULL
 #define EXYNOS8895_SERIAL_DRV_DATA NULL
+#define EXYNOSAUTO_SERIAL_DRV_DATA NULL
 #define GS101_SERIAL_DRV_DATA NULL
 #endif
 
@@ -2621,6 +2629,12 @@ static const struct platform_device_id s3c24xx_serial_driver_ids[] = {
 	}, {
 		.name		= "exynos850-uart",
 		.driver_data	= (kernel_ulong_t)EXYNOS850_SERIAL_DRV_DATA,
+	}, {
+		.name		= "exynosautov9-uart",
+		.driver_data	= (kernel_ulong_t)EXYNOSAUTO_SERIAL_DRV_DATA,
+	}, {
+		.name		= "exynosautov920-uart",
+		.driver_data	= (kernel_ulong_t)EXYNOSAUTO_SERIAL_DRV_DATA,
 	}, {
 		.name		= "artpec8-uart",
 		.driver_data	= (kernel_ulong_t)ARTPEC8_SERIAL_DRV_DATA,
@@ -2649,6 +2663,10 @@ static const struct of_device_id s3c24xx_uart_dt_match[] = {
 		.data = S5L_SERIAL_DRV_DATA },
 	{ .compatible = "samsung,exynos850-uart",
 		.data = EXYNOS850_SERIAL_DRV_DATA },
+	{ .compatible = "samsung,exynosautov9-uart",
+		.data = EXYNOSAUTO_SERIAL_DRV_DATA },
+	{ .compatible = "samsung,exynosautov920-uart",
+		.data = EXYNOSAUTO_SERIAL_DRV_DATA },
 	{ .compatible = "axis,artpec8-uart",
 		.data = ARTPEC8_SERIAL_DRV_DATA },
 	{ .compatible = "google,gs101-uart",
@@ -2826,6 +2844,10 @@ OF_EARLYCON_DECLARE(artpec8, "axis,artpec8-uart",
 			s5pv210_early_console_setup);
 OF_EARLYCON_DECLARE(exynos850, "samsung,exynos850-uart",
 			s5pv210_early_console_setup);
+OF_EARLYCON_DECLARE(exynosauto, "samsung,exynosautov9-uart",
+			s5pv210_early_console_setup);
+OF_EARLYCON_DECLARE(exynosauto, "samsung,exynosautov920-uart",
+			s5pv210_early_console_setup);
 
 static int __init gs101_early_console_setup(struct earlycon_device *device,
 					    const char *opt)
-- 
2.34.1


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

* Re: [PATCH] tty: serial: samsung: add dedicated compatible for exynosauto SoCs
  2026-04-24 10:18 ` [PATCH] tty: serial: samsung: add dedicated compatible for exynosauto SoCs Alim Akhtar
@ 2026-04-24 16:12   ` Krzysztof Kozlowski
  2026-04-26 17:18     ` Alim Akhtar
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2026-04-24 16:12 UTC (permalink / raw)
  To: Alim Akhtar, gregkh, jirislaby
  Cc: linux-serial, linux-samsung-soc, linux-kernel

On 24/04/2026 12:18, Alim Akhtar wrote:
> Currently Exynosautov-{9,920} getting probed based on exynos850
> fallback. It is recommended to have a dedicated compatible for
> proper driver binding.

Unfortunately it is not. Dedicated compatible you have. However you are
not adding dedicated compatible. You added dedicated driver match entry
and we, and especially me, gave reviews many times that it is *not
recommended* to have dedicated driver match entry.

Entire reasoning for doing this patch is wrong. And patch itself is NOOP
(at least by quick look).

Best regards,
Krzysztof

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

* RE: [PATCH] tty: serial: samsung: add dedicated compatible for exynosauto SoCs
  2026-04-24 16:12   ` Krzysztof Kozlowski
@ 2026-04-26 17:18     ` Alim Akhtar
  0 siblings, 0 replies; 3+ messages in thread
From: Alim Akhtar @ 2026-04-26 17:18 UTC (permalink / raw)
  To: 'Krzysztof Kozlowski', gregkh, jirislaby
  Cc: linux-serial, linux-samsung-soc, linux-kernel

Hi Krzysztof

> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Friday, April 24, 2026 9:42 PM
> To: Alim Akhtar <alim.akhtar@samsung.com>; gregkh@linuxfoundation.org;
> jirislaby@kernel.org
> Cc: linux-serial@vger.kernel.org; linux-samsung-soc@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] tty: serial: samsung: add dedicated compatible for
> exynosauto SoCs
> 
> On 24/04/2026 12:18, Alim Akhtar wrote:
> > Currently Exynosautov-{9,920} getting probed based on exynos850
> > fallback. It is recommended to have a dedicated compatible for proper
> > driver binding.
> 
> Unfortunately it is not. Dedicated compatible you have. However you are not
> adding dedicated compatible. You added dedicated driver match entry and
> we, and especially me, gave reviews many times that it is *not
> recommended* to have dedicated driver match entry.
> 
Ok, I might have missed your earlier comments on *not* having a dedicated driver match entry, fair enough.

> Entire reasoning for doing this patch is wrong. And patch itself is NOOP (at
> least by quick look).
Thanks for a quick review, Can you please check the part of the patch which adds OF_EARLYCON_DECLARE
to add earlycon support?

> 
> Best regards,
> Krzysztof


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

end of thread, other threads:[~2026-04-26 17:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20260424100201epcas5p371dd69955076938ee41ed0d823433056@epcas5p3.samsung.com>
2026-04-24 10:18 ` [PATCH] tty: serial: samsung: add dedicated compatible for exynosauto SoCs Alim Akhtar
2026-04-24 16:12   ` Krzysztof Kozlowski
2026-04-26 17:18     ` Alim Akhtar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox