From: Sam Protsenko Date: Wed, 6 Aug 2025 22:27:05 +0000 (-0500) Subject: board: samsung: e850-96: Configure PMIC regulators X-Git-Tag: v2025.10-rc4~5^2~9 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fefc2eb9610b75270f0376980dae952d16fc84b;p=pandora-u-boot.git board: samsung: e850-96: Configure PMIC regulators Make use of PMIC configuration routines and enable all LDOs that might be useful for bootloader and kernel. The most crucial regulator being enabled at the moment is LDO24 which provides power to LAN9514 chip. That makes Ethernet controller and USB hub functional. Signed-off-by: Sam Protsenko Signed-off-by: Minkyu Kang --- diff --git a/board/samsung/e850-96/e850-96.c b/board/samsung/e850-96/e850-96.c index d489716bfdf..2cf874fcf7a 100644 --- a/board/samsung/e850-96/e850-96.c +++ b/board/samsung/e850-96/e850-96.c @@ -11,11 +11,18 @@ #include #include #include "fw.h" +#include "pmic.h" /* OTP Controller base address and register offsets */ -#define EXYNOS850_OTP_BASE 0x10000000 -#define OTP_CHIPID0 0x4 -#define OTP_CHIPID1 0x8 +#define EXYNOS850_OTP_BASE 0x10000000 +#define OTP_CHIPID0 0x4 +#define OTP_CHIPID1 0x8 + +/* ACPM and PMIC definitions */ +#define EXYNOS850_MBOX_APM2AP_BASE 0x11900000 +#define EXYNOS850_APM_SRAM_BASE 0x02039000 /* in iRAM */ +#define EXYNOS850_APM_SHMEM_OFFSET 0x3200 +#define EXYNOS850_IPC_AP_I3C 10 struct efi_fw_image fw_images[] = { { @@ -56,6 +63,13 @@ struct efi_capsule_update_info update_info = { .images = fw_images, }; +static struct acpm acpm = { + .mbox_base = (void __iomem *)EXYNOS850_MBOX_APM2AP_BASE, + .sram_base = (void __iomem *)(EXYNOS850_APM_SRAM_BASE + + EXYNOS850_APM_SHMEM_OFFSET), + .ipc_ch = EXYNOS850_IPC_AP_I3C, +}; + int dram_init(void) { return fdtdec_setup_mem_size_base(); @@ -133,3 +147,14 @@ int board_late_init(void) return 0; } + +int power_init_board(void) +{ + int err; + + err = pmic_init(&acpm); + if (err) + printf("ERROR: Failed to configure PMIC (%d)\n", err); + + return 0; +}