add Toradex Verdin iMX95 support
Subsystems (4)
cover add Toradex Verdin iMX95 support
From: Emanuele Ghidoli <[email protected]>
This series adds initial U-Boot support for the Toradex Verdin iMX95.
It also introduces a new RAM-size probing helper based on alias checks. On Verdin iMX95, the first DDR region is reserved for Cortex-M7 firmware and the get_ram_size() could not be used to detect the actual RAM size. Using explicit probe/alias pairs provides reliable size detection for the supported memory variants.
The board DT is currently aligned with linux-next. Once the board DTS is in mainline Linux, we'll move to OF_UPSTREAM.
Emanuele Ghidoli (3):
common: memsize: add RAM size probe based on alias detection
board: toradex: add Toradex Verdin iMX95
toradex: tdx-cfg-block: add verdin imx95 0226, 0227 and 0228 pid4
arch/arm/dts/imx95-verdin-dev.dtsi | 239 ++++ .../arm/dts/imx95-verdin-wifi-dev-u-boot.dtsi | 112 ++ arch/arm/dts/imx95-verdin-wifi-dev.dts | 21 + arch/arm/dts/imx95-verdin-wifi.dtsi | 50 + arch/arm/dts/imx95-verdin.dtsi | 1172 +++++++++++++++++ arch/arm/mach-imx/imx9/Kconfig | 5 + board/toradex/common/tdx-cfg-block.c | 3 + board/toradex/common/tdx-cfg-block.h | 3 + board/toradex/verdin-imx95/Kconfig | 36 + board/toradex/verdin-imx95/MAINTAINERS | 13 + board/toradex/verdin-imx95/Makefile | 8 + board/toradex/verdin-imx95/spl.c | 75 ++ board/toradex/verdin-imx95/verdin-imx95.c | 80 ++ board/toradex/verdin-imx95/verdin-imx95.env | 20 + common/memsize.c | 56 + configs/verdin-imx95_defconfig | 183 +++ doc/board/toradex/index.rst | 1 + doc/board/toradex/verdin-imx95.rst | 171 +++ include/configs/verdin-imx95.h | 27 + include/init.h | 7 + 20 files changed, 2282 insertions(+) create mode 100644 arch/arm/dts/imx95-verdin-dev.dtsi create mode 100644 arch/arm/dts/imx95-verdin-wifi-dev-u-boot.dtsi create mode 100644 arch/arm/dts/imx95-verdin-wifi-dev.dts create mode 100644 arch/arm/dts/imx95-verdin-wifi.dtsi create mode 100644 arch/arm/dts/imx95-verdin.dtsi create mode 100644 board/toradex/verdin-imx95/Kconfig create mode 100644 board/toradex/verdin-imx95/MAINTAINERS create mode 100644 board/toradex/verdin-imx95/Makefile create mode 100644 board/toradex/verdin-imx95/spl.c create mode 100644 board/toradex/verdin-imx95/verdin-imx95.c create mode 100644 board/toradex/verdin-imx95/verdin-imx95.env create mode 100644 configs/verdin-imx95_defconfig create mode 100644 doc/board/toradex/verdin-imx95.rst create mode 100644 include/configs/verdin-imx95.h
Signature · 1 line
2.43.0
PATCH 1/3 common: memsize: add RAM size probe based on alias detection
From: Emanuele Ghidoli <[email protected]>
Add probe_ram_size_by_alias() to detect RAM size by checking whether a write to one address aliases to another address.
Compared to get_ram_size(), this function allows the caller to:
- limit probing to a small set of required accesses
- avoid touching reserved or already used memory regions
- handle non-linear alias patterns
On the iMX95 SoC, when used with LPDDR5, accesses beyond the end of an 8GB DDR configuration do not alias to the expected linear wrap-around addresses. Instead, the aliased addresses appears to follow a pattern related to the DDRC bank and bank-group addresses mapping. Experimentally, the observed pattern is:
Write Read
y00000000 -> x0001c000
y00004000 -> x00018000
y00008000 -> x00014000
y0000c000 -> x00010000
y00010000 -> x0000c000
y00014000 -> x00008000
y00018000 -> x00004000
y0001c000 -> x00000000
This helper makes it possible to probe RAM size by explicitly specifying the probed address and the expected alias address for each size check.
--- common/memsize.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ include/init.h | 7 ++++++ 2 files changed, 63 insertions(+)
common/memsize.c +56 -0
@@ -127,6 +127,62 @@ long get_ram_size(long *base, long maxsize)return (maxsize); } +/** +* probe_ram_size_by_alias() - Detect RAM size using known alias addresses +* @checks: Array of RAM alias probe descriptors, terminated by a NULL +* @probe_addr entry +* +* Probe RAM size by writing a test pattern to each @probe_addr and checking +* whether the same pattern does not appear at the corresponding @alias_addr. +* This is useful on systems where address wrap-around does not alias to the +* base of memory in a linear way, so get_ram_size() cannot be used directly. +* It is also useful on systems where the base of the physical memory cannot +* be safely accessed, so get_ram_size() cannot be used at all. +* +* Return: The size associated with the first matching entry, or 0 if no match +* is found. +*/ +long probe_ram_size_by_alias (const struct ram_alias_check *checks) +{ +long save[2 ]; +int dcache_en =dcache_status (); +long ret =0 ; + +while (checks->probe_addr && !ret) { +volatile long *d = checks->probe_addr; +volatile long *s = checks->alias_addr; + + save[0 ] = *s; + save[1 ] = *d; +/* Ensure s is written and not cached */ +if (dcache_en) +dcache_flush_invalidate (s); + + *d = ~save[0 ]; +sync (); +if (dcache_en) +dcache_flush_invalidate (d); + +if (*s != ~save[0 ]) + ret = checks->size; + +/* Restore content */ + *d = save[1 ]; +sync (); +if (dcache_en) +dcache_flush_invalidate (d); + + *s = save[0 ]; +sync (); +if (dcache_en) +dcache_flush_invalidate (s); + + checks++; + } + +return ret; +} +phys_size_t __weak get_effective_memsize (void ) {phys_size_t ram_size = gd->ram_size;
include/init.h +7 -0
@@ -14,6 +14,12 @@#include <linux/types.h> +struct ram_alias_check { +void *probe_addr; +void *alias_addr; +long size; +}; +/* * In case of the EFI app the UEFI firmware provides the low-level * initialisation.
@@ -88,6 +94,7 @@ int dram_init(void);int dram_init_banksize (void );long get_ram_size (long *base,long size); +long probe_ram_size_by_alias (const struct ram_alias_check *checks);phys_size_t get_effective_memsize (void );int testdram (void );
Signature · 1 line
2.43.0
Re: [PATCH v1 1/3] common: memsize: add RAM size probe based on alias detection
Hi Emanuele,
Quoted 28 lines · Emanuele Ghidoli
common: memsize: add RAM size probe based on alias detection
Add
probe_ram_size_by_alias()to detect RAM size by checking whether a write to one address aliases to another address.Compared to
get_ram_size(), this function allows the caller to:
- limit probing to a small set of required accesses
- avoid touching reserved or already used memory regions
- handle non-linear alias patternsOn the iMX95 SoC, when used with LPDDR5, accesses beyond the end of an 8GB DDR configuration do not alias to the expected linear wrap-around addresses. Instead, the aliased addresses appears to follow a pattern related to the DDRC bank and bank-group addresses mapping. Experimentally, the observed pattern is:
Write Read
y00000000 -> x0001c000
y00004000 -> x00018000
y00008000 -> x00014000
[...]
common/memsize.c| 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++include/init.h | 7 +++++++ 2 files changed, 63 insertions(+)
common/memsize.c long get_ram_size(long *base, long maxsize) · line 130
Quoted 4 lines
common/memsize.c +4
-0@@ -127,6 +127,62 @@ long get_ram_size(long *base, long maxsize) +long probe_ram_size_by_alias (const struct ram_alias_check *checks) +{ +long save[2 ]; +int dcache_en =dcache_status ();
Do we need to check for CONFIG_IS_ENABLED(SYS_DCACHE_OFF) here?
Regards,
Simon
PATCH 2/3 board: toradex: add Toradex Verdin iMX95
In reply to Emanuele GhidoliFrom: Emanuele Ghidoli <[email protected]>
Add support for the Toradex Verdin iMX95.
--- arch/arm/dts/imx95-verdin-dev.dtsi | 239 ++++ .../arm/dts/imx95-verdin-wifi-dev-u-boot.dtsi | 112 ++ arch/arm/dts/imx95-verdin-wifi-dev.dts | 21 + arch/arm/dts/imx95-verdin-wifi.dtsi | 50 + arch/arm/dts/imx95-verdin.dtsi | 1172 +++++++++++++++++ arch/arm/mach-imx/imx9/Kconfig | 5 + board/toradex/verdin-imx95/Kconfig | 36 + board/toradex/verdin-imx95/MAINTAINERS | 13 + board/toradex/verdin-imx95/Makefile | 8 + board/toradex/verdin-imx95/spl.c | 75 ++ board/toradex/verdin-imx95/verdin-imx95.c | 79 ++ board/toradex/verdin-imx95/verdin-imx95.env | 20 + configs/verdin-imx95_defconfig | 183 +++ doc/board/toradex/index.rst | 1 + doc/board/toradex/verdin-imx95.rst | 171 +++ include/configs/verdin-imx95.h | 27 + 16 files changed, 2212 insertions(+) create mode 100644 arch/arm/dts/imx95-verdin-dev.dtsi create mode 100644 arch/arm/dts/imx95-verdin-wifi-dev-u-boot.dtsi create mode 100644 arch/arm/dts/imx95-verdin-wifi-dev.dts create mode 100644 arch/arm/dts/imx95-verdin-wifi.dtsi create mode 100644 arch/arm/dts/imx95-verdin.dtsi create mode 100644 board/toradex/verdin-imx95/Kconfig create mode 100644 board/toradex/verdin-imx95/MAINTAINERS create mode 100644 board/toradex/verdin-imx95/Makefile create mode 100644 board/toradex/verdin-imx95/spl.c create mode 100644 board/toradex/verdin-imx95/verdin-imx95.c create mode 100644 board/toradex/verdin-imx95/verdin-imx95.env create mode 100644 configs/verdin-imx95_defconfig create mode 100644 doc/board/toradex/verdin-imx95.rst create mode 100644 include/configs/verdin-imx95.h
arch/arm/dts/imx95-verdin-dev.dtsi new file +239 -0
@@ -0,0 +1,239 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) Toradex + * + * Common dtsi for Verdin iMX95 SoM on development carrier board + * + * https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx95 + * https://www.toradex.com/products/carrier-board/verdin-development-board-kit + */ + +/ { + aliases { + eeprom1 = &carrier_eeprom; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&codec_dai>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&codec_dai>; + simple-audio-card,mclk-fs = <256>; + simple-audio-card,name = "verdin-nau8822"; + simple-audio-card,routing = + "Headphones", "LHP", + "Headphones", "RHP", + "Speaker", "LSPK", + "Speaker", "RSPK", + "Line Out", "AUXOUT1", + "Line Out", "AUXOUT2", + "LAUX", "Line In", + "RAUX", "Line In", + "LMICP", "Mic In", + "RMICP", "Mic In"; + simple-audio-card,widgets = + "Headphones", "Headphones", + "Line Out", "Line Out", + "Speaker", "Speaker", + "Microphone", "Mic In", + "Line", "Line In"; + + codec_dai: simple-audio-card,codec { + clocks = <&scmi_clk IMX95_CLK_SAI3>; + sound-dai = <&nau8822_1a>; + }; + + simple-audio-card,cpu { + sound-dai = <&sai3>; + }; + }; +}; + +/* Verdin ADC_1, ADC_2, ADC_3 and ADC_4 */ +&adc1 { + status = "okay"; +}; + +/* Verdin ETH_1 (On-module PHY) */ +&enetc_port0 { + status = "okay"; +}; + +/* Verdin ETH_2_RGMII */ +&enetc_port1 { + phy-handle = <ðphy2>; + phy-mode = "rgmii-id"; + status = "okay"; +}; + +/* Verdin QSPI_1 */ +&flexspi1 { + status = "okay"; +}; + +&gpio1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; +}; + +&gpio2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio1>, + <&pinctrl_gpio2>, + <&pinctrl_gpio3>; +}; + +&gpio3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio6>; +}; + +&gpio4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio5>; +}; + +&gpio5 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio4>; +}; + +/* Verdin I2C_3_HDMI */ +&i3c2 { + status = "okay"; +}; + +/* Verdin I2C_2_DSI */ +&lpi2c3 { + status = "okay"; +}; + +/* Verdin I2C_1 */ +&lpi2c4 { + status = "okay"; + + nau8822_1a: audio-codec@1a { + compatible = "nuvoton,nau8822"; + reg = <0x1a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai3_mclk>; + #sound-dai-cells = <0>; + }; + + carrier_gpio_expander: gpio@21 { + compatible = "nxp,pcal6416"; + reg = <0x21>; + #gpio-cells = <2>; + gpio-controller; + }; + + /* Current measurement into module VCC */ + hwmon@40 { + compatible = "ti,ina219"; + reg = <0x40>; + shunt-resistor = <10000>; + }; + + temperature-sensor@4f { + compatible = "ti,tmp75c"; + reg = <0x4f>; + }; + + carrier_eeprom: eeprom@57 { + compatible = "st,24c02", "atmel,24c02"; + reg = <0x57>; + pagesize = <16>; + }; +}; + +/* Verdin I2C_4_CSI */ +&lpi2c5 { + status = "okay"; +}; + +/* Verdin UART_3, used as the Linux console */ +&lpuart1 { + status = "okay"; +}; + +/* Verdin UART_4 */ +&lpuart2 { + status = "okay"; +}; + +/* Verdin UART_1, connector X50 through RS485 transceiver */ +&lpuart7 { + rs485-rts-active-low; + rs485-rx-during-tx; + linux,rs485-enabled-at-boot-time; + + status = "okay"; +}; + +/* Verdin UART_2 */ +&lpuart8 { + status = "okay"; +}; + +&netc_emdio { + ethphy2: ethernet-phy@7 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <7>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_eth2_rgmii_int>; + interrupt-parent = <&gpio1>; + interrupts = <12 IRQ_TYPE_LEVEL_LOW>; + micrel,led-mode = <0>; + }; +}; + +/* Verdin PCIE_1 */ +&pcie0 { + status = "okay"; +}; + +/* Verdin I2S_1 */ +&sai3 { + status = "okay"; +}; + +/* Verdin PWM_1 */ +&tpm4 { + status = "okay"; +}; + +/* Verdin PWM_2 */ +&tpm5 { + status = "okay"; +}; + +/* Verdin PWM_3_DSI */ +&tpm6 { + status = "okay"; +}; + +/* Verdin USB_1 */ +&usb2 { + status = "okay"; +}; + +/* Verdin USB_2 */ +&usb3 { + fsl,permanently-attached; + + status = "okay"; +}; + +&usb3_phy { + status = "okay"; +}; + +/* Verdin SD_1 */ +&usdhc2 { + status = "okay"; +}; + +/* Verdin CTRL_WAKE1_MICO# */ +&verdin_gpio_keys { + status = "okay"; +};
arch/arm/dts/imx95-verdin-wifi-dev-u-boot.dtsi new file +112 -0
112 lines not on this page · raw message
arch/arm/dts/imx95-verdin-wifi-dev.dts new file +21 -0
@@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) Toradex + * + * https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx95 + * https://www.toradex.com/products/carrier-board/verdin-development-board-kit + */ + +/dts-v1/; + +#include "imx95-verdin.dtsi" +#include "imx95-verdin-wifi.dtsi" +#include "imx95-verdin-dev.dtsi" + +/ { + model = "Toradex Verdin iMX95 WB on Verdin Development Board"; + compatible = "toradex,verdin-imx95-wifi-dev", + "toradex,verdin-imx95-wifi", + "toradex,verdin-imx95", + "fsl,imx95"; +};
arch/arm/dts/imx95-verdin-wifi.dtsi new file +50 -0
50 lines not on this page · raw message
arch/arm/dts/imx95-verdin.dtsi new file +1172 -0
1,172 lines not on this page · raw message
arch/arm/mach-imx/imx9/Kconfig +5 -0
@@ -171,6 +171,10 @@ config TARGET_TORADEX_SMARC_IMX95 select IMX95 imply OF_UPSTREAM +config TARGET_VERDIN_IMX95 + bool "Support Toradex Verdin iMX95 module" + select IMX95 + config TARGET_IMX952_EVK bool "imx952_evk" select IMX_SM_CPU
@@ -195,6 +199,7 @@ source "board/variscite/imx93_var_som/Kconfig" source "board/nxp/imx94_evk/Kconfig" source "board/nxp/imx95_evk/Kconfig" source "board/toradex/smarc-imx95/Kconfig" +source "board/toradex/verdin-imx95/Kconfig" source "board/nxp/imx952_evk/Kconfig" endif
board/toradex/verdin-imx95/Kconfig new file +36 -0
@@ -0,0 +1,36 @@ +if TARGET_VERDIN_IMX95 + +config SYS_BOARD + default "verdin-imx95" + +config SYS_VENDOR + default "toradex" + +config SYS_CONFIG_NAME + default "verdin-imx95" + +config TDX_CFG_BLOCK + default y + +config TDX_CFG_BLOCK_2ND_ETHADDR + default y + +config TDX_CFG_BLOCK_DEV + default "0" + +# Toradex config block in eMMC, at the end of 1st "boot sector" +config TDX_CFG_BLOCK_OFFSET + default "-512" + +config TDX_CFG_BLOCK_PART + default "1" + +config TDX_HAVE_EEPROM_EXTRA + default y + +config TDX_HAVE_MMC + default y + +source "board/toradex/common/Kconfig" + +endif
board/toradex/verdin-imx95/MAINTAINERS new file +13 -0
@@ -0,0 +1,13 @@ +Verdin iMX95 +F: arch/arm/dts/imx95-verdin.dtsi +F: arch/arm/dts/imx95-verdin-dev.dtsi +F: arch/arm/dts/imx95-verdin-wifi.dtsi +F: arch/arm/dts/imx95-verdin-wifi-dev.dts +F: arch/arm/dts/imx95-verdin-wifi-dev-u-boot.dtsi +F: board/toradex/verdin-imx95/ +F: configs/verdin-imx95_defconfig +F: doc/board/toradex/verdin-imx95.rst +F: include/configs/verdin-imx95.h +M: Francesco Dolcini <[email protected]> +S: Maintained +W: https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx95
board/toradex/verdin-imx95/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) Toradex + +obj-y += verdin-imx95.o + +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +endif
board/toradex/verdin-imx95/spl.c new file +75 -0
75 lines not on this page · raw message
board/toradex/verdin-imx95/verdin-imx95.c new file +79 -0
79 lines not on this page · raw message
board/toradex/verdin-imx95/verdin-imx95.env new file +20 -0
@@ -0,0 +1,20 @@ +boot_scripts=boot.scr +boot_script_dhcp=boot.scr +boot_targets=mmc1 mmc0 dhcp +console=ttyLP2 +fdt_board=dev +fdt_addr=0x9c400000 +fdt_addr_r=0x9c400000 +kernel_addr_r=CONFIG_SYS_LOAD_ADDR +kernel_comp_addr_r=0x94400000 +kernel_comp_size=0x8000000 +ramdisk_addr_r=0x9c800000 +scriptaddr=0x9c600000 + +update_uboot= + askenv confirm Did you load flash.bin (y/N)?; + if test "$confirm" = y; then + setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt + ${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 + ${blkcnt}; + fi
configs/verdin-imx95_defconfig new file +183 -0
183 lines not on this page · raw message
doc/board/toradex/index.rst +1 -0
@@ -16,3 +16,4 @@ Toradex verdin-am62p verdin-imx8mm verdin-imx8mp + verdin-imx95
doc/board/toradex/verdin-imx95.rst new file +171 -0
171 lines not on this page · raw message
include/configs/verdin-imx95.h new file +27 -0
@@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (c) Toradex */ + +#ifndef __VERDIN_IMX95_H +#define __VERDIN_IMX95_H + +#include <linux/sizes.h> +#include <asm/arch/imx-regs.h> + +/* For 32GB modules: 2GB from 0x80000000..0xffffffff, 30GB above. +* Actual size is determited at runtime. +*/ +#define SZ_30G _AC(0x780000000, ULL) + +/* The first 256MB of SDRAM is reserved for firmware (Cortex M7) */ +#define PHYS_SDRAM_FW_RSVD SZ_256M +#define CFG_SYS_INIT_RAM_ADDR PHYS_SDRAM +#define CFG_SYS_INIT_RAM_SIZE SZ_2M + +#define CFG_SYS_SDRAM_BASE PHYS_SDRAM +#define PHYS_SDRAM (0x80000000 + PHYS_SDRAM_FW_RSVD) +#define PHYS_SDRAM_SIZE (SZ_2G - PHYS_SDRAM_FW_RSVD) +#define PHYS_SDRAM_2_SIZE SZ_30G + +#define WDOG_BASE_ADDR WDG3_BASE_ADDR + +#endif
Signature · 1 line
2.43.0
Re: [PATCH v1 2/3] board: toradex: add Toradex Verdin iMX95
Hi Emanuele,
Quoted 32 lines · Emanuele Ghidoli
board: toradex: add Toradex Verdin iMX95
Add support for the Toradex Verdin iMX95.
Signed-off-by Emanuele Ghidoli <[email protected]>Co-developed-by Ernest Van Hoecke <[email protected]>Signed-off-by Ernest Van Hoecke <[email protected]>Co-developed-by Francesco Dolcini <[email protected]>Signed-off-by Francesco Dolcini <[email protected]>
arch/arm/dts/imx95-verdin-dev.dtsi| 239 +++++arch/arm/dts/imx95-verdin-wifi-dev-u-boot.dtsi | 112 +++ arch/arm/dts/imx95-verdin-wifi-dev.dts | 21 + arch/arm/dts/imx95-verdin-wifi.dtsi | 50 + arch/arm/dts/imx95-verdin.dtsi | 1172 ++++++++++++++++++++++++ arch/arm/mach-imx/imx9/Kconfig | 5 + board/toradex/verdin-imx95/Kconfig | 36 + board/toradex/verdin-imx95/MAINTAINERS | 13 + board/toradex/verdin-imx95/Makefile | 8 + board/toradex/verdin-imx95/spl.c | 75 ++ board/toradex/verdin-imx95/verdin-imx95.c | 79 ++ board/toradex/verdin-imx95/verdin-imx95.env | 20 + configs/verdin-imx95_defconfig | 183 ++++ doc/board/toradex/index.rst | 1 + doc/board/toradex/verdin-imx95.rst | 171 ++++ include/configs/verdin-imx95.h | 27 + 16 files changed, 2212 insertions(+)
include/configs/verdin-imx95.h line 2
Quoted 2 lines
include/configs/verdin-imx95.h +2
-0@@ -0,0 +1,27 @@ +/* For 32GB modules: 2GB from 0x80000000..0xffffffff, 30GB above. +* Actual size is determited at runtime.
determined
board/toradex/verdin-imx95/verdin-imx95.c line 7
Quoted 9 lines
board/toradex/verdin-imx95/verdin-imx95.c +7
-0@@ -0,0 +1,79 @@ +const struct ram_alias_check ram_alias_check[] = { + { (void *)(PHYS_SDRAM +SZ_8G ), (void *)(PHYS_SDRAM ),SZ_16G }, + { (void *)(PHYS_SDRAM +SZ_4G ), (void *)(PHYS_SDRAM ),SZ_8G }, + { (void *)(PHYS_SDRAM +SZ_2G ), (void *)(PHYS_SDRAM ),SZ_4G }, + { (void *)(PHYS_SDRAM +SZ_1G ), (void *)(PHYS_SDRAM ),SZ_2G }, + {NULL } +};
How about ram_alias_checks[] to avoid confusion with the type. Also, can it be static?
Regards,
Simon
PATCH 3/3 toradex: tdx-cfg-block: add verdin imx95 0226, 0227 and 0228 pid4
In reply to Emanuele GhidoliFrom: Emanuele Ghidoli <[email protected]>
Add these new PID4 to config block handling:
- 0226 Verdin iMX95 Hexa 4GB WB IT
- 0227 Verdin iMX95 Hexa 4GB ET
- 0228 Verdin iMX95 Hexa 16GB IT
--- board/toradex/common/tdx-cfg-block.c | 3 +++ board/toradex/common/tdx-cfg-block.h | 3 +++ board/toradex/verdin-imx95/verdin-imx95.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-)
board/toradex/common/tdx-cfg-block.c +3 -0
@@ -187,6 +187,9 @@ const struct toradex_som toradex_modules[] = { { OSM_IMX91S_2GB_IT, "OSM iMX91 Solo 2GB IT", TARGET_IS_ENABLED(TORADEX_OSM_IMX91) }, { VERDIN_AM62D_1G_ET_GPU_NODSI, "Verdin AM62 Dual 1GB ET", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, { AQUILA_TDA4O_16GB_IT, "Aquila TDA4 Octa 16GB IT", TARGET_IS_ENABLED(AQUILA_AM69_A72) }, + { VERDIN_IMX95H_4G_WB_IT, "Verdin iMX95 Hexa 4GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX95) }, + { VERDIN_IMX95H_4G_ET, "Verdin iMX95 Hexa 4GB ET", TARGET_IS_ENABLED(VERDIN_IMX95) }, + { VERDIN_IMX95H_16G_IT, "Verdin iMX95 Hexa 16GB IT", TARGET_IS_ENABLED(VERDIN_IMX95) }, }; struct pid4list {
board/toradex/common/tdx-cfg-block.h +3 -0
@@ -150,6 +150,9 @@ enum {OSM_IMX91S_2GB_IT ,/* 220 */ VERDIN_AM62D_1G_ET_GPU_NODSI ,AQUILA_TDA4O_16GB_IT =223 , +VERDIN_IMX95H_4G_WB_IT =226 , +VERDIN_IMX95H_4G_ET , + VERDIN_IMX95H_16G_IT, }; enum {
board/toradex/verdin-imx95/verdin-imx95.c +2 -1
@@ -27,7 +27,8 @@ static void select_dt_from_module_version(void)* module with Wi-Fi/Bluetooth make sure we use the -wifi * device tree. */ - is_wifi = (tdx_hw_tag.prodid ==VERDIN_IMX95H_8G_WIFI_BT_IT ); + is_wifi = (tdx_hw_tag.prodid ==VERDIN_IMX95H_8G_WIFI_BT_IT ) || + (tdx_hw_tag.prodid ==VERDIN_IMX95H_4G_WB_IT ); }if (is_wifi)
Signature · 1 line
2.43.0
Re: [PATCH v1 3/3] toradex: tdx-cfg-block: add verdin imx95 0226, 0227 and 0228 pid4
Quoted 7 lines · Emanuele Ghidoli
toradex: tdx-cfg-block: add verdin imx95 0226, 0227 and 0228 pid4
Add these new PID4 to config block handling:
- 0226 Verdin iMX95 Hexa 4GB WB IT
- 0227 Verdin iMX95 Hexa 4GB ET
- 0228 Verdin iMX95 Hexa 16GB IT
Quoted 6 lines
Signed-off-by Emanuele Ghidoli <[email protected]>
board/toradex/common/tdx-cfg-block.c| 3 +++board/toradex/common/tdx-cfg-block.h | 3 +++ board/toradex/verdin-imx95/verdin-imx95.c | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-)
Quoted 9 lines · Emanuele Ghidoli
From: Emanuele Ghidoli <[email protected]>
This series adds initial U-Boot support for the Toradex Verdin iMX95.
It also introduces a new RAM-size probing helper based on alias checks. On Verdin iMX95, the first DDR region is reserved for Cortex-M7 firmware and the
get_ram_size()could not be used to detect the actual RAM size. Using explicit probe/alias pairs provides reliable size detection for the supported memory variants.