OpenCloudOS-Kernel/drivers/soc/samsung
Sam Protsenko b603377e40 soc: samsung: Add USI driver
USIv2 IP-core is found on modern ARM64 Exynos SoCs (like Exynos850) and
provides selectable serial protocol (one of: UART, SPI, I2C). USIv2
registers usually reside in the same register map as a particular
underlying protocol it implements, but have some particular offset. E.g.
on Exynos850 the USI_UART has 0x13820000 base address, where UART
registers have 0x00..0x40 offsets, and USI registers have 0xc0..0xdc
offsets. Desired protocol can be chosen via SW_CONF register from System
Register block of the same domain as USI.

Before starting to use a particular protocol, USIv2 must be configured
properly:
  1. Select protocol to be used via System Register
  2. Clear "reset" flag in USI_CON
  3. Configure HWACG behavior (e.g. for UART Rx the HWACG must be
     disabled, so that the IP clock is not gated automatically); this is
     done using USI_OPTION register
  4. Keep both USI clocks (PCLK and IPCLK) running during USI registers
     modification

This driver implements the above behavior. Of course, USIv2 driver
should be probed before UART/I2C/SPI drivers. It can be achieved by
embedding UART/I2C/SPI nodes inside of the USI node (in Device Tree);
driver then walks underlying nodes and instantiates those. Driver also
handles USI configuration on PM resume, as register contents can be lost
during CPU suspend.

This driver is designed with different USI versions in mind. So it
should be relatively easy to add new USI revisions to it later.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Link: https://lore.kernel.org/r/20211204195757.8600-3-semen.protsenko@linaro.org
Tested-by: Chanho Park <chanho61.park@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
2021-12-18 11:55:56 +01:00
..
Kconfig soc: samsung: Add USI driver 2021-12-18 11:55:56 +01:00
Makefile soc: samsung: Add USI driver 2021-12-18 11:55:56 +01:00
exynos-asv.c soc: samsung: exynos-chipid: convert to driver and merge exynos-asv 2021-01-03 17:08:45 +01:00
exynos-asv.h soc: samsung: exynos-chipid: convert to driver and merge exynos-asv 2021-01-03 17:08:45 +01:00
exynos-chipid.c soc: samsung: exynos-chipid: add Exynos7885 SoC support 2021-11-15 14:34:19 +01:00
exynos-pmu.c soc: samsung: exynos-pmu: Add Exynos850 support 2021-11-15 14:36:01 +01:00
exynos-pmu.h soc: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:46:31 +01:00
exynos-regulator-coupler.c soc: samsung: exynos-regulator-coupler: Add simple voltage coupler for Exynos5800 2020-07-22 22:33:57 +02:00
exynos-usi.c soc: samsung: Add USI driver 2021-12-18 11:55:56 +01:00
exynos4-pmu.c soc: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:46:31 +01:00
exynos3250-pmu.c soc: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:46:31 +01:00
exynos5250-pmu.c soc: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:46:31 +01:00
exynos5420-pmu.c soc: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:46:31 +01:00
exynos5422-asv.c soc: samsung: exynos-chipid: convert to a module 2021-09-29 15:50:34 +02:00
exynos5422-asv.h soc: samsung: Add Exynos Adaptive Supply Voltage driver 2019-10-28 17:59:33 +01:00
pm_domains.c soc: samsung: pm_domains: drop unused is_off field 2021-10-10 19:18:03 +02:00
s3c-pm-check.c soc: samsung: s3c-pm-check: Fix incorrectly named variable 'val' 2020-11-03 21:37:45 +01:00
s3c-pm-debug.c ARM: samsung: move pm check code to drivers/soc 2020-08-19 21:23:46 +02:00