From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 047C272 for ; Fri, 13 Aug 2021 17:46:51 +0000 (UTC) Received: by mail-oi1-f173.google.com with SMTP id t128so17034926oig.1 for ; Fri, 13 Aug 2021 10:46:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nruG5wbXF+Ql+fb23mE0km1GyZSsSCOkm8QTSIH25Qs=; b=uQslwK68GIJ5SnNc5BuRuSCYTDb4eEmFL9ikkeNnghp0gX8TKSJV3QwjufzKFcVw+k 9x3lH10JbullYrApGaDz6+1ZD8b1OMH7Dr9zGR6LmoJmOzeYY1VuarqZs5QubJvaGNnJ 5RWlIh5GZ1YN7cJU9ptrNFHrEPgS97dT78HAb4sS1hCL13NvO2wWgsx0yssQ6vE3sCC2 XxCphzLOaZ4+/n4y2k9DBqMq+0TLnHjQXH1BRQrY4pOnCUSfrfIHc1jMd8i5paIdJcfU VrisCWx0agWRmj4yAZu2ndonh8ynNmGh/kt2UzBi78h+X/I91nbwHCxR0y004eOTrztm okkg== X-Gm-Message-State: AOAM531Hs9lFFcf35+E7kUzm341xc+0TiY6sLmoFCek+603o6N31mAGY wVXvdrzX+1vsZ+cH2HRy4A== X-Google-Smtp-Source: ABdhPJwmioe5mchEce3/NXdPmIyIO3ho3zWNNzXefOSZaEwZx1f/l2+dUrbHFkGd9aBwM/Xzf4ogsA== X-Received: by 2002:a05:6808:6cc:: with SMTP id m12mr3167933oih.51.1628876811264; Fri, 13 Aug 2021 10:46:51 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id g13sm206497oos.39.2021.08.13.10.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 10:46:50 -0700 (PDT) Received: (nullmailer pid 3746395 invoked by uid 1000); Fri, 13 Aug 2021 17:46:49 -0000 Date: Fri, 13 Aug 2021 12:46:49 -0500 From: Rob Herring To: Samuel Holland Cc: Wim Van Sebroeck , Guenter Roeck , Maxime Ripard , 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 Subject: Re: [PATCH v2 1/3] dt-bindings: watchdog: sunxi: Add compatible for R329 Message-ID: References: <20210805045716.46141-1-samuel@sholland.org> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210805045716.46141-1-samuel@sholland.org> 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 Needs an else clause with 'maxItems: 1' or is the 2nd clock now valid for all? > + > unevaluatedProperties: false > > examples: > -- > 2.31.1 > > 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=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 9B430C4338F for ; Fri, 13 Aug 2021 17:49:03 +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 6583D610CC for ; Fri, 13 Aug 2021 17:49:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6583D610CC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.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: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=Rl7MgGp5e7H7N46VAbLn5qJSWhduTwCs9R2MAUey6yk=; b=zrQHFV9iY15nEt lZwP1YBShvNFvHe1W8i1cZfpT9VKSUULrPRwt53guRifOtgkJ1dLIDigs0ToXWYNPVwxg95Ch4X77 DWlpYKSb66+J2bgqc2AqyOcd0rjVaLqSppjMZpGuyZw6ZEeDs4hLNbfJ/BE3bOrEZXaLNOOo2gmvO qhcwLWwd1+YqV69Gr98lXGjtEFwMhIFgDCvGGi0xtXfKO07D52POdADuLcN/paMAxZ3Mi/t+qZuqJ YDj6AgncLmEn11fOcmX8F7po+uGdYxLs3zNUg4SRCHOjJQQVNcA8iZSVKQdOX5VshFAzzmeiowwK1 M2+/LvlnVuOdtG6fG4Xg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mEbGi-00DI9a-0E; Fri, 13 Aug 2021 17:46:56 +0000 Received: from mail-oi1-f182.google.com ([209.85.167.182]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mEbGe-00DI94-Hd for linux-arm-kernel@lists.infradead.org; Fri, 13 Aug 2021 17:46:53 +0000 Received: by mail-oi1-f182.google.com with SMTP id u10so17052016oiw.4 for ; Fri, 13 Aug 2021 10:46:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=nruG5wbXF+Ql+fb23mE0km1GyZSsSCOkm8QTSIH25Qs=; b=MP5B4eGvGbgsOzFR1Ji6xBhUn3voXomzYCSDclHsfyuMt/tydJYkBOcod1zokNL415 cRDfU2Wvt7/8pqic19P78xZFVte6gJ3Dbjwz4KFxn6K03N0laHFynDbKvaUvo8+pj/5Z pHWGpifAYRECTPY+dALxBWmcpga3elG4jDurpSVK/HGjltsljQ8Piu8rWm+3qRZE6gl7 IlP4Q2hu5lhicQ0k0ej/5zG+FV+fr5+KjQU57DgIDyix9SJ3+Zx/Q8OxDiLJQywzsrH+ eRXE1VRAr5XdwqKB/DF9DWL/+/IG3Qz6EeOUF2j8hNwD9YgRLShBm7WAPgoepTe1rlwn sPHg== X-Gm-Message-State: AOAM532j0REjNWUtRlLPxKdhQAqgUTjT6IGPKyX6z52z2a9OgpWz5ew8 pd1w0evreqKuuQpTdi4IGg== X-Google-Smtp-Source: ABdhPJwmioe5mchEce3/NXdPmIyIO3ho3zWNNzXefOSZaEwZx1f/l2+dUrbHFkGd9aBwM/Xzf4ogsA== X-Received: by 2002:a05:6808:6cc:: with SMTP id m12mr3167933oih.51.1628876811264; Fri, 13 Aug 2021 10:46:51 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id g13sm206497oos.39.2021.08.13.10.46.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Aug 2021 10:46:50 -0700 (PDT) Received: (nullmailer pid 3746395 invoked by uid 1000); Fri, 13 Aug 2021 17:46:49 -0000 Date: Fri, 13 Aug 2021 12:46:49 -0500 From: Rob Herring To: Samuel Holland Cc: Wim Van Sebroeck , Guenter Roeck , Maxime Ripard , 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 Subject: Re: [PATCH v2 1/3] dt-bindings: watchdog: sunxi: Add compatible for R329 Message-ID: References: <20210805045716.46141-1-samuel@sholland.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210805045716.46141-1-samuel@sholland.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210813_104652_629606_3F0E92A4 X-CRM114-Status: GOOD ( 22.50 ) 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 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 Needs an else clause with 'maxItems: 1' or is the 2nd clock now valid for all? > + > unevaluatedProperties: false > > examples: > -- > 2.31.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel