From patchwork Tue Oct 1 16:38:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 831913 Delivered-To: patch@linaro.org Received: by 2002:a5d:43d2:0:b0:367:895a:4699 with SMTP id v18csp386184wrr; Tue, 1 Oct 2024 09:47:22 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUWGTLcDgPI2zqYLSJ1ygHPhCCkmfazOnky/w7Vej5qh/dbyhsIo0/LMcZozjVG7324Vov+wQ==@linaro.org X-Google-Smtp-Source: AGHT+IHXKxI8uHwS/ds35K0GadtH8qQSa5QOXAvcQCiZ84tNJp/h0N7QBHZ2Eaw0I9JYXqAg3tRL X-Received: by 2002:a05:620a:1905:b0:7a9:c406:eeb3 with SMTP id af79cd13be357-7ae626abbb4mr47167785a.1.1727801242148; Tue, 01 Oct 2024 09:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727801242; cv=none; d=google.com; s=arc-20240605; b=BPdEfyoCLQm/ZyN0ENXPaZRmInSNycmRR+Xk7fH08yfgzc+tOz7/lM9yjs2NBKtmpy NU1aPeJ7fQEIoswe3jzoZzQaN6h+5N9PswvgAqA3hxa48MayTywx/qDAjEuOm8m+ItOg v3GA+KCn4xxYK9NwFlFjNpUajmWGuXFBptXdbngL8Ghk4QohmZirrF4eFoxXmuL4CvVk VOwRndj4RyJwADp9fp2K0btDm6SBY8D+kqssnfYcMALti3Wt0JZT0QtrhVpR0nXoo/fT wniYNZc4aX02c2DsSblYnljvu9fRJMdNdASvL930RZ3P5f3jSXiNYPmIly5eVQjybn2b YLMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QS3mui/BYfOr3eX5Vx6VX1RVK+HBTtq1jSdLydD978k=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=garfX6kTBQwyaM99sq+L8tFQwLodEqeB0TTzpwRnmg7ctW7nX77ufzxz8iGV8FlvVq DXh5AKrJ7WweHnB4AWXD1DZptYBnOOkfhV72kzn0TYTJ5WTQ5yrTTj7Gie3jRgv5Xtld GHJ9NxZ0Ss7iGTBemaRy5kQzb0Zg3pSnJw+0Y0k48vkxUz28QPJVUv939PTlFPWFxyte O+t+2DZ0a/AbhAj8oxtz8gy34Xr6WuqE2B7LbL3B7NVwd1/Ha2jOfcRz/Edp7YNouHyX 8Xy5MJaO89R3HSZVpYK+WNU6z9p6YZhuFVP+zJDvO4RAln4wom2vPpjvjkifNeNIKCNd QL9w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I9o+NyqU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7ae378559f8si1109389785a.519.2024.10.01.09.47.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Oct 2024 09:47:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I9o+NyqU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svfud-0005aH-27; Tue, 01 Oct 2024 12:39:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svfuU-0005Tz-UF for qemu-devel@nongnu.org; Tue, 01 Oct 2024 12:39:38 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svfuF-00060F-AK for qemu-devel@nongnu.org; Tue, 01 Oct 2024 12:39:38 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-42cb8dac900so55200025e9.3 for ; Tue, 01 Oct 2024 09:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727800762; x=1728405562; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QS3mui/BYfOr3eX5Vx6VX1RVK+HBTtq1jSdLydD978k=; b=I9o+NyqUkokUJLevNBCNpcafzpD33+zFFLc21uCwaAzRB6Vg8WwBvvUYHLhMefv53b EyhL2TUDBZVpXLwT5KXkAeRsLtEEC9RE42nCMce7lV9epqLpAF9obUPab59eS2syUBAD 0NhFOGlAmDPax1gsGolEyVDbOBGXUVM7IdTjcp4nNaQL8f83e6CW2FdFSFBMVPfPrEnP KIs3qKMUz8FosLovvkV2gGJFnqfVnNw1GhMhz04A9bCKhp75wgECBk2aWvlI7SKrs/po Zq7IevRRnWqolbRDH1CgYKBIb14VE8CRUx9TUYpr/4cm6jVtzUJvdtOtm/D81S3n+0Vg mEKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727800762; x=1728405562; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QS3mui/BYfOr3eX5Vx6VX1RVK+HBTtq1jSdLydD978k=; b=r5fdLkyRwcNC+cWdiK/B02OUexk8Qc2gdwMrzDcBEa2jKt4k9WpSSPeAZ8SPlPfy0t wLugWb+QPGbtfcGAK7uifhXiqr321Y6qiP+IK1Bolj/5Br3AzUiF40qijzcEn6bu1LG9 esmLiYbNYuDndHFPYjqHNsPd8E0zvasi7Wt+Ox79LGkjj0GCxNfyLBSBYqqrvb44oEq+ CP+1RicfEGmxMeLF/QIfiblJDfr6kfHWr6qHFtyWEqwiGq3aY8oy1T7GSE0GG+0bn9bI fW9xBkzb5z7fnEfwkOoE+hd81LKSLlILxF5cZnxIw1NZsfsyfKP7rs/P7xGjO4xeqxnh DJKQ== X-Gm-Message-State: AOJu0YxZcttk5YM4/VouI/e84c4vJsC0huqVD38a+FIt2WIep/LEpIR6 NyGo+RwUIr/sz+khA9gtoMeoHT7iEAJe5oGA+tavSZfLm09TYfWOVgXJq9AIuiMuXDCg9bn9iw6 3 X-Received: by 2002:adf:e711:0:b0:37c:ccbc:6573 with SMTP id ffacd0b85a97d-37cfb8c7618mr120092f8f.18.1727800761497; Tue, 01 Oct 2024 09:39:21 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37cd56e6547sm12243771f8f.58.2024.10.01.09.39.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 09:39:21 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/54] m25p80: Add SFDP table for mt35xu01g flash Date: Tue, 1 Oct 2024 17:38:27 +0100 Message-Id: <20241001163918.1275441-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241001163918.1275441-1-peter.maydell@linaro.org> References: <20241001163918.1275441-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Shiva sagar Myana Add the SFDP table for the Micron Xccela mt35xu01g flash. Signed-off-by: Shiva sagar Myana Reviewed-by: Francisco Iglesias Message-id: 20240829120117.616861-1-Shivasagar.Myana@amd.com Signed-off-by: Peter Maydell --- hw/block/m25p80_sfdp.h | 1 + hw/block/m25p80.c | 3 ++- hw/block/m25p80_sfdp.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/block/m25p80_sfdp.h b/hw/block/m25p80_sfdp.h index 1733b569508..89c2d8f72d5 100644 --- a/hw/block/m25p80_sfdp.h +++ b/hw/block/m25p80_sfdp.h @@ -16,6 +16,7 @@ #define M25P80_SFDP_MAX_SIZE (1 << 24) uint8_t m25p80_sfdp_n25q256a(uint32_t addr); +uint8_t m25p80_sfdp_mt35xu01g(uint32_t addr); uint8_t m25p80_sfdp_mt35xu02g(uint32_t addr); uint8_t m25p80_sfdp_mx25l25635e(uint32_t addr); diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 134ee07fbcb..f7123f9e687 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -266,7 +266,8 @@ static const FlashPartInfo known_devices[] = { { INFO("n25q512ax3", 0x20ba20, 0x1000, 64 << 10, 1024, ER_4K) }, { INFO("mt25ql512ab", 0x20ba20, 0x1044, 64 << 10, 1024, ER_4K | ER_32K) }, { INFO_STACKED("mt35xu01g", 0x2c5b1b, 0x104100, 128 << 10, 1024, - ER_4K | ER_32K, 2) }, + ER_4K | ER_32K, 2), + .sfdp_read = m25p80_sfdp_mt35xu01g }, { INFO_STACKED("mt35xu02gbba", 0x2c5b1c, 0x104100, 128 << 10, 2048, ER_4K | ER_32K, 4), .sfdp_read = m25p80_sfdp_mt35xu02g }, diff --git a/hw/block/m25p80_sfdp.c b/hw/block/m25p80_sfdp.c index 6ee2cfaf119..82d84cc21fe 100644 --- a/hw/block/m25p80_sfdp.c +++ b/hw/block/m25p80_sfdp.c @@ -57,6 +57,43 @@ static const uint8_t sfdp_n25q256a[] = { }; define_sfdp_read(n25q256a); +static const uint8_t sfdp_mt35xu01g[] = { + 0x53, 0x46, 0x44, 0x50, 0x06, 0x01, 0x01, 0xff, + 0x00, 0x06, 0x01, 0x10, 0x30, 0x00, 0x00, 0xff, + 0x84, 0x00, 0x01, 0x02, 0x80, 0x00, 0x00, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xe5, 0x20, 0x8a, 0xff, 0xff, 0xff, 0xff, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xee, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x0c, 0x20, 0x11, 0xd8, + 0x0f, 0x52, 0x00, 0x00, 0x24, 0x5a, 0x99, 0x00, + 0x8b, 0x8e, 0x03, 0xe1, 0xac, 0x01, 0x27, 0x38, + 0x7a, 0x75, 0x7a, 0x75, 0xfb, 0xbd, 0xd5, 0x5c, + 0x00, 0x00, 0x70, 0xff, 0x81, 0xb0, 0x38, 0x36, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x43, 0x0e, 0xff, 0xff, 0x21, 0xdc, 0x5c, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +define_sfdp_read(mt35xu01g); + static const uint8_t sfdp_mt35xu02g[] = { 0x53, 0x46, 0x44, 0x50, 0x06, 0x01, 0x01, 0xff, 0x00, 0x06, 0x01, 0x10, 0x30, 0x00, 0x00, 0xff,