Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: serial: samsung: Add ARTPEC-8 support

Add support for the UART block on the ARTPEC-8 SoC. This is closely
related to the variants used on the Exynos chips. The register layout
is identical to Exynos850 et al but the fifo size is different (64 bytes
in each direction for all instances).

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20220311094515.3223023-3-vincent.whitchurch@axis.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vincent Whitchurch and committed by
Greg Kroah-Hartman
1db536f9 02a64ef6

+38 -1
+1 -1
drivers/tty/serial/Kconfig
··· 237 237 238 238 config SERIAL_SAMSUNG 239 239 tristate "Samsung SoC serial support" 240 - depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_APPLE || COMPILE_TEST 240 + depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_APPLE || ARCH_ARTPEC || COMPILE_TEST 241 241 select SERIAL_CORE 242 242 help 243 243 Support for the on-chip UARTs on the Samsung
+37
drivers/tty/serial/samsung_tty.c
··· 2825 2825 #define S5L_SERIAL_DRV_DATA NULL 2826 2826 #endif 2827 2827 2828 + #if defined(CONFIG_ARCH_ARTPEC) 2829 + static const struct s3c24xx_serial_drv_data artpec8_serial_drv_data = { 2830 + .info = { 2831 + .name = "Axis ARTPEC-8 UART", 2832 + .type = TYPE_S3C6400, 2833 + .port_type = PORT_S3C6400, 2834 + .fifosize = 64, 2835 + .has_divslot = 1, 2836 + .rx_fifomask = S5PV210_UFSTAT_RXMASK, 2837 + .rx_fifoshift = S5PV210_UFSTAT_RXSHIFT, 2838 + .rx_fifofull = S5PV210_UFSTAT_RXFULL, 2839 + .tx_fifofull = S5PV210_UFSTAT_TXFULL, 2840 + .tx_fifomask = S5PV210_UFSTAT_TXMASK, 2841 + .tx_fifoshift = S5PV210_UFSTAT_TXSHIFT, 2842 + .def_clk_sel = S3C2410_UCON_CLKSEL0, 2843 + .num_clks = 1, 2844 + .clksel_mask = 0, 2845 + .clksel_shift = 0, 2846 + }, 2847 + .def_cfg = { 2848 + .ucon = S5PV210_UCON_DEFAULT, 2849 + .ufcon = S5PV210_UFCON_DEFAULT, 2850 + .has_fracval = 1, 2851 + } 2852 + }; 2853 + #define ARTPEC8_SERIAL_DRV_DATA (&artpec8_serial_drv_data) 2854 + #else 2855 + #define ARTPEC8_SERIAL_DRV_DATA (NULL) 2856 + #endif 2857 + 2828 2858 static const struct platform_device_id s3c24xx_serial_driver_ids[] = { 2829 2859 { 2830 2860 .name = "s3c2410-uart", ··· 2883 2853 }, { 2884 2854 .name = "exynos850-uart", 2885 2855 .driver_data = (kernel_ulong_t)EXYNOS850_SERIAL_DRV_DATA, 2856 + }, { 2857 + .name = "artpec8-uart", 2858 + .driver_data = (kernel_ulong_t)ARTPEC8_SERIAL_DRV_DATA, 2886 2859 }, 2887 2860 { }, 2888 2861 }; ··· 2911 2878 .data = S5L_SERIAL_DRV_DATA }, 2912 2879 { .compatible = "samsung,exynos850-uart", 2913 2880 .data = EXYNOS850_SERIAL_DRV_DATA }, 2881 + { .compatible = "axis,artpec8-uart", 2882 + .data = ARTPEC8_SERIAL_DRV_DATA }, 2914 2883 {}, 2915 2884 }; 2916 2885 MODULE_DEVICE_TABLE(of, s3c24xx_uart_dt_match); ··· 3090 3055 OF_EARLYCON_DECLARE(s5pv210, "samsung,s5pv210-uart", 3091 3056 s5pv210_early_console_setup); 3092 3057 OF_EARLYCON_DECLARE(exynos4210, "samsung,exynos4210-uart", 3058 + s5pv210_early_console_setup); 3059 + OF_EARLYCON_DECLARE(artpec8, "axis,artpec8-uart", 3093 3060 s5pv210_early_console_setup); 3094 3061 3095 3062 /* Apple S5L */