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 70D37C47082 for ; Tue, 8 Jun 2021 17:57:39 +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 CD91D61278 for ; Tue, 8 Jun 2021 17:57:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD91D61278 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 911C482F05; Tue, 8 Jun 2021 19:56:54 +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="qe1KDQJH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B686882EBC; Tue, 8 Jun 2021 19:56:45 +0200 (CEST) Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) (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 6C53E82EBA for ; Tue, 8 Jun 2021 19:56:41 +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-x335.google.com with SMTP id j11-20020a9d738b0000b02903ea3c02ded8so7572758otk.5 for ; Tue, 08 Jun 2021 10:56:41 -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=qe1KDQJHSgfX+VIywjBBZ96RMvdu3k0rUmKo0M/u/g2SogAxWYVSBWhBPc3gmK9+kC 3qHAxiT1I8iCnDyl9eZBRCAckZulH+BHw1gSgoE0GWTbCbK9WLk/smmC7+Nwe4g8P+/N aAemfUbN4HfFir7YWV4RDLADJUO8cIznGB5A3X4Gr+fFxtjpwKmUjp/8DDyUc5I409tG +n4yEnXNsHmR1sbkHSpO98uQ9SLy4BkBEZKFtfbPR/A+cQ/az6EfTA91siojRjvSRcVB zMFm572G9VHhp1gwGVLRCtG9T+ICyK5cKcJ7ORghoLFDIYSaQnukRxtmCVsfDDQKA19P 3n1A== 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=RaVpZJQpGut4uYZpKYrj10oJgKQLdmscmWY9edBpEwPl8nBxTveU5L74pFTjINlB8a TcvRHTcLzF+kZHrBa/ypIGKDF1wBazM7IualsZvyEnmggU2BiyKHdXIc0Zi3CfmrwX9u muXeIqes2aEHtb9wWiZmuG67W2FxNBgWpXPrawvRPm2jG1FrnlpEthfkZJ8V+ar4rQmQ pe+6iEuLIs8eSaZvN6g1oBYjs9k85EBiqV/PTT4RIW0X2EjthjFi0pkJBso4nCp2VeI6 WNDFopN21BPWII8DqCV5yphwMtcmlazGCJZxI1rSMyRR2ClAGj4hjmD8i0oX5nbiqfov GuwQ== X-Gm-Message-State: AOAM531lmijOeYoXZ4hixNsevncL5E5tZMBEe0nA0qqRfDaUuAZ1KlSs UCS95r2CQy+p1cu8tODwMaweyPZFyXM= X-Google-Smtp-Source: ABdhPJx8u7gfr95kzArhYxnquZg/SmtqxPv6p8V4zpSjLvKEcd/eG1XKilflsUQWtftWkKtcSW4oCQ== X-Received: by 2002:a05:6830:119a:: with SMTP id u26mr19697366otq.87.1623174999944; Tue, 08 Jun 2021 10:56:39 -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 a24sm3189228otr.3.2021.06.08.10.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 10:56:39 -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 v5 5/5] rockchip: px30: add support for SFC for Odroid Go Advance Date: Tue, 8 Jun 2021 12:56:26 -0500 Message-Id: <20210608175626.5176-6-macroalpha82@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210608175626.5176-1-macroalpha82@gmail.com> References: <20210608175626.5176-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