From patchwork Tue Mar 17 16:35:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 11443371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5257992A for ; Tue, 17 Mar 2020 16:36:20 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1C78C2073E for ; Tue, 17 Mar 2020 16:36:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UF3LyLlz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a47jTiix" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C78C2073E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=t50NoYAZcktltc/6wxQyvwBbIgzRX70kz3Nglc2u+QQ=; b=UF3 LyLlzofKgHtzhNVoq9+GG38naJvZN2dcbtudEzolccKRZlXHhLL445oADd+tqkA/N38wqBy9bVn4L cZJyOr2ZcE7RmayAVQnC/a3UOdVH8ZKxWLY4yl6tw+X1rUIBnJ0HpRAH2t1c4OMdcM8rpj1HAtjxk Khsr9U1tWv6S2YUHKT7PEooPvyNHhv/h+RCy/mTN/lWylk/7md9z2lZWfhsKZUCssFrkJHpbl7ByX bBt4lbej9xN2X0RSHyem0/fLxJn0QjDGYsx/su7AOMV3O+OmhCrKjympu9lFjJO9oHd8hbkFmB0WW Jn+CTo2FNtaAyMfivPlcKGyVirzRjVw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEFCQ-0003Bw-5y; Tue, 17 Mar 2020 16:36:14 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEFCG-00033H-2W; Tue, 17 Mar 2020 16:36:05 +0000 Received: by mail-wm1-x341.google.com with SMTP id z13so6134043wml.0; Tue, 17 Mar 2020 09:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=WiB0u/leEGdcW1B+cHUhgFUc+5o/BZhuLHHQx8vVK4Y=; b=a47jTiixaLJG9rKjBDKQjHrYCYALh0axG7IEvuZmG5kxyTi7LzW49WxdAtDI3N1B08 fNZ9DSCMu+gE61Ca4ftdVmbNPN0bDsaPdrrtdhYEv50m827YOKLS/6Gd6O1NLO+0l5gG vUrhlc3K4hhmbVBv7ceC0vxDHPBGEoACsmXtx9T3Xr/zY5gZyyuJ0tycgNE6D7Gnu7tv bNyRVzJDxkwtExRU1s39sfiYY+LuPgFnZzZ3qyWB+emuzKu5yUnPOvqpIgSNHZzkLnkh KrweK3LyHhw3j9ITk66Fqm7fVi8MzYGKDkLeVbXd+Pf/yQe8aJIv53p17+b3NigbrGjg /zoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WiB0u/leEGdcW1B+cHUhgFUc+5o/BZhuLHHQx8vVK4Y=; b=i5px2cq6PK/yPUKcpJ9cunz/uzATDi1FYVKfYLpr+XHrIOjD61//Xn66wnPNpOUnHX RQGlrUMNYPh6uStPzP4bfgSQsdBP78mM7zn7uh4Eh/JF3f4eiU4KKMXzNeqVPPpXbASh zf7/SIvQCQsrFqply+gDKACgPEUuzZszMKp2KJvB1uNZ++7lhdlfggqi/kHW5+pJTwsX Q5l90l5iGUv2yC28nJdhp3UpwQ6eoY9MUJ0i6oBPezrRLA2zrDuN+mJw1bsuMBKpVQai MHHvsBtJmiDwoIxz8+iRURaa+jdCfegMIOFOznc6k0q1PUGfmNcCyrGNmxVhNPakpdJJ Xc/w== X-Gm-Message-State: ANhLgQ1hL0//9sf/Cxmfsz4yBhSj1xhdM4aNyG67tC0HGviPnZLULd9R kpzZe8qJdk6v7qTMjKD4B10= X-Google-Smtp-Source: ADFU+vvTbdxbQ8NuM1t3+foh2whJCugiJIlAkWJHzkdA1yliE1Ar3iJ2fVnrlc/J0tx6/r10MnuCGw== X-Received: by 2002:a1c:7f10:: with SMTP id a16mr145719wmd.1.1584462962316; Tue, 17 Mar 2020 09:36:02 -0700 (PDT) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id b10sm5389702wrm.30.2020.03.17.09.36.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2020 09:36:01 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Subject: [RFC PATCH 1/2] dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml Date: Tue, 17 Mar 2020 17:35:54 +0100 Message-Id: <20200317163555.18107-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200317_093604_141097_BC3BE8CA X-CRM114-Status: GOOD ( 13.41 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [jbx6244[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [jbx6244[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Current dts files with 'rockchip-pmu-sram' compatible nodes are manually verified. In order to automate this process rockchip-pmu-sram.txt has to be converted to yaml. A check with the command below gives for example this error: arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff700000: compatible:0: 'rockchip,rk3288-pmu-sram' was expected arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff700000: compatible: ['mmio-sram'] is too short Fix this error by adding an extra 'mmio-sram' compatible and 'if then' structure to filter yaml warnings. make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/ rockchip-pmu-sram.yaml Signed-off-by: Johan Jonker --- .../devicetree/bindings/sram/rockchip-pmu-sram.txt | 16 -------- .../bindings/sram/rockchip-pmu-sram.yaml | 46 ++++++++++++++++++++++ 2 files changed, 46 insertions(+), 16 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt create mode 100644 Documentation/devicetree/bindings/sram/rockchip-pmu-sram.yaml diff --git a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt deleted file mode 100644 index 6b42fda30..000000000 --- a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt +++ /dev/null @@ -1,16 +0,0 @@ -Rockchip SRAM for pmu: ------------------------------- - -The sram of pmu is used to store the function of resume from maskrom(the 1st -level loader). This is a common use of the "pmu-sram" because it keeps power -even in low power states in the system. - -Required node properties: -- compatible : should be "rockchip,rk3288-pmu-sram" -- reg : physical base address and the size of the registers window - -Example: - sram@ff720000 { - compatible = "rockchip,rk3288-pmu-sram", "mmio-sram"; - reg = <0xff720000 0x1000>; - }; diff --git a/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.yaml b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.yaml new file mode 100644 index 000000000..bb72e4f53 --- /dev/null +++ b/Documentation/devicetree/bindings/sram/rockchip-pmu-sram.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sram/rockchip-pmu-sram.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Rockchip SRAM for pmu + +description: + The sram of pmu is used to store the function of resume from maskrom(the 1st + level loader). This is a common use of the "pmu-sram" because it keeps power + even in low power states in the system. + +maintainers: + - Heiko Stuebner + +# The extra 'mmio-sram' compatible and 'if then' structure is needed +# to filter yaml warnings. +properties: + compatible: + oneOf: + - const: mmio-sram + - items: + - const: rockchip,rk3288-pmu-sram + - const: mmio-sram + + reg: + maxItems: 1 + +if: + properties: + compatible: + contains: + const: rockchip,rk3288-pmu-sram + +then: + required: + - compatible + - reg + +examples: + - | + pmu_sram: sram@ff720000 { + compatible = "rockchip,rk3288-pmu-sram", "mmio-sram"; + reg = <0xff720000 0x1000>; + }; From patchwork Tue Mar 17 16:35:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Jonker X-Patchwork-Id: 11443377 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B19F692A for ; Tue, 17 Mar 2020 16:36:33 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8F81420735 for ; Tue, 17 Mar 2020 16:36:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="a3wSp6P7"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ae4n6jEj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8F81420735 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=VQaftTUpzRz3a7fR5remG0cNVTg5UiqO/+WML37o0QM=; b=a3wSp6P7pXsxyNTF4P7dib15c7 1Q0RQkCpgQahEPMQa6U8j/76GIP0bfX2ixIxWKBqPizIAiu0FHZQCjO80ZC8X6VQ/Q+7HfyFfjKNA wPbxWeSaEOpDrqqfbH8Qd2uXAXl7B5bImokvIRQGvvVpzZaUn5gHwxNQReTf9UPmYq00+P24+gcPg uzmZTmBjvKxH7OFGA4JiTEvMRhKLND9yP3mR7VhJTAvZHsEtWdDkHKfbRJeIaGqoouAwpZbzUlfM/ vMJej81cSiJShBZ4Lnp5A6Vu+PNzD695KwRzc8KHmwLOFJKrQQ0C97SFASJ3TadViCTyUtSh4YR3M gVG9VaZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEFCe-0003T3-9k; Tue, 17 Mar 2020 16:36:28 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jEFCG-00033I-Ka; Tue, 17 Mar 2020 16:36:06 +0000 Received: by mail-wm1-x342.google.com with SMTP id z13so6134110wml.0; Tue, 17 Mar 2020 09:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=pjMnwjFJerbx0N3L2Dqt4xop1wyGSpDLGCMz6+TnU/s=; b=ae4n6jEjH+OoCBS3DnCEY+jJdqGdHoFGgsv2iRa/Cup2ogFIxxfK4FqkXdeKrPHJjG Ik/j9T4EEt12OeXtkoJyGcezLGrulc504g7REHd58NzxHSwPYmSw9GQqbCUPGn/uQlnZ AiojD5bU/QJsdFQP2QlQcdP+GZTg4N3K2ZHkqL+sPY2H/IRoE5riBfgejccuahVRH71T HbrTTgF+1x8EqHv9pBZOoUpFTE17T2HiRjFN0UZKK5ASEK9nl2TOakhivBhivLlFRuqS Tmi4R0dsNh3/ScEt2CBSROrbPl03upAOGp4siQdjiOsNF30lNwxBxH/ZFzrRKyglU+zP hNAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=pjMnwjFJerbx0N3L2Dqt4xop1wyGSpDLGCMz6+TnU/s=; b=XRhoAnQpjLgFwk9EKau6nci+DRRoDJvpoDiKyF54jGSPOsQBAVvB0/ed/oD/UNaVCD GC7YWs66HUpS4oYOx4Pfy1HOaioqt5MMPYtoMuYJ4UjRKgvnl90nxh4E77cQ9c3ks+gm APdHVUH6mSTCMjVWBa+IguhOCfaYLzTJrSHy51MPtcsW7pLvzJd5AlLEuhryBvuTPn7Z K7hBPnoiqnQPT0KZxolzljPngxK6TtNVSdO+jjH1K/TuvsQV9ONJmBIpm86AVRZjuxHK x34qpWCoM7LisOl5hG7bgBx4c3BKBXwCWw6K8pyZNQGWpNmAKpNHcPjvZWf9w8HWoC98 3psg== X-Gm-Message-State: ANhLgQ21hH8w+Njeij7MyZ14ld9BLzWeQn84kGgPyo/1VeUc3g2ejATP zuxEKH5hN0vo9NULgl9YHDq7ARNN X-Google-Smtp-Source: ADFU+vvBNQ5z4r9YWuB8B/zFVlS25fu6bKiScd+gMjdgNptjWWj9nway+jpZRp+sZT2jBqbDdFBFng== X-Received: by 2002:a7b:cb44:: with SMTP id v4mr138704wmj.29.1584462963204; Tue, 17 Mar 2020 09:36:03 -0700 (PDT) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id b10sm5389702wrm.30.2020.03.17.09.36.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2020 09:36:02 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Subject: [RFC PATCH 2/2] dt-bindings: sram: fix yaml warnings for rk3288-pmu-sram compatible nodes Date: Tue, 17 Mar 2020 17:35:55 +0100 Message-Id: <20200317163555.18107-2-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200317163555.18107-1-jbx6244@gmail.com> References: <20200317163555.18107-1-jbx6244@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200317_093604_672099_4D5DAE37 X-CRM114-Status: GOOD ( 10.56 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [jbx6244[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [jbx6244[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, robh+dt@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org A test with the command below gives for example these warnings: arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000: '#address-cells' is a required property arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000: '#size-cells' is a required property arch/arm/boot/dts/rk3288-evb-act8846.dt.yaml: sram@ff720000: 'ranges' is a required property Fix this error by making '#address-cells', '#size-cells' and 'ranges' required for all compatible strings except for 'rockchip,rk3288-pmu-sram'. make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/sram.yaml Signed-off-by: Johan Jonker --- Documentation/devicetree/bindings/sram/sram.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/sram/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml index 7b83cc6c9..f06d254ba 100644 --- a/Documentation/devicetree/bindings/sram/sram.yaml +++ b/Documentation/devicetree/bindings/sram/sram.yaml @@ -118,9 +118,18 @@ patternProperties: required: - compatible - reg - - "#address-cells" - - "#size-cells" - - ranges + +if: + properties: + compatible: + contains: + const: rockchip,rk3288-pmu-sram + +else: + required: + - "#address-cells" + - "#size-cells" + - ranges additionalProperties: false