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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0AF89C433EF for ; Tue, 14 Dec 2021 20:55:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BF7BB812BB; Tue, 14 Dec 2021 21:54:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="c6aeq5+c"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 94C8C80335; Tue, 14 Dec 2021 21:54:50 +0100 (CET) Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050::465:202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5C0F0810F3 for ; Tue, 14 Dec 2021 21:54:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dwagenk@mailbox.org Received: from smtp102.mailbox.org (smtp102.mailbox.org [80.241.60.233]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4JD9c66X34zQkmM; Tue, 14 Dec 2021 21:54:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1639515285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TWmFe4fCtmIwM7PN6Qw9ViQByZZpNESP2AIEemndc6M=; b=c6aeq5+cFUsmbE5X3ky8VPxZIYPhLKoBVga0Ltb05RMH3zX4ck+B2m6JcD9aZLuhBLOIvf 4A4LqwdQJ0bZ/VSUOcuobKnSvsOCtXq6Pd/LHxawltCL7PrNq5kTZDz3pS222yg/1GFZ+v 0c5LIkaUr0oRwO47MsdCwXNI3cOR0ytD/Sm3mEPuqSsS0cJqNbv61fhwfJf2vdf/ve6Fm2 EdjjLyspUbwaR2drGgpNyYMkwjY64ZmezwmYMt1uptlhUe6YVyDuzM8ATvZLn1oUNMdGdw 3IKCT7O4OWMVAuphRoL5U0v7SBPPwMMFVdVeWZxgpandxn7h0ARxDdKMUlgvQA== From: Daniel Wagenknecht To: u-boot@lists.denx.de Cc: Daniel Wagenknecht , Andre Przywara , Jagan Teki Subject: [PATCH 1/1] sunxi: SPI: fix pinmuxing for Allwinner H6 SoCs Date: Tue, 14 Dec 2021 21:53:16 +0100 Message-Id: <20211214205315.46418-2-dwagenk@mailbox.org> In-Reply-To: <20211214205315.46418-1-dwagenk@mailbox.org> References: <20211214205315.46418-1-dwagenk@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The driver for SPI0 on Allwinner H6 SoCs did not use the correct define SUN50I_GPC_SPI0 for the pin function, but one for a different Allwinner SoC series. Fix the conditionals to use the correct define for H6 SoCs. This matches the conditional logic in the SPL spi driver. Tested by probing the spi-flash on a pine64_h64-model-b board with adapted device-tree (disable mmc2, enable spi0). Signed-off-by: Daniel Wagenknecht --- drivers/spi/spi-sunxi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c index bc2f544e86..6a8ee8d542 100644 --- a/drivers/spi/spi-sunxi.c +++ b/drivers/spi/spi-sunxi.c @@ -249,7 +249,8 @@ static int sun4i_spi_parse_pins(struct udevice *dev) if (pin < 0) break; - if (IS_ENABLED(CONFIG_MACH_SUN50I)) + if (IS_ENABLED(CONFIG_MACH_SUN50I) || + IS_ENABLED(CONFIG_MACH_SUN50I_H6)) sunxi_gpio_set_cfgpin(pin, SUN50I_GPC_SPI0); else sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SPI0); -- 2.31.1