Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
Hello Andrew, All, Le 17/11/2023 à 19:43, Andrew Davis a écrit : > On 11/17/23 8:27 AM, Romain Naour wrote: >> Hello Andrew, All, >> >> Le 03/11/2023 à 20:20, Andrew Davis a écrit : >>> On 11/3/23 2:06 PM, Nishanth Menon wrote: On 13:51-20231103, Andrew Davis wrote: > On 11/2/23 7:38 PM, Nishanth Menon wrote: >> Add defconfig fragments for J721E based BeagleBone AI-64 and >> corresponding customized environment. >> >> Signed-off-by: Nishanth Menon >> --- >> board/ti/j721e/beagleboneai64.env | 19 >> board/ti/j721e/beagleboneai64_a72.config | 55 >> >> board/ti/j721e/beagleboneai64_r5.config | 19 > > Beagle boards are not TI boards, add the board support to board/beagle/ Huh, why bring in commercials and organization changes here? am335x and am62 are under the TI umbrella. >>> >>> The SoCs used are yes, the boards are not, we only make our EVM/SK >>> line of boards in house. >>> >>> We did AM335x wrong, in board/ti/am335x/board.c we tried to support >>> like 11 different boards in one file. And while it might have made adding >>> our own extra EVMs easier, it only made things less clear for folks trying >>> to add their own AM335x based boards[0]. >>> >>> We don't integrate support for any other board partner like this. Our >>> friends over at Toradex or Phytec are currently upstreaming boards based >>> on K3 SoCs and in doing so have shown us some areas we can improve. >>> >>> We focus on these little short-cuts to make adding our EVMs (or boards >>> that look like our EVMs) easy. But that only leads to extra work and >>> code duplication for external boards. >>> >>> If something is actually common to the SoC then lets move it to >>> arch/arm/mach-k3/j721e. Tricks like board-variants.c only hide the >>> issue and doesn't help folks wanting to add their boards based on our >>> SoCs to their board// directory. >> >> I'm starting a new custom board bring-up based on a j721e SoC (without any >> SOM) >> and adding a now board variant from the u-boot provided in the TI SDK (based >> on >> 2023.04) is far from easy for the reasons mentioned above (extra work and >> code >> duplication for external boards). >> >> Also the build break for j7200/j721e SoC as soon as >> CONFIG_TARGET_J721E_A72_EVM >> and CONFIG_TARGET_J7200_A72_EVM are undefined: >> > > The issue is we didn't properly split J7200 support from J721e and now that > there are differences between the two, the only way we have to check which > is which is to check the TARGET board, not the SOC (as there is no > SOC_K3_J7200, > but we are working on that [0]). So currently adding new J721E/J7200 TARGET > boards breaks things :( Ok, I understand. > >> https://source.denx.de/u-boot/u-boot/-/blob/v2023.10/arch/arm/mach-k3/arm64-mmu.c?ref_type=tags#L71 >> >> I always wonder if I should work on top of EVMs board or create a new >> board// directory for customer boards. >> > > New board// would be preferred, we do things in our EVM board/ti/ > dir that are specific to our EVMs, and there will be more churn, etc.. Ok, maybe I'll work on top of the EVM board support for the first try and create a new board// while cleaning for the final release. > > If adding a new board// for our SoCs is difficult just let us know, > we are working several issues to make it more easy going forward and guiding > feedback always helps. Thanks, for now I only have the SK-TDA4VM board and I'll receive the customer board in several weeks. For now the main difficulty is to remove CONFIG_TARGET_J721E_{R6,A72}_EVM from the u-boot config file without breaking stuff. Also I'm wondering if yaml files in board/ti/j721e/*-cfg.yaml are generic enough to avoid to copy them to board//. (I'm not yet familiar with binman tool). Best regards, Romain > > Andrew > > [0] https://lore.kernel.org/all/20231106165044.xrmlxoyfbnkmpb5v@revolt/ > >> Best regards, >> Romain >> >>> >>> Andrew >>> >>> [0] See "Software Design" https://jaycarlson.net/embedded-linux/#am335x >>> $ git grep beagle board/|cut -d ':' -f1|sort -u board/ti/am335x/board.c board/ti/am335x/board.h board/ti/am57xx/board.c board/ti/am62x/beagleplay_a53.config board/ti/am62x/beagleplay_r5.config board/ti/am62x/MAINTAINERS board/ti/beagle/beagle.c board/ti/beagle/Kconfig board/ti/beagle/led.c board/ti/beagle/MAINTAINERS board/ti/beagle/Makefile board/ti/j721e/beagleboneai64_a72.config board/ti/j721e/beagleboneai64_r5.config board/ti/j721e/MAINTAINERS board/timll/devkit8000/README >>
Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
On 11/17/23 8:27 AM, Romain Naour wrote: Hello Andrew, All, Le 03/11/2023 à 20:20, Andrew Davis a écrit : On 11/3/23 2:06 PM, Nishanth Menon wrote: On 13:51-20231103, Andrew Davis wrote: On 11/2/23 7:38 PM, Nishanth Menon wrote: Add defconfig fragments for J721E based BeagleBone AI-64 and corresponding customized environment. Signed-off-by: Nishanth Menon --- board/ti/j721e/beagleboneai64.env | 19 board/ti/j721e/beagleboneai64_a72.config | 55 board/ti/j721e/beagleboneai64_r5.config | 19 Beagle boards are not TI boards, add the board support to board/beagle/ Huh, why bring in commercials and organization changes here? am335x and am62 are under the TI umbrella. The SoCs used are yes, the boards are not, we only make our EVM/SK line of boards in house. We did AM335x wrong, in board/ti/am335x/board.c we tried to support like 11 different boards in one file. And while it might have made adding our own extra EVMs easier, it only made things less clear for folks trying to add their own AM335x based boards[0]. We don't integrate support for any other board partner like this. Our friends over at Toradex or Phytec are currently upstreaming boards based on K3 SoCs and in doing so have shown us some areas we can improve. We focus on these little short-cuts to make adding our EVMs (or boards that look like our EVMs) easy. But that only leads to extra work and code duplication for external boards. If something is actually common to the SoC then lets move it to arch/arm/mach-k3/j721e. Tricks like board-variants.c only hide the issue and doesn't help folks wanting to add their boards based on our SoCs to their board// directory. I'm starting a new custom board bring-up based on a j721e SoC (without any SOM) and adding a now board variant from the u-boot provided in the TI SDK (based on 2023.04) is far from easy for the reasons mentioned above (extra work and code duplication for external boards). Also the build break for j7200/j721e SoC as soon as CONFIG_TARGET_J721E_A72_EVM and CONFIG_TARGET_J7200_A72_EVM are undefined: The issue is we didn't properly split J7200 support from J721e and now that there are differences between the two, the only way we have to check which is which is to check the TARGET board, not the SOC (as there is no SOC_K3_J7200, but we are working on that [0]). So currently adding new J721E/J7200 TARGET boards breaks things :( https://source.denx.de/u-boot/u-boot/-/blob/v2023.10/arch/arm/mach-k3/arm64-mmu.c?ref_type=tags#L71 I always wonder if I should work on top of EVMs board or create a new board// directory for customer boards. New board// would be preferred, we do things in our EVM board/ti/ dir that are specific to our EVMs, and there will be more churn, etc.. If adding a new board// for our SoCs is difficult just let us know, we are working several issues to make it more easy going forward and guiding feedback always helps. Andrew [0] https://lore.kernel.org/all/20231106165044.xrmlxoyfbnkmpb5v@revolt/ Best regards, Romain Andrew [0] See "Software Design" https://jaycarlson.net/embedded-linux/#am335x $ git grep beagle board/|cut -d ':' -f1|sort -u board/ti/am335x/board.c board/ti/am335x/board.h board/ti/am57xx/board.c board/ti/am62x/beagleplay_a53.config board/ti/am62x/beagleplay_r5.config board/ti/am62x/MAINTAINERS board/ti/beagle/beagle.c board/ti/beagle/Kconfig board/ti/beagle/led.c board/ti/beagle/MAINTAINERS board/ti/beagle/Makefile board/ti/j721e/beagleboneai64_a72.config board/ti/j721e/beagleboneai64_r5.config board/ti/j721e/MAINTAINERS board/timll/devkit8000/README
Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
Hello Andrew, All, Le 03/11/2023 à 20:20, Andrew Davis a écrit : > On 11/3/23 2:06 PM, Nishanth Menon wrote: >> On 13:51-20231103, Andrew Davis wrote: >>> On 11/2/23 7:38 PM, Nishanth Menon wrote: Add defconfig fragments for J721E based BeagleBone AI-64 and corresponding customized environment. Signed-off-by: Nishanth Menon --- board/ti/j721e/beagleboneai64.env | 19 board/ti/j721e/beagleboneai64_a72.config | 55 board/ti/j721e/beagleboneai64_r5.config | 19 >>> >>> Beagle boards are not TI boards, add the board support to board/beagle/ >> >> Huh, why bring in commercials and organization changes here? am335x >> and am62 are under the TI umbrella. >> > > The SoCs used are yes, the boards are not, we only make our EVM/SK > line of boards in house. > > We did AM335x wrong, in board/ti/am335x/board.c we tried to support > like 11 different boards in one file. And while it might have made adding > our own extra EVMs easier, it only made things less clear for folks trying > to add their own AM335x based boards[0]. > > We don't integrate support for any other board partner like this. Our > friends over at Toradex or Phytec are currently upstreaming boards based > on K3 SoCs and in doing so have shown us some areas we can improve. > > We focus on these little short-cuts to make adding our EVMs (or boards > that look like our EVMs) easy. But that only leads to extra work and > code duplication for external boards. > > If something is actually common to the SoC then lets move it to > arch/arm/mach-k3/j721e. Tricks like board-variants.c only hide the > issue and doesn't help folks wanting to add their boards based on our > SoCs to their board// directory. I'm starting a new custom board bring-up based on a j721e SoC (without any SOM) and adding a now board variant from the u-boot provided in the TI SDK (based on 2023.04) is far from easy for the reasons mentioned above (extra work and code duplication for external boards). Also the build break for j7200/j721e SoC as soon as CONFIG_TARGET_J721E_A72_EVM and CONFIG_TARGET_J7200_A72_EVM are undefined: https://source.denx.de/u-boot/u-boot/-/blob/v2023.10/arch/arm/mach-k3/arm64-mmu.c?ref_type=tags#L71 I always wonder if I should work on top of EVMs board or create a new board// directory for customer boards. Best regards, Romain > > Andrew > > [0] See "Software Design" https://jaycarlson.net/embedded-linux/#am335x > >> $ git grep beagle board/|cut -d ':' -f1|sort -u >> board/ti/am335x/board.c >> board/ti/am335x/board.h >> board/ti/am57xx/board.c >> board/ti/am62x/beagleplay_a53.config >> board/ti/am62x/beagleplay_r5.config >> board/ti/am62x/MAINTAINERS >> board/ti/beagle/beagle.c >> board/ti/beagle/Kconfig >> board/ti/beagle/led.c >> board/ti/beagle/MAINTAINERS >> board/ti/beagle/Makefile >> board/ti/j721e/beagleboneai64_a72.config >> board/ti/j721e/beagleboneai64_r5.config >> board/ti/j721e/MAINTAINERS >> board/timll/devkit8000/README >>
Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
On 16:20-20231103, Tom Rini wrote: > On Fri, Nov 03, 2023 at 02:06:29PM -0500, Nishanth Menon wrote: > > On 13:51-20231103, Andrew Davis wrote: > > > On 11/2/23 7:38 PM, Nishanth Menon wrote: > > > > Add defconfig fragments for J721E based BeagleBone AI-64 and > > > > corresponding customized environment. > > > > > > > > Signed-off-by: Nishanth Menon > > > > --- > > > > board/ti/j721e/beagleboneai64.env| 19 > > > > board/ti/j721e/beagleboneai64_a72.config | 55 > > > > board/ti/j721e/beagleboneai64_r5.config | 19 > > > > > > Beagle boards are not TI boards, add the board support to board/beagle/ > > > > Huh, why bring in commercials and organization changes here? am335x > > and am62 are under the TI umbrella. > > > > $ git grep beagle board/|cut -d ':' -f1|sort -u > > board/ti/am335x/board.c > > board/ti/am335x/board.h > > board/ti/am57xx/board.c > > board/ti/am62x/beagleplay_a53.config > > board/ti/am62x/beagleplay_r5.config > > board/ti/am62x/MAINTAINERS > > board/ti/beagle/beagle.c > > board/ti/beagle/Kconfig > > board/ti/beagle/led.c > > board/ti/beagle/MAINTAINERS > > board/ti/beagle/Makefile > > board/ti/j721e/beagleboneai64_a72.config > > board/ti/j721e/beagleboneai64_r5.config > > board/ti/j721e/MAINTAINERS > > board/timll/devkit8000/README > > So, yeah, we've been bad about this historically for a few kinds of > reasons, but it makes more sense now to have board/beagle/{x,y,z} than > it does to have board/ti/... for these platforms. OK. I will respin. -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
On Fri, Nov 03, 2023 at 02:06:29PM -0500, Nishanth Menon wrote: > On 13:51-20231103, Andrew Davis wrote: > > On 11/2/23 7:38 PM, Nishanth Menon wrote: > > > Add defconfig fragments for J721E based BeagleBone AI-64 and > > > corresponding customized environment. > > > > > > Signed-off-by: Nishanth Menon > > > --- > > > board/ti/j721e/beagleboneai64.env| 19 > > > board/ti/j721e/beagleboneai64_a72.config | 55 > > > board/ti/j721e/beagleboneai64_r5.config | 19 > > > > Beagle boards are not TI boards, add the board support to board/beagle/ > > Huh, why bring in commercials and organization changes here? am335x > and am62 are under the TI umbrella. > > $ git grep beagle board/|cut -d ':' -f1|sort -u > board/ti/am335x/board.c > board/ti/am335x/board.h > board/ti/am57xx/board.c > board/ti/am62x/beagleplay_a53.config > board/ti/am62x/beagleplay_r5.config > board/ti/am62x/MAINTAINERS > board/ti/beagle/beagle.c > board/ti/beagle/Kconfig > board/ti/beagle/led.c > board/ti/beagle/MAINTAINERS > board/ti/beagle/Makefile > board/ti/j721e/beagleboneai64_a72.config > board/ti/j721e/beagleboneai64_r5.config > board/ti/j721e/MAINTAINERS > board/timll/devkit8000/README So, yeah, we've been bad about this historically for a few kinds of reasons, but it makes more sense now to have board/beagle/{x,y,z} than it does to have board/ti/... for these platforms. -- Tom signature.asc Description: PGP signature
Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
On 11/3/23 2:06 PM, Nishanth Menon wrote: On 13:51-20231103, Andrew Davis wrote: On 11/2/23 7:38 PM, Nishanth Menon wrote: Add defconfig fragments for J721E based BeagleBone AI-64 and corresponding customized environment. Signed-off-by: Nishanth Menon --- board/ti/j721e/beagleboneai64.env| 19 board/ti/j721e/beagleboneai64_a72.config | 55 board/ti/j721e/beagleboneai64_r5.config | 19 Beagle boards are not TI boards, add the board support to board/beagle/ Huh, why bring in commercials and organization changes here? am335x and am62 are under the TI umbrella. The SoCs used are yes, the boards are not, we only make our EVM/SK line of boards in house. We did AM335x wrong, in board/ti/am335x/board.c we tried to support like 11 different boards in one file. And while it might have made adding our own extra EVMs easier, it only made things less clear for folks trying to add their own AM335x based boards[0]. We don't integrate support for any other board partner like this. Our friends over at Toradex or Phytec are currently upstreaming boards based on K3 SoCs and in doing so have shown us some areas we can improve. We focus on these little short-cuts to make adding our EVMs (or boards that look like our EVMs) easy. But that only leads to extra work and code duplication for external boards. If something is actually common to the SoC then lets move it to arch/arm/mach-k3/j721e. Tricks like board-variants.c only hide the issue and doesn't help folks wanting to add their boards based on our SoCs to their board// directory. Andrew [0] See "Software Design" https://jaycarlson.net/embedded-linux/#am335x $ git grep beagle board/|cut -d ':' -f1|sort -u board/ti/am335x/board.c board/ti/am335x/board.h board/ti/am57xx/board.c board/ti/am62x/beagleplay_a53.config board/ti/am62x/beagleplay_r5.config board/ti/am62x/MAINTAINERS board/ti/beagle/beagle.c board/ti/beagle/Kconfig board/ti/beagle/led.c board/ti/beagle/MAINTAINERS board/ti/beagle/Makefile board/ti/j721e/beagleboneai64_a72.config board/ti/j721e/beagleboneai64_r5.config board/ti/j721e/MAINTAINERS board/timll/devkit8000/README
Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
On 13:51-20231103, Andrew Davis wrote: > On 11/2/23 7:38 PM, Nishanth Menon wrote: > > Add defconfig fragments for J721E based BeagleBone AI-64 and > > corresponding customized environment. > > > > Signed-off-by: Nishanth Menon > > --- > > board/ti/j721e/beagleboneai64.env| 19 > > board/ti/j721e/beagleboneai64_a72.config | 55 > > board/ti/j721e/beagleboneai64_r5.config | 19 > > Beagle boards are not TI boards, add the board support to board/beagle/ Huh, why bring in commercials and organization changes here? am335x and am62 are under the TI umbrella. $ git grep beagle board/|cut -d ':' -f1|sort -u board/ti/am335x/board.c board/ti/am335x/board.h board/ti/am57xx/board.c board/ti/am62x/beagleplay_a53.config board/ti/am62x/beagleplay_r5.config board/ti/am62x/MAINTAINERS board/ti/beagle/beagle.c board/ti/beagle/Kconfig board/ti/beagle/led.c board/ti/beagle/MAINTAINERS board/ti/beagle/Makefile board/ti/j721e/beagleboneai64_a72.config board/ti/j721e/beagleboneai64_r5.config board/ti/j721e/MAINTAINERS board/timll/devkit8000/README -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 14/15] board: ti: Add j721e_beagleboneai64_* config fragments and env file
On 11/2/23 7:38 PM, Nishanth Menon wrote: Add defconfig fragments for J721E based BeagleBone AI-64 and corresponding customized environment. Signed-off-by: Nishanth Menon --- board/ti/j721e/beagleboneai64.env| 19 board/ti/j721e/beagleboneai64_a72.config | 55 board/ti/j721e/beagleboneai64_r5.config | 19 Beagle boards are not TI boards, add the board support to board/beagle/ Andrew 3 files changed, 93 insertions(+) create mode 100644 board/ti/j721e/beagleboneai64.env create mode 100644 board/ti/j721e/beagleboneai64_a72.config create mode 100644 board/ti/j721e/beagleboneai64_r5.config diff --git a/board/ti/j721e/beagleboneai64.env b/board/ti/j721e/beagleboneai64.env new file mode 100644 index ..4f0a94a8113e --- /dev/null +++ b/board/ti/j721e/beagleboneai64.env @@ -0,0 +1,19 @@ +#include +#include +#include + +name_kern=Image +console=ttyS2,115200n8 +args_all=setenv optargs ${optargs} earlycon=ns16550a,mmio32,0x0280 +run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} +set_led_state_fail_load= led led-0 off; led led-1 on; + led led-2 off; led led-3 on; led led-4 off +set_led_state_start_load=led led-0 on; led led-1 off; + led led-2 on; led led-3 off; led led-4 on +boot=mmc +mmcdev=1 +bootpart=1:1 +bootdir=/boot +boot_targets=mmc1 mmc0 usb pxe +bootmeths=script extlinux efi pxe +rd_spec=- diff --git a/board/ti/j721e/beagleboneai64_a72.config b/board/ti/j721e/beagleboneai64_a72.config new file mode 100644 index ..926f725508e5 --- /dev/null +++ b/board/ti/j721e/beagleboneai64_a72.config @@ -0,0 +1,55 @@ +# Defconfig fragment to apply on top of j721e_evm_a72_defconfig + +CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-beagleboneai64" +CONFIG_SPL_OF_LIST="k3-j721e-beagleboneai64" +CONFIG_OF_LIST="k3-j721e-beagleboneai64" +CONFIG_BOOTCOMMAND="run set_led_state_start_load;run findfdt; run envboot; bootflow scan -lb;run set_led_state_fail_load" +CONFIG_EXT4_WRITE=y +CONFIG_LZO=y +CONFIG_AUTOBOOT_KEYED=y +CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n" +CONFIG_AUTOBOOT_DELAY_STR="d" +CONFIG_AUTOBOOT_STOP_STR=" " + +# No Flash +CONFIG_HBMC_AM654=n +CONFIG_UFS=n + +# Sierra disabled for now till stability +CONFIG_PHY_CADENCE_SIERRA=n +CONFIG_PHY_J721E_WIZ=n +# Torrent only for DP. no DP splash screen +CONFIG_PHY_CADENCE_TORRENT=n + +# Use the Beaglebone-AI64 env file +CONFIG_ENV_SOURCE_FILE="beagleboneai64" +# No dependency on EEPROM detection +CONFIG_TI_I2C_BOARD_DETECT=n +# No board fixup to do +CONFIG_OF_BOARD_SETUP=n + +# Do not use emmc boot - use FS only +CONFIG_SUPPORT_EMMC_BOOT=n +CONFIG_MMC_IO_VOLTAGE=y +# CONFIG_SPL_MMC_IO_VOLTAGE is not set +CONFIG_MMC_UHS_SUPPORT=y +# CONFIG_SPL_MMC_UHS_SUPPORT is not set +CONFIG_MMC_HS200_SUPPORT=y +# CONFIG_SPL_MMC_HS200_SUPPORT is not set + +# Enable GPIO control +CONFIG_DM_GPIO=y +CONFIG_SPL_GPIO=y +CONFIG_DA8XX_GPIO=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_GPIO_READ=y +# Enable LEDs +CONFIG_LED=y +CONFIG_LED_GPIO=y +CONFIG_SPL_LED=y +CONFIG_SPL_LED_GPIO=y +# Enable I2C bus +CONFIG_SPL_I2C=y +CONFIG_DM_I2C=y +CONFIG_SYS_I2C_OMAP24XX=y +CONFIG_CMD_I2C=y diff --git a/board/ti/j721e/beagleboneai64_r5.config b/board/ti/j721e/beagleboneai64_r5.config new file mode 100644 index ..cf124fb70cf1 --- /dev/null +++ b/board/ti/j721e/beagleboneai64_r5.config @@ -0,0 +1,19 @@ +# Defconfig fragment to apply on top of: +# j721e_evm_r5_defconfig + +CONFIG_DEFAULT_DEVICE_TREE="k3-j721e-r5-beagleboneai64" +CONFIG_SPL_OF_LIST="k3-j721e-r5-beagleboneai64" + +# No ESM, PMIC or AVS adjustment till PMIC is enabled +CONFIG_ESM_K3=n +CONFIG_K3_AVS0=n +CONFIG_ESM_PMIC=n + +# Do not use emmc boot - we will use FS only +CONFIG_SUPPORT_EMMC_BOOT=n + +CONFIG_HBMC_AM654=n +# No dependency on EEPROM detection +CONFIG_TI_I2C_BOARD_DETECT=n +# No board fixup to do +CONFIG_OF_BOARD_SETUP=n