From a1766d55e5766fb8fb5723bc599f7dd2cc999f6c Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Sat, 23 Nov 2024 17:52:45 +0100 Subject: wdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCU Driver for a PMIC watchdog timer controlled via Siemens SCU firmware extensions. Only useful on some Siemens i.MX8-based platforms as special SCFW is needed which provides the needed SCU API. Signed-off-by: Andrej Valek Signed-off-by: Heiko Schocher Reviewed-by: Alexander Sverdlin Reviewed-by: Stefan Roese --- include/firmware/imx/sci/rpc.h | 3 +++ include/firmware/imx/sci/sci.h | 1 + 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/firmware/imx/sci/rpc.h b/include/firmware/imx/sci/rpc.h index 28adec2a8e1..04acc7ff95b 100644 --- a/include/firmware/imx/sci/rpc.h +++ b/include/firmware/imx/sci/rpc.h @@ -231,4 +231,7 @@ struct sc_rpc_msg_s { #define TIMER_FUNC_SET_SYSCTR_PERIODIC_ALARM 17U /* Index for sc_timer_set_sysctr_periodic_alarm() RPC call */ #define TIMER_FUNC_CANCEL_SYSCTR_ALARM 18U /* Index for sc_timer_cancel_sysctr_alarm() RPC call */ +/* Siemens specific API extension */ +#define TIMER_FUNC_CTRL_SIEMENS_PMIC_WDOG 20U /*!< Index for sc_timer_ctrl_pmic_wdog() RPC call */ + #endif /* SC_RPC_H */ diff --git a/include/firmware/imx/sci/sci.h b/include/firmware/imx/sci/sci.h index 7d8499f070a..588f3671103 100644 --- a/include/firmware/imx/sci/sci.h +++ b/include/firmware/imx/sci/sci.h @@ -123,6 +123,7 @@ int sc_rm_set_master_sid(sc_ipc_t ipc, sc_rsrc_t resource, sc_rm_sid_t sid); /* Timer API */ int sc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window); +int sc_timer_control_siemens_pmic_wdog(sc_ipc_t ipc, u8 cmd); /* SECO API */ int sc_seco_authenticate(sc_ipc_t ipc, sc_seco_auth_cmd_t cmd, -- cgit v1.2.3 From a57ef36323eb65d3d83c504f9f0a9ad831ec825c Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Sat, 23 Nov 2024 17:52:46 +0100 Subject: net: fec_mxc: fix probing for imx8qxp probing on capricorn board (imx8qxp based) brings: Can't find FEC0 clk rate: -19 Cause is that when probing fec_mxc driver, fec_mii_setspeed() is called which calls fec_get_clk_rate(). fec_mii_setspeed() calls fec_get_clk_rate with NULL pointer for udev and so as in IMX8QXP case CLK_CCF is enabled udev gets searched with: uclass_get_device_by_seq(UCLASS_ETH, idx, &dev); but we do not have yet a UCLASS_ETH ! as we just probing it! Prevent this by passing udev to fec_get_clk_rate() Signed-off-by: Heiko Schocher --- include/netdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/netdev.h b/include/netdev.h index 2a06d9a261b..949245ecdec 100644 --- a/include/netdev.h +++ b/include/netdev.h @@ -117,7 +117,7 @@ static inline int pci_eth_init(struct bd_info *bis) return num; } -struct mii_dev *fec_get_miibus(ulong base_addr, int dev_id); +struct mii_dev *fec_get_miibus(struct udevice *dev, ulong base_addr, int dev_id); #ifdef CONFIG_PHYLIB struct phy_device; -- cgit v1.2.3 From c8b3c46bdeb9b1d98f930bbcfbcce7df7f04e1bc Mon Sep 17 00:00:00 2001 From: Enrico Leto Date: Sat, 23 Nov 2024 17:52:50 +0100 Subject: siemens: capricorn: move to cxg3 reference project with deneb board We have many HW with capricorn i.MX8X boards. The difference in u-boot is at all by the display of the LEDs. * put upstream a reference project & board for DT and defconfig * use the capricorn prefix outside the board/siemens/capricorn folder Signed-off-by: Enrico Leto Signed-off-by: Heiko Schocher --- include/configs/deneb.h | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 include/configs/deneb.h (limited to 'include') diff --git a/include/configs/deneb.h b/include/configs/deneb.h deleted file mode 100644 index f155bb8bf50..00000000000 --- a/include/configs/deneb.h +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright 2019 Siemens AG - * - */ - -#ifndef __DENEB_H -#define __DENEB_H - -#include "capricorn-common.h" - -/* DDR3 board total DDR is 2 GB */ -#undef PHYS_SDRAM_1_SIZE -#define PHYS_SDRAM_1_SIZE 0x80000000 /* 2 GB */ - -#endif /* __DENEB_H */ -- cgit v1.2.3 From 0cc0f68b7e6ce3865ba2708ffefc44c5117bf676 Mon Sep 17 00:00:00 2001 From: Enrico Leto Date: Sat, 23 Nov 2024 17:53:00 +0100 Subject: siemens: capricorn: get ram size from system controller Get the memory region information from system controller to reduce the number of platform specific headers. We were aligned on NXP mek board implementation. This need at least 1 header per memory configuration. Signed-off-by: Enrico Leto Signed-off-by: Heiko Schocher --- include/configs/capricorn-common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/capricorn-common.h b/include/configs/capricorn-common.h index 1f61b2b6af6..4d95f3fd79b 100644 --- a/include/configs/capricorn-common.h +++ b/include/configs/capricorn-common.h @@ -95,7 +95,9 @@ #define CFG_SYS_SDRAM_BASE 0x80000000 #define PHYS_SDRAM_1 0x80000000 #define PHYS_SDRAM_2 0x880000000 -/* DDR3 board total DDR is 1 GB */ +/* Set default values to the smallest DDR we have in capricorn modules + * Use it in case the system controller would return an error + */ #define PHYS_SDRAM_1_SIZE 0x40000000 /* 1 GB */ #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 GB */ -- cgit v1.2.3