From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8DF39C38A2A for ; Sat, 9 May 2020 00:30:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7784124953 for ; Sat, 9 May 2020 00:30:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbgEIAat (ORCPT ); Fri, 8 May 2020 20:30:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727878AbgEIAat (ORCPT ); Fri, 8 May 2020 20:30:49 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAFE7C061A0C; Fri, 8 May 2020 17:30:48 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id A551E2A33C2 Received: by earth.universe (Postfix, from userid 1000) id 5EC5C3C08C6; Sat, 9 May 2020 02:30:45 +0200 (CEST) Date: Sat, 9 May 2020 02:30:45 +0200 From: Sebastian Reichel To: Serge Semin Cc: Rob Herring , Serge Semin , Alexey Malahov , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] dt-bindings: power: reset: Convert syscon-reboot-mode to DT schema Message-ID: <20200509003045.3mi7cfey6cmlidul@earth.universe> References: <20200507233846.11548-1-Sergey.Semin@baikalelectronics.ru> <20200507233846.11548-2-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ur4wzzx455z2lgxp" Content-Disposition: inline In-Reply-To: <20200507233846.11548-2-Sergey.Semin@baikalelectronics.ru> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --ur4wzzx455z2lgxp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, May 08, 2020 at 02:38:44AM +0300, Serge Semin wrote: > Modern device tree bindings are supposed to be created as YAML-files > in accordance with dt-schema. This commit replaces SYSCON reboot-mode > legacy bare text bindings with YAML file. As before the bindings file > states that the corresponding dts node is supposed to be compatible > "syscon-reboot-mode" device and necessarily have an offset property > to determine which register from the regmap is supposed to keep the > mode on reboot. >=20 > Signed-off-by: Serge Semin > Reviewed-by: Rob Herring > Acked-by: Sebastian Reichel > Cc: Alexey Malahov > Cc: Thomas Bogendoerfer > Cc: Paul Burton > Cc: Ralf Baechle > Cc: Arnd Bergmann > Cc: Allison Randal > Cc: Richard Fontana > Cc: Kate Stewart > Cc: Thomas Gleixner > Cc: linux-mips@vger.kernel.org > --- Thanks, I queued this patch to power-supply's for-next branch. For the other two patches I will wait for Rob's feedback. -- Sebastian > .../power/reset/syscon-reboot-mode.txt | 35 ------------ > .../power/reset/syscon-reboot-mode.yaml | 55 +++++++++++++++++++ > 2 files changed, 55 insertions(+), 35 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/power/reset/syscon-= reboot-mode.txt > create mode 100644 Documentation/devicetree/bindings/power/reset/syscon-= reboot-mode.yaml >=20 > diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot-= mode.txt b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode= =2Etxt > deleted file mode 100644 > index f7ce1d8af04a..000000000000 > --- a/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt > +++ /dev/null > @@ -1,35 +0,0 @@ > -SYSCON reboot mode driver > - > -This driver gets reboot mode magic value form reboot-mode driver > -and stores it in a SYSCON mapped register. Then the bootloader > -can read it and take different action according to the magic > -value stored. > - > -This DT node should be represented as a sub-node of a "syscon", "simple-= mfd" > -node. > - > -Required properties: > -- compatible: should be "syscon-reboot-mode" > -- offset: offset in the register map for the storage register (in bytes) > - > -Optional property: > -- mask: bits mask of the bits in the register to store the reboot mode m= agic value, > - default set to 0xffffffff if missing. > - > -The rest of the properties should follow the generic reboot-mode descrip= tion > -found in reboot-mode.txt > - > -Example: > - pmu: pmu@20004000 { > - compatible =3D "rockchip,rk3066-pmu", "syscon", "simple-mfd"; > - reg =3D <0x20004000 0x100>; > - > - reboot-mode { > - compatible =3D "syscon-reboot-mode"; > - offset =3D <0x40>; > - mode-normal =3D ; > - mode-recovery =3D ; > - mode-bootloader =3D ; > - mode-loader =3D ; > - }; > - }; > diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot-= mode.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mod= e.yaml > new file mode 100644 > index 000000000000..9b1ffceefe3d > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.ya= ml > @@ -0,0 +1,55 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/reset/syscon-reboot-mode.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Generic SYSCON reboot mode driver > + > +maintainers: > + - Sebastian Reichel > + > +description: | > + This driver gets reboot mode magic value from reboot-mode driver > + and stores it in a SYSCON mapped register. Then the bootloader > + can read it and take different action according to the magic > + value stored. The SYSCON mapped register is retrieved from the > + parental dt-node plus the offset. So the SYSCON reboot-mode node > + should be represented as a sub-node of a "syscon", "simple-mfd" node. > + > +properties: > + compatible: > + const: syscon-reboot-mode > + > + mask: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Update only the register bits defined by the mask (32 b= it) > + > + offset: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Offset in the register map for the mode register (in by= tes) > + > +patternProperties: > + "^mode-.+": > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Vendor-specific mode value written to the mode register > + > +additionalProperties: false > + > +required: > + - compatible > + - offset > + > +examples: > + - | > + #include > + > + reboot-mode { > + compatible =3D "syscon-reboot-mode"; > + offset =3D <0x40>; > + mode-normal =3D ; > + mode-recovery =3D ; > + mode-bootloader =3D ; > + mode-loader =3D ; > + }; > +... > --=20 > 2.25.1 >=20 --ur4wzzx455z2lgxp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl61+awACgkQ2O7X88g7 +pqzEA/+Op6qhzk78p5C+O+Dmu3nhHxsCMWMYu8TJI/RtuiicengIHySqfmjR2HM CSleCh6877cDg5pdedah1nn5XU44+Rm5nEl7focIWuyunCsRoQlYUj6/PfFCCbTg E1JdE4/PyB4CNQLuAcADP1dQLJXjTOWvxGGjjRV+kSAKzMAMJuTuMCLWdo9Cewvf qf6w5lyxaskfUIO9wgMR6qe/8XiqBgEJ1Es4XfFaiotNpC9ED82lQj79rgCuofJc K+il2gJqYkFlUQqgjlxb98M6Rrbin6xKtx/kq7SvoKoorjLom10g2EA4DEu7sIVN hvMcfJjFt/n5qEUDEqflNTVZ04/Xzp7hB9GUEA60MgjPSIfxWT97Fxf69GbQFpOO 1DSYoUl5cHaMRalhTZYydrHiaKb6NQyikGBvGuw3kprgHvbGhakLZshzGRyzSSBl f1dFJyrD3bKiqFNTZGEGl5qVIlspEnmAHJJL7bZJBxerTdQbtFts5gFz3iXHX2t4 p0XPnmLUCC1aX6w0QarCQVX78JHjd5F1sIRh1fwZAipN07GiqHln+f/MQbQXmMIa WIYYEvI6q7W7lcBCQiXvKF1/OXca4lP9wA1jr+2MteMo7Il9nyUDcOeZ1SgKDdkU JcfBD3mq5mUQodaePmY4O54ut+3rxL2rsEMtG6Zd3Sq/asjbkbg= =FC4l -----END PGP SIGNATURE----- --ur4wzzx455z2lgxp--