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 X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAF48C433DB for ; Fri, 8 Jan 2021 09:01:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EA6722248 for ; Fri, 8 Jan 2021 09:01:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EA6722248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=yrsD33WjI9Dp8ttWPv8QZvT1PylBcseowl5u8dcBlYw=; b=D85kEXhStZR4wBFNeE4B0ANYc wTew7aKKQsYRJk1Wc7oTT509tczp5QKuxnkjz8FM2HurFAd+W5lTxL1aLFW3BkJ3Aqm5uigrUZbcO dxxEOHanNZcMCkR1d0Cg8LGpaQQGnQy0575vvoeHkfP9eKNHix0TWWL/5hsX2XUh4vzGfCt30Yn9w QOf6y8UgsGgIoV1G6ZqEwYiywI+YZ0YCmEgDepzmlozFarT8at4d3/lqS6PkVcYumQI5osNwpqNQO TIT1VUrRbCKCr/nEkS6L1Hyp77Hk01aXqfcilzbK+3MEUK1WHU7g+6+TNlLmphAoo8bmappI8nQKF 8d78FgcuA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxnc0-0007GT-2I; Fri, 08 Jan 2021 08:59:12 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxnbw-0007FT-PE for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2021 08:59:10 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 150FC1B5A; Fri, 8 Jan 2021 03:59:02 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 08 Jan 2021 03:59:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm1; bh=N dnLowCP5uH4a2DVWClEdlATdNXRNG7vtXnjU4bygEo=; b=AtFxFxdbhyPC7sDfd znWRf27OwW5GQxjagKHR2hwFVjXS1y4xs3uwYGzCfKT9X4PJgTeb6gtk+PDVOJbf CGEgcSzKhScHBsGQcW/rwO02Gnff6pj7sXyDLgSbHC/MlmsKR/vGeKuyyR/Up2XI OU3foy0D8gi1YP5MNeEphGOtjaYUfs62MXbdd4g7/jP9mf88s6G6vs9hQ4v5f46b gGMpeV8jHQhYzSJaV74uS9NFwge6GGkmWMTWFVhrAmZOxVCB/kddEaI/QphD8RAb 7ysoay77g3l7oELhYEyRRGaNO5ypLNx7+zwayfNM8fT+8eIL6i9EMW+ycGiCNwv1 DG9Pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=NdnLowCP5uH4a2DVWClEdlATdNXRNG7vtXnjU4byg Eo=; b=WoqmaM4xatrff68tDwix6rbKcoRGhtzDVP48YdR56TkPH1eGlQBWcDKno c/CXzU8vAuA5RJhpTFKVVWA6eFG4l03O4BNAThQFvlF2L8QuHVb3BNjmLJCaSIJ6 yuHazf17H5fFvDu3Vrc5rK93ZI2LcmaFeY2jQPJw/VOyFztybhAuAkwNpTsYIDZx u9ddZcjh9WHipA3WPZAjfHRyO+KDNnZhB8myU3Kzreo96VlE6ayiXzE5LQpTNVAk SAuXaOpOq2IgjNA+a8Zehs+vQ9Kss2TDDKhLB8CaPfAXck6mIJjuA8mHrhbh61nG WcsOuZcWi1jrJ5E1hlY+lUlPrIcnA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdegfedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggugfgjsehtqhertddttddvnecuhfhrohhmpeforgig ihhmvgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrf grthhtvghrnhepteetffevuddtueeguefhteffjefhkeevveeuueeuffdtueejjefgffel leevhedvnecuffhomhgrihhnpehlihhnuhigqdhsuhhngihirdhorhhgpdhruhhnthhugi drtghomhdprghrmhgsihgrnhdrtghomhenucfkphepledtrdekledrieekrdejieenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvg estggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id A929424005B; Fri, 8 Jan 2021 03:58:56 -0500 (EST) Date: Fri, 8 Jan 2021 09:58:55 +0100 From: Maxime Ripard To: Ralf Schlatterbeck Subject: Re: [PATCH] Fix SPI Chipselect/Clock bug for sun6i Message-ID: <20210108085855.p255fioaax4zin4q@gilmour> References: <20201226095845.c65lhsmluddvwxsl@runtux.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201226095845.c65lhsmluddvwxsl@runtux.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_035909_050096_AC76D7B3 X-CRM114-Status: GOOD ( 20.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chen-Yu Tsai , Mark Brown , linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org 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 Hi, On Sat, Dec 26, 2020 at 10:58:45AM +0100, Ralf Schlatterbeck wrote: > This patch makes additional GPIOs usable as chipselects for SPI. > It is available for years on the linux-sunxi SPIdev page at > http://linux-sunxi.org/SPIdev and probably is originally by the user > "Mirko" there. I've tried unsuccessfully to contact the author. > Note that contrary to what is stated on the page above, the bug doesn't > have cosmetic implications only: > > The SPI-Driver for the H2 Allwinner processor in the Linux kernel is > supposed to support normal GPIOs as additional chipselects but fails to > do so without the patch. > > For oscilloscope screenshots with/without the patch, see my blog post > https://blog.runtux.com/posts/2019/04/18/ > or the discussion in the armbian forum at > https://forum.armbian.com/topic/4330-spi-gpio-chip-select-support/ > (my logo there is a penguin). > Please bear with me if I'm not following proper procedures, this is my > first patch to the kernel in years. > > Thanks > Ralf Schlatterbeck > > From 682ae1848b0df00cceb4c76486b971826b2737a9 Mon Sep 17 00:00:00 2001 > From: Ralf Schlatterbeck > Date: Thu, 11 Apr 2019 16:21:54 +0200 > Subject: [PATCH] Fix SPI Chipselect/Clock bug for sun6i > Signed-off-by: Ralf Schlatterbeck > > The current sun6i SPI implementation initializes the transfer too early, > resulting in SCK going high before the transer. When using an additional > (gpio) chipselect with sun6i, the chipselect is asserted at a time when > clock is high, making the SPI transfer fail. This patch from the sunxi > spidev page http://linux-sunxi.org/SPIdev fixes this, without the patch > no additional gpio chipselects can be used. The relevant code seems to > be from the user "Mirko" of the linux-sunxi wiki page, I was unable to > contact the original author. Unfortunately, without the author's Signed-off-by (and yours), we can't merge that patch. Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel