From patchwork Sun Jul 21 16:28:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kousik Sanagavarapu X-Patchwork-Id: 13738046 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 B041FC3DA61 for ; Sun, 21 Jul 2024 17:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=m+xFnJLXKFSs1rD/pdMgqeISRYaT8z33SQNfYCihvv0=; b=ZkivTwXgp0d8QfC4GjJkoI2rD8 TSe2LNF0lbRYvICmarVKGoDxp8zVYTfdREz21qfpola867cl2rua4bgK59K8tjn9mLjJ+SmJO4DW8 1y3/lyzXyyoQ/fvxdn02wezYyMi55MZAw4zvy0cMxGwo04fNQpZzqf+1uIoHORmtLr5Mw8e9sb2N0 wv4dz943xNSQnvUOv5qQ1Er27WP0FRT1oFqYP7ZznKe5nKqCK5gOIFIZOLll+ySkc3UHAReZ/5o31 o7IzHvpb1QH3cRA3Q8Yq3zFz/Fs/KHLOSEgt7z8bF3zK/txKzumdiPdDXAdO1PoCdbGZGelwVVJEJ WFPxhL4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVa4Y-00000007CTL-0P4S; Sun, 21 Jul 2024 17:10:10 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sVa3j-00000007CAR-3QOW for linux-arm-kernel@lists.infradead.org; Sun, 21 Jul 2024 17:09:21 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-70d18112b60so442038b3a.1 for ; Sun, 21 Jul 2024 10:09:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721581759; x=1722186559; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=m+xFnJLXKFSs1rD/pdMgqeISRYaT8z33SQNfYCihvv0=; b=AK380AMsef2EsdGS6iQdPtXeHIEOx3k+Es7sq20CGGEZ9t8sc/9tFWLYiuUK/Snx/W awAkJbqF9GcXotdzRAs9gloGJSZDb8Gt+M+bPqETDwEfHUaRPE/F6eo9GRFxlvErBVTH YKYzJU4+fHzv4Uxh4VQi0OTMRKeeRB7Eu8kLPURrJt6HppD0O84nIkhkbMxrJgO2/Bgf PeOS8qcWejqNwY+h8AjEcciRAV86ooi4+eAchxDqOS/V3UMYAG0CCxbHt/4ycMuuTAfx JBDvGYCJRsvUi2/Hhj0jbqyAjNcYSsh9Jz3R4OK0greLapOLsUJKILUcGKBBX/rOYrag Viiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721581759; x=1722186559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m+xFnJLXKFSs1rD/pdMgqeISRYaT8z33SQNfYCihvv0=; b=ra92iJOnUkX5vCgC8+u/TiOmzGo+Sb/G3KZMWmwHUg3UAriep46NmxZoy41M/FCJPg vtiYcThlczsA7l5xHkoaSlAOPe2kan2CSxiJmHargx6/Zzgx8vq3Y6mPnjkXwKoMYd4j nVJ9hEttCXK4apr1N0Dp35/k8SMjl53cyBKQa5oQxX8x/saxsZ4cW7HEN/VGg4PM09sc kdIt4oGUJxbExqCLpzergfoSzl3JXxIrc7OoEz9YVwKghxkHqioeAR81uLfYB1k8C/cn 1/oUvrUWIGyRV6sABQUHofNhDtn9ZNBgpcnU/BpDpRgwRYzuZ6WBPSL8Q/XnIChlpaQS cC2Q== X-Forwarded-Encrypted: i=1; AJvYcCXsfwYeQNIKldrN6C3JRtuRkcCS6Ax0Iq/lc5cmqC3R4qGSv1Fz2Jsy7vgfUKIKI3tkJhd8RtfmvwQCvy8e+33imIRVuT0uI7ml5IYaDPHXYD87I0A= X-Gm-Message-State: AOJu0YzFNQE/d9WTFpH4eiLhB64tXusu6PGvAjjTNPAj/q67PASImRwH uKolAKbLFl2MwFaubQNMfvLzkmgofbV2AaV1g59oYxTnf7Z5KnK8 X-Google-Smtp-Source: AGHT+IENAylm5O+0sTieY5CFralyVXeCUeaCnUG9F/PIBeQRb/dRfNNLBPxjkB3W/gCU0FJWFl0g0w== X-Received: by 2002:a05:6a00:1954:b0:704:2516:8d17 with SMTP id d2e1a72fcca58-70cfd51e05cmr14110055b3a.8.1721581758481; Sun, 21 Jul 2024 10:09:18 -0700 (PDT) Received: from kousik.local ([2405:201:c006:312d:f66f:2b12:abd:60ff]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70d285943e3sm417810b3a.213.2024.07.21.10.09.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jul 2024 10:09:18 -0700 (PDT) From: Kousik Sanagavarapu To: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wim Van Sebroeck , Guenter Roeck , Nishanth Menon , Santosh Shilimkar Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, Kousik Sanagavarapu Subject: [RFC PATCH 2/3] dt-bindings: watchdog: ti,davinci-wdt: convert to dtschema Date: Sun, 21 Jul 2024 21:58:35 +0530 Message-ID: <20240721170840.15569-3-five231003@gmail.com> X-Mailer: git-send-email 2.45.2.827.g557ae147e6.dirty In-Reply-To: <20240721170840.15569-1-five231003@gmail.com> References: <20240721170840.15569-1-five231003@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240721_100919_880255_09626F2A X-CRM114-Status: GOOD ( 18.44 ) 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 txt bindings of TI's DaVinci/Keystone Watchdog Timer Controller to dtschema to allow for validation. Signed-off-by: Kousik Sanagavarapu --- This patch was submitted to the lists before by Nik https://lore.kernel.org/linux-devicetree/20231024195839.49607-1-n2h9z4@gmail.com/ Although it seems that the right way include the "power-domians" property was not decided upon (read through the thread). I grepped for instances of "power-domains" in ti related SoCs and other subsystems and it seems that there is always only 1 such "power-domains" phandle Documentation/devicetree/bindings/display/ti/ti,k2g-dss.yaml The existing dts code also confirms this arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi Again, I guess it would be great if someone could point out if this is right - so RFC. Also, shouldn't "clocks" be "required"? - RFC. .../bindings/watchdog/davinci-wdt.txt | 24 --------- .../bindings/watchdog/ti,davinci-wdt.yaml | 52 +++++++++++++++++++ 2 files changed, 52 insertions(+), 24 deletions(-) delete mode 100644 Documentation/devicetree/bindings/watchdog/davinci-wdt.txt create mode 100644 Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml diff --git a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt b/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt deleted file mode 100644 index aa10b8ec36e2..000000000000 --- a/Documentation/devicetree/bindings/watchdog/davinci-wdt.txt +++ /dev/null @@ -1,24 +0,0 @@ -Texas Instruments DaVinci/Keystone Watchdog Timer (WDT) Controller - -Required properties: -- compatible : Should be "ti,davinci-wdt", "ti,keystone-wdt" -- reg : Should contain WDT registers location and length - -Optional properties: -- timeout-sec : Contains the watchdog timeout in seconds -- clocks : the clock feeding the watchdog timer. - Needed if platform uses clocks. - See clock-bindings.txt - -Documentation: -Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf -Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf - -Examples: - -wdt: wdt@2320000 { - compatible = "ti,davinci-wdt"; - reg = <0x02320000 0x80>; - timeout-sec = <30>; - clocks = <&clkwdtimer0>; -}; diff --git a/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml new file mode 100644 index 000000000000..1829c407147d --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/ti,davinci-wdt.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/ti,davinci-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI DaVinci/Keystone Watchdog Timer Controller + +maintainers: + - Kousik Sanagavarapu + +description: | + TI's Watchdog Timer Controller for DaVinci and Keystone Processors. + + Datasheets + + Davinci DM646x - https://www.ti.com/lit/ug/spruer5b/spruer5b.pdf + Keystone - https://www.ti.com/lit/ug/sprugv5a/sprugv5a.pdf + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + enum: + - ti,davinci-wdt + - ti,keystone-wdt + + reg: + maxItems: 1 + + power-domains: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + watchdog@22f0080 { + compatible = "ti,davinci-wdt"; + reg = <0x022f0080 0x80>; + clocks = <&clkwdtimer0>; + }; + +...