From patchwork Wed Nov 16 14:11:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ashok Reddy Soma X-Patchwork-Id: 1704671 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=5un9qqzG; dkim-atps=neutral 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NC4lL1mvLz23n9 for ; Thu, 17 Nov 2022 01:13:18 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F0ADD851E1; Wed, 16 Nov 2022 15:12:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amd.com header.i=@amd.com header.b="5un9qqzG"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4C1DF84BE3; Wed, 16 Nov 2022 15:12:41 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on20609.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eb2::609]) (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 A8EFF851D7 for ; Wed, 16 Nov 2022 15:12:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=ashok.reddy.soma@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E8XmhwVfCAv9ssSKEBgO449X3WCJIYyVq19o3MBAbejUcrUV+DzrITVi1ppM2X3xD8ilZy1tSxtWwCsH6l0oZB/wzDKnNDLcfbkRCbNwwJd1dl8IUz3C63JQU0wWiM0feta/OE195/CpTtbVjuSau/VrID8IrtQUbOGd3Z5Bw8OOxYs7Ct4EPem+SwYPvbd/bKFRg5j3NBtKGnSY8tElLJG17glcI3av3Z8Bh4YFMssYAtL2wPYAt+uvbiRmOcKe6nWsyetiKDIyvTxShNudfzRIfwM8g5hezEq+k/QNaXicf6eJh8SoUo6nIi2/of2ORnsx/gYvJEQzRj+XZeR3+g== 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=AJB+V1L5/GuTp8aRlB+fRpRvPF52d4nwtuZV+yud9pc=; b=BDLZX6KEYUA+6HlmKVLDvvyDIl7Lu5K/E3qoZR1GuOvHc+dl1pYh6vzPzgyHAF12aVztCyHe6RPWnfQ6LBH7nv9bhQqZ5GADWnTFoHK3mgKMN4+oAG5wwHLIhN5wB5XWkxlBSh7ZtMFo4FXUAVNF75pWnG3WPthz9ScFBWTJ4Ul9tgWmpCZ5xkBcIVMGFZb35VlNTSAK/+2BwWwF5Bo8V8aqOn5a3XxPzinw9y+gvodOwd8zdGlPkNxNb9drEpdoOEb7sJslAQ2jy/5Cfqr/LAGcZGTuRxFFlgtKfPqK90u4Evf13AaC8xvLvYrZoUKYxTe1Zp0hnMc4qvm3v/BK8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.denx.de smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AJB+V1L5/GuTp8aRlB+fRpRvPF52d4nwtuZV+yud9pc=; b=5un9qqzGWFzReRLHmoop5xYzxMzxdP+EYgCO4/1pi/9mnNLWvIXZakHKag9UKTL/SneIyKfhTqaEbLT8hgzXdAj4Y90kbQuEqvDnM89aGSe0bX1RQ6sRCxw7GBW2iZbA5Vxhx/bT7NEzf2fKiK26QAqTPJ5iWBKGVe2XDWpNe/4= Received: from MW2PR16CA0003.namprd16.prod.outlook.com (2603:10b6:907::16) by BL1PR12MB5190.namprd12.prod.outlook.com (2603:10b6:208:31c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.27; Wed, 16 Nov 2022 14:12:31 +0000 Received: from CO1NAM11FT111.eop-nam11.prod.protection.outlook.com (2603:10b6:907:0:cafe::8a) by MW2PR16CA0003.outlook.office365.com (2603:10b6:907::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.13 via Frontend Transport; Wed, 16 Nov 2022 14:12:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CO1NAM11FT111.mail.protection.outlook.com (10.13.174.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5834.8 via Frontend Transport; Wed, 16 Nov 2022 14:12:31 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 16 Nov 2022 08:12:27 -0600 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 16 Nov 2022 08:12:23 -0600 Received: from xhdashokred41.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34 via Frontend Transport; Wed, 16 Nov 2022 08:12:19 -0600 From: Ashok Reddy Soma To: CC: , , , , , , , , , , , , Ashok Reddy Soma Subject: [PATCH 3/3] arm64: versal: Add octal spi flash mini u-boot configuration Date: Wed, 16 Nov 2022 07:11:55 -0700 Message-ID: <20221116141155.14788-4-ashok.reddy.soma@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221116141155.14788-1-ashok.reddy.soma@amd.com> References: <20221116141155.14788-1-ashok.reddy.soma@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT111:EE_|BL1PR12MB5190:EE_ X-MS-Office365-Filtering-Correlation-Id: 70eea547-0da9-41b6-41e4-08dac7dc99c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DrDwQ0CNFQvGQiNJVHupy6DDebP7VjtYO1Ab/WbBm7ZD+MDL4QWIc3W1NJcCRyFc37VEcZ+Q1SSLrtoARZYmptdzsLe5xIAwqoeZZ4LpFpCnOwUYURaZNYmcp+nEVmnfkzPAPKt7azeUKh4SaKkgxkc12LUNWwzJ8r5l6K9l9QyHTXXCof5Pn3/DMrxhPNPpz+V+sAvd9eD1SXOZhpiW1MZnDsb/QT8wk8mAbwh4leqybPdMethBaxSOjq8soEHyQ8bvUUB5lPPFCdGgW6H8jjVB2yiKcNTbmSDQb2hnxzvl+khNubp8BltTLLtDxwTv8fb83wm+zTdxftohM8UAUw3ID7nhrY7tDozl73yiRQioEGgtenGXQGwtpPuDS7Xfn/g6IMEf+/1vPa6iQrywrTIadvDWV/RIzU9DkAo41fIZ7zK5aTezEukaF0sy3TSwZL5/kFM8tipiAceb/YXg7c1PzAPpuTLOHlYx4bS8p0Cs7gdDNg3TZBquE0xt6b1VbOszMEsxKeIzd+3o7wKmYOZ6f16xESrbkIYvfPqerfLwIpGIZZRnSC89IW+ix/Kl8T32kFumV57mDtpfmNQESDFH/atiVqQfeEd3iq3MV8ApE6Dj2maQMI7EfdHwzTWaF/XWiTcj8BXYensxX4ylUX7Y1D/5+mYMzFYa90PzxLsFnSSn7y51tgsmzb92ozEA2L5SVH/rrsIhVn+CuSRrvCT9FhSvDeYMVCX0+QHVwERYm9h2pOpJk43Wp6T/kCRiniCyoX8fiyQJp1PBnTOb8bKBMsaX+c5k2RZMNXQpGgWOyr3f0VCxuzLsKta2diwb X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(376002)(346002)(136003)(39860400002)(396003)(451199015)(46966006)(40470700004)(36840700001)(4326008)(8676002)(70586007)(82740400003)(70206006)(316002)(40480700001)(40460700003)(103116003)(54906003)(5660300002)(36756003)(426003)(47076005)(2906002)(41300700001)(26005)(186003)(86362001)(36860700001)(8936002)(2616005)(83380400001)(336012)(7416002)(1076003)(81166007)(82310400005)(478600001)(6916009)(6666004)(356005)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 14:12:31.1136 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70eea547-0da9-41b6-41e4-08dac7dc99c4 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT111.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5190 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 Add configuration file for mini u-boot configuration which runs on a smaller footprint from on chip memory(OCM). This configuration has required CONFIG's enabled to support octal spi flash and uses DCC terminal for console output. Add required dts for octal spi flash mini u-boot configuration. Signed-off-by: Ashok Reddy Soma --- Changes in v3: - Add dts files for octal flash mini u-boot. - Add below configs to fix compilation error. CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFE0000 Changes in v2: - Run savedefconfig and updated mini config for ospi to align with latest Kconfig layout arch/arm/dts/Makefile | 1 + arch/arm/dts/versal-mini-ospi-single.dts | 16 +++++ arch/arm/dts/versal-mini-ospi.dtsi | 77 +++++++++++++++++++++++ configs/xilinx_versal_mini_ospi_defconfig | 72 +++++++++++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 arch/arm/dts/versal-mini-ospi-single.dts create mode 100644 arch/arm/dts/versal-mini-ospi.dtsi create mode 100644 configs/xilinx_versal_mini_ospi_defconfig diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 7d3cac0eb7..43951a7731 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -383,6 +383,7 @@ dtb-$(CONFIG_ARCH_VERSAL) += \ versal-mini.dtb \ versal-mini-emmc0.dtb \ versal-mini-emmc1.dtb \ + versal-mini-ospi-single.dtb \ versal-mini-qspi-single.dtb \ xilinx-versal-virt.dtb dtb-$(CONFIG_ARCH_VERSAL_NET) += \ diff --git a/arch/arm/dts/versal-mini-ospi-single.dts b/arch/arm/dts/versal-mini-ospi-single.dts new file mode 100644 index 0000000000..23f6e47a18 --- /dev/null +++ b/arch/arm/dts/versal-mini-ospi-single.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Xilinx Versal QSPI single DTS + * + * Copyright (C) 2018-2020 Xilinx, Inc. + */ + +#include "versal-mini-ospi.dtsi" + +/ { + model = "Xilinx Versal MINI OSPI SINGLE"; +}; + +&flash0 { + spi-rx-bus-width = <8>; +}; diff --git a/arch/arm/dts/versal-mini-ospi.dtsi b/arch/arm/dts/versal-mini-ospi.dtsi new file mode 100644 index 0000000000..a4b76e2b99 --- /dev/null +++ b/arch/arm/dts/versal-mini-ospi.dtsi @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * dts file for Xilinx Versal Mini OSPI Configuration + * + * (C) Copyright 2018-2019, Xilinx, Inc. + * + * Siva Durga Prasad + * Michal Simek + */ + +/dts-v1/; + +/ { + compatible = "xlnx,versal"; + #address-cells = <2>; + #size-cells = <2>; + model = "Xilinx Versal MINI OSPI"; + + clk125: clk125 { + compatible = "fixed-clock"; + #clock-cells = <0x0>; + clock-frequency = <125000000>; + }; + + dcc: dcc { + compatible = "arm,dcc"; + status = "okay"; + u-boot,dm-pre-reloc; + }; + + amba: amba { + u-boot,dm-pre-reloc; + compatible = "simple-bus"; + #address-cells = <0x2>; + #size-cells = <0x2>; + ranges; + + ospi: spi@f1010000 { + compatible = "cadence,qspi", "cdns,qspi-nor"; + status = "okay"; + reg = <0 0xf1010000 0 0x10000 0 0xc0000000 0 0x20000000>; + clock-names = "ref_clk", "pclk"; + clocks = <&clk125 &clk125>; + bus-num = <2>; + num-cs = <1>; + cdns,fifo-depth = <256>; + cdns,fifo-width = <4>; + cdns,is-dma = <1>; + cdns,trigger-address = <0xc0000000>; + #address-cells = <1>; + #size-cells = <0>; + + flash0: flash@0 { + compatible = "n25q512a", "micron,m25p80", + "jedec,spi-nor"; + reg = <0x0>; + spi-tx-bus-width = <8>; + spi-rx-bus-width = <8>; + spi-max-frequency = <20000000>; + }; + }; + }; + + aliases { + serial0 = &dcc; + spi0 = &ospi; + }; + + chosen { + stdout-path = "serial0:115200"; + }; + + memory@fffc0000 { + device_type = "memory"; + reg = <0x0 0xfffc0000 0x0 0x40000>; + }; +}; diff --git a/configs/xilinx_versal_mini_ospi_defconfig b/configs/xilinx_versal_mini_ospi_defconfig new file mode 100644 index 0000000000..2c4e21028d --- /dev/null +++ b/configs/xilinx_versal_mini_ospi_defconfig @@ -0,0 +1,72 @@ +CONFIG_ARM=y +CONFIG_SYS_CONFIG_NAME="xilinx_versal_mini_qspi" +CONFIG_COUNTER_FREQUENCY=100000000 +CONFIG_ARCH_VERSAL=y +CONFIG_TEXT_BASE=0xFFFC0000 +CONFIG_SYS_MALLOC_LEN=0x2000 +CONFIG_SYS_MALLOC_F_LEN=0x500 +CONFIG_NR_DRAM_BANKS=1 +CONFIG_ENV_SIZE=0x80 +# CONFIG_DM_GPIO is not set +CONFIG_DEFAULT_DEVICE_TREE="versal-mini-ospi-single" +CONFIG_SYS_PROMPT="Versal> " +CONFIG_SYS_MEM_RSVD_FOR_MMU=y +CONFIG_VERSAL_NO_DDR=y +# CONFIG_PSCI_RESET is not set +CONFIG_SYS_LOAD_ADDR=0x8000000 +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xFFFE0000 +# CONFIG_EXPERT is not set +# CONFIG_AUTOBOOT is not set +CONFIG_SYS_CONSOLE_INFO_QUIET=y +# CONFIG_DISPLAY_CPUINFO is not set +CONFIG_BOARD_EARLY_INIT_R=y +# CONFIG_BOARD_LATE_INIT is not set +# CONFIG_CMDLINE_EDITING is not set +# CONFIG_AUTO_COMPLETE is not set +# CONFIG_SYS_LONGHELP is not set +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_CONSOLE is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTM is not set +# CONFIG_CMD_BOOTI is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_FDT is not set +# CONFIG_CMD_GO is not set +# CONFIG_CMD_RUN is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_XIMG is not set +# CONFIG_CMD_EXPORTENV is not set +# CONFIG_CMD_IMPORTENV is not set +# CONFIG_CMD_EDITENV is not set +# CONFIG_CMD_SAVEENV is not set +# CONFIG_CMD_ENV_EXISTS is not set +# CONFIG_CMD_CRC32 is not set +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +# CONFIG_CMD_ECHO is not set +# CONFIG_CMD_ITEST is not set +# CONFIG_CMD_SOURCE is not set +# CONFIG_CMD_SETEXPR is not set +# CONFIG_NET is not set +# CONFIG_DM_WARN is not set +# CONFIG_DM_DEVICE_REMOVE is not set +# CONFIG_MMC is not set +CONFIG_DM_SPI_FLASH=y +CONFIG_SF_DEFAULT_SPEED=30000000 +CONFIG_SPI_FLASH_SOFT_RESET=y +CONFIG_SPI_FLASH_SOFT_RESET_ON_BOOT=y +CONFIG_SPI_FLASH_GIGADEVICE=y +CONFIG_SPI_FLASH_ISSI=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_MT35XU=y +CONFIG_ARM_DCC=y +CONFIG_SOC_XILINX_VERSAL=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_CADENCE_QSPI=y +CONFIG_HAS_CQSPI_REF_CLK=y +CONFIG_CQSPI_REF_CLK=200000000 +CONFIG_CADENCE_OSPI_VERSAL=y +# CONFIG_LMB is not set