Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5751984rwb; Wed, 21 Sep 2022 11:54:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7LiFbKP9Y1L5jQ0DfI6SZ6hX8AWum3zrJjheegmBgX4ptivw5fbaFcAjyJ1jApUKDK7ZPh X-Received: by 2002:a63:31d6:0:b0:43a:1129:e485 with SMTP id x205-20020a6331d6000000b0043a1129e485mr15299683pgx.177.1663786475821; Wed, 21 Sep 2022 11:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663786475; cv=none; d=google.com; s=arc-20160816; b=S5RVTk/37Wl63D8bv+/R4UkjZieey9pWDtNCNQ/y7n+1Ey6HY/q0wxhVlSDxB8DMGu R4ipQ32HrrcFiGkUB494EQlCiGtmn5aKjSOiLsvj9FigsV1tHGoA4YwDSTArq2wgeStm S0pwvtlxHq0VonaUZqcy/VV4S3/wb/r/myy3ZXQg2ms/HE49x9/mmmpHvLDFzmswi5JN Cp6hQNr0lq7m6GCLkAgr9wJ9i3XIa8WQ3gfYWhYJH/fAcnGcGLpMQklHtqwzmGF7veVP oI1Ii2fFjdU8t5Xof5s60dmHvRiP0qKB95SyL551W0fn+xdaSr2D6334AzLDuuZzwEb2 dhCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=jj44WRYimdF0xc0N46I38NMzPa943YobJRyP5eldgvA=; b=eGfhpQIo70TOS0PU3DWtxAG8DIai6alQldeOvtqL09JwQ195pNnQDPePNgH36Y5E4l NX2IfYqqY1qnXzhKwM/QntRvaAAWN6FU/Yw/CEPNE1alqAsU/RN7c18QJYU+9tvO0etj ymAbbl+f7GW/rr/OxC4LbBmVI8z9N27Gh42oOWpMcbFgdvarakb7VdMPhDwU4MPvM+wi AU2pJUacGaiFkuhdRhvXNmBEYxi8qRz1dVnhroMUuQhDUbbH3pTX4IZwvrHNJbSedLET ej+l4OmVptCpOKgYnq66QwBZdrxH7fWr0ZeEAL6bAnDEftE/CW5SQcOlABtz57pKFuKJ ydUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KixLl6k+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a17090332d200b001780f0f7ed9si4139957plr.47.2022.09.21.11.54.23; Wed, 21 Sep 2022 11:54:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KixLl6k+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbiIUSmn (ORCPT + 99 others); Wed, 21 Sep 2022 14:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbiIUSmk (ORCPT ); Wed, 21 Sep 2022 14:42:40 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08C74A1A66 for ; Wed, 21 Sep 2022 11:42:39 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id q17so8078032lji.11 for ; Wed, 21 Sep 2022 11:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=jj44WRYimdF0xc0N46I38NMzPa943YobJRyP5eldgvA=; b=KixLl6k+0NIKMZhzpPi5ukq+WAd/CQVo3kJ6rLxbU5RRpSd5myXRSl1p2+VTz2EkRS 2WLpvqkZN+9oA+rTZFoy4G3lI9qnp6a10izc5P+Dw4/1Jvubxi072Ut4nZQEM2kqycXH tVA/lWIcPGRlImwtolnAYB94FRyUUyw/Qj4XYKhliGlz8wK4E/rGreqvvLoEOtbuTdY2 Cj+h3JbIlpsgcxNX4skG5ObZUJPzly61gTfXNFYrBSIOo9GKQtyD+8lWpnmWzHVSjQaa 2O94YtgE1CJaPpV85nDtTcuAcy8UvaInrU6un2GzSVnvcW01MP/qB2/EPuBWaxif4wzU ajIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=jj44WRYimdF0xc0N46I38NMzPa943YobJRyP5eldgvA=; b=F9MjVaEQ9Dj7GDBsnw2+SrrsOdexQNauO3Yjs3OcyQ/ad+ZqJ11kZOxuf+BVLm2rim UVytIuEY/W0yixvim5rOYD2kv1Jpwu+9ogZTQh8IK0BVD/teyhoY+Udk+zi22bDHb2DL nPptdYP8NYn78df75c0blevpcbAI6HIVtfbm0v5oPm7OXR9ZYI/lClV+62+jjTe4Tmfk bzPYojTFg2oSIK9ukSFezkHY5+N6i3EPeTC6Mcb1fYiyPOtct4HmNYr5zveVkcy/BMLz x1GfNB2d013wNQ815jdC077fjlg0EZvxfLepzhm7MFeYYc0BSlG7BycA7mn2fJJUWrq0 JWGg== X-Gm-Message-State: ACrzQf2p0NHfZrbEiuLTdBimxaXSPQQ3PnkRjKjqypALEg5Z4rK51UF8 xS13Kz7Qa54t3lC9hKhAPB9T8A== X-Received: by 2002:a2e:bba2:0:b0:26b:e2d6:fe44 with SMTP id y34-20020a2ebba2000000b0026be2d6fe44mr9265132lje.286.1663785757347; Wed, 21 Sep 2022 11:42:37 -0700 (PDT) Received: from [192.168.0.21] (78-11-189-27.static.ip.netia.com.pl. [78.11.189.27]) by smtp.gmail.com with ESMTPSA id s11-20020ac25c4b000000b0049f5c71f1c4sm541947lfp.198.2022.09.21.11.42.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Sep 2022 11:42:36 -0700 (PDT) Message-ID: <68a87470-2946-cdd0-f1a4-0c0bac906e8c@linaro.org> Date: Wed, 21 Sep 2022 20:42:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH v2 13/13] dt-bindings: arm: Add Samsung Trinity bindings Content-Language: en-US To: Jiho Chu , gregkh@linuxfoundation.org, arnd@arndb.de, ogabbay@kernel.org, broonie@kernel.org Cc: linux-kernel@vger.kernel.org, yelini.jeong@samsung.com, myungjoo.ham@samsung.com References: <20220917072356.2255620-1-jiho.chu@samsung.com> <20220917072356.2255620-14-jiho.chu@samsung.com> From: Krzysztof Kozlowski In-Reply-To: <20220917072356.2255620-14-jiho.chu@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Signed-off-by: Yelin Jeong > Signed-off-by: MyungJoo Ham > --- > .../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: http://devicetree.org/schemas/arm/samsung,trinity.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Samsung Trinity NPU Family > + > +maintainers: > + - Jiho Chu > + > +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. > + > + samsung,tops: > + description: Performance metric (Tera Operation Per Seconds) > + enum: [2, 8] What piece of hardware this describes? > + > + 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. > + 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. > + > + 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. > + > + 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. > + reg-names = "cp-mmreg", "dsp-mmreg", "cbox-mmreg"; > + > + interrupts = ; > + }; Best regards, Krzysztof