u-boot/drivers/soc/Kconfig
Sam Protsenko c9a3efdfc0 soc: samsung: Add Exynos 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.

Driver's code was copied over from Linux kernel [1] and adapted
correspondingly for U-Boot API. UCLASS_MISC is used, and although no
misc operations are implemented, it makes it easier to probe the driver
this way (as compared to UCLASS_NOP) and keep the code compact.

[1] drivers/soc/samsung/exynos-usi.c

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2024-01-24 11:23:20 +09:00

46 lines
1.6 KiB
Text

menu "SOC (System On Chip) specific Drivers"
config SOC_DEVICE
bool "Enable SoC Device ID drivers using Driver Model"
help
This allows drivers to be provided for SoCs to help in identifying
the SoC in use and matching SoC attributes for selecting SoC
specific data. This is useful for other device drivers that may
need different parameters or quirks enabled depending on the
specific device variant in use.
config SOC_DEVICE_TI_K3
depends on SOC_DEVICE && ARCH_K3
bool "Enable SoC Device ID driver for TI K3 SoCs"
help
This allows Texas Instruments Keystone 3 SoCs to identify
specifics about the SoC in use.
config SOC_XILINX_ZYNQMP
bool "Enable SoC Device ID driver for Xilinx ZynqMP"
depends on SOC_DEVICE && ARCH_ZYNQMP
help
Enable this option to select SoC device id driver for Xilinx ZynqMP.
This allows other drivers to verify the SoC familiy & revision
using matching SoC attributes.
config SOC_XILINX_VERSAL
bool "Enable SoC Device ID driver for Xilinx Versal"
depends on SOC_DEVICE && ARCH_VERSAL
help
Enable this option to select SoC device id driver for Xilinx Versal.
This allows other drivers to verify the SoC familiy & revision using
matching SoC attributes.
config SOC_XILINX_VERSAL_NET
bool "Enable SoC Device ID driver for Xilinx Versal NET"
depends on SOC_DEVICE && ARCH_VERSAL_NET
help
Enable this option to select SoC device id driver for Xilinx Versal NET.
This allows other drivers to verify the SoC familiy & revision using
matching SoC attributes.
source "drivers/soc/samsung/Kconfig"
source "drivers/soc/ti/Kconfig"
endmenu