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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220628110606.5xdzqxwrrqwymgvn@mobilestation>
Date:   Tue, 28 Jun 2022 14:06:06 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     Rob Herring <robh@...nel.org>
Cc:     Conor Dooley <mail@...chuod.ie>, David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Sam Ravnborg <sam@...nborg.org>,
        Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>,
        Vinod Koul <vkoul@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Palmer Dabbelt <palmer@...belt.com>,
        Palmer Dabbelt <palmer@...osinc.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Paul Walmsley <paul.walmsley@...ive.com>,
        Albert Ou <aou@...s.berkeley.edu>,
        Conor Dooley <conor.dooley@...rochip.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Niklas Cassel <niklas.cassel@....com>,
        Dillon Min <dillon.minfei@...il.com>,
        Heng Sia <jee.heng.sia@...el.com>,
        Jose Abreu <joabreu@...opsys.com>,
        dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, dmaengine@...r.kernel.org,
        alsa-devel@...a-project.org, linux-spi@...r.kernel.org,
        linux-riscv@...ts.infradead.org
Subject: Re: [PATCH 05/14] dt-bindings: timer: add Canaan k210 to Synopsys
 DesignWare timer

Hi Rob,

On Mon, Jun 27, 2022 at 05:30:25PM -0600, Rob Herring wrote:
> On Sat, Jun 18, 2022 at 01:30:27PM +0100, Conor Dooley wrote:
> > From: Conor Dooley <conor.dooley@...rochip.com>
> > 
> > The Canaan k210 apparently has a Sysnopsys Designware timer but
> > according to the documentation & devicetree it has 2 interrupts rather
> > than the standard one. Add a custom compatible that supports the 2
> > interrupt configuration and falls back to the standard binding (which
> > is currently the one in use in the devicetree entry).
> > 
> > Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 58
> > Signed-off-by: Conor Dooley <conor.dooley@...rochip.com>
> > ---
> >  .../bindings/timer/snps,dw-apb-timer.yaml     | 28 +++++++++++++++----
> >  1 file changed, 22 insertions(+), 6 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
> > index d33c9205a909..9a76acc7a66f 100644
> > --- a/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
> > +++ b/Documentation/devicetree/bindings/timer/snps,dw-apb-timer.yaml
> > @@ -12,6 +12,9 @@ maintainers:
> >  properties:
> >    compatible:
> >      oneOf:
> > +      - items:
> > +          - const: canaan,k210-apb-timer
> > +          - const: snps,dw-apb-timer
> >        - const: snps,dw-apb-timer
> >        - enum:
> >            - snps,dw-apb-timer-sp
> > @@ -21,9 +24,6 @@ properties:
> >    reg:
> >      maxItems: 1
> >  
> > -  interrupts:
> > -    maxItems: 1
> > -
> >    resets:
> >      maxItems: 1
> >  
> > @@ -41,7 +41,23 @@ properties:
> >  
> >    clock-frequency: true
> >  
> > -additionalProperties: false
> > +unevaluatedProperties: false
> > +
> > +if:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        const: canaan,k210-apb-timer
> > +
> > +then:
> > +  properties:
> > +    interrupts:
> > +      maxItems: 2
> 

> When more than 1, you need to define what they are and the order.

Please see my note to v2 of this patch:
Link: https://lore.kernel.org/lkml/20220627211314.dc2hempelyl5ayjg@mobilestation/

-Sergey

> 
> > +
> > +else:
> > +  properties:
> > +    interrupts:
> > +      maxItems: 1
> >  
> >  required:
> >    - compatible
> > @@ -60,8 +76,8 @@ oneOf:
> >  examples:
> >    - |
> >      timer@...00000 {
> > -      compatible = "snps,dw-apb-timer";
> > -      interrupts = <0 170 4>;
> > +      compatible = "canaan,k210-apb-timer", "snps,dw-apb-timer";
> > +      interrupts = <0 170 4>, <0 170 4>;
> >        reg = <0xffe00000 0x1000>;
> >        clocks = <&timer_clk>, <&timer_pclk>;
> >        clock-names = "timer", "pclk";
> > -- 
> > 2.36.1
> > 
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ