Browse Source

nitrogen8mm: add rev 2

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
tags/2020-06-01
Troy Kisky 1 year ago
parent
commit
8ffffc619d
4 changed files with 183 additions and 0 deletions
  1. +24
    -0
      arch/arm/dts/imx8mm-nitrogen8mm_rev2.dts
  2. +8
    -0
      board/boundary/nitrogen8mm/Kconfig
  3. +48
    -0
      board/boundary/nitrogen8mm/nitrogen8mm.c
  4. +103
    -0
      configs/nitrogen8mm_rev2_2g_defconfig

+ 24
- 0
arch/arm/dts/imx8mm-nitrogen8mm_rev2.dts View File

@@ -0,0 +1,24 @@
/*
* Copyright 2018 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/

#include "imx8mm-nitrogen8mm.dts"

/ {
model = "Boundary Devices i.MX8MMini Nitrogen8MM Rev2";
compatible = "boundary,imx8mm-nitrogen8mm_rev2", "fsl,imx8mm";
};

&wdog1 {
/delete-property/ reset-gpios;
};

+ 8
- 0
board/boundary/nitrogen8mm/Kconfig View File

@@ -1,5 +1,13 @@
if TARGET_NITROGEN8MM || TARGET_NITROGEN8MN

config BOARD_REV2
bool "board rev2"

config BOARD_TYPE
string
depends on BOARD_REV2
default "nitrogen8mm_rev2" if BOARD_REV2

config SYS_BOARD
default "nitrogen8mm"



+ 48
- 0
board/boundary/nitrogen8mm/nitrogen8mm.c View File

@@ -231,8 +231,56 @@ int board_init(void)
return 0;
}

#ifndef CONFIG_BOARD_REV2

#define PF8100 0x08
#define PF8X00_EMREV 0x02
#define PF8X00_PROGID 0x03
#define ID_DUAL1 0x4008
#define ID_DUAL2 0x301d

void check_wdog(void)
{
struct udevice *bus;
struct udevice *i2c_dev;
unsigned char id[4];
int ret;
int prog_id;

ret = uclass_get_device_by_seq(UCLASS_I2C, 0, &bus);
if (ret) {
printf("%s: Can't find bus\n", __func__);
return;
}

ret = dm_i2c_probe(bus, PF8100, 0, &i2c_dev);
if (ret) {
printf("%s: Can't find device id=0x%x\n", __func__, PF8100);
return;
}

id[0] = 0;
id[0] = 1;
dm_i2c_read(i2c_dev, PF8X00_PROGID, id, 1);
dm_i2c_read(i2c_dev, PF8X00_EMREV, &id[1], 1);
prog_id = (id[1] << 8) | id[0];
if ((prog_id != ID_DUAL1) && (prog_id != ID_DUAL2)) {
/*
* a couple of boards were stuffed with a pmic
* with a falling edge wdog.
*/
env_set("cmd_board",
"fdt rm wdog0 reset-gpios");
printf("cmd_board set to correct wdog edge\n");
}
}
#endif

static void set_env_vars(void)
{
#ifndef CONFIG_BOARD_REV2
check_wdog();
#endif
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
if (!env_get("board"))
env_set("board", "nitrogen8mm");


+ 103
- 0
configs/nitrogen8mm_rev2_2g_defconfig View File

@@ -0,0 +1,103 @@
CONFIG_ARM=y
CONFIG_ARCH_IMX8M=y
CONFIG_SYS_TEXT_BASE=0x40200000
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_TARGET_NITROGEN8MM=y
CONFIG_BOARD_REV2=y
CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEBUG_UART_BASE=0x30860000
CONFIG_DEBUG_UART_CLOCK=25000000
CONFIG_DEFAULT_DEVICE_TREE="imx8mm-nitrogen8mm_rev2"
CONFIG_DEBUG_UART=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_FIT=y
CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg,DDR_MB=2048,DEFCONFIG=\"nitrogen8mm_rev2_2g\""
CONFIG_BOOTSTAGE_STASH_SIZE=4096
CONFIG_ARCH_MISC_INIT=y
CONFIG_SPL_TEXT_BASE=0x7E1000
CONFIG_SPL_BOARD_INIT=y
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_SPL_USB_HOST_SUPPORT=y
CONFIG_SPL_USB_GADGET_SUPPORT=y
CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_CMD_IMLS=y
CONFIG_CMD_MEMTEST=y
CONFIG_SYS_ALT_MEMTEST=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIME=y
CONFIG_CMD_REGULATOR=y
CONFIG_CMD_EXT4_WRITE=y
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_ISO_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_PARTITION_TYPE_GUID=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SYS_FSL_SEC_LE=y
CONFIG_IMX8M_LPDDR4=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x42800000
CONFIG_FASTBOOT_BUF_SIZE=0x40000000
CONFIG_FASTBOOT_FLASH=y
CONFIG_FASTBOOT_FLASH_MMC_DEV=0
CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
CONFIG_SYS_I2C_MXC_I2C1=y
CONFIG_SYS_I2C_MXC_I2C2=y
CONFIG_SYS_I2C_MXC_I2C3=y
CONFIG_SYS_I2C_MXC_I2C4=y
CONFIG_DM_MMC=y
CONFIG_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_FSL_ESDHC_IMX=y
CONFIG_PHYLIB=y
CONFIG_PHY_ATHEROS=y
CONFIG_NETDEVICES=y
CONFIG_FEC_MXC=y
CONFIG_FEC_PHY_BITBANG=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX8M=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DEBUG_UART_MXC=y
CONFIG_MXC_UART=y
CONFIG_DM_THERMAL=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_MXC_USB_OTG_HACTIVE=y
CONFIG_USB_STORAGE=y
CONFIG_USB_KEYBOARD=y
CONFIG_SYS_USB_EVENT_POLL_VIA_CONTROL_EP=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="Boundary"
CONFIG_USB_GADGET_VENDOR_NUM=0x3016
CONFIG_USB_GADGET_PRODUCT_NUM=0x0001
CONFIG_USB_GADGET_SPL_SPD_PRODUCT_NUM=0x1000
CONFIG_CI_UDC=y
CONFIG_USB_ETHER=y
CONFIG_USB_ETH_CDC=y
CONFIG_USBNET_DEVADDR="00:19:b8:00:00:02"
CONFIG_USBNET_HOST_ADDR="00:19:b8:00:00:01"
CONFIG_USB_HOST_ETHER=y

Loading…
Cancel
Save