Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E62F4C43217 for ; Mon, 14 Nov 2022 12:43:10 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DED21835FD; Mon, 14 Nov 2022 13:43:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sancloud.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 9B1D682F6A; Mon, 14 Nov 2022 13:43:06 +0100 (CET) Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2060f.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::60f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0244882F8C for ; Mon, 14 Nov 2022 13:43:02 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sancloud.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=paul.barker@sancloud.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TTHngjhmMqyFalq3a5DlxzvuyRf/wrkcecUnxg+KTHy3dxmNqSMciqOGf+7P/6xhqgpiydEpchwtJCoBWrPtOYK/ldqWdVZkeMzdGKn9GF/cxqq6bbzPq8oaODNxPTyzqi9lSMaA7xNppGd1W8sP0FRkhwJC9CDR3D+v/5zzt0ssbY71mDwLcD1e7va/ExmhDjUGVEJM1nBWoa879nxj5asQLkDHNhYp7Ck/BWVlC5zsXAMQPFzGCaWGO2hsNjTO9GhWa3+Xu3WBlSg/SB+q0RzXHmcZPNIuOHbk5tkIsBLf8YJPgssUH+5GJ1xqux08Fnvgi0vi+rAlqZa6t9mVQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=26Z8wpY1rb4agNgW94ofctftEEdSmuRb8c6i/LnamIA=; b=lA8T/OtWp+98ycrjL8MYhH+79Sv8MvxfqYzfKQFREu616PhYBHIEzAG3wxOVt+hgjfq+wnRw+MKEPG6p1yWJV7E1MqbJXuZ1wEAtwhy2kHfcoeYVvluuNXsHqojiu4Y64mYqgRG9GmMuogw9S/u7J9Y6GTWDsh0I76BTG+By8UNV4tU0xmvn9iAFR5pIVXftp7ElZZ0iuFJUPAywRzMBox3z5oPZNF9vUO6FXbp3DZAuY+EzkjefldMQ2XoLA7aFmvAeqjtvpm6fi7KvyCFKWkcy5wRdjOMG884pGAjyTrx0ZU1ePaYBb6Mw0+u0Do5h9N1Za6RwgYupUAU1gSbbfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=sancloud.com; dmarc=pass action=none header.from=sancloud.com; dkim=pass header.d=sancloud.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=sancloud.com; Received: from SEYPR06MB5064.apcprd06.prod.outlook.com (2603:1096:101:55::13) by PSAPR06MB4472.apcprd06.prod.outlook.com (2603:1096:301:79::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Mon, 14 Nov 2022 12:42:58 +0000 Received: from SEYPR06MB5064.apcprd06.prod.outlook.com ([fe80::3343:e4e0:2fbb:3c9c]) by SEYPR06MB5064.apcprd06.prod.outlook.com ([fe80::3343:e4e0:2fbb:3c9c%6]) with mapi id 15.20.5813.017; Mon, 14 Nov 2022 12:42:58 +0000 From: Paul Barker To: u-boot@lists.denx.de, Simon Glass , Tom Rini Cc: Paul Barker Subject: [PATCH v2 0/9] Fixes for SPI boot on SanCloud BBE Lite Date: Mon, 14 Nov 2022 12:42:34 +0000 Message-Id: <20221114124243.3719037-1-paul.barker@sancloud.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: LO2P265CA0191.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a::35) To SEYPR06MB5064.apcprd06.prod.outlook.com (2603:1096:101:55::13) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEYPR06MB5064:EE_|PSAPR06MB4472:EE_ X-MS-Office365-Filtering-Correlation-Id: cbe48f1a-c02d-4ee3-0ab5-08dac63dc257 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1EIWKI9opKl5k5v96A2ZvaKQ3s6nHRF2Wbx2QMR8bT4kw1npeohS0beLdxMJxXcZNSDZTbKJwsk/U1LUu2zUfD4dInG4dETjsuPmiSssnXquMuKGmIAShPjZeC/TLBRTLnx8LzW19zQ4GqRZr0+y+F4VoUnNxktStUaR1fjtQsMovGQ+9AiApuEnQ0+HfY4mi5oADE9mAh19wtWow/x4mIvorof2avP+po+X10skcFn1IvsCUXtdqrjvueT9OTwikcMll8NXGP0lAOIyRHdcYoh4Uh+f09T3Yv46CPYLUGJS5U03JFV+AnMxgPSsbeYrcy92qxXgw/Hsi28tJn29hh6z4/X01hxN2Rk0TLS6+2RwYD5T1Cxp8Iyq26zeMI34DOxzv0usANM42zQ97cznQTz/ycad4Id+QimAx0uFUNN2Pgum3lQTcwwzi2P+6rHM4dtb21ktCwpesBqlNJZaWqzV/rvy1axS2tzUaC+VVXTvkRyMavnisogcy+NImZKo0P7jeDIcYxd231DJP4fHfe/NRjdrxNwBQ6p0BPK7X31TH46muOYKCrw+AzrWQkKt4FYSyv1DCIQnZ19kZSbiq2NnmrhG/6j7hwI/RKSfHUpmSF5EZ0Db1V2NvDeEEDfckKh+BHhRKsL/PPLxDunNqkN8C12gz3fgavHAiWyGNeBUSX35Yi1t35MVLZU4DDIbGc2emAyRSka/N1AB1SIsASUDBqH0kvXBwSyVM5KKGP7L9CEsj7avBn7D35laHTnH9l0dt2M4P9yxxnRq1YjcR9/CmJsRE5HQZz3Jjk0CLyA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEYPR06MB5064.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(136003)(376002)(396003)(366004)(346002)(39830400003)(451199015)(41320700001)(478600001)(966005)(6666004)(107886003)(6486002)(6506007)(110136005)(36756003)(8936002)(6512007)(26005)(786003)(316002)(66946007)(66556008)(66476007)(4326008)(8676002)(186003)(2616005)(5660300002)(52116002)(1076003)(41300700001)(44832011)(83380400001)(2906002)(38100700002)(38350700002)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?UJFGwBczWXEQJM/UbwHz773+5jqOyavO1rIqZCJE9cVW0Tn0jTlLYqfPpHwL?= =?us-ascii?Q?3dILJ9Nv1cqf18zPYdOwg1w0dSjHaaM5QgndoCbjf5oN5ILww8Sxm2Jb2yyn?= =?us-ascii?Q?8URTgw9nxOPdzi1+4qsGQKdf5k33lfp272a+NssmacbLt6rrTefdqLvO4ejA?= =?us-ascii?Q?d72O05TeRlF0gATvQeciEfp4+h90Wfxdsic/DZjv1N6KYdgORXgNcfCWSGRA?= =?us-ascii?Q?wLKJLRDcOcjH/zMB5hAN/dFLFZGoP9keXX9h5xPpAAtsUihFngWq0cZW+4ns?= =?us-ascii?Q?jv9JYerHbW/klBFL/tk/aZh8kklwWuwwX61g9z2+Bg3JBPZhcfgaQNwNx9SJ?= =?us-ascii?Q?FKdSvVM3PMw//tCO7EAzG/ZbijVi72dYewqd/PZHadjeWlf7yOMNtePBwGes?= =?us-ascii?Q?UQ92Lv2JzmDLSWiRsT6plycuBMz3IGJ9yNvzuhEjwUneVepGrX+g1yFVl31M?= =?us-ascii?Q?T0aKxngdAU3bSowEd5KTdVEuA5ujj6W5nT6McBLu5FWoL+qAu63nl/FAl0BZ?= =?us-ascii?Q?v+WzHftORsYBDU9T8phsQvAuV+faFqOQfusZLXXtNrZMxttrvL7RR3tkfF5t?= =?us-ascii?Q?LBJH92mwbrj2o0qdKmbaS+zLMfUh76W60moHTLEpToEK/mbqlJsxC4kYm5KI?= =?us-ascii?Q?Ll+8TTmXtU4WRyaolKTc4zt3fg1kN0ag2XiGCFuy9EdpTS6kdmwEdmW+tLa+?= =?us-ascii?Q?6LhyzOGtSXES0PUgiGiNohttNlj9KwHDT0kwB0klq+yrxfvI9DVMvPsUCzVd?= =?us-ascii?Q?14PdEchk2yJhVkXrjtG0aNnQuL1j5mne3e1K6V9F4W72cjz6Th2QL5t4TuZR?= =?us-ascii?Q?QVNS62xPqoKHTJlLUYB47f0xBP/u78F+v29jJ2xntdrQNnWiFHxELBV4tKXG?= =?us-ascii?Q?/gPFI72lOE6pO9odRlnokBZPspU7WXdtxZCf2W+3hFPHecszC+hWkd91qFeK?= =?us-ascii?Q?FM49Sv5eMsWKBDKvMZIm9yaHAaBtpZk8ENmUWK6t7fdXe/B5TZWHqPysnssh?= =?us-ascii?Q?Mipr7CGlzKP07m00DULALEycN22i0XLubXWAFzEwxtIGJuJh3H1GSNV4m2Ch?= =?us-ascii?Q?cy06i/LKc2y25zbBgiXutn+iBP2Iakl13RSV4yfNWi1mBdyhXiLMyBje04vM?= =?us-ascii?Q?BXUHbHBWMjT+DFZWUFzLFcDfujnw7QGeSkIYdaBX5RJXyZn/d9UdTEKFXoC9?= =?us-ascii?Q?7ADdWiEv12yPkkTcBt5n+Rqsr3JVKsMD1+vu4zUkXz1pRl3heN/k/iN3NC6+?= =?us-ascii?Q?pMnJlFKDblLiFgZpnstjVpg28NOwJjc5LypFlSWbmHYNAOTodUbqdPL1wQua?= =?us-ascii?Q?9d+iRMin3u9JuWGr7WNeq5PFXFyCtMJo5Fc6XTqiWf35IWsOVJG1yOKAWt5b?= =?us-ascii?Q?YJYGsf9EU029JedrxX/kl785vxyySau/Ujbs506IU2ASs3A1G27ZN9OhACSy?= =?us-ascii?Q?a5Fq9vibNc8mL0rd5pdtNHJqYhca0exZICJXaKybVxnUY/CdumHa8rulMfsq?= =?us-ascii?Q?ZBC6lS/yG8a8ZaMxcy1hnXd2LAKIA9f/YofJ31MmLbkXD87c6+t9jmgPTNWX?= =?us-ascii?Q?uBhhDEso5GOHc90H0JcDhym4NFPz1ES320XOTZ12vqDHzzYyg7AA+0UaaUsL?= =?us-ascii?Q?eA=3D=3D?= X-OriginatorOrg: sancloud.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbe48f1a-c02d-4ee3-0ab5-08dac63dc257 X-MS-Exchange-CrossTenant-AuthSource: SEYPR06MB5064.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2022 12:42:58.3541 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3e0f949f-6a74-4378-baf2-0abfca8d5e06 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BIzrT7Y9LOUwAQOTxAySY1RTOgKSRarp7qh8n7IjIhaeOxIK+mGhenzKM5Yn97yanfzS74qsDt80cTJbF9tcY8JeKyrygjeSVhof4LqWGL8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4472 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean These changes fix SPI boot on the SanCloud BBE Lite and other AM335x boards. They also put us in a good place to enable SPL_OF_CONTROL for eMMC/SD card boot on AM335x boards. Note that if SPL_OF_CONTROL is enabled, some SPL features need to be dropped due to the limited amount of sram available. In my testing I dropped NAND, NET & USB support. This series has been build tested for all targets using buildman and no errors were observed. It has been boot tested on the SanCloud BBE Lite with the following configurations: 1) SD card boot using am335x_evm_defconfig with no config changes. 2) SD card boot using am335x_evm_defconfig with the following config changes: CONFIG_SPL_OF_CONTROL=y CONFIG_SPL_OF_TRANSLATE=y CONFIG_SPL_MUSB_NEW=n CONFIG_SPL_NAND_DRIVERS=n CONFIG_SPL_NAND_ECC=n CONFIG_SPL_NAND_BASE=n CONFIG_SPL_NET=n CONFIG_SPL_USB_GADGET=n 3) SPI boot using am335x_evm_spiboot_defconfig with the following config changes: CONFIG_DEFAULT_DEVICE_TREE="am335x-sancloud-bbe-lite" CONFIG_OF_LIST="am335x-sancloud-bbe-lite" As discussed in my previous message [1], I can't see how to construct a test case to accompany the first patch which fixes an SPL crash during the pre-relocation lists_bind_drivers() call due to exhaustion of the available memory. We can discuss this further though if anyone has any ideas on how to write an appropriate test case. [1]: https://lore.kernel.org/u-boot/d8182df9-1a09-81b9-dfbe-ebca4bad432f@sancloud.com/ Paul Barker (9): dm: core: Fix iteration over driver_info records bus: TI sysc driver requires DM bus: Optionally include TI sysc driver in SPL/TPL am335x-evm: Enable required dtb nodes in SPL am335x-evm: Fix spiboot configuration am335x-evm: Support STMicro/Micron SPI flash am335x-sancloud-bbe-lite: SPI flash is JEDEC compatible am335x-sancloud-bbe: Add -u-boot.dtsi files MAINTAINERS: Adopt SanCloud boards MAINTAINERS | 6 +++ arch/arm/dts/am335x-evm-u-boot.dtsi | 30 ++++++++++++- .../dts/am335x-sancloud-bbe-lite-u-boot.dtsi | 44 +++++++++++++++++++ arch/arm/dts/am335x-sancloud-bbe-lite.dts | 2 +- arch/arm/dts/am335x-sancloud-bbe-u-boot.dtsi | 6 +++ configs/am335x_evm_defconfig | 1 + configs/am335x_evm_spiboot_defconfig | 5 +++ drivers/Makefile | 2 +- drivers/bus/Kconfig | 9 +++- drivers/bus/Makefile | 5 ++- drivers/core/lists.c | 6 +-- 11 files changed, 107 insertions(+), 9 deletions(-) create mode 100644 arch/arm/dts/am335x-sancloud-bbe-lite-u-boot.dtsi create mode 100644 arch/arm/dts/am335x-sancloud-bbe-u-boot.dtsi base-commit: 0cbeed4f6648e0e4966475e3544280a69ecb59d3 -- 2.25.1