From patchwork Sun Jul 11 03:38:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Lee X-Patchwork-Id: 1503616 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ZH5nDH9u; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=q4m/yDY+; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GMt8900Kjz9sRf for ; Sun, 11 Jul 2021 13:45:10 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7MmhUbdZqRrTeWlbGIUmf9CdN6yApr5TR4cLenexT10=; b=ZH5nDH9u+CMOos idgpAjdp59XAUANw2/upAvW1vtodo69JRzO/ICsP+NIyo0D0puZiTM9odR2aABIjIvToOUy1w86LG ROGk45xOk2AL25M7AEvPZil0gBPryhwyXkIBm48Zgay3m651X6La7Qwl2QpGTBZzOqVx4JRylCLkQ hZL8e5sQva7MDctPYHLvnOn44NlSMpR1Q8r3KEpst3lc78ww95gf4SiK97i8oD+JnKNF2a5mx1Gf4 hB/yy9vVbhPEKpF4/R/Y4HDKaaOpOSYH5TxzZw8W9/AFqh5dlcPWUCrs9BQAYmUfOYbddvi4irZ0c Bn3Y8hU7920BaojB0WEQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2QLI-004XEx-35; Sun, 11 Jul 2021 03:41:20 +0000 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m2QLE-004XE7-Ei for openwrt-devel@lists.openwrt.org; Sun, 11 Jul 2021 03:41:17 +0000 Received: by mail-qk1-x734.google.com with SMTP id i125so14191431qke.12 for ; Sat, 10 Jul 2021 20:41:12 -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:mime-version :content-transfer-encoding; bh=yuJdxCmVrYJrZSO20INkJC03cpyRVW8HNH/GUpauvCk=; b=q4m/yDY+gBfSffjhCqdrIxmhP81l5GLv1WWau1POZU7wsgPZICRAkcd72b8/xKcFzV VEqyr3MWshNgi5zmcd2WqQuzKm7XvWa+h8Ym3ZAZqyz3g42TDtgJ4g2iMKKz1eNES1AW QhjD3niqwe1Ae0xW8ziaR/fC6iL/VzNW3OO/6jgSKRjSs/y9cNlHAPQb7P+d6m62XXwy 9K55scWrPUExkwFdwG73mq0HPe4aHo472qvoqgIHRrkzBJEc/1EhHpZP9vWDdDLrdCXt ZSpTbA2/aqd8DWzMedE0L0rlv3nchkxfaBtEv0ipoFV4lcpiw6XqCYL8WFp+O+uM6MRo MW4w== 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:mime-version :content-transfer-encoding; bh=yuJdxCmVrYJrZSO20INkJC03cpyRVW8HNH/GUpauvCk=; b=gvkobSrtpIkBVqtbnwSxCF436GNN79Ft0oZ4VO6ojj2HWn7vBogTD0pSA9/wXxISq9 /YP89Za+Q+VpJyFrW20jfj/UKRQXK9gQFtQfNky1bmxF//dZ/uTbP5V7oV2YBhrp9kCh LacQrbmWNUwZxB9PitAkAD7jTcAlE5ez64WDzsFWEGbyVgtbw/bLn4h9jSHFyykJOojh w3/SmR6X4ubSHdC0tVuVnzgNUYZd/Dw5dN3VttfsafhdmtKwQ5Yanq9O5pNVB5iZREfI dgVzDgYDWRb50q8E8ttFHiqUzAVGNcCahFg3wqIp+wvr34syrFla+CIUat0BbzQ8fzcI ZB9g== X-Gm-Message-State: AOAM531BHmkopF2U1kar4X1F946xadDUtUCmpivSFi5rwsSXAU9jHdXi Acf3O8PTCYZUfpW3RsZVTtQOCCL8VISxaQ== X-Google-Smtp-Source: ABdhPJyXxQiDREpX4jM+xzwX8YjagmhDqyqoCFKBQ2HLaJWHgPn35GrwB9QHLML1+cBC6C6iRojALg== X-Received: by 2002:a05:620a:1a15:: with SMTP id bk21mr44194577qkb.469.1625974871767; Sat, 10 Jul 2021 20:41:11 -0700 (PDT) Received: from localhost.localdomain ([63.209.33.9]) by smtp.gmail.com with ESMTPSA id z188sm4941720qkd.68.2021.07.10.20.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Jul 2021 20:41:11 -0700 (PDT) From: Jason Lee To: openwrt-devel@lists.openwrt.org Cc: Jason Lee Subject: [PATCH v2] rockchip: rk3328: fix booting error for nanopi-r2s Date: Sun, 11 Jul 2021 11:38:21 +0800 Message-Id: <20210711033821.7800-1-jason416.gm@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210710_204116_558334_580AF56F X-CRM114-Status: GOOD ( 10.41 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: devices can not boot properly during SPL stage by using microSD card which model is SDSQUNC-032G-ZN6MA. U-Boot SPL 2021.04 (Jul 02 2021 - 19:50:12 +0000) Trying to boot from MMC1 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:734 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [jason416.gm[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org devices can not boot properly during SPL stage by using microSD card which model is SDSQUNC-032G-ZN6MA. U-Boot SPL 2021.04 (Jul 02 2021 - 19:50:12 +0000) Trying to boot from MMC1 mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices change dts and config to support booting from ultra high speed microSD card on nanopi-r2s. Signed-off-by: Jason Lee --- Changes for v2: - fix signed-off-by format .../103-nanopi-r2s-support-UHS-card.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/boot/uboot-rockchip/patches/103-nanopi-r2s-support-UHS-card.patch diff --git a/package/boot/uboot-rockchip/patches/103-nanopi-r2s-support-UHS-card.patch b/package/boot/uboot-rockchip/patches/103-nanopi-r2s-support-UHS-card.patch new file mode 100644 index 0000000000..ad32e64c7a --- /dev/null +++ b/package/boot/uboot-rockchip/patches/103-nanopi-r2s-support-UHS-card.patch @@ -0,0 +1,43 @@ +diff --git a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi +index 9e2ced1..d546974 100644 +--- a/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi ++++ b/arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi +@@ -33,6 +33,10 @@ + u-boot,dm-spl; + }; + ++&vcc_io_sdio { ++ u-boot,dm-spl; ++}; ++ + &gmac2io { + snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + snps,reset-active-low; +diff --git a/arch/arm/dts/rk3328-nanopi-r2s.dts b/arch/arm/dts/rk3328-nanopi-r2s.dts +index 5445c5c..452e476 100644 +--- a/arch/arm/dts/rk3328-nanopi-r2s.dts ++++ b/arch/arm/dts/rk3328-nanopi-r2s.dts +@@ -323,7 +323,7 @@ + bus-width = <4>; + cap-sd-highspeed; + disable-wp; +- pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>; ++ pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>, <&sdmmc0m1_gpio>; + pinctrl-names = "default"; + sd-uhs-sdr12; + sd-uhs-sdr25; +diff --git a/configs/nanopi-r2s-rk3328_defconfig b/configs/nanopi-r2s-rk3328_defconfig +index 2f67439..43fd536 100644 +--- a/configs/nanopi-r2s-rk3328_defconfig ++++ b/configs/nanopi-r2s-rk3328_defconfig +@@ -57,6 +57,10 @@ CONFIG_FASTBOOT_BUF_ADDR=0x800800 + CONFIG_FASTBOOT_CMD_OEM_FORMAT=y + CONFIG_ROCKCHIP_GPIO=y + CONFIG_SYS_I2C_ROCKCHIP=y ++CONFIG_MMC_IO_VOLTAGE=y ++CONFIG_SPL_MMC_IO_VOLTAGE=y ++CONFIG_MMC_UHS_SUPPORT=y ++CONFIG_SPL_MMC_UHS_SUPPORT=y + CONFIG_MMC_DW=y + CONFIG_MMC_DW_ROCKCHIP=y + CONFIG_SF_DEFAULT_SPEED=20000000