| Message ID | 20190508054151.21762-6-jagan@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBQGYZHTAKGQE3RE7IDQ@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 799253F069 for <linux-amarula@patchwork.amarulasolutions.com>; Wed, 8 May 2019 07:42:25 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id a90sf10840271plc.7 for <linux-amarula@patchwork.amarulasolutions.com>; Tue, 07 May 2019 22:42:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1557294144; cv=pass; d=google.com; s=arc-20160816; b=CiRLsV79BRTc/+ZyiTuJzNykea0PrR0ffmdP5pfMuHBTKrqMCSGTOBQ04uDzzMQY6r 8ONaYBOpESMGWISaFHzVYWtZAlG05W8YePXKkgQrqGjZVcrQb58tR2/2IX226fuDhGVc U2ovGjBrX015CMpsj4iVc6hQe6fw+KXnoY6dzFcvNB5tzrS1xtU1Z5Y3B2JdsdHLfzZ9 QYwgNVE8cPuUP2rxbNHrMdAIuAoXghQA2BrRbvxk2W+mV6Ny3cwiAWLQ0jb2E8oTHDgk o1WHsMdXn3NpBnaS4R87H30tbaHqpYfkPVmkyS0JcLDyNL/9CFeftTi+whjMvSp9/Qoe jKdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=KZIodtg6y+Tbh0U4EB9lJ/naEWQ4IPDvV7TadBDpK7c=; b=k0nAq4vnakmK2XJwyWj+e7TacvFujHOuajP8AYYb5LeoadZ6VK1JyRo0L8Rf/NFStH WaFwr1nHygMQEKoLQIHNa/vI4DHQthjayBK2R0mu+9fvA2RdkDQY5ZJBWroGLj6cvFsm gN/210absxQ1LUye+F0RhQSbBRJMolxFU7gWv+DS+fuJCOPTYjqbQssddoOcnnUlsISP JXzfDnP3VpvHb8ciAjsE9IBpo9wASY4lBDCi9f1FJFwWyUHdu5Zxvxi/WBx4MArE6mbT l4A+hrkiWTnfirrTJZ5lLoXFBBiQv2WoGEeUWoUjTFTLDY/CgPhlerIAVDelMkfgLooj XTww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ktaX6fIL; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=KZIodtg6y+Tbh0U4EB9lJ/naEWQ4IPDvV7TadBDpK7c=; b=LowcxX4XGVpAYCZaYTm8IwsKSCajJ7nJlO7ia0N05kpj73MD67HHfeihUlhm4SziLC MnWIrjuDYSG3O9NAzcGoNzt94sWRCkuJy6f4aDwuCelg61KuTW89L8l1KsBrJ3sV1OdX hv0aUKo9pWWPGQE5p1A4/nMWDOUlG2etI+wng= 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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=KZIodtg6y+Tbh0U4EB9lJ/naEWQ4IPDvV7TadBDpK7c=; b=IQihbZ5UCF78NMe0cDkvfxryd+QKaXo/qyF7dTVMkowyouttnnc736bEiqSUHApXTH ngI475/c2jkTy/Yy2kckfEEnYIdKPuGohLI3QOID7ZZFU8Y8LSkFLrxhT+GKfhCNyQzc rP7HEArSsBLozTy2zRJhmq2NjVeixI508OJF8CXXsC2ADkliaAJfeyqCkEyaucdUIzi9 Jn09blGSs+LFvQQPUmNqIFBPg0WFZLxXtbYaGfOxXhqE/cl6917yu7i17jVSiitnBBeZ aMu3F7Vq1yGhDvApmsdIXWTsIt66W/pEfqEL2KXFpToITTqEW8sYJqOsFK/hD011ncZP 0aCQ== X-Gm-Message-State: APjAAAXjwuGw96c/XMkyo2JqDAi4gak7oacKXD/9p+9WS93anjNaWBtd kLIDS3eYeqUtuqJulvKCfFo46a31 X-Google-Smtp-Source: APXvYqyzjIgk31rVjlIPHF13puDjAYk+5BWns+xaJkZW0FLd7F2DtkrB3Uqlcydnl7ySEk1nLLaH2A== X-Received: by 2002:a62:5845:: with SMTP id m66mr7068494pfb.41.1557294144286; Tue, 07 May 2019 22:42:24 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:8085:: with SMTP id v5ls5162550pff.5.gmail; Tue, 07 May 2019 22:42:24 -0700 (PDT) X-Received: by 2002:a63:17:: with SMTP id 23mr44114333pga.206.1557294143617; Tue, 07 May 2019 22:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557294143; cv=none; d=google.com; s=arc-20160816; b=OKmqnbUX+N5DgGi42rAwGHtX1JSp6r44Pbh02N9RQadXf3nkIJevVWpkI/eh0NUPt3 qeMTNvtJI3UdOPV4bjZtiqHgCkSaMrtr8u+nHpKTpHPg7LK0UMBiiJk8Er19ThU/5OlD gUcVVTxlyvvT4B/VlZQeYyTANDRzDh506kHQz5cbX6e6oyiKL75LOn+WKMgP2+T5zj82 yCzK8NsAS+gT1mkYGsKyanJJRe4kDNIYnKbEu4RVIit8/WCspdvbtFqDINWXOpWFMYaY kGE6ShroapH+sHCu/knSVPw9/TD1rKS3+9jGiNSXPBIgjRXhB+HKYkK8tkRWcUqwCA7O 8PLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=26N0yzTHMG/k0HJ9Nlf8W1/ymmpLZVwsJbgqbhLryoI=; b=lvEiuI2/zS4cQg/0MYaHJsWGmJDWPKWX+UxKwvvVHYxFScZp1h8MzA2wHLH/l9vpFB /NVkGvkQJ7pds953nShmglpHx7EYdHfFblIQbcvhNMefcITavYKqOn+cCBVqRw3rPooN AJKIsAP9xqvskU7c5m+TA9OopkQ8po2gSzonlqQ0HYY56rOUaNUvdCjhGnQZktJVoSiV SSE8KzDAzzJXgK0HJSvqdzBI56FPRAi66z8qmj/jvyn5IfO7XTjJ7Rximm+FKgROmv00 Hqye9h7H45w9T2fgo34OVE7UcNs0klCVW17S9muNB7ZjPJFplg/1o5NptykRIjvOZko9 bcMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ktaX6fIL; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id z22sor17997960pfg.37.2019.05.07.22.42.23 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Tue, 07 May 2019 22:42:23 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:aa7:8b83:: with SMTP id r3mr46054107pfd.248.1557294143323; Tue, 07 May 2019 22:42:23 -0700 (PDT) Received: from localhost.localdomain ([115.97.185.144]) by smtp.gmail.com with ESMTPSA id p67sm33864394pfi.123.2019.05.07.22.42.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 May 2019 22:42:22 -0700 (PDT) From: Jagan Teki <jagan@amarulasolutions.com> To: Simon Glass <sjg@chromium.org>, Philipp Tomsich <philipp.tomsich@theobroma-systems.com>, Kever Yang <kever.yang@rock-chips.com>, Akash Gajjar <akash@openedev.com> Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>, linux-rockchip@lists.infradead.org, linux-amarula@amarulasolutions.com, u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com> Subject: [RESEND PATCH v7 05/11] rockchip: dts: rk3399: nanopi4: Use CD pin as RK_FUNC_1 Date: Wed, 8 May 2019 11:11:45 +0530 Message-Id: <20190508054151.21762-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190508054151.21762-1-jagan@amarulasolutions.com> References: <20190508054151.21762-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ktaX6fIL; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
| Series |
rockchip: Add new rk3399 boards
|
|
Commit Message
Jagan Teki
May 8, 2019, 5:41 a.m. UTC
sdmmc cd pin is configured as RK_FUNC_GPIO which is wrong and indeed failed to detect the sdcard on the board with below error Card did not respond to voltage select! So, fix it by replacing RK_FUNC_GPIO with RK_FUNC_1 which is already defined in rk3399.dts so make use of same like other boards. Add these changes in -u-boot.dtsi to make Linux sync easy for future changes. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> --- arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi
Comments
On 08/05/2019 06:41, Jagan Teki wrote: > sdmmc cd pin is configured as RK_FUNC_GPIO which is wrong and > indeed failed to detect the sdcard on the board with below error > > Card did not respond to voltage select! > > So, fix it by replacing RK_FUNC_GPIO with RK_FUNC_1 which > is already defined in rk3399.dts so make use of same like > other boards. AFAICS this should also be true of RockPro64 and (at least with the Linux DT) Firefly - those aren't grabbing &sdmmc_cd by default either. I imagine that U-Boot might also see similar problems on Gru, where the card detect signal is on a completely different GPIO. I'd note that in Linux, only rk3399-evb is actually *using* &sdmmc_cd - despite the fact that they claim it, nearly all the other boards also have "cd-gpios" and thus end up overriding the dedicated function with an implicit GPIO configuration anyway. Sapphire is the odd one out in using "broken-cd" as the less-efficient way of mitigating the runtime PM issue. > Add these changes in -u-boot.dtsi to make Linux sync easy for future > changes. > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > Reviewed-by: Kever Yang <kever.yang@rock-chips.com> > --- > arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 9 +++++++++ > 1 file changed, 9 insertions(+) > create mode 100644 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi > > diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi > new file mode 100644 > index 0000000000..20db99c0b8 > --- /dev/null > +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi > @@ -0,0 +1,9 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com> > + */ > + > +&sdmmc { > + pinctrl-names = "default"; That's already set in the base DTSI, so doesn't really need to be shadowed here. > + pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; > +}; > I suppose you could also delete the "cd-gpios" property to make it really clear what this override is for (and save a few bytes if it's going to be ignored anyway). Robin.
On Wed, May 8, 2019 at 7:22 PM Robin Murphy <robin.murphy@arm.com> wrote: > > On 08/05/2019 06:41, Jagan Teki wrote: > > sdmmc cd pin is configured as RK_FUNC_GPIO which is wrong and > > indeed failed to detect the sdcard on the board with below error > > > > Card did not respond to voltage select! > > > > So, fix it by replacing RK_FUNC_GPIO with RK_FUNC_1 which > > is already defined in rk3399.dts so make use of same like > > other boards. > > AFAICS this should also be true of RockPro64 and (at least with the > Linux DT) Firefly - those aren't grabbing &sdmmc_cd by default either. I > imagine that U-Boot might also see similar problems on Gru, where the > card detect signal is on a completely different GPIO. But RockPro64 is not using sdmmc_cd and it is able to detect the card w/o pin but it has cd-gpio. > > I'd note that in Linux, only rk3399-evb is actually *using* &sdmmc_cd - > despite the fact that they claim it, nearly all the other boards also > have "cd-gpios" and thus end up overriding the dedicated function with > an implicit GPIO configuration anyway. Sapphire is the odd one out in > using "broken-cd" as the less-efficient way of mitigating the runtime PM > issue. > > > Add these changes in -u-boot.dtsi to make Linux sync easy for future > > changes. > > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > > Reviewed-by: Kever Yang <kever.yang@rock-chips.com> > > --- > > arch/arm/dts/rk3399-nanopi4-u-boot.dtsi | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > create mode 100644 arch/arm/dts/rk3399-nanopi4-u-boot.dtsi > > > > diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi > > new file mode 100644 > > index 0000000000..20db99c0b8 > > --- /dev/null > > +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi > > @@ -0,0 +1,9 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > +/* > > + * Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com> > > + */ > > + > > +&sdmmc { > > + pinctrl-names = "default"; > > That's already set in the base DTSI, so doesn't really need to be > shadowed here. > > > + pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; > > +}; > > > > I suppose you could also delete the "cd-gpios" property to make it > really clear what this override is for (and save a few bytes if it's > going to be ignored anyway). Why so? few boards like OrangePI do use both sdmmc_cd along with cd-gpio. On the other-hand, how about doing this change in Linux?
diff --git a/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi new file mode 100644 index 0000000000..20db99c0b8 --- /dev/null +++ b/arch/arm/dts/rk3399-nanopi4-u-boot.dtsi @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2019 Jagan Teki <jagan@amarulasolutions.com> + */ + +&sdmmc { + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_bus4 &sdmmc_clk &sdmmc_cmd &sdmmc_cd>; +};