From e1897784aa9e8dec30ad1067c1107dbd287e5024 Mon Sep 17 00:00:00 2001 From: Benjamin Hahn Date: Tue, 12 Mar 2024 10:39:11 +0100 Subject: board: phytec: define get_som_type also when SoM detection is disabled define the phytec_get_som_type function also when the SoM detection is disabled. Fixes: commit 110d321a56c3 ("board: phytec: common: phytec_som_detection: Add phytec_get_som_type") Signed-off-by: Benjamin Hahn --- board/phytec/common/phytec_som_detection.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/phytec/common/phytec_som_detection.c b/board/phytec/common/phytec_som_detection.c index f9607b0..a56e0f6 100644 --- a/board/phytec/common/phytec_som_detection.c +++ b/board/phytec/common/phytec_som_detection.c @@ -248,4 +248,9 @@ u8 __maybe_unused phytec_get_rev(struct phytec_eeprom_data *data) return PHYTEC_EEPROM_INVAL; } +u8 __maybe_unused phytec_get_som_type(struct phytec_eeprom_data *data) +{ + return PHYTEC_EEPROM_INVAL; +} + #endif /* IS_ENABLED(CONFIG_PHYTEC_SOM_DETECTION) */ -- cgit v1.1 From fdd529fa624e8b235a949b63b932d3eb1e9641b9 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 12 Mar 2024 21:36:41 -0300 Subject: colibri-imx8x: Fix sc_misc_otp_fuse_read() error check Commit aa6e698a7acd ("imx: toradex/colibri-imx8x: correct SCU API usage") made an incorrect logic change in the error code check of sc_misc_otp_fuse_read(): - if (sc_err == SC_ERR_NONE) { + if (sc_err) { /* DX has two A35 cores disabled */ return (val & 0xf) != 0x0; } The other changes in this commit are correct. sc_misc_otp_fuse_read() returns 0 on a successful fuse read. This inversion causes board_mem_get_layout() to report incorrect RAM size. Go back the original error check logic to fix the problem. Fixes: aa6e698a7acd ("imx: toradex/colibri-imx8x: correct SCU API usage") Reported-by: Hiago De Franco Signed-off-by: Fabio Estevam Reviewed-by: Peng Fan Acked-by: Marcel Ziswiler Tested-by: Hiago De Franco # Toradex Colibri iMX8X 1GB --- board/toradex/colibri-imx8x/colibri-imx8x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/toradex/colibri-imx8x/colibri-imx8x.c b/board/toradex/colibri-imx8x/colibri-imx8x.c index 2c673a4..6fc8076 100644 --- a/board/toradex/colibri-imx8x/colibri-imx8x.c +++ b/board/toradex/colibri-imx8x/colibri-imx8x.c @@ -46,7 +46,7 @@ static int is_imx8dx(void) u32 val = 0; int sc_err = sc_misc_otp_fuse_read(-1, 6, &val); - if (sc_err) { + if (!sc_err) { /* DX has two A35 cores disabled */ return (val & 0xf) != 0x0; } -- cgit v1.1 From cd7af7ee5a06b367fb0f866346ea82c69b96e2f8 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 12 Mar 2024 21:59:41 -0300 Subject: apalis-imx8: Fix sc_misc_otp_fuse_read() error check Commit bfb3409d676f ("imx: toradex/apalis-imx8: correct SCU API usage") made an incorrect logic change in the error code check of sc_misc_otp_fuse_read(): - if (scierr == SC_ERR_NONE) { + if (scierr) { /* QP has one A72 core disabled */ is_quadplus = ((val >> 4) & 0x3) != 0x0; } The other changes in this commit are correct. sc_misc_otp_fuse_read() returns 0 on a successful fuse read. This inversion causes board_mem_get_layout() to report incorrect RAM size. Go back the original error check logic to fix the problem. Fixes: bfb3409d676f ("imx: toradex/apalis-imx8: correct SCU API usage") Signed-off-by: Fabio Estevam Reviewed-by: Peng Fan Acked-by: Marcel Ziswiler --- board/toradex/apalis-imx8/apalis-imx8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c index 2483a63..49719f2 100644 --- a/board/toradex/apalis-imx8/apalis-imx8.c +++ b/board/toradex/apalis-imx8/apalis-imx8.c @@ -133,7 +133,7 @@ void board_mem_get_layout(u64 *phys_sdram_1_start, struct tdx_user_fuses tdxramfuses; int scierr = sc_misc_otp_fuse_read(-1, 6, &val); - if (scierr) { + if (!scierr) { /* QP has one A72 core disabled */ is_quadplus = ((val >> 4) & 0x3) != 0x0; } -- cgit v1.1 From e648c4a3455a4d1880efe121602ed90a0bc9b53f Mon Sep 17 00:00:00 2001 From: Vitor Soares Date: Fri, 15 Mar 2024 14:44:25 +0000 Subject: arm: imx: imx8m: soc: Fix NPU/VPU fdt disable fixup On imx8m[m|p|q].dtsi, upstream Linux uses different names for NPU/VPU IP block nodes. It leads variants without such HW block having it enabled by default. This patch adds the upstream Linux node's paths to the disable list while keep the compatibility with downstream Linux. Signed-off-by: Vitor Soares Reviewed-by: Francesco Dolcini --- arch/arm/mach-imx/imx8m/soc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 39802d6..0c49fb9 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -933,19 +933,28 @@ int disable_vpu_nodes(void *blob) { static const char * const nodes_path_8mq[] = { "/vpu@38300000", - "/soc@0/vpu@38300000" + "/soc@0/vpu@38300000", + "/soc@0/video-codec@38300000", + "/soc@0/video-codec@38310000", + "/soc@0/blk-ctrl@38320000", }; static const char * const nodes_path_8mm[] = { "/vpu_g1@38300000", "/vpu_g2@38310000", - "/vpu_h1@38320000" + "/vpu_h1@38320000", + "/soc@0/video-codec@38300000", + "/soc@0/video-codec@38310000", + "/soc@0/blk-ctrl@38330000", }; static const char * const nodes_path_8mp[] = { "/vpu_g1@38300000", "/vpu_g2@38310000", - "/vpu_vc8000e@38320000" + "/vpu_vc8000e@38320000", + "/soc@0/video-codec@38300000", + "/soc@0/video-codec@38310000", + "/soc@0/blk-ctrl@38330000", }; if (is_imx8mq()) @@ -1100,7 +1109,8 @@ int disable_gpu_nodes(void *blob) int disable_npu_nodes(void *blob) { static const char * const nodes_path_8mp[] = { - "/vipsi@38500000" + "/vipsi@38500000", + "/soc@0/npu@38500000", }; return disable_fdt_nodes(blob, nodes_path_8mp, ARRAY_SIZE(nodes_path_8mp)); -- cgit v1.1