Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9666AC433EF for ; Tue, 28 Sep 2021 12:14:40 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 839E6611CB for ; Tue, 28 Sep 2021 12:14:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 839E6611CB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5326E82D88; Tue, 28 Sep 2021 14:14:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="RUkzii+p"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 136938312A; Tue, 28 Sep 2021 14:14:33 +0200 (CEST) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9F62280257 for ; Tue, 28 Sep 2021 14:14:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72e.google.com with SMTP id i132so40514499qke.1 for ; Tue, 28 Sep 2021 05:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=gsxcpm4P5YIHNdaQuDA+BTtniz9RGKVIZXXjjxIRtM8=; b=RUkzii+pxEcKn/rTCXegTFtjJ0tYul0C0GoBvgxNifDxAYXewWFzEYtakoj+RinlAb u27BHIXu4H6I1dXGSKF/CaK882FCtbWDhP+4fESOTKhQzr7/GUJ2FgEB53YAQ4Wae5Rd h7+pGkWRSXrLIRfo8nMdOXlu++7mo/pu7DpD0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=gsxcpm4P5YIHNdaQuDA+BTtniz9RGKVIZXXjjxIRtM8=; b=hk2d630bSjHh2+VobaC2Y0cdtpD9UZeBrPvX/A9X+HtcnlsuBc6s1ma0naiV/XXWi0 s2kxigPGJO5efgaBAghoS4qUrcf7oXO5wdAYTZl148IRQcfXuf6f/oaw+bwdtJFK6Tc+ UyZDfbfK26It6xfe2f8hNyWN7PU7SCHfU6Z8UbtifZ44QkwBxWZZ71GO5+3/Y5kqw4Si FdTNbULq/5VjJCg/68/68u3Pii6PirHJNGLvH1SphVi98bsG2khO0QDrzEuCJLr/oRjN cDPPIb2/JPnyj21m9MHzGPGw1kDVPGGwYIYj6F0XLA3710GaMt4amcibDs4XvXJZ7LTI y/NA== X-Gm-Message-State: AOAM533lBaYOLNTEVcvW6NVweaZRAbztp2New9l6dskooWzB8HCKmuLV 5XZMbsMu+EspM4tQSHTIWtdGVA== X-Google-Smtp-Source: ABdhPJz7ibUOpnG/6F6r17gHYIaXRIcDOZQpBmzUcLThMr/LmtJklPVVMZXIds8mZ/m0tHb3FnvMXg== X-Received: by 2002:a37:317:: with SMTP id 23mr4717391qkd.152.1632831264820; Tue, 28 Sep 2021 05:14:24 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-c022-6242-d139-1392.res6.spectrum.com. [2603:6081:7b01:cbda:c022:6242:d139:1392]) by smtp.gmail.com with ESMTPSA id d3sm11012186qke.36.2021.09.28.05.14.23 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Sep 2021 05:14:24 -0700 (PDT) Date: Tue, 28 Sep 2021 08:14:22 -0400 From: Tom Rini To: Amjad Ouled-Ameur Cc: u-boot@lists.denx.de, Andreas Dannenberg , Andre Przywara , Lokesh Vutla , khilman@baylibre.com, nm@ti.com Subject: Re: [PATCH] board: ti: Add support for the AM335x GP EVM mini board Message-ID: <20210928121422.GP31748@bill-the-cat> References: <20210928094136.27520-1-aouledameur@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="S2mBhmCV/xKTH8gV" Content-Disposition: inline In-Reply-To: <20210928094136.27520-1-aouledameur@baylibre.com> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --S2mBhmCV/xKTH8gV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =2E.. trimming the CC list. On Tue, Sep 28, 2021 at 11:41:36AM +0200, Amjad Ouled-Ameur wrote: > From: Andreas Dannenberg >=20 > This is not really a new board but rather a minimal bootloader solution > for the AM335x GP EVM. In terms of interfaces, it only supports booting > from MMC0 or UART0 and only activates a minimal set of drivers that are > that are necessary to run the device such as DDR, I2C, and PMIC. >=20 > The goal is to provide a bare minimum starting point to boot Linux for > basing custom board-ports on. The limited complexity of this solution > should make it easier to achieve a successful boot to U-Boot prompt vs. > trying to pair down the full-featured multi-platform AM335x U-Boot > available through am335x_evm_defconfig. >=20 > Signed-off-by: Andreas Dannenberg > [Amjad: fix checkpatch and compile warnings] > Signed-off-by: Amjad Ouled-Ameur There's a few problems here, and I say this as someone who is doing the "mini" version for J721e/etc. First: > diff --git a/arch/arm/dts/am335x-evm-mini.dts b/arch/arm/dts/am335x-evm-m= ini.dts > new file mode 100644 > index 000000000000..f45da0fd3f6f > --- /dev/null > +++ b/arch/arm/dts/am335x-evm-mini.dts No new dts files. You use the same dts for kernel and u-boot, and have to write one once. And it all Just Works when you want to enable more features on your platform. > diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am3= 3xx/Kconfig > index 4268419b166b..296559a00c15 100644 > --- a/arch/arm/mach-omap2/am33xx/Kconfig > +++ b/arch/arm/mach-omap2/am33xx/Kconfig > @@ -63,6 +63,36 @@ config TARGET_AM335X_EVM > to write software and develop hardware around > an AM335x processor subsystem. > =20 > +config TARGET_AM335X_EVM_MINI > + bool "Support am335x_evm_mini" > + select BOARD_LATE_INIT > + select DM > + select DM_GPIO > + select DM_SERIAL > + imply CMD_DM > + imply SPL_DM > + imply SPL_DM_SEQ_ALIAS > + imply SPL_ENV_SUPPORT > + imply SPL_FS_EXT4 > + imply SPL_FS_FAT > + imply SPL_GPIO_SUPPORT > + imply SPL_I2C_SUPPORT > + imply SPL_LIBCOMMON_SUPPORT > + imply SPL_LIBDISK_SUPPORT > + imply SPL_LIBGENERIC_SUPPORT > + imply SPL_MMC_SUPPORT > + imply SPL_OF_LIBFDT > + imply SPL_POWER_SUPPORT > + imply SPL_SEPARATE_BSS > + imply SPL_SERIAL_SUPPORT > + imply SPL_SYS_MALLOC_SIMPLE > + imply SPL_YMODEM_SUPPORT > + help > + This option specifies support for the AM335x > + GP and HS EVM development platforms using a minimal > + system configuration, only supporting a small subset > + of boot media and other features. There should be, maybe, a few selects, for things you simply cannot avoid, and no imply's. The point is something that's clear about what is enabled and why it's enabled. And you've got a bunch of extra stuff enabled there. > diff --git a/board/ti/am335x/board_hs_mini.h b/board/ti/am335x/board_hs_m= ini.h > new file mode 100644 > index 000000000000..e03ba141f286 > --- /dev/null > +++ b/board/ti/am335x/board_hs_mini.h > @@ -0,0 +1,19 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * TI AM437x boards information header > + * Derived from AM335x board. > + * > + * Copyright (C) 2020, Texas Instruments, Incorporated - http://www.ti.c= om/ > + */ > + > +#ifndef _BOARD_HS_H_ > +#define _BOARD_HS_H_ > + > +#ifdef CONFIG_TI_SECURE_DEVICE > +void board_fit_image_post_process(void **p_image, size_t *p_size) > +{ > + secure_boot_verify_image(p_image, p_size); > +} > +#endif > + > +#endif I'd like some of the TI folks to chime in on if we really need to have a "mini" HS variant too. > diff --git a/board/ti/am335x/board_mini.c b/board/ti/am335x/board_mini.c > new file mode 100644 > index 000000000000..94f0a2910be3 > --- /dev/null > +++ b/board/ti/am335x/board_mini.c > @@ -0,0 +1,249 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Mini board functions for TI AM335X based boards > + * > + * Copyright (C) 2020, Texas Instruments, Incorporated - http://www.ti.c= om/ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include "board_mini.h" > +#include "board_hs_mini.h" Check if we really need all of those includes still. [snip] > +const struct dpll_params *get_dpll_mpu_params(void) > +{ > + int ind =3D get_sys_clk_index(); > + int freq =3D am335x_get_efuse_mpu_max_freq(cdev); > + > + switch (freq) { > + case MPUPLL_M_1000: > + return &dpll_mpu_opp[ind][5]; > + case MPUPLL_M_800: > + return &dpll_mpu_opp[ind][4]; > + case MPUPLL_M_720: > + return &dpll_mpu_opp[ind][3]; > + case MPUPLL_M_600: > + return &dpll_mpu_opp[ind][2]; > + case MPUPLL_M_500: > + return &dpll_mpu_opp100; > + case MPUPLL_M_300: > + return &dpll_mpu_opp[ind][0]; > + } > + > + return &dpll_mpu_opp[ind][0]; > +} > + > +void scale_vcores_generic(int freq) > +{ > + int sil_rev, mpu_vdd; > + > + /* > + * The GP EVM, IDK and EVM SK use a TPS65910 PMIC. For all > + * MPU frequencies we support we use a CORE voltage of > + * 1.10V. For MPU voltage we need to switch based on > + * the frequency we are running at. > + */ > + > + if (IS_ENABLED(CONFIG_DM_I2C)) { > + if (power_tps65910_init(0)) > + return; > + } else { > + if (i2c_probe(TPS65910_CTRL_I2C_ADDR)) > + return; > + } > + > + /* > + * Depending on MPU clock and PG we will need a different > + * VDD to drive at that speed. > + */ > + sil_rev =3D readl(&cdev->deviceid) >> 28; > + mpu_vdd =3D am335x_get_tps65910_mpu_vdd(sil_rev, freq); > + > + /* Tell the TPS65910 to use i2c */ > + tps65910_set_i2c_control(); > + > + /* First update MPU voltage. */ > + if (tps65910_voltage_update(MPU, mpu_vdd)) > + return; > + > + /* Second, update the CORE voltage. */ > + if (tps65910_voltage_update(CORE, TPS65910_OP_REG_SEL_1_1_0)) > + return; > +} Are we supposed to be doing all of the frequency scaling stuff in the "mini" version? And also, just select SPL_DM_I2C so that we can simplify the code. > +void set_uart_mux_conf(void) > +{ > + if (CONFIG_CONS_INDEX =3D=3D 1) > + enable_uart0_pin_mux(); > + else if (CONFIG_CONS_INDEX =3D=3D 2) > + enable_uart1_pin_mux(); > + else if (CONFIG_CONS_INDEX =3D=3D 3) > + enable_uart2_pin_mux(); > + else if (CONFIG_CONS_INDEX =3D=3D 4) > + enable_uart3_pin_mux(); > + else if (CONFIG_CONS_INDEX =3D=3D 5) > + enable_uart4_pin_mux(); > + else if (CONFIG_CONS_INDEX =3D=3D 6) > + enable_uart5_pin_mux(); > +} All of this was because of the IDK having a different UART port than the other designs, and we don't need that for "mini". > +int board_late_init(void) > +{ > + if (IS_ENABLED(CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG)) { > + env_set("board_name", CONFIG_SYS_BOARD); > + > + /* > + * Default FIT boot on HS devices. Non FIT images are not allowed > + * on HS devices. > + */ > + if (get_device_type() =3D=3D HS_DEVICE) > + env_set("boot_fit", "1"); > + } > + > + return 0; > +} Pending the answer about HS devices, this and also select'ing BOARD_LATE_INIT can go. > diff --git a/board/ti/am335x/board_mini.h b/board/ti/am335x/board_mini.h > new file mode 100644 > index 000000000000..0fa1a8680027 > --- /dev/null > +++ b/board/ti/am335x/board_mini.h > @@ -0,0 +1,44 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * Mini AM335x boards information header > + * > + * Copyright (C) 2020, Texas Instruments, Incorporated - http://www.ti.c= om/ > + */ > + > +#ifndef _BOARD_H_ > +#define _BOARD_H_ > + > +/** > + * AM335X (EMIF_4D) EMIF REG_COS_COUNT_1, REG_COS_COUNT_2, and > + * REG_PR_OLD_COUNT values to avoid LCDC DMA FIFO underflows and Frame > + * Synchronization Lost errors. The values are the biggest that work > + * reliably with offered video modes and the memory subsystem on the > + * boards. These register have are briefly documented in "7.3.3.5.2 > + * Command Starvation" section of AM335x TRM. The REG_COS_COUNT_1 and > + * REG_COS_COUNT_2 do not have any effect on current versions of > + * AM335x. > + */ > +#define EMIF_OCP_CONFIG_BEAGLEBONE_BLACK 0x00141414 > +#define EMIF_OCP_CONFIG_AM335X_EVM 0x003d3d3d We only use the EVM value, so drop the BEAGLEBONE_BLACK one. =20 > diff --git a/board/ti/am335x/mux_mini.c b/board/ti/am335x/mux_mini.c > new file mode 100644 > index 000000000000..b724198b9cdf > --- /dev/null > +++ b/board/ti/am335x/mux_mini.c > @@ -0,0 +1,109 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include "board_mini.h" > + > +static struct module_pin_mux uart0_pin_mux[] =3D { > + {OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART0_RXD */ > + {OFFSET(uart0_txd), (MODE(0) | PULLUDEN)}, /* UART0_TXD */ > + {-1}, > +}; > + > +static struct module_pin_mux uart1_pin_mux[] =3D { > + {OFFSET(uart1_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)}, /* UART1_RXD */ > + {OFFSET(uart1_txd), (MODE(0) | PULLUDEN)}, /* UART1_TXD */ > + {-1}, > +}; > + > +static struct module_pin_mux uart2_pin_mux[] =3D { > + {OFFSET(spi0_sclk), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* UART2_RXD */ > + {OFFSET(spi0_d0), (MODE(1) | PULLUDEN)}, /* UART2_TXD */ > + {-1}, > +}; > + > +static struct module_pin_mux uart3_pin_mux[] =3D { > + {OFFSET(spi0_cs1), (MODE(1) | PULLUP_EN | RXACTIVE)}, /* UART3_RXD */ > + {OFFSET(ecap0_in_pwm0_out), (MODE(1) | PULLUDEN)}, /* UART3_TXD */ > + {-1}, > +}; > + > +static struct module_pin_mux uart4_pin_mux[] =3D { > + {OFFSET(gpmc_wait0), (MODE(6) | PULLUP_EN | RXACTIVE)}, /* UART4_RXD */ > + {OFFSET(gpmc_wpn), (MODE(6) | PULLUDEN)}, /* UART4_TXD */ > + {-1}, > +}; > + > +static struct module_pin_mux uart5_pin_mux[] =3D { > + {OFFSET(lcd_data9), (MODE(4) | PULLUP_EN | RXACTIVE)}, /* UART5_RXD */ > + {OFFSET(lcd_data8), (MODE(4) | PULLUDEN)}, /* UART5_TXD */ > + {-1}, > +}; > + > +static struct module_pin_mux mmc0_pin_mux[] =3D { > + {OFFSET(mmc0_dat3), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT3 */ > + {OFFSET(mmc0_dat2), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT2 */ > + {OFFSET(mmc0_dat1), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT1 */ > + {OFFSET(mmc0_dat0), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_DAT0 */ > + {OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_CLK */ > + {OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)}, /* MMC0_CMD */ > + {OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)}, /* MMC0_WP */ > + {OFFSET(spi0_cs1), (MODE(7) | RXACTIVE | PULLUP_EN)}, /* GPIO0_6 */ > + {-1}, > +}; > + > +static struct module_pin_mux i2c0_pin_mux[] =3D { > + {OFFSET(i2c0_sda), (MODE(0) | RXACTIVE | > + PULLUDEN | SLEWCTRL)}, /* I2C_DATA */ > + {OFFSET(i2c0_scl), (MODE(0) | RXACTIVE | > + PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */ > + {-1}, > +}; > + > +void enable_uart0_pin_mux(void) > +{ > + configure_module_pin_mux(uart0_pin_mux); > +} > + > +void enable_uart1_pin_mux(void) > +{ > + configure_module_pin_mux(uart1_pin_mux); > +} > + > +void enable_uart2_pin_mux(void) > +{ > + configure_module_pin_mux(uart2_pin_mux); > +} > + > +void enable_uart3_pin_mux(void) > +{ > + configure_module_pin_mux(uart3_pin_mux); > +} > + > +void enable_uart4_pin_mux(void) > +{ > + configure_module_pin_mux(uart4_pin_mux); > +} > + > +void enable_uart5_pin_mux(void) > +{ > + configure_module_pin_mux(uart5_pin_mux); > +} > + > +void enable_i2c0_pin_mux(void) > +{ > + configure_module_pin_mux(i2c0_pin_mux); > +} > + > +void enable_board_pin_mux(void) > +{ > + /* Do board-specific muxes */ > + configure_module_pin_mux(mmc0_pin_mux); > +} We don't need all of the UART muxes. > diff --git a/configs/am335x_evm_mini_defconfig b/configs/am335x_evm_mini_= defconfig > new file mode 100644 > index 000000000000..087d64d742d3 > --- /dev/null > +++ b/configs/am335x_evm_mini_defconfig > @@ -0,0 +1,42 @@ > +CONFIG_ARM=3Dy > +CONFIG_ARCH_CPU_INIT=3Dy > +CONFIG_ARCH_OMAP2PLUS=3Dy > +CONFIG_TI_COMMON_CMD_OPTIONS=3Dy > +CONFIG_DEFAULT_DEVICE_TREE=3D"am335x-evm-mini" > +CONFIG_AM33XX=3Dy > +CONFIG_TARGET_AM335X_EVM_MINI=3Dy > +CONFIG_SPL=3Dy > +CONFIG_DISTRO_DEFAULTS=3Dy > +CONFIG_ANDROID_BOOT_IMAGE=3Dy > +CONFIG_SPL_LOAD_FIT=3Dy > +CONFIG_OF_BOARD_SETUP=3Dy > +CONFIG_BOOTCOMMAND=3D"if test ${boot_fit} -eq 1; then run update_to_fit;= fi; run findfdt; run init_console; run envboot; run distro_bootcmd" > +CONFIG_LOGLEVEL=3D3 > +CONFIG_SYS_CONSOLE_INFO_QUIET=3Dy > +CONFIG_ARCH_MISC_INIT=3Dy > +CONFIG_SPL_FIT_IMAGE_TINY=3Dy > +# CONFIG_SPL_FS_EXT4 is not set > +CONFIG_SPL_I2C=3Dy > +# CONFIG_SPL_NAND_SUPPORT is not set > +CONFIG_SPL_POWER=3Dy > +# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set > +CONFIG_CMD_SPL=3Dy > +# CONFIG_CMD_EEPROM is not set > +# CONFIG_CMD_SETEXPR is not set > +# CONFIG_SPL_EFI_PARTITION is not set > +CONFIG_OF_CONTROL=3Dy > +CONFIG_SYS_RELOC_GD_ENV_ADDR=3Dy > +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=3Dy > +CONFIG_SPL_ENV_IS_NOWHERE=3Dy > +CONFIG_VERSION_VARIABLE=3Dy > +# CONFIG_NET is not set > +CONFIG_DM_I2C=3Dy > +CONFIG_MISC=3Dy > +# CONFIG_MMC_HW_PARTITIONING is not set > +CONFIG_MMC_OMAP_HS=3Dy > +CONFIG_TIMER=3Dy > +CONFIG_OMAP_TIMER=3Dy > +CONFIG_DYNAMIC_CRC_TABLE=3Dy > +CONFIG_RSA=3Dy > +CONFIG_LZO=3Dy > +# CONFIG_OF_LIBFDT_OVERLAY is not set Audit this again please, if we're taking a non-default value for a CONFIG option, it should likely be to disable something, not enable it. > diff --git a/include/configs/am335x_evm_mini.h b/include/configs/am335x_e= vm_mini.h > new file mode 100644 > index 000000000000..f4c8dfe78e1a > --- /dev/null > +++ b/include/configs/am335x_evm_mini.h > @@ -0,0 +1,96 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ > + */ > + > +#ifndef __CONFIG_AM335X_EVM_MINI_H > +#define __CONFIG_AM335X_EVM_MINI_H > + > +#include > +#include > + > +#ifndef CONFIG_SPL_BUILD > +# define CONFIG_TIMESTAMP > +#endif You cannot guard options with SPL_BUILD. > +#define CONFIG_SYS_BOOTM_LEN SZ_16M > + > +#define CONFIG_MACH_TYPE MACH_TYPE_AM335XEVM This isn't going to boot a non-DT kernel. > + > +/* Clock Defines */ > +#define V_OSCK 24000000 /* Clock output from T2 */ > +#define V_SCLK (V_OSCK) > + > +#define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance) \ > + "bootcmd_" #devtypel #instance "=3D" \ > + "setenv mmcdev " #instance "; "\ > + "setenv bootpart " #instance ":2 ; "\ > + "run mmcboot\0" > + > +#define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance) \ > + #devtypel #instance " " > + > +#define BOOT_TARGET_DEVICES(func) \ > + func(MMC, mmc, 0) \ > + func(LEGACY_MMC, legacy_mmc, 0) > + > +#include No legacy boot, distro only. Which means.. > +#ifndef CONFIG_SPL_BUILD > +#include > + > +#define CONFIG_EXTRA_ENV_SETTINGS \ > + DEFAULT_LINUX_BOOT_ENV \ > + DEFAULT_MMC_TI_ARGS \ > + DEFAULT_FIT_TI_ARGS \ > + "bootpart=3D0:2\0" \ > + "bootdir=3D/boot\0" \ > + "bootfile=3DzImage\0" \ > + "fdtfile=3Dundefined\0" \ > + "console=3DttyS0,115200n8\0" \ > + "partitions=3D" \ > + "uuid_disk=3D${uuid_gpt_disk};" \ > + "name=3Dbootloader,start=3D384K,size=3D1792K," \ > + "uuid=3D${uuid_gpt_bootloader};" \ > + "name=3Drootfs,start=3D2688K,size=3D-,uuid=3D${uuid_gpt_rootfs}\0" \ > + "optargs=3D\0" \ > + "ramroot=3D/dev/ram0 rw\0" \ > + "ramrootfstype=3Dext2\0" \ > + "ramargs=3Dsetenv bootargs console=3D${console} " \ > + "${optargs} " \ > + "root=3D${ramroot} " \ > + "rootfstype=3D${ramrootfstype}\0" \ > + "loadramdisk=3Dload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ > + "ramboot=3Decho Booting from ramdisk ...; " \ > + "run ramargs; " \ > + "bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ > + "default_device_tree=3Dam335x-evm.dtb\0" \ > + "findfdt=3D" \ > + "setenv name_fdt ${default_device_tree};" \ > + "setenv fdtfile ${name_fdt}\0" \ > + "init_console=3D" \ > + "setenv console ttyS0,115200n8\0" \ > + BOOTENV Clean this up. > +#endif > + > +/* NS16550 Configuration */ > +#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */ > +#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */ > +#define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */ > +#define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */ > +#define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */ > +#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */ > + > +/* PMIC support */ > +#define CONFIG_POWER_TPS65910 > + > +/* > + * Disable MMC DM for SPL build and can be re-enabled after adding > + * DM support in SPL > + */ > +#ifdef CONFIG_SPL_BUILD > +#undef CONFIG_DM_MMC > +#undef CONFIG_TIMER > +#endif You can't do build time guards like that. And I'm sure most of these kind of comments apply to the am43xx_evm version too. Thanks. --=20 Tom --S2mBhmCV/xKTH8gV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFTBxcACgkQFHw5/5Y0 tywdYAv+P52Cvk2aZqwl2r1cuj0pq+JWyX/h9Jby3V+vhbXv6W9cG5W6I9dUtR74 TjpTyeu27qKYv78c0V00vy7PXIMtuOZythJ6oaShozei1cFYtPgRu2l1EgYv+K5c wmCmfoCcx1ypf+GcAPMN0LyqBBx/Iab5YaD5yWoePdrXcPmspx1DDuOsEJVyjQbs yd+GdPm9c/KZc+SysYbuAyQcNVMiWe+nL2KaaX3RAE7sTCOHsN7Ve3by/wPt0vd2 gute8fH30LRPFm3us12oi99VDwJxhRYQhQGjaSiPS2NaeUN9MoK7eExCCn8Tov9a vWwbzO6AXDkwb2s5JTP+9wjulYR0RLjMAuDx3BPQ12VBlOVWjO1ZJ0tPXOEdjYte GZvZUc6e39pBFq4ZQJTjF7rd+j0EYBqdMXQc6OmedXGLu0FfHZQYbUqAe7nndfY7 LTIt5UxR6CHcI96CXWQXA0ZcbT+zty1aGszYO9b4DDYeQTMVmjV+VDag0PP6mx/S lQnwTi5V =kVOt -----END PGP SIGNATURE----- --S2mBhmCV/xKTH8gV--