Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2725936rwr; Fri, 28 Apr 2023 15:04:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5Frmmldkf13e/MCJni5BbFELsJVbR5qVzaWhzX7FkBMIEygIfaOWH3kwPb41Dre1CLZizP X-Received: by 2002:a17:902:dac1:b0:1a6:93cc:924b with SMTP id q1-20020a170902dac100b001a693cc924bmr8031053plx.3.1682719475712; Fri, 28 Apr 2023 15:04:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682719475; cv=none; d=google.com; s=arc-20160816; b=d5gpbWRZHpAn4uB5pwrXnDNA6g0cB+tM3VVLtFNrguRJmEbGqezs6oTx5zfG4SETHZ ujHIsgh82vmowSk/Thb9Nc6JEdnkqJ3ME0Wvl2I+A84dQUKco3WA+UyfMDoD4aof9US3 iyXxhfjj4oXjh6aerE01hl71CuxLUhFIunbzpnprLFTG5n27KpckvClq0WVOqbqSHt40 5m9BEcq/bJpvPUt9EMVgg0/Rn/EiIygZ387AbodlKfqTSg+6xse/gMpRxQDzuxIiZAl8 gLGDPIqtA2v6/YG2RYMdkE6VC6uXni6yTVPYGdrbtJ2BbjKShMQVhpSxAwUoIz83cynH qVBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=5nFjavnBxbro/fiUVf4O04xlVdcIJiqIT9b+HFjtLWg=; b=tTNTpUcHwXdSWj0S2cETuxGYoYAf5EyvJkeYP707G2kWdyalmcsRgWsE9DQnIwg4F2 c62KG9YJttbEsnU3w7Y1MgCq/A2oOJ+RdXZ2oT/KBy6bzZA+0Yj2l1rlHQ6rVzM3Nh/3 +bP8llssK+F+XrZCxgt3QKJ7oHQ6wTt0x7cvpX6R9Yfx1zYm7UejSEiDQMkWLuicbS9O SZchI1ntEAMwECAM82BiIKPka30VmU4SztfxRJH7hFTQfk/Xt2QbdfwdE6JNekU2Ozcg Wlr6ZvVKDatSLttOIo+xMengCybmRNe+ZdLi4jH6fc41d4r9+RXmtzn+xc0z/TwJUaKY uGfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a1709027e0f00b001a951bd50c9si17255558plm.441.2023.04.28.15.04.07; Fri, 28 Apr 2023 15:04:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346621AbjD1V4o (ORCPT + 99 others); Fri, 28 Apr 2023 17:56:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbjD1V4n (ORCPT ); Fri, 28 Apr 2023 17:56:43 -0400 Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0719010F3; Fri, 28 Apr 2023 14:56:43 -0700 (PDT) Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-1879e28ab04so458862fac.2; Fri, 28 Apr 2023 14:56:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682719002; x=1685311002; 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=WuYzbEZxTSY8pVVDvByCAUDNpAfVnsBF40BuYlKMf1VjrWzPOQGTYgEmdxbGoI9hOU Unx1FpDOtuaLA/mNDjow28iWfowLrbv2g8AiJPGf6IBxTTrL2G/j3CUBsA/gGlY3eeAt Awq2zfASVtyjubnqfbtOGufj0FF0nYJSssQCqq/oGZmkBQs1PQRiM7py2Jgr+4aQ0aRF ZJ+fxpN7jy7GrHAjgetRIx2Sv87iuSMxgRUA2HlerrAuzff6y7QtaRfxnbKkWE3Akb8X aC3pMa0d9kIplLezb+cge1w4buP4k4h0fjbGuBOxhUtqVMQrxmKNTjzYyXctaEI5pSU+ Nq+g== X-Gm-Message-State: AC+VfDz8jyWWLAqWKm7O9BroGhJWW/1Gm53MRmg3/vilCe7VINPmvVlr v/SGImDOk1h6SgT6trLriQ== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230428121524.2125832-7-valentin.caron@foss.st.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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