Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp931110ybh; Wed, 11 Mar 2020 13:49:01 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsyRL9PTXWSM09Co2SvAC92qVqclER8iUtz4xVyqz5AdbdjmI8aVNampCxmQYxUuLv8qn8l X-Received: by 2002:a9d:750d:: with SMTP id r13mr3824115otk.321.1583959741553; Wed, 11 Mar 2020 13:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583959741; cv=none; d=google.com; s=arc-20160816; b=nwtTyaXZvFEl2+Kp2r9ttA0GyhxMsirxiW+uPCNr0SktX7JExZv2DtPt0IhEXAYDnV +mS/+zChLEfqZlsZ4P4lsTIISe0vUG07peORloTKn7Dx/3Xh0L9X+rYWCA/IF1o0+tml oYDRLBXeZdRLlu6n9TeIka+ggdcxFI2EBQtht0eC/jb5duyR467gHi732cWoDQdehYnN RC139KB17mKYApTvAdMgGt/zu7ug00VxMuU2EnP6uTD+sNh632GNIEmA6aO3ovBNs/qJ wnqUNpXFoE3T3TIjdPAs/mu7eqLORdWPTTm/B4LSzDz7Z7DUsgtpdJ7rRF+2wZmR/Ug9 ljDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=leFQcoKGy/2IA7AG1+HDV35PjcttCvNoE7D5rm0/3J0=; b=HhbzM7Z0tpG8dz1nksmtonsyw2sxAnbWuOOkvD9dZgeOhNL0cXUtKqqGdrYR/dugOr b9D+rmc7DtpAKPrabfxfNS9ZmwlWbP3H8dhdKcJD0noBLu6xO0nPmobgkoezezjxeTae NPd1RP5FYv6A7PM7DAw4x7HJPbyqW9bU7P8R1qaeGpSPVjr2mUPp9lgS13WmixbwJ4L0 6Nxo5DnwzEb4Ep8eZ82zx3TkR56a11EFXENYF0Aj3G6EthGqc125YE46kX4lA7UICQJM kxe3t05k7RE954s4NL6rJQw/22XBaXyAWAN4FO+89/P7EwGhGsaajC2QDFDCjG3beEHS XHqA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h203si1630115oif.3.2020.03.11.13.48.48; Wed, 11 Mar 2020 13:49:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729222AbgCKUsY (ORCPT + 99 others); Wed, 11 Mar 2020 16:48:24 -0400 Received: from mail.baikalelectronics.com ([87.245.175.226]:53362 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbgCKUsX (ORCPT ); Wed, 11 Mar 2020 16:48:23 -0400 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id 7402D80307CD; Wed, 11 Mar 2020 20:48:15 +0000 (UTC) X-Virus-Scanned: amavisd-new at baikalelectronics.ru Received: from mail.baikalelectronics.ru ([127.0.0.1]) by localhost (mail.baikalelectronics.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K1IpuTH9noGl; Wed, 11 Mar 2020 23:48:14 +0300 (MSK) Date: Wed, 11 Mar 2020 23:47:22 +0300 From: Sergey Semin To: Sebastian Reichel CC: Rob Herring , Mark Rutland , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , , , Subject: Re: [PATCH 2/4] dt-bindings: power: reset: Replace SYSCON reboot-mode legacy bindings with YAML-based one Message-ID: <20200311204722.bykfdyxxa2ki2gaf@ubsrv2.baikal.int> References: <20200306130341.9585-1-Sergey.Semin@baikalelectronics.ru> <20200306130401.C07838030795@mail.baikalelectronics.ru> <20200306200551.49C47803087C@mail.baikalelectronics.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200306200551.49C47803087C@mail.baikalelectronics.ru> X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 06, 2020 at 08:56:38PM +0100, Sebastian Reichel wrote: > Hi, > > On Fri, Mar 06, 2020 at 04:03:39PM +0300, Sergey.Semin@baikalelectronics.ru wrote: > > From: Serge Semin > > > > 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. > > > > Signed-off-by: Serge Semin > > Signed-off-by: Alexey Malahov > > Cc: Thomas Bogendoerfer > > Cc: Paul Burton > > Cc: Ralf Baechle > > --- > > I'm missing patch 1 and would like an Acked-by from Rob Herring, so > for now: > > Acked-by: Sebastian Reichel > Great. Thanks. I'll resend the patchset very soon. You aren't in the first patch Cc because it doesn't concern power/reset subsystem, but mfd/syscon. That's why my submission script didn't add you to the list. Sorry about that. I'll send a v2 copy to you. Regards, -Sergey > -- 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 > > > > diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.txt > > 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 magic value, > > - default set to 0xffffffff if missing. > > - > > -The rest of the properties should follow the generic reboot-mode description > > -found in reboot-mode.txt > > - > > -Example: > > - pmu: pmu@20004000 { > > - compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd"; > > - reg = <0x20004000 0x100>; > > - > > - reboot-mode { > > - compatible = "syscon-reboot-mode"; > > - offset = <0x40>; > > - mode-normal = ; > > - mode-recovery = ; > > - mode-bootloader = ; > > - mode-loader = ; > > - }; > > - }; > > diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.yaml > > new file mode 100644 > > index 000000000000..e09bb07b1abb > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot-mode.yaml > > @@ -0,0 +1,55 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%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 bit). > > + > > + offset: > > + $ref: /schemas/types.yaml#/definitions/uint32 > > + description: Offset in the register map for the mode register (in bytes). > > + > > +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 = "syscon-reboot-mode"; > > + offset = <0x40>; > > + mode-normal = ; > > + mode-recovery = ; > > + mode-bootloader = ; > > + mode-loader = ; > > + }; > > +... > > -- > > 2.25.1 > >