From patchwork Wed Oct 19 11:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 616431 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp229961pvb; Wed, 19 Oct 2022 04:50:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Vh+oIRAVpdKPv11O/y01C8/tahuZyt2YzsqXJNuCv1PqKnpM88xtEpLxcHfEBxeLuRPWE X-Received: by 2002:a62:5202:0:b0:562:d28e:f715 with SMTP id g2-20020a625202000000b00562d28ef715mr8251696pfb.26.1666180242164; Wed, 19 Oct 2022 04:50:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666180242; cv=none; d=google.com; s=arc-20160816; b=j1Q6QS6VO3x7gBwvQzOMJEkEYqM4oC8QPurXGh/Rg0+62w3VPYS5DLCrWvs9NIY+T+ jqFlTM8GP0qtzMu34zKt5V5q+YJVPtUcUrlqM7Xp/I53qA3Z2aU4S6zbtVm7JV0hwtDr YPYRhb9FqnzWu6nlGYauCSWGfXbR5dSBHRAY4w6HV+V3/bCfh8i4A/kUT4EjzxNFhXbH J5yjdwmcpjBqhO4lHrY31Hn2hxjmWk2D16eW/eB35KsWELn9oUYs/o+y+G1rip8N35rt S22PWA2ZSneQySGp+VGqoMJSU3nJy0+Xg3akPyOAW1F2w74g05dSTXCxj3N8TSV1dB/E 6V5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-signature; bh=26WLv8Q1bZar7IQYdcjhWP5pP2Dv6e2vDA+ztLrwKUA=; b=Um4HSBeSuN1IhjRekfZMkGq6ePTscB8UUQJBtyk+QeMpoeNf3Bs+rjFxJ3Z0deqwmB HT273wUQEyxNgGxcm55N7fSv63P/zHeVnSVwMc2njSbuTuChAYGsA/0z5xvoRzUj2V0L D8p/0R4EWQrv4juVfFWoG+khUlH42o+l2F46bHPzOk5tlQcXR7F1wWrJfKaoUjWovoGI ZvCPuEkM45yxrG6kpHFIu5cwvLrQdcDvuj6B4F84QuyLxwxOpez8+5Mkx6wnOf21Cx44 dqZpYXlmKtrMfhC5oOibFwS2Nv/yNBNMWXrk3HHdpzqX3ucQ1lf0jHEHWWJQ3yOBTXoL AHfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=4uMlQsPW; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=XznED3sZ; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:3::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:3::133]) by mx.google.com with ESMTPS id d89-20020a17090a6f6200b00200934a5a53si501251pjk.29.2022.10.19.04.50.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 04:50:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:3::133 as permitted sender) client-ip=2607:7c80:54:3::133; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.infradead.org header.s=bombadil.20210309 header.b=4uMlQsPW; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20210112 header.b=XznED3sZ; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2607:7c80:54:3::133 as permitted sender) smtp.mailfrom="linux-mtd-bounces+patch=linaro.org@lists.infradead.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=26WLv8Q1bZar7IQYdcjhWP5pP2Dv6e2vDA+ztLrwKUA=; b=4uMlQsPWSuR9dD /q5GRXlgLuB+X0MiPNKBMl7eg/uf4QRkOvXlel3lsQ5iIK7bsr3FhVqkIpoqSLJuh+Bi+8B7H2ilz S7KGpQh2NnFGWVdXwoVAhbo9qJM3dR/kgPSM2m+T4N2AMZ3tq6nyMKB5NKMvF1RS2wmtJkda/kTxK S/9dVrj9KQsCEd58Ck3mEZSrq2AG9e8aa53JJPlsAEG3K6dlV/rKY+S0BwhdOH84N+HGdsGOlDS3U Ez3rL9tjw5FrhmGB0KyiJrnxgz8HWFqdP4AmwF6f9fnCTAzIhH9fUoFOntEfwg/PEMmV0FlF30MNj U3kyjG38haDGo9G10X5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol7a5-0011gK-3q; Wed, 19 Oct 2022 11:49:53 +0000 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ol7a0-0011cX-TI for linux-mtd@lists.infradead.org; Wed, 19 Oct 2022 11:49:50 +0000 Received: by mail-lj1-x229.google.com with SMTP id c22so20481725lja.6 for ; Wed, 19 Oct 2022 04:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/SgthmTOzp3GGabfMw1BGo5g3o2HNTfweNMsL53GOTc=; b=XznED3sZp9svoyHkLA1j5DhdbO8l+nPvuyUqWZcMwP52T0KIuuQWMrZIz7p9JrYekv sUzIoYPZXBgeqkGX7wYNW9wgLVaWBTZMMYETm/qxREwkGqRI+pg2cmwkNFAvyPUa4PjM xpX/x3WKxWVoKPUEV1KEJdoOszoC69e8Afbn7Aum9e0FJYhz9MemAWhhWWqOF/VgTZPc qSljtj7HUICXFDKR3YXI7ogC7F3bOK7tCOJ8hq1PgYVSkj/nwVVZAZ4Lja3RcToN9U2I eVk/3TWf1bfoMCH67WoNWUvOUyDNPjg0YWCWBwJtm/jGVl7GVSRdg5qrHZRwLblO+iy8 FeXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/SgthmTOzp3GGabfMw1BGo5g3o2HNTfweNMsL53GOTc=; b=hqpkw96gqpZwwo/J0fyUqfIm3PTkkNXDP012LZko8MDo3i/RdUIkG1gzNT5UWWBcn8 +ddLAHSo6mspiQHTL8f9cg3TwB60d+t03Pp16BMNYOYHbaIWs388ytCo5eM8b5FQodYK LizQ4nPAmz7L8xr0L8C/EaygcZpd7UCAjBRGG8UiSSiW+StLYQ2JiEAaZcrONWLqwuMd mK8YhHUxvViFApKYEd7ChZPeRM/zGB79t1bORtZgLSohiKuwXbsYJhUpqGBa9t7+LAFV CbCtWMA+JXttf0DJV4WSGz2z/ME4j+9xazoZPVPbavhDRzYDjMBJQLWjLKRTB8BTyhd5 HsFg== X-Gm-Message-State: ACrzQf2DhBtBkmixq3LzL7t2E0fYNNiIPgPyIVes0TgXYWN8mbpYmVQ9 RnMQ4GV56U5hFslBuQXqBSTQe0L8ocI= X-Received: by 2002:a17:906:eec9:b0:73d:c369:690f with SMTP id wu9-20020a170906eec900b0073dc369690fmr6449809ejb.767.1666180173514; Wed, 19 Oct 2022 04:49:33 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id fg4-20020a056402548400b0045bef7cf489sm10186308edb.89.2022.10.19.04.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Oct 2022 04:49:32 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski Cc: Mikhail Zhilkin , Christian Marangi , Wolfram Sang , Chaitanya Kulkarni , "Martin K . Petersen" , Jens Axboe , Andrew Morton , linux-mtd@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH 1/2] dt-bindings: mtd: partitions: support marking root device partition Date: Wed, 19 Oct 2022 13:48:54 +0200 Message-Id: <20221019114855.31639-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221019_044948_986646_B9BFCD2A X-CRM114-Status: GOOD ( 13.91 ) X-Spam-Score: 0.1 (/) X-Spam-Report: =?utf-8?q?Spam_detection_software=2C_running_on_the_system_?= =?utf-8?q?=22bombadil=2Einfradead=2Eorg=22=2C?= =?utf-8?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_original?= =?utf-8?q?_message_has_been_attached_to_this_so_you_can_view_it_or_label?= =?utf-8?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?utf-8?q?_the_administrator_of_that_system_for_details=2E?= =?utf-8?q?_?= =?utf-8?q?_Content_preview=3A__From=3A_Rafa=C3=85=C2=82_Mi=C3=85=C2=82ecki_L?= =?utf-8?q?inux_needs_to_know_what_to_use_as_root?= =?utf-8?q?_device=2E_On_embedded_devices_with_flash_the_only_common_way_to_s?= =?utf-8?q?pecify_that?= =?utf-8?q?_is_cmdline_=26_root=3D_parameter=2E_That_solution_works_with_U-Bo?= =?utf-8?q?ot_which_is_Linux?= =?utf-8?q?_=26_cmdline_aware_but_isn=27t_available_with_all_market_bootloade?= =?utf-8?q?rs=2E_Also_that?= =?utf-8?q?_method_is_fragile=3A_1=2E_Requires_specific_probing_order_on_mult?= =?utf-8?q?i-flash_devices?= =?utf-8?b?IDIgWy4uLl0g?= =?utf-8?q?_?= =?utf-8?q?_Content_analysis_details=3A___=280=2E1_points=2C_5=2E0_required?= =?utf-8?q?=29?= =?utf-8?q?_?= =?utf-8?q?_pts_rule_name______________description?= =?utf-8?q?_----_----------------------_-------------------------------------?= =?utf-8?q?-------------?= =?utf-8?q?_-0=2E0_RCVD=5FIN=5FDNSWL=5FNONE_____RBL=3A_Sender_listed_at_https?= =?utf-8?q?=3A//www=2Ednswl=2Eorg/=2C?= =?utf-8?q?_no_trust?= =?utf-8?b?IFsyYTAwOjE0NTA6NDg2NDoyMDowOjA6MDoyMjkgbGlzdGVkIGluXQ==?= =?utf-8?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?utf-8?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_record?= =?utf-8?q?_0=2E0_SPF=5FHELO=5FNONE__________SPF=3A_HELO_does_not_publish_an_?= =?utf-8?q?SPF_Record?= =?utf-8?q?_0=2E0_FREEMAIL=5FFROM__________Sender_email_is_commonly_abused_en?= =?utf-8?q?duser_mail?= =?utf-8?q?_provider?= =?utf-8?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?utf-8?q?_0=2E2_FREEMAIL=5FENVFROM=5FEND=5FDIGIT_Envelope-from_freemail_use?= =?utf-8?q?rname_ends?= =?utf-8?q?_in_digit?= =?utf-8?q?_=5Bzajec5=5Bat=5Dgmail=2Ecom=5D?= =?utf-8?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM_or_DK_?= =?utf-8?q?signature_from?= =?utf-8?q?_author=27s_domain?= =?utf-8?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_valid_DK?= =?utf-8?q?IM_or_DK_signature?= =?utf-8?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_signature?= =?utf-8?q?=2C_not_necessarily?= =?utf-8?q?_valid?= =?utf-8?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM_or_DK_?= =?utf-8?q?signature_from?= =?utf-8?q?_envelope-from_domain?= X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org From: Rafał Miłecki Linux needs to know what to use as root device. On embedded devices with flash the only common way to specify that is cmdline & root= parameter. That solution works with U-Boot which is Linux & cmdline aware but isn't available with all market bootloaders. Also that method is fragile: 1. Requires specific probing order on multi-flash devices 2. Uses hardcoded partitions indexes A lot of devices use different partitioning methods. It may be "fixed-partitions" or some dynamic partitioning (e.g. based on parts table). For such cases allow "linux,root-device" property to mark correct flash partition. Signed-off-by: Rafał Miłecki --- .../devicetree/bindings/mtd/partitions/fixed-partitions.yaml | 1 + .../devicetree/bindings/mtd/partitions/partition.yaml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml index ad3ccd250802..e627085df4fc 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml @@ -84,6 +84,7 @@ examples: partition@0 { label = "filesystem"; reg = <0x00000000 0x1 0x00000000>; + linux,root-device; }; }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml index f1a02d840b12..671906acf1bd 100644 --- a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml @@ -52,6 +52,10 @@ properties: immune to paired-pages corruptions type: boolean + linux,root-device: + description: Marks partition that is a root device with filesystem to mount + and boot user space from + if: not: required: [ reg ]