[PATCH 9/9] ARM: socfpga: make AA1 use si5338 clock gen

Lothar Rubusch l.rubusch at gmail.com
Thu Sep 12 08:06:49 CEST 2024


Apply usage of the si5338 clock generator in Enclustra's AA1 SoM as it
has such a chip.

Signed-off-by: Lothar Rubusch <l.rubusch at gmail.com>
---
 board/enclustra/mercury_aa1/mercury_aa1.c       | 7 +++++++
 configs/socfpga_enclustra_mercury_aa1_defconfig | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/board/enclustra/mercury_aa1/mercury_aa1.c b/board/enclustra/mercury_aa1/mercury_aa1.c
index c53ae128f0..30a2bf6ea7 100644
--- a/board/enclustra/mercury_aa1/mercury_aa1.c
+++ b/board/enclustra/mercury_aa1/mercury_aa1.c
@@ -10,6 +10,7 @@
 #include <dm/uclass.h>
 #include <asm-generic/gpio.h>
 #include <asm/io.h>
+#include <dm.h>
 
 #include "../common/enclustra_mac.h"
 
@@ -31,6 +32,12 @@ static int altera_current_storage = ALTERA_NONE;
 
 int board_late_init(void)
 {
+	struct udevice *si5338;
+
+	if (IS_ENABLED(CONFIG_CLK_SKYWORKS_SI5338))
+		uclass_get_device_by_driver(UCLASS_CLK, DM_DRIVER_GET(si5338_clkgen),
+					    &si5338);
+
 	return enclustra_setup_mac_address();
 }
 
diff --git a/configs/socfpga_enclustra_mercury_aa1_defconfig b/configs/socfpga_enclustra_mercury_aa1_defconfig
index 58c718864b..a4b48da207 100644
--- a/configs/socfpga_enclustra_mercury_aa1_defconfig
+++ b/configs/socfpga_enclustra_mercury_aa1_defconfig
@@ -38,6 +38,7 @@ CONFIG_SPL_SYS_MALLOC_SIZE=0x15000
 CONFIG_SPL_ENV_SUPPORT=y
 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="u-boot.img"
 CONFIG_SPL_FPGA=y
+CONFIG_SPL_I2C=y
 CONFIG_SPL_SPI_LOAD=y
 CONFIG_SYS_SPI_U_BOOT_OFFS=0x100000
 CONFIG_CMD_ASKENV=y
@@ -58,6 +59,7 @@ CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
+CONFIG_CLK_SKYWORKS_SI5338=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_SYS_I2C_DW=y
 CONFIG_MISC=y
-- 
2.25.1



More information about the U-Boot mailing list