Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6812485ybf; Fri, 6 Mar 2020 05:06:54 -0800 (PST) X-Google-Smtp-Source: ADFU+vutaeYdvPwcUetwSPomgc0ExGe9AZM/FqDQcmKfIvDce8G5HHbL/dIRjQDWkIMrP331rMbE X-Received: by 2002:aca:fc4c:: with SMTP id a73mr2458728oii.147.1583500013941; Fri, 06 Mar 2020 05:06:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583500013; cv=none; d=google.com; s=arc-20160816; b=a1Vyp67slC2JJJ0ehuzYNsfbFI2kJzdTwircjf1aR43nPG0/YIM8xREbln6BNxf8sK XY/K9wRk1gDj2rdE94h7a7MGKBgr0DqmdvMFMMLbf7RHUljZ4vVDpkhWzGpYAqV/YNcZ 6fXOFQvjDF9Op57s1e1R0jH3jDVhMkekZrZYr6XSiJETpxGVOnextMpiify5rcHhisz0 8hAKtwTLPRoaK0nORaIqHPkUnFA3UFijGV7R2Gl6o6HpoPFUp8GpganaHWtohNu5hVTc kawsK+RgBFcIGRFScfAo9PSSSqsMxcHNvJm+h6PLvJAyW2gWykcP+tJKz83JtfW+dm5Q gwsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:subject:cc:to:from; bh=KzCFtWi9imSrOgYe8ozjf3fULpig4Vk2mGcvuMOGVtY=; b=mi6aWML/g2tJcNJByNgg2clUW8sSRUkF2eVfkeNWBANrLEXFde69uS65vRATvehbs2 gkCtLo3Mviv74555vlg+G+BV/qLr4zzroCLvvgeccXFJjOABMKqIpJh30UPRs/OwMvy2 DHgfR4d2M7BZn0UZX1mEoM/+GrYJhlYxYB4akf8/gjTCcscu/DC1NxaZhLbvq7AzwE0s g76xoNSynefCK7lDTxfRZcspItQpseZHXvoL5PDySkz6qFpIM2PcIlWR3Fot2UIuXo6t Gm0ZLS7KcdbIZOdM2iQei9UhJ3D5KCY4WYwyNm79zBcO4L0Z6tSrZD6pxkuHv78YV/hD zT/w== 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 j9si1210978oiw.133.2020.03.06.05.06.36; Fri, 06 Mar 2020 05:06:53 -0800 (PST) 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 S1727194AbgCFNEE (ORCPT + 99 others); Fri, 6 Mar 2020 08:04:04 -0500 Received: from mail.baikalelectronics.com ([87.245.175.226]:36166 "EHLO mail.baikalelectronics.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727174AbgCFNEE (ORCPT ); Fri, 6 Mar 2020 08:04:04 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.baikalelectronics.ru (Postfix) with ESMTP id C07838030795; Fri, 6 Mar 2020 13:04:01 +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 9IZ3E-PxsihJ; Fri, 6 Mar 2020 16:03:56 +0300 (MSK) From: To: Sebastian Reichel , Rob Herring , Mark Rutland CC: Serge Semin , Serge Semin , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , , , Subject: [PATCH 2/4] dt-bindings: power: reset: Replace SYSCON reboot-mode legacy bindings with YAML-based one Date: Fri, 6 Mar 2020 16:03:39 +0300 In-Reply-To: <20200306130341.9585-1-Sergey.Semin@baikalelectronics.ru> References: <20200306130341.9585-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Message-Id: <20200306130401.C07838030795@mail.baikalelectronics.ru> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- .../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