Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1516790ybb; Sat, 11 Apr 2020 05:26:52 -0700 (PDT) X-Google-Smtp-Source: APiQypLfQvM0syHB6a/qQpAKXlgWScdpnM1yqFjkiG5pqtn/1BZpM4/1xmppJIH8Tf7Ars3t0FPC X-Received: by 2002:a05:620a:21d0:: with SMTP id h16mr8489530qka.104.1586608012532; Sat, 11 Apr 2020 05:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586608012; cv=none; d=google.com; s=arc-20160816; b=KhG9M3YcZbr7V5PTScAYiDdy8WMDW8OISgj5mpD+Rv9orbAIw674xJ5vEmxRk5jTyN dk9jDphv6GpLorqxnxaxmRKHU+Q2/k4ua1MhA5Dxn9qVjCQhSDtCc4fPTVFpV4EAOGhi T9HPIdTiDlqqPNhDzPZILEFrPZ4oDmih6gOYVaE+NyXiRFpzgDGRCf3oFPVtd9NaAbrq HF9csOca5nO9MA0jAVO1VjCnhB1jHAo8tzEPyLAzcBD++4SB8JRM5xasx+LcCdb3/NX+ Kkst5zVhjpAw9k78HAcAQOL7nsvmNljU24B9NqDux+d7caTyhN+ZFgMlqs2oorC/kWyV /rkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=PXnvbLdLrQw02Pv9aTraJTstO6BsBfshSbSvruk1AoI=; b=uAdTizdHYyF57a0wMMs6FKyZZmEGbc53YVCyy4gowLzivgmGh2BuUgFi52PYZhs7le PMOixrKA+VsLyDQHnS6QVAlAqUdMrb5EVMB7ZwvPwDpj1T9gcV+OxgY0G2sXgzzc2IeZ rGzpjdD3ndsPKXQbi8KKQoetG4JKaeKrZsioNbMVPO1haAllfSOn6HPlCCBH8Bl6J0ep T2lTXGFitJ+CVBn4TWtivixfJET7Gus2x9VLPyE3bZ/qIUNZXUQAU2ZLbBM4j4bHGTQZ jo674yweTBDDVRQ5J9WqqoMRQwham5yPXEjqBMpcGqcKAClx6FWmfgFbe0c/Or+svhlF /CPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eVKtwmuP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4si2934353qkb.19.2020.04.11.05.26.38; Sat, 11 Apr 2020 05:26:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eVKtwmuP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729010AbgDKMZR (ORCPT + 99 others); Sat, 11 Apr 2020 08:25:17 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:42914 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728546AbgDKMZQ (ORCPT ); Sat, 11 Apr 2020 08:25:16 -0400 Received: by mail-wr1-f67.google.com with SMTP id j2so5044807wrs.9; Sat, 11 Apr 2020 05:25:14 -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=PXnvbLdLrQw02Pv9aTraJTstO6BsBfshSbSvruk1AoI=; b=eVKtwmuP9eIdsk0DhszqFM/hq7WkqRqir5lOWmDDJZ+lZVcGXyuUuO/jOnjM8mDYM+ SFYkcV9yi9yuUYTPhE2MftExFAECb2nT5xyY8TKHr7yD9lTPMjb9SlFwUnejhZ62EscA toWiRpCF6/OhwypaUSnWTJ+yLZk/kyKeRmg5ztC4/axZrd8Yhmid80PA+dDCmM3agaDM QTk01KBvlhT/6u15/u6/GDqWSNwWBAOGMk+R7SUs/3Ezir6yzC354SZFHsS16HbXG9e9 X76vq9XIbqCmrPwdVP+Esd3xTNJDcxCkSGKb8ZJuVinoBP/X0GXyPmhZiWyRSzOEZV4o YBqQ== 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=PXnvbLdLrQw02Pv9aTraJTstO6BsBfshSbSvruk1AoI=; b=CKMxZZ8INH5cNMiLVd3BZoWJYR9UrKOOvSxTH3ycu5Zum8P5R5MiF5ihKmIOkY5w4r SZ+se6taE+qRyNRdFyr3YPemHAn5ZQ3sS28in1d9GPBlIpS9cjtazo7YPbofm0edFnfO b80wgC28iJQjJdawHgpwBp2V/aa2/5udqUuROboiUa1im9+tNMDrau0RZC7XdDTKbw2g vSe5m1nE5KZW6a2WjwJltcjwtIRHunwamGttzh9Z/GqYiJrc9W26SLR5MkKjfMP7c3le eTgcZL8TMk4OjvHshXFUI4zi/57eDTzjJBvHQLIYRCcGirRmh9eRG7xxAJdLn8afPGl7 xing== X-Gm-Message-State: AGi0PuaYs3/5g8+kaPzRueDdLx5eAo5si93JwyyeCmsUH2SxA/p7pDo7 51wtV/isFmurCsN1YO5PHXGZ4cVf X-Received: by 2002:adf:f9cc:: with SMTP id w12mr9762920wrr.148.1586607914276; Sat, 11 Apr 2020 05:25:14 -0700 (PDT) Received: from debian.home (ip51ccf9cd.speed.planet.nl. [81.204.249.205]) by smtp.gmail.com with ESMTPSA id v19sm675565wra.57.2020.04.11.05.25.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Apr 2020 05:25:13 -0700 (PDT) From: Johan Jonker To: heiko@sntech.de Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4] dt-bindings: sram: convert rockchip-pmu-sram bindings to yaml Date: Sat, 11 Apr 2020 14:25:07 +0200 Message-Id: <20200411122507.4040-1-jbx6244@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Current dts files with 'rockchip-pmu-sram' compatible nodes are now verified with sram.yaml, although the original text document still exists. Merge rockchip-pmu-sram.txt with sram.yaml by adding it as description with an example. Make #address-cells, #size-cells and ranges optional if there are no child nodes to prevent yaml warnings. Signed-off-by: Johan Jonker --- Changes v4: Make some properties optional Changes v3: Document the compatible Changed v2: Merge with sram.yaml --- .../devicetree/bindings/sram/rockchip-pmu-sram.txt | 16 ------------- Documentation/devicetree/bindings/sram/sram.yaml | 26 +++++++++++++++++++--- 2 files changed, 23 insertions(+), 19 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sram/rockchip-pmu-sram.txt 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/sram.yaml b/Documentation/devicetree/bindings/sram/sram.yaml index 7b83cc6c9..f474fee47 100644 --- a/Documentation/devicetree/bindings/sram/sram.yaml +++ b/Documentation/devicetree/bindings/sram/sram.yaml @@ -29,6 +29,7 @@ properties: enum: - mmio-sram - atmel,sama5d2-securam + - rockchip,rk3288-pmu-sram reg: maxItems: 1 @@ -118,9 +119,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 @@ -224,6 +234,16 @@ examples: }; - | + // Rockchip's rk3288 SoC uses the sram of pmu 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. + sram@ff720000 { + compatible = "rockchip,rk3288-pmu-sram", "mmio-sram"; + reg = <0xff720000 0x1000>; + }; + + - | // Allwinner's A80 SoC uses part of the secure sram for hotplugging of the // primary core (cpu0). Once the core gets powered up it checks if a magic // value is set at a specific location. If it is then the BROM will jump -- 2.11.0