Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2642192rwi; Fri, 28 Oct 2022 09:23:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4dhBuaTBxVWgZ5xTamOvwOVYJSjidBMYIC/zZJK3CZrH//q9SJWTb7xxk/LU2NKv5lOGc/ X-Received: by 2002:a17:902:d492:b0:186:7eab:afa0 with SMTP id c18-20020a170902d49200b001867eabafa0mr135249plg.158.1666974184717; Fri, 28 Oct 2022 09:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666974184; cv=none; d=google.com; s=arc-20160816; b=QQhJ11AVYh0a27S26KVVwyECyXku68SRwdr04IKdnFGU9RMJVeYaofXrkQKBJbcCsm Vpu9M5JAn1z2/h3rbqpj+rKHhdO9qfnuAxGsjYpNeUToKi9Z8iqsJp1an7J7q+/DeLuI 3Q9g3yEVRcACtoOZgBzflS2xlubkZ0NJ7oqM+a6ifBqMsKrfFDn1+fipwi2op/AU9DLa Oi6dCgTfvj0qPzx4DsPsfsixVaDhvuiOgpbXhL2cfJI8xal4WZlerwHY0Ajs/DcrwlyY ERkpsa/Rd426KvdAUiIlABG36qf1bcymMTk6U54HiO7FpUb+GmYeUWNsKIfaC5oBFkAV gGgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aJh1duVqfrTZOVl5OU502038SgZk4GABxwyxLjkmh54=; b=hgao+ZxhlOD48I6ucocSY5lLwSBYItx1I8lZvp1msrZ1mJbT9llYhHXuqHyBp0bdzM XvqFGY3LbmQr3JDJi3godKuz8go5mPmmJ1Wr6ArVGe46hXCEPIwOEVZ6XEx+cpfL5/oO d+wnVjCXJe31fYxg5uLNq4RXaZyuaLSzWrNAtOtHdNVFl6HCRt7Lhx6VPwLkP0x1s8eF aMI3ng5wyAoEqPHpgx388LxEjkSX0u+XKboOkVhnumoRjaiwifNw2Zz4usl7eKbe5+XP 0nsMx+uHCyz1E+/RfJ7YHN38Dcl4R2QiATxZ9wvSJOZfxqhS9rPk7lt1ms9ouVZ9FZ7G oOlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=h97V6tVl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y3-20020a170902ed4300b0016ee19bc5f9si5163880plb.553.2022.10.28.09.22.52; Fri, 28 Oct 2022 09:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=h97V6tVl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiJ1QUO (ORCPT + 99 others); Fri, 28 Oct 2022 12:20:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230106AbiJ1QUD (ORCPT ); Fri, 28 Oct 2022 12:20:03 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA842558F1; Fri, 28 Oct 2022 09:20:00 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id B8E9B100003; Fri, 28 Oct 2022 16:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1666973999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aJh1duVqfrTZOVl5OU502038SgZk4GABxwyxLjkmh54=; b=h97V6tVlYT7n7gv2po/gXaRJbtRgw+JXw2QIbdhKDu3DD4cNHQm0TnPeRkDMZvQ/YvNoJP S17toEHjZwS4bdiuGQaL1DaOqGyAWMJt/84Alh+LTSUMv828qLLu6WDWus8BoN4cT/I+pL nm6HwTG0/IjEYL35mDv3iM9lmrfHFH3PVBDU9Sp9u3sFohtl2znQEWvhjq8HtzMZzubn0u NflkQDE545L53hQ9124VTW5UJqodeiwUb8PWLUwo+BjdOsCYuXh9zs/r7F0AZo+Z8Pq2tX MfHD6J5CRI2qWk+Xt4xHaVZ09GVEgtMki+eFVNMPwpFF2hIlGIsQidKFu+ICig== Date: Fri, 28 Oct 2022 18:19:57 +0200 From: Alexandre Belloni To: Johan Jonker Cc: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Alessandro Zummo , Krzysztof Kozlowski , linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema Message-ID: References: <20221021170605.85163-1-sebastian.reichel@collabora.com> <20221024185049.GA2034297-robh@kernel.org> <20221024220559.dddihmq4xg55h26w@mercury.elektranox.org> <1a9e1bfb-0437-fcd9-8d41-a1e07aced0e3@gmail.com> <20221027162648.mowz2lefcajv3s2q@mercury.elektranox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/10/2022 18:29:51+0200, Johan Jonker wrote: > > > On 10/27/22 18:26, Sebastian Reichel wrote: > > Hi, > > > > On Thu, Oct 27, 2022 at 06:11:19PM +0200, Johan Jonker wrote: > >> On 10/25/22 00:05, Sebastian Reichel wrote: > >>> On Mon, Oct 24, 2022 at 01:50:49PM -0500, Rob Herring wrote: > >>>> On Fri, Oct 21, 2022 at 07:59:26PM -0400, Krzysztof Kozlowski wrote: > >>>>> On 21/10/2022 13:06, Sebastian Reichel wrote: > >>>>>> Convert RTC binding for Haoyu Microelectronics HYM8563 to Device Tree > >>>>>> Schema format. > >>>>>> > >>>>>> Signed-off-by: Sebastian Reichel > >>>>>> --- > >>>>>> .../devicetree/bindings/rtc/haoyu,hym8563.txt | 30 ---------- > >>>>>> .../bindings/rtc/haoyu,hym8563.yaml | 55 +++++++++++++++++++ > >>>>>> 2 files changed, 55 insertions(+), 30 deletions(-) > >>>>>> delete mode 100644 Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt > >>>>>> create mode 100644 Documentation/devicetree/bindings/rtc/haoyu,hym8563.yaml > >>>>>> > >>>>>> diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt > >>>>>> deleted file mode 100644 > >>>>>> index a8934fe2ab4c..000000000000 > >>>>>> --- a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt > >>>>>> +++ /dev/null > >>>>>> @@ -1,30 +0,0 @@ > >>>>>> -Haoyu Microelectronics HYM8563 Real Time Clock > >>>>>> - > >>>>>> -The HYM8563 provides basic rtc and alarm functionality > >>>>>> -as well as a clock output of up to 32kHz. > >>>>>> - > >>>>>> -Required properties: > >>>>>> -- compatible: should be: "haoyu,hym8563" > >>>>>> -- reg: i2c address > >>>>>> -- #clock-cells: the value should be 0 > >>>>>> - > >>>>>> -Optional properties: > >>>>>> -- clock-output-names: From common clock binding > >>>>>> -- interrupts: rtc alarm/event interrupt > >>>>>> - > >>>>>> -Example: > >>>>>> - > >>>>>> -hym8563: hym8563@51 { > >>>>>> - compatible = "haoyu,hym8563"; > >>>>>> - reg = <0x51>; > >>>>>> - > >>>>>> - interrupts = <13 IRQ_TYPE_EDGE_FALLING>; > >>>>>> - > >>>>>> - #clock-cells = <0>; > >>>>>> -}; > >>>>>> - > >>>>>> -device { > >>>>>> -... > >>>>>> - clocks = <&hym8563>; > >>>>>> -... > >>>>>> -}; > >>>>>> diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.yaml b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.yaml > >>>>>> new file mode 100644 > >>>>>> index 000000000000..b0b6126b12dd > >>>>>> --- /dev/null > >>>>>> +++ b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.yaml > >>>>>> @@ -0,0 +1,55 @@ > >>>>>> +# SPDX-License-Identifier: GPL-2.0 > >>>>> > >>>>> Dual license please. I don't think you copied any content from original > >>>>> bindings... unless the example? > >>>>> > >>>>>> +%YAML 1.2 > >>>>>> +--- > >>>>>> +$id: http://devicetree.org/schemas/rtc/haoyu,hym8563.yaml# > >>>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >>>>>> + > >>>>>> +title: Haoyu Microelectronics HYM8563 RTC > >>>>>> + > >>>>>> +maintainers: > >>>>>> + - Alexandre Belloni > >>>>>> + > >>>>>> +properties: > >>>>>> + compatible: > >>>>>> + const: haoyu,hym8563 > >>>>>> + > >>>>>> + reg: > >>>>>> + maxItems: 1 > >>>>>> + > >>>>>> + interrupts: > >>>>>> + maxItems: 1 > >>>>>> + > >>>>>> + "#clock-cells": > >>>>>> + const: 0 > >>>>>> + > >>>>>> + clock-output-names: > >>>>>> + description: From common clock binding to override the default output clock name. > >>>>> > >>>>> You need maxItems for this. > >>>>> > >>>>>> + > >>>>>> + wakeup-source: > >>>>>> + description: Enables wake up of host system on alarm. > >>>>>> + > >>>>>> +allOf: > >>>>>> + - $ref: rtc.yaml > >>>>>> + > >>>>>> +unevaluatedProperties: false > >>>>>> + > >>>>> > >> > >>>>> Would be great if you could also correct DTS using these bindings (see > >>>>> warning from Rob). > >>>> > >>>> It looked to me like 'clock-frequency' should be added to the schema. > >>> > >>> I've sent PATCHv2, which removes clock-frequency from all hym8563 > >>> users. My reasoning is, that the old txt binding does not describe > >>> it and the current Linux driver does not handle it as far as I can > >>> see. > >> > >> Didn't note you were doing a conversion as well... > >> From my abandonment patch serie > >> > >> clock-frequency: > >> enum: [1, 32, 1024, 32768] > >> > >> The data sheet shows that it can generate 4 different frequencies. > >> Rockchip mostly uses 32768, but that doesn't mean someone else is > >> not alowed to set what he/she prefers. > > > > As far as I can tell 32768 has been cargo copied by everyone, but > > the driver is not parsing this at all and I would expect the clock > > API to be used for requesting a specific frequency. > > DT and Linux driver support are 2 different things. > What Linux currently doesn't support might be needed elsewhere. > Yes but being a clock provider is enough for any OS. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com