Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1009934rdh; Sun, 24 Sep 2023 23:41:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrYZj/fcl2giFn8RzVkgR4XQ+9CtKT4aQ7pCTqEqarQH5hI/U4IFNJRis5PkfMLnNf+0bZ X-Received: by 2002:a05:6358:341a:b0:134:c859:d32a with SMTP id h26-20020a056358341a00b00134c859d32amr7973853rwd.25.1695624075401; Sun, 24 Sep 2023 23:41:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695624075; cv=none; d=google.com; s=arc-20160816; b=Ao6W+qIz2PH0822tazDScoYIjQfBkt1VlpNi0c50h0plXNKkM497L80o1yiZCc1rfv 3XzrwTVEisSHSz9Wsa4eZjXjzifcRfqK1NY/v+l8WaOdh+TuhF/3GtbcBhOZgPQs7FgS Xsymd+Hn0fT3YFcMLLPrw8ip7uCTPyEtL9tIg0MJPaXrmYjhfTmsFNwz9KvpQ2/YEMTm gwuS6bcTjRbtxZaWuD1eo0TL5A2gYKc56BWU8MHl4mzqu5Nrs8/w+D+TLba2v/9qC/A+ beQD8MaZmWypjnvjYlteO3vhqLqEDvjHRMh/0EvwivdfewZK3xb17htl/ILANj8fUpFx /Dvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=g0+IXnh6MdnWPnySyYwtUtqhST9oEZJulxHM6uyxvQ4=; fh=U3D027K5ZMzF6tWVFeyH/tTni4wazW8SRAJBDQLOTgc=; b=REHSOXfpWBSg9JP1B4muJ5F7nMRo/ITFHtuS3Jbxy8WuYfMHh2LzmSbP2VMj31T7sj CF8lO0X94pQhWkDjiBwWP8HgQXf5Fu4bDrwbLzFlIhWEwl7xyQ1jJdXKF2HSdB5jAu1M S7sFnNwrpkZJiCyNUVdZQccRQSu+WgzOcnTy4ik0BnUT09XOXo+4f4ChdyiPDfJMmhZi J3f082SrcShbA8xYXohsYFBRizOe+0ieglLIknVk+8q33w2h2RRx6t8fLL4ez6Divy0t 8vk3n6p+KcYAiY0CFLH1lHXYdi4EcWE/iIpMZMQomk4X/po//7p4U4Ib/DzEbq+xSB6+ 7SLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=FqfnGr8Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l64-20020a639143000000b00573feb80075si9310272pge.692.2023.09.24.23.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 23:41:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=FqfnGr8Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 155488177E2B; Sun, 24 Sep 2023 14:04:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229698AbjIXVEd (ORCPT + 99 others); Sun, 24 Sep 2023 17:04:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbjIXVEb (ORCPT ); Sun, 24 Sep 2023 17:04:31 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 458FDFB for ; Sun, 24 Sep 2023 14:04:24 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id 46e09a7af769-6c4e30a3604so830649a34.2 for ; Sun, 24 Sep 2023 14:04:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1695589463; x=1696194263; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=g0+IXnh6MdnWPnySyYwtUtqhST9oEZJulxHM6uyxvQ4=; b=FqfnGr8QQVjY3RXWX8rjtQu4CxjR3CkQY4oXDfwm7ETGhoedIRFfq6uXCAcTjFVdrQ 16QVR9ZPQveB9EIV4N3Yc1g5p/jFvVfV2HO+0A7T7e8t4xwi9qiSaz11BT4vfDJmAr4H ze5Y0U1x2hD7knjJYGyrObpCJUQ+K2AFZ3+iEnU8X461hno1Q3oBsPO1eLDAkDGT6k3H Ql9ndAdckL8kTlkf352PTKb3yjquK9MA0g8+g2ZhfOJX0d8CpZ/t5J/b7kqEYBhzI58B BNrjP3uHtxHW645RSTISDCDeoYYPGaAOIoSO6zrojVjo7Qm/8txFvhjn4SiGvHixTrIc wfPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695589463; x=1696194263; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g0+IXnh6MdnWPnySyYwtUtqhST9oEZJulxHM6uyxvQ4=; b=OLRhuPUpeBdV3PDzJL+1lJGEkd7Xy/N98DjhOUBK1Kumj6i1U7NnCvJSMAYsgnhaaZ wytaZo/TyxBZgoainvJpPRXOwVrOa0jiEtAPZM/D6oi82YIktvKTMA5nDXwCZ4kkJ6xC NJr5xnT4Y7TLSGD4iNTWJMwaoFfX/Ra2IZerWGokOorFawKVXTrd3oNOV0yvi4eNIGhQ CNFaf1V1yOvh9sKJtK9skLxEVd3JP99Zu/MpmJK0Y7FmKth1QhvnLCVSKjxLBeue24Es 0o+sJXlcp3zuKdpOmOU8u9U75zZDGFgsHXasIWvWz3t2wFW+OsXNdj9A3ke90FDdmHRZ Yvew== X-Gm-Message-State: AOJu0YyqxumDJL/OCyCNHIEMEk096LR2TfITJgidq19HAqhLxJehFVKG +sQrSSZzXhdRaroSnEfwCtRCZQ== X-Received: by 2002:a05:6358:6f12:b0:13c:eea2:d021 with SMTP id r18-20020a0563586f1200b0013ceea2d021mr4834597rwn.9.1695589463417; Sun, 24 Sep 2023 14:04:23 -0700 (PDT) Received: from x1 ([191.96.37.211]) by smtp.gmail.com with ESMTPSA id e17-20020aa78251000000b0068feb378b89sm6879991pfn.171.2023.09.24.14.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Sep 2023 14:04:22 -0700 (PDT) Date: Sun, 24 Sep 2023 23:04:14 +0200 From: Drew Fustini To: Guo Ren Cc: Conor Dooley , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Adrian Hunter , Fu Wei , Paul Walmsley , Palmer Dabbelt , Albert Ou , Robert Nelson , Jason Kridner , Xi Ruoyao , Han Gao , Icenowy Zheng , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 1/6] dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support Message-ID: References: <20230921-th1520-mmc-v1-0-49f76c274fb3@baylibre.com> <20230921-th1520-mmc-v1-1-49f76c274fb3@baylibre.com> <20230922-parish-ice-a22e93dc3027@spud> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sun, 24 Sep 2023 14:04:43 -0700 (PDT) On Sat, Sep 23, 2023 at 04:10:11PM +0800, Guo Ren wrote: > On Fri, Sep 22, 2023 at 11:18 PM Drew Fustini wrote: > > > > On Fri, Sep 22, 2023 at 10:57:36AM +0100, Conor Dooley wrote: > > > Hey Drew, > > > > > > On Thu, Sep 21, 2023 at 06:49:48PM -0700, Drew Fustini wrote: > > > > Add compatible value for the T-Head TH1520 dwcmshc controller and add > > > > thead,phy-pull-up property. > > > > > > > > Signed-off-by: Drew Fustini > > > > --- > > > > Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 4 ++++ > > > > 1 file changed, 4 insertions(+) > > > > > > > > diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml > > > > index a43eb837f8da..46b768d46712 100644 > > > > --- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml > > > > +++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml > > > > @@ -19,6 +19,7 @@ properties: > > > > - rockchip,rk3568-dwcmshc > > > > - rockchip,rk3588-dwcmshc > > > > - snps,dwcmshc-sdhci > > > > + - thead,th1520-dwcmshc > > > > > > > > reg: > > > > maxItems: 1 > > > > @@ -60,6 +61,9 @@ properties: > > > > description: Specify the number of delay for tx sampling. > > > > $ref: /schemas/types.yaml#/definitions/uint8 > > > > > > > > + thead,phy-pull-up: > > > > + description: Enable weak pull-up on PHY pads > > > > + type: boolean > > > > > > Why is the weak pull-up required? How would the dts author know if they > > > need to use this property? > > > > This is a good question, and I don't have a good reason beyond it is > > what the vendor SDK was doing. > > > > There are only two boards right now using the TH1520 that I know of. > > Both the LPi4a [1] and the Ahead [2] have the pull-up property set on > > all the mmc controller nodes their downstream device trees. > > > > Rob suggested on #devicetree that it would be simpler to just enable it > > in the driver and disable support when needed. I like this idea as it > > will simplify this binding patch and the code in the driver patch. > It's for the PHY debug. You could directly remove them, or keep it > with no-pull-up flag, then no pull-up flag in the dts for default.. Thank you for explaining that the purpose of the pull-up DT property was for PHY debug. I will plan to remove the pull-up DT property in the next version of this patch series and remove sdhci_phy_1_8v_init_no_pull() and sdhci_phy_3_3v_init_no_pull() from my sdhci-of-dwcmshc.c patch. I will make th1520_phy_1_8v_init() and th1520_phy_3_3v_init() always set WEAKPULL_EN = 1 (PULLUP) for CMDPAD_CNFG, DATAPAD_CNFG, RSTNPAD_CNFG and set WEAKPULL_EN = 2 (PULLDOWN) for STBPAD_CNFG. Thanks, Drew