* [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema @ 2022-10-21 17:06 Sebastian Reichel 2022-10-21 21:00 ` Rob Herring 2022-10-21 23:59 ` Krzysztof Kozlowski 0 siblings, 2 replies; 9+ messages in thread From: Sebastian Reichel @ 2022-10-21 17:06 UTC (permalink / raw) To: Alexandre Belloni, Alessandro Zummo, Rob Herring, Krzysztof Kozlowski Cc: linux-rtc, devicetree, linux-kernel, Sebastian Reichel, kernel Convert RTC binding for Haoyu Microelectronics HYM8563 to Device Tree Schema format. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> --- .../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 +%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 <alexandre.belloni@bootlin.com> + +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. + + wakeup-source: + description: Enables wake up of host system on alarm. + +allOf: + - $ref: rtc.yaml + +unevaluatedProperties: false + +required: + - compatible + - reg + - "#clock-cells" + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtc@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + #clock-cells = <0>; + }; + }; -- 2.35.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-21 17:06 [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema Sebastian Reichel @ 2022-10-21 21:00 ` Rob Herring 2022-10-21 23:59 ` Krzysztof Kozlowski 1 sibling, 0 replies; 9+ messages in thread From: Rob Herring @ 2022-10-21 21:00 UTC (permalink / raw) To: Sebastian Reichel Cc: linux-rtc, devicetree, linux-kernel, Rob Herring, kernel, Alessandro Zummo, Alexandre Belloni, Krzysztof Kozlowski On Fri, 21 Oct 2022 19:06:05 +0200, Sebastian Reichel wrote: > Convert RTC binding for Haoyu Microelectronics HYM8563 to Device Tree > Schema format. > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> > --- > .../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 > Running 'make dtbs_check' with the schema in this patch gives the following warnings. Consider if they are expected or the schema is incorrect. These may not be new warnings. Note that it is not yet a requirement to have 0 warnings for dtbs_check. This will change in the future. Full log is available here: https://patchwork.ozlabs.org/patch/ hym8563@51: $nodename:0: 'hym8563@51' does not match '^rtc(@.*|-[0-9a-f])*$' arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dtb arch/arm64/boot/dts/rockchip/rk3368-r88.dtb arch/arm64/boot/dts/rockchip/rk3399pro-rock-pi-n10.dtb arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dtb arch/arm/boot/dts/rk3036-evb.dtb arch/arm/boot/dts/rk3288-evb-act8846.dtb arch/arm/boot/dts/rk3288-firefly-beta.dtb arch/arm/boot/dts/rk3288-firefly.dtb arch/arm/boot/dts/rk3288-firefly-reload.dtb arch/arm/boot/dts/rk3288-miqi.dtb arch/arm/boot/dts/rk3288-rock2-square.dtb hym8563@51: Unevaluated properties are not allowed ('clock-frequency' was unexpected) arch/arm64/boot/dts/rockchip/rk3368-orion-r68-meta.dtb arch/arm64/boot/dts/rockchip/rk3368-r88.dtb arch/arm64/boot/dts/rockchip/rk3399pro-rock-pi-n10.dtb arch/arm64/boot/dts/rockchip/rk3399-roc-pc-plus.dtb arch/arm/boot/dts/rk3036-evb.dtb arch/arm/boot/dts/rk3288-firefly-beta.dtb arch/arm/boot/dts/rk3288-firefly.dtb arch/arm/boot/dts/rk3288-firefly-reload.dtb arch/arm/boot/dts/rk3288-miqi.dtb arch/arm/boot/dts/rk3288-rock2-square.dtb rtc@51: Unevaluated properties are not allowed ('clock-frequency' was unexpected) arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dtb arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dtb arch/arm64/boot/dts/amlogic/meson-gxm-minix-neo-u9h.dtb arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dtb arch/arm64/boot/dts/rockchip/rk3568-rock-3a.dtb arch/arm/boot/dts/rk3288-rock-pi-n8.dtb ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-21 17:06 [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema Sebastian Reichel 2022-10-21 21:00 ` Rob Herring @ 2022-10-21 23:59 ` Krzysztof Kozlowski 2022-10-24 18:50 ` Rob Herring 1 sibling, 1 reply; 9+ messages in thread From: Krzysztof Kozlowski @ 2022-10-21 23:59 UTC (permalink / raw) To: Sebastian Reichel, Alexandre Belloni, Alessandro Zummo, Rob Herring, Krzysztof Kozlowski Cc: linux-rtc, devicetree, linux-kernel, kernel 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 <sebastian.reichel@collabora.com> > --- > .../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 <alexandre.belloni@bootlin.com> > + > +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). Best regards, Krzysztof ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-21 23:59 ` Krzysztof Kozlowski @ 2022-10-24 18:50 ` Rob Herring 2022-10-24 22:05 ` Sebastian Reichel 0 siblings, 1 reply; 9+ messages in thread From: Rob Herring @ 2022-10-24 18:50 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Sebastian Reichel, Alexandre Belloni, Alessandro Zummo, Krzysztof Kozlowski, linux-rtc, devicetree, linux-kernel, kernel 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 <sebastian.reichel@collabora.com> > > --- > > .../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 <alexandre.belloni@bootlin.com> > > + > > +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. Rob ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-24 18:50 ` Rob Herring @ 2022-10-24 22:05 ` Sebastian Reichel 2022-10-27 16:11 ` Johan Jonker 0 siblings, 1 reply; 9+ messages in thread From: Sebastian Reichel @ 2022-10-24 22:05 UTC (permalink / raw) To: Rob Herring Cc: Krzysztof Kozlowski, Alexandre Belloni, Alessandro Zummo, Krzysztof Kozlowski, linux-rtc, devicetree, linux-kernel, kernel [-- Attachment #1: Type: text/plain, Size: 3815 bytes --] Hi, 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 <sebastian.reichel@collabora.com> > > > --- > > > .../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 <alexandre.belloni@bootlin.com> > > > + > > > +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. https://lore.kernel.org/all/20221024165549.74574-1-sebastian.reichel@collabora.com/ -- Sebastian [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-24 22:05 ` Sebastian Reichel @ 2022-10-27 16:11 ` Johan Jonker 2022-10-27 16:26 ` Sebastian Reichel 0 siblings, 1 reply; 9+ messages in thread From: Johan Jonker @ 2022-10-27 16:11 UTC (permalink / raw) To: Sebastian Reichel, Rob Herring Cc: Krzysztof Kozlowski, Alexandre Belloni, Alessandro Zummo, Krzysztof Kozlowski, linux-rtc, devicetree, linux-kernel, kernel On 10/25/22 00:05, Sebastian Reichel wrote: > Hi, > > 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 <sebastian.reichel@collabora.com> >>>> --- >>>> .../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 <alexandre.belloni@bootlin.com> >>>> + >>>> +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. Johan > > https://lore.kernel.org/all/20221024165549.74574-1-sebastian.reichel@collabora.com/ > > -- Sebastian ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-27 16:11 ` Johan Jonker @ 2022-10-27 16:26 ` Sebastian Reichel 2022-10-27 16:29 ` Johan Jonker 0 siblings, 1 reply; 9+ messages in thread From: Sebastian Reichel @ 2022-10-27 16:26 UTC (permalink / raw) To: Johan Jonker Cc: Rob Herring, Krzysztof Kozlowski, Alexandre Belloni, Alessandro Zummo, Krzysztof Kozlowski, linux-rtc, devicetree, linux-kernel, kernel [-- Attachment #1: Type: text/plain, Size: 4505 bytes --] 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 <sebastian.reichel@collabora.com> > >>>> --- > >>>> .../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 <alexandre.belloni@bootlin.com> > >>>> + > >>>> +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. -- Sebastian [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-27 16:26 ` Sebastian Reichel @ 2022-10-27 16:29 ` Johan Jonker 2022-10-28 16:19 ` Alexandre Belloni 0 siblings, 1 reply; 9+ messages in thread From: Johan Jonker @ 2022-10-27 16:29 UTC (permalink / raw) To: Sebastian Reichel Cc: Rob Herring, Krzysztof Kozlowski, Alexandre Belloni, Alessandro Zummo, Krzysztof Kozlowski, linux-rtc, devicetree, linux-kernel, kernel 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 <sebastian.reichel@collabora.com> >>>>>> --- >>>>>> .../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 <alexandre.belloni@bootlin.com> >>>>>> + >>>>>> +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. Johan > > -- Sebastian ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema 2022-10-27 16:29 ` Johan Jonker @ 2022-10-28 16:19 ` Alexandre Belloni 0 siblings, 0 replies; 9+ messages in thread From: Alexandre Belloni @ 2022-10-28 16:19 UTC (permalink / raw) To: Johan Jonker Cc: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Alessandro Zummo, Krzysztof Kozlowski, linux-rtc, devicetree, linux-kernel, kernel 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 <sebastian.reichel@collabora.com> > >>>>>> --- > >>>>>> .../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 <alexandre.belloni@bootlin.com> > >>>>>> + > >>>>>> +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 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-10-28 16:20 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-10-21 17:06 [PATCH 1/1] dt-bindings: rtc: convert hym8563 bindings to json-schema Sebastian Reichel 2022-10-21 21:00 ` Rob Herring 2022-10-21 23:59 ` Krzysztof Kozlowski 2022-10-24 18:50 ` Rob Herring 2022-10-24 22:05 ` Sebastian Reichel 2022-10-27 16:11 ` Johan Jonker 2022-10-27 16:26 ` Sebastian Reichel 2022-10-27 16:29 ` Johan Jonker 2022-10-28 16:19 ` Alexandre Belloni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).