Message ID | 20221028141811.101122-1-detlev.casanova@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp863225wru; Fri, 28 Oct 2022 07:28:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FNFJSkTUSiIWfCkieqTyQvptF2AMiIU4ku0uLMJNWD/C1VFjS202UXq2LTYGOfJmWIeTs X-Received: by 2002:a05:6402:5419:b0:457:c955:a40f with SMTP id ev25-20020a056402541900b00457c955a40fmr49752255edb.391.1666967306019; Fri, 28 Oct 2022 07:28:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666967306; cv=none; d=google.com; s=arc-20160816; b=Spt4lvT+wkQFCraR+0In1S95h6BmGy7O+r8iwt0HiSjeqG4xexmTB2v3jAa2c/jUrU 99sCdHPZ3f8fSy9P4OVHrxEjg87RUfsfFDs+59hU+vDXHl5VzWL/agUbieyZWP/Uy3QQ qnatyM2gQh97r56aopOkDjncke71xDRrWO2u1yfN91q0JtRGuLGi48rs/oPG6Zxem85f SvV/QPD1aIMfwGkv5+5uGCbe5hYybVxm1bhAxOs1388Wcz2tTS8yc40w6klW5Jr3Rj1u 7/E6P8zRBYbFoyENdio1dSan+cK7Thn4nO/0jhVc8sFj/WVbnubPJ6Q3ulxImuKXU706 W8Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gOi7ZAQTzFFJrJu5yTuWj5ZiKSzbXKKN6bzPa+PUrsc=; b=M9EXBXNQ2jEKM8qfYgmxKq66FRSqMJpf+jkcjK2zG+My+2nz4kU9LiGiCc00IEV8fu dSLoGMGbDoeJImQegkrAqekf+OJvMwH54WOv+89kus/s2h4ABPBnM2bt+tISwCmiq45b AP8n6n8pH3IY+ihYwNDtrYe+kjN6wCJsg5MLgqU/+pAjrpiZS0Y3RS6S2B1nwlHj0vsC oKD2v+O59kR717pOa/Xr/CJLpm5VnJesTPLMOXHPQhhpHDdxfZ6lDJZQgo5snHXhaolN TRDdRQRwAWU69UZ4qrSiAOPXY70UHaAuRJ/ka7Zn5jMgslHu1kaoRg3atv9rJ/Aa+cVc oOcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NO0A98iX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id um16-20020a170906cf9000b0078de83a052csi3854394ejb.483.2022.10.28.07.28.02; Fri, 28 Oct 2022 07:28:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NO0A98iX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbiJ1OTQ (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 28 Oct 2022 10:19:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbiJ1OTJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Oct 2022 10:19:09 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D6A21E3EFA; Fri, 28 Oct 2022 07:19:08 -0700 (PDT) Received: from Falcon9.mtl.collabora.ca (mtl.collabora.ca [66.171.169.34]) (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) (Authenticated sender: detlev) by madras.collabora.co.uk (Postfix) with ESMTPSA id DFF796602929; Fri, 28 Oct 2022 15:19:05 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1666966747; bh=m/1hch4d/QsPLuNqP8lJpPMkiEIjR7tmyE3F0XJH+GA=; h=From:To:Cc:Subject:Date:From; b=NO0A98iXxE24KM+jOU28FC8gP4S/ntjkLRyOYis5wAj6kOy4bYhTasScC4Ah+kOF3 FZJLC15vrNq5O6iiKWgHfVKXPoGYmTcZzaK+DDxCB12tV01UyP9pSRq6IzaSsIc0KY F4AeVy2qu/eD6dRk8AH0oXeavAJl7UHnepA5AFh2mcBqBPgv299BGUBwGI/fCX4fKi 2A4fdKU8OP9pQOqIgIVLJxeI4psydrJewiAmqHwcAxluSjvRSYwLterpz0j4dq1Sg0 EYSKG3FDmPbmPp9iwySnzOGQreiyimrYpLYZt9B/9ytbZJAUbO92FWktIdVWp05qWP JEIb5it3rXqyw== From: Detlev Casanova <detlev.casanova@collabora.com> To: linux-kernel@vger.kernel.org Cc: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, NXP Linux Team <linux-imx@nxp.com>, devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE), Detlev Casanova <detlev.casanova@collabora.com> Subject: [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases Date: Fri, 28 Oct 2022 10:18:11 -0400 Message-Id: <20221028141811.101122-1-detlev.casanova@collabora.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747941909666200848?= X-GMAIL-MSGID: =?utf-8?q?1747941909666200848?= |
Series |
ARM: dts: imx6qdl-sabre: Add mmc aliases
|
|
Commit Message
Detlev Casanova
Oct. 28, 2022, 2:18 p.m. UTC
If not specified, the mmc0 and mmc1 devices will be the devices
mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6
Sabrelite devices.
The actual SD card reader devices are the ones at mmc@2198000 and
mmc@219c000.
Set aliases to use the correct mmc devices order.
Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++
1 file changed, 5 insertions(+)
Comments
On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote: > If not specified, the mmc0 and mmc1 devices will be the devices > mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6 > Sabrelite devices. > > The actual SD card reader devices are the ones at mmc@2198000 and > mmc@219c000. > > Set aliases to use the correct mmc devices order. Is this something never worked or a regression? For the latter, we may need a Fixes tag? Shawn > > Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> > --- > arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi > index 22f8e2783cdf..12573e1f917c 100644 > --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi > +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi > @@ -14,6 +14,11 @@ chosen { > stdout-path = &uart2; > }; > > + aliases { > + mmc0 = &usdhc3; > + mmc1 = &usdhc4; > + }; > + > memory@10000000 { > device_type = "memory"; > reg = <0x10000000 0x40000000>; > -- > 2.38.1 >
On Thursday, November 10, 2022 9:52:32 P.M. EST Shawn Guo wrote: > On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote: > > If not specified, the mmc0 and mmc1 devices will be the devices > > mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6 > > Sabrelite devices. > > > > The actual SD card reader devices are the ones at mmc@2198000 and > > mmc@219c000. > > > > Set aliases to use the correct mmc devices order. > > Is this something never worked or a regression? For the latter, we may > need a Fixes tag? These were apparently never set in the kernel device-tree and added manually in u-boot when dts are synced. Because most distributions use UUIDs in fstab, it is not a big problem in Linux, just that the SD card is called /dev/mmcblk2. I would say that this has always been an issue in Linux. > Shawn > > > Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> > > --- > > > > arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi > > b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index > > 22f8e2783cdf..12573e1f917c 100644 > > --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi > > +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi > > @@ -14,6 +14,11 @@ chosen { > > > > stdout-path = &uart2; > > > > }; > > > > + aliases { > > + mmc0 = &usdhc3; > > + mmc1 = &usdhc4; > > + }; > > + > > > > memory@10000000 { > > > > device_type = "memory"; > > reg = <0x10000000 0x40000000>;
On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote: > If not specified, the mmc0 and mmc1 devices will be the devices > mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6 > Sabrelite devices. > > The actual SD card reader devices are the ones at mmc@2198000 and > mmc@219c000. > > Set aliases to use the correct mmc devices order. > > Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> Applied, thanks!
Hello Detlev, Hello Shawn, On 11.11.22 20:35, Detlev Casanova wrote: > On Thursday, November 10, 2022 9:52:32 P.M. EST Shawn Guo wrote: >> On Fri, Oct 28, 2022 at 10:18:11AM -0400, Detlev Casanova wrote: >>> If not specified, the mmc0 and mmc1 devices will be the devices >>> mmc@2190000 and mmc@2194000, which are in disabled state on the iMX.6 >>> Sabrelite devices. >>> >>> The actual SD card reader devices are the ones at mmc@2198000 and >>> mmc@219c000. >>> >>> Set aliases to use the correct mmc devices order. >> >> Is this something never worked or a regression? For the latter, we may >> need a Fixes tag? > > These were apparently never set in the kernel device-tree and added manually > in u-boot when dts are synced. > > Because most distributions use UUIDs in fstab, it is not a big problem in > Linux, just that the SD card is called /dev/mmcblk2. I would say that this has > always been an issue in Linux. We already have aliases in imx6qdl.dtsi. Existing Installations that hardcode root=mmcblk2 _will_ be broken by this change. Installations that are fixed by this change have never worked properly, because prior to commit fa2d0aa96941 ("mmc: core: Allow setting slot index via device tree alias"), it depended on probe order and/or whether a card was present. Whether SD/eMMC comes first or if they start at 0 or 2 is just cosmetic. The alias order corresponds with the order in the data sheet and that's a good default and I see no reason to change this here and risk breakage. I thus don't think this patch should go mainline. Thanks, Ahmad > >> Shawn >> >>> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com> >>> --- >>> >>> arch/arm/boot/dts/imx6qdl-sabrelite.dtsi | 5 +++++ >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi >>> b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index >>> 22f8e2783cdf..12573e1f917c 100644 >>> --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi >>> +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi >>> @@ -14,6 +14,11 @@ chosen { >>> >>> stdout-path = &uart2; >>> >>> }; >>> >>> + aliases { >>> + mmc0 = &usdhc3; >>> + mmc1 = &usdhc4; >>> + }; >>> + >>> >>> memory@10000000 { >>> >>> device_type = "memory"; >>> reg = <0x10000000 0x40000000>; > > > > > >
diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index 22f8e2783cdf..12573e1f917c 100644 --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi @@ -14,6 +14,11 @@ chosen { stdout-path = &uart2; }; + aliases { + mmc0 = &usdhc3; + mmc1 = &usdhc4; + }; + memory@10000000 { device_type = "memory"; reg = <0x10000000 0x40000000>;