kernel_samsung_a53x/drivers/tty/serial
Cosmin Tanislav a38fce9b40 serial: max310x: implement I2C support
[ Upstream commit 2e1f2d9a9bdbe12ee475c82a45ac46a278e8049a ]

I2C implementation on this chip has a few key differences
compared to SPI, as described in previous patches.
 * extended register space access needs no extra logic
 * slave address is used to select which UART to communicate
   with

To accommodate these differences, add an I2C interface config,
set the RevID register address and implement an empty method
for setting the GlobalCommand register, since no special handling
is needed for the extended register space.

To handle the port-specific slave address, create an I2C dummy
device for each port, except the base one (UART0), which is
expected to be the one specified in firmware, and create a
regmap for each I2C device.
Add minimum and maximum slave addresses to each devtype for
sanity checking.

Also, use a separate regmap config with no write_flag_mask,
since I2C has a R/W bit in its slave address, and set the
max register to the address of the RevID register, since the
extended register space needs no extra logic.

Finally, add the I2C driver.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220605144659.4169853-5-demonsingur@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Stable-dep-of: 3f42b142ea11 ("serial: max310x: fix IO data corruption in batched operations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 23:19:53 +01:00
..
8250 serial: 8250_exar: Set missing rs485_supported flag 2024-11-18 12:13:34 +01:00
cpm_uart Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jsm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
21285.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera_jtaguart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
altera_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amba-pl010.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
amba-pl011.c ARM: PL011: Fix DMA support 2024-11-18 12:11:46 +01:00
amba-pl011.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apbuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
apbuart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ar933x_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel_serial.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcm63xx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clps711x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
digicolor-usart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dz.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dz.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon-arm-semihost.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon-riscv-sbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efm32-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_tty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_tty.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_linflexuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fsl_lpuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
icom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifx6x60.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ifx6x60.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx.c serial: imx: Correct clock error message in function probe() 2024-11-18 12:12:50 +01:00
imx_earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip22zilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ip22zilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig serial: max310x: implement I2C support 2024-11-18 23:19:53 +01:00
kgdb_nmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kgdboc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lantiq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc32xx_hs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
max310x.c serial: max310x: implement I2C support 2024-11-18 23:19:53 +01:00
max3100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
men_z135_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson_uart.c tty: serial: meson: fix hard LOCKUP on crtscts mode 2024-11-18 11:43:26 +01:00
milbeaut_usio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mpc52xx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mps2-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msm_geni_serial_earlycon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msm_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mux.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mvebu-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-auart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
omap-serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
owl-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pch_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pic32_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pic32_uart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmac_zilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmac_zilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pnx8xxx_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pxa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom_geni_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rda-uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rp2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sa1100.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
samsung_tty.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sb1250-duart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc16is7xx.c serial: sc16is7xx: add check for unsupported SPI modes during probe 2024-11-18 12:12:55 +01:00
sccnxp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial-tegra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_mctrl_gpio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_mctrl_gpio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
serial_txx9.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh-sci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sh-sci.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sifive.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirfsoc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sirfsoc_uart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sprd_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
st-asc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-usart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-usart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
suncore.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunhv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsab.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsab.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunsu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunzilog.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunzilog.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra-tcu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timbuart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
timbuart.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uartlite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ucc_uart.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vr41xx_siu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vt8500_serial.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xilinx_uartps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00