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 3C4BBC27C6D for ; Wed, 16 Aug 2023 22:27:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346893AbjHPW0d (ORCPT ); Wed, 16 Aug 2023 18:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346901AbjHPW0S (ORCPT ); Wed, 16 Aug 2023 18:26:18 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2788D269F for ; Wed, 16 Aug 2023 15:26:15 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1bbc87ded50so45409195ad.1 for ; Wed, 16 Aug 2023 15:26:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1692224774; x=1692829574; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=u7uQIIcrOFzc49aqvUkRDZzFxEz4KqT+ICR1+8quc8w=; b=nLsRg3gBX8FVyACCctF8pWA6iGOG69Klww5ee5m0rSCjDQ1YLbML1J9hVFaaA/yc9K gN9B0kRZxzGXG+oIrQ5rA1nGd7nw9fPduPa7qWfDgaCOjGkrRtjnoY0zWtWMnjO5OfuE wrITOm5wFbE09oL+nq29oWN/YMWC9K8uX2wnG/v4lufrI7J/4fdhx5rHfVfy0+MIfrBV kYdgPBB6pyhLfrZsrgkO4wFXcLZKDIrfwa9UeGzJjd1FiwQ78IfmcX0smW7FoLFVRma8 47XJ32lOwHSSKwLlIyrf46dCG7xiLL4bl1FLaFz8N8GyW6pXusCNIP6nrAt+1g8yoJm7 2OHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692224774; x=1692829574; h=in-reply-to: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=u7uQIIcrOFzc49aqvUkRDZzFxEz4KqT+ICR1+8quc8w=; b=lCZpzv2WWj7g7eIss0mTywiBcAMedfJaxFZBiEiIrP9gezueTvFIlticIU8Wk6IUlx V761dIw1XzwCATvaEK9hOoMzx36jAplGHDgZ2hozJS0+guIpNTfJBB0Zo8yzaxdLHExS Wkr2fwS9ls/TMKao155Seh37tR7o+xVT+vfWlJRZe1REVmX+yT+B2omRnV+mQyiswS0P zlNO4fRD01mphfr7xAMkzPGQmz9pi0gxs/FIZ+eynntSJMnAjiRzOxCFZgclSWp9Vf1f ZBqKDyKn5uwy6gidI12ZQCPaz/UZHsS5gTXRLM80gNJrf9iZD/CfVakxx0a4ltLsVWnc 2l1A== X-Gm-Message-State: AOJu0YzgmGuAMiYZPlAOFEdaUUN4IDrNhM/v5FI+VTPldI2NwAjCu2LE 4FCPdITqMnp/6w5StXBR1pqq4A== X-Google-Smtp-Source: AGHT+IGkgRJCXIVVufTd3KRR6mXCo4jmAJTUdqHRVFHuFCpLRjBwYq8DpHYyhSTWPV9UPPmJYCZB9w== X-Received: by 2002:a17:902:d2c7:b0:1b2:5d5b:e871 with SMTP id n7-20020a170902d2c700b001b25d5be871mr3674598plc.59.1692224774508; Wed, 16 Aug 2023 15:26:14 -0700 (PDT) Received: from x1 ([2601:1c2:1800:f680:ad77:24cb:c068:c5e6]) by smtp.gmail.com with ESMTPSA id c13-20020a170902d48d00b001bdcd4b1616sm8966890plg.260.2023.08.16.15.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Aug 2023 15:26:14 -0700 (PDT) Date: Wed, 16 Aug 2023 15:26:12 -0700 From: Drew Fustini To: Krzysztof Kozlowski Cc: Jisheng Zhang , Guo Ren , Fu Wei , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Paul Walmsley , Palmer Dabbelt , Albert Ou , Conor Dooley , Adrian Hunter , Ulf Hansson , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, Robert Nelson , Jason Kridner Subject: Re: [PATCH RFC v2 1/4] dt-bindings: mmc: sdhci-of-dwcmhsc: Add T-Head TH1520 support Message-ID: References: <20230724-th1520-emmc-v2-0-132ed2e2171e@baylibre.com> <20230724-th1520-emmc-v2-1-132ed2e2171e@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Mon, Aug 07, 2023 at 08:29:21AM +0200, Krzysztof Kozlowski wrote: > On 05/08/2023 05:14, Drew Fustini wrote: > > Add compatible value for the T-Head TH1520 dwcmshc controller and > > thead,io-fixed-1v8 and thead,pull-up properties. > > > > Signed-off-by: Drew Fustini > > --- > > Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml > > index a43eb837f8da..57602c345cab 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,14 @@ properties: > > description: Specify the number of delay for tx sampling. > > $ref: /schemas/types.yaml#/definitions/uint8 > > > > + thead,io-fixed-1v8: > > + description: SoC PHY pad is fixed 1.8V > > + type: boolean > > Isn't this duplicating existing properties for MMC modes with 1.8 V? Thank you for reviewing. Yes, now that you mention it, I do see those properties now in mmc-controller.yaml. It seems like the existing mmc-ddr-1_8v property would be appropriate. > > > + > > + thead,pull-up: > > + description: True if pull-up, false if pull-down > > This explains me nothing. No clue what you are pulling and why do you > need it. Pin pulls should be done via pin controller, not MMC. Good point that my description is not helpful. The pull-up property determines whether certain phy registers are written to. I need to try to can get documentation on the phy so that I can better understand the details of the pull-up configuration in the phy registers. > > Anyway you should have here allOf:if:then (move the allOf: from top to > behind "required:") which will disallow these properties for other variants. I noticed that nvidia,tegra20-sdhci.yaml has several lines related to pull-up/down configuration: 218 - if: 219 properties: 220 compatible: 221 contains: 222 const: nvidia,tegra210-sdhci 223 then: 224 properties: 225 pinctrl-names: 226 oneOf: 227 - items: 228 - const: sdmmc-3v3 229 description: pad configuration for 3.3 V 230 - const: sdmmc-1v8 231 description: pad configuration for 1.8 V 232 - const: sdmmc-3v3-drv 233 description: pull-up/down configuration for 3.3 V 234 - const: sdmmc-1v8-drv 235 description: pull-up/down configuration for 1.8 V 236 - items: 237 - const: sdmmc-3v3-drv 238 description: pull-up/down configuration for 3.3 V 239 - const: sdmmc-1v8-drv 240 description: pull-up/down configuration for 1.8 V 241 - items: 242 - const: sdmmc-1v8-drv 243 description: pull-up/down configuration for 1.8 V Do you think creating something like that would be a good approach? Thank you, Drew