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 524BBC4332F for ; Wed, 23 Mar 2022 17:23:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343524AbiCWRZC (ORCPT ); Wed, 23 Mar 2022 13:25:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238674AbiCWRY7 (ORCPT ); Wed, 23 Mar 2022 13:24:59 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 872515D5D2; Wed, 23 Mar 2022 10:23:29 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id b24so2663459edu.10; Wed, 23 Mar 2022 10:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=juL17s/J9mHVgJHyYqq8vpqD2uO1Y1nLtpoOVNs7FRw=; b=lAFBZ8r8drRioCv3odbctBgVd5UXVvEZNxPD/cyYarQZ0akXdf+zZURhaa42WuRsC9 1nTAwT6OpMQENK6Ho4GBKKZ/hZa511Pc5vW0yHzYTMEOKsAePNbwRYZLqieKRji5HekH 3yRi7Lvv2Fo5VcfcbrNfl34KJiwvpIvB+BkVrTWaMnAojaGZSSpNDLWJcAtlkA5u2njt ZRUf6aAkfZT+Kgq3U9BAowcmCrhdTbPZQNKgmNIgAV2Wzhljs6ZsH0B+mtYpwhHe97lZ pVS5UxfJIkIimYwK4rIupe86mSI/sFwHi7Q4/7ilUxPC4XaaKFzK/JW+/603iTjn7K22 WhZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=juL17s/J9mHVgJHyYqq8vpqD2uO1Y1nLtpoOVNs7FRw=; b=Ir33r7Ue0NilSh4DwEmwtdJltv5tkTpLad2cxEr/jWM6seRKLk9m7Bn0OLvC3GVVRk u4iee9KuuMHk3MQTIQ97gp93SKqMJa0+v0mHalgUaju7MxzMRifhWHtLj/leniIKmOH5 DBmbEOSwr8ujsC2p7Vl+v+M//UwOA8E/qbko9IFgmyoDCwi5FHuXz2VoL5SrCAxgHNQa jvzpGmxlkWOjDeg7t0ZUVEKTMYxR6vuMtlHqD9wCuvgYry9mZj6mcE2sdWfs1+R/GLWa rniMaWhEIggZCeOPGcosFmEoAzPC5ZQJFJFw6LIJW8oYtUtrPr4jyRCNzL3u465zssHP hLAA== X-Gm-Message-State: AOAM532drBDvt+4t1dtd3/3Z8u75kpioAeNNwP4RmRo4tva/NAHRqH1o jHxFxb1aNbCY3ZXu/OLglyVk0Tt/MoiMegHT7SjZm1Ps X-Google-Smtp-Source: ABdhPJyft3K9bCkUSLrNX6JZW9BLNtJ57TArhGm3JaTHjtmeZOA2hxLe9EQ03TB1Tv8j4DwJrud2AiOB1S7a0xyZtUU= X-Received: by 2002:a05:6402:2142:b0:413:6531:bd9e with SMTP id bq2-20020a056402214200b004136531bd9emr1464059edb.5.1648056207837; Wed, 23 Mar 2022 10:23:27 -0700 (PDT) MIME-Version: 1.0 References: <20220323134019.3796178-1-aford173@gmail.com> <35f58894-ed6d-0af0-e483-7a161ad6625a@kernel.org> <354951e0-d2a8-bf4f-e0c5-081e836bb3c3@kernel.org> In-Reply-To: <354951e0-d2a8-bf4f-e0c5-081e836bb3c3@kernel.org> From: Adam Ford Date: Wed, 23 Mar 2022 12:23:16 -0500 Message-ID: Subject: Re: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback To: Krzysztof Kozlowski Cc: arm-soc , Adam Ford-BE , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-mmc , devicetree , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 23, 2022 at 9:11 AM Krzysztof Kozlowski wrote: > > On 23/03/2022 15:00, Adam Ford wrote: > > On Wed, Mar 23, 2022 at 8:56 AM Krzysztof Kozlowski wrote: > >> > >> On 23/03/2022 14:40, Adam Ford wrote: > >>> The SDHC controller in the imx8mn and imx8mp have the same controller > >>> as the imx8mm which is slightly different than that of the imx7d. > >>> Using the fallback of the imx8mm enables the controllers to support > >>> HS400-ES which is not available on the imx7d. > >>> > >>> Signed-off-by: Adam Ford > >>> > >>> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > >>> index 7dbbcae9485c..d6ea73d76bdd 100644 > >>> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > >>> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > >>> @@ -39,14 +39,14 @@ properties: > >>> - items: > >>> - enum: > >>> - fsl,imx8mm-usdhc > >> > >> Your change looks reasonable, but why imx8mm is compatible with imx7d? > > > > I saw that, and I wasn't sure the best way to go about fixing it. If > > I move the 8mm out of the imx7d category, do I need to add it to the > > enum list associated with the imx8mm, or can I just delete it from the > > enum leaving the const for imx8mm good enough? > > > > The DTS is using: > compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc" > which looks incorrect, based on what you wrote in commit description. > Since fsl,imx8mm-usdhc has its own compatibility-group and defines the > properties for entire family (imx8mm + imx8mn + imx8mp), then I would > assume that either fsl,imx8mm-usdhc is not be compatible with imx7d or > everything is compatible with imx7d. IOW, DTS and bindings should be > changed to one of following: > 1. Everything compatible with imx7d: > compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc"; > compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc"; > > 2. A new group: > compatible = "fsl,imx8mm-usdhc"; > compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc"; > > Which one, I am not sure. My commit 80fd350b95 organized it in (1) > approach, because also that time there was no new group for 8mm (added > in commit 431fae8). I assume NXP engineer knows better, so the better > solution would be (2). In such case, imx8mm has to be moved to the first > enum and all DTS have to be adjusted. I pulled NXP's downtream kernel based on 5.15.y, and grepped the code for imx8mm-usdhc. It looks like the imx8mm, imx8mn, imx8mp, and imx8ulp use the imx8mm compatible flag. The imx8mq uses the older imx7d. I'll do a second revision later today or tomorrow. Looking inside the driver, it appears there are some other quirks that different between the imx7d and imx8mm beyond just support for HS400-ES, so I think your option 2 is appropriate. Hopefully someone from NXP can comment. adam > > > Best regards, > Krzysztof 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 7C1EEC433F5 for ; Wed, 23 Mar 2022 17:25:05 +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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mT9UA75Ci5LADcZDSRPAf7vvkUalRSyqhSy3pr3Yf+E=; b=4zER9U7uwa2CGN uzEPjxzAP45msa3Z+5YJn6fA6jveikuvFpLqoYlb+r5TiUJwSepNt+VXo12oQPQojnMKZvvw8cK85 wPxuXniJH9D7lEU7VQs7bD8OwUUMfRBO5F9+ImK0e/9WpxIWg3U65NfhP7ouUqKgWdWl0ZHs5dbIP GZyXQnexAXe0zKkkk123B1eoR/c3qG3BmJC83iFdBLA697b1FrltmWwMdE70rcWqAh90GUe8WSWk/ t6muKR+Rp2U79DmgcSz2MNVWl7UvdFN7hOjQ0eyxVWw7dWbDHh7iKzHJU2KpZXrMuy41Dn05iUdjR Idfa245MStFBrGe6n6jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX4hr-00EQVZ-M2; Wed, 23 Mar 2022 17:23:36 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX4hl-00EQU0-Rh for linux-arm-kernel@lists.infradead.org; Wed, 23 Mar 2022 17:23:31 +0000 Received: by mail-ed1-x532.google.com with SMTP id x34so2678421ede.8 for ; Wed, 23 Mar 2022 10:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=juL17s/J9mHVgJHyYqq8vpqD2uO1Y1nLtpoOVNs7FRw=; b=lAFBZ8r8drRioCv3odbctBgVd5UXVvEZNxPD/cyYarQZ0akXdf+zZURhaa42WuRsC9 1nTAwT6OpMQENK6Ho4GBKKZ/hZa511Pc5vW0yHzYTMEOKsAePNbwRYZLqieKRji5HekH 3yRi7Lvv2Fo5VcfcbrNfl34KJiwvpIvB+BkVrTWaMnAojaGZSSpNDLWJcAtlkA5u2njt ZRUf6aAkfZT+Kgq3U9BAowcmCrhdTbPZQNKgmNIgAV2Wzhljs6ZsH0B+mtYpwhHe97lZ pVS5UxfJIkIimYwK4rIupe86mSI/sFwHi7Q4/7ilUxPC4XaaKFzK/JW+/603iTjn7K22 WhZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=juL17s/J9mHVgJHyYqq8vpqD2uO1Y1nLtpoOVNs7FRw=; b=3rIzzEhJ1Mxk3f+7HfbBntq2hgIBWzgLOe0tfx1gX32ZGSXVBVn0IMfN6BLf3lhcsz XmkUo5BD/una7bUjwqkyInyEwRCS7pYZt1+ohCyxOC9MAjl2IcYqLoRC6xc2rKksoHeB tHhBNEI5rXlww7eUPyl5bnZYgIV02VKmrzZDR46Lyzl+8D36/Pczabkduhi1OKMT0J7E CdaPSFKS+UhMJwauWroxPdVGb92bCQLtaykMxgzyU/6pPkLQjrzR6l9oEfYOC3Bye65v IvQal+9+2YFOCbmx+06FXTKyaZ8etMaZwwOAHErb/MHcM2whm2oPXTxrYBneUTQY+a23 L4KA== X-Gm-Message-State: AOAM530qpWOjt6jBMbAUllz6tc/hDgmF7encQgFpSx0jx68ciaBFNmA9 wARb2Ufj/4ucwcSYWJLCtPngNImJvSGMkFx/f8w= X-Google-Smtp-Source: ABdhPJyft3K9bCkUSLrNX6JZW9BLNtJ57TArhGm3JaTHjtmeZOA2hxLe9EQ03TB1Tv8j4DwJrud2AiOB1S7a0xyZtUU= X-Received: by 2002:a05:6402:2142:b0:413:6531:bd9e with SMTP id bq2-20020a056402214200b004136531bd9emr1464059edb.5.1648056207837; Wed, 23 Mar 2022 10:23:27 -0700 (PDT) MIME-Version: 1.0 References: <20220323134019.3796178-1-aford173@gmail.com> <35f58894-ed6d-0af0-e483-7a161ad6625a@kernel.org> <354951e0-d2a8-bf4f-e0c5-081e836bb3c3@kernel.org> In-Reply-To: <354951e0-d2a8-bf4f-e0c5-081e836bb3c3@kernel.org> From: Adam Ford Date: Wed, 23 Mar 2022 12:23:16 -0500 Message-ID: Subject: Re: [PATCH 1/3] dt-bindings: mmc: imx-esdhc: Change imx8mn and imx8mp compatible fallback To: Krzysztof Kozlowski Cc: arm-soc , Adam Ford-BE , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-mmc , devicetree , Linux Kernel Mailing List X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220323_102329_929187_06612F84 X-CRM114-Status: GOOD ( 32.27 ) 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 Wed, Mar 23, 2022 at 9:11 AM Krzysztof Kozlowski wrote: > > On 23/03/2022 15:00, Adam Ford wrote: > > On Wed, Mar 23, 2022 at 8:56 AM Krzysztof Kozlowski wrote: > >> > >> On 23/03/2022 14:40, Adam Ford wrote: > >>> The SDHC controller in the imx8mn and imx8mp have the same controller > >>> as the imx8mm which is slightly different than that of the imx7d. > >>> Using the fallback of the imx8mm enables the controllers to support > >>> HS400-ES which is not available on the imx7d. > >>> > >>> Signed-off-by: Adam Ford > >>> > >>> diff --git a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > >>> index 7dbbcae9485c..d6ea73d76bdd 100644 > >>> --- a/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > >>> +++ b/Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml > >>> @@ -39,14 +39,14 @@ properties: > >>> - items: > >>> - enum: > >>> - fsl,imx8mm-usdhc > >> > >> Your change looks reasonable, but why imx8mm is compatible with imx7d? > > > > I saw that, and I wasn't sure the best way to go about fixing it. If > > I move the 8mm out of the imx7d category, do I need to add it to the > > enum list associated with the imx8mm, or can I just delete it from the > > enum leaving the const for imx8mm good enough? > > > > The DTS is using: > compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc" > which looks incorrect, based on what you wrote in commit description. > Since fsl,imx8mm-usdhc has its own compatibility-group and defines the > properties for entire family (imx8mm + imx8mn + imx8mp), then I would > assume that either fsl,imx8mm-usdhc is not be compatible with imx7d or > everything is compatible with imx7d. IOW, DTS and bindings should be > changed to one of following: > 1. Everything compatible with imx7d: > compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc"; > compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc"; > > 2. A new group: > compatible = "fsl,imx8mm-usdhc"; > compatible = "fsl,imx8mq-usdhc", "fsl,imx8mm-usdhc"; > > Which one, I am not sure. My commit 80fd350b95 organized it in (1) > approach, because also that time there was no new group for 8mm (added > in commit 431fae8). I assume NXP engineer knows better, so the better > solution would be (2). In such case, imx8mm has to be moved to the first > enum and all DTS have to be adjusted. I pulled NXP's downtream kernel based on 5.15.y, and grepped the code for imx8mm-usdhc. It looks like the imx8mm, imx8mn, imx8mp, and imx8ulp use the imx8mm compatible flag. The imx8mq uses the older imx7d. I'll do a second revision later today or tomorrow. Looking inside the driver, it appears there are some other quirks that different between the imx7d and imx8mm beyond just support for HS400-ES, so I think your option 2 is appropriate. Hopefully someone from NXP can comment. adam > > > Best regards, > Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel