board: ti: Add support for the AM335x GP EVM mini board
Subsystems (3)
PATCH 1/1 board: ti: Add support for the AM335x GP EVM mini board
From: Andreas Dannenberg <[email protected]>
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.
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.
---
Tests:
- This has been tested on Am335x platform, the board boots successfully to u-boot prompt and runs basic commands seamlessly, please find the logs
here: [0]
However, regarding the kernel boot test, this patch does not actually guaranteey that since its purpose is to mainly allow the user to achieve a successful boot to U-boot prompt.
[0]: https://pastebin.com/ixQ2yB9n
MAINTAINERS | 1 + arch/arm/dts/Makefile | 1 + arch/arm/dts/am335x-bone-common.dtsi | 1 + arch/arm/dts/am335x-evm-mini.dts | 166 ++++++++++++++++++ arch/arm/mach-omap2/am33xx/Kconfig | 30 ++++ board/ti/am335x/Kconfig | 13 +- board/ti/am335x/Makefile | 6 +- board/ti/am335x/board_hs_mini.h | 19 ++ board/ti/am335x/board_mini.c | 249 +++++++++++++++++++++++++++ board/ti/am335x/board_mini.h | 44 +++++ board/ti/am335x/mux_mini.c | 109 ++++++++++++ configs/am335x_evm_mini_defconfig | 42 +++++ configs/am335x_hs_evm_mini_defconfig | 46 +++++ include/configs/am335x_evm_mini.h | 96 +++++++++++ 14 files changed, 820 insertions(+), 3 deletions(-) create mode 100644 arch/arm/dts/am335x-evm-mini.dts create mode 100644 board/ti/am335x/board_hs_mini.h create mode 100644 board/ti/am335x/board_mini.c create mode 100644 board/ti/am335x/board_mini.h create mode 100644 board/ti/am335x/mux_mini.c create mode 100644 configs/am335x_evm_mini_defconfig create mode 100644 configs/am335x_hs_evm_mini_defconfig create mode 100644 include/configs/am335x_evm_mini.h
MAINTAINERS +1 -0
@@ -492,6 +492,7 @@ F: arch/arm/mach-keystone/ F: arch/arm/mach-omap2/ F: arch/arm/include/asm/arch-omap*/ F: arch/arm/include/asm/ti-common/ +F: arch/arm/dts/am335x* F: board/ti/ F: drivers/dma/ti* F: drivers/firmware/ti_sci.*
arch/arm/dts/Makefile +1 -0
@@ -360,6 +360,7 @@ dtb-$(CONFIG_AM33XX) += \ am335x-brsmarc1.dtb \ am335x-draco.dtb \ am335x-evm.dtb \ + am335x-evm-mini.dtb \ am335x-evmsk.dtb \ am335x-bonegreen.dtb \ am335x-icev2.dtb \
arch/arm/dts/am335x-bone-common.dtsi +1 -0
@@ -211,6 +211,7 @@ tps: tps@24 { reg = <0x24>; + #interrupt-cells = <1>; }; baseboard_eeprom: baseboard_eeprom@50 {
arch/arm/dts/am335x-evm-mini.dts new file +166 -0
166 lines not on this page · raw message
arch/arm/mach-omap2/am33xx/Kconfig +30 -0
@@ -63,6 +63,36 @@ config TARGET_AM335X_EVM to write software and develop hardware around an AM335x processor subsystem. +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. + config TARGET_AM335X_BALTOS bool "Support am335x_baltos" select BOARD_LATE_INIT
board/ti/am335x/Kconfig +12 -1
@@ -1,4 +1,4 @@ -if TARGET_AM335X_EVM +if TARGET_AM335X_EVM || TARGET_AM335X_EVM_MINI config SYS_BOARD default "am335x"
@@ -9,9 +9,20 @@ config SYS_VENDOR config SYS_SOC default "am33xx" +if TARGET_AM335X_EVM + config SYS_CONFIG_NAME default "am335x_evm" +endif + +if TARGET_AM335X_EVM_MINI + +config SYS_CONFIG_NAME + default "am335x_evm_mini" + +endif + config NOR bool "Support for NOR flash" help
board/ti/am335x/Makefile +4 -2
@@ -5,7 +5,9 @@ # Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) -obj-y := mux.o +obj-$(CONFIG_TARGET_AM335X_EVM) := mux.o +obj-$(CONFIG_TARGET_AM335X_EVM_MINI) := mux_mini.o endif -obj-y += board.o +obj-$(CONFIG_TARGET_AM335X_EVM) += board.o +obj-$(CONFIG_TARGET_AM335X_EVM_MINI) += board_mini.o
board/ti/am335x/board_hs_mini.h new file +19 -0
@@ -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.com/ +*/ + +#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
board/ti/am335x/board_mini.c new file +249 -0
249 lines not on this page · raw message
board/ti/am335x/board_mini.h new file +44 -0
44 lines not on this page · raw message
board/ti/am335x/mux_mini.c new file +109 -0
109 lines not on this page · raw message
configs/am335x_evm_mini_defconfig new file +42 -0
42 lines not on this page · raw message
configs/am335x_hs_evm_mini_defconfig new file +46 -0
46 lines not on this page · raw message
include/configs/am335x_evm_mini.h new file +96 -0
96 lines not on this page · raw message
Signature · 1 line
2.25.1
... trimming the CC list.
Quoted 13 lines · Amjad Ouled-Ameur
From: Andreas Dannenberg <[email protected]>
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.
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.
Quoted 3 lines
Signed-off-by Andreas Dannenberg <[email protected]>[Amjad: fix checkpatch and compile warnings]Signed-off-by Amjad Ouled-Ameur <[email protected]>
There's a few problems here, and I say this as someone who is doing the "mini" version for J721e/etc. First:
arch/arm/dts/am335x-evm-mini.dts
Quoted 5 lines
arch/arm/dts/am335x-evm-mini.dts new file +0
-0
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.
Quoted 27 lines
arch/arm/mach-omap2/am33xx/Kconfig +19
-0@@ -63,6 +63,36 @@ config TARGET_AM335X_EVM to write software and develop hardware around an AM335x processor subsystem. +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
arch/arm/mach-omap2/am33xx/Kconfig config TARGET_AM335X_EVM · line 94
Quoted 10 lines
arch/arm/mach-omap2/am33xx/Kconfig +10
-0+ 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.
Quoted 15 lines
board/ti/am335x/board_hs_mini.h new file +9
-0@@ -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.com/ +*/ + +#ifndef _BOARD_HS_H_
board/ti/am335x/board_hs_mini.h line 19
Quoted 10 lines
board/ti/am335x/board_hs_mini.h new file +10
-0+#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.
Quoted 29 lines
board/ti/am335x/board_mini.c new file +23
-0@@ -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.com/ +*/ + +#include <common.h> +#include <dm.h> +#include <env.h> +#include <errno.h> +#include <init.h> +#include <spl.h> +#include <serial.h> +#include <asm/arch/cpu.h> +#include <asm/arch/hardware.h> +#include <asm/arch/omap.h> +#include <asm/arch/ddr_defs.h> +#include <asm/arch/clock.h> +#include <asm/arch/mmc_host_def.h> +#include <asm/arch/sys_proto.h> +#include <asm/arch/mem.h> +#include <asm/io.h>
board/ti/am335x/board_mini.c line 33
Quoted 10 lines
board/ti/am335x/board_mini.c new file +10
-0+#include <asm/emif.h> +#include <asm/omap_common.h> +#include <asm/omap_sec_common.h> +#include <asm/omap_mmc.h> +#include <i2c.h> +#include <power/tps65910.h> +#include <env_internal.h> +#include <watchdog.h> +#include "board_mini.h" +#include "board_hs_mini.h"
Check if we really need all of those includes still.
[snip]
Quoted 50 lines
board/ti/am335x/board_mini.c new file +50
-0+const struct dpll_params *get_dpll_mpu_params (void ) +{ +int ind =get_sys_clk_index (); +int freq =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 =readl (&cdev->deviceid) >>28 ; + mpu_vdd =am335x_get_tps65910_mpu_vdd (sil_rev, freq); + +/* Tell the TPS65910 to use i2c */
board/ti/am335x/board_mini.c line 140
Quoted 10 lines
board/ti/am335x/board_mini.c new file +10
-0+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.
Quoted 5 lines
board/ti/am335x/board_mini.c new file +5
-0+void set_uart_mux_conf (void ) +{ +if (CONFIG_CONS_INDEX ==1 ) +enable_uart0_pin_mux (); +else if (CONFIG_CONS_INDEX ==2 )
board/ti/am335x/board_mini.c line 179
Quoted 10 lines
board/ti/am335x/board_mini.c new file +10
-0+enable_uart1_pin_mux (); + else if (CONFIG_CONS_INDEX == 3) + enable_uart2_pin_mux(); + else if (CONFIG_CONS_INDEX == 4) + enable_uart3_pin_mux(); + else if (CONFIG_CONS_INDEX == 5) + enable_uart4_pin_mux(); + else if (CONFIG_CONS_INDEX == 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".
Quoted 5 lines
board/ti/am335x/board_mini.c new file +5
-0+int board_late_init (void ) +{ +if (IS_ENABLED (CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG )) { +env_set ("board_name" ,CONFIG_SYS_BOARD ); +
board/ti/am335x/board_mini.c line 230
Quoted 10 lines
board/ti/am335x/board_mini.c new file +10
-0+/* +* Default FIT boot on HS devices. Non FIT images are not allowed +* on HS devices. +*/ +if (get_device_type () ==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.
Quoted 18 lines
board/ti/am335x/board_mini.h new file +12
-0@@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Mini AM335x boards information header +* +* Copyright (C) 2020, Texas Instruments, Incorporated - http://www.ti.com/ +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/** +* AM335X (EMIF_4D) EMIF REG_COS_COUNT_1, REG_COS_COUNT_2, and
board/ti/am335x/board_mini.h line 22
Quoted 10 lines
board/ti/am335x/board_mini.h new file +10
-0+* 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.
Quoted 105 lines
board/ti/am335x/mux_mini.c new file +99
-0@@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ +*/ + +#include <common.h> +#include <asm/arch/sys_proto.h> +#include <asm/arch/hardware.h> +#include <asm/arch/mux.h> +#include <asm/io.h> +#include <i2c.h> +#include "board_mini.h" + +static struct module_pin_mux uart0_pin_mux[] = { + {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[] = { + {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[] = { + {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[] = { + {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[] = { + {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[] = { + {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[] = { + {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[] = { + {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); +} +
board/ti/am335x/mux_mini.c line 109
Quoted 10 lines
board/ti/am335x/mux_mini.c new file +10
-0+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.
Quoted 38 lines
configs/am335x_evm_mini_defconfig new file +32
-0@@ -0,0 +1,42 @@ +CONFIG_ARM=y +CONFIG_ARCH_CPU_INIT=y +CONFIG_ARCH_OMAP2PLUS=y +CONFIG_TI_COMMON_CMD_OPTIONS=y +CONFIG_DEFAULT_DEVICE_TREE="am335x-evm-mini" +CONFIG_AM33XX=y +CONFIG_TARGET_AM335X_EVM_MINI=y +CONFIG_SPL=y +CONFIG_DISTRO_DEFAULTS=y +CONFIG_ANDROID_BOOT_IMAGE=y +CONFIG_SPL_LOAD_FIT=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_BOOTCOMMAND="if test ${boot_fit} -eq 1; then run update_to_fit; fi; run findfdt; run init_console; run envboot; run distro_bootcmd" +CONFIG_LOGLEVEL=3 +CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_ARCH_MISC_INIT=y +CONFIG_SPL_FIT_IMAGE_TINY=y +# CONFIG_SPL_FS_EXT4 is not set +CONFIG_SPL_I2C=y +# CONFIG_SPL_NAND_SUPPORT is not set +CONFIG_SPL_POWER=y +# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set +CONFIG_CMD_SPL=y +# CONFIG_CMD_EEPROM is not set +# CONFIG_CMD_SETEXPR is not set +# CONFIG_SPL_EFI_PARTITION is not set +CONFIG_OF_CONTROL=y +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_SPL_ENV_IS_NOWHERE=y +CONFIG_VERSION_VARIABLE=y +# CONFIG_NET is not set
configs/am335x_evm_mini_defconfig line 42
Quoted 10 lines
configs/am335x_evm_mini_defconfig new file +10
-0+CONFIG_DM_I2C=y +CONFIG_MISC=y +# CONFIG_MMC_HW_PARTITIONING is not set +CONFIG_MMC_OMAP_HS=y +CONFIG_TIMER=y +CONFIG_OMAP_TIMER=y +CONFIG_DYNAMIC_CRC_TABLE=y +CONFIG_RSA=y +CONFIG_LZO=y +# 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.
Quoted 10 lines
include/configs/am335x_evm_mini.h new file +4
-0@@ -0,0 +1,96 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2020 Texas Instruments Incorporated - http://www.ti.com/ +*/
include/configs/am335x_evm_mini.h line 14
Quoted 10 lines
include/configs/am335x_evm_mini.h new file +10
-0+ +#ifndef __CONFIG_AM335X_EVM_MINI_H +#define __CONFIG_AM335X_EVM_MINI_H + +#include <configs/ti_am335x_common.h> +#include <linux/sizes.h> + +#ifndef CONFIG_SPL_BUILD +# define CONFIG_TIMESTAMP +#endif
You cannot guard options with SPL_BUILD.
include/configs/am335x_evm_mini.h line 18
Quoted 3 lines
include/configs/am335x_evm_mini.h new file +3
-0+#define CONFIG_SYS_BOOTM_LEN SZ_16M + +#define CONFIG_MACH_TYPE MACH_TYPE_AM335XEVM
This isn't going to boot a non-DT kernel.
Quoted 9 lines
include/configs/am335x_evm_mini.h new file +9
-0+ +/* 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 "=" \ + "setenv mmcdev " #instance "; "\ + "setenv bootpart " #instance ":2 ; "\
include/configs/am335x_evm_mini.h line 37
Quoted 10 lines
include/configs/am335x_evm_mini.h new file +10
-0+ "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 <config_distro_bootcmd.h>
No legacy boot, distro only. Which means..
Quoted 25 lines
include/configs/am335x_evm_mini.h new file +25
-0+#ifndef CONFIG_SPL_BUILD +#include <environment/ti/mmc.h> + +#define CONFIG_EXTRA_ENV_SETTINGS \ + DEFAULT_LINUX_BOOT_ENV \ + DEFAULT_MMC_TI_ARGS \ + DEFAULT_FIT_TI_ARGS \ + "bootpart=0:2\0" \ + "bootdir=/boot\0" \ + "bootfile=zImage\0" \ + "fdtfile=undefined\0" \ + "console=ttyS0,115200n8\0" \ + "partitions=" \ + "uuid_disk=${uuid_gpt_disk};" \ + "name=bootloader,start=384K,size=1792K," \ + "uuid=${uuid_gpt_bootloader};" \ + "name=rootfs,start=2688K,size=-,uuid=${uuid_gpt_rootfs}\0" \ + "optargs=\0" \ + "ramroot=/dev/ram0 rw\0" \ + "ramrootfstype=ext2\0" \ + "ramargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "root=${ramroot} " \ + "rootfstype=${ramrootfstype}\0" \ + "loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \
include/configs/am335x_evm_mini.h line 73
Quoted 10 lines
include/configs/am335x_evm_mini.h new file +10
-0+"ramboot=echo Booting from ramdisk ...; " \ +"run ramargs; " \ +"bootz ${loadaddr} ${rdaddr} ${fdtaddr}\0" \ +"default_device_tree=am335x-evm.dtb\0" \ +"findfdt=" \ +"setenv name_fdt ${default_device_tree};" \ +"setenv fdtfile ${name_fdt}\0" \ +"init_console=" \ +"setenv console ttyS0,115200n8\0" \ +BOOTENV
Clean this up.
Quoted 11 lines
include/configs/am335x_evm_mini.h new file +11
-0+#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 */
include/configs/am335x_evm_mini.h line 94
Quoted 10 lines
include/configs/am335x_evm_mini.h new file +10
-0+#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.
Signature · 1 line
Tom