Documentation: i.MX: Increase :maxdepth: for board documentation
Subsystems (5)
PATCH v3 1/3 Documentation: i.MX: Increase :maxdepth: for board documentation
A number of board documentation file have subsections. Increase :maxdepth:, so we'd get proper TOC and numbering.
--- Documentation/boards/imx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/boards/imx.rst +1 -1
@@ -201,6 +201,6 @@ or ``imx_defconfig`` instead. .. toctree:: :glob: - :maxdepth: 1 + :maxdepth: 2 imx/*
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 2/3 ARM: i.MX8MQ: bbu: Add MMC boot handler
--- arch/arm/mach-imx/imx-bbu-internal.c | 5 +++++ arch/arm/mach-imx/include/mach/bbu.h | 9 +++++++++ 2 files changed, 14 insertions(+)
arch/arm/mach-imx/imx-bbu-internal.c +5 -0
@@ -629,6 +629,11 @@ int imx7_bbu_internal_mmcboot_register_handler(const char *name, unsigned long flags)__alias (imx_bbu_internal_mmcboot_register_handler ); +int imx8mq_bbu_internal_mmcboot_register_handler(const char *name, + const char *devicefile, + unsigned long flags) + __alias(imx_bbu_internal_mmcboot_register_handler); +/* * Register an i.MX53 internal boot update handler for i2c/spi * EEPROMs / flashes. Nearly the same as MMC/SD, but we do not need to
arch/arm/mach-imx/include/mach/bbu.h +9 -0
@@ -76,6 +76,8 @@ int imx7_bbu_internal_spi_i2c_register_handler(const char *name, const char *devint imx8mq_bbu_internal_mmc_register_handler (const char *name,const char *devicefile,unsigned long flags); +int imx8mq_bbu_internal_mmcboot_register_handler (const char *name,const char *devicefile, +unsigned long flags);int imx_bbu_external_nor_register_handler (const char *name,const char *devicefile,unsigned long flags);
@@ -165,6 +167,13 @@ static inline int imx8mq_bbu_internal_mmc_register_handler(const char *name, conreturn -ENOSYS ; } +static inline int imx8mq_bbu_internal_mmcboot_register_handler (const char *name, +const char *devicefile, +unsigned long flags) +{ +return -ENOSYS ; +} +static inline int imx_bbu_external_nor_register_handler (const char *name,const char *devicefile,unsigned long flags) {
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v3 3/3 ARM: i.MX: Add support for ZII i.MX8MQ based devices
In reply to Andrey SmirnovAdd support for the following ZII i.MX8MQ based boards:
- ZII i.MX8MQ RMB3
- ZII i.MX8MQ Zest
Most of the basic peripherals are supported by this patch. More advanced features such as PCIe, display support, etc, are planned to be added later.
---
Changes since [v2]
- Dropped zii_v8_defconfig
- Patch rebased on top of
http://lists.infradead.org/pipermail/barebox/2019-January/036881.html
- Board names are kept the same as per agreement made off-list
Changes since [v1]
- Added missing board documentation, OpenOCD script and defconfig files
[v2] http://lists.infradead.org/pipermail/barebox/2019-January/036813.html
[v1] http://lists.infradead.org/pipermail/barebox/2019-January/036808.html
Documentation/boards/imx.rst | 1 + .../boards/imx/zii-imx8mq-dev/openocd.cfg | 86 ++ .../boards/imx/zii-imx8mq-dev/readme.rst | 24 + arch/arm/boards/Makefile | 1 + arch/arm/boards/zii-imx8mq-dev/Makefile | 2 + arch/arm/boards/zii-imx8mq-dev/board.c | 24 + arch/arm/boards/zii-imx8mq-dev/ddr.h | 29 + arch/arm/boards/zii-imx8mq-dev/ddr_init.c | 225 +++++ arch/arm/boards/zii-imx8mq-dev/ddrphy_train.c | 935 ++++++++++++++++++ .../flash-header-zii-imx8mq-dev.imxcfg | 5 + arch/arm/boards/zii-imx8mq-dev/lowlevel.c | 211 ++++ arch/arm/configs/imx_v8_defconfig | 20 +- arch/arm/dts/Makefile | 3 + arch/arm/dts/imx8mq-zii-ultra-rmb3.dts | 39 + arch/arm/dts/imx8mq-zii-ultra-zest.dts | 13 + arch/arm/dts/imx8mq-zii-ultra.dtsi | 453 +++++++++ arch/arm/mach-imx/Kconfig | 7 + images/Makefile.imx | 5 + 18 files changed, 2081 insertions(+), 2 deletions(-) create mode 100644 Documentation/boards/imx/zii-imx8mq-dev/openocd.cfg create mode 100644 Documentation/boards/imx/zii-imx8mq-dev/readme.rst create mode 100644 arch/arm/boards/zii-imx8mq-dev/Makefile create mode 100644 arch/arm/boards/zii-imx8mq-dev/board.c create mode 100644 arch/arm/boards/zii-imx8mq-dev/ddr.h create mode 100644 arch/arm/boards/zii-imx8mq-dev/ddr_init.c create mode 100644 arch/arm/boards/zii-imx8mq-dev/ddrphy_train.c create mode 100644 arch/arm/boards/zii-imx8mq-dev/flash-header-zii-imx8mq-dev.imxcfg create mode 100644 arch/arm/boards/zii-imx8mq-dev/lowlevel.c create mode 100644 arch/arm/dts/imx8mq-zii-ultra-rmb3.dts create mode 100644 arch/arm/dts/imx8mq-zii-ultra-zest.dts create mode 100644 arch/arm/dts/imx8mq-zii-ultra.dtsi
Documentation/boards/imx.rst +1 -0
@@ -204,3 +204,4 @@ or ``imx_defconfig`` instead. :maxdepth: 2 imx/* + imx/*/*
Documentation/boards/imx/zii-imx8mq-dev/openocd.cfg new file +86 -0
86 lines not on this page · raw message
Documentation/boards/imx/zii-imx8mq-dev/readme.rst new file +24 -0
@@ -0,0 +1,24 @@ +ZII i.MX8MQ Based Boards +======================== + +Building Barebox +---------------- + +To build Barebox of ZII i.MX8MQ based board do the following: + +.. code-block:: sh + + make ARCH=arm CROSS_COMPILE=<AArch64 toolchain prefix> mrproper + make ARCH=arm CROSS_COMPILE=<AArch64 toolchain prefix> imx_v8_defconfig + make ARCH=arm CROSS_COMPILE=<AArch64 toolchain prefix> + +Uploading Barebox via JTAG +-------------------------- + +Barebox can be bootstrapped via JTAG using OpenOCD (latest master) as +follows: + +.. code-block:: sh + + cd barebox + openocd -f Documentation/boards/imx/zii-imx8mq-dev/openocd.cfg --command "init; ddr_init; start_barebox"
arch/arm/boards/Makefile +1 -0
@@ -157,6 +157,7 @@ obj-$(CONFIG_MACH_VF610_TWR) += freescale-vf610-twr/ obj-$(CONFIG_MACH_XILINX_ZCU104) += xilinx-zcu104/ obj-$(CONFIG_MACH_ZII_RDU1) += zii-imx51-rdu1/ obj-$(CONFIG_MACH_ZII_RDU2) += zii-imx6q-rdu2/ +obj-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += zii-imx8mq-dev/ obj-$(CONFIG_MACH_ZII_VF610_DEV) += zii-vf610-dev/ obj-$(CONFIG_MACH_ZII_IMX7D_RPU2) += zii-imx7d-rpu2/ obj-$(CONFIG_MACH_WAGO_PFC_AM35XX) += wago-pfc-am35xx/
arch/arm/boards/zii-imx8mq-dev/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-y += board.o +lwl-y += lowlevel.o ddr_init.o ddrphy_train.o
arch/arm/boards/zii-imx8mq-dev/board.c new file +24 -0
@@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright (C) 2019 Zodiac Inflight Innovation +* Author: Andrey Smirnov <[email protected]> +*/ + +#include <common.h> +#include <init.h> +#include <asm/memory.h> +#include <linux/sizes.h> +#include <mach/bbu.h> + +static int zii_imx8mq_dev_init (void ) +{ +if (!of_machine_is_compatible ("zii,imx8mq-ultra" )) +return 0 ; + +barebox_set_hostname ("imx8mq-zii-rdu3" ); + +imx8mq_bbu_internal_mmcboot_register_handler ("eMMC" ,"/dev/mmc0" ,0 ); + +return 0 ; +} +device_initcall (zii_imx8mq_dev_init);
arch/arm/boards/zii-imx8mq-dev/ddr.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (c) 2018 Zodiac Inflight Innovation +* Author: Andrey Smirnov <[email protected]> +* +* Varios wrappers and macros needed to intgrate code generated by +* i.MX8M DDR Tool into rest of Barebox +*/ +#include <common.h> +#include <io.h> +#include <mach/imx8-ddrc.h> + +/* +* Code generated by i.MX8 M DDR Tool doesn't have any prefixes in the +* global identifiers below, so in order to avoid symbol name +* collisions with other boards we re-name them via a #define +*/ +#define ddr_init zii_imx8mq_rdu3_ddr_init +#define ddr_cfg_phy zii_imx8mq_rdu3_ddr_cfg_phy + +void zii_imx8mq_rdu3_ddr_init (void ); +void zii_imx8mq_rdu3_ddr_cfg_phy (void ); + +#define FW_1D_IMAGE lpddr4_pmu_train_1d_imem_bin, \ + lpddr4_pmu_train_1d_dmem_bin +#define FW_2D_IMAGE lpddr4_pmu_train_2d_imem_bin, \ + lpddr4_pmu_train_2d_dmem_bin + +
arch/arm/boards/zii-imx8mq-dev/ddr_init.c new file +225 -0
226 lines not on this page · raw message
arch/arm/boards/zii-imx8mq-dev/ddrphy_train.c new file +935 -0
936 lines not on this page · raw message
arch/arm/boards/zii-imx8mq-dev/flash-header-zii-imx8mq-dev.imxcfg new file +5 -0
@@ -0,0 +1,5 @@ +soc imx8mq + +loadaddr 0x007E1000 +max_load_size 0x3F000 +dcdofs 0x400
arch/arm/boards/zii-imx8mq-dev/lowlevel.c new file +211 -0
211 lines not on this page · raw message
arch/arm/configs/imx_v8_defconfig +18 -2
@@ -1,5 +1,6 @@ CONFIG_ARCH_IMX=y CONFIG_IMX_MULTI_BOARDS=y +CONFIG_MACH_ZII_IMX8MQ_DEV=y CONFIG_MACH_NXP_IMX8MQ_EVK=y CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y CONFIG_MMU=y
@@ -8,7 +9,6 @@ CONFIG_MALLOC_TLSF=y CONFIG_KALLSYMS=y CONFIG_RELOCATABLE=y CONFIG_HUSH_FANCY_PROMPT=y -CONFIG_CMDLINE_EDITING=y CONFIG_AUTO_COMPLETE=y CONFIG_MENU=y CONFIG_BOOTM_SHOW_TYPE=y
@@ -18,6 +18,7 @@ CONFIG_BOOTM_OFTREE=y CONFIG_BOOTM_OFTREE_UIMAGE=y CONFIG_BLSPEC=y CONFIG_CONSOLE_ACTIVATE_NONE=y +CONFIG_CONSOLE_RATP=y CONFIG_PARTITION_DISK_EFI=y CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y CONFIG_RESET_SOURCE=y
@@ -76,32 +77,47 @@ CONFIG_CMD_OFTREE=y CONFIG_CMD_TIME=y CONFIG_NET=y CONFIG_NET_NETCONSOLE=y -CONFIG_NET_RESOLV=y CONFIG_OFDEVICE=y CONFIG_OF_BAREBOX_DRIVERS=y +CONFIG_SERIAL_DEV_BUS=y CONFIG_DRIVER_NET_FEC_IMX=y +CONFIG_MICREL_PHY=y +CONFIG_NET_DSA_MV88E6XXX=y +CONFIG_MDIO_BITBANG=y +CONFIG_MDIO_GPIO=y +CONFIG_MDIO_BUS_MUX_GPIO=y CONFIG_DRIVER_SPI_IMX=y CONFIG_I2C=y CONFIG_I2C_IMX=y +CONFIG_MTD=y +CONFIG_MTD_DATAFLASH=y +CONFIG_MTD_M25P80=y CONFIG_MCI=y CONFIG_MCI_MMC_BOOT_PARTITIONS=y CONFIG_MCI_IMX_ESDHC=y +CONFIG_RAVE_SP_CORE=y CONFIG_LED=y CONFIG_LED_GPIO=y CONFIG_LED_GPIO_OF=y CONFIG_LED_TRIGGERS=y CONFIG_EEPROM_AT25=y +CONFIG_EEPROM_AT24=y CONFIG_WATCHDOG=y CONFIG_WATCHDOG_IMX=y +CONFIG_RAVE_SP_WATCHDOG=y CONFIG_NVMEM=y CONFIG_IMX_OCOTP=y +CONFIG_RAVE_SP_EEPROM=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_DS1307=y CONFIG_FS_EXT4=y CONFIG_FS_TFTP=y CONFIG_FS_NFS=y CONFIG_FS_FAT=y CONFIG_FS_FAT_WRITE=y CONFIG_FS_FAT_LFN=y +CONFIG_FS_RATP=y CONFIG_ZLIB=y CONFIG_LZO_DECOMPRESS=y
arch/arm/dts/Makefile +3 -0
@@ -113,6 +113,9 @@ pbl-dtb-$(CONFIG_MACH_ZII_RDU1) += \ imx51-zii-scu2-mezz.dtb.o \ imx51-zii-scu3-esb.dtb.o pbl-dtb-$(CONFIG_MACH_ZII_RDU2) += imx6q-zii-rdu2.dtb.o imx6qp-zii-rdu2.dtb.o +pbl-dtb-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += \ + imx8mq-zii-ultra-rmb3.dtb.o \ + imx8mq-zii-ultra-zest.dtb.o pbl-dtb-$(CONFIG_MACH_ZII_VF610_DEV) += \ vf610-zii-dev-rev-b.dtb.o \ vf610-zii-dev-rev-c.dtb.o \
arch/arm/dts/imx8mq-zii-ultra-rmb3.dts new file +39 -0
@@ -0,0 +1,39 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2019 Zodiac Inflight Innovations + */ + +/dts-v1/; + +#include "imx8mq-zii-ultra.dtsi" + +/ { + model = "ZII i.MX8MQ Ultra RMB3 Board"; + compatible = "zii,imx8mq-ultra-rmb3", "zii,imx8mq-ultra", "fsl,imx8mq"; +}; + +&ecspi1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi1>; + cs-gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + nor_flash: flash@0 { + compatible = "st,m25p128", "jedec,spi-nor"; + spi-max-frequency = <20000000>; + reg = <0>; + }; +}; + +&iomuxc { + pinctrl_ecspi1: ecspi1grp { + fsl,pins = < + MX8MQ_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x19 + MX8MQ_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x82 + MX8MQ_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x82 + MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x82 + >; + }; +};
arch/arm/dts/imx8mq-zii-ultra-zest.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2019 Zodiac Inflight Innovations + */ + +/dts-v1/; + +#include "imx8mq-zii-ultra.dtsi" + +/ { + model = "ZII i.MX8MQ Ultra Zest Board"; + compatible = "zii,imx8mq-ultra-zest", "zii,imx8mq-ultra", "fsl,imx8mq"; +};
arch/arm/dts/imx8mq-zii-ultra.dtsi new file +453 -0
454 lines not on this page · raw message
arch/arm/mach-imx/Kconfig +7 -0
@@ -439,6 +439,13 @@ config MACH_ZII_RDU2 bool "ZII i.MX6Q(+) RDU2" select ARCH_IMX6 +config MACH_ZII_IMX8MQ_DEV + bool "ZII i.MX8MQ based devices" + select ARCH_IMX8MQ + select FIRMWARE_IMX_LPDDR4_PMU_TRAIN + select FIRMWARE_IMX8MQ_ATF + select ARM_SMCCC + config MACH_ZII_VF610_DEV bool "ZII VF610 Dev Family" select ARCH_VF610
images/Makefile.imx +5 -0
@@ -554,3 +554,8 @@ pblb-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += start_nxp_imx8mq_evk CFG_start_nxp_imx8mq_evk.pblb.imximg = $(board)/nxp-imx8mq-evk/flash-header-imx8mq-evk.imxcfg FILE_barebox-nxp-imx8mq-evk.img = start_nxp_imx8mq_evk.pblb.imximg image-$(CONFIG_MACH_NXP_IMX8MQ_EVK) += barebox-nxp-imx8mq-evk.img + +pblb-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += start_zii_imx8mq_dev +CFG_start_zii_imx8mq_dev.pblb.imximg = $(board)/zii-imx8mq-dev/flash-header-zii-imx8mq-dev.imxcfg +FILE_barebox-zii-imx8mq-dev.img = start_zii_imx8mq_dev.pblb.imximg +image-$(CONFIG_MACH_ZII_IMX8MQ_DEV) += barebox-zii-imx8mq-dev.img
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 7 lines · Andrey Smirnov
A number of board documentation file have subsections. Increase :maxdepth:, so we'd get proper TOC and numbering.
Signed-off-by Andrey Smirnov <[email protected]>--- Documentation/boards/imx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox