Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2663CC433F5 for ; Sat, 11 Sep 2021 12:58:07 +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 44F6F60E76 for ; Sat, 11 Sep 2021 12:58:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 44F6F60E76 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 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) 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 ----------- -- 2.17.1