Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org,
	aou@eecs.berkeley.edu, alexghiti@rivosinc.com,
	geert+renesas@glider.be, leyfoon.tan@starfivetech.com,
	heiko@sntech.de, prabhakar.mahadev-lad.rj@bp.renesas.com,
	guoren@kernel.org, linux-kernel@vger.kernel.org,
	krzysztof.kozlowski+dt@linaro.org, jeeheng.sia@starfivetech.com,
	conor.dooley@microchip.com, evan@rivosinc.com,
	palmer@dabbelt.com, jszhang@kernel.org, paul.walmsley@sifive.com,
	Joshua Yeong <joshua.yeong@starfivetech.com>,
	linux-riscv@lists.infradead.org, ajones@ventanamicro.com
Subject: Re: [PATCH 4/4] dt-bindings: cache: Add docs for StarFive StarLink-500 cache controller
Date: Sun, 17 Mar 2024 14:58:32 +0000	[thread overview]
Message-ID: <20240317-snide-pounce-4a82ee1704ad@spud> (raw)
In-Reply-To: <20240315163607.GA1444248-robh@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 3393 bytes --]

On Fri, Mar 15, 2024 at 10:36:07AM -0600, Rob Herring wrote:
> On Thu, Mar 14, 2024 at 02:12:05PM +0800, Joshua Yeong wrote:
> > Add DT binding documentation used by StarFive's
> > Starlink-500 cache controller.
> > 
> > Signed-off-by: Joshua Yeong <joshua.yeong@starfivetech.com>
> > ---
> >  .../cache/starfive,starlink-500-cache.yaml    | 62 +++++++++++++++++++
> >  1 file changed, 62 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/cache/starfive,starlink-500-cache.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/cache/starfive,starlink-500-cache.yaml b/Documentation/devicetree/bindings/cache/starfive,starlink-500-cache.yaml
> > new file mode 100644
> > index 000000000000..97ddf7db39e9
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/cache/starfive,starlink-500-cache.yaml
> > @@ -0,0 +1,62 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/cache/starfive,starlink-500-cache.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: StarFive StarLink-500 Cache Controller
> > +
> > +maintainers:
> > +  - Joshua Yeong <joshua.yeong@starfivetech.com>
> > +
> > +description:
> > +  StarFive's StarLink-500 controller manages cache shared between clusters of
> > +  CPU cores. The cache driver provides mechanism to perform invalidate and write
> > +  back functionality to the shared memory.
> 
> What a driver does is not relevant to the binding. You could describe 
> what the registers control though.
> 
> > +
> > +allOf:
> > +  - $ref: /schemas/cache-controller.yaml#
> > +
> > +# We need a select here so we don't match all nodes with 'cache'
> > +select:
> > +  properties:
> > +    compatible:
> > +      contains:
> > +        enum:
> > +          - starfive,starlink-500-cache
> > +
> > +  required:
> > +    - compatible
> > +
> > +properties:
> > +  compatible:
> > +    items:
> > +      - const: starfive,starlink-500-cache
> > +      - const: cache

You're also missing a soc-specific compatible here as far as I can tell,
as one of the other patches in this series specifically calls out the
JH8100 as where this cache controller is. AFAICT, "starlink-500" is the
name of the IP or of the coreplex - it's not the name of the SoC.

> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  cache-size: true
> > +  cache-sets: true
> > +  cache-block-size: true
> > +  cache-level: true
> > +  cache-unified: true
> 
> Drop these and...
> 
> > +
> > +additionalProperties: false
> 
> ... use 'unevaluatedProperties' instead.
> 
> > +
> > +required:
> > +  - compatible
> > +  - reg
> 
> cache-unified should be required as I imagine the cache is always 
> unified. Perhaps other properties too (cache-level already is)?

And I also suspect that a load of the values can be restricted to
specific values for that jh8100 compatible.

> 
> > +
> > +examples:
> > +  - |
> > +      cache-controller@15000000 {
> > +        compatible = "starfive,starlink-500-cache", "cache";
> > +        reg = <0x15000000 0x278>;
> > +        cache-block-size = <64>;
> > +        cache-level = <3>;
> > +        cache-sets = <8192>;
> > +        cache-size = <0x400000>;
> > +        cache-unified;
> > +      };
> > -- 
> > 2.25.1
> > 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2024-03-17 14:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  6:12 [PATCH 0/4] Add StarFive's StarLink-500 Cache Controller Joshua Yeong
2024-03-14  6:12 ` [PATCH 1/4] riscv: asm: vendorid_list: Add StarFive Technology to vendors list Joshua Yeong
2024-03-14  6:12 ` [PATCH 2/4] riscv: errata: Add StarFive alternative ports Joshua Yeong
2024-03-15 23:13   ` Samuel Holland
2024-03-17 15:04     ` Conor Dooley
2024-03-14  6:12 ` [PATCH 3/4] cache: Add StarLink-500 cache management for StarFive JH8100 RISC-V core Joshua Yeong
2024-03-15  8:22   ` kernel test robot
2024-03-15 23:33   ` Samuel Holland
2024-03-14  6:12 ` [PATCH 4/4] dt-bindings: cache: Add docs for StarFive StarLink-500 cache controller Joshua Yeong
2024-03-15 16:36   ` Rob Herring
2024-03-17 14:58     ` Conor Dooley [this message]
2024-03-17 15:01 ` [PATCH 0/4] Add StarFive's StarLink-500 Cache Controller Conor Dooley
2024-03-20  8:08   ` Conor Dooley
2024-03-22  6:16     ` Joshua Yeong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240317-snide-pounce-4a82ee1704ad@spud \
    --to=conor@kernel.org \
    --cc=ajones@ventanamicro.com \
    --cc=alexghiti@rivosinc.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=evan@rivosinc.com \
    --cc=geert+renesas@glider.be \
    --cc=guoren@kernel.org \
    --cc=heiko@sntech.de \
    --cc=jeeheng.sia@starfivetech.com \
    --cc=joshua.yeong@starfivetech.com \
    --cc=jszhang@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leyfoon.tan@starfivetech.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox