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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8BD5C433FE for ; Mon, 28 Nov 2022 08:43:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229873AbiK1InJ (ORCPT ); Mon, 28 Nov 2022 03:43:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229810AbiK1InH (ORCPT ); Mon, 28 Nov 2022 03:43:07 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDB151144F for ; Mon, 28 Nov 2022 00:43:06 -0800 (PST) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ozZjB-0008M9-90; Mon, 28 Nov 2022 09:43:01 +0100 Message-ID: Date: Mon, 28 Nov 2022 09:42:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 From: Ahmad Fatoum Subject: Re: [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases To: Detlev Casanova , Shawn Guo Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Krzysztof Kozlowski , Sascha Hauer , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" References: <20221028141811.101122-1-detlev.casanova@collabora.com> <20221111025232.GI125525@dragon> <2868543.tdWV9SEqCh@falcon9> Content-Language: en-US In-Reply-To: <2868543.tdWV9SEqCh@falcon9> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >>> --- >>> >>> 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>; > > > > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D970BC4332F for ; Mon, 28 Nov 2022 08:44:15 +0000 (UTC) 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:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=k5iezEn7ciEqEQjFqaQIviHfVYv7RKc7YL7HXwUxUl0=; b=hsG/5PILmI/uJs lHeZfsP2eWmKuOMnzXw7DWzFGUjto+RyPwL95HzO5OtYf2xhnfzX/7Qnp7xop6L0oXuFIh1nxC+JN /gt/ziI6w/CaxJhQAc6k1XQ2t5F7jFYN6qHRct+6RcADeLlYhM/3wpfwY4RkHvQPPw/Z7N4wgDqR6 fDZdtnrzIqQAovljJeXJG9179bt7oocuQa9WFtVYzwBl0fLpbACehYcd33yb19T98Nr0cf2gZ0D3g oOivqIPVrpwJoWEX2niKocCAQzqhJsfQTXm/OZCCaaEp+v1+dtwWqLYIqlWDyKgiF69L0tWA2d4/X vQHcJyVvOqrysL/WK2ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozZjO-000KwJ-LW; Mon, 28 Nov 2022 08:43:14 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozZjL-000KtC-3l for linux-arm-kernel@lists.infradead.org; Mon, 28 Nov 2022 08:43:12 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ozZjB-0008M9-90; Mon, 28 Nov 2022 09:43:01 +0100 Message-ID: Date: Mon, 28 Nov 2022 09:42:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 From: Ahmad Fatoum Subject: Re: [PATCH] ARM: dts: imx6qdl-sabre: Add mmc aliases To: Detlev Casanova , Shawn Guo Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Krzysztof Kozlowski , Sascha Hauer , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" References: <20221028141811.101122-1-detlev.casanova@collabora.com> <20221111025232.GI125525@dragon> <2868543.tdWV9SEqCh@falcon9> Content-Language: en-US In-Reply-To: <2868543.tdWV9SEqCh@falcon9> X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221128_004311_183173_32934D59 X-CRM114-Status: GOOD ( 26.60 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 >>> --- >>> >>> 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>; > > > > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel