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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C640FC77B60 for ; Fri, 28 Apr 2023 21:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=4RhCLdRk5vEG5TKKS8xU4shHUWmkKlBcpztVSqOH+Xw=; b=kcwKE2MRSYaHLE feqx113fP54oRnUwFO/9/9ATrehjQOg/8rPtWjYWiui1KMsBkbFSHEusLZnG2oKOZgxqz+x0oAkxB Uy9EakUD9Uw4hT51gErCb1Peqh3EoAyxqr3eTOwUnRRsfvBe7Rz/ZWZYjZ2Fy4JgKS9VIMggUx5cn V+8U/Ec/xv0HGhdM/OCjEswxN9/ksvfi7Yjqggt/6psayiV8MGSpBTch9VnqcEz3AbPR/VP6ZIuNO VaeUzWJC93EPsua2kSteB7XA0GDEDPYKOTUbh+NEi/RmB5mrJspcpEHJsVazQ56VVcCf23/dXq33t wHmdRzM4Sj0cEkvRhTzQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1psW58-00Bps7-2K; Fri, 28 Apr 2023 21:56:46 +0000 Received: from mail-oa1-f42.google.com ([209.85.160.42]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1psW56-00BprT-22 for linux-arm-kernel@lists.infradead.org; Fri, 28 Apr 2023 21:56:45 +0000 Received: by mail-oa1-f42.google.com with SMTP id 586e51a60fabf-187993bab0cso458300fac.3 for ; Fri, 28 Apr 2023 14:56:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682719003; x=1685311003; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5nFjavnBxbro/fiUVf4O04xlVdcIJiqIT9b+HFjtLWg=; b=T6Wm7GPkrMj/yJ8JB+N8yR655BnKXiomiAVzNRsu3z09EwmResG4XDD8eI+jzU+xIY yHDkI9NZx58AY1R5NZKm3NcYEHO376uoF+JfQw8vamM3bSqBAwynVtphkLzJeKva1LJy iuGS2UxU4gfxegfCnbHjmaqT40pxDRaG1OuLQJ/1Sfhuf+G72EtktC6j03KdzFOrYwsh vwQJnsNkb6JTNhSYDYY5+Gh+YNpfDkgyOkG/Kym5AOB4bZZHvKYzc3l0US/RlJMTxdSk kWl2kJCBrlRoDqmCfdRpGJZ4ZaqR5+SHeIIV8Cz241tLfFEgBzAXyRchdbEMkjWtrTOL +yXg== X-Gm-Message-State: AC+VfDwsj8k2csNbHrxPXYaW5xnt1C73W5Aj7pIBnRiXWfh6peBO60yL /tC2J/Pz5hH0wrnvqYGCdg== X-Google-Smtp-Source: ACHHUZ5OJNT5MsgdOGP6dVEQb4gbp242DVRGaHiNkTBgEHOBX2g6mFXeDDn4UrNam06kfjQ2PIi7Sw== X-Received: by 2002:a05:6870:d8af:b0:180:3225:b33b with SMTP id dv47-20020a056870d8af00b001803225b33bmr3139192oab.34.1682719002252; Fri, 28 Apr 2023 14:56:42 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id i4-20020a056870864400b0018e996a507esm6031489oal.31.2023.04.28.14.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 14:56:41 -0700 (PDT) Received: (nullmailer pid 345861 invoked by uid 1000); Fri, 28 Apr 2023 21:56:41 -0000 Date: Fri, 28 Apr 2023 16:56:41 -0500 From: Rob Herring To: Valentin Caron Cc: Mark Brown , Krzysztof Kozlowski , Alexandre Torgue , Alain Volmat , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/7] dt-bindings: spi: stm32: add stm32h7 st,spi-slave-underrun property Message-ID: <20230428215641.GA332435-robh@kernel.org> References: <20230428121524.2125832-1-valentin.caron@foss.st.com> <20230428121524.2125832-7-valentin.caron@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230428121524.2125832-7-valentin.caron@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230428_145644_667190_63BDE56E X-CRM114-Status: GOOD ( 21.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Fri, Apr 28, 2023 at 02:15:23PM +0200, Valentin Caron wrote: > This property is used to enable and configure stm32h7 SPI controller to > handle underrun that could appear in slave mode. > > Signed-off-by: Valentin Caron > --- > .../devicetree/bindings/spi/st,stm32-spi.yaml | 8 ++++++++ > MAINTAINERS | 1 + > include/dt-bindings/spi/spi-stm32.h | 15 +++++++++++++++ > 3 files changed, 24 insertions(+) > create mode 100644 include/dt-bindings/spi/spi-stm32.h > > diff --git a/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml b/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml > index 1d26fa2658c5..e946ea71a247 100644 > --- a/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml > +++ b/Documentation/devicetree/bindings/spi/st,stm32-spi.yaml > @@ -28,6 +28,7 @@ allOf: > properties: > st,spi-midi-ns: false > spi-slave: false > + st,spi-slave-underrun: false > > properties: > "#address-cells": true > @@ -70,6 +71,13 @@ properties: > In case of spi-slave defined, if <0>, indicate that SS should be > detected via the dedicated HW pin > > + st,spi-slave-underrun: > + $ref: /schemas/types.yaml#/definitions/uint32-array > + description: > + First parameter enables and selects slave underrun reaction. > + Refer to "dt-bindings/spi/spi-stm32.h" for the supported values. > + Second parameter is the pattern in case of SPI_SEND_PATTERN mode. So, max 2 cells? Then: minItems: 1 maxItems: 2 Though I don't really think this belongs in DT. The driver implementing the SPI slave function defines all the rest of the protocol the slave implements. Why not this little bit? Perhaps there is no way for a SPI slave driver to tell the SPI controller which controller specific mode to use, so you abuse DT to configure the SPI controller. Also, with a controller specific response, then the slave driver is coupled to that SPI controller which isn't great either. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel