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=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 47130C47082 for ; Tue, 8 Jun 2021 18:11:54 +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 C777661246 for ; Tue, 8 Jun 2021 18:11:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C777661246 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 07BFC82F07; Tue, 8 Jun 2021 20:11:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com 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; unprotected) header.d=gmail.com header.i=@gmail.com header.b="oFcVCbfW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D5E682EB9; Tue, 8 Jun 2021 20:11:18 +0200 (CEST) Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) (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 0D3C582EB9 for ; Tue, 8 Jun 2021 20:11:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=macroalpha82@gmail.com Received: by mail-ot1-x32e.google.com with SMTP id w23-20020a9d5a970000b02903d0ef989477so16818075oth.9 for ; Tue, 08 Jun 2021 11:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T0kGYmc/6aU+OiiHLyMurdfEX5L4SjbyKluX/37Pxwk=; b=oFcVCbfWCrwxRmyVNrSZCnMuIvuKhcT6NGs745dqwGabCa1F25qtc9qKAsGn8rdAol rlbZvmH2/8yI717Ml4Y3lH1lQ3XTCmCE4hoPdYrWTQnMuuc4+v/R3vvbkwjj8mwKwGt2 2Pk+Ubuc8S77i8Tb1oDq/KLj9DxywAZyDrSlpcbrMtrq3eg7ETWYwNlAHifIXqDhbA80 3xJkBOnvAj8z9yZsU+2+I16pHhn2tfAJerJY7h+Uu0+P3GVgTxsbbDurvJfHhE/mS9xN tMiXtjxsw7LbXrJgisb5sso5E8Rych+Z7z0/OsfWvHfk3aBo1i2QZiK1axar7Cspv8s+ DPcA== 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=T0kGYmc/6aU+OiiHLyMurdfEX5L4SjbyKluX/37Pxwk=; b=bgR9nX3A0FTmd4qlaEf78GA7XlcWuKhbJpkg/vBsygx3GQLHVfiQxOM2tjgryKjG/p 7w5yrjCEqHhZhDa1OvRfrG3YyrwOeUCpVORbsryLu7Zda/SiHk4XzAGO6rjrCCoo1jmv 55+ezyttMuUNjyP66hy3xsYxyzAjRnPInrOaSNea6xh2XPeZ+woFWcyopUu5hYi68tqK JGnbLSum8pl2HmSRycS4Ip+/49my+cqeTS26LzraJd5rz+aBtJN6J50WSdx0ZvVP8E3p ehtOB8wfRNSZnAgvnZNxqPSbGEqzj9twtFrq57OFD1/BNJz0JaT9YIhajx9n7b0F3Uix Yz+g== X-Gm-Message-State: AOAM531slpvkVDUs5+saw9RCk6UpdTfa1C2J9BiAd+BPNKUipJ0ipz+Z friaNMCm7FOAxty0avRmTi2L/zxUJeE= X-Google-Smtp-Source: ABdhPJzu8cm3zb68gWpwt/l/tvupsiM/B3FfHw+3nw2qtlinfM44SAZZWUKFfLVpvI2zPG0OLSrTIQ== X-Received: by 2002:a9d:1c86:: with SMTP id l6mr1950851ota.254.1623175872454; Tue, 08 Jun 2021 11:11:12 -0700 (PDT) Received: from wintermute.localdomain (cpe-76-183-134-35.tx.res.rr.com. [76.183.134.35]) by smtp.gmail.com with ESMTPSA id n66sm2894199oih.50.2021.06.08.11.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 11:11:12 -0700 (PDT) From: Chris Morgan To: u-boot@lists.denx.de Cc: heiko.stuebner@theobroma-systems.com, vigneshr@ti.com, jagan@amarulasolutions.com, kever.yang@rock-chips.com, philipp.tomsich@vrull.eu, sjg@chromium.org, jon.lin@rock-chips.com, Chris Morgan Subject: [PATCH v3 5/5] rockchip: px30: add support for SFC for Odroid Go Advance Date: Tue, 8 Jun 2021 13:11:00 -0500 Message-Id: <20210608181100.14093-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210608181100.14093-1-macroalpha82@gmail.com> References: <20210608181100.14093-1-macroalpha82@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.102.4 at phobos.denx.de X-Virus-Status: Clean From: Chris Morgan The Odroid Go Advance uses a Rockchip Serial Flash Controller with an XT25F128B SPI NOR flash chip. This adds support for both. Note that while both the controller and chip support quad mode, only two lines are connected to the chip. Changing the pinctrl to bus2 and setting tx and rx lines to 2 for this reason. Signed-off-by: Chris Morgan --- arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi | 17 +++++++++++++++++ arch/arm/dts/rk3326-odroid-go2.dts | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi b/arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi index 00767d2abd..741e8dd935 100644 --- a/arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi +++ b/arch/arm/dts/rk3326-odroid-go2-u-boot.dtsi @@ -7,6 +7,15 @@ chosen { u-boot,spl-boot-order = &sdmmc; }; + + aliases { + i2c0 = &i2c0; + i2c1 = &i2c1; + mmc0 = &sdmmc; + serial1 = &uart1; + serial2 = &uart2; + spi0 = &sfc; + }; }; &cru { @@ -57,6 +66,14 @@ u-boot,spl-fifo-mode; }; +&sfc { + u-boot,dm-pre-reloc; +}; + +&spi_flash { + u-boot,dm-pre-reloc; +}; + &uart1 { clock-frequency = <24000000>; u-boot,dm-pre-reloc; diff --git a/arch/arm/dts/rk3326-odroid-go2.dts b/arch/arm/dts/rk3326-odroid-go2.dts index 8cd4688c49..6f91f5040b 100644 --- a/arch/arm/dts/rk3326-odroid-go2.dts +++ b/arch/arm/dts/rk3326-odroid-go2.dts @@ -617,6 +617,22 @@ status = "okay"; }; +&sfc { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&sfc_clk &sfc_cs &sfc_bus2>; + status = "okay"; + + spi_flash: xt25f128b@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <108000000>; + spi-rx-bus-width = <2>; + spi-tx-bus-width = <2>; + }; +}; + &tsadc { status = "okay"; }; -- 2.25.1