From patchwork Fri Oct 21 06:00:50 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: 6518 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp510503wrr; Thu, 20 Oct 2022 23:04:31 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5yx5u+SWCB/Bu4cAekAT+h50/vhnd0P6pOPDtc/fqRXk6yJJyl/Yj+qtIxmCVtCKFXM8hP X-Received: by 2002:aa7:cc90:0:b0:458:b07c:f35f with SMTP id p16-20020aa7cc90000000b00458b07cf35fmr15247561edt.310.1666332271392; Thu, 20 Oct 2022 23:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666332271; cv=none; d=google.com; s=arc-20160816; b=QPYyHuLBym/HlJkvdeIixe9bM5XGe3TkVYBXy47nMjRVxZLDrUrjLALk+RO2c1EgfA dWAI2xarjubzKsq5/io7uyBMvFchoBuD+2oaTcVtAYSQ6pz8Nx+xs65CnweUXJl3qj9x AMo+XighX96Bk0sPsyQFRJtWuunRdecsFuPgmsk2tgVds4GVEl4I+5Is3E420VRMNUe2 mbO3uv5gfnUDITlSwDPW49MeO9IIvWrK5+AObBu5kRwzOP0Q9lyY6e6UexBz0FeDUJ+5 TNrjmBaxNtYC57Bg4ranTLXmiu0wqiQDwDUj4HLeni21wNfNFVZ5W5Qp1OKWFnjr2OWy ebHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=C5hHs2S/RQl/JXIwHudGm/5mav5RsuOJ5skKbHJaT7M=; b=k/z4VWs7Sj0fnTt2ANjulFQt1nFieJXdwHALd4x8GUN3KMeL1k5UsH3N+5vP53GnhT Uy/jz3br1OoKYGz1V16zs/UOpduu4TadfjjaHUstmNGd8jJ+mVIX9QXDKpymtpUXf1c1 lZzg0KcxdGw7UIL+s6YVjYuDXdl0VTMIeAFPxHs1G7uZzhSaCqq6fcZsxsv4pgCuydEU IBP/PdvUFyzqt/kad30fGt4qdDJZ3HR42gPF1OAVGfo28sMw/j3uAz9jjZZvyqF+h2SS CbVByrD5OxGtEMI5ZihNcpoQ5THOuR/cRyBC0mEjWZKMTgl+e3+5xYVod6OTrqxWCN0Q 1TUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OYP1l1n6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qb7-20020a1709077e8700b007721f88d3e0si19570241ejc.554.2022.10.20.23.04.06; Thu, 20 Oct 2022 23:04:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OYP1l1n6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbiJUGBD (ORCPT + 99 others); Fri, 21 Oct 2022 02:01:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbiJUGBC (ORCPT ); Fri, 21 Oct 2022 02:01:02 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1279A1A4003; Thu, 20 Oct 2022 23:00:58 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id g1so3272959lfu.12; Thu, 20 Oct 2022 23:00:57 -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=C5hHs2S/RQl/JXIwHudGm/5mav5RsuOJ5skKbHJaT7M=; b=OYP1l1n6nvRFKN66YMNkW/ZD0biklmoqW7/GKmlBQ/5ENQhPpcHwgnW/rNIUjRoyeq mUi4KXWRSDufdZ1cvTW+/XnGUEaYLFilpxFrjNlzxEDxCFeoa4hoLVhGgnokrL4GUPet uKYNILHU9QWMrCKkaYtUezb0B7qpROKi1T0G3/hNigGE37igbdbYuW2uvo4prBisHInc RUEzuiYlVyFbUVo4KlAGbb6R/AWWoEOYu7HdZU0ekJPUOU2oH4HXT/NQl7KkNx7KZB/t L3IccSVZ1ulaB+TjsnFK+9dkyAMqV/YBwlFRErIyCwwNXGnUijQlIUCwJg60u7yjz9E8 xS7Q== 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=C5hHs2S/RQl/JXIwHudGm/5mav5RsuOJ5skKbHJaT7M=; b=7EMsyztakmfRRe2zr23yF2ft/z26d8HOGVOVvypa0C4Dq8QhD2SYIK6tT69rLjMGN4 ZkHhCeMQZ/IVrcO4Xz1hJYdobO3vKpFT1FMYk5x18IqUhWQo7y8ZRVvmkNGcjgD47ts9 BZy5UqWdASpXXTa1+5jFjumuSUEkZHQoaVCdaE9i8UJUR7/P7TE/Vgm2ZDPHO7j/AT/x ZNmb2CaARC4stxeOY8wgt5uSKZHASGJra9mD7BqpSDdGmy75tGjtOuppYq1guBA+8ZuR jhKHEr66OT/zv0u6crgYtpQXn8sZtT0zT+XkIXgazPK8TupnzorB8sqc5QaDpB5W4KIz DC8g== X-Gm-Message-State: ACrzQf3RVbqEA+W05gbsA6J3sSkEQrDaclWs8pkl9XhyEV85OU/ktDV+ eTAIZ5x5v06+GshQ2YNjMXE= X-Received: by 2002:ac2:5321:0:b0:4a4:3c25:dbd with SMTP id f1-20020ac25321000000b004a43c250dbdmr5837748lfh.406.1666332056154; Thu, 20 Oct 2022 23:00:56 -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 p6-20020ac246c6000000b0049e9122bd0esm3021950lfo.114.2022.10.20.23.00.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 23:00:55 -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 V2 1/2] dt-bindings: mtd: partitions: support marking rootfs partition Date: Fri, 21 Oct 2022 08:00:50 +0200 Message-Id: <20221021060051.2508-1-zajec5@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747276027981537093?= X-GMAIL-MSGID: =?utf-8?q?1747276027981537093?= 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,rootfs" property to mark correct flash partition. Signed-off-by: Rafał Miłecki --- V2: Use "linux,rootfs" as more accurate. Thanks Rob. --- .../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..d66a6e3bcb56 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,rootfs; }; }; diff --git a/Documentation/devicetree/bindings/mtd/partitions/partition.yaml b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml index f1a02d840b12..a25cd23a34c0 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,rootfs: + description: Marks partition that contains root filesystem to mount and boot + user space from + if: not: required: [ reg ]