From patchwork Sat Oct 26 07:53:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kumar Mahapatra X-Patchwork-Id: 13852121 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AC1F0D10BE5 for ; Sat, 26 Oct 2024 07:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZQ3Qol7sNvdQUarJ55LAe5qYBoG5zdUjSAG9cZf/yMg=; b=gC5b+v0g510nPVGIhbjPHkiXJl DoaJrju42UgGCWI+ZchRC41nlFXM3dNcy2tTT7UGeSCbSDDAm4GuludGYNKHnn0UZn4yX4aAWsC1e gupkuczNnYSpA99999U6FhfGyd+xLl5vJVdEsHlXcnSdqnd7JXlqfhpCklKKBReydpDskQ5Ea1Onu vFA5+B+C5McTbO78ZuCietd8yd+RZSLKBxnn4Go9veoMpMkEg4L+NEtXbrdpvMoVjjb3L8H5OHidb bdcEXI9FjTYNKiJ3xV0Qki7dmwdUigg3TeaevLs33fkkU5ahGUK5p7GvxhAejNKnX0CGk7yCiPeL9 KznSpq+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t4beO-00000006Av0-2r8g; Sat, 26 Oct 2024 07:55:56 +0000 Received: from mail-dm6nam11on20605.outbound.protection.outlook.com ([2a01:111:f403:2415::605] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t4bco-00000006AkU-2iTr; Sat, 26 Oct 2024 07:54:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lEt3i/Ceh6P6JbgKcJ681iGu1/Ax3mMwkWUN2QJKDMgBoHLk6mkwHtDFOlBNLCDz5GV03SyF9CJEDUzlbSkLkxewzFl596VHog4k9Pzf3Ee52aTJ7f9fjC7RWb8YlhLAO8CuYMQ1LlCWodQ0BVRv0o33VOk7JRnzMxzoouUCBJY3KcvVwOqRfeu+i5QH6ReDD/ikcXGpAEqk49bydruICphhZSyIqKnG6fsEotI5LJqStezUPep+t41lWgPdu0EwzZQ6+KY06yswHjP9hsQDyZ8SNsIsfp7qpOaQVXL5wRVDzJhjRtcKNO3aq1eVFSBxiBPsDr6q8N9VTycgWs4Hsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ZQ3Qol7sNvdQUarJ55LAe5qYBoG5zdUjSAG9cZf/yMg=; b=gbXJ0W9EGHv8zCT2k9SvYIttMMunEYTk2mpI0Clewvo5msroCDE2BT1eAdaXYeB7Xt5wiV4ShxFXtR+AKd0TVoLrpvWLjK1hDVraBOMT4TeYvbvJSjiZiD8x3Hotr3sVrZ2ldiG7B2odolmM3dLv0imCDUHvHnFYar3bUlZS/bb+wRt0ZKVuDjIaS9T7SoYJUjq2jceP6zLMto3r1v6/gQ1RX7oeb6qUzSbSv7j0lGvBrd18RwNhKyZLQf9OJi+UngugJ9fnS7zNSovDOCZ2B0HtyVdzDtPVJtrz52FGnFbN4C+XR1nkl/gpKZNvhGX3QtQ81KSsc976moTiCDBZ3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org 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 (0) 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=ZQ3Qol7sNvdQUarJ55LAe5qYBoG5zdUjSAG9cZf/yMg=; b=0BTuk/N5I7K1j9YxpUWYqLCRe5nLnU8eLb7JYUoeZQO45w3Pz21eftWo6UIxpoucCyZH28w47aOEm+PKd5H+kfcchahkpQeOamokJmZBtvb1FO27vZJZ6woXnvpPgHBqLT4FKnAPk/tud/xUorHTW4LdVNwRTim2M6yqPpfcY/w= Received: from BL0PR05CA0006.namprd05.prod.outlook.com (2603:10b6:208:91::16) by SN7PR12MB6716.namprd12.prod.outlook.com (2603:10b6:806:270::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.20; Sat, 26 Oct 2024 07:54:08 +0000 Received: from BL02EPF0001A0FC.namprd03.prod.outlook.com (2603:10b6:208:91:cafe::a4) by BL0PR05CA0006.outlook.office365.com (2603:10b6:208:91::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.8 via Frontend Transport; Sat, 26 Oct 2024 07:54:08 +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 BL02EPF0001A0FC.mail.protection.outlook.com (10.167.242.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8093.14 via Frontend Transport; Sat, 26 Oct 2024 07:54:08 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.2507.39; Sat, 26 Oct 2024 02:54:06 -0500 Received: from xhdakumarma40.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Sat, 26 Oct 2024 02:54:01 -0500 From: Amit Kumar Mahapatra To: , , , , , , , , , Subject: [RFC PATCH 1/2] dt-bindings: mtd: Add bindings for describing concatinated MTD devices Date: Sat, 26 Oct 2024 13:23:46 +0530 Message-ID: <20241026075347.580858-2-amit.kumar-mahapatra@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241026075347.580858-1-amit.kumar-mahapatra@amd.com> References: <20241026075347.580858-1-amit.kumar-mahapatra@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: amit.kumar-mahapatra@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0FC:EE_|SN7PR12MB6716:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e10ef17-2616-4e47-c041-08dcf5935eec X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|7416014|1800799024|82310400026|921020; X-Microsoft-Antispam-Message-Info: D3aBIOvMLmS89v1T62L4Xecfr87V+qD0K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pmL+vPTHQrT8mUJTx0++7SivqgYfN/Uo3iDtHb8yHKGWBDtOoKJjRB4+AECXqfwEjDROwaAz21oz1w9PL7LHWV4L3n448uKK3Wv9OLTP5bl9FB0nApth1cVjylScbHcRXhOrsvY6F+tSB0zwnnJtNsNQ90ODBw3oL3lu3jX9lajoWDu+PBp78xb0gVhWQ1EFdAK3snl+7Zt1mdDnXE4B7S8n62PSuucgz2ZNV9bLvpGtlvzXBwhhOV1M+2bD4jwDYlw+BPxpBN+1YLsK7awY0qnzLs0tbV/POG/NAQimCGSNXE/8LSUIKz2H12nnlmfx+k4HrCvAyzJ5rhLEEwWMAwRd3+V/xC8on+8+T3m 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:(13230040)(376014)(36860700013)(7416014)(1800799024)(82310400026)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2024 07:54:08.0714 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e10ef17-2616-4e47-c041-08dcf5935eec 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: BL02EPF0001A0FC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241026_005418_715269_07FEC83E X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: git@amd.com, alexandre.belloni@bootlin.com, Amit Kumar Mahapatra , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, amitrkcian2002@gmail.com, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, venkatesh.abbarapu@amd.com, claudiu.beznea@tuxon.dev, linux-spi@vger.kernel.org, michal.simek@amd.com, linux-arm-kernel@lists.infradead.org, beanhuo@micron.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This approach was suggested by Rob [1] during a discussion on Miquel's initial approach [2] to extend the MTD-CONCAT driver to support stacked memories. Define each flash node separately with its respective partitions, and add a 'concat-parts' binding to link the partitions of the two flash nodes that need to be concatenated. flash@0 { compatible = "jedec,spi-nor" ... partitions { compatible = "fixed-partitions"; concat-partition = <&flash0_partition &flash1_partition>; flash0_partition: partition@0 { label = "part0_0"; reg = <0x0 0x800000>; } } } flash@1 { compatible = "jedec,spi-nor" ... partitions { compatible = "fixed-partitions"; concat-partition = <&flash0_partition &flash1_partition>; flash1_partition: partition@0 { label = "part0_1"; reg = <0x0 0x800000>; } } } Based on the bindings the MTD-CONCAT driver need to be updated to create virtual mtd-concat devices. [1] https://lore.kernel.org/all/20191118221341.GA30937@bogus/ [2] https://lore.kernel.org/all/20191113171505.26128-4-miquel.raynal@bootlin.com/ Signed-off-by: Amit Kumar Mahapatra --- .../mtd/partitions/fixed-partitions.yaml | 18 ++++++++++++++++++ .../bindings/mtd/partitions/partitions.yaml | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index 058253d6d889..df4ccb3dfeba 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -183,3 +183,21 @@ examples: read-only; }; }; + + - | + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + concat-parts = <&part0 &part1>; + + part0: partition@0 { + label = "flash0-part0"; + reg = <0x0000000 0x100000>; + }; + + part1: partition@100000 { + label = "flash1-part0"; + reg = <0x0100000 0x200000>; + }; + }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml index 1dda2c80747b..86bbd83c3f6d 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partitions.yaml @@ -32,6 +32,12 @@ properties: '#size-cells': enum: [1, 2] + concat-parts: + description: List of MTD partitions phandles that should be concatenated. + $ref: /schemas/types.yaml#/definitions/phandle-array + minItems: 2 + maxItems: 4 + patternProperties: "^partition(-.+|@[0-9a-f]+)$": $ref: partition.yaml