summaryrefslogtreecommitdiff
path: root/drivers/soc/samsung
AgeCommit message (Collapse)Author
2025-11-12soc: exynos-pmu: add support for Exynos7 PMUKaustabh Chakraborty
Add the compatible string of Exynos7's PMU as defined in upstream dt-schema. This also supports derivative PMUs as defined in schema. There's no additional setup required here, so pmu_init is skipped. Signed-off-by: Kaustabh Chakraborty <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2024-01-24soc: samsung: Add Exynos PMU driverSam Protsenko
Add basic Power Management Unit (PMU) driver for Exynos SoCs. For now it's only capable of changing UART path in PMU, which is needed for E850-96 board. The driver's structure resembles the exynos-pmu driver from Linux kernel, and although it's very basic and slim at the moment, it can be easily extended in future if the need arises. UCLASS_NOP is used, as there are no benefits in using more elaborate classes like UCLASS_MISC in this case. The DM_FLAG_PROBE_AFTER_BIND flag is added in bind function, as the probe function must be always called for this driver. Signed-off-by: Sam Protsenko <[email protected]> Reviewed-by: Chanho Park <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2024-01-24soc: samsung: Add Exynos USI driverSam Protsenko
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 <[email protected]> Reviewed-by: Chanho Park <[email protected]> Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>