Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp2036860lqg; Mon, 4 Mar 2024 10:49:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVCO2Z/NcurfWOMBOdcQMwQUpHL518LYYP/ShZ8VoylkfZeFDn5b5T9io92Njxe2jBxvEy5D1A7pCzj/ANZRzKJ1yJjOUBN43N2eH1nWw== X-Google-Smtp-Source: AGHT+IHYulOI+RfRPTfE9FSw/mK2QjsZJ2FV3JeIMp+smLWeZtLf0oa+eeNAzlXaa8eflcAnwZKp X-Received: by 2002:a05:6a00:3d10:b0:6e5:a009:9eb4 with SMTP id lo16-20020a056a003d1000b006e5a0099eb4mr11640802pfb.0.1709578184375; Mon, 04 Mar 2024 10:49:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709578184; cv=pass; d=google.com; s=arc-20160816; b=VxHsPxLHUa1RTPmkg29wniacaIUGnqJ+s/lMMtLujyEJwqvu5YS9kzxjXxb9m4EGGM ppDkjG5c5lH8yLwm0XP6+pUxsya08cdCv/p4UIRvqOLUYNGNtsY3V+eeihdD0NE2R5RJ NTbUNTxKZu2ePW8rKX9BxmpbNpYeRhBPDMo4CD83PzeL7KYs9W1oOss8pbEBFH7W1u13 j2Mpw9FcpjXJk8Ey9KQjZeHJt9AYAJkUrZqtHSfvQHqn3qtUg6jMTL0Zjz11La6N+63T L7Xd4rphswxCxM/a3X6ctA5loUgvfoIzZTH0HpoxpBtSzNNaDCEfztzpltcYhaoYHiYs 47RQ== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=aQwEQKxahRfy1UUMYJ9k49LKptzc1VSVKXuBad2xfbI=; fh=hxsLc+Mnj++KnAYpZ/8xeAJ96DcO27JMG6bBlCKKAkY=; b=h7iaoEWFYHKSBRIrTyp4GFVwT75DZHBxtQxxqfP7p3e1MpIMA96mIAhmlApzcZtZqz gt+aipek7CWCwEaqr7BVdM5bQ2UBTI0oHkqzsy4l7ePhY5caLKvkwn8SZoNmkQ7penCB Zf8hgSLdSTdKoJXVv5ubLimEENHU3CNWP6CdhAeyODo8OC6NUvQuBXeltgPW+WdNHIm1 v+rwfefR+sElWF2riOc5f7lhJggUJFkTAOOZ2E/R19twFjP1mSoECzC3G2GaVVmA8siO SdguwnWpuDxhX8iopXWf4nSjBAqPuE8ncEhCsNYCL09M7haoGXxJ4bQIN8PJYEzN4UpR pgtQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=giHlgTOS; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-91078-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91078-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id fb23-20020a056a002d9700b006e0385d7185si8864597pfb.229.2024.03.04.10.49.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 10:49:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91078-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=giHlgTOS; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-91078-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91078-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1FFBFB2327D for ; Mon, 4 Mar 2024 18:15:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1521862171; Mon, 4 Mar 2024 18:15:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="giHlgTOS" Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (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 5AB0562145 for ; Mon, 4 Mar 2024 18:15:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709576146; cv=none; b=jC8iAZec9LQulx/un5TETg+rCivASOQflfmby8EZ5fsPaE1C+AP+C1yMhpb3VrpG01+ZP594b0TrC0FD8KBeBMPXHLuGZrVZwXJ2aw93OE7KKecr9b4YOe9K5kG0y6LiF867J2yyevgCCXlJp+4gwCPZgSDGtQsUswb6gJYDV/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709576146; c=relaxed/simple; bh=VauSxUeKDlLS0XJnXJZoJkn64Xnlj2KotCEvFkmd1CM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ACKt9IGE76r36BXsNWRgL/qAzkBYsOsXeYoj024Wl13Tvqk7t9sFdUyXbwmB5OEI7jzQRyvN8zVWWCIoxvtAO+H4hHngr021xQ/voyStTcTYHjJbMWGTNNr28PqXtTpNhlfW94vL6r63rBI1qdUfqPyoF2xa228MrZ4tIQQlUE8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=giHlgTOS; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-412dda84216so13713205e9.3 for ; Mon, 04 Mar 2024 10:15:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709576143; x=1710180943; darn=vger.kernel.org; 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:message-id:reply-to; bh=aQwEQKxahRfy1UUMYJ9k49LKptzc1VSVKXuBad2xfbI=; b=giHlgTOSMvkDMXM9IyCrVGaDCfjBaMJAoyL1F/KeJob1GmvRprtAPAVlvoLINkRH1E Tok4xu3GvvAAqEzx994pnEAx3HqzuE089NMI6tPZzaUZfC/reNJL9a2JNF3DctxvNGYK 4hqIIWCyLD6AfVuAO9KdBoOhoo7xN8ObZeMgkWxcyyZn2Ryb8dBk8i+GbIs8dfd5vLTd l2tgEIfGFd4kP//tzDBpTJWXf98WRgqYu34mRcl3S0YPqn5p64P8UXDf8wwQImTm8gCA 3p9gFgSHaH2Dpq8TnINIpPud9sUUn91eqvRTVSOpFw88X1FWbAAPyi6QujbgrEVSnlbv oPAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709576143; x=1710180943; 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:message-id:reply-to; bh=aQwEQKxahRfy1UUMYJ9k49LKptzc1VSVKXuBad2xfbI=; b=R+H5GFnUVF6yIYl9Vmr6uACt0etpnPsek7aaEfUAzcV4Kdv07jA3XBFN8YLBbOSno/ 1QW6ICotNgUrM1m4JdFzmDDuJyiFwO1tg1TGViw8ICRtV+5pcqdt8npNLBkIJluIVYPJ yDbeg2qQoWlL5FJ0ZsRZSXIHmdpj2bBENqsxaUluaTrkRSV8E9/Ibe/CCqpAXVL0+/30 w6rMLsoG+TODKTDOaSoTMCL3AlWM76FDc/GmQOOBTEDC9OMyO83xG3g7KKTpqw929MRd 1aFX0lU+a5QBh8vYSdwMvmrFkdjS441pBax9gIWD6gfJzhEmP1wSNDC4WkQMB8gpnY1t a9rA== X-Forwarded-Encrypted: i=1; AJvYcCVz48nXbbEq5jVi3KH164ftA6KwKa8Gu54I1MERL0cemNjVQB0QC4rXazNqWY6VEWDBmHbXah62AL40DyrMPmJxNdaVhv5nEJNWJRtE X-Gm-Message-State: AOJu0YzbdvM0PtXhuIItT0A3vO2mhhadWcsRTDhNGWL+IajS9aOYPmPt h9QbJ7ccgoum/g+d+5VYWWpwj7fT841TeG+rL5lLgmPT/6h5Z+tEMb8rO1k2f8A= X-Received: by 2002:a05:600c:1d8d:b0:412:e7e2:b134 with SMTP id p13-20020a05600c1d8d00b00412e7e2b134mr1415090wms.36.1709576142191; Mon, 04 Mar 2024 10:15:42 -0800 (PST) Received: from [192.168.2.107] ([79.115.63.35]) by smtp.gmail.com with ESMTPSA id i6-20020adfb646000000b0033e033898c5sm12820159wre.20.2024.03.04.10.15.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Mar 2024 10:15:41 -0800 (PST) Message-ID: <0852a6bc-315c-49e2-84fe-7dadca71df3d@linaro.org> Date: Mon, 4 Mar 2024 18:15:38 +0000 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] spi: dt-bindings: samsung: make dma properties not required Content-Language: en-US To: Rob Herring , Sam Protsenko Cc: Mark Brown , Krzysztof Kozlowski , andi.shyti@kernel.org, conor+dt@kernel.org, linux-spi@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, andre.draszik@linaro.org, peter.griffin@linaro.org, willmcvicker@google.com, kernel-team@android.com References: <20240301115546.2266676-1-tudor.ambarus@linaro.org> <20240304165635.GA739022-robh@kernel.org> From: Tudor Ambarus In-Reply-To: <20240304165635.GA739022-robh@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi, Rob, On 3/4/24 16:56, Rob Herring wrote: > On Sat, Mar 02, 2024 at 10:23:16AM -0600, Sam Protsenko wrote: >> On Sat, Mar 2, 2024 at 3:36 AM Tudor Ambarus wrote: >>> >>> >>> >>> On 01.03.2024 22:42, Mark Brown wrote: >>>> On Fri, Mar 01, 2024 at 01:28:35PM -0600, Sam Protsenko wrote: >>>>> On Fri, Mar 1, 2024 at 5:55 AM Tudor Ambarus wrote: >>>> >>>>>> Since the addition of the driver in 2009, the driver selects between DMA >>>>>> and polling mode depending on the transfer length - DMA mode for >>>>>> transfers bigger than the FIFO depth, polling mode otherwise. All >>>>>> versions of the IP support polling mode, make the dma properties not >>>>>> required. >>>> >>>>> AFAIU, the device tree has nothing to do with drivers, it's about >>>>> hardware description. Does making DMA properties not required here >>> >>> correct >>> >>>>> mean that there are some HW out there which doesn't integrate DMA in >>> >>> no, to me it means that the IP can work without DMA, only in PIO mode, >>> regardless if DMA is integrated or not. Not required means that the >>> property is not mandatory, which is what I'm trying to achieve here. >>> >>>>> SPI blocks? Even if this change is ok (I'm not sure), the >>>>> argumentation doesn't look sound to me. >>> >>> switching to PIO mode in the driver for sizes smaller than FIFO depths >>> in the driver guarantees that all existing compatibles support PIO mode. >>> >>> Are you saying that if there is a physical line between an IP and DMA >>> controller, then the DMA properties must always be specified in dt? I >>> thought they can be marked as optional in this case, and that's what I >>> did with this patch. >>> >> >> No, I would wait for maintainers to clarify on that bit. Change itself >> can be ok. But the commit message shouldn't mention the driver, >> because the driver uses (depends on) device tree, not vice versa. The >> device tree can be used in other projects as well (like U-Boot and >> OP-TEE), so it should be designed to be universal and not depend on >> kernel drivers. The commit message should be based on particular HW >> layout features and how the patch makes the bindings describe that HW >> better. It shouldn't rely on driver implementations. > > If the controller is DMA capable then it should have dma properties. The should have as in required/mandatory? > compatible should be enough to tell if it is a case of 'can only work yes, I agree > with DMA'. Otherwise, it is going to be up to a specific user. Even > within Linux, you may have a serial port that doesn't use DMA for the > console, but uses it for the tty or serdev. > > Of course, if a new device is added without DMA properties and they > are added later on, then they are going to be optional even though the > DMA support is always there. I can't fully understand everyone's h/w. > The SPI controller that I'm working with has a dedicated channel to the DMA controller. It can work without DMA too, just by polling registers or by interrupts. I can't get the DMA controller to work correctly yet, and since the SPI controller can work without DMA, I thought that I can mark the DMA properties as optional, add the SPI node in dt without DMA, and add the DMA properties later on, after I have the DMA controller working correctly. Is this approach wrong? Thanks, ta