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 65392C433F5 for ; Mon, 28 Mar 2022 13:17:31 +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:From:References:Cc:To: Subject: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=xS8PDHDijSiQ7y82r0WTCXROcsJswM3mjUCo2RW6+7k=; b=w/8kQqNaKqsq6C jeoLoBCU+YdnK8pSUvsVCuJYk9MRLlWH46X/+30JIWEoh3Qe5aOYTQqG6qEAUwEh0CjiWm3DuBPOU 6rPxGmDIKVgvI3yYmfvSJGJzCO/x59O3D0XwArVlcWwN7eSPW/FYxbwPh4QIPj/N/kd+ax3FA0kry J1LCieoSI0RNl94qRC9hwaOp9K/RmUorHbskT3OcR/WmsNZamkFlmSlnqkaDwrPVIqK6xwq2QSuqj O2XnwNKzB//ojI5P0ZUzBV4+ZlGgJC62kamVTCfPKA4T7XULtnxEEWbQ4dqHD6OEqmLi9PQ9d9JAh BjfrOcYfmRkCv7ibHFtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYpDs-008hzR-4d; Mon, 28 Mar 2022 13:15:53 +0000 Received: from mail-wm1-f43.google.com ([209.85.128.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYpDi-008hw7-BM for linux-arm-kernel@lists.infradead.org; Mon, 28 Mar 2022 13:15:44 +0000 Received: by mail-wm1-f43.google.com with SMTP id h16so8378634wmd.0 for ; Mon, 28 Mar 2022 06:15:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=FqW20OsENTCI6uWyCY3asfYXp4nSun8vCWAA/8cSqJ0=; b=OsTxOIpRQmJoCI3vsZCS4fX6LVmQ9Df8ixndw5Xf6y+RzCzs0Xo24Mz3JO9M3dyE2t 6P7sutndsjo1MzhAh7dGh14WS1/J0TcNuJepHkcGK3Pqx8fmxvqMa5Sn03ny79bt2SQ7 XDrV/aVx2L9okEd5RRbmbjn2h7mIzL+U/6SWAqlgi+JFMW2zxogavBpq1Tl8dT/sXrFV GIhcqNRuuzbfeoBWQOzuyYExFPFxv6QRxDiNhTBXK5YtutO3/o7Eod6RKWuexsH+0OXZ 75yligO21Si9+aIO6l6i8o6bWr6KFK9UuzOYvnxCfZMmRlaPVNjVn0LG1qeUoal6htG9 pxkg== X-Gm-Message-State: AOAM532kopJXN50J9B36axv7sLY5WgXvS2IILTzFqs+oBKDfmWWhVAOe buiIYXJTw0rYnyLtJgEBNzo= X-Google-Smtp-Source: ABdhPJx+kfsHzuGFM4zE/L0h34G360KsWduPKUBPIIrwQF2f/+DlIZC29sfUCBdAtXZ1XoV7W11g+g== X-Received: by 2002:a05:600c:3b98:b0:38c:b19d:59f2 with SMTP id n24-20020a05600c3b9800b0038cb19d59f2mr26607641wms.205.1648473340319; Mon, 28 Mar 2022 06:15:40 -0700 (PDT) Received: from [192.168.0.162] (xdsl-188-155-201-27.adslplus.ch. [188.155.201.27]) by smtp.googlemail.com with ESMTPSA id 11-20020a05600c26cb00b0037ff53511f2sm15060307wmv.31.2022.03.28.06.15.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Mar 2022 06:15:39 -0700 (PDT) Message-ID: <09a1b6a3-3d9d-e7f2-c587-9edc7feb86c0@kernel.org> Date: Mon, 28 Mar 2022 15:15:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 3/5] arm64: dts: imx8mp: Enable HS400-ES Content-Language: en-US To: Ahmad Fatoum , Adam Ford Cc: Krzysztof Kozlowski , linux-mmc , devicetree , Ulf Hansson , Fabio Estevam , Shawn Guo , Sascha Hauer , Adam Ford-BE , Haibo Chen , Linux Kernel Mailing List , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , arm-soc References: <20220327123835.28329-1-aford173@gmail.com> <20220327123835.28329-3-aford173@gmail.com> <74e74ea8-1554-bf08-b0ea-36e77259cb18@pengutronix.de> <5c24c12b-3a12-1e18-9f03-2c54cad30bf9@kernel.org> <5282b39b-85d5-81d6-10d5-a45c66d4d4e9@kernel.org> <6c11c94e-6a3f-323b-37fe-e1b47da106ac@pengutronix.de> From: Krzysztof Kozlowski In-Reply-To: <6c11c94e-6a3f-323b-37fe-e1b47da106ac@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220328_061542_522204_503F74A9 X-CRM114-Status: GOOD ( 28.99 ) 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 On 28/03/2022 15:12, Ahmad Fatoum wrote: > Hello Adam, > > On 28.03.22 15:06, Adam Ford wrote: >> On Mon, Mar 28, 2022 at 7:56 AM Krzysztof Kozlowski wrote: >>> >>> On 28/03/2022 14:45, Adam Ford wrote: >>>> On Mon, Mar 28, 2022 at 6:49 AM Krzysztof Kozlowski wrote: >>>>> >>>>> On 28/03/2022 13:09, Ahmad Fatoum wrote: >>>>>> Hello Adam, >>>>>> >>>>>> On 28.03.22 12:47, Adam Ford wrote: >>>>>>> On Mon, Mar 28, 2022 at 2:20 AM Ahmad Fatoum wrote: >>>>>>>> >>>>>>>> Hello Adam, >>>>>>>> >>>>>>>> On 27.03.22 14:38, Adam Ford wrote: >>>>>>>>> The SDHC controller in the imx8mp has the same controller >>>>>>>>> as the imx8mm which supports HS400-ES. Change the compatible >>>>>>>>> fallback to imx8mm to enable it. >>>>>>>> >>>>>>>> I believe that's a shortcoming of the Linux driver, which should explicitly list >>>>>>>> fsl,imx8mp-usdhc in its compatibles and enable HS400-ES for it. >>>>>>>> >>>>>>>> I find dropping compatibles problematic, because like Linux matching >>>>>>>> fsl,imx8mm-usdhc, but not fsl,imx8mp-usdhc, other software may match >>>>>>>> fsl,imx7d-usdhc, but not fsl,imx8[mp]-usdhc. >>>>>>>> >>>>>>>> I'd prefer that either the kernel driver gains extra compatibles or that >>>>>>>> the DTS lists extra compatibles and we refrain from dropping existing >>>>>>>> (correct) ones. >>>>>>>> >>>>>>> >>>>>>> I would argue that imx7d is not correct since the IP blocks between >>>>>>> imx7d and imx8mm have different flags/quirks. One of which includes >>>>>>> HS400-ES, but there are other differences as well. >>>>>> >>>>>> The DTS currently says that an fsl,imx7d-usdhc is a subset of an >>>>>> fsl,imx8mm-usdhc. So a driver could treat both HW the exact same >>>>>> by focusing on the i.MX7D parts. Linux apparently did exactly >>>>>> that so far. Is this not accurate? >>>>>> >>>>>> >>>>>>>> What do you think? >>>>>>> >>>>>>> From my understanding of the fallback compatibility strings is to >>>>>>> avoid having to add more and more compatible strings to the drivers >>>>>>> when they do not serve a functional purpose. Based On a conversation >>>>>>> with Krzysztof [1], he suggested we update the YAML file based on the >>>>>>> fallback, but he wanted NXP to give their feedback as to what the >>>>>>> right fallback strings should be. Haibo from NXP sent me a hierarchy >>>>>>> [1] which is what I used to update the YAML file. Based on the YAML >>>>>>> file, the fallback in each DTSI file was updated to ensure the use of >>>>>>> the proper IP block. >>>>>> >>>>>> Myself I am in favor of moving to three compatibles instead of dropping one. >>>>>> For some theoretical fsl,imx8mf-usdhc that's supposed to be exactly the same >>>>>> as a fsl,imx8mm-usdhc, I don't mind omitting the fsl,imx7d-usdhc compatible, >>>>>> but for existing device trees, this may introduce needless potential breakage >>>>>> for other software that also uses Linux device trees. >>>>>> >>>>> >>>>> Affecting existing users is indeed a concern with this approach, because >>>>> in-kernel DTS might be used in other projects as well. >>>>> >>>>> I still cannot find here the answer whether fsl,imx8mm-usdhc is actually >>>>> compatible with fsl,imx7d-usdhc. It's not about driver, but about >>>>> hardware and programming model. imx8mm can support additional features >>>>> and still be compatible with imx7d. However if any flags of imx7d are >>>>> actually not valid for imx8mm, then it's different case. >>>> >>>> The imx7d flags are: >>>> ESDHC_FLAG_USDHC >>>> ESDHC_FLAG_STD_TUNING >>>> ESDHC_FLAG_HAVE_CAP1 >>>> ESDHC_FLAG_HS200 >>>> ESDHC_FLAG_HS400 >>>> ESDHC_FLAG_STATE_LOST_IN_LPMODE >>>> ESDHC_FLAG_BROKEN_AUTO_CMD23, >>>> >>>> The imx8mm flags are: >>>> ESDHC_FLAG_USDHC >>>> ESDHC_FLAG_STD_TUNING >>>> ESDHC_FLAG_HAVE_CAP1 >>>> ESDHC_FLAG_HS200 >>>> ESDHC_FLAG_HS400 >>>> ESDHC_FLAG_HS400_ES >>>> ESDHC_FLAG_STATE_LOST_IN_LPMODE >>>> >>>> It does not have the ESDHC_FLAG_BROKEN_AUTO_CMD23 that is present in the imx7d. >>> >>> AFAIU, it looks imx8mm is compatible with imx7d, because the broken >>> acmd23 only limits the features. If imx8mm binds according to imx7d, it >>> will not support acmd23 and HS400-ES. >>> >>> Having three compatibles is therefore also OK. >>> >>> You could also add two cases: >>> 1. three compatibles, deprecated: True, >>> 2. two compatibles, without imx7d. >>> >>> Existing DTS stays with three compatibles for two years and later gets >>> converted to two compatibles. New DTS should use two compatibles. >>> >>> It's quite a lot of churn, but would make in the long term bindings >>> correct and also not break other users/projects. >>> >>>> >>>> Maybe Haibo can comment on whether or not that would be an issue for the 8m[mnp] >>>> >>>> I will defer to Krzysztof and Haibo as to the proper method that we >>>> should add HS400-ES. I don't have an issue adding the imx8mn or >>>> imx8mp compatible flags to the esdhc driver if that's the decision. >>> >>> I don't get what's the problem with HS400-ES. In any case (your patch >>> here, other ideas) your DTS will bind to imx8mm-usdhc which has HS400-ES. >> >> I was under the impression Ahmad didn't want me to add the imx8mm >> compatible to the DTS, but instead, add the imx8mp compatible into the >> driver so it binds directly to an imx8mp. It's not really related the bindings, so don't ask me. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel