mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiho Chu <jiho.chu@samsung.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: gregkh@linuxfoundation.org, arnd@arndb.de, ogabbay@kernel.org,
	broonie@kernel.org, linux-kernel@vger.kernel.org,
	yelini.jeong@samsung.com, myungjoo.ham@samsung.com
Subject: Re: [PATCH v2 13/13] dt-bindings: arm: Add Samsung Trinity bindings
Date: Thu, 22 Sep 2022 11:20:55 +0900	[thread overview]
Message-ID: <20220922112055.46c1e55453d16383666ebe27@samsung.com> (raw)
In-Reply-To: <68a87470-2946-cdd0-f1a4-0c0bac906e8c@linaro.org>

On Wed, 21 Sep 2022 20:42:35 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 17/09/2022 09:23, Jiho Chu wrote:
> > The Trinity Neural Processing Unit (NPU) is a hardware IP for providing
> > hardware acceleration for neural network processing workloads. It has
> > own virtual ISA decoder unit, and controlled by memory mapped control
> > registers. The IP is composed of Common Processor (CP), Digital Signal
> > Processor (DSP) and Deep Learning Accelerator (DLA). ComBox is register
> > set to control IRQ or check overall status of the IP.
> > 
> > Signed-off-by: Jiho Chu <jiho.chu@samsung.com>
> > Signed-off-by: Yelin Jeong <yelini.jeong@samsung.com>
> > Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> > ---
> >  .../bindings/arm/samsung,trinity.yaml         | 115 ++++++++++++++++++
> >  1 file changed, 115 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/arm/samsung,trinity.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/samsung,trinity.yaml b/Documentation/devicetree/bindings/arm/samsung,trinity.yaml
> > new file mode 100644
> > index 000000000000..cd79ec040162
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/samsung,trinity.yaml
> > @@ -0,0 +1,115 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: https://protect2.fireeye.com/v1/url?k=d6ad487f-b7d0a003-d6acc330-74fe485cc33c-c18489118cc5693c&q=1&e=e1fcd741-e7bc-4610-b982-e9d1481f4eb1&u=http%3A%2F%2Fdevicetree.org%2Fschemas%2Farm%2Fsamsung%2Ctrinity.yaml%23
> > +$schema: https://protect2.fireeye.com/v1/url?k=eceeef8d-8d9307f1-ecef64c2-74fe485cc33c-c540319d368eacda&q=1&e=e1fcd741-e7bc-4610-b982-e9d1481f4eb1&u=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23
> > +
> > +title: Samsung Trinity NPU Family
> > +
> > +maintainers:
> > +  - Jiho Chu <jiho.chu@samsung.com>
> > +
> > +description: |
> > +  The Trinity Neural Processing Unit (NPU) is a hardware IP for providing
> > +  hardware acceleration for neural network processing workloads. It has
> > +  own virtual ISA decoder unit, and controlled by memory mapped control
> > +  registers. The IP is composed of Common Processor (CP), Digital Signal
> > +  Processor (DSP) and Deep Learning Accelerator (DLA). ComBox is register
> > +  set to control IRQ or check overall status of the IP.
> > +
> > +properties:
> > +  compatible:
> > +    const: samsung,trinity
> > +
> > +  samsung,trinity-type:
> > +    description: type of trinity family
> > +    enum: ['triv2']
> 
> No, we have compatible for this.
> 

This property will be removed.

> > +
> > +  samsung,tops:
> > +    description: Performance metric (Tera Operation Per Seconds)
> > +    enum: [2, 8]
> 
> What piece of hardware this describes?
> 

This is related to HW internal structure, but it can be matched from
compotible property. I'll add more value for compitable, and this
will be removed. 


> > +
> > +  samsung,idu_cp:
> 
> No underscores in names.
> 
> Missing ref/type. Missing description. I am not sure that this belongs
> to DT.
> 
> 
> > +    items:
> > +      - description: Address of zero data of CP
> > +      - description: Address of IDU data of CP
> > +      - description: Maximum size of CP's IDU binary
> 
> > +
> > +  samsung,idu_dsp:
> 
> The same.
> 

underscore will be fixed like (samsung,idu,xxxx)

> > +    items:
> > +      - description: Address of zero data of DSP
> > +      - description: Address of IDU data of DSP
> > +      - description: Maximum size of DSP's IDU binary
> > +
> > +  samsung,dspm:
> > +    description: The size of Data Scratch-Pad Memory
> > +
> > +  memory-region:
> > +    description:
> > +      phandle to the reserved memory node to be associated
> > +      with the trinity device. The reserved memory node
> > +      can be a CMA memory node.
> > +      Documentation/devicetree/bindings/reserved-memory/reserved-memory.yaml
> > +
> > +  dma-coherent: true
> > +
> > +  reg:
> > +    items:
> > +      - description: Memory mapped register of CP
> > +      - description: Memory mapped register of DSP
> > +      - description: Memory mapped register of ComBox
> > +
> > +  reg-names:
> > +    items:
> > +      - const: cp-mmreg
> > +      - const: dsp-mmreg
> > +      - const: cbox-mmreg
> 
> Drop "reg" suffixes.
> 

OK.

> > +
> > +  interrupts:
> > +    description: workload complete interrupt
> > +    maxItems: 1
> > +
> > +required:
> > +  - compatible
> > +  - samsung,trinity-type
> > +  - samsung,tops
> > +  - samsung,idu_cp
> > +  - samsung,idu_dsp
> > +  - samsung,dspm
> > +  - memory-region
> > +  - dma-coherent
> > +  - reg
> > +  - reg-names
> > +  - interrupts
> > +
> > +examples:
> > +  - |
> > +    reserved-memory {
> > +        #address-cells = <2>;
> > +        #size-cells = <1>;
> > +        trinity_dram_0: memory@80000000 {
> > +            compatible = "shared-dma-pool";
> > +            no-map;
> > +            reg = <0x0 0x80000000 0x10000000>;
> > +        };
> > +    };
> 
> Drop this part - it is fairly obvious.
> 

OK.

> > +
> > +    triv2@0x30C00000 {
> > +        compatible = "samsung,trinity";
> > +        samsung,trinity-type = "triv2";
> > +        samsung,tops = <8>;
> > +        samsung,idu_cp = /bits/ 64 <0x30400000 0x30400010 0x10000>;
> > +        samsung,idu_dsp = /bits/ 64 <0x30500000 0x30500010 0x10000>;
> > +        samsung,dspm = <0x40000>;
> > +
> > +        memory-region = <&trinity_dram_0>
> > +
> > +        dma-coherent;
> > +
> > +        reg =   <0x0 0x30C10000 0x0 0x10000>, /* CP MMREG base */
> > +                <0x0 0x30D40000 0x0 0x10000>, /* DSP MMREG base */
> > +                <0x0 0x30DF0000 0x0 0x01000>; /* ComBox MMREG base */
> 
> 
> reg and reg-names go after compatible.
> 

OK.

> > +        reg-names = "cp-mmreg", "dsp-mmreg", "cbox-mmreg";
> > +
> > +        interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
> > +    };
> 
> Best regards,
> Krzysztof
> 
> 

Hi, Krzysztof
Thanks for your review.

Best regards,
Jiho Chu





      reply	other threads:[~2022-09-22  2:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20220917072357epcas1p3fea7d947782d9ce58d91249533e0c1f7@epcas1p3.samsung.com>
2022-09-17  7:23 ` [PATCH v2 00/13] Samsung Trinity NPU device driver-v2 Jiho Chu
     [not found]   ` <CGME20220917072357epcas1p17b277154f0d020435417450fa0337906@epcas1p1.samsung.com>
2022-09-17  7:23     ` [PATCH v2 01/13] trinity: Add base driver Jiho Chu
2022-09-17  7:41       ` Arnd Bergmann
2022-09-17 14:49         ` Jiho Chu
2022-09-22 13:56           ` Arnd Bergmann
2022-09-23 15:09             ` Jiho Chu
2022-09-19  4:26         ` Jiho Chu
2022-09-18 10:35       ` Greg KH
2022-09-19  2:00         ` Jiho Chu
     [not found]         ` <CGME20220917072357epcas1p17b277154f0d020435417450fa0337906@epcms1p1>
2022-09-19  2:57           ` MyungJoo Ham
     [not found]   ` <CGME20220917072357epcas1p1bc8d924080c5dabafee1db779369078d@epcas1p1.samsung.com>
2022-09-17  7:23     ` [PATCH v2 02/13] tirnity: Add memory module Jiho Chu
     [not found]   ` <CGME20220917072357epcas1p4a5b3939adbe5e24c11bd2541f76f23f6@epcas1p4.samsung.com>
2022-09-17  7:23     ` [PATCH v2 03/13] trinity: Add IDU feature Jiho Chu
     [not found]   ` <CGME20220917072357epcas1p378e13844913c3c80acd183ddd59de456@epcas1p3.samsung.com>
2022-09-17  7:23     ` [PATCH v2 04/13] trinity: Add schduler module Jiho Chu
     [not found]   ` <CGME20220917072357epcas1p2735d98b043e2382aba1173c6b52af81a@epcas1p2.samsung.com>
2022-09-17  7:23     ` [PATCH v2 05/13] trinity: Add debugfs module Jiho Chu
     [not found]   ` <CGME20220917072357epcas1p2ec70909280eee82b0db5ad454247daf8@epcas1p2.samsung.com>
2022-09-17  7:23     ` [PATCH v2 06/13] trinity: add statistics module Jiho Chu
     [not found]   ` <CGME20220917072357epcas1p485a1cdcb71cc01274db1c8d00aec197c@epcas1p4.samsung.com>
2022-09-17  7:23     ` [PATCH v2 07/13] trinity: Add sysfs module Jiho Chu
2022-09-18 10:33       ` Greg KH
2022-09-19  6:44         ` Jiho Chu
     [not found]   ` <CGME20220917072358epcas1p14543c842bdf0b6f719d4e0d2ed3bf33c@epcas1p1.samsung.com>
2022-09-17  7:23     ` [PATCH v2 08/13] trinity: Add ioctl feature Jiho Chu
     [not found]   ` <CGME20220917072358epcas1p2ae33a31333089ea7b10844e42e14323b@epcas1p2.samsung.com>
2022-09-17  7:23     ` [PATCH v2 09/13] trinity: Add request and pm feature Jiho Chu
     [not found]   ` <CGME20220917072358epcas1p14997459c7add27bf7b4e9333cbf21b72@epcas1p1.samsung.com>
2022-09-17  7:23     ` [PATCH v2 10/13] trinity: Add profile module Jiho Chu
     [not found]   ` <CGME20220917072358epcas1p4e110e2025c90d78fad2182ec5cd66eb7@epcas1p4.samsung.com>
2022-09-17  7:23     ` [PATCH v2 11/13] trinity: Add trace module Jiho Chu
     [not found]   ` <CGME20220917072358epcas1p30b24a99cbf5a0ae7175efc794c5d218d@epcas1p3.samsung.com>
2022-09-17  7:23     ` [PATCH v2 12/13] MAINTAINERS: add TRINITY driver Jiho Chu
     [not found]   ` <CGME20220917072358epcas1p15d18d4cf27694f894332f975bb971bef@epcas1p1.samsung.com>
2022-09-17  7:23     ` [PATCH v2 13/13] dt-bindings: arm: Add Samsung Trinity bindings Jiho Chu
2022-09-21 18:42       ` Krzysztof Kozlowski
2022-09-22  2:20         ` Jiho Chu [this message]

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=20220922112055.46c1e55453d16383666ebe27@samsung.com \
    --to=jiho.chu@samsung.com \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=ogabbay@kernel.org \
    --cc=yelini.jeong@samsung.com \
    /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

all inboxes | Powered by JetHome®