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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 71662C4338F for ; Sun, 25 Jul 2021 23:36:17 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E575060BD3 for ; Sun, 25 Jul 2021 23:36:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E575060BD3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 050B08327C; Mon, 26 Jul 2021 01:35:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 2F4C583245; Mon, 26 Jul 2021 01:17:09 +0200 (CEST) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1A4A683246 for ; Mon, 26 Jul 2021 01:16:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=yifangu.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=gyf304@gmail.com Received: by mail-qk1-f180.google.com with SMTP id z24so7208092qkz.7 for ; Sun, 25 Jul 2021 16:16:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/wva6xZAnmsX6oR9IfFzL0picwAKvCOHOTs5VImJZJE=; b=dwKcf+slm+BzOQ9+XfFT2v9YSUs8BMIMF8k8gLhuNYhDFHiEmKfJM5X1W/S2hY/0HK UY1RYzswJ7XhQtIjTHksF9n3oUdec6915jz3OcMT1NqJTZNIsMzsje/NRhOfScNEHGbG YHpCGKsVDOaexgKn8BvdPOwdZXeCuVunBp1t3Vif1tZ7i3q70r1Ah294M5L6vF/D51SK rN/G2yDhGwGmGauv2/Zg1cBmu25Ygq7hV0FoBG9H4K6Xs5PUhWL16F4mmlq2u3YFzVDi 3zC7GGX73m80hIwRkICyXvID9E5uBD1NRfqsKXLaRte+SiqUWssv/f/EiGG71ECdZDrs l6Ww== X-Gm-Message-State: AOAM532Yf04PW+CFzk9gxJoyDUZfgn+jDaRvzlavl3hPnmu/Iy0v+/NT w4qQsy7uXygHYQXIEtJZOZStmfZqsHUG1f6t X-Google-Smtp-Source: ABdhPJx+ykw+T+Lp4A9rRJ05lDtHt0gB3lcso/Dyrk3yJOoJ1CoS/Qm0iF5e3+DSVXrYWtr/NZrw0w== X-Received: by 2002:a05:620a:1124:: with SMTP id p4mr14760509qkk.143.1627255007785; Sun, 25 Jul 2021 16:16:47 -0700 (PDT) Received: from yifangu-Virtual-Machine.mshome.net (pool-100-6-159-43.pitbpa.fios.verizon.net. [100.6.159.43]) by smtp.gmail.com with ESMTPSA id u184sm17754694qkd.53.2021.07.25.16.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jul 2021 16:16:47 -0700 (PDT) From: Yifan Gu To: u-boot@lists.denx.de Cc: Yifan Gu , Jagan Teki , Andre Przywara , Icenowy Zheng , George Hilliard Subject: [PATCH 17/27] sunxi: spi: Add suniv pin controller support Date: Sun, 25 Jul 2021 19:16:26 -0400 Message-Id: <20210725231636.879913-18-me@yifangu.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210725231636.879913-1-me@yifangu.com> References: <20210725231636.879913-1-me@yifangu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 26 Jul 2021 01:32:10 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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 From: George Hilliard suniv needs slightly different register settings to enable the SPI peripheral. The magic numbers are already provided by the architecture support; we just have to check for them here. Signed-off-by: George Hilliard Signed-off-by: Yifan Gu --- drivers/spi/spi-sunxi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-sunxi.c b/drivers/spi/spi-sunxi.c index aa392502b7..320bd61d13 100644 --- a/drivers/spi/spi-sunxi.c +++ b/drivers/spi/spi-sunxi.c @@ -255,6 +255,8 @@ static int sun4i_spi_parse_pins(struct udevice *dev) if (IS_ENABLED(CONFIG_MACH_SUN50I)) sunxi_gpio_set_cfgpin(pin, SUN50I_GPC_SPI0); + else if (IS_ENABLED(CONFIG_MACH_SUNIV)) + sunxi_gpio_set_cfgpin(pin, SUNIV_GPC_SPI0); else sunxi_gpio_set_cfgpin(pin, SUNXI_GPC_SPI0); sunxi_gpio_set_drv(pin, drive); -- 2.25.1