Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp245377pxb; Tue, 12 Apr 2022 23:09:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWibBDp8pOjF4iW0g8tbj5ojYVpn5ICFfMYqntpwZ5L7JVBghhqglAg1WzTgVpy6IVC172 X-Received: by 2002:a17:907:7e8b:b0:6e8:9691:630e with SMTP id qb11-20020a1709077e8b00b006e89691630emr10853232ejc.113.1649830153992; Tue, 12 Apr 2022 23:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649830153; cv=none; d=google.com; s=arc-20160816; b=ZYI68ZzSvniaeel0mfsM3kdP7+/thDK4BKEkC8p5SwCGTzsARNJiwLol5ZYyfQ+k8m xJiiOkjClevZ97bKaOFQoFpJbrnL9vl8akuJ2jmv//wr3k+BkKlVNStEU6RalT0e3XFt hKoptz2TBhZ7SlebcdfNcbajV92taSb4v3W/jPX3ax3uO9r1TMrTv2ry4F6GMhz4UhHO k4FMfw0J4RoijwQng8kKB3tn+07lcS8OKCEi/ByWG8G7r2ytMPSo2PlGLj4co5/2ursg S3aLkRncemb2YNVv7uiVivfh9YZtjTBElGxzbN5MVkx/uMtM9RpvE9k5jvU5WZ0OQ572 4Pxw== 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:dkim-signature; bh=FvzKmQHaXA0DZABJVytp1jfjqBhOZKxzqyShV5ysPaI=; b=k2kGdq+Yb/z0owImeYPSqlAoy5a9n7z7HWj5RvA/h5a1hnE6QHNwpd2I+jL2l5P5Kr cEfGLr9g4Y8HRV2d1QdXdBBetMdsK2JMq9f5ERcqdw4Hr5cP6wxEGfGaNYoCS+BX+YAF 5OldZQrFshltfC2Gdc7tmF577qchQgMOwy6e12cFj92DOIXiad2sZGAXDSaxqeOx3Neg R7c3zoA22VimtBAR2ZhKsPyGjVh+DwdVK/B7pLaXQpQoV+hxebnAduwYewD9lYGdvuQM Ick5jC8jiICF7Ld+Tw+15GS9TS+AA5lGJLBmsuQcQakUPt2heBzKR/CS0/aDvvVfM4/e MxZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OAYW9UBB; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h13-20020a170906828d00b006e89d0c88d9si4562193ejx.633.2022.04.12.23.08.48; Tue, 12 Apr 2022 23:09:13 -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; dkim=pass header.i=@linaro.org header.s=google header.b=OAYW9UBB; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232197AbiDMD6C (ORCPT + 99 others); Tue, 12 Apr 2022 23:58:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232171AbiDMD51 (ORCPT ); Tue, 12 Apr 2022 23:57:27 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DA7613D0F for ; Tue, 12 Apr 2022 20:55:07 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id a19so836806oie.7 for ; Tue, 12 Apr 2022 20:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=FvzKmQHaXA0DZABJVytp1jfjqBhOZKxzqyShV5ysPaI=; b=OAYW9UBBpw4A+iCY4I5EaWlkldsxeOp+anBKmwX62Q0TRRCSFVHoTCU5lunO/PwDLx o9Lq+MXt+IxvKdH0+TdwOTFmR5YDmI6ZONy2//sJsfgol5+xR2NEjtKeNDnKFkHRMyLX uQV14/xbRAHLShTXWvkTeNZPc7KBdG+lJ2ai5PR/UXkH2YMusFSkfEqo/SBYzYCMwiRZ 4CwUcjqa5I8qMkUoPikziGCvExKSgudLFV/G9BqZmw6fXq1ERAJUJUcr8gfAmhDtNXAO U/SWYihomjkSpBd2ZLvLsVY6dBsmG35qBse0B1wtgjTr82HNcKu1hl4mrtjzl7oddirx 0AMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=FvzKmQHaXA0DZABJVytp1jfjqBhOZKxzqyShV5ysPaI=; b=VATXrxPjexDpjuukkRCtobJaJ++8cnv3obdqPbn+6PXbdJWX4PiRMtkmdlf/fWoFDb Ib6oi2+L6Hv3efUYrh3EVp8FU9kUdg+5A6wGkvgT1w+S52hrtWL6pTp8vLtSvgvN4vNE dCEdQM4LxjIT9Gch3ii/QFBvvXoO6e2QETqE78CNGIcPTKBxI4q/BUZhFbGb89L2gezW 1Glg8AFtfJvITmFk3eSNgGptQeDeSsDYNX5PRJOGMnwQ+xBSOR+B6Q6JA6PtZkBcvXkA gubto6ymL5Fihc3XDRIx1ssM552SDft1ITz2lxuWoj4J0VvE/5sw9q/T2Bi68yIY5Ahy ASWw== X-Gm-Message-State: AOAM532vYpPoa39Rd9RxDPkfcVA5n2zH6hm73W3izttk1Q1ndqlyyLe/ 9viEMQQsje15SOFpZkUVdgekMfLxETw8y2A6 X-Received: by 2002:a05:6808:1201:b0:2f9:ef08:1a4f with SMTP id a1-20020a056808120100b002f9ef081a4fmr3263265oil.192.1649822106718; Tue, 12 Apr 2022 20:55:06 -0700 (PDT) Received: from ripper ([2600:1700:a0:3dc8:205:1bff:fec0:b9b3]) by smtp.gmail.com with ESMTPSA id e9-20020a056820060900b003216277bfdasm13576747oow.19.2022.04.12.20.55.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 20:55:06 -0700 (PDT) Date: Tue, 12 Apr 2022 20:57:20 -0700 From: Bjorn Andersson To: Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] arm64: dts: qcom: sm8350: Add GENI I2C/SPI DMA channels Message-ID: References: <20220412215137.2385831-1-bjorn.andersson@linaro.org> <20220412215137.2385831-2-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue 12 Apr 20:14 PDT 2022, Vinod Koul wrote: > On 12-04-22, 14:51, Bjorn Andersson wrote: > > The GENI I2C and SPI controllers may use the GPI DMA engine, define the > > rx and tx channels for these controllers to enable this. > > > > Signed-off-by: Bjorn Andersson > > --- > > arch/arm64/boot/dts/qcom/sm8350.dtsi | 108 +++++++++++++++++++++++++++ > > 1 file changed, 108 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi > > index 7e585d9e4c68..8547c0b2f060 100644 > > --- a/arch/arm64/boot/dts/qcom/sm8350.dtsi > > +++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi > > @@ -721,6 +721,9 @@ i2c14: i2c@880000 { > > pinctrl-names = "default"; > > pinctrl-0 = <&qup_i2c14_default>; > > interrupts = ; > > + dmas = <&gpi_dma2 0 0 QCOM_GPI_I2C>, > > + <&gpi_dma2 1 0 QCOM_GPI_I2C>; > > + dma-names = "tx", "rx"; > > I have been thinking about this. I dont feel this is right approach here > as this is board dependent and having the firmware loaded on the board.. > > This was tested on HDK and can fail in MTP or other boards.. which might > be in FIFO mode > But if the controller is in FIFO mode, then !fifo_disable so we wouldn't try to pick up the dmas. And in the opposite case, i.e. when fifo_disable, the introduction of the GPI implementation meant that the i2c driver wouldn't no longer probe without the dmas specified. Unfortunately we don't have any i2c busses enabled on the MTP currently, so I'm not able to validate this easily. For the SPI driver though, the same logic is used to invoke spi_geni_grab_gpi_chan(). So dmas will only be considered if fifo_disabled is set. That said, in the even that the SPI driver finds a fifo_disabled controller and dma_request_chan() returns an error, we will fall back to fifo mode instead. I'm not sure if that's desirable... If that makes sense, we should at least handle EPROBE_DEFER instead of falling through to fifo mode. Regards, Bjorn > So, I think it might be apt to move these to board dtsi.. what do you > think? > > -- > ~Vinod