Add Gateworks Venice board support
Subsystems (3)
v3 cover Add Gateworks Venice board support
The Gateworks Venice product family consists of several boards based on the i.MX 8M Mini SoC.
A challenge I've had with this is that the board model information is stored in an I2C based EEPROM that must be read to know what PMIC is on the board in order to adjust certain power rails before DRAM init is called. I found this to be a challenge in the SPL as the SPL does not free memory thus the conceprt of calling dm_uninit() followed by dm_init_and_scan() to change dt's live in the SPL runs out of memory. Therefore I can't rely on DT/DM within the SPL for things that may differ board to board.
Best Regards,
Tim
---
v3:
- drop already merged patches from series
- add reference to Linux version files were pulled from in commits
- fix accidental change to TARGET_IMX8MN_EVK
- gsc.h: remove unused MAX6642 defines from
- power_init_board: fix PMIC access by using dm_i2c
v2:
- drop pmic patch that was already merged
- add imx_tmu patch
- update common/image patch as requested
Tim Harvey (2):
arm: dts: imx8mm: add Gateworks i.MX8 Mini Dev kits
board: gateworks: imx8mm: Add Gateworks Venice board support
arch/arm/dts/Makefile | 4 + arch/arm/dts/imx8mm-venice-gw700x-u-boot.dtsi | 105 + arch/arm/dts/imx8mm-venice-gw700x.dtsi | 495 ++++ .../dts/imx8mm-venice-gw71xx-0x-u-boot.dtsi | 5 + arch/arm/dts/imx8mm-venice-gw71xx-0x.dts | 19 + arch/arm/dts/imx8mm-venice-gw71xx.dtsi | 186 ++ .../dts/imx8mm-venice-gw72xx-0x-u-boot.dtsi | 5 + arch/arm/dts/imx8mm-venice-gw72xx-0x.dts | 20 + arch/arm/dts/imx8mm-venice-gw72xx.dtsi | 311 ++ .../dts/imx8mm-venice-gw73xx-0x-u-boot.dtsi | 5 + arch/arm/dts/imx8mm-venice-gw73xx-0x.dts | 19 + arch/arm/dts/imx8mm-venice-gw73xx.dtsi | 362 +++ arch/arm/dts/imx8mm-venice-u-boot.dtsi | 103 + arch/arm/dts/imx8mm-venice.dts | 152 + arch/arm/mach-imx/imx8m/Kconfig | 7 + board/gateworks/venice/Kconfig | 13 + board/gateworks/venice/MAINTAINERS | 7 + board/gateworks/venice/Makefile | 12 + board/gateworks/venice/README | 34 + board/gateworks/venice/gsc.c | 687 +++++ board/gateworks/venice/gsc.h | 40 + board/gateworks/venice/imx8mm_venice.c | 133 + board/gateworks/venice/lpddr4_timing.c | 2505 +++++++++++++++++ board/gateworks/venice/lpddr4_timing.h | 12 + board/gateworks/venice/spl.c | 205 ++ configs/imx8mm_venice_defconfig | 113 + include/configs/imx8mm_venice.h | 125 + 27 files changed, 5684 insertions(+) create mode 100644 arch/arm/dts/imx8mm-venice-gw700x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw700x.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw71xx-0x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw71xx-0x.dts create mode 100644 arch/arm/dts/imx8mm-venice-gw71xx.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw72xx-0x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw72xx-0x.dts create mode 100644 arch/arm/dts/imx8mm-venice-gw72xx.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw73xx-0x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw73xx-0x.dts create mode 100644 arch/arm/dts/imx8mm-venice-gw73xx.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice.dts create mode 100644 board/gateworks/venice/Kconfig create mode 100644 board/gateworks/venice/MAINTAINERS create mode 100644 board/gateworks/venice/Makefile create mode 100644 board/gateworks/venice/README create mode 100644 board/gateworks/venice/gsc.c create mode 100644 board/gateworks/venice/gsc.h create mode 100644 board/gateworks/venice/imx8mm_venice.c create mode 100644 board/gateworks/venice/lpddr4_timing.c create mode 100644 board/gateworks/venice/lpddr4_timing.h create mode 100644 board/gateworks/venice/spl.c create mode 100644 configs/imx8mm_venice_defconfig create mode 100644 include/configs/imx8mm_venice.h
Signature · 1 line
2.17.1
PATCH v3 1/2 arm: dts: imx8mm: add Gateworks i.MX8 Mini Dev kits
Add Gateworks i.MX 8M Mini Development kits from Linux-5.12-rc1
---
v3: add reference to Linux version files were pulled from
--- arch/arm/dts/Makefile | 4 + arch/arm/dts/imx8mm-venice-gw700x.dtsi | 495 +++++++++++++++++++++++ arch/arm/dts/imx8mm-venice-gw71xx-0x.dts | 19 + arch/arm/dts/imx8mm-venice-gw71xx.dtsi | 186 +++++++++ arch/arm/dts/imx8mm-venice-gw72xx-0x.dts | 20 + arch/arm/dts/imx8mm-venice-gw72xx.dtsi | 311 ++++++++++++++ arch/arm/dts/imx8mm-venice-gw73xx-0x.dts | 19 + arch/arm/dts/imx8mm-venice-gw73xx.dtsi | 362 +++++++++++++++++ 8 files changed, 1416 insertions(+) create mode 100644 arch/arm/dts/imx8mm-venice-gw700x.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw71xx-0x.dts create mode 100644 arch/arm/dts/imx8mm-venice-gw71xx.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw72xx-0x.dts create mode 100644 arch/arm/dts/imx8mm-venice-gw72xx.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw73xx-0x.dts create mode 100644 arch/arm/dts/imx8mm-venice-gw73xx.dtsi
arch/arm/dts/Makefile +4 -0
@@ -790,6 +790,10 @@ dtb-$(CONFIG_ARCH_IMX8) += \ dtb-$(CONFIG_ARCH_IMX8M) += \ imx8mm-evk.dtb \ + imx8mm-venice.dtb \ + imx8mm-venice-gw71xx-0x.dtb \ + imx8mm-venice-gw72xx-0x.dtb \ + imx8mm-venice-gw73xx-0x.dtb \ imx8mm-verdin.dtb \ phycore-imx8mm.dtb \ imx8mn-ddr4-evk.dtb \
arch/arm/dts/imx8mm-venice-gw700x.dtsi new file +495 -0
495 lines not on this page · raw message
arch/arm/dts/imx8mm-venice-gw71xx-0x.dts new file +19 -0
@@ -0,0 +1,19 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2020 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx8mm.dtsi" +#include "imx8mm-venice-gw700x.dtsi" +#include "imx8mm-venice-gw71xx.dtsi" + +/ { + model = "Gateworks Venice GW71xx-0x i.MX8MM Development Kit"; + compatible = "gw,imx8mm-gw71xx-0x", "fsl,imx8mm"; + + chosen { + stdout-path = &uart2; + }; +};
arch/arm/dts/imx8mm-venice-gw71xx.dtsi new file +186 -0
186 lines not on this page · raw message
arch/arm/dts/imx8mm-venice-gw72xx-0x.dts new file +20 -0
@@ -0,0 +1,20 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2020 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx8mm.dtsi" +#include "imx8mm-venice-gw700x.dtsi" +#include "imx8mm-venice-gw72xx.dtsi" + +/ { + model = "Gateworks Venice GW72xx-0x i.MX8MM Development Kit"; + compatible = "gw,imx8mm-gw72xx-0x", "fsl,imx8mm"; + + chosen { + stdout-path = &uart2; + }; +}; +
arch/arm/dts/imx8mm-venice-gw72xx.dtsi new file +311 -0
311 lines not on this page · raw message
arch/arm/dts/imx8mm-venice-gw73xx-0x.dts new file +19 -0
@@ -0,0 +1,19 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2020 Gateworks Corporation + */ + +/dts-v1/; + +#include "imx8mm.dtsi" +#include "imx8mm-venice-gw700x.dtsi" +#include "imx8mm-venice-gw73xx.dtsi" + +/ { + model = "Gateworks Venice GW73xx-0x i.MX8MM Development Kit"; + compatible = "gw,imx8mm-gw73xx-0x", "fsl,imx8mm"; + + chosen { + stdout-path = &uart2; + }; +};
arch/arm/dts/imx8mm-venice-gw73xx.dtsi new file +362 -0
362 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 1/2 arm: dts: imx8mm: add Gateworks i.MX8 Mini Dev kits
Quoted 2 lines
Add Gateworks i.MX 8M Mini Development kits from Linux-5.12-rc1
Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v3 2/2 board: gateworks: imx8mm: Add Gateworks Venice board support
In reply to Tim HarveyAdd initial support for Gateworks Venice product family based on the i.MX 8M Mini SoC
---
v3:
- fix accidental change to TARGET_IMX8MN_EVK
- gsc.h: remove unused MAX6642 defines from
- power_init_board: fix PMIC access by using dm_i2c
--- arch/arm/dts/imx8mm-venice-gw700x-u-boot.dtsi | 105 + .../dts/imx8mm-venice-gw71xx-0x-u-boot.dtsi | 5 + .../dts/imx8mm-venice-gw72xx-0x-u-boot.dtsi | 5 + .../dts/imx8mm-venice-gw73xx-0x-u-boot.dtsi | 5 + arch/arm/dts/imx8mm-venice-u-boot.dtsi | 103 + arch/arm/dts/imx8mm-venice.dts | 152 + arch/arm/mach-imx/imx8m/Kconfig | 7 + board/gateworks/venice/Kconfig | 13 + board/gateworks/venice/MAINTAINERS | 7 + board/gateworks/venice/Makefile | 12 + board/gateworks/venice/README | 34 + board/gateworks/venice/gsc.c | 687 +++++ board/gateworks/venice/gsc.h | 40 + board/gateworks/venice/imx8mm_venice.c | 133 + board/gateworks/venice/lpddr4_timing.c | 2505 +++++++++++++++++ board/gateworks/venice/lpddr4_timing.h | 12 + board/gateworks/venice/spl.c | 205 ++ configs/imx8mm_venice_defconfig | 113 + include/configs/imx8mm_venice.h | 125 + 19 files changed, 4268 insertions(+) create mode 100644 arch/arm/dts/imx8mm-venice-gw700x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw71xx-0x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw72xx-0x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-gw73xx-0x-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice-u-boot.dtsi create mode 100644 arch/arm/dts/imx8mm-venice.dts create mode 100644 board/gateworks/venice/Kconfig create mode 100644 board/gateworks/venice/MAINTAINERS create mode 100644 board/gateworks/venice/Makefile create mode 100644 board/gateworks/venice/README create mode 100644 board/gateworks/venice/gsc.c create mode 100644 board/gateworks/venice/gsc.h create mode 100644 board/gateworks/venice/imx8mm_venice.c create mode 100644 board/gateworks/venice/lpddr4_timing.c create mode 100644 board/gateworks/venice/lpddr4_timing.h create mode 100644 board/gateworks/venice/spl.c create mode 100644 configs/imx8mm_venice_defconfig create mode 100644 include/configs/imx8mm_venice.h
arch/arm/dts/imx8mm-venice-gw700x-u-boot.dtsi new file +105 -0
@@ -0,0 +1,105 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 Gateworks Corporation + */ + +&{/soc at 0} { + u-boot,dm-pre-reloc; + u-boot,dm-spl; +}; + +&clk { + u-boot,dm-spl; + u-boot,dm-pre-reloc; + /delete-property/ assigned-clocks; + /delete-property/ assigned-clock-parents; + /delete-property/ assigned-clock-rates; +}; + +&osc_24m { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips1 { + u-boot,dm-spl; + u-boot,dm-pre-reloc; +}; + +&aips2 { + u-boot,dm-spl; +}; + +&aips3 { + u-boot,dm-spl; +}; + +&iomuxc { + u-boot,dm-spl; +}; + +&gpio1 { + u-boot,dm-spl; +}; + +&gpio2 { + u-boot,dm-spl; +}; + +&gpio3 { + u-boot,dm-spl; +}; + +&gpio4 { + u-boot,dm-spl; +}; + +&gpio5 { + u-boot,dm-spl; +}; + +&uart2 { + u-boot,dm-spl; +}; + +&pinctrl_uart2 { + u-boot,dm-spl; +}; + +&usdhc3 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +}; + +&i2c1 { + u-boot,dm-spl; +}; + +&pinctrl_i2c1 { + u-boot,dm-spl; +}; + +&i2c2 { + u-boot,dm-spl; +}; + +&pinctrl_i2c2 { + u-boot,dm-spl; +}; + +&fec1 { + phy-reset-gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + phy-reset-duration = <1>; + phy-reset-post-delay = <1>; +}; + +&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 69} { + u-boot,dm-spl; +}; + +&{/soc at 0/bus at 30800000/i2c at 30a20000/pmic at 69/regulators} { + u-boot,dm-spl; +};
arch/arm/dts/imx8mm-venice-gw71xx-0x-u-boot.dtsi new file +5 -0
@@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 Gateworks Corporation + */ +#include "imx8mm-venice-gw700x-u-boot.dtsi"
arch/arm/dts/imx8mm-venice-gw72xx-0x-u-boot.dtsi new file +5 -0
@@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 Gateworks Corporation + */ +#include "imx8mm-venice-gw700x-u-boot.dtsi"
arch/arm/dts/imx8mm-venice-gw73xx-0x-u-boot.dtsi new file +5 -0
@@ -0,0 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2021 Gateworks Corporation + */ +#include "imx8mm-venice-gw700x-u-boot.dtsi"
arch/arm/dts/imx8mm-venice-u-boot.dtsi new file +103 -0
103 lines not on this page · raw message
arch/arm/dts/imx8mm-venice.dts new file +152 -0
152 lines not on this page · raw message
arch/arm/mach-imx/imx8m/Kconfig +7 -0
@@ -43,6 +43,12 @@ config TARGET_IMX8MM_EVK select SUPPORT_SPL select IMX8M_LPDDR4 +config TARGET_IMX8MM_VENICE + bool "Support Gateworks Venice iMX8M Mini module" + select IMX8MM + select SUPPORT_SPL + select IMX8M_LPDDR4 + config TARGET_IMX8MN_DDR4_EVK bool "imx8mn DDR4 EVK board" select IMX8MN
@@ -95,6 +101,7 @@ source "board/freescale/imx8mq_evk/Kconfig" source "board/freescale/imx8mm_evk/Kconfig" source "board/freescale/imx8mn_evk/Kconfig" source "board/freescale/imx8mp_evk/Kconfig" +source "board/gateworks/venice/Kconfig" source "board/google/imx8mq_phanbell/Kconfig" source "board/technexion/pico-imx8mq/Kconfig" source "board/toradex/verdin-imx8mm/Kconfig"
board/gateworks/venice/Kconfig new file +13 -0
@@ -0,0 +1,13 @@ +if TARGET_IMX8MM_VENICE + +config SYS_BOARD + default "venice" + +config SYS_VENDOR + default "gateworks" + +config SYS_CONFIG_NAME + default "imx8mm_venice" + +endif +
board/gateworks/venice/MAINTAINERS new file +7 -0
@@ -0,0 +1,7 @@ +i.MX8MM Venice +M: Tim Harvey <[email protected]> +S: Maintained +F: arch/arm/dts/imx8mm-venice* +F: board/gateworks/venice/ +F: include/configs/venice.h +F: configs/imx8mm_venice_defconfig
board/gateworks/venice/Makefile new file +12 -0
@@ -0,0 +1,12 @@ +# +# Copyright 2021 Gateworks Corporation +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += imx8mm_venice.o gsc.o + +ifdef CONFIG_SPL_BUILD +obj-y += spl.o +obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o +endif
board/gateworks/venice/README new file +34 -0
@@ -0,0 +1,34 @@ +U-Boot for the Gateworks i.MX8M Mini Venice Development Kit boards + +Quick Start +=========== +- Build the ARM Trusted firmware binary +- Get ddr firmware +- Build U-Boot +- Flash to eMMC +- Boot + +Get and Build the ARM Trusted firmware +====================================== +$ git clone https://source.codeaurora.org/external/imx/imx-atf +$ git checkout imx_5.4.47_2.2.0 +$ make PLAT=imx8mm CROSS_COMPILE=aarch64-linux-gnu- bl31 +$ cp build/imx8mm/release/bl31.bin . + +Get the DDR Firmware +==================== +$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin +$ chmod +x firmware-imx-8.9.bin +$ ./firmware-imx-8.9.bin +$ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4*.bin . + +Build U-Boot +============ +$ make imx8mm_venice_defconfig +$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000 + +Update eMMC +=========== +=> tftpboot $loadaddr flash.bin +=> setexpr blkcnt $filesize + 0x1ff && setexpr blkcnt $blkcnt / 0x200 +=> mmc dev 2 && mmc write $loadaddr 0x42 $blkcnt
board/gateworks/venice/gsc.c new file +687 -0
687 lines not on this page · raw message
board/gateworks/venice/gsc.h new file +40 -0
@@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2021 Gateworks Corporation +*/ + +#ifndef _GSC_H_ +#define _GSC_H_ + +/* I2C slave addresses */ +#define GSC_SC_ADDR 0x20 +#define GSC_RTC_ADDR 0x68 +#define GSC_HWMON_ADDR 0x29 +#define GSC_EEPROM_ADDR 0x51 + +struct venice_board_info { +u8 mac[6 ];/* 0x00: MAC base */ +char equiv_dts[16 ];/* 0x06: equivalent device-tree */ +u8 res0[2 ];/* 0x16: reserved */ +u32 serial;/* 0x18: Serial Number */ +u8 res1[4 ];/* 0x1C: reserved */ +u8 mfgdate[4 ];/* 0x20: MFG date */ +u8 macno;/* 0x24: number of mac addrs */ +u8 res2[6 ];/* 0x25 */ +u8 sdram_size;/* 0x2B: (16 << n) MB */ +u8 sdram_speed;/* 0x2C: (33.333 * n) MHz */ +u8 sdram_width;/* 0x2D: (8 << n) bit */ +u8 res3[2 ];/* 0x2E */ +char model[16 ];/* 0x30: model string */ +u8 res4[14 ];/* 0x40 */ +u8 chksum[2 ];/* 0x4E */ +}; + +int gsc_init (int quiet); +int gsc_hwmon (void ); +const char *gsc_get_model (void ); +const char *gsc_get_dtb_name (int level,char *buf,int len); +int gsc_getmac (int index,uint8_t *enetaddr); + +#endif +
board/gateworks/venice/imx8mm_venice.c new file +133 -0
133 lines not on this page · raw message
board/gateworks/venice/lpddr4_timing.c new file +2505 -0
1,680 lines not on this page · raw message
board/gateworks/venice/lpddr4_timing.h new file +12 -0
Lines of this file are not shown. View the raw message.
board/gateworks/venice/spl.c new file +205 -0
205 lines not on this page · raw message
configs/imx8mm_venice_defconfig new file +113 -0
113 lines not on this page · raw message
include/configs/imx8mm_venice.h new file +125 -0
125 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH v3 2/2 board: gateworks: imx8mm: Add Gateworks Venice board support
Quoted 3 lines
Add initial support for Gateworks Venice product family based on the i.MX 8M Mini SoC
Signed-off-by Tim Harvey <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================