Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp127825pxy; Thu, 6 May 2021 22:42:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwteiQGEWgzJaQVFJOSPGW+NM8Y11ebOJIygdHlde/z0nyQPZ30Ux8qlmldkU1Y6ntU+YY4 X-Received: by 2002:a63:dc57:: with SMTP id f23mr7863354pgj.294.1620366141620; Thu, 06 May 2021 22:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620366141; cv=none; d=google.com; s=arc-20160816; b=aLdr9UFgBzbsjvUfOmaWQMJPiayzSa84O3Uf7oSzuobXNHMZ8JzEOy2hvtorpD4C73 z1OBqeZ7sFACPmqCzbDXAVOXXna1eWNrleqiKfFMPtyfAxLSqkwHmaV0+4ZDy/IaXHpL a2QVLWA0/DBMCFlNVCFH2CiZtudDdSBbAQErHxPpa0aKFXDtfTXqCPNEmvV317FuWUdf G6jbZQIrmiy3DoJO36P9JzFRdjEwcmxZ1WWpgz0VHvxuurYA4qHnA2J1mh18MXgolbKQ A653RxFheYCrRqnVmV1bCOrk76rWKW9/WAHZVbSPrTfoWxQnVBDHGCgv3hzXQP6xAU1f 9nSg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=6+SbgXWxY1gSEdIUiXJS8BiZpv/UGkcHHXtFb/TCI+A=; b=s7Z0RC/1ibGUEJdPng3TIF+rHUZ27+Zc2pR30ybcofxDTquP5QOW9/ilFRFgtkeXm4 22Qjt8ZNq0+QkG5R22WwSWRZhrG9fonH89RUcxSsNCu7k7hAvj58L9hya6jkor2xeCeg QCcxOgXbGW5+/p+CDOh8wt899aKg8W2bpEmViSVS4vKU3gheQnoN1lxVjnx82+E9/ebU OF0WwgXp+odfzNvsi7AsrLRQcnGpPf+0oLby0Wq964vfRWmrp9UHIkfESLaduPAb+8dw wTWRU/iQHQFhOs+XpoHUM5P5Z0CioR65kv+s8vHEdBSOv9n11GYNKhYFuWztv2RXkNm9 NJnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a11si5762294pgq.140.2021.05.06.22.41.54; Thu, 06 May 2021 22:42:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232800AbhEGBO0 (ORCPT + 99 others); Thu, 6 May 2021 21:14:26 -0400 Received: from mail-ot1-f47.google.com ([209.85.210.47]:44927 "EHLO mail-ot1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230387AbhEGBOZ (ORCPT ); Thu, 6 May 2021 21:14:25 -0400 Received: by mail-ot1-f47.google.com with SMTP id r26-20020a056830121ab02902a5ff1c9b81so6596187otp.11; Thu, 06 May 2021 18:13:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6+SbgXWxY1gSEdIUiXJS8BiZpv/UGkcHHXtFb/TCI+A=; b=kBa7ed397SfmCauDMj0NKPmi9RHt/xwlC23yWBGAcM1aHOl4eWS4ARMxQPZBjfSNc3 tU6AUXF7Nl+1FFalOJ+LgBv4a1DIngE5HKugOvgZAWOpesiAla1fCkW8ZWx+Fh8czELX GYmnYkglhKXyMToAx2krqr1GFUCRY56eUf+rnBtXYqBUSxAdi64bNDgrmLqZVEE8NAOr ZoGCekc+uL+DBRSfNFvEIow+rYt8hi9OdER5++23M4PabvtavNMoI1+MDyszvXD3KsHv GC2Qntbv+llth2Ax6UpkTDGBrMgLSM/xpNaQJAK3QizdiQ28nhneNUitt/B7QaYf2w/k JFHA== X-Gm-Message-State: AOAM533jsrJyhyY3NVPV+fIY66Jjqm5KDk1ONbqopVsFrs9DdP6YZKlC +s2mB0PTJhsvv5QqeGlHPSKBK/ph8w== X-Received: by 2002:a9d:5f0c:: with SMTP id f12mr6055681oti.258.1620350006471; Thu, 06 May 2021 18:13:26 -0700 (PDT) Received: from robh.at.kernel.org (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id v19sm920949otq.35.2021.05.06.18.13.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 18:13:25 -0700 (PDT) Received: (nullmailer pid 1125071 invoked by uid 1000); Fri, 07 May 2021 01:13:24 -0000 Date: Thu, 6 May 2021 20:13:24 -0500 From: Rob Herring To: Steven Lee Cc: Andrew Jeffery , Ulf Hansson , Joel Stanley , Adrian Hunter , Philipp Zabel , Ryan Chen , "moderated list:ASPEED SD/MMC DRIVER" , "moderated list:ASPEED SD/MMC DRIVER" , "open list:ASPEED SD/MMC DRIVER" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , Hongweiz@ami.com, ryan_chen@aspeedtech.com, chin-ting_kuo@aspeedtech.com Subject: Re: [PATCH v3 1/5] dt-bindings: mmc: sdhci-of-aspeed: Add an example for AST2600-A2 EVB Message-ID: <20210507011324.GA1119409@robh.at.kernel.org> References: <20210506100312.1638-1-steven_lee@aspeedtech.com> <20210506100312.1638-2-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210506100312.1638-2-steven_lee@aspeedtech.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 06, 2021 at 06:03:08PM +0800, Steven Lee wrote: > AST2600-A2 EVB has the reference design for enabling SD bus > power and toggling SD bus signal voltage by GPIO pins. > > In the reference design, GPIOV0 of AST2600-A2 EVB is connected to > power load switch that providing 3.3v to SD1 bus vdd. GPIOV1 is > connected to a 1.8v and a 3.3v power load switch that providing > signal voltage to > SD1 bus. > > If GPIOV0 is active high, SD1 bus is enabled. Otherwise, SD1 bus is > disabled. > If GPIOV1 is active high, 3.3v power load switch is enabled, SD1 > signal voltage is 3.3v. Otherwise, 1.8v power load switch will be > enabled, SD1 signal voltage becomes 1.8v. > > AST2600-A2 EVB also support toggling signal voltage for SD2 bus. > The design is the same as SD1 bus. It uses GPIOV2 as power-gpio and > GPIOV3 as power-switch-gpio. > > Signed-off-by: Steven Lee > --- > .../devicetree/bindings/mmc/aspeed,sdhci.yaml | 101 +++++++++++++++++- > 1 file changed, 97 insertions(+), 4 deletions(-) > > diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > index 987b287f3bff..de7e61b3d37a 100644 > --- a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml > @@ -45,10 +45,16 @@ patternProperties: > > properties: > compatible: > - enum: > - - aspeed,ast2400-sdhci > - - aspeed,ast2500-sdhci > - - aspeed,ast2600-sdhci > + oneOf: > + - items: > + - enum: > + - aspeed,ast2400-sdhci > + - aspeed,ast2500-sdhci > + - aspeed,ast2600-sdhci > + - items: > + - enum: > + - aspeed,ast2600-sdhci > + - const: sdhci Why are you adding 'sdhci'. That's not useful as a compatible given how many quirks different implementations have. > reg: > maxItems: 1 > description: The SDHCI registers > @@ -104,3 +110,90 @@ examples: > clocks = <&syscon ASPEED_CLK_SDIO>; > }; > }; > + > + - | Why do we need another example? > + #include > + #include > + #include > + #include > + vcc_sdhci0: regulator-vcc-sdhci0 { > + compatible = "regulator-fixed"; > + regulator-name = "SDHCI0 Vcc"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpios = <&gpio0 168 > + GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > + > + vccq_sdhci0: regulator-vccq-sdhci0 { > + compatible = "regulator-gpio"; > + > + regulator-name = "SDHCI0 VccQ"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + gpios = <&gpio0 169 > + GPIO_ACTIVE_HIGH>; > + gpios-states = <1>; > + states = <3300000 1>, > + <1800000 0>; > + }; > + > + vcc_sdhci1: regulator-vcc-sdhci1 { > + compatible = "regulator-fixed"; > + > + regulator-name = "SDHCI1 Vcc"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpios = <&gpio0 170 > + GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > + > + vccq_sdhci1: regulator-vccq-sdhci1 { > + compatible = "regulator-gpio"; > + > + regulator-name = "SDHCI1 VccQ"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + gpios = <&gpio0 171 > + GPIO_ACTIVE_HIGH>; > + gpios-states = <1>; > + states = <3300000 1>, > + <1800000 0>; > + }; > + > + sdc@1e740000 { > + compatible = "aspeed,ast2600-sd-controller"; > + reg = <0x1e740000 0x100>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x1e740000 0x20000>; > + clocks = <&syscon ASPEED_CLK_GATE_SDCLK>; > + > + sdhci@1e740100 { > + compatible = "aspeed,ast2600-sdhci","sdhci"; > + reg = <0x100 0x100>; > + interrupts = ; > + sdhci,auto-cmd12; > + clocks = <&syscon ASPEED_CLK_SDIO>; > + vmmc-supply = <&vcc_sdhci0>; > + vqmmc-supply = <&vccq_sdhci0>; > + sd-uhs-sdr104; > + clk-phase-uhs-sdr104 = <180>, <180>; > + }; > + > + sdhci@1e740200 { > + compatible = "aspeed,ast2600-sdhci","sdhci"; > + reg = <0x200 0x100>; > + interrupts = ; > + sdhci,auto-cmd12; > + clocks = <&syscon ASPEED_CLK_SDIO>; > + vmmc-supply = <&vcc_sdhci1>; > + vqmmc-supply = <&vccq_sdhci1>; > + sd-uhs-sdr104; > + clk-phase-uhs-sdr104 = <0>, <0>; > + }; > + }; > + > +... > -- > 2.17.1 >