From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wnew4-smtp.messagingengine.com (wnew4-smtp.messagingengine.com [64.147.123.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61F0972 for ; Fri, 20 Aug 2021 04:04:58 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 16E592B01222; Fri, 20 Aug 2021 00:04:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 20 Aug 2021 00:04:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=b 9n8FHHgB7n5u9D8RC9mb2DdWFB5BNJvEHs32+cU4qs=; b=qJqaqGL6pvo9EXe29 js30k3msoz5yqpOxMzJvXJuXPP77IcK/QYEgNX3wJcmy+B3uAxBOKL/Dmu+qb5Hs IgjrI7z7H0xm4fJmhosRB09ZvRYrSSZXy5APwYbH9Ucz4GBdCdvuY2qbp8yYXATn CeIA1AHUc3mxaVpwzcG0dU6MxPR+/lpwIaB3asF5NkotSKtNQLyCjgMJ6gLLSyaH JYC2mAvz/Xcv4HBr64DKcR49+ky0y4SOPeaO5KyL82NhRcXMwNGFDDwf2aNO2MOR he5+FywrmsDx83NSj0H1T3YSq1Cn/N072quKKxbXyltlsBOI6g0WWn8buoAU1/is MCkHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=b9n8FHHgB7n5u9D8RC9mb2DdWFB5BNJvEHs32+cU4 qs=; b=GQv/zb2BvjDnXsLzad63nSdXBfCS0IXLUfgfmJNtsxlhY3HG9OdBXrRCy mX94NHVXw/YiBUE3IokZEpLa3b/IsBz6LF42nSEQqZZEyPisIkSYIKifbRE8Gs7w fR3UtoGKMfnNbm69bxOzFZ4JmgW9JiPuVxVLgJPZo0nlw8WBgLyUvZZa5nT+tx3s Bckvg/0zNxJmhd+f9fMjOacU31SoH4x5m7PAAZmimpmympXGpAX3NlHpP9NY7F5S NsW4nFgwL1ci5mOyZDkw1bLMrEAbqLfZwWWx3Q9z8eAUwJ8ot+K7WthrDphOqc94 +DXctOpPMWp9n6iTD5meB0vQQM5wg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleekgdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpefgveffteelheffjeeukedvkedviedtheevgeefkeehueeiieeuteeu gfettdeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Aug 2021 00:04:53 -0400 (EDT) Subject: Re: [PATCH v2 1/3] dt-bindings: watchdog: sunxi: Add compatible for R329 To: Maxime Ripard Cc: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Chen-Yu Tsai , Jernej Skrabec , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210805045716.46141-1-samuel@sholland.org> <20210818090732.wdickyw67oc4zqpt@gilmour> From: Samuel Holland Message-ID: <791b7548-cd7b-6cdf-8364-671f6a2029a9@sholland.org> Date: Thu, 19 Aug 2021 23:04:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20210818090732.wdickyw67oc4zqpt@gilmour> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 8/18/21 4:07 AM, Maxime Ripard wrote: > Hi, > > On Wed, Aug 04, 2021 at 11:57:14PM -0500, Samuel Holland wrote: >> On existing SoCs, the watchdog has a single clock input: HOSC (OSC24M) >> divided by 750. However, starting with R329, LOSC (OSC32k) is added as >> an alternative clock source, with a bit to switch between them. >> >> Since 24 MHz / 750 == 32 kHz, not 32.768 kHz, the hardware adjusts the >> cycle counts to keep the timeouts independent of the clock source. This >> keeps the programming interface backward-compatible. >> >> R329 also adds two new registers, to allow software to immediately drive >> the SoC reset signal. >> >> Signed-off-by: Samuel Holland >> --- >> Changes v1 to v2: >> - Switch from enum to const >> - Add descriptions to "clocks" items >> >> .../watchdog/allwinner,sun4i-a10-wdt.yaml | 32 ++++++++++++++++++- >> 1 file changed, 31 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml >> index 9aa3c313c49f..8fa5b0d32381 100644 >> --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml >> +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml >> @@ -24,6 +24,7 @@ properties: >> - allwinner,sun50i-a100-wdt >> - allwinner,sun50i-h6-wdt >> - allwinner,sun50i-h616-wdt >> + - allwinner,sun50i-r329-wdt >> - const: allwinner,sun6i-a31-wdt >> - items: >> - const: allwinner,suniv-f1c100s-wdt >> @@ -33,7 +34,18 @@ properties: >> maxItems: 1 >> >> clocks: >> - maxItems: 1 >> + minItems: 1 >> + maxItems: 2 >> + items: >> + - description: High-frequency oscillator input, divided internally >> + - description: Low-frequency oscillator input, only found on some variants >> + >> + clock-names: >> + minItems: 1 >> + maxItems: 2 >> + items: >> + - const: hosc >> + - const: losc >> >> interrupts: >> maxItems: 1 >> @@ -44,6 +56,24 @@ required: >> - clocks >> - interrupts >> >> +if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - allwinner,sun50i-r329-wdt >> + >> +then: >> + properties: >> + clocks: >> + minItems: 2 >> + >> + clock-names: >> + minItems: 2 >> + >> + required: >> + - clock-names >> + > > We should also make sure through an else clause that all the other SoCs > have a length of one for both clocks and clock-names Yes, I'll do that for v3. > Also, it looks like you forgot the patch to enable the compatible in the > driver? R329 has a fallback to A31, so it doesn't need any changes to the driver. Regards, Samuel 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=-18.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 2C566C4338F for ; Fri, 20 Aug 2021 04:07:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E4A516101A for ; Fri, 20 Aug 2021 04:07:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E4A516101A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:Date: Message-ID:From:References:Cc:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=H3Yb60zKaZAI4tF7kWzsTjbBif5vWNg7kuoiFViK8mg=; b=ULjwfdS6ZCGVlByoZdRptKJ4/d /mNJcxy9GptsdEVks+wU1r9pZaVMkUa8lZyIKGg1LiDxRaaQK+2WNCrX/H2TL9v+Fi2LqiaVzYrgB q/1TuuAVajVkjVzS39eAPS0wcDH/WH+ykwpANoX2+5E+aEoS04OiRRqG0gpEV22KY3nvcRiH2EuYF 4Ei2h3FbYaKIkHE1bSREIPKZlx3usNErx/np6L+wD4e422SdbbDBx2yxvXjoGDVwt/ku0nr6cB5V6 jLox66s3D3TtWc0lWq9Fpa4ge6LZwd4ZIDFJ2eOfxeELBMx7lyWSTZhtbXSCg7DTDwsKI7DuPp0fc FRKQmYGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGvmF-00A2yY-5a; Fri, 20 Aug 2021 04:05:07 +0000 Received: from wnew4-smtp.messagingengine.com ([64.147.123.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mGvm8-00A2xZ-OY for linux-arm-kernel@lists.infradead.org; Fri, 20 Aug 2021 04:05:05 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.west.internal (Postfix) with ESMTP id 16E592B01222; Fri, 20 Aug 2021 00:04:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 20 Aug 2021 00:04:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=b 9n8FHHgB7n5u9D8RC9mb2DdWFB5BNJvEHs32+cU4qs=; b=qJqaqGL6pvo9EXe29 js30k3msoz5yqpOxMzJvXJuXPP77IcK/QYEgNX3wJcmy+B3uAxBOKL/Dmu+qb5Hs IgjrI7z7H0xm4fJmhosRB09ZvRYrSSZXy5APwYbH9Ucz4GBdCdvuY2qbp8yYXATn CeIA1AHUc3mxaVpwzcG0dU6MxPR+/lpwIaB3asF5NkotSKtNQLyCjgMJ6gLLSyaH JYC2mAvz/Xcv4HBr64DKcR49+ky0y4SOPeaO5KyL82NhRcXMwNGFDDwf2aNO2MOR he5+FywrmsDx83NSj0H1T3YSq1Cn/N072quKKxbXyltlsBOI6g0WWn8buoAU1/is MCkHA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=b9n8FHHgB7n5u9D8RC9mb2DdWFB5BNJvEHs32+cU4 qs=; b=GQv/zb2BvjDnXsLzad63nSdXBfCS0IXLUfgfmJNtsxlhY3HG9OdBXrRCy mX94NHVXw/YiBUE3IokZEpLa3b/IsBz6LF42nSEQqZZEyPisIkSYIKifbRE8Gs7w fR3UtoGKMfnNbm69bxOzFZ4JmgW9JiPuVxVLgJPZo0nlw8WBgLyUvZZa5nT+tx3s Bckvg/0zNxJmhd+f9fMjOacU31SoH4x5m7PAAZmimpmympXGpAX3NlHpP9NY7F5S NsW4nFgwL1ci5mOyZDkw1bLMrEAbqLfZwWWx3Q9z8eAUwJ8ot+K7WthrDphOqc94 +DXctOpPMWp9n6iTD5meB0vQQM5wg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrleekgdejiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpefgveffteelheffjeeukedvkedviedtheevgeefkeehueeiieeuteeu gfettdeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 20 Aug 2021 00:04:53 -0400 (EDT) Subject: Re: [PATCH v2 1/3] dt-bindings: watchdog: sunxi: Add compatible for R329 To: Maxime Ripard Cc: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Chen-Yu Tsai , Jernej Skrabec , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210805045716.46141-1-samuel@sholland.org> <20210818090732.wdickyw67oc4zqpt@gilmour> From: Samuel Holland Message-ID: <791b7548-cd7b-6cdf-8364-671f6a2029a9@sholland.org> Date: Thu, 19 Aug 2021 23:04:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20210818090732.wdickyw67oc4zqpt@gilmour> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210819_210500_882837_BED3B5A2 X-CRM114-Status: GOOD ( 23.57 ) 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 8/18/21 4:07 AM, Maxime Ripard wrote: > Hi, > > On Wed, Aug 04, 2021 at 11:57:14PM -0500, Samuel Holland wrote: >> On existing SoCs, the watchdog has a single clock input: HOSC (OSC24M) >> divided by 750. However, starting with R329, LOSC (OSC32k) is added as >> an alternative clock source, with a bit to switch between them. >> >> Since 24 MHz / 750 == 32 kHz, not 32.768 kHz, the hardware adjusts the >> cycle counts to keep the timeouts independent of the clock source. This >> keeps the programming interface backward-compatible. >> >> R329 also adds two new registers, to allow software to immediately drive >> the SoC reset signal. >> >> Signed-off-by: Samuel Holland >> --- >> Changes v1 to v2: >> - Switch from enum to const >> - Add descriptions to "clocks" items >> >> .../watchdog/allwinner,sun4i-a10-wdt.yaml | 32 ++++++++++++++++++- >> 1 file changed, 31 insertions(+), 1 deletion(-) >> >> diff --git a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml >> index 9aa3c313c49f..8fa5b0d32381 100644 >> --- a/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml >> +++ b/Documentation/devicetree/bindings/watchdog/allwinner,sun4i-a10-wdt.yaml >> @@ -24,6 +24,7 @@ properties: >> - allwinner,sun50i-a100-wdt >> - allwinner,sun50i-h6-wdt >> - allwinner,sun50i-h616-wdt >> + - allwinner,sun50i-r329-wdt >> - const: allwinner,sun6i-a31-wdt >> - items: >> - const: allwinner,suniv-f1c100s-wdt >> @@ -33,7 +34,18 @@ properties: >> maxItems: 1 >> >> clocks: >> - maxItems: 1 >> + minItems: 1 >> + maxItems: 2 >> + items: >> + - description: High-frequency oscillator input, divided internally >> + - description: Low-frequency oscillator input, only found on some variants >> + >> + clock-names: >> + minItems: 1 >> + maxItems: 2 >> + items: >> + - const: hosc >> + - const: losc >> >> interrupts: >> maxItems: 1 >> @@ -44,6 +56,24 @@ required: >> - clocks >> - interrupts >> >> +if: >> + properties: >> + compatible: >> + contains: >> + enum: >> + - allwinner,sun50i-r329-wdt >> + >> +then: >> + properties: >> + clocks: >> + minItems: 2 >> + >> + clock-names: >> + minItems: 2 >> + >> + required: >> + - clock-names >> + > > We should also make sure through an else clause that all the other SoCs > have a length of one for both clocks and clock-names Yes, I'll do that for v3. > Also, it looks like you forgot the patch to enable the compatible in the > driver? R329 has a fallback to A31, so it doesn't need any changes to the driver. Regards, Samuel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel