From patchwork Fri Jun 16 10:16:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13282578 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B5E4BEB64D8 for ; Fri, 16 Jun 2023 10:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=goyHJD0DbF3tUFm3ZpZyhCjVMxcSbH1BjYa1l9tAAYo=; b=Nu+EFNpaLyNlYa 5qwBysZGS2FBRl1B+DRCbrcYyaOk7HHilidkpF3qcyOqbJPKpZqxSrBlWWIgwRVYCbj1u+2DJMjBi 552VCzBvLDjKcCKNgoLp7KbExcUF6hkm8SP7HwL0sRDuMOYJqASHr1TfFS0XCOn4EsRVpxwBhbEoZ HYJYI3cK/qHtSW/DOiqCreCeDQ2+BhzrqxnGG9/mtw1zxRG7IiRHbj43DM1IXwPNz/3YEI8qpOYOp cGyR0md7A69PJN3KynOE+58aYpmGYjznsetIriqwJf7KLjkWomBKu7gcnw3pghgNlTfyVUitCGLsE nxmPBe6+l9DMAPRE2kAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qA6WR-00HaMS-23; Fri, 16 Jun 2023 10:17:39 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qA6WO-00HaLb-25 for linux-arm-kernel@lists.infradead.org; Fri, 16 Jun 2023 10:17:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1686910656; x=1718446656; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+itgrmjpDD4dmlQNoVGQSgWLyaU0TMa+bBpShhgvWTE=; b=rpqKHoJoF4ybD8tvlkdYUw8ikPqOysrj8vemfHgPlA1Bs4I/aAQrI7mi zkIgS7bDjW76NkK0o3FwOG3rCHHVC7L5HUpLIauXlW6YlsWE04Xp/VtSM /g4FS2Vt2LDAAIEcEgdteLKRYlWhwMveLQfHDKgC4VmA0db8fYI8DMmf1 uHnEhhuevWHpeTWPr0v0QuecGyIkjvoaNLiexCvxWQ1c6Qv11267OV/Gt KxNWLjDtCBF/DGEKaf1RzT/adw+/MTzt62KvxHlMYZeWpNrjrOLEPLgYL V6K74nCBU6NxKXenbnnGc8IOEFSW4qUo54H7OS6TDdrutKFUW+ow8KI5u g==; X-IronPort-AV: E=Sophos;i="6.00,247,1681196400"; d="scan'208";a="220582857" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Jun 2023 03:17:32 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 16 Jun 2023 03:17:11 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Fri, 16 Jun 2023 03:17:07 -0700 From: Claudiu Beznea To: , , , , , CC: , , , , Claudiu Beznea , Conor Dooley Subject: [PATCH v3 2/4] dt-bindings: power: reset: atmel,at91sam9260-shdwc: convert to yaml Date: Fri, 16 Jun 2023 13:16:44 +0300 Message-ID: <20230616101646.879480-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230616101646.879480-1-claudiu.beznea@microchip.com> References: <20230616101646.879480-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230616_031736_743580_E9CA9371 X-CRM114-Status: GOOD ( 13.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert Microchip AT91 shutdown controller to YAML. Signed-off-by: Claudiu Beznea Reviewed-by: Conor Dooley Acked-by: Nicolas Ferre --- .../devicetree/bindings/arm/atmel-sysregs.txt | 31 ------- .../power/reset/atmel,at91sam9260-shdwc.yaml | 82 +++++++++++++++++++ 2 files changed, 82 insertions(+), 31 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml diff --git a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt index ab1b352344ae..e6b2fb291b45 100644 --- a/Documentation/devicetree/bindings/arm/atmel-sysregs.txt +++ b/Documentation/devicetree/bindings/arm/atmel-sysregs.txt @@ -52,37 +52,6 @@ Example: reg = <0xe3804000 0x1000>; }; -SHDWC Shutdown Controller - -required properties: -- compatible: Should be "atmel,-shdwc". - can be "at91sam9260", "at91sam9rl" or "at91sam9x5". -- reg: Should contain registers location and length -- clocks: phandle to input clock. - -optional properties: -- atmel,wakeup-mode: String, operation mode of the wakeup mode. - Supported values are: "none", "high", "low", "any". -- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf). - -optional at91sam9260 properties: -- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up. - -optional at91sam9rl properties: -- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up. -- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up. - -optional at91sam9x5 properties: -- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up. - -Example: - - shdwc@fffffd10 { - compatible = "atmel,at91sam9260-shdwc"; - reg = <0xfffffd10 0x10>; - clocks = <&clk32k>; - }; - SHDWC SAMA5D2-Compatible Shutdown Controller 1) shdwc node diff --git a/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml b/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml new file mode 100644 index 000000000000..f559a2cfd82e --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/atmel,at91sam9260-shdwc.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/reset/atmel,at91sam9260-shdwc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip AT91 SHDWC Shutdown Controller + +maintainers: + - Claudiu Beznea + +description: | + Microchip AT91 SHDWC shutdown controller controls the power supplies VDDIO + and VDDCORE and the wake-up detection on debounced input lines. + +properties: + compatible: + enum: + - atmel,at91sam9260-shdwc + - atmel,at91sam9rl-shdwc + - atmel,at91sam9x5-shdwc + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + atmel,wakeup-mode: + description: operation mode of the wakeup mode + $ref: /schemas/types.yaml#/definitions/string + enum: [ none, high, low, any ] + + atmel,wakeup-counter: + description: counter on wake-up 0 + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 0 + maximum: 15 + + atmel,wakeup-rtt-timer: + description: enable real-time timer wake-up + type: boolean + + atmel,wakeup-rtc-timer: + description: enable real-time clock wake-up + type: boolean + +required: + - compatible + - reg + - clocks + +allOf: + - if: + properties: + compatible: + contains: + const: atmel,at91sam9x5-shdwc + then: + properties: + atmel,wakeup-rtt-timer: false + + - if: + properties: + compatible: + contains: + const: atmel,at91sam9260-shdwc + then: + properties: + atmel,wakeup-rtc-timer: false + +additionalProperties: false + +examples: + - | + shdwc: poweroff@fffffd10 { + compatible = "atmel,at91sam9260-shdwc"; + reg = <0xfffffd10 0x10>; + clocks = <&clk32k>; + }; + +...