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 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 D46EDC6FD1F for ; Tue, 2 Apr 2024 18:07:36 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MC6EOVqzWbe44UWZ5XJ6EnA2ahS3zxLgNPyNaOm9yYM=; b=HDsZwOE8kAbhVv nbDX9anhHvtpgBO9B82dhhfVLFdlsB4jtycO8cfgs/z7HHGcRyl+7TED8wASKg8aAMWNvkcncCWfu PjreqZJlmFM9Hfg57pM7ZMsxqwTMHmYbsPAy9i72ULW+33M8hWRYYa5l6N+cOmUG3zbd4QgeADCM5 ZiFZFOZEpMIf7mOf4a8ByQjqbV0rKkf7Zp6P9jCLGReLvPWYDBhjBBCjEkaSp+Q/WmMNoxnpFqgwf 5pOGDqvEw9wzD2tHUtPVg6w1Q7a71vXUIzgZh2wk6r7D9FF9aA5yBeBtVupUP5x8MABW/AMV1IvUp kLOZaIQGpDfgMpquYDLg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rriXc-0000000CJCJ-2Ffy; Tue, 02 Apr 2024 18:07:24 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rriXZ-0000000CJBk-4Afq for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2024 18:07:23 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5E08F60EE6; Tue, 2 Apr 2024 18:07:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF5BCC43390; Tue, 2 Apr 2024 18:07:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712081241; bh=91aU9dbnR4oPxBkRhlJlak+TLyyFgxU3Lj4fxkKRr9A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r1RPYV0snTHr8XNu7hM42QYJtoX68fM9iLvZliNyeCGev47mk1JODdjDlu5ar41B4 6pn0El/Lr6OJTo2/C18KeNC1wWP7RQNZF6umxfF5N2WVhdnViYKfw4RTxSn0dM29O1 hBlhBLjP+hKgzmrf8Ehq0apqRebcAwJl2qq0nh1hiZvdRsC6jYr73pdGpvae+hkZpT qU/HA6X46Sa6qxdEKjYpYLdcgrwl5Ah3mQhAUgBED9ZEZ9J8PAxJhsJ1KNjN6AllvI z31kvdLr/onRC4bBrpLy+1SM6bUh8rsF4dh8B3l9r9/kTV6jIFfiEmJytW0mD+DUXt Wo5yCshpszXtw== Date: Tue, 2 Apr 2024 13:07:18 -0500 From: Rob Herring To: Andrew Jeffery Cc: wim@linux-watchdog.org, linux@roeck-us.net, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, joel@jms.id.au, zev@bewilderbeest.net, linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: watchdog: Convert Aspeed binding to DT schema Message-ID: <20240402180718.GA358505-robh@kernel.org> References: <20240402120118.282035-1-andrew@codeconstruct.com.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240402120118.282035-1-andrew@codeconstruct.com.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240402_110722_154422_196C3949 X-CRM114-Status: GOOD ( 37.53 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Apr 02, 2024 at 10:31:18PM +1030, Andrew Jeffery wrote: > Squash warnings such as: > > ``` > arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-galaxy100.dtb: /ahb/apb@1e600000/watchdog@1e785000: failed to match any schema with compatible: ['aspeed,ast2400-wdt'] > ``` > > Signed-off-by: Andrew Jeffery > --- > .../bindings/watchdog/aspeed,ast2400-wdt.yaml | 130 ++++++++++++++++++ > .../bindings/watchdog/aspeed-wdt.txt | 73 ---------- > 2 files changed, 130 insertions(+), 73 deletions(-) > create mode 100644 Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.yaml > delete mode 100644 Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > > diff --git a/Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.yaml b/Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.yaml > new file mode 100644 > index 000000000000..10fcb50c4051 > --- /dev/null > +++ b/Documentation/devicetree/bindings/watchdog/aspeed,ast2400-wdt.yaml > @@ -0,0 +1,130 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/watchdog/aspeed,ast2400-wdt.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Aspeed watchdog timer controllers > + > +maintainers: > + - Andrew Jeffery > + > +properties: > + compatible: > + enum: > + - aspeed,ast2400-wdt > + - aspeed,ast2500-wdt > + - aspeed,ast2600-wdt > + > + reg: > + maxItems: 1 > + > + clocks: true # and order/function if more than 1 must be defined. Please note it was missing from the original binding in the commit message. > + > + aspeed,reset-type: > + enum: > + - cpu > + - soc > + - system > + - none > + description: | > + Reset behaviour - The watchdog can be programmed to generate one of three > + different types of reset when a timeout occcurs. > + > + Specifying 'cpu' will only reset the processor on a timeout event. > + > + Specifying 'soc' will reset a configurable subset of the SoC's controllers > + on a timeout event. Controllers critical to the SoC's operation may remain untouched. > + > + Specifying 'system' will reset all controllers on a timeout event, as if EXTRST had been asserted. > + Specifying "none" will cause the timeout event to have no reset effect. > + Another watchdog engine on the chip must be used for chip reset operations. > + > + The default reset type is "system" Express as schema: default: system > + > + aspeed,alt-boot: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | Don't need '|' if no formatting to preserve. > + Direct the watchdog to configure the SoC to boot from the alternative boot > + region if a timeout occurs. > + > + aspeed,external-signal: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | > + Assert the timeout event on an external signal pin associated with the > + watchdog controller instance. The pin must be muxed appropriately. > + > + aspeed,ext-pulse-duration: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + The duration, in microseconds, of the pulse emitted on the external signal pin Wrap at <80. Period at end needed. > + > + aspeed,ext-push-pull: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | > + If aspeed,external-signal is specified in the node, set the external > + signal pin's drive type to push-pull. If aspeed,ext-push-pull is not > + specified then the pin is configured as open-drain. > + > + aspeed,ext-active-high: > + $ref: /schemas/types.yaml#/definitions/flag > + description: | > + If both aspeed,external-signal and aspeed,ext-push-pull are specified in > + the node, set the pulse polarity to active-high. If aspeed,ext-active-high > + is not specified then the pin is configured as active-low. > + > + aspeed,reset-mask: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + minItems: 1 > + maxItems: 2 > + description: | > + A bitmaks indicating which peripherals will be reset if the watchdog > + timer expires. On AST2500 SoCs this should be a single word defined using > + the AST2500_WDT_RESET_* macros; on AST2600 SoCs this should be a two-word > + array with the first word defined using the AST2600_WDT_RESET1_* macros, > + and the second word defined using the AST2600_WDT_RESET2_* macros. > + > +required: > + - compatible > + - reg > + > +allOf: > + - if: > + anyOf: > + - required: > + - aspeed,ext-push-pull > + - required: > + - aspeed,ext-active-high > + - required: > + - aspeed,reset-mask > + then: > + properties: > + compatible: > + enum: > + - aspeed,ast2500-wdt > + - aspeed,ast2600-wdt > + - if: > + required: > + - aspeed,ext-active-high > + then: > + required: > + - aspeed,ext-push-pull > + > +additionalProperties: false > + > +examples: > + - | > + wdt1: watchdog@1e785000 { Drop unused labels. > + compatible = "aspeed,ast2400-wdt"; > + reg = <0x1e785000 0x1c>; > + aspeed,reset-type = "system"; > + aspeed,external-signal; > + }; > + - | > + #include > + wdt2: watchdog@1e785040 { > + compatible = "aspeed,ast2600-wdt"; > + reg = <0x1e785040 0x40>; > + aspeed,reset-mask = + (AST2600_WDT_RESET2_DEFAULT & ~AST2600_WDT_RESET2_LPC)>; > + }; > diff --git a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt b/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > deleted file mode 100644 > index 3208adb3e52e..000000000000 > --- a/Documentation/devicetree/bindings/watchdog/aspeed-wdt.txt > +++ /dev/null > @@ -1,73 +0,0 @@ > -Aspeed Watchdog Timer > - > -Required properties: > - - compatible: must be one of: > - - "aspeed,ast2400-wdt" > - - "aspeed,ast2500-wdt" > - - "aspeed,ast2600-wdt" > - > - - reg: physical base address of the controller and length of memory mapped > - region > - > -Optional properties: > - > - - aspeed,reset-type = "cpu|soc|system|none" > - > - Reset behavior - Whenever a timeout occurs the watchdog can be programmed > - to generate one of three different, mutually exclusive, types of resets. > - > - Type "none" can be specified to indicate that no resets are to be done. > - This is useful in situations where another watchdog engine on chip is > - to perform the reset. > - > - If 'aspeed,reset-type=' is not specified the default is to enable system > - reset. > - > - Reset types: > - > - - cpu: Reset CPU on watchdog timeout > - > - - soc: Reset 'System on Chip' on watchdog timeout > - > - - system: Reset system on watchdog timeout > - > - - none: No reset is performed on timeout. Assumes another watchdog > - engine is responsible for this. > - > - - aspeed,alt-boot: If property is present then boot from alternate block. > - - aspeed,external-signal: If property is present then signal is sent to > - external reset counter (only WDT1 and WDT2). If not > - specified no external signal is sent. > - - aspeed,ext-pulse-duration: External signal pulse duration in microseconds > - > -Optional properties for AST2500-compatible watchdogs: > - - aspeed,ext-push-pull: If aspeed,external-signal is present, set the pin's > - drive type to push-pull. The default is open-drain. > - - aspeed,ext-active-high: If aspeed,external-signal is present and and the pin > - is configured as push-pull, then set the pulse > - polarity to active-high. The default is active-low. > - > -Optional properties for AST2500- and AST2600-compatible watchdogs: > - - aspeed,reset-mask: A bitmask indicating which peripherals will be reset if > - the watchdog timer expires. On AST2500 this should be a > - single word defined using the AST2500_WDT_RESET_* macros; > - on AST2600 this should be a two-word array with the first > - word defined using the AST2600_WDT_RESET1_* macros and the > - second word defined using the AST2600_WDT_RESET2_* macros. > - > -Examples: > - > - wdt1: watchdog@1e785000 { > - compatible = "aspeed,ast2400-wdt"; > - reg = <0x1e785000 0x1c>; > - aspeed,reset-type = "system"; > - aspeed,external-signal; > - }; > - > - #include > - wdt2: watchdog@1e785040 { > - compatible = "aspeed,ast2600-wdt"; > - reg = <0x1e785040 0x40>; > - aspeed,reset-mask = - (AST2600_WDT_RESET2_DEFAULT & ~AST2600_WDT_RESET2_LPC)>; > - }; > -- > 2.39.2 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel