i.MX6DL: Add BTicino Mamoj board support
Subsystems (3)
v3 cover i.MX6DL: Add BTicino Mamoj board support
This series add support for BTicino i.MX6DL Mamoj board.
Changes for v3:
- Use imx spl inbuilt functions for ddr config instead of register writes.
- rebase to master
Changes for v2:
- Update Kconfig changes for CONFIG_FSL_ESDHC
- Add HAB support
Jagan Teki (7):
i.MX6: board: Add BTicino i.MX6DL Mamoj initial support i.MX6DL: mamoj: Add I2C support
i.MX6DL: mamoj: Add PFUZE100 support
configs: imx6dl_mamoj: Enable fastboot and ums
configs: imx6dl-mamoj: Add DFU support
configs: imx6dl-mamoj: Add Falcon mode support
configs: imx6dl-mamoj: Enable HAB
arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6dl-mamoj-u-boot.dtsi | 15 +++ arch/arm/dts/imx6dl-mamoj.dts | 225 ++++++++++++++++++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 32 +++++ board/bticino/mamoj/Kconfig | 12 ++ board/bticino/mamoj/MAINTAINERS | 10 ++ board/bticino/mamoj/Makefile | 8 ++ board/bticino/mamoj/README | 124 +++++++++++++++++++ board/bticino/mamoj/mamoj.c | 27 ++++ board/bticino/mamoj/spl.c | 172 ++++++++++++++++++++++++++ configs/imx6dl_mamoj_defconfig | 52 ++++++++ include/configs/imx6dl-mamoj.h | 102 +++++++++++++++ 12 files changed, 780 insertions(+) create mode 100644 arch/arm/dts/imx6dl-mamoj-u-boot.dtsi create mode 100644 arch/arm/dts/imx6dl-mamoj.dts create mode 100644 board/bticino/mamoj/Kconfig create mode 100644 board/bticino/mamoj/MAINTAINERS create mode 100644 board/bticino/mamoj/Makefile create mode 100644 board/bticino/mamoj/README create mode 100644 board/bticino/mamoj/mamoj.c create mode 100644 board/bticino/mamoj/spl.c create mode 100644 configs/imx6dl_mamoj_defconfig create mode 100644 include/configs/imx6dl-mamoj.h
Signature · 1 line
2.14.3
PATCH v3 1/7 i.MX6: board: Add BTicino i.MX6DL Mamoj initial support
Add initial support for i.MX6DL BTicino Mamoj board.
Mamoh board added:
- SPL
- SPL_DM
- SPL_OF_CONTROL
- DM for U-Boot proper
- OF_CONTROL for U-Boot proper
- eMMC
- FEC
- Boot from eMMC
- Boot from USB SDP
--- arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6dl-mamoj-u-boot.dtsi | 15 ++++ arch/arm/dts/imx6dl-mamoj.dts | 84 ++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 29 ++++++ board/bticino/mamoj/Kconfig | 12 +++ board/bticino/mamoj/MAINTAINERS | 10 +++ board/bticino/mamoj/Makefile | 8 ++ board/bticino/mamoj/README | 60 +++++++++++++ board/bticino/mamoj/mamoj.c | 27 ++++++ board/bticino/mamoj/spl.c | 161 ++++++++++++++++++++++++++++++++++ configs/imx6dl_mamoj_defconfig | 39 ++++++++ include/configs/imx6dl-mamoj.h | 88 +++++++++++++++++++ 12 files changed, 534 insertions(+) create mode 100644 arch/arm/dts/imx6dl-mamoj-u-boot.dtsi create mode 100644 arch/arm/dts/imx6dl-mamoj.dts create mode 100644 board/bticino/mamoj/Kconfig create mode 100644 board/bticino/mamoj/MAINTAINERS create mode 100644 board/bticino/mamoj/Makefile create mode 100644 board/bticino/mamoj/README create mode 100644 board/bticino/mamoj/mamoj.c create mode 100644 board/bticino/mamoj/spl.c create mode 100644 configs/imx6dl_mamoj_defconfig create mode 100644 include/configs/imx6dl-mamoj.h
arch/arm/dts/Makefile +1 -0
@@ -399,6 +399,7 @@ dtb-$(CONFIG_MX6QDL) += \ imx6dl-icore.dtb \ imx6dl-icore-mipi.dtb \ imx6dl-icore-rqs.dtb \ + imx6dl-mamoj.dtb \ imx6q-cm-fx6.dtb \ imx6q-icore.dtb \ imx6q-icore-mipi.dtb \
arch/arm/dts/imx6dl-mamoj-u-boot.dtsi new file +15 -0
@@ -0,0 +1,15 @@ +/* + * Copyright (C) 2018 Jagan Teki <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include "imx6qdl-u-boot.dtsi" + +&usdhc3 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +};
arch/arm/dts/imx6dl-mamoj.dts new file +84 -0
84 lines not on this page · raw message
arch/arm/mach-imx/mx6/Kconfig +29 -0
@@ -229,6 +229,34 @@ config TARGET_MX6MEMCAL config TARGET_MX6QARM2 bool "mx6qarm2" +config TARGET_MX6DL_MAMOJ + bool "Support BTicino Mamoj" + select MX6QDL + select OF_CONTROL + select PINCTRL + select DM + select DM_ETH + select DM_GPIO + select DM_MMC + select DM_THERMAL + select SPL + select SUPPORT_SPL + select SPL_DM if SPL + select SPL_OF_LIBFDT if SPL + select SPL_OF_CONTROL if SPL + select SPL_PINCTRL if SPL + select SPL_SEPARATE_BSS if SPL + select SPL_GPIO_SUPPORT if SPL + select SPL_LIBCOMMON_SUPPORT if SPL + select SPL_LIBDISK_SUPPORT if SPL + select SPL_LIBGENERIC_SUPPORT if SPL + select SPL_MMC_SUPPORT if SPL + select SPL_SERIAL_SUPPORT if SPL + select SPL_USB_HOST_SUPPORT if SPL + select SPL_USB_GADGET_SUPPORT if SPL + select SPL_USB_SDP_SUPPORT if SPL + select SPL_WATCHDOG_SUPPORT if SPL + config TARGET_MX6Q_ENGICAM bool "Support Engicam i.Core(RQS)" select BOARD_LATE_INIT
@@ -472,6 +500,7 @@ source "board/bachmann/ot1200/Kconfig" source "board/barco/platinum/Kconfig" source "board/barco/titanium/Kconfig" source "board/boundary/nitrogen6x/Kconfig" +source "board/bticino/mamoj/Kconfig" source "board/ccv/xpress/Kconfig" source "board/compulab/cm_fx6/Kconfig" source "board/congatec/cgtqmx6eval/Kconfig"
board/bticino/mamoj/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +if TARGET_MX6DL_MAMOJ + +config SYS_BOARD + default "mamoj" + +config SYS_VENDOR + default "bticino" + +config SYS_CONFIG_NAME + default "imx6dl-mamoj" + +endif
board/bticino/mamoj/MAINTAINERS new file +10 -0
@@ -0,0 +1,10 @@ +MX6DL_MAMOJ BOARD +M: Jagan Teki <[email protected]> +M: Raffaele RECALCATI <[email protected]> +M: Simone CIANNI <[email protected]> +S: Maintained +F: board/bticino/mamoj +F: include/configs/imx6dl-mamoj.h +F: configs/imx6dl_mamoj_defconfig +F: arch/arm/dts/imx6dl-mamoj.dts +F: arch/arm/dts/imx6dl-mamoj-u-boot.dtsi
board/bticino/mamoj/Makefile new file +8 -0
@@ -0,0 +1,8 @@ +# Copyright (C) 2018 BTicino +# Copyright (C) 2017 Amarula Solutions B.V. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := mamoj.o +obj-$(CONFIG_SPL_BUILD) += spl.o
board/bticino/mamoj/README new file +60 -0
60 lines not on this page · raw message
board/bticino/mamoj/mamoj.c new file +27 -0
@@ -0,0 +1,27 @@ +/* +* Copyright (C) 2018 Simone CIANNI <[email protected]> +* Copyright (C) 2018 Raffaele RECALCATI <[email protected]> +* Copyright (C) 2018 Jagan Teki <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <asm/arch/sys_proto.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int board_init (void ) +{ +/* Address of boot parameters */ + gd->bd->bi_boot_params =PHYS_SDRAM +0x100 ; + +return 0 ; +} + +int dram_init (void ) +{ + gd->ram_size =imx_ddr_size (); + +return 0 ; +}
board/bticino/mamoj/spl.c new file +161 -0
161 lines not on this page · raw message
configs/imx6dl_mamoj_defconfig new file +39 -0
@@ -0,0 +1,39 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_SYS_TEXT_BASE=0x17800000 +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_TARGET_MX6DL_MAMOJ=y +# CONFIG_CMD_BMODE is not set +CONFIG_DEFAULT_DEVICE_TREE="imx6dl-mamoj" +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg" +CONFIG_BOOTDELAY=3 +CONFIG_HUSH_PARSER=y +CONFIG_SYS_PROMPT="=> " +CONFIG_CRC32_VERIFY=y +CONFIG_CMD_MEMTEST=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_USB=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_PHYLIB=y +CONFIG_PHY_MICREL=y +CONFIG_FEC_MXC=y +CONFIG_FSL_ESDHC=y +CONFIG_PINCTRL_IMX6=y +CONFIG_MXC_UART=y +CONFIG_USB=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +CONFIG_IMX_THERMAL=y
include/configs/imx6dl-mamoj.h new file +88 -0
88 lines not on this page · raw message
Signature · 1 line
2.14.3
PATCH v3 1/7 i.MX6: board: Add BTicino i.MX6DL Mamoj initial support
Hi Jagan,
Quoted 59 lines · Jagan Teki
Add initial support for i.MX6DL BTicino Mamoj board.
Mamoh board added:
- SPL
-SPL_DM
-SPL_OF_CONTROL
- DM for U-Boot proper
-OF_CONTROLfor U-Boot proper
- eMMC
- FEC
- Boot from eMMC
- Boot from USB SDPSigned-off-by Simone CIANNI <[email protected]>Signed-off-by Raffaele RECALCATI <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6dl-mamoj-u-boot.dtsi | 15 ++++ arch/arm/dts/imx6dl-mamoj.dts | 84 ++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 29 ++++++ board/bticino/mamoj/Kconfig | 12 +++ board/bticino/mamoj/MAINTAINERS | 10 +++ board/bticino/mamoj/Makefile | 8 ++ board/bticino/mamoj/README | 60 +++++++++++++ board/bticino/mamoj/mamoj.c | 27 ++++++ board/bticino/mamoj/spl.c | 161 ++++++++++++++++++++++++++++++++++ configs/imx6dl_mamoj_defconfig | 39 ++++++++ include/configs/imx6dl-mamoj.h | 88 +++++++++++++++++++ 12 files changed, 534 insertions(+) create mode 100644 arch/arm/dts/imx6dl-mamoj-u-boot.dtsi create mode 100644 arch/arm/dts/imx6dl-mamoj.dts create mode 100644 board/bticino/mamoj/Kconfig create mode 100644 board/bticino/mamoj/MAINTAINERS create mode 100644 board/bticino/mamoj/Makefile create mode 100644 board/bticino/mamoj/README create mode 100644 board/bticino/mamoj/mamoj.c create mode 100644 board/bticino/mamoj/spl.c create mode 100644 configs/imx6dl_mamoj_defconfig create mode 100644 include/configs/imx6dl-mamoj.harch/arm/dts/Makefile +1
-0@@ -399,6 +399,7 @@ dtb-$(CONFIG_MX6QDL) += \ imx6dl-icore.dtb \ imx6dl-icore-mipi.dtb \ imx6dl-icore-rqs.dtb \ + imx6dl-mamoj.dtb \ imx6q-cm-fx6.dtb \ imx6q-icore.dtb \ imx6q-icore-mipi.dtb \arch/arm/dts/imx6dl-mamoj-u-boot.dtsi new file +0
-0
arch/arm/dts/imx6dl-mamoj-u-boot.dtsi line 7
Quoted 7 lines
arch/arm/dts/imx6dl-mamoj-u-boot.dtsi new file +7
-0@@ -0,0 +1,15 @@ +/* + * Copyright (C) 2018 Jagan Teki <[email protected]> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include "imx6qdl-u-boot.dtsi"
Something wrong here - this file is not part of the patchset. Should be this imx6qdl.dtsi ?
Best regards,
Stefano
Quoted 599 lines
arch/arm/dts/imx6dl-mamoj-u-boot.dtsi new file +8
-0+ +&usdhc3 { + u-boot,dm-spl; +}; + +&pinctrl_usdhc3 { + u-boot,dm-spl; +};arch/arm/dts/imx6dl-mamoj.dts new file +84
-0@@ -0,0 +1,84 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (C) 2018 BTicino + * Copyright (C) 2018 Amarula Solutions B.V. + */ + +/dts-v1/; + +#include <dt-bindings/gpio/gpio.h> +#include "imx6dl.dtsi" + +/ { + model = "BTicino i.MX6DL Mamoj board"; + compatible = "bticino,imx6dl-mamoj", "fsl,imx6dl"; +}; + +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_enet>; + phy-mode = "mii"; + status = "okay"; +}; + +&uart3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart3>; + status = "okay"; +}; + +&usdhc3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_usdhc3>; + bus-width = <8>; + non-removable; + keep-power-in-suspend; + status = "okay"; +}; + +&iomuxc { + pinctrl_enet: enetgrp { + fsl,pins = < + MX6QDL_PAD_ENET_MDIO__ENET_MDIO 0x1b0b0 + MX6QDL_PAD_ENET_MDC__ENET_MDC 0x1b0b0 + MX6QDL_PAD_ENET_REF_CLK__ENET_TX_CLK 0x1b0b1 + MX6QDL_PAD_ENET_TXD0__ENET_TX_DATA0 0x1b0b0 + MX6QDL_PAD_ENET_TXD1__ENET_TX_DATA1 0x1b0b0 + MX6QDL_PAD_KEY_ROW2__ENET_TX_DATA2 0x1b0b0 + MX6QDL_PAD_KEY_ROW0__ENET_TX_DATA3 0x1b0b0 + MX6QDL_PAD_ENET_TX_EN__ENET_TX_EN 0x1b0b0 + MX6QDL_PAD_GPIO_19__ENET_TX_ER 0x1b0b0 + MX6QDL_PAD_GPIO_18__ENET_RX_CLK 0x1b0b1 + MX6QDL_PAD_ENET_RXD0__ENET_RX_DATA0 0x1b0b0 + MX6QDL_PAD_ENET_RXD1__ENET_RX_DATA1 0x1b0b0 + MX6QDL_PAD_KEY_COL2__ENET_RX_DATA2 0x1b0b0 + MX6QDL_PAD_KEY_COL0__ENET_RX_DATA3 0x1b0b0 + MX6QDL_PAD_ENET_CRS_DV__ENET_RX_EN 0x1b0b0 + MX6QDL_PAD_ENET_RX_ER__ENET_RX_ER 0x1b0b0 + MX6QDL_PAD_KEY_COL3__ENET_CRS 0x1b0b0 + MX6QDL_PAD_KEY_ROW1__ENET_COL 0x1b0b0 + >; + }; + + pinctrl_uart3: uart3grp { + fsl,pins = < + MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1 + MX6QDL_PAD_EIM_D25__UART3_RX_DATA 0x1b0b1 + >; + }; + + pinctrl_usdhc3: usdhc3grp { + fsl,pins = < + MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 + MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 + MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 + MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 + MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 + MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 + MX6QDL_PAD_SD3_DAT4__SD3_DATA4 0x17059 + MX6QDL_PAD_SD3_DAT5__SD3_DATA5 0x17059 + MX6QDL_PAD_SD3_DAT6__SD3_DATA6 0x17059 + MX6QDL_PAD_SD3_DAT7__SD3_DATA7 0x17059 + >; + }; +};arch/arm/mach-imx/mx6/Kconfig +29
-0@@ -229,6 +229,34 @@ config TARGET_MX6MEMCAL config TARGET_MX6QARM2 bool "mx6qarm2" +config TARGET_MX6DL_MAMOJ + bool "Support BTicino Mamoj" + select MX6QDL + select OF_CONTROL + select PINCTRL + select DM + select DM_ETH + select DM_GPIO + select DM_MMC + select DM_THERMAL + select SPL + select SUPPORT_SPL + select SPL_DM if SPL + select SPL_OF_LIBFDT if SPL + select SPL_OF_CONTROL if SPL + select SPL_PINCTRL if SPL + select SPL_SEPARATE_BSS if SPL + select SPL_GPIO_SUPPORT if SPL + select SPL_LIBCOMMON_SUPPORT if SPL + select SPL_LIBDISK_SUPPORT if SPL + select SPL_LIBGENERIC_SUPPORT if SPL + select SPL_MMC_SUPPORT if SPL + select SPL_SERIAL_SUPPORT if SPL + select SPL_USB_HOST_SUPPORT if SPL + select SPL_USB_GADGET_SUPPORT if SPL + select SPL_USB_SDP_SUPPORT if SPL + select SPL_WATCHDOG_SUPPORT if SPL + config TARGET_MX6Q_ENGICAM bool "Support Engicam i.Core(RQS)" select BOARD_LATE_INIT@@ -472,6 +500,7 @@ source "board/bachmann/ot1200/Kconfig" source "board/barco/platinum/Kconfig" source "board/barco/titanium/Kconfig" source "board/boundary/nitrogen6x/Kconfig" +source "board/bticino/mamoj/Kconfig" source "board/ccv/xpress/Kconfig" source "board/compulab/cm_fx6/Kconfig" source "board/congatec/cgtqmx6eval/Kconfig"board/bticino/mamoj/Kconfig new file +12
-0@@ -0,0 +1,12 @@ +if TARGET_MX6DL_MAMOJ + +config SYS_BOARD + default "mamoj" + +config SYS_VENDOR + default "bticino" + +config SYS_CONFIG_NAME + default "imx6dl-mamoj" + +endifboard/bticino/mamoj/MAINTAINERS new file +10
-0@@ -0,0 +1,10 @@ +MX6DL_MAMOJ BOARD +M: Jagan Teki <[email protected]> +M: Raffaele RECALCATI <[email protected]> +M: Simone CIANNI <[email protected]> +S: Maintained +F: board/bticino/mamoj +F: include/configs/imx6dl-mamoj.h +F: configs/imx6dl_mamoj_defconfig +F: arch/arm/dts/imx6dl-mamoj.dts +F: arch/arm/dts/imx6dl-mamoj-u-boot.dtsiboard/bticino/mamoj/Makefile new file +8
-0@@ -0,0 +1,8 @@ +# Copyright (C) 2018 BTicino +# Copyright (C) 2017 Amarula Solutions B.V. +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y := mamoj.o +obj-$(CONFIG_SPL_BUILD) += spl.oboard/bticino/mamoj/README new file +60
-0@@ -0,0 +1,60 @@ +BTicino Mamoj board: +=================== + +Build: + + $ make mrproper + $ make imx6dl_mamoj_defconfig + $ make + + This will generate the SPL image called SPL and the u-boot-dtb.img. + +The following methods can be used for booting Mamoj boards: + +1. USB SDP boot + +1. USB SDP boot: +--------------- + + - Build imx_usb_loader + + $ git clone git://github.com/boundarydevices/imx_usb_loader.git + $ cd imx_usb_loader + $ make + + - Build the BSP and copy SPL, u-boot-dtb.img in imx_usb_loader directory + + - Put the board in "Serial Download Mode" + + - Plug-in USB-to-Serial, Open minicom 1152008N1 and USB OTG cables to Host + + - Turn-on board + + - Identify VID/PID using lsusb + + Bus 001 Device 010: ID 15a2:0061 Freescale Semiconductor, Inc. i.MX 6Solo/6DualLite SystemOnChip in RecoveryMode + + - Update the conf files + + imx_usb.conf + 0x15a2:0x0061, mx6_usb_rom.conf, 0x0525:0xb4a4, mx6_usb_sdp_spl.conf + + mx6_usb_rom.conf + mx6_usb + hid,1024,0x910000,0x10000000,512M,0x00900000,0x40000 + SPL:jump header2 + + mx6_usb_sdp_spl.conf + mx6_spl_sdp + hid,uboot_header,1024,0x910000,0x10000000,512M,0x00900000,0x40000 + u-boot-dtb.img:jump header2 + + - Launch the loader + + $ ./imx_usb + + We can see U-Boot boot from USB SDP on minicom + +-- +Jagan Teki <[email protected]> +03/12/18board/bticino/mamoj/mamoj.c new file +27
-0@@ -0,0 +1,27 @@ +/* +* Copyright (C) 2018 Simone CIANNI <[email protected]> +* Copyright (C) 2018 Raffaele RECALCATI <[email protected]> +* Copyright (C) 2018 Jagan Teki <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <asm/arch/sys_proto.h> + +DECLARE_GLOBAL_DATA_PTR ; + +int board_init (void ) +{ +/* Address of boot parameters */ + gd->bd->bi_boot_params =PHYS_SDRAM +0x100 ; + +return 0 ; +} + +int dram_init (void ) +{ + gd->ram_size =imx_ddr_size (); + +return 0 ; +}board/bticino/mamoj/spl.c new file +161
-0@@ -0,0 +1,161 @@ +/* +* Copyright (C) 2018 Simone CIANNI <[email protected]> +* Copyright (C) 2018 Raffaele RECALCATI <[email protected]> +* Copyright (C) 2018 Jagan Teki <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#include <common.h> +#include <spl.h> + +#include <asm/io.h> +#include <linux/sizes.h> + +#include <asm/arch/clock.h> +#include <asm/arch/crm_regs.h> +#include <asm/arch/iomux.h> +#include <asm/arch/mx6-ddr.h> +#include <asm/arch/mx6-pins.h> +#include <asm/arch/sys_proto.h> + +DECLARE_GLOBAL_DATA_PTR ; + +#define IMX6SDL_DRIVE_STRENGTH 0x28 +#define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED | \ + PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST | PAD_CTL_HYS) + +static iomux_v3_cfg_t const uart3_pads[] = { +IOMUX_PADS (PAD_EIM_D24__UART3_TX_DATA |MUX_PAD_CTRL (UART_PAD_CTRL )), +IOMUX_PADS (PAD_EIM_D25__UART3_RX_DATA |MUX_PAD_CTRL (UART_PAD_CTRL )), +}; + +struct mx6sdl_iomux_ddr_regs mx6sdl_ddr_ioregs = { + .dram_sdclk_0 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdclk_1 =IMX6SDL_DRIVE_STRENGTH , + .dram_cas =IMX6SDL_DRIVE_STRENGTH , + .dram_ras =IMX6SDL_DRIVE_STRENGTH , + .dram_reset =IMX6SDL_DRIVE_STRENGTH , + .dram_sdcke0 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdcke1 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdba2 =0x00000000 , + .dram_sdodt0 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdodt1 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs0 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs1 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs2 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs3 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs4 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs5 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs6 =IMX6SDL_DRIVE_STRENGTH , + .dram_sdqs7 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm0 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm1 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm2 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm3 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm4 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm5 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm6 =IMX6SDL_DRIVE_STRENGTH , + .dram_dqm7 =IMX6SDL_DRIVE_STRENGTH , +}; + +struct mx6sdl_iomux_grp_regs mx6sdl_grp_ioregs = { + .grp_ddr_type =0x000c0000 , + .grp_ddrmode_ctl =0x00020000 , + .grp_ddrpke =0x00000000 , + .grp_addds =IMX6SDL_DRIVE_STRENGTH , + .grp_ctlds =IMX6SDL_DRIVE_STRENGTH , + .grp_ddrmode =0x00020000 , + .grp_b0ds =IMX6SDL_DRIVE_STRENGTH , + .grp_b1ds =IMX6SDL_DRIVE_STRENGTH , + .grp_b2ds =IMX6SDL_DRIVE_STRENGTH , + .grp_b3ds =IMX6SDL_DRIVE_STRENGTH , + .grp_b4ds =IMX6SDL_DRIVE_STRENGTH , + .grp_b5ds =IMX6SDL_DRIVE_STRENGTH , + .grp_b6ds =IMX6SDL_DRIVE_STRENGTH , + .grp_b7ds =IMX6SDL_DRIVE_STRENGTH , +}; + +static struct mx6_ddr3_cfg mt41k128m16jt_125 = { + .mem_speed =1600 , + .density =4 , + .width =32 , + .banks =8 , + .rowaddr =14 , + .coladdr =10 , + .pagesz =2 , + .trcd =1375 , + .trcmin =4875 , + .trasmin =3500 , + .SRT =0 , +}; + +static struct mx6_mmdc_calibration mx6dl_mmdc_calib = { + .p0_mpwldectrl0 =0x0042004b , + .p0_mpwldectrl1 =0x0038003c , + .p0_mpdgctrl0 =0x42340230 , + .p0_mpdgctrl1 =0x0228022c , + .p0_mprddlctl =0x42444646 , + .p0_mpwrdlctl =0x38382e2e , +}; + +static struct mx6_ddr_sysinfo mem_dl = { + .dsize =1 , + .cs1_mirror =0 , +/* config for full 4GB range so that get_mem_size() works */ + .cs_density =32 , + .ncs =1 , + .bi_on =1 , + .rtt_nom =1 , + .rtt_wr =1 , + .ralat =5 , + .walat =0 , + .mif3_mode =3 , + .rst_to_cke =0x23 , + .sde_to_rst =0x10 , + .refsel =1 , + .refr =7 , +}; + +static void spl_dram_init (void ) +{ +mx6sdl_dram_iocfg (64 , &mx6sdl_ddr_ioregs, &mx6sdl_grp_ioregs); +mx6_dram_cfg (&mem_dl, &mx6dl_mmdc_calib, &mt41k128m16jt_125); + +udelay (100 ); +} + +static void ccgr_init (void ) +{ +struct mxc_ccm_reg *ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR ; + +writel (0x00003f3f , &ccm->CCGR0); +writel (0x0030fc00 , &ccm->CCGR1); +writel (0x000fc000 , &ccm->CCGR2); +writel (0x3f300000 , &ccm->CCGR3); +writel (0xff00f300 , &ccm->CCGR4); +writel (0x0f0000c3 , &ccm->CCGR5); +writel (0x000003cc , &ccm->CCGR6); +} + +void board_init_f (ulong dummy) +{ +ccgr_init (); + +/* setup AIPS and disable watchdog */ +arch_cpu_init (); + +gpr_init (); + +/* iomux */ +SETUP_IOMUX_PADS (uart3_pads); + +/* setup GP timer */ +timer_init (); + +/* UART clocks enabled and gd valid - init serial console */ +preloader_console_init (); + +/* DDR initialization */ +spl_dram_init (); +}configs/imx6dl_mamoj_defconfig new file +39
-0@@ -0,0 +1,39 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX6=y +CONFIG_SYS_TEXT_BASE=0x17800000 +CONFIG_SYS_MALLOC_F_LEN=0x2000 +CONFIG_TARGET_MX6DL_MAMOJ=y +# CONFIG_CMD_BMODE is not set +CONFIG_DEFAULT_DEVICE_TREE="imx6dl-mamoj" +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg" +CONFIG_BOOTDELAY=3 +CONFIG_HUSH_PARSER=y +CONFIG_SYS_PROMPT="=> " +CONFIG_CRC32_VERIFY=y +CONFIG_CMD_MEMTEST=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y +CONFIG_CMD_MII=y +CONFIG_CMD_PING=y +CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_CMD_USB=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_ENV_IS_IN_MMC=y +CONFIG_PHYLIB=y +CONFIG_PHY_MICREL=y +CONFIG_FEC_MXC=y +CONFIG_FSL_ESDHC=y +CONFIG_PINCTRL_IMX6=y +CONFIG_MXC_UART=y +CONFIG_USB=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_CI_UDC=y +CONFIG_IMX_THERMAL=yinclude/configs/imx6dl-mamoj.h new file +88
-0@@ -0,0 +1,88 @@ +/* +* Copyright (C) 2018 Simone CIANNI <[email protected]> +* Copyright (C) 2018 Raffaele RECALCATI <[email protected]> +* Copyright (C) 2018 Jagan Teki <[email protected]> +* +* Configuration settings for the BTicion i.MX6DL Mamoj board. +* +* SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef __IMX6DL_MAMOJ_CONFIG_H +#define __IMX6DL_MAMOJ_CONFIG_H + +#include <linux/sizes.h> +#include "mx6_common.h" + +/* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) + +/* Total Size of Environment Sector */ +#define CONFIG_ENV_SIZE SZ_128K + +/* Allow to overwrite serial and ethaddr */ +#define CONFIG_ENV_OVERWRITE + +/* Environment */ +#ifndef CONFIG_ENV_IS_NOWHERE +/* Environment in MMC */ +# if defined(CONFIG_ENV_IS_IN_MMC ) +# define CONFIG_ENV_OFFSET 0x100000 +# endif +#endif + +#ifndef CONFIG_SPL_BUILD +#define CONFIG_EXTRA_ENV_SETTINGS \ + "scriptaddr=0x14000000\0" \ + "fdt_addr_r=0x13000000\0" \ + "kernel_addr_r=0x10008000\0" \ + "fdt_high=0xffffffff\0" \ + BOOTENV + +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 2) + +#include <config_distro_bootcmd.h> +#endif + +/* UART */ +#define CONFIG_MXC_UART_BASE UART3_BASE + +/* MMC */ +#define CONFIG_SYS_MMC_ENV_DEV 2 +#define CONFIG_SUPPORT_EMMC_BOOT + +/* Ethernet */ +#define CONFIG_FEC_MXC_PHYADDR 1 +#define CONFIG_MII + +/* USB */ +#define CONFIG_EHCI_HCD_INIT_AFTER_RESET +#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) +#define CONFIG_MXC_USB_FLAGS 0 +#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 + +/* Miscellaneous configurable options */ +#define CONFIG_SYS_MEMTEST_START 0x80000000 +#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000) + +#define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR +#define CONFIG_SYS_HZ 1000 + +/* Physical Memory Map */ +#define CONFIG_NR_DRAM_BANKS 1 +#define PHYS_SDRAM MMDC0_ARB_BASE_ADDR + +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM +#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR +#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE + +#define CONFIG_SYS_INIT_SP_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ + GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ + CONFIG_SYS_INIT_SP_OFFSET) + +/* SPL */ +#include "imx6_spl.h" + +#endif /* __IMX6DL_MAMOJ_CONFIG_H */
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 1/7 i.MX6: board: Add BTicino i.MX6DL Mamoj initial support
Quoted 64 lines · Stefano Babic
Hi Jagan,
Quoted 61 lines · Jagan Teki
Add initial support for i.MX6DL BTicino Mamoj board.
Mamoh board added:
- SPL
-SPL_DM
-SPL_OF_CONTROL
- DM for U-Boot proper
-OF_CONTROLfor U-Boot proper
- eMMC
- FEC
- Boot from eMMC
- Boot from USB SDPSigned-off-by Simone CIANNI <[email protected]>Signed-off-by Raffaele RECALCATI <[email protected]>Signed-off-by Jagan Teki <[email protected]>--- arch/arm/dts/Makefile | 1 + arch/arm/dts/imx6dl-mamoj-u-boot.dtsi | 15 ++++ arch/arm/dts/imx6dl-mamoj.dts | 84 ++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 29 ++++++ board/bticino/mamoj/Kconfig | 12 +++ board/bticino/mamoj/MAINTAINERS | 10 +++ board/bticino/mamoj/Makefile | 8 ++ board/bticino/mamoj/README | 60 +++++++++++++ board/bticino/mamoj/mamoj.c | 27 ++++++ board/bticino/mamoj/spl.c | 161 ++++++++++++++++++++++++++++++++++ configs/imx6dl_mamoj_defconfig | 39 ++++++++ include/configs/imx6dl-mamoj.h | 88 +++++++++++++++++++ 12 files changed, 534 insertions(+) create mode 100644 arch/arm/dts/imx6dl-mamoj-u-boot.dtsi create mode 100644 arch/arm/dts/imx6dl-mamoj.dts create mode 100644 board/bticino/mamoj/Kconfig create mode 100644 board/bticino/mamoj/MAINTAINERS create mode 100644 board/bticino/mamoj/Makefile create mode 100644 board/bticino/mamoj/README create mode 100644 board/bticino/mamoj/mamoj.c create mode 100644 board/bticino/mamoj/spl.c create mode 100644 configs/imx6dl_mamoj_defconfig create mode 100644 include/configs/imx6dl-mamoj.harch/arm/dts/Makefile +1
-0@@ -399,6 +399,7 @@ dtb-$(CONFIG_MX6QDL) += \ imx6dl-icore.dtb \ imx6dl-icore-mipi.dtb \ imx6dl-icore-rqs.dtb \ + imx6dl-mamoj.dtb \ imx6q-cm-fx6.dtb \ imx6q-icore.dtb \ imx6q-icore-mipi.dtb \arch/arm/dts/imx6dl-mamoj-u-boot.dtsi new file +2
-0@@ -0,0 +1,15 @@ +/* + * Copyright (C) 2018 Jagan Teki <[email protected]>
Quoted 8 lines
arch/arm/dts/imx6dl-mamoj-u-boot.dtsi line 7
Quoted 5 lines
arch/arm/dts/imx6dl-mamoj-u-boot.dtsi new file +5
-0+ * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include "imx6qdl-u-boot.dtsi"Something wrong here - this file is not part of the patchset. Should be this
imx6qdl.dtsi?
No, I've mentioned in previous version this series has dependency with another patch-set [1]
[1] https://patchwork.ozlabs.org/cover/897156/
Jagan.
Signature · 4 lines
Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.
PATCH v3 2/7 i.MX6DL: mamoj: Add I2C support
In reply to Jagan Tekii.MX6DL Mamoj has i2c3 and i2c4 buses, add support through DM_I2C with dt definition.
i2c log:
=======
=> i2c bus
Bus 2: i2c at 021a8000 Bus 3: i2c at 021f8000
=> i2c dev 2
Setting bus to 2
=> i2c speed 400000
Setting bus speed to 400000 Hz
=> i2c probe
Valid chip addresses: 20 51 53
=> i2c md 53 0xff
00ff: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
=> i2c md 51 0xff
00ff: a8 08 40 50 09 43 46 52 42 18 80 8e ae a9 d0 53 .. at P.CFRB......S
=> i2c dev 3
Setting bus to 3
=> i2c speed 100000
Setting bus speed to 100000 Hz
=> i2c probe
Valid chip addresses: 08 40 48 4B
=> i2c md 08 0xff
00ff: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
--- arch/arm/dts/imx6dl-mamoj.dts | 28 ++++++++++++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 1 + configs/imx6dl_mamoj_defconfig | 2 ++ 3 files changed, 31 insertions(+)
arch/arm/dts/imx6dl-mamoj.dts +28 -0
@@ -21,6 +21,20 @@ status = "okay"; }; +&i2c3 { + clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3>; + status = "okay"; +}; + +&i2c4 { + clock-frequency = <100000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c4>; + status = "okay"; +}; + &uart3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart3>;
@@ -60,6 +74,20 @@ >; }; + pinctrl_i2c3: i2c3grp { + fsl,pins = < + MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1 + MX6QDL_PAD_GPIO_6__I2C3_SDA 0x4001b8b1 + >; + }; + + pinctrl_i2c4: i2c4grp { + fsl,pins = < + MX6QDL_PAD_GPIO_7__I2C4_SCL 0x4001b8b1 + MX6QDL_PAD_GPIO_8__I2C4_SDA 0x4001b8b1 + >; + }; + pinctrl_uart3: uart3grp { fsl,pins = < MX6QDL_PAD_EIM_D24__UART3_TX_DATA 0x1b0b1
arch/arm/mach-imx/mx6/Kconfig +1 -0
@@ -237,6 +237,7 @@ config TARGET_MX6DL_MAMOJ select DM select DM_ETH select DM_GPIO + select DM_I2C select DM_MMC select DM_THERMAL select SPL
configs/imx6dl_mamoj_defconfig +2 -0
@@ -12,6 +12,7 @@ CONFIG_SYS_PROMPT="=> " CONFIG_CRC32_VERIFY=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_GPIO=y +CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y
@@ -37,3 +38,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y CONFIG_IMX_THERMAL=y +CONFIG_SYS_I2C_MXC=y
Signature · 1 line
2.14.3
PATCH v3 3/7 i.MX6DL: mamoj: Add PFUZE100 support
In reply to Jagan TekiMX6DL Mamoj boards has Freescale PFUZE100 PMIC, add support for it through DM_PMIC dt definition.
pmic log:
========
=> pmic list
| Name | Parent name | Parent uclass @ seq | pfuze100 at 08 | i2c at 021f8000 | i2c @ 3
=> pmic dev pfuze100 at 08
dev: 0 @ pfuze100 at 08
=> pmic dump
Dump pmic: pfuze100 at 08 registers
0x00: 10 00 00 21 00 01 3f 01 00 7f 00 00 00 00 00 81 0x10: 00 00 3f 00 00 00 00 00 00 00 00 10 00 00 00 00 0x20: 2b 2b 2b 08 c4 00 00 00 00 00 00 00 00 00 2b 2b 0x30: 2b 08 c4 00 00 72 72 72 08 d4 00 00 2c 2c 2c 08 0x40: e4 00 00 2c 2c 2c 08 e4 00 00 6f 6f 6f 08 f4 00 0x50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x60: 00 00 00 00 00 00 48 00 00 00 10 06 1e 1e 17 10 0x70: 1a 1f 00 00 00 00 00 00 00 00 00 00 00 00 00
--- arch/arm/dts/imx6dl-mamoj.dts | 113 +++++++++++++++++++++++++++++++++++++++++ arch/arm/mach-imx/mx6/Kconfig | 2 + configs/imx6dl_mamoj_defconfig | 1 + 3 files changed, 116 insertions(+)
arch/arm/dts/imx6dl-mamoj.dts +113 -0
@@ -33,6 +33,119 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c4>; status = "okay"; + + pmic: pfuze100 at 08 { + compatible = "fsl,pfuze100"; + reg = <0x08>; + + regulators { + /* CPU vdd_arm core */ + sw1a_reg: sw1ab { + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1875000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <6250>; + }; + + /* SOC vdd_soc */ + sw1c_reg: sw1c { + regulator-min-microvolt = <300000>; + regulator-max-microvolt = <1875000>; + regulator-boot-on; + regulator-always-on; + regulator-ramp-delay = <6250>; + }; + + /* I/O power GEN_3V3 */ + sw2_reg: sw2 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + /* DDR memory */ + sw3a_reg: sw3a { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <1975000>; + regulator-boot-on; + regulator-always-on; + }; + + /* DDR memory */ + sw3b_reg: sw3b { + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <1975000>; + regulator-boot-on; + regulator-always-on; + }; + + /* not used */ + sw4_reg: sw4 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <3300000>; + }; + + /* not used */ + swbst_reg: swbst { + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5150000>; + }; + + /* PMIC vsnvs. EX boot mode */ + snvs_reg: vsnvs { + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <3000000>; + regulator-boot-on; + regulator-always-on; + }; + + vref_reg: vrefddr { + regulator-boot-on; + regulator-always-on; + }; + + /* not used */ + vgen1_reg: vgen1 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1550000>; + }; + + /* not used */ + vgen2_reg: vgen2 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1550000>; + }; + + /* not used */ + vgen3_reg: vgen3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + }; + + /* 1v8 general power */ + vgen4_reg: vgen4 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + /* 2v8 general power IMX6 */ + vgen5_reg: vgen5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + /* 3v3 Ethernet */ + vgen6_reg: vgen6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + }; }; &uart3 {
arch/arm/mach-imx/mx6/Kconfig +2 -0
@@ -239,6 +239,8 @@ config TARGET_MX6DL_MAMOJ select DM_GPIO select DM_I2C select DM_MMC + select DM_PMIC + select DM_PMIC_PFUZE100 select DM_THERMAL select SPL select SUPPORT_SPL
configs/imx6dl_mamoj_defconfig +1 -0
@@ -16,6 +16,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y +CONFIG_CMD_PMIC=y CONFIG_CMD_CACHE=y CONFIG_CMD_EXT2=y CONFIG_CMD_EXT4=y
Signature · 1 line
2.14.3
PATCH v3 4/7 configs: imx6dl_mamoj: Enable fastboot and ums
In reply to Jagan TekiEnable fastboot and ums for host to interact eMMC on Mamoj board.
--- configs/imx6dl_mamoj_defconfig | 6 ++++++ 1 file changed, 6 insertions(+)
configs/imx6dl_mamoj_defconfig +6 -0
@@ -8,6 +8,11 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6dl-mamoj" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg" CONFIG_BOOTDELAY=3 CONFIG_HUSH_PARSER=y +CONFIG_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x12000000 +CONFIG_FASTBOOT_BUF_SIZE=0x10000000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=2 CONFIG_SYS_PROMPT="=> " CONFIG_CRC32_VERIFY=y CONFIG_CMD_MEMTEST=y
@@ -24,6 +29,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_CMD_USB=y +CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_DISTRO_DEFAULTS=y CONFIG_ENV_IS_IN_MMC=y CONFIG_PHYLIB=y
Signature · 1 line
2.14.3
PATCH v3 5/7 configs: imx6dl-mamoj: Add DFU support
In reply to Jagan TekiAdd DFU support for BTicino Mamoj board and update the same steps in README.
--- board/bticino/mamoj/README | 37 +++++++++++++++++++++++++++++++++++++ configs/imx6dl_mamoj_defconfig | 2 ++ include/configs/imx6dl-mamoj.h | 4 +++- 3 files changed, 42 insertions(+), 1 deletion(-)
board/bticino/mamoj/README +37 -0
@@ -13,6 +13,8 @@ The following methods can be used for booting Mamoj boards: 1. USB SDP boot +2. eMMC boot (via DFU) + 1. USB SDP boot: ---------------
@@ -55,6 +57,41 @@ The following methods can be used for booting Mamoj boards: We can see U-Boot boot from USB SDP on minicom +2. eMMC boot via DFU: +-------------------- + + Once booted from USB SDP, program the eMMC as below(make sure to connect USB OTG) + + - Change eMMC partition config + + => mmc partconf 2 1 0 0 + + - Partition eMMC on host + + => ums 0 mmc 2 + + Host will able to detect the eMMC disk as UMS, partition the same. + + - Program SPL + + => setenv dfu_alt_info $dfu_alt_info_spl + => dfu 0 mmc 2 + + At Host + + # dfu-util -D SPL -a spl + + - Program u-boot-dtb.img + + => setenv dfu_alt_info $dfu_alt_info_uboot + => dfu 0 mmc 2 + + At Host + + # dfu-util -D u-boot-dtb.img -a u-boot + + Poweroff and Poweron the board and see U-Boot booting from eMMC. + -- Jagan Teki <[email protected]> 03/12/18
configs/imx6dl_mamoj_defconfig +2 -0
@@ -15,6 +15,7 @@ CONFIG_FASTBOOT_FLASH=y CONFIG_FASTBOOT_FLASH_MMC_DEV=2 CONFIG_SYS_PROMPT="=> " CONFIG_CRC32_VERIFY=y +CONFIG_CMD_DFU=y CONFIG_CMD_MEMTEST=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y
@@ -44,5 +45,6 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL" CONFIG_USB_GADGET_VENDOR_NUM=0x0525 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 CONFIG_CI_UDC=y +CONFIG_DFU_MMC=y CONFIG_IMX_THERMAL=y CONFIG_SYS_I2C_MXC=y
include/configs/imx6dl-mamoj.h +3 -1
@@ -15,7 +15,7 @@#include "mx6_common.h" /* Size of malloc() pool */ -#define CONFIG_SYS_MALLOC_LEN (16 * SZ_1M) +#define CONFIG_SYS_MALLOC_LEN (35 * SZ_1M)/* Total Size of Environment Sector */ #define CONFIG_ENV_SIZE SZ_128K
@@ -37,6 +37,8 @@"fdt_addr_r=0x13000000\0" \"kernel_addr_r=0x10008000\0" \"fdt_high=0xffffffff\0" \ +"dfu_alt_info_spl=spl raw 0x2 0x400\0" \ +"dfu_alt_info_uboot=u-boot raw 0x8a 0x11400\0" \BOOTENV #define BOOT_TARGET_DEVICES(func) \
Signature · 1 line
2.14.3
PATCH v3 6/7 configs: imx6dl-mamoj: Add Falcon mode support
In reply to Jagan TekiAdd Falcon mode support to boot Linux directly after SPL.
--- board/bticino/mamoj/README | 27 +++++++++++++++++++++++++++ board/bticino/mamoj/spl.c | 11 +++++++++++ configs/imx6dl_mamoj_defconfig | 1 + include/configs/imx6dl-mamoj.h | 12 ++++++++++++ 4 files changed, 51 insertions(+)
board/bticino/mamoj/README +27 -0
@@ -15,6 +15,8 @@ The following methods can be used for booting Mamoj boards: 2. eMMC boot (via DFU) +3. Falcon mode + 1. USB SDP boot: ---------------
@@ -92,6 +94,31 @@ The following methods can be used for booting Mamoj boards: Poweroff and Poweron the board and see U-Boot booting from eMMC. +3. Falcon mode: +-------------- + + - Skip 10M space and create dual partitions for eMMC, start sector is 20480 + + Partition Map for MMC device 2 -- Partition Type: DOS + + Part Start Sector Num Sectors UUID Type + 1 20480 131072 c52e78be-01 83 + 2 151552 7581696 c52e78be-02 83 + + - Write uImage + + => fatload mmc 2:1 $kernel_addr_r uImage + => mmc write $kernel_addr_r 0x1000 0x4000 + + - Write dtb and args + + => setenv bootargs console=ttymxc2,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait rw quiet + => fatload mmc 2:1 $fdt_addr_r imx6dl-mamoj.dtb + => spl export fdt $kernel_addr_r - $fdt_addr_r + => mmc write 0x13000000 0x800 0x800 + + Poweroff and Poweron the board and see Linux booting directly after SPL. + -- Jagan Teki <[email protected]> 03/12/18
board/bticino/mamoj/spl.c +11 -0
@@ -30,6 +30,17 @@ static iomux_v3_cfg_t const uart3_pads[] = { IOMUX_PADS(PAD_EIM_D25__UART3_RX_DATA | MUX_PAD_CTRL(UART_PAD_CTRL)), }; +#ifdef CONFIG_SPL_OS_BOOT +int spl_start_uboot (void ) +{ +/* break into full u-boot on 'c' */ +if (serial_tstc () &&serial_getc () =='c' ) +return 1 ; + +return 0 ; +} +#endif +struct mx6sdl_iomux_ddr_regs mx6sdl_ddr_ioregs = { .dram_sdclk_0 =IMX6SDL_DRIVE_STRENGTH , .dram_sdclk_1 =IMX6SDL_DRIVE_STRENGTH ,
configs/imx6dl_mamoj_defconfig +1 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_MX6=y CONFIG_SYS_TEXT_BASE=0x17800000 CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_TARGET_MX6DL_MAMOJ=y +CONFIG_SPL_OS_BOOT=y # CONFIG_CMD_BMODE is not set CONFIG_DEFAULT_DEVICE_TREE="imx6dl-mamoj" CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
include/configs/imx6dl-mamoj.h +12 -0
@@ -64,6 +64,18 @@#define CONFIG_MXC_USB_FLAGS 0#define CONFIG_USB_MAX_CONTROLLER_COUNT 2 +/* Falcon */ +#define CONFIG_SPL_FS_LOAD_ARGS_NAME "args" +#define CONFIG_SPL_FS_LOAD_KERNEL_NAME "uImage" +#define CONFIG_CMD_SPL +#define CONFIG_SYS_SPL_ARGS_ADDR 0x13000000 +#define CONFIG_CMD_SPL_WRITE_SIZE (128 * SZ_1K) + +/* MMC support: args at 1MB kernel at 2MB */ +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x800/* 1MB */ +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS (CONFIG_CMD_SPL_WRITE_SIZE / 512) +#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x1000/* 2MB */ +/* Miscellaneous configurable options */ #define CONFIG_SYS_MEMTEST_START 0x80000000#define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_MEMTEST_START + 0x8000000)
Signature · 1 line
2.14.3
PATCH v3 7/7 configs: imx6dl-mamoj: Enable HAB
In reply to Jagan TekiEnable Secure boot(HAB) for BTicino Mamoj board.
--- configs/imx6dl_mamoj_defconfig | 1 + 1 file changed, 1 insertion(+)
configs/imx6dl_mamoj_defconfig +1 -0
@@ -49,3 +49,4 @@ CONFIG_CI_UDC=y CONFIG_DFU_MMC=y CONFIG_IMX_THERMAL=y CONFIG_SYS_I2C_MXC=y +CONFIG_SECURE_BOOT=y
Signature · 1 line
2.14.3