Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4469308rdh; Wed, 29 Nov 2023 02:19:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmAKExt3dl92bH19BJvfyFwpqvUsA+2ho5XqT/Jxn0uxrm69inzEXHCMLVrLCar6y2GqJh X-Received: by 2002:a05:6a20:841e:b0:18b:4f8b:5a05 with SMTP id c30-20020a056a20841e00b0018b4f8b5a05mr26180548pzd.30.1701253172722; Wed, 29 Nov 2023 02:19:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701253172; cv=none; d=google.com; s=arc-20160816; b=HOvUU7RdGvuPImbWs20fIsvdEKzxs7ynuyldHgmgEXH4Z4OPKhhGHw9uiUUNCe17si BpGVT4obY5OKPbHlK7L9TCJVWYzchUQTsGSMjVhZKYkgv32r0r6ssVVMYe6sJRVR68ng snrrb4TbVTxnTxSbQEm+hhfJc1YDdVptuoQZKWzE4esDjNE5yco5ufhIp4R+9fmk52Ww oiKtwHxMa7/nKnAveNKu109a7uH03+YEu3KZjFomcAkpR7j26tsTzwQwyZdDoYIMyIQy rm7WW9eBBbMSZ53u6PZi5ZTfkkuVGcCSE95+V4eVmaTPsF4Ac1GGVhpJsjZ4pdwbxiVk yGnw== 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:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=ZgUs8TNBWSvX+Jw36S2+v7tW/A1ICX2uch1ZvXrvqmc=; fh=EyWsvoINfSIpye8nPhtiLtMOsMpjNCOncFtHSJB33Go=; b=PAApDnpWzTxm7YOJD8aKFxdbeRg8EnvNusnrY6HaHWWCsHBM96TXnLsgNGZjKDc93k TnoSKgr/8NP6j03HDu9/aD1zOPg9ua6Tl/u/yD61vwG6Ww28bgsy0BIkI/+k+2NxVroK l60Z9M7wDvDnvGoErVjahsA9brkpRi0RlzyioM8pURbLxw7xHQ4EoyPia7ROFHMJcMZh hvlBmICEMWsiF+SkDVojobfWaUGwqq9SdyAiYv4cVlp5gCNO45nBIKfBd0Uw66KCW9F7 Dnt2KzV9epp8ScRnTnBKB8eYQF/+pFHg44Fj5/277Zk9Rlh9ZKbVF3iXm6BBz20isLBs ia+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=azMsKPAw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id z8-20020a63e108000000b005b8ee1c0c6bsi14057332pgh.408.2023.11.29.02.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 02:19:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=azMsKPAw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 2F3E08221115; Wed, 29 Nov 2023 02:19:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231127AbjK2KTQ (ORCPT + 99 others); Wed, 29 Nov 2023 05:19:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229848AbjK2KTO (ORCPT ); Wed, 29 Nov 2023 05:19:14 -0500 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1546D10C0 for ; Wed, 29 Nov 2023 02:19:20 -0800 (PST) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-54b7ef7f4d5so3882749a12.1 for ; Wed, 29 Nov 2023 02:19:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701253158; x=1701857958; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ZgUs8TNBWSvX+Jw36S2+v7tW/A1ICX2uch1ZvXrvqmc=; b=azMsKPAw6NJWHPqdr2E72si7D5WFxE7dnd8wB8O2JdDkZ+h7T4U0YIixjVvjOLvqRH xm4WkeTX3TeKNJFZFP9nY3Kx5/8ciooeJq2qMpFU9glP8h23ZJ7YPq1r3d17d4KDnd0c RROtBDds9+440s7QAYZwfoN93dlaDLnt71//mcj/fYP7jcSaUAHT6xUNYYtqNDLADETL W42OE94gf8+qIeCgQenW9Z+TfLeitaRUWK821/UNwZwOvBJ+5SuBQ8pABp9yfvFy8wGx Y8Lp206nUn2vJSIlW4DGcv3sxh4JQ5U1X+Bpf8hBGitoI5WnG7+nTlW6e+/mWRAz6Tsx WzJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701253158; x=1701857958; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZgUs8TNBWSvX+Jw36S2+v7tW/A1ICX2uch1ZvXrvqmc=; b=qPsbi16LP2bpqhwejr5V7avBwsHUX1KPyOAhkfEg1I5EA0iI0u8S7mRnK0WTZ3tQ3g xFeCzTB2Fuc2aknugqWZfSAgxbwa/yc1WESRdZdclv0Fs0SEP+sBgkXziFAttLXrRl2X RJumbOT6aK7Sr89EaH/+uZMQug/YKTbnDzbDK29Jqhsfc4sUg9rpb8A/sZLOvtcrRSXj /JHO/FUmyot1kKZsd7NeuXjsQ50wIA+sJxFsMRh7lPhXD7RIFCaaHlGzpd/hVngh+fI6 gt487k1HeY/xpThX0bpamFEoqNdcRd2/Wup3mPMdM+7Os77HxLU0QHuW4p7ODi2yHJSb dM5A== X-Gm-Message-State: AOJu0YxN6smxRaeXsY2cQU6nLVSQG9fD7rN9/9T5ge0K3osoMlZU3Lvf oUrf0rmx4CqhgZe5C3LvIQcNqA== X-Received: by 2002:a50:cdda:0:b0:54b:1ca8:8520 with SMTP id h26-20020a50cdda000000b0054b1ca88520mr12005347edj.1.1701253158492; Wed, 29 Nov 2023 02:19:18 -0800 (PST) Received: from [192.168.1.20] ([178.197.223.109]) by smtp.gmail.com with ESMTPSA id j18-20020a508a92000000b0054bbfe0c5fcsm1064282edj.94.2023.11.29.02.19.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Nov 2023 02:19:17 -0800 (PST) Message-ID: <46f30852-4824-45b3-bf01-4a4a5ff2cff7@linaro.org> Date: Wed, 29 Nov 2023 11:19:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] docs: dt-bindings: add DTS Coding Style document Content-Language: en-US To: Francesco Dolcini Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Andrew Davis , Andrew Lunn , Arnd Bergmann , Bjorn Andersson , Chen-Yu Tsai , Dmitry Baryshkov , Geert Uytterhoeven , Heiko Stuebner , Jonathan Corbet , Konrad Dybcio , Michal Simek , Neil Armstrong , Nishanth Menon , Olof Johansson , =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, workflows@vger.kernel.org, linux-doc@vger.kernel.org References: <20231125184422.12315-1-krzysztof.kozlowski@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzTRLcnp5c3p0b2Yg S296bG93c2tpIDxrcnp5c3p0b2Yua296bG93c2tpQGxpbmFyby5vcmc+wsGUBBM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9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 29 Nov 2023 02:19:30 -0800 (PST) On 29/11/2023 08:29, Francesco Dolcini wrote: > On Sat, Nov 25, 2023 at 07:44:22PM +0100, Krzysztof Kozlowski wrote: >> Document preferred coding style for Devicetree sources (DTS and DTSI), >> to bring consistency among all (sub)architectures and ease in reviews. > > Thank Krzysztof, we had most of this collected as BKM in some internal > documents and it's great to see the effort to consolidate this and add > it to the kernel documentation. > >> --- >> +Following order of properties in device nodes is preferred: >> + >> +1. compatible >> +2. reg >> +3. ranges >> +4. Standard/common properties (defined by common bindings, e.g. without >> + vendor-prefixes) >> +5. Vendor-specific properties >> +6. status (if applicable) >> +7. Child nodes, where each node is preceded with a blank line > > On point 4, do you have a more explicit way to define what is an actual > standard/common property? You mention the vendor-prefixes as an example, > is this just an example or this is the whole definition? The actual definition is: defined by common bindings, which are: meta-schemas and schemas in dtschema, and common bindings per subsystem (e.g. leds/common.yaml). Lack of vendor-prefix is I think 99% accurate in this matter, but there are some "linux," ones. > > What would be the order for this for example (from an existing DTS file)? > > reg_sdhc1_vmmc: regulator-sdhci1 { > compatible = "regulator-fixed"; > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_sd1_pwr_en>; > enable-active-high; > gpio = <&main_gpio0 29 GPIO_ACTIVE_HIGH>; > off-on-delay-us = <100000>; > regulator-max-microvolt = <3300000>; > regulator-min-microvolt = <3300000>; > regulator-name = "+V3.3_SD"; > startup-delay-us = <2000>; > }; > > I guess the point that is not obvious to me here is where do we want > pinctrl. I like it at position between 3 and 4, the rationale is that is > a very frequent property and this way it will be in a similar place for > every node. Order here is correct but all of them are generic properties, thus this coding style does not define ordering within. Best regards, Krzysztof