lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220516235249.GA3567294-robh@kernel.org>
Date:   Mon, 16 May 2022 18:52:49 -0500
From:   Rob Herring <robh@...nel.org>
To:     Valentin Caron <valentin.caron@...s.st.com>
Cc:     Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Gabriel Fernandez <gabriel.fernandez@...s.st.com>,
        Amelie Delaunay <amelie.delaunay@...s.st.com>,
        linux-rtc@...r.kernel.org, devicetree@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] dt-bindings: rtc: stm32: add st,lsco optional
 property to select output

On Wed, May 04, 2022 at 03:02:28PM +0200, Valentin Caron wrote:
> From: Amelie Delaunay <amelie.delaunay@...s.st.com>
> 
> STM32 RTC has three output pins: RTC_OUT1, RTC_OUT2 or RTC_OUT2_RMP.
> 
> RTC Low-Speed Clock Output (LSCO) can be output on RTC_OUT1 or
> RTC_OUT2_RMP.
> 
> This patch adds constants for RTC output bindings and adds st,lsco
> optional property for stm32 rtc driver, to select and enable LSCO.
> A pinctrl state is also optional to reserve pin for RTC output.
> 
> Signed-off-by: Amelie Delaunay <amelie.delaunay@...s.st.com>
> Signed-off-by: Valentin Caron <valentin.caron@...s.st.com>
> ---
>  .../devicetree/bindings/rtc/st,stm32-rtc.yaml | 20 +++++++++++++++++++
>  include/dt-bindings/rtc/rtc-stm32.h           | 14 +++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 include/dt-bindings/rtc/rtc-stm32.h
> 
> diff --git a/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml b/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> index 764717ce1873..56d46ea35c5d 100644
> --- a/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/st,stm32-rtc.yaml
> @@ -52,6 +52,13 @@ properties:
>        override default rtc_ck parent clock phandle of the new parent clock of rtc_ck
>      maxItems: 1
>  
> +  st,lsco:
> +    $ref: "/schemas/types.yaml#/definitions/uint32"
> +    description: |
> +      To select and enable RTC Low Speed Clock Output.
> +      Refer to <include/dt-bindings/rtc/rtc-stm32.h> for the supported values.
> +      Pinctrl state named "default" may be defined to reserve pin for RTC output.
> +
>  allOf:
>    - if:
>        properties:
> @@ -65,6 +72,9 @@ allOf:
>            minItems: 1
>            maxItems: 1
>  
> +        st,lsco:
> +          maxItems: 0

If disallowing the property is what you wanted, then 'st,lsco: false' is 
the way. 'maxItems: 0' is never correct.

> +
>          clock-names: false
>  
>        required:
> @@ -82,6 +92,9 @@ allOf:
>            minItems: 2
>            maxItems: 2
>  
> +        st,lsco:
> +          maxItems: 0
> +
>        required:
>          - clock-names
>          - st,syscfg
> @@ -101,6 +114,9 @@ allOf:
>          assigned-clocks: false
>          assigned-clock-parents: false
>  
> +        st,lsco:
> +          maxItems: 1
> +
>        required:
>          - clock-names
>  
> @@ -130,12 +146,16 @@ examples:
>    - |
>      #include <dt-bindings/interrupt-controller/arm-gic.h>
>      #include <dt-bindings/clock/stm32mp1-clks.h>
> +    #include <dt-bindings/rtc/rtc-stm32.h>
>      rtc@...04000 {
>        compatible = "st,stm32mp1-rtc";
>        reg = <0x5c004000 0x400>;
>        clocks = <&rcc RTCAPB>, <&rcc RTC>;
>        clock-names = "pclk", "rtc_ck";
>        interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
> +      st,lsco = <RTC_OUT2_RMP>;
> +      pinctrl-0 = <&rtc_out2_rmp_pins_a>;
> +      pinctrl-names = "default";
>      };
>  
>  ...
> diff --git a/include/dt-bindings/rtc/rtc-stm32.h b/include/dt-bindings/rtc/rtc-stm32.h
> new file mode 100644
> index 000000000000..2fd78c2e62d4
> --- /dev/null
> +++ b/include/dt-bindings/rtc/rtc-stm32.h
> @@ -0,0 +1,14 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * This header provides constants for STM32_RTC bindings.
> + */
> +
> +#ifndef _DT_BINDINGS_RTC_RTC_STM32_H
> +#define _DT_BINDINGS_RTC_RTC_STM32_H
> +
> +#define RTC_NO_OUT	0
> +#define RTC_OUT1	1
> +#define RTC_OUT2	2
> +#define RTC_OUT2_RMP	3
> +
> +#endif
> -- 
> 2.25.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ