From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5357BC2BB40 for ; Tue, 8 Dec 2020 23:42:47 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F0E523AC9 for ; Tue, 8 Dec 2020 23:42:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F0E523AC9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hAJY665FOzIFLHOUfPH7Z6s5hIbsGtP/e7dk0gpLWVY=; b=o/p8PD9o/0v5+5pjll8eUW7KM rHsubJFZOG2l+ZLbpRkjiUHSOod9LEFOvvmDejC/PR3qhhsbrEjjAZA5S76FfCgEoe5xy/U2K5z/J GLSWzzFniygF4lVVtfS+vAWfWVimJN2OZDg4BynvEI+Qlfk6t8KGNQyGkNpWdmUG7VDh8o0WnnqM5 kHvqFnyWIPbVT082ulGaM5QmYFfGSP4DH4SfIZqU60/n2KwOJ7uzqdV0nkQfc5eZvP6HcV6PICTfz clqig+3FFUlYQ/GR/JEcrfwnXGmvFyceULz7ELrWKBLMzaO0yB2/hgTcXesCtr1ixTd6aPMp9nWQn hsJ9YvrQQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmmbt-0004lI-Mf; Tue, 08 Dec 2020 23:41:33 +0000 Received: from mail-ot1-f66.google.com ([209.85.210.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmmbq-0004kX-HJ for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 23:41:31 +0000 Received: by mail-ot1-f66.google.com with SMTP id a109so499329otc.1 for ; Tue, 08 Dec 2020 15:41:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mCzrahJfQzjNGyApJxp330Y639Yd1mbxLODK6PjseoQ=; b=hbAecBD5gWj/AFGmr30i7DOUvYDqAlYwX2NgQxS+tPemYi4cg2BTB5DDDv1m0gEIUi HiO1xyJAfza+z/SP5y1C+4rTHX/S0fGbE+BVCSxm/W9YFu6XNoC5aw8Jf3etKgVdFS17 Gek8pqlK50uKuDciSCi8K4waTPTR+LIE+JiZBJ7Pd7xwEkqvH+T07NE0lrWPp1A29Rg/ nLOSKIqWJy7a4WMPfQqlYMe7EmGXhnq949tKeooFBout6+4qm8tgm5uUuuviFsSohzXV GGSt9rfJB0dETLwb8A4O1TcAJLiK6z6tcBJ13khLe87SHSt/9RTKoxynThStJDM/dmBT HWjA== X-Gm-Message-State: AOAM531XDLIrlWa3eH0txTa/kCqZUZRBL4NJbr6bhuqqqRBVPvt62BRF vmd6kaKbcdzR01rc0xPx4w== X-Google-Smtp-Source: ABdhPJyWhVNI/C53Lkge1VqK7cYq8nLg5rgXAvJRTD/JdewfYLumeU4nJgeCLYUAEw0d3qtY0FuK2g== X-Received: by 2002:a9d:73d1:: with SMTP id m17mr420711otk.187.1607470889716; Tue, 08 Dec 2020 15:41:29 -0800 (PST) Received: from xps15 (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id p4sm79330oib.24.2020.12.08.15.41.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Dec 2020 15:41:28 -0800 (PST) Received: (nullmailer pid 3334104 invoked by uid 1000); Tue, 08 Dec 2020 23:41:27 -0000 Date: Tue, 8 Dec 2020 17:41:27 -0600 From: Rob Herring To: Wendy Liang Subject: Re: [PATCH v3 1/9] dt-binding: soc: xilinx: ai-engine: Add AI engine binding Message-ID: <20201208234127.GA3303888@robh.at.kernel.org> References: <1606722505-16194-1-git-send-email-wendy.liang@xilinx.com> <1606722505-16194-2-git-send-email-wendy.liang@xilinx.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1606722505-16194-2-git-send-email-wendy.liang@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_184130_675456_50018400 X-CRM114-Status: GOOD ( 32.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tejas.patel@xilinx.com, ravi.patel@xilinx.com, linux-kernel@vger.kernel.org, rajan.vaja@xilinx.com, arnd@arndb.de, devicetree@vger.kernel.org, gregkh@linuxfoundation.org, dragan.cvetic@xilinx.com, michal.simek@xilinx.com, dri-devel@lists.freedesktop.org, sumit.semwal@linaro.org, manish.narani@xilinx.com, derek.kiernan@xilinx.com, christian.koenig@amd.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Nov 29, 2020 at 11:48:17PM -0800, Wendy Liang wrote: > Xilinx AI engine array can be partitioned statically for different > applications. In the device tree, there will be device node for the AI > engine device, and device nodes for the statically configured AI engine > partitions. Each of the statically configured partition has a partition > ID in the system. > > Signed-off-by: Wendy Liang > --- > .../bindings/soc/xilinx/xlnx,ai-engine.yaml | 126 +++++++++++++++++++++ > 1 file changed, 126 insertions(+) > create mode 100644 Documentation/devicetree/bindings/soc/xilinx/xlnx,ai-engine.yaml > > diff --git a/Documentation/devicetree/bindings/soc/xilinx/xlnx,ai-engine.yaml b/Documentation/devicetree/bindings/soc/xilinx/xlnx,ai-engine.yaml > new file mode 100644 > index 0000000..1de5623 > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/xilinx/xlnx,ai-engine.yaml > @@ -0,0 +1,126 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/soc/xilinx/xlnx,ai-engine.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Xilinx AI Engine > + > +maintainers: > + - Wendy Liang > + > +description: |+ You don't need '|' unless there's formatting to preserve. > + The Xilinx AI Engine is a tile processor with many cores (up to 400) that > + can run in parallel. The data routing between cores is configured through > + internal switches, and shim tiles interface with external interconnect, such > + as memory or PL. > + > +properties: > + compatible: > + const: xlnx,ai-engine-v1.0 This is soft logic? If not, don't use version numbers. > + > + reg: > + description: | > + Physical base address and length of the device registers. That's every 'reg' property. Drop. > + The AI engine address space assigned to Linux is defined by Xilinx > + platform design tool. > + > + '#address-cells': > + enum: [2] const: 2 > + description: | > + size of cell to describe AI engine range of tiles address. > + It is the location of the starting tile of the range. > + As the AI engine tiles are 2D array, the location of a tile > + is presented as (column, row), the address cell is 2. > + > + '#size-cells': > + enum: [2] > + description: | > + size of cell to describe AI engine range of tiles size. > + As the AI engine tiles are 2D array, the size cell is 2. > + > + power-domains: > + maxItems: 1 > + description: phandle to the associated power domain > + > + interrupts: > + maxItems: 3 > + > + interrupt-names: > + description: | > + Should be "interrupt1", "interrupt2" or "interrupt3". Really, not useful names. If you do have names, they should be a schema, not freeform text. > + > +required: > + - compatible > + - reg > + - '#address-cells' > + - '#size-cells' > + - power-domains > + - interrupt-parent Generally, never required because it could be in the parent node. > + - interrupts > + - interrupt-names > + > +patternProperties: > + "^aie_partition@[0-9]+$": aie-partition@ The unit-address is just the 1st cell of reg (the row)? Or needs to be row and column, in which case you'd want something like '@0,0'. Also, unit-address values are typically hex, not decimal. > + type: object > + description: | > + AI engine partition which is a group of column based tiles of the AI > + engine device. Each AI engine partition is isolated from the other > + AI engine partitions. An AI engine partition is defined by Xilinx > + platform design tools. Each partition has a SHIM row and core tiles rows. > + A SHIM row contains SHIM tiles which are the interface to external > + components. AXI master can access AI engine registers, push data to and > + fetch data from AI engine through the SHIM tiles. Core tiles are the > + compute tiles. > + > + properties: > + reg: > + description: | > + It describes the group of tiles of the AI engine partition. It needs > + to include the SHIM row. The format is defined by the parent AI engine > + device node's '#address-cells' and '#size-cells' properties. e.g. a v1 > + AI engine device has 2D tiles array, the first row is SHIM row. A > + partition which has 50 columns and 8 rows of core tiles and 1 row of > + SHIM tiles will be presented as <0 0 50 9>. You should be able to write some constraints like max row and column values? > + > + label: > + maxItems: 1 'label' is not an array. Why do you need label? > + > + xlnx,partition-id: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: | > + AI engine partition ID, which is defined by Xilinx platform design > + tool to identify the AI engine partition in the system. I find the use of 'reg' a bit odd here. Maybe using 'reg' for partition would make more sense? Which is more closely associated with how you address the partition? > + > + required: > + - reg > + - xlnx,partition-id > + additionalProperties: false > + > +additionalProperties: false > + > +examples: > + - | > + bus { > + #address-cells = <2>; > + #size-cells = <2>; > + > + ai_engine: ai-engine@20000000000 { > + compatible = "xlnx,ai-engine-v1.0"; > + reg = <0x200 0x0 0x1 0x0>; > + #address-cells = <2>; > + #size-cells = <2>; > + power-domains = <&versal_firmware 0x18224072>; > + interrupt-parent = <&gic>; > + interrupts = <0x0 0x94 0x4>, > + <0x0 0x95 0x4>, > + <0x0 0x96 0x4>; > + interrupt-names = "interrupt1", "interrupt2", "interrupt3"; > + > + aie_partition0: aie_partition@0 { > + /* 50 columns and 8 core tile rows + 1 SHIM row */ > + reg = <0 0 50 9>; > + xlnx,partition-id = <1>; > + }; > + }; > + }; > -- > 2.7.4 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel