* [PATCH 0/2] Add support for ARTPEC-8 UART @ 2022-03-07 8:50 Vincent Whitchurch 2022-03-07 8:50 ` [PATCH 1/2] dt-bindings: serial: samsung: Add " Vincent Whitchurch 2022-03-07 8:50 ` [PATCH 2/2] tty: serial: samsung: Add ARTPEC-8 support Vincent Whitchurch 0 siblings, 2 replies; 7+ messages in thread From: Vincent Whitchurch @ 2022-03-07 8:50 UTC (permalink / raw) To: gregkh, jirislaby, krzysztof.kozlowski Cc: kernel, linux-kernel, devicetree, linux-serial, linux-samsung-soc, linux-arm-kernel, robh+dt, alim.akhtar, Vincent Whitchurch This series adds support for the UART hardware on the ARTPEC-8 chip. This block is already supported by an existing driver so only a small patch to describe the properties of the variant is required. Vincent Whitchurch (2): dt-bindings: serial: samsung: Add ARTPEC-8 UART tty: serial: samsung: Add ARTPEC-8 support .../bindings/serial/samsung_uart.yaml | 1 + drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/samsung_tty.c | 38 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] dt-bindings: serial: samsung: Add ARTPEC-8 UART 2022-03-07 8:50 [PATCH 0/2] Add support for ARTPEC-8 UART Vincent Whitchurch @ 2022-03-07 8:50 ` Vincent Whitchurch 2022-03-07 8:58 ` Krzysztof Kozlowski 2022-03-08 15:41 ` Rob Herring 2022-03-07 8:50 ` [PATCH 2/2] tty: serial: samsung: Add ARTPEC-8 support Vincent Whitchurch 1 sibling, 2 replies; 7+ messages in thread From: Vincent Whitchurch @ 2022-03-07 8:50 UTC (permalink / raw) To: gregkh, jirislaby, krzysztof.kozlowski Cc: kernel, linux-kernel, devicetree, linux-serial, linux-samsung-soc, linux-arm-kernel, robh+dt, alim.akhtar, Vincent Whitchurch Add a compatible for the UART on the ARTPEC-8 SoC. Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> --- Documentation/devicetree/bindings/serial/samsung_uart.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml index 6aceba4a5f79..6f11f2c92f64 100644 --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml @@ -20,6 +20,7 @@ properties: items: - enum: - apple,s5l-uart + - axis,artpec8-uart - samsung,s3c2410-uart - samsung,s3c2412-uart - samsung,s3c2440-uart -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: serial: samsung: Add ARTPEC-8 UART 2022-03-07 8:50 ` [PATCH 1/2] dt-bindings: serial: samsung: Add " Vincent Whitchurch @ 2022-03-07 8:58 ` Krzysztof Kozlowski 2022-03-08 15:41 ` Rob Herring 1 sibling, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2022-03-07 8:58 UTC (permalink / raw) To: Vincent Whitchurch, gregkh, jirislaby Cc: kernel, linux-kernel, devicetree, linux-serial, linux-samsung-soc, linux-arm-kernel, robh+dt, alim.akhtar On 07/03/2022 09:50, Vincent Whitchurch wrote: > Add a compatible for the UART on the ARTPEC-8 SoC. > > Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> > --- > Documentation/devicetree/bindings/serial/samsung_uart.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml > index 6aceba4a5f79..6f11f2c92f64 100644 > --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml > +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml > @@ -20,6 +20,7 @@ properties: > items: > - enum: > - apple,s5l-uart > + - axis,artpec8-uart > - samsung,s3c2410-uart > - samsung,s3c2412-uart > - samsung,s3c2440-uart You need to define clocks - see the allOf part. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: serial: samsung: Add ARTPEC-8 UART 2022-03-07 8:50 ` [PATCH 1/2] dt-bindings: serial: samsung: Add " Vincent Whitchurch 2022-03-07 8:58 ` Krzysztof Kozlowski @ 2022-03-08 15:41 ` Rob Herring 2022-03-09 8:57 ` Vincent Whitchurch 1 sibling, 1 reply; 7+ messages in thread From: Rob Herring @ 2022-03-08 15:41 UTC (permalink / raw) To: Vincent Whitchurch Cc: Greg Kroah-Hartman, Jiri Slaby, Krzysztof Kozlowski, kernel, linux-kernel@vger.kernel.org, devicetree, open list:SERIAL DRIVERS, linux-samsung-soc, linux-arm-kernel, Alim Akhtar On Mon, Mar 7, 2022 at 2:51 AM Vincent Whitchurch <vincent.whitchurch@axis.com> wrote: > > Add a compatible for the UART on the ARTPEC-8 SoC. Yes, the diff says that already. Perhaps some explanation why you are adding another vendor SoC to Samsung UART and how the h/w is different. I can only guess based on having just gone thru this with Apple. > > Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> > --- > Documentation/devicetree/bindings/serial/samsung_uart.yaml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/serial/samsung_uart.yaml b/Documentation/devicetree/bindings/serial/samsung_uart.yaml > index 6aceba4a5f79..6f11f2c92f64 100644 > --- a/Documentation/devicetree/bindings/serial/samsung_uart.yaml > +++ b/Documentation/devicetree/bindings/serial/samsung_uart.yaml > @@ -20,6 +20,7 @@ properties: > items: > - enum: > - apple,s5l-uart > + - axis,artpec8-uart > - samsung,s3c2410-uart > - samsung,s3c2412-uart > - samsung,s3c2440-uart > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: serial: samsung: Add ARTPEC-8 UART 2022-03-08 15:41 ` Rob Herring @ 2022-03-09 8:57 ` Vincent Whitchurch 0 siblings, 0 replies; 7+ messages in thread From: Vincent Whitchurch @ 2022-03-09 8:57 UTC (permalink / raw) To: Rob Herring Cc: Greg Kroah-Hartman, Jiri Slaby, Krzysztof Kozlowski, kernel, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, open list:SERIAL DRIVERS, linux-samsung-soc, linux-arm-kernel, Alim Akhtar On Tue, Mar 08, 2022 at 04:41:45PM +0100, Rob Herring wrote: > On Mon, Mar 7, 2022 at 2:51 AM Vincent Whitchurch > <vincent.whitchurch@axis.com> wrote: > > > > Add a compatible for the UART on the ARTPEC-8 SoC. > > Yes, the diff says that already. Perhaps some explanation why you are > adding another vendor SoC to Samsung UART and how the h/w is > different. I can only guess based on having just gone thru this with > Apple. The IP has been customized for the ARTPEC-8 SoC but is closely related to the variants used on the Exynos chips. I can add this information to the commit message. The choice of the vendor prefix is similar to the solution chosen in this patch: https://lore.kernel.org/lkml/20220125031604.76009-2-alim.akhtar@samsung.com/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] tty: serial: samsung: Add ARTPEC-8 support 2022-03-07 8:50 [PATCH 0/2] Add support for ARTPEC-8 UART Vincent Whitchurch 2022-03-07 8:50 ` [PATCH 1/2] dt-bindings: serial: samsung: Add " Vincent Whitchurch @ 2022-03-07 8:50 ` Vincent Whitchurch 2022-03-07 9:04 ` Krzysztof Kozlowski 1 sibling, 1 reply; 7+ messages in thread From: Vincent Whitchurch @ 2022-03-07 8:50 UTC (permalink / raw) To: gregkh, jirislaby, krzysztof.kozlowski Cc: kernel, linux-kernel, devicetree, linux-serial, linux-samsung-soc, linux-arm-kernel, robh+dt, alim.akhtar, Vincent Whitchurch Add support for the UART on the ARTPEC-8 SoC. Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/samsung_tty.c | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig index e952ec5c7a7c..ae120d3d933a 100644 --- a/drivers/tty/serial/Kconfig +++ b/drivers/tty/serial/Kconfig @@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE config SERIAL_SAMSUNG tristate "Samsung SoC serial support" - depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_APPLE || COMPILE_TEST + depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_APPLE || ARCH_ARTPEC || COMPILE_TEST select SERIAL_CORE help Support for the on-chip UARTs on the Samsung diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index d002a4e48ed9..4f9e74c6bcef 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -2837,6 +2837,36 @@ static struct s3c24xx_serial_drv_data s5l_serial_drv_data = { #define S5L_SERIAL_DRV_DATA ((kernel_ulong_t)NULL) #endif +#if defined(CONFIG_ARCH_ARTPEC) +static struct s3c24xx_serial_drv_data artpec8_serial_drv_data = { + .info = &(struct s3c24xx_uart_info) { + .name = "Axis ARTPEC-8 UART", + .type = TYPE_S3C6400, + .port_type = PORT_S3C6400, + .fifosize = 128, + .has_divslot = 1, + .rx_fifomask = S5PV210_UFSTAT_RXMASK, + .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, + .rx_fifofull = S5PV210_UFSTAT_RXFULL, + .tx_fifofull = S5PV210_UFSTAT_TXFULL, + .tx_fifomask = S5PV210_UFSTAT_TXMASK, + .tx_fifoshift = S5PV210_UFSTAT_TXSHIFT, + .def_clk_sel = S3C2410_UCON_CLKSEL0, + .num_clks = 1, + .clksel_mask = 0, + .clksel_shift = 0, + }, + .def_cfg = &(struct s3c2410_uartcfg) { + .ucon = S5PV210_UCON_DEFAULT, + .ufcon = S5PV210_UFCON_DEFAULT, + .has_fracval = 1, + } +}; +#define ARTPEC8_SERIAL_DRV_DATA ((kernel_ulong_t)&artpec8_serial_drv_data) +#else +#define ARTPEC8_SERIAL_DRV_DATA ((kernel_ulong_t)NULL) +#endif + static const struct platform_device_id s3c24xx_serial_driver_ids[] = { { .name = "s3c2410-uart", @@ -2866,6 +2896,10 @@ static const struct platform_device_id s3c24xx_serial_driver_ids[] = { .name = "exynos850-uart", .driver_data = EXYNOS850_SERIAL_DRV_DATA, }, + { + .name = "artpec8-uart", + .driver_data = ARTPEC8_SERIAL_DRV_DATA, + }, { }, }; MODULE_DEVICE_TABLE(platform, s3c24xx_serial_driver_ids); @@ -2888,6 +2922,8 @@ static const struct of_device_id s3c24xx_uart_dt_match[] = { .data = (void *)EXYNOS5433_SERIAL_DRV_DATA }, { .compatible = "apple,s5l-uart", .data = (void *)S5L_SERIAL_DRV_DATA }, + { .compatible = "axis,artpec8-uart", + .data = (void *)ARTPEC8_SERIAL_DRV_DATA }, { .compatible = "samsung,exynos850-uart", .data = (void *)EXYNOS850_SERIAL_DRV_DATA }, {}, @@ -3043,6 +3079,8 @@ OF_EARLYCON_DECLARE(s5pv210, "samsung,s5pv210-uart", s5pv210_early_console_setup); OF_EARLYCON_DECLARE(exynos4210, "samsung,exynos4210-uart", s5pv210_early_console_setup); +OF_EARLYCON_DECLARE(artpec8, "axis,artpec8-uart", + s5pv210_early_console_setup); /* Apple S5L */ static int __init apple_s5l_early_console_setup(struct earlycon_device *device, -- 2.34.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] tty: serial: samsung: Add ARTPEC-8 support 2022-03-07 8:50 ` [PATCH 2/2] tty: serial: samsung: Add ARTPEC-8 support Vincent Whitchurch @ 2022-03-07 9:04 ` Krzysztof Kozlowski 0 siblings, 0 replies; 7+ messages in thread From: Krzysztof Kozlowski @ 2022-03-07 9:04 UTC (permalink / raw) To: Vincent Whitchurch, gregkh, jirislaby Cc: kernel, linux-kernel, devicetree, linux-serial, linux-samsung-soc, linux-arm-kernel, robh+dt, alim.akhtar On 07/03/2022 09:50, Vincent Whitchurch wrote: > Add support for the UART on the ARTPEC-8 SoC. > > Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> > --- > drivers/tty/serial/Kconfig | 2 +- > drivers/tty/serial/samsung_tty.c | 38 ++++++++++++++++++++++++++++++++ > 2 files changed, 39 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig > index e952ec5c7a7c..ae120d3d933a 100644 > --- a/drivers/tty/serial/Kconfig > +++ b/drivers/tty/serial/Kconfig > @@ -237,7 +237,7 @@ config SERIAL_CLPS711X_CONSOLE > > config SERIAL_SAMSUNG > tristate "Samsung SoC serial support" > - depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_APPLE || COMPILE_TEST > + depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_APPLE || ARCH_ARTPEC || COMPILE_TEST > select SERIAL_CORE > help > Support for the on-chip UARTs on the Samsung > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > index d002a4e48ed9..4f9e74c6bcef 100644 > --- a/drivers/tty/serial/samsung_tty.c > +++ b/drivers/tty/serial/samsung_tty.c > @@ -2837,6 +2837,36 @@ static struct s3c24xx_serial_drv_data s5l_serial_drv_data = { > #define S5L_SERIAL_DRV_DATA ((kernel_ulong_t)NULL) > #endif > > +#if defined(CONFIG_ARCH_ARTPEC) > +static struct s3c24xx_serial_drv_data artpec8_serial_drv_data = { This will conflict with my constifying patches: https://lore.kernel.org/all/20220307080810.53847-1-krzysztof.kozlowski@canonical.com/T/#t The code itself looks good. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Best regards, Krzysztof ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-03-09 8:58 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-03-07 8:50 [PATCH 0/2] Add support for ARTPEC-8 UART Vincent Whitchurch 2022-03-07 8:50 ` [PATCH 1/2] dt-bindings: serial: samsung: Add " Vincent Whitchurch 2022-03-07 8:58 ` Krzysztof Kozlowski 2022-03-08 15:41 ` Rob Herring 2022-03-09 8:57 ` Vincent Whitchurch 2022-03-07 8:50 ` [PATCH 2/2] tty: serial: samsung: Add ARTPEC-8 support Vincent Whitchurch 2022-03-07 9:04 ` Krzysztof Kozlowski
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).