Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp14890lqh; Thu, 30 May 2024 12:24:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWp+xj1DQ89FYwTiY3RaHxy574lvdqhMPQ+pipxOiuRqRUlCNiLbNqJkhGo8scMJ0m3Z5MdKCfW+1c1nS7fGDGT7qWNBL4wlrfLaVGi/g== X-Google-Smtp-Source: AGHT+IGE3MuWQkpOADw6m/5+O3v5995OUwaxcY4I3mUCmg58HsHlOBa02P2JFD2KmihI8DO1FjVd X-Received: by 2002:a05:6e02:15c4:b0:374:70ed:d765 with SMTP id e9e14a558f8ab-3747df50eb3mr28516345ab.3.1717097068824; Thu, 30 May 2024 12:24:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717097068; cv=pass; d=google.com; s=arc-20160816; b=ygeK5B5MDwb6TRL6FsT8U7hLxUswEm8UtOjkti24/w8sll2OevXrYbDjGCI1HeA1go v+kuubrt82vWdCOLcF2F+xCE5EEDUOLGjd3LtoGs9RyU0w+pdR9pdTtTgPdQCLVr10uP d8nuXUG1IoiHDDewbciQKlE/yLVREU/zyhpdHz/0oeVJMw3xQBidzXZfw/Vw4pOapr/U InYIhkQg313B4k4MHxk6b3PgQ2NYSt1M4npijizK92vCpYlIdHwGR1mQkBQt7U+Y6fnL U40JI42O2RWDv/8aLJMCRuP6LgG1FyRsSqQyV0smbmJ4dQc0s0EL6Hz4fx0GvMZGl+mk I8aQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=pTv8vl3hBxcvdk6Q4RODEZFm7a5MH4UmFXjV0ydwHe8=; fh=FkDkD69gFA2QW5wGe34CySntexPWIODyrQ7tCe7JaKI=; b=Eh02uKewl6cuiEWFD/2+15HU/PlcSfWtVZQPq1/9y+X2GQLo0d2TYbZGaqhdFDl8Me fsgORmVr6Et2OuShw0dt81NXOYW8czBRG8c/sV+lheAMEyQQNsx9PBtpSeWzJb66A12Q gMtZquvvlTvH6KSBtYTWc3UhEG3iZ0tD+krxQB5VipRUFpGgFcYw3cSh7wHJrBa0/8Ai Ue2At0bUGz/+mKZl7aitGhohG98CGzFpFQPr9CcL1M+3U9XSkxMboxz86lMjHF0oEsVO 1DE5voVWXhhsGgsHS8XD9gGupjmLDdw/JYNtcB0vOsAKlM/9uRtzUCDNrbpHqpBgbLtM Ruhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=Nh0qGhKv; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-195824-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195824-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35af45705si165675a12.460.2024.05.30.12.24.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 12:24:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195824-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=Nh0qGhKv; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-195824-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195824-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 65DBF2857E8 for ; Thu, 30 May 2024 19:24:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94C721482E0; Thu, 30 May 2024 19:24:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="Nh0qGhKv" Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D313E147C77 for ; Thu, 30 May 2024 19:24:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717097061; cv=none; b=VXGUlkhfqeqgasZQoDqM1aARqEwe2DPZdAkhek9TvlGivcPT/5aMUbryROanU6SN5AxOvNMmlp/uI7jeV/2XcNWUQZjTcj8+RcFWsONI/HEIj4Qj3JE3AW69ZlPRo+JnmFjwte+ihCGD/ZQ1WS7SRlzeIi6Yl9W5iWTnX7tWI/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717097061; c=relaxed/simple; bh=m4Nse25y6EsuGDUh4EtZfvdY5SZs8Aj2Asf9IIe5CPk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Rlsm3ktFWIEwZD5rzKf5WXqAelRxeTKQkgzlNci7eZv/UUIXr0uWhcWF1slsoyQiW2GY57fxFVdpOaEcThHD+1J365O9nW7PUoaKExk/fb5gjkL4tiQroS5+xYaOb9XHYQEQy3I5x6aeQCe4+X0uaH576IVZBgV3BhDtqz0h2lA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=Nh0qGhKv; arc=none smtp.client-ip=209.85.210.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-6f12eda7c7fso657988a34.2 for ; Thu, 30 May 2024 12:24:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717097059; x=1717701859; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pTv8vl3hBxcvdk6Q4RODEZFm7a5MH4UmFXjV0ydwHe8=; b=Nh0qGhKv3kyCZ4O5E8qWFEWyc9fkrAqkIRD7w/TPkAzhnQhesp8k+A1Q3iawhjPUO/ +CIBpjlEGlNUa0z7Ca/sG5/aydO0ZrEiJrQUxYvjnkgMLHtHg7Yeuhri1PsuQLY2xymP 8nTmwVbT6W0yzrp20flmPIbDQA3ZgcsTPBLPko0TSIUBTmGb4vY1+cmceyuTRzDzdNdJ RpgDFZOSfJxSz2ldRLovToq4jrNtpnuNiI7IcgqZ2oBn6H56wifIM397YSWWU42CJJUW 55U/zB+CKPsZ9oRoP4/jukJF0cfyyQT2cvRwwOYtbWykHeOfMy1OHzK7fcy3+CwgQmFJ 5N6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717097059; x=1717701859; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pTv8vl3hBxcvdk6Q4RODEZFm7a5MH4UmFXjV0ydwHe8=; b=RS8bGkqbjzo5MD6JDUfZ5HdyVbCPAP6KMFsUYpkiX1j+whdmru3ORNo9TiKBPTAKpQ lKzexF6pYsnkWA9svRa4bjM5723BMXrr/UQHXk2HWvMJ9grTW5mSM/J5a5x8Cu9O6v+Y vtRb3z78DHEw0xVmo5FQgMrJaqdu47MdGft01Dmp268dSX7e+fcmvPKdZTN//VPoVCy0 seb2eHe2p5BBqGaeXU4E/2T2XvFeTLsPDbjV8lU61u+5B4z25zwZT5mFH7uHYuW3CQnY s3f489VASMRseuw7T30VQcn7gPS/evWg++xRs9f+dQlRmER9OklSjOXDnUikRk5Jxa0v i85w== X-Forwarded-Encrypted: i=1; AJvYcCWzzBxjFeXcce6NO2z5DHfUjHXui7r6Szp2Pe0nIOVxNTCEhekS7QDaFnc/ZqhOMFUoYKq2QzLijrEy7STZRyDT7ItMhIXb1/yAD8zo X-Gm-Message-State: AOJu0YxOEwJCliAt4y2jf3iAtwglSLi0MkTsLhB1c+AXlcAUgek3j3sd OYk2g16jW8aUCvT3l/cQtmHg3YvVBbpIgHlnOkS9tzyxYreq2lBly/RRstKFpic= X-Received: by 2002:a05:6830:1db1:b0:6f0:bf65:9c42 with SMTP id 46e09a7af769-6f90aeb990cmr3295087a34.15.1717097058762; Thu, 30 May 2024 12:24:18 -0700 (PDT) Received: from [192.168.0.142] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-6f91053a3c1sm71347a34.27.2024.05.30.12.24.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 30 May 2024 12:24:17 -0700 (PDT) Message-ID: <6db8ba66-841b-4425-9dd4-9d6e7b0463bf@baylibre.com> Date: Thu, 30 May 2024 14:24:17 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH RFC v2 1/8] spi: dt-bindings: spi-peripheral-props: add spi-offloads property To: =?UTF-8?Q?Nuno_S=C3=A1?= , Conor Dooley Cc: Mark Brown , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , =?UTF-8?Q?Nuno_S=C3=A1?= , Michael Hennerich , Lars-Peter Clausen , David Jander , Martin Sperl , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org References: <20240513-headsman-hacking-d51fcc811695@spud> <20240514-aspire-ascension-449556da3615@spud> <20240516-rudder-reburial-dcf300504c0a@spud> <20240519-abreast-haziness-096a57ef57d3@spud> <20240522-gullible-ibuprofen-cf9111c25f6f@spud> <5ad0b5782434eaf4cf565cffb0e4c14b7414ae38.camel@gmail.com> <20240526-peculiar-panama-badda4f02336@spud> <10991373cb9603803df63d8236c475807f6dde68.camel@gmail.com> Content-Language: en-US From: David Lechner In-Reply-To: <10991373cb9603803df63d8236c475807f6dde68.camel@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 5/29/24 3:07 AM, Nuno Sá wrote: > On Sun, 2024-05-26 at 18:35 +0100, Conor Dooley wrote: >> It might be easy to do it this way right now, but be problematic for a >> future device or if someone wants to chuck away the ADI provided RTL and >> do their own thing for this device. Really it just makes me wonder if >> what's needed to describe more complex data pipelines uses an of_graph, >> just like how video pipelines are handled, rather than the implementation >> of io-backends that don't really seem to model the flow of data. >> > > Yeah, backends is more for devices/soft-cores that extend the functionality of the > device they are connected too. Like having DACs/ADCs hdl cores for connecting to high > speed controllers. Note that in some cases they also manipulate or even create data > but since they fit in IIO, having things like the DMA property in the hdl binding was > fairly straight. > > Maybe having an offload dedicated API (through spi) to get/share a DMA handle would > be acceptable. Then we could add support to "import" it in the IIO core. Then it > would be up to the controller to accept or not to share the handle (in some cases the > controller could really want to have the control of the DMA transfers). I could see this working for some SPI controllers, but for the AXI SPI Engine + DMA currently, the DMA has a fixed word size, so can't be used as a generic DMA with arbitrary SPI xfers. For example, if the HDL is compiled with a 32-bit word size, then even if we are reading 16-bit sample data, the DMA is going to put it in a 32-bit slot. So one could argue that this is still doing some data manipulation similar to the CRC checker example. > > Not familiar enough with of_graph so can't argue about it but likely is something > worth looking at. > > - Nuno Sá >>> I did try implementing something using graph bindings when I first started working on this, but it didn't seem to really give us any extra useful information. It was just describing connections (endpoints) that I thought we could just implicitly assume. After this discussion though, maybe worth a second look. I'll have to think about it more.