Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp342159lqb; Tue, 4 Jun 2024 13:05:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnHslXRD8t4LKTvC4GNHGGpfp8s93qRXrZdvuuL17ljlf0DerWWr5FhEgFUEVP+gVp0WxaU2KWSRLRHGfIIKBDXhvKxm2TQJJnK6iEtw== X-Google-Smtp-Source: AGHT+IERpfCMuXbPXOAjUO80kzxMExnhQDCEyJxlvNzDoYvyVMIAPL6Il9Ck8wYmqJkG10kLPe0r X-Received: by 2002:a17:906:eb59:b0:a68:f6b7:714e with SMTP id a640c23a62f3a-a699f34d996mr35928866b.6.1717531551072; Tue, 04 Jun 2024 13:05:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717531551; cv=pass; d=google.com; s=arc-20160816; b=CaSbxL24gsiAu+s0lG/wJFJENy14/SE32jbWKDQK8jfO4eREqYgdS/GigUZY05b/Pc Va4gFC5yRyXRmhHR1X08x39QPSh3yjThHsg4fUeEx8TqhM2jhstu1qK+aPdYaopT6U1j UlhWTpkYmeHu9xkb6CZi3X9SHsw8CSKgaP1//no1SZefIX0k3sKqKXpOn5vXRYwdri4K K9fKIuxTvOTXHBidxdf3p70AbRIvjvC0VKqBYHagaC0qrssAztZsVGcH3+R/wSeO9AGi 3AB35/XngxjnEzGQZ5LQROe59mYJpRF4HU9U41jy/gfEnoWnMiQuEineSWu4/zdJrp90 Sn2A== 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=reaUaxTBxuoFAX9L6V67TsUNn1f3x3XIHPqfoIBlQq0=; fh=mwtaAfgsm/eZjcuZAcB8PguvPRVwXdhhdNXJMLBhe1o=; b=buyGvgGLieLWQikdn666tJMkJchJZfR0uUqBvaHcKrfl2AUkHCtFU+qjssQB+mm1I8 nlTCkiR+KmkQijRc4Hx8pnq2/LwJfTu/UaWKe+xCeczCNAv8W+w+MzY32GeMyX2DyiXa osGFrG3agCVY1FxCseUyATLTUFRFuasB66cq1ZXs5afQ8F3ktkHC8RZt/t9bFCHUKOFC 6epzA5IKIhVsFJkyVrojdlXUIm03PQlaypaejBnSeLvv+QfiPJGx86FZmA85aETbuz/H eiAT96oCEv8F43WPP7Bh2Cl86gMOe6qp/4ZU0rO9HfagNHkrMIyFy165XBLmd+pO1N4u o5KQ==; 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=bWF4Oy4a; 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-201324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201324-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a67ea38eb79si494088366b.369.2024.06.04.13.05.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 13:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=bWF4Oy4a; 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-201324-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201324-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 am.mirrors.kernel.org (Postfix) with ESMTPS id C84BC1F25C0D for ; Tue, 4 Jun 2024 20:05:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EC62114D702; Tue, 4 Jun 2024 20:04:16 +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="bWF4Oy4a" Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (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 288F314D44E for ; Tue, 4 Jun 2024 20:04:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717531456; cv=none; b=ld3yfjrB/PkhSFM090tXRjdw8RM2V6VqQxviS4Rq9zc2F/C0USWOa3Ooj2wibdxh31TpkapnulSNzJ8W78Kr/Sy26ce/UGqNGYL90LfUQwkK/SMCZhTEs2ntjIghBsIgWwVgZHDZE6yS2xq29JW/DHMe8cMI3SEq41KpkJ+u/a4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717531456; c=relaxed/simple; bh=ifJgSeAIFZRASnV+MOrg6/T+pJieJwJGF0TCkFg1iog=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Ye8Mxiiao8ftd2aihZqCIjQnUX3yq4yyVclQ37bay1Fu18gmWDlpslChyyYi+I4pnDy0wN7uii6y64EkM7mrD9FlFNinMlC1mgEyddgC8c33xVOJhFUphHnuNCN/O3UWMLrnbl6XAMNHGwnznB0rEVO34KufEzcru1kbST4Lq4k= 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=bWF4Oy4a; arc=none smtp.client-ip=209.85.160.44 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-oa1-f44.google.com with SMTP id 586e51a60fabf-24ca0876a83so3273798fac.2 for ; Tue, 04 Jun 2024 13:04:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1717531453; x=1718136253; 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=reaUaxTBxuoFAX9L6V67TsUNn1f3x3XIHPqfoIBlQq0=; b=bWF4Oy4ah+pkPTKMUvAGc1NaRuEQXO511gk38H+n7/NXkpZBaB1h2DeKwHKWBRaPPl JucdfVl/jv7650wwhX6JmlfhfkZqw0g66CitfXPcULpuK7EYRWox8qWngbH5MIWG9IVb H8MbefRuDnzrKFKalzc9csJrkeuQ7aJTVHOn97yT+BDynJIBwjejJ3DTrhk5Leu+o/tv NhGIKDgE6RtbAzx1nte96/jgNpsijeTBVXEpYPko1KtXGKFrthKEIWKTWXS47P3EPqOo f/yysWr/TitWs505ghnTxD0x6ESQ3zm1W4o6tq+egs4PpoB57QUOiD5AN5pxnNLUfUuV 9psQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717531453; x=1718136253; 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=reaUaxTBxuoFAX9L6V67TsUNn1f3x3XIHPqfoIBlQq0=; b=gy3qN/vHqthFF4wuISSqdXYkHPKp4OUsLdj1zBOJOwDrdN5Sos7gtYU8/F4GPHebxw whzdVmbNhjUJU0VlB3gFo97D709lv20Sj3RLiDUgnYvAnyIGHcyzNMtlz6+ZPjM+wTGu YoJvw53onNkdBggFJwjCoVe+J7XZnhf7tD7YauRpCmVvhjWzgKXVoAzMERleuGVANY4f T85/Vke+6odmjzP7yTFAvrLyuTUupyfPs+EDP8lJ7PqPFnqg7jGvYF1cAIxgjpaVVICO vCXdB9hVGZ5bGL0sPg/A6h05Xp+W+77LnwJNN1IkRU3K3lBJbWSqcWGvz30p77AA1Ule E52A== X-Forwarded-Encrypted: i=1; AJvYcCUGEoZch4lk4OqYhEMbF9rlyKLBh8P/afLXGLGiBYiLjhhbXn6wEIBM70Vx2XwcfUVc6oMDuxHVpIkNGZRibzwsuVVJO98yEXceyf9h X-Gm-Message-State: AOJu0YzNUhGO/HI7RA17XvnQu/1TA7DpjahJbGToEuKlmuzq0UYlkRCH 06Ee9cn70XbqXvDNXK/1KCqL+jwIFoLk3G3tyQxHFo9OfZ9AnpwID7POFXBSIL4= X-Received: by 2002:a05:6871:5b10:b0:250:6f7c:495 with SMTP id 586e51a60fabf-251225ff3c6mr570468fac.9.1717531453076; Tue, 04 Jun 2024 13:04:13 -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 586e51a60fabf-2508502c58esm3504232fac.29.2024.06.04.13.04.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Jun 2024 13:04:12 -0700 (PDT) Message-ID: Date: Tue, 4 Jun 2024 15:04:11 -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: Conor Dooley Cc: =?UTF-8?Q?Nuno_S=C3=A1?= , 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: <20240519-abreast-haziness-096a57ef57d3@spud> <20240522-gullible-ibuprofen-cf9111c25f6f@spud> <5ad0b5782434eaf4cf565cffb0e4c14b7414ae38.camel@gmail.com> <20240526-peculiar-panama-badda4f02336@spud> <10991373cb9603803df63d8236c475807f6dde68.camel@gmail.com> <6db8ba66-841b-4425-9dd4-9d6e7b0463bf@baylibre.com> <20240604-oink-recognize-682c553a18e5@spud> <97246fdc-bb33-45bc-a24a-c2595920421f@baylibre.com> <20240604-awry-container-a8c12f421a81@spud> Content-Language: en-US From: David Lechner In-Reply-To: <20240604-awry-container-a8c12f421a81@spud> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 6/4/24 2:42 PM, Conor Dooley wrote: > On Tue, Jun 04, 2024 at 02:39:18PM -0500, David Lechner wrote: >> On 6/4/24 2:33 PM, Conor Dooley wrote: >>> On Thu, May 30, 2024 at 02:24:17PM -0500, David Lechner wrote: >>>> 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. >>>> >>>> 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. >>> >>> Could you elaborate on why you think you can assume the connections? What >>> happens when you have multiple stages of data processing and/or multiple >>> ADCs in your system? As I've previously said, I work on FPGA stuff, and >>> everyone here seems to fawn over having in >>> their data pipelines. I can't imagine it being any different for ADC data, >>> and an io-backend property that doesn't describe how the data flows is >>> gonna become lacklustre I think. >> >> I was more ignorant back then. :-) >> >> That is is why I said "thought" instead of "think". I am more enlightened now. > > Heh, I didn't mean it in a bad way. I just wanted to flesh out why you > thought that way. > Back then, we were going on the assumption that no one would want to make their own custom IP and only use the IP blocks provided by ADI for ADI chips. So given chip X + SPI offload, we could assume HDL project Y was being used.