Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp179945iob; Mon, 2 May 2022 16:26:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU45DurYDO6AiN45yEEUD87Goy1z0eEOjf9fHBaR7jKKAW+B7pukOcLL680T47tc2QO7uH X-Received: by 2002:a05:6a02:10d:b0:381:f4c8:ad26 with SMTP id bg13-20020a056a02010d00b00381f4c8ad26mr11446238pgb.135.1651533960817; Mon, 02 May 2022 16:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651533960; cv=none; d=google.com; s=arc-20160816; b=bp3Ua6yVufFMVBc+LVFr49mPs16EDGaQYuyxZzJhvnT48lOk379Tv0k73ETJh3F21w bYnqJR8yMgdwr2uOh291daOGCoOHLeQF4Q+r+SnH5LgdKjuOhMN0O2UQ6XonB7I3ccUj VNreOw5XPva3dW0yywi0TwM2yQVHfLbNi0KuOEv23aCOHD/DpDnVkt5nA/ISqU5Gjhlm btu4PHpDzAxjqkP3O80B2UQ2efWhooNBw9I/waB8Y+QuyVZ6FUQxHzLwL7ydDurCuuqq 2PDmxR0SUp+zp2lKCHGFarZb8WPcKnQwfvMQqVkA8KPGzVf/tmybq/XbF0eFPLbT8hL8 JqmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=giNJtnXNgjus22Md6SDUlBihs7U3KtlYNlVQZ8xutao=; b=BgTJwp0WDXoORNVe+d5kh9qAD4SDJ1TgZroD7bHX8tYGhJ8CeCsX8QfuFEqJCJlajA CWvnWIS5F1YjkEpnA+S0IJ5FBjwldjP1dBvnl+wb3fko31knu17CHF3xc1sQjZqkNQav MNRccwjkTAHEu2bqOBok4w0fjpoAklUvKYrYaqvrw/xU0L1x01vm5nsfy4Bs3XdgJFpa 7Yz34U35XqgxKfN9X8Rm0SmgA+u5HxGHw3bcouz/dlsf+8Jt96Dm9QrRM7L1ld7Vltrr zXnkJyzdrzF+gbgmRONwySw0JASDz3knn4rSTLl3IiWcv84AGH/E1vgzuHT6IQf0+NIZ J0ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a2R50dzL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p22-20020a63e656000000b003aa619920a1si15151442pgj.527.2022.05.02.16.26.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 16:26:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a2R50dzL; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9F97BB7F7; Mon, 2 May 2022 16:25:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346206AbiEAOzV (ORCPT + 99 others); Sun, 1 May 2022 10:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232359AbiEAOzU (ORCPT ); Sun, 1 May 2022 10:55:20 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3180E5620C; Sun, 1 May 2022 07:51:54 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id i19so23634516eja.11; Sun, 01 May 2022 07:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=giNJtnXNgjus22Md6SDUlBihs7U3KtlYNlVQZ8xutao=; b=a2R50dzLINR25axZ4jeR88HH5E2Nq307jUkh0Fm5GrUuuRZWzUqA4Q5Hcg1nz8NZc1 DJxtx5/pE/tUY54O2NEmiZke2aFCxfiJy2CzXyM38kTCegrxmEM7fJZOmq6ftT4KK4Ox VdGDODvbOAA6OjKoCjwOV/wcXudhvsbdlJykUnA5bwPlDv2gMYRSK0uyVMnIf+KhDKr3 /mz52xADn7825LNNfzJ8WXSFZArwfq2FQMx2cN9b9bNepacrtjkulh1LW2V/hR0FMaRy AaA/tidfxqpRattY6gdS91nAKByH52NvlzonTRWrRjS9bdMN5abTt1B4ULrY9McMdJG+ k57w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=giNJtnXNgjus22Md6SDUlBihs7U3KtlYNlVQZ8xutao=; b=Is8cJBwtYuOA3obtP43pxrLT9dMq6+FVxCK6K2YbvsAekdJrxhKVjOPylOyEKpn5Eq fWOxIYEUDtzSa0em4VlpnOzW1hbkl+bu53xtwKaOlOJK2IHBr3NSfILb300UwCkedeS5 sZN4FbLYcuUOwFPFqW9HqgnJdbwJgyx64tuY0h4YAR30jPIiPKXuC1awJq1+bVimwCmp RRZHz6YIExQ/fAF5wnPoXM57O2NVlLXdQmeOoYTPvy8v3XmVAoGuTy0lTnY91v3RPeAX x8dyQEBVcMRuGC8b+kgqKLNEUYzswEYpu4vZdodPPEGB90Ght8NQtswlVJ9rcyEs31Lo 2MuA== X-Gm-Message-State: AOAM530+Azk4BFlWfQWSz/liIRre4B/1PlzDv1rdRhwdjwjGmvVlZkW8 6tt01HqSa1Nwqf7GanR14Rg= X-Received: by 2002:a17:906:559:b0:6f3:8ba6:39c8 with SMTP id k25-20020a170906055900b006f38ba639c8mr7852405eja.486.1651416712663; Sun, 01 May 2022 07:51:52 -0700 (PDT) Received: from ?IPV6:2a06:a003:501a:a7ce:5405:3d01:56ff:a60d? ([2a06:a003:501a:a7ce:5405:3d01:56ff:a60d]) by smtp.gmail.com with ESMTPSA id de46-20020a1709069bee00b006f3ef214e5asm2667120ejc.192.2022.05.01.07.51.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 01 May 2022 07:51:52 -0700 (PDT) Message-ID: <909094fd-ded0-38f9-b374-dd5f7b63e298@gmail.com> Date: Sun, 1 May 2022 17:51:49 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: [PATCH v2 1/2] dt-bindings: mtd: partitions: Add binding for Sercomm parser Content-Language: en-US To: Krzysztof Kozlowski , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Rob Herring , Krzysztof Kozlowski Cc: NOGUCHI Hiroshi , Karim , M , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org References: <20220406195557.1956-1-csharper2005@gmail.com> <20220406195946.2019-1-csharper2005@gmail.com> <8d0d8b27-35ff-3693-cf80-897b80c26b4e@linaro.org> <57bebf2f-af4c-b2d9-10e5-19e5104946fb@gmail.com> <29cfa017-bbaf-3aba-fe1d-06771957dbaa@linaro.org> <1b391399-984b-7a63-3265-62ef09caec39@gmail.com> <25da3f43-c46e-8108-2da9-0e4f2b7cc1a4@gmail.com> <1c19faf9-fc1c-9adf-d038-97b673a8f0be@gmail.com> <0450d781-c506-c28e-a0e5-435bee16721f@gmail.com> <2e51842a-d2c9-8953-13aa-02ad3abb3f14@linaro.org> <6c3ba4a7-80b0-5fd1-eb08-1f9e256b02c4@linaro.org> From: Mikhail Zhilkin In-Reply-To: <6c3ba4a7-80b0-5fd1-eb08-1f9e256b02c4@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On 5/1/2022 11:17 AM, Krzysztof Kozlowski wrote: > On 30/04/2022 20:54, Mikhail Zhilkin wrote: >>  patternProperties: >>    "@[0-9a-f]+$": >> -    $ref: "partition.yaml#" >> +    allOf: >> +      - $ref: "partition.yaml#" >> +      - if: >> +          properties: >> +            compatible: >> +              contains: >> +                const: sercomm,sc-partitions >> +        then: >> +          properties: >> +            sercomm,scpart-id: >> +              description: Partition id in Sercomm partition map. Parser >> +                uses this id to get partition offset and size values from >> +                dynamic partition map. > Partition offset and size values are not derived from scpart-id. I am > sorry but after all these questions - it's the third time now - you > never answer why do you need this property and what is it used for. From > all the examples it could be simply removed and the partition map will > be exactly the same. scpart-id is necessary to get (using mtd parser) partition offset and size from dynamic partition map (NOT from the reg property): ❯ xxd -e -c 12 -s $((0x800)) -l $((0x78)) mtd1 00000800: 00000000 00000000 00100000  ............ 0000080c: 00000001 00100000 00100000  ............ 00000818: 00000002 00200000 00100000  ...... ..... 00000824: 00000003 00300000 00100000  ......0..... 00000830: 00000004 00400000 00600000  ......@...`. 0000083c: 00000005 00a00000 00600000  ..........`. 00000848: 00000006 01000000 02000000  ............ 00000854: 00000007 03000000 02000000  ............ 00000860: 00000008 05000000 01400000  ..........@. 0000086c: 00000009 06400000 01b80000  ......@.....           scpart-id  offset      size With sercomm,sc-partitions the reg property will be ignored (offset = 0x200000, size = 0x100000) and the values will be taken from partition map. For example we have this is dts: partition@200000 {             label = "Factory";             reg = <0x200000 0x100000>;             sercomm,scpart-id = <2>;             read-only;         }; Dynamic partition map: scpart-id = 2; offset = 0x00200000; size = 0x00100000 00000002 00200000 00100000  ...... ..... In this example the offset and size are the same in reg and dynamic partition map. If device have bad blocks on NAND the values will be a little different. And we have to take partition offsets from partition map to avoid boot loops, wrong eeprom location and other bad things. Is there anything that needs to be explained in more detail? > Best regards, > Krzysztof -- Best regards, Mikhail