From patchwork Sat Sep 11 12:57:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1526723 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H6CTk6kXvz9sVw for ; Sat, 11 Sep 2021 22:58:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 462E6837D4; Sat, 11 Sep 2021 14:58:07 +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 Received: by phobos.denx.de (Postfix, from userid 109) id 5CE6D837AC; Sat, 11 Sep 2021 14:57:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) (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 C5481837B2 for ; Sat, 11 Sep 2021 14:57:39 +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=tom.rini@gmail.com Received: by mail-qk1-f182.google.com with SMTP id a66so5223259qkc.1 for ; Sat, 11 Sep 2021 05:57:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id; bh=z5b5znO6f/EtVQno0QRWqnOtc+0Mu9Ga2G18iCk5COE=; b=HI0FLMNW/dsIMSDyuADmm1XX++hjwgO6vyewHwNoczPgVXo2UxIDciNWm6R1x2hTt1 Rl05kLYHDCtuCWgbPDzqJ9TWngc6n1ZYVeIXlc3e5qiNWRAM4AVwX4gl13hVExTkS31r 0G03z7n0ctRMShIJaUMMNSdxQfFIVosIZGUcX6SrnSfUXuU8/VIiWBl8Rbbi1jMocBbE EwuuKU7JiRwa7YI1tMSZrLu0KpTyNi8Qwua83t7BxkND9ZFdlMtaLxqwMNW0ppnSc4Tc fSm/bm1QgzesjWkK1nAy554sqmDuoL96ppy7eZWbR0lMVllyDTFOqcw34fY6CSf044Vj a8WA== X-Gm-Message-State: AOAM533rxXqgJmfDQr/AX2qRlNYLec4nWvDi62N+A3dgYQiklXlxzGjc +VCGIWFFM5qS+ZdCfpbYIvoVIOyINQ== X-Google-Smtp-Source: ABdhPJyV1d7+Vt7grD90WOxB0VDJf90P+zlZADdKTHk4SgLU0xICO1PAoCxaPIQxw+wdPOq5ZdezuQ== X-Received: by 2002:a05:620a:789:: with SMTP id 9mr1939585qka.400.1631365057625; Sat, 11 Sep 2021 05:57:37 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-61ce-ecd7-97d2-3518.res6.spectrum.com. [2603:6081:7b01:cbda:61ce:ecd7:97d2:3518]) by smtp.gmail.com with ESMTPSA id p187sm1144368qkd.101.2021.09.11.05.57.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 05:57:36 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 1/3] doc: ti: Convert am335x_evm README to rST Date: Sat, 11 Sep 2021 08:57:31 -0400 Message-Id: <20210911125733.21232-1-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 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 Convert the existing documentation to rST, keeping to just making formatting changes to start with. Signed-off-by: Tom Rini --- .../README => doc/board/ti/am335x_evm.rst | 150 ++++++++++-------- doc/board/ti/index.rst | 1 + 2 files changed, 87 insertions(+), 64 deletions(-) rename board/ti/am335x/README => doc/board/ti/am335x_evm.rst (67%) diff --git a/board/ti/am335x/README b/doc/board/ti/am335x_evm.rst similarity index 67% rename from board/ti/am335x/README rename to doc/board/ti/am335x_evm.rst index 19e0eccbac93..51c11a3e51f8 100644 --- a/board/ti/am335x/README +++ b/doc/board/ti/am335x_evm.rst @@ -1,3 +1,6 @@ +.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause +.. sectionauthor:: Tom Rini + Summary ======= @@ -5,17 +8,17 @@ This document covers various features of the 'am335x_evm' build, and some of the related build targets (am335x_evm_uartN, etc). Hardware -======== +-------- The binary produced by this board supports, based on parsing of the EEPROM documented in TI's reference designs: -- AM335x GP EVM -- AM335x EVM SK -- Beaglebone White -- Beaglebone Black +* AM335x GP EVM +* AM335x EVM SK +* Beaglebone White +* Beaglebone Black Customization -============= +------------- Given that all of the above boards are reference platforms (and the Beaglebone platforms are OSHA), it is likely that this platform code and @@ -24,12 +27,12 @@ worth noting that aside from things such as NAND or MMC only being required if a custom platform makes use of these blocks, the following are required, depending on design: -- GPIO is only required if DDR3 power is controlled in a way similar to - EVM SK -- SPI is only required for SPI flash, or exposing the SPI bus. +* GPIO is only required if DDR3 power is controlled in a way similar to EVM SK +* SPI is only required for SPI flash, or exposing the SPI bus. The following blocks are required: -- I2C, to talk with the PMIC and ensure that we do not run afoul of + +* I2C, to talk with the PMIC and ensure that we do not run afoul of errata 1.0.24. When removing options as part of customization, @@ -41,7 +44,7 @@ the IP blocks, so both areas will need their choices updated to reflect the custom design. NAND -==== +---- The AM335x GP EVM ships with a 256MiB NAND available in most profiles. In this example to program the NAND we assume that an SD card has been @@ -58,6 +61,9 @@ Step-1: Building u-boot for NAND boot CONFIG_NAND_OMAP_ECCSCHEME (refer doc/README.nand) Step-2: Flashing NAND via MMC/SD + +.. code-block:: text + # select BOOTSEL to MMC/SD boot and boot from MMC/SD card U-Boot # mmc rescan # erase flash @@ -84,7 +90,7 @@ Step-3: Set BOOTSEL pin to select NAND boot, and POR the device. The device should boot from images flashed on NAND device. NOR -=== +--- The Beaglebone White can be equipped with a "memory cape" that in turn can have a NOR module plugged into it. In this case it is then possible to @@ -100,14 +106,16 @@ prepended. In the following example we use a size of 512KiB (0x80000) as that is how much space we set aside before the environment, as per the config file. -U-Boot # mmc rescan -U-Boot # load mmc 0 ${loadaddr} u-boot.bin -U-Boot # protect off 08000000 +80000 -U-Boot # erase 08000000 +80000 -U-Boot # cp.b ${loadaddr} 08000000 ${filesize} +.. code-block:: text + + U-Boot # mmc rescan + U-Boot # load mmc 0 ${loadaddr} u-boot.bin + U-Boot # protect off 08000000 +80000 + U-Boot # erase 08000000 +80000 + U-Boot # cp.b ${loadaddr} 08000000 ${filesize} Falcon Mode -=========== +----------- The default build includes "Falcon Mode" (see doc/README.falcon) via NAND, eMMC (or raw SD cards) and FAT SD cards. Our default behavior currently is @@ -119,18 +127,20 @@ boards with multiple boot methods, recovery should not be an issue in this worst-case however. Falcon Mode: eMMC -================= +----------------- The recommended layout in this case is: -MMC BLOCKS |--------------------------------| LOCATION IN BYTES -0x0000 - 0x007F : MBR or GPT table : 0x000000 - 0x020000 -0x0080 - 0x00FF : ARGS or FDT file : 0x010000 - 0x020000 -0x0100 - 0x01FF : SPL.backup1 (first copy used) : 0x020000 - 0x040000 -0x0200 - 0x02FF : SPL.backup2 (second copy used) : 0x040000 - 0x060000 -0x0300 - 0x06FF : U-Boot : 0x060000 - 0x0e0000 -0x0700 - 0x08FF : U-Boot Env + Redundant : 0x0e0000 - 0x120000 -0x0900 - 0x28FF : Kernel : 0x120000 - 0x520000 +.. code-block:: text + + MMC BLOCKS |--------------------------------| LOCATION IN BYTES + 0x0000 - 0x007F : MBR or GPT table : 0x000000 - 0x020000 + 0x0080 - 0x00FF : ARGS or FDT file : 0x010000 - 0x020000 + 0x0100 - 0x01FF : SPL.backup1 (first copy used) : 0x020000 - 0x040000 + 0x0200 - 0x02FF : SPL.backup2 (second copy used) : 0x040000 - 0x060000 + 0x0300 - 0x06FF : U-Boot : 0x060000 - 0x0e0000 + 0x0700 - 0x08FF : U-Boot Env + Redundant : 0x0e0000 - 0x120000 + 0x0900 - 0x28FF : Kernel : 0x120000 - 0x520000 Note that when we run 'spl export' it will prepare to boot the kernel. This includes relocation of the uImage from where we loaded it to the entry @@ -144,28 +154,30 @@ had a FAT partition (such as on a Beaglebone Black) it is not enough to write garbage into the area, you must delete it from the partition table first. -# Ensure we are able to talk with this mmc device -U-Boot # mmc rescan -U-Boot # tftp 81000000 am335x/MLO -# Write to two of the backup locations ROM uses -U-Boot # mmc write 81000000 100 100 -U-Boot # mmc write 81000000 200 100 -# Write U-Boot to the location set in the config -U-Boot # tftp 81000000 am335x/u-boot.img -U-Boot # mmc write 81000000 300 400 -# Load kernel and device tree into memory, perform export -U-Boot # tftp 81000000 am335x/uImage -U-Boot # run findfdt -U-Boot # tftp ${fdtaddr} am335x/${fdtfile} -U-Boot # run mmcargs -U-Boot # spl export fdt 81000000 - ${fdtaddr} -# Write the updated device tree to MMC -U-Boot # mmc write ${fdtaddr} 80 80 -# Write the uImage to MMC -U-Boot # mmc write 81000000 900 2000 +.. code-block:: text + + # Ensure we are able to talk with this mmc device + U-Boot # mmc rescan + U-Boot # tftp 81000000 am335x/MLO + # Write to two of the backup locations ROM uses + U-Boot # mmc write 81000000 100 100 + U-Boot # mmc write 81000000 200 100 + # Write U-Boot to the location set in the config + U-Boot # tftp 81000000 am335x/u-boot.img + U-Boot # mmc write 81000000 300 400 + # Load kernel and device tree into memory, perform export + U-Boot # tftp 81000000 am335x/uImage + U-Boot # run findfdt + U-Boot # tftp ${fdtaddr} am335x/${fdtfile} + U-Boot # run mmcargs + U-Boot # spl export fdt 81000000 - ${fdtaddr} + # Write the updated device tree to MMC + U-Boot # mmc write ${fdtaddr} 80 80 + # Write the uImage to MMC + U-Boot # mmc write 81000000 900 2000 Falcon Mode: FAT SD cards -========================= +------------------------- In this case the additional file is written to the filesystem. In this example we assume that the uImage and device tree to be used are already on @@ -173,23 +185,31 @@ the FAT filesystem (only the uImage MUST be for this to function afterwards) along with a Falcon Mode aware MLO and the FAT partition has already been created and marked bootable: -U-Boot # mmc rescan -# Load kernel and device tree into memory, perform export -U-Boot # load mmc 0:1 ${loadaddr} uImage -U-Boot # run findfdt -U-Boot # load mmc 0:1 ${fdtaddr} ${fdtfile} -U-Boot # run mmcargs -U-Boot # spl export fdt ${loadaddr} - ${fdtaddr} +.. code-block:: text + + U-Boot # mmc rescan + # Load kernel and device tree into memory, perform export + U-Boot # load mmc 0:1 ${loadaddr} uImage + U-Boot # run findfdt + U-Boot # load mmc 0:1 ${fdtaddr} ${fdtfile} + U-Boot # run mmcargs + U-Boot # spl export fdt ${loadaddr} - ${fdtaddr} This will print a number of lines and then end with something like: - Using Device Tree in place at 80f80000, end 80f85928 - Using Device Tree in place at 80f80000, end 80f88928 + +.. code-block:: text + + Using Device Tree in place at 80f80000, end 80f85928 + Using Device Tree in place at 80f80000, end 80f88928 + So then you: -U-Boot # fatwrite mmc 0:1 0x80f80000 args 8928 +.. code-block:: text + + U-Boot # fatwrite mmc 0:1 0x80f80000 args 8928 Falcon Mode: NAND -================= +----------------- In this case the additional data is written to another partition of the NAND. In this example we assume that the uImage and device tree to be are @@ -197,9 +217,11 @@ already located on the NAND somewhere (such as filesystem or mtd partition) along with a Falcon Mode aware MLO written to the correct locations for booting and mtdparts have been configured correctly for the board: -U-Boot # nand read ${loadaddr} kernel -U-Boot # load nand rootfs ${fdtaddr} /boot/am335x-evm.dtb -U-Boot # run nandargs -U-Boot # spl export fdt ${loadaddr} - ${fdtaddr} -U-Boot # nand erase.part u-boot-spl-os -U-Boot # nand write ${fdtaddr} u-boot-spl-os +.. code-block:: text + + U-Boot # nand read ${loadaddr} kernel + U-Boot # load nand rootfs ${fdtaddr} /boot/am335x-evm.dtb + U-Boot # run nandargs + U-Boot # spl export fdt ${loadaddr} - ${fdtaddr} + U-Boot # nand erase.part u-boot-spl-os + U-Boot # nand write ${fdtaddr} u-boot-spl-os diff --git a/doc/board/ti/index.rst b/doc/board/ti/index.rst index c0da04b109cb..014a097178ab 100644 --- a/doc/board/ti/index.rst +++ b/doc/board/ti/index.rst @@ -6,4 +6,5 @@ Texas Instruments .. toctree:: :maxdepth: 2 + am335x_evm j721e_evm From patchwork Sat Sep 11 12:57:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1526721 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H6CTP2gLnz9sVw for ; Sat, 11 Sep 2021 22:57:59 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A1B6C837AC; Sat, 11 Sep 2021 14:57:49 +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 Received: by phobos.denx.de (Postfix, from userid 109) id E9EE0837AC; Sat, 11 Sep 2021 14:57:46 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com [209.85.219.44]) (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 25A4A837B5 for ; Sat, 11 Sep 2021 14:57:40 +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=tom.rini@gmail.com Received: by mail-qv1-f44.google.com with SMTP id s16so3065617qvt.13 for ; Sat, 11 Sep 2021 05:57:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=blBimLomeVHC88xMGeCX3APDQ2FIchJUgIWIohU3Yeo=; b=RXpqJcdzH+PBIUztNFlntsoKO4cAwvorFK05tFhUilXqQ0LgpMADm4mjJTNxousM8B UprcDJ9wJtoo7MOR7i35YNVJf9vJ42QByYPum4yp2q0ACm6h6jVh4bn5AmVR4PtMgcE6 8dTW+N6dlg99jbt2N6WVYc83yP3vb7gibE1QPG1+svVceaehJ6/AxQJZgm8GqMegolQz 3hdCCvchg8kI6NJq/kOfHSvApCIiweFINVDvvkkrJroXBrmdPmxJtrJyA5dFI7BU688w n5Zuj6SP330eWzRizSbN8v5D4xSQVdN8qBRPS1RRgiLNeA0e5rrEUU2qzo9dgKJUsAQ3 Jxmg== X-Gm-Message-State: AOAM532GFJbVeCUHz/KuIN1Tscp07v6tyczgo6YJhCbIpLxVVmBymB9B fLkQcWR0Qmv4lAReGNTmNlcrtmk7Hg== X-Google-Smtp-Source: ABdhPJwwbvTTZ00K9JieXZNStAmOqwEm3FpjCwzYfyA1vSC80YFr6o/DPi+qi4s0hLQ5q4mRipIhnw== X-Received: by 2002:a0c:ab4e:: with SMTP id i14mr2219551qvb.28.1631365058403; Sat, 11 Sep 2021 05:57:38 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-61ce-ecd7-97d2-3518.res6.spectrum.com. [2603:6081:7b01:cbda:61ce:ecd7:97d2:3518]) by smtp.gmail.com with ESMTPSA id p187sm1144368qkd.101.2021.09.11.05.57.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 05:57:38 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 2/3] doc: ti: am335x_evm: Minor general updates Date: Sat, 11 Sep 2021 08:57:32 -0400 Message-Id: <20210911125733.21232-2-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210911125733.21232-1-trini@konsulko.com> References: <20210911125733.21232-1-trini@konsulko.com> 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 - At this point there are a large number of Beaglebone boards, refer to them as a family rather than a growing list. - Reword customization as we're largely Kconfig-oriented now. - Remove the NOR section as the relevant defconfigs have long been removed and the general support was not updated. Signed-off-by: Tom Rini --- doc/board/ti/am335x_evm.rst | 43 +++++++------------------------------ 1 file changed, 8 insertions(+), 35 deletions(-) diff --git a/doc/board/ti/am335x_evm.rst b/doc/board/ti/am335x_evm.rst index 51c11a3e51f8..a90f32da7aea 100644 --- a/doc/board/ti/am335x_evm.rst +++ b/doc/board/ti/am335x_evm.rst @@ -4,8 +4,9 @@ Summary ======= -This document covers various features of the 'am335x_evm' build, and some of -the related build targets (am335x_evm_uartN, etc). +This document covers various features of the `am335x_evm` default +configuration, some of the related defconfigs, and how to enable hardware +features not present by default in the defconfigs. Hardware -------- @@ -14,8 +15,7 @@ The binary produced by this board supports, based on parsing of the EEPROM documented in TI's reference designs: * AM335x GP EVM * AM335x EVM SK -* Beaglebone White -* Beaglebone Black +* The Beaglebone family of designs Customization ------------- @@ -35,13 +35,10 @@ The following blocks are required: * I2C, to talk with the PMIC and ensure that we do not run afoul of errata 1.0.24. -When removing options as part of customization, -CONFIG_EXTRA_ENV_SETTINGS will need additional care to update for your -needs and to remove no longer relevant options as in some cases we -define additional text blocks (such as for NAND or DFU strings). Also -note that all of the SPL options are grouped together, rather than with -the IP blocks, so both areas will need their choices updated to reflect -the custom design. +When removing options as part of customization, note that you will likely need +to look at both `include/configs/am335x_evm.h`, +`include/configs/ti_am335x_common.h` and `include/configs/am335x_evm.h` as the +migration to Kconfig is not yet complete. NAND ---- @@ -89,30 +86,6 @@ Step-2: Flashing NAND via MMC/SD Step-3: Set BOOTSEL pin to select NAND boot, and POR the device. The device should boot from images flashed on NAND device. -NOR ---- - -The Beaglebone White can be equipped with a "memory cape" that in turn can -have a NOR module plugged into it. In this case it is then possible to -program and boot from NOR. Note that due to how U-Boot is designed we -must build a specific version of U-Boot that knows we have NOR flash. This -build is named 'am335x_evm_nor'. Further, we have a 'am335x_evm_norboot' -build that will assume that the environment is on NOR rather than NAND. In -the following example we assume that and SD card has been populated with -MLO and u-boot.img from a 'am335x_evm_nor' build and also contains the -'u-boot.bin' from a 'am335x_evm_norboot' build. When booting from NOR, a -binary must be written to the start of NOR, with no header or similar -prepended. In the following example we use a size of 512KiB (0x80000) -as that is how much space we set aside before the environment, as per -the config file. - -.. code-block:: text - - U-Boot # mmc rescan - U-Boot # load mmc 0 ${loadaddr} u-boot.bin - U-Boot # protect off 08000000 +80000 - U-Boot # erase 08000000 +80000 - U-Boot # cp.b ${loadaddr} 08000000 ${filesize} Falcon Mode ----------- From patchwork Sat Sep 11 12:57:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 1526722 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H6CTc54X5z9sVw for ; Sat, 11 Sep 2021 22:58:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F589837BA; Sat, 11 Sep 2021 14:57:57 +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 Received: by phobos.denx.de (Postfix, from userid 109) id 307E5837AA; Sat, 11 Sep 2021 14:57:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (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 F3E8C837BA for ; Sat, 11 Sep 2021 14:57:40 +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=tom.rini@gmail.com Received: by mail-qk1-f176.google.com with SMTP id t190so5185022qke.7 for ; Sat, 11 Sep 2021 05:57:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RDiWh/gm4pdfMJMmbu3jqZPTXdxyTb92dVMcTplfwN8=; b=fVuKUbTRjy/syW4SRp0LQ3T6ESR76VFVZB+H5e7k8ygT3M27Hc/lPGJN5XwR2yd6eo odNxKSM3eBtJr8eNjYU1BTlrI0ozC56kkrxyGkbl2mWxOMvbM8mYsBeiPCE6rVdVo8+s L98qJfmBrsbvSy2JAXUEPbMPyLcRBETi2WgvTZXx9hIb5/HB7GupFv9PMzYnen5HT788 a7lfN80g21bykWLXKcBwLeNfLJ2V2Kz3kRJwHvYWelxg/mCcEtxHfXri7+jZcUwEmUAz i5/fOpau54LwCkxi7/EuQvTo95HxZsYPdAvQX6iP9leuKxHs7qTVRsnjGNhbqse3nA3Z /PPg== X-Gm-Message-State: AOAM53168ekZ8VbkehiIAyvgVgITGbfn2SPZar/rrHqCSfgZfjGsqiTk sjJ40xkqnjchh0Reaq6MQcsYOnvCHA== X-Google-Smtp-Source: ABdhPJxHC/631x+fdRLgWpppOr63fnSl41QU3Aztd4pDS21e0rsK45iFVejYovGpGIyB9XrDosjPoA== X-Received: by 2002:a37:bb01:: with SMTP id l1mr1938189qkf.182.1631365059479; Sat, 11 Sep 2021 05:57:39 -0700 (PDT) Received: from bill-the-cat.lan (2603-6081-7b01-cbda-61ce-ecd7-97d2-3518.res6.spectrum.com. [2603:6081:7b01:cbda:61ce:ecd7:97d2:3518]) by smtp.gmail.com with ESMTPSA id p187sm1144368qkd.101.2021.09.11.05.57.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Sep 2021 05:57:38 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Cc: Simon Glass Subject: [PATCH 3/3] am335x: Enable SPL_OF_CONTROL Date: Sat, 11 Sep 2021 08:57:33 -0400 Message-Id: <20210911125733.21232-3-trini@konsulko.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210911125733.21232-1-trini@konsulko.com> References: <20210911125733.21232-1-trini@konsulko.com> 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 It has long been known that we need to enable SPL_OF_CONTROL on this platform, as some included drivers do not function correctly without it, but were also stuck due to size constraints. Resolve this problem by: - Updating the generic board.c file to use CONFIG_IS_ENABLED(USB_ETHER) to distinguish between SPL and full U-Boot. - Disable SPL_ETH support as the CPSW driver (and related PHY/etc) are were we need SPL_OF_CONTROL support, but cannot due to size constraints. - Update the documentation on how to enable this mode and recommend what to remove in order to fit within size constraints. Cc: Simon Glass Signed-off-by: Tom Rini --- arch/arm/mach-omap2/am33xx/board.c | 2 +- configs/am335x_evm_defconfig | 2 +- doc/board/ti/am335x_evm.rst | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index d390f2e1f3e8..db268b1381e7 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -338,7 +338,7 @@ int arch_misc_init(void) if (ret || !dev) return ret; -#if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER) +#if defined(CONFIG_DM_ETH) && CONFIG_IS_ENABLED(USB_ETHER) ret = usb_ether_init(); if (ret) { pr_err("USB ether init failed\n"); diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index ef8de5999e0d..d497ca8d96ba 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -14,7 +14,6 @@ CONFIG_LOGLEVEL=3 CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_ARCH_MISC_INIT=y CONFIG_SPL_FIT_IMAGE_TINY=y -CONFIG_SPL_ETH=y # CONFIG_SPL_FS_EXT4 is not set CONFIG_SPL_MTD_SUPPORT=y CONFIG_SPL_MUSB_NEW=y @@ -37,6 +36,7 @@ CONFIG_MTDIDS_DEFAULT="nand0=nand.0" CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)" # CONFIG_SPL_EFI_PARTITION is not set CONFIG_OF_CONTROL=y +CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIST="am335x-evm am335x-bone am335x-sancloud-bbe am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2 am335x-pocketbeagle" CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/doc/board/ti/am335x_evm.rst b/doc/board/ti/am335x_evm.rst index a90f32da7aea..55315e0ad79b 100644 --- a/doc/board/ti/am335x_evm.rst +++ b/doc/board/ti/am335x_evm.rst @@ -86,6 +86,16 @@ Step-2: Flashing NAND via MMC/SD Step-3: Set BOOTSEL pin to select NAND boot, and POR the device. The device should boot from images flashed on NAND device. +Ethernet Boot +------------- + +The AM335x SoC supports booting from CPSW ethernet. This feature is not +enabled in U-Boot by default. In order to support this ``CONFIG_SPL_ETH`` +needs to be enabled and in order to have U-Boot fit within size constraints you +will need to disable some other functionality. Disabling +``CONFIG_SPL_USB_GADGET`` and ``CONFIG_SPL_MUSB_NEW`` is recommended as this is +used to provide SPL support via USB networking instead, which is unlikely to be +used in the same design. Falcon Mode -----------