u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Simon Glass <sjg@chromium.org>
Subject: [PATCH 3/3] am335x: Enable SPL_OF_CONTROL
Date: Sat, 11 Sep 2021 08:57:33 -0400	[thread overview]
Message-ID: <20210911125733.21232-3-trini@konsulko.com> (raw)
In-Reply-To: <20210911125733.21232-1-trini@konsulko.com>

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 <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
 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
 -----------
-- 
2.17.1


  parent reply	other threads:[~2021-09-11 12:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-11 12:57 [PATCH 1/3] doc: ti: Convert am335x_evm README to rST Tom Rini
2021-09-11 12:57 ` [PATCH 2/3] doc: ti: am335x_evm: Minor general updates Tom Rini
2021-09-28 23:20   ` Tom Rini
2021-09-11 12:57 ` Tom Rini [this message]
2021-09-28 23:20 ` [PATCH 1/3] doc: ti: Convert am335x_evm README to rST Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210911125733.21232-3-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).