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 X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 857A4C433B4 for ; Fri, 7 May 2021 03:15:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 589AF613D8 for ; Fri, 7 May 2021 03:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234340AbhEGDQU (ORCPT ); Thu, 6 May 2021 23:16:20 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:34355 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229942AbhEGDQR (ORCPT ); Thu, 6 May 2021 23:16:17 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14731xV2019977; Fri, 7 May 2021 11:01:59 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 May 2021 11:13:50 +0800 Date: Fri, 7 May 2021 11:13:48 +0800 From: Steven Lee To: Rob Herring 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" , Chin-Ting Kuo Subject: Re: [PATCH v3 1/5] dt-bindings: mmc: sdhci-of-aspeed: Add an example for AST2600-A2 EVB Message-ID: <20210507031348.GA23749@aspeedtech.com> References: <20210506100312.1638-1-steven_lee@aspeedtech.com> <20210506100312.1638-2-steven_lee@aspeedtech.com> <20210507011324.GA1119409@robh.at.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20210507011324.GA1119409@robh.at.kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 14731xV2019977 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 05/07/2021 09:13, Rob Herring wrote: > 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. > > It is for passing the dtbs_check of the second example. Without this definition, many device trees have the following error: ['aspeed,ast2600-sdhci', 'sdhci'] is too long Additional items are not allowed ('sdhci' was unexpected) Regardless, I will remove it, and move the new example to device tree. Thanks. > > reg: > > maxItems: 1 > > description: The SDHCI registers > > @@ -104,3 +110,90 @@ examples: > > clocks = <&syscon ASPEED_CLK_SDIO>; > > }; > > }; > > + > > + - | > > Why do we need another example? > The original example is for AST2500 which doesn't support UHS mode. The new example teaches users how to enable sdhci with UHS mode, add gpio regulators, and adjust clock phase for AST2600-A2. I will move the new example to ast2600 device tree per the review comment. https://lkml.org/lkml/2021/5/6/968 > > + #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 > > 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 X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AFCDC433B4 for ; Fri, 7 May 2021 03:15:41 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1016A613D8 for ; Fri, 7 May 2021 03:15:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1016A613D8 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4FbwZ22k1zz2xg5 for ; Fri, 7 May 2021 13:15:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=fail (SPF fail - not authorized) smtp.mailfrom=aspeedtech.com (client-ip=211.20.114.71; helo=twspam01.aspeedtech.com; envelope-from=steven_lee@aspeedtech.com; receiver=) Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4FbwYT4ZCHz2yXQ; Fri, 7 May 2021 13:15:06 +1000 (AEST) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14731xV2019977; Fri, 7 May 2021 11:01:59 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 May 2021 11:13:50 +0800 Date: Fri, 7 May 2021 11:13:48 +0800 From: Steven Lee To: Rob Herring Subject: Re: [PATCH v3 1/5] dt-bindings: mmc: sdhci-of-aspeed: Add an example for AST2600-A2 EVB Message-ID: <20210507031348.GA23749@aspeedtech.com> References: <20210506100312.1638-1-steven_lee@aspeedtech.com> <20210506100312.1638-2-steven_lee@aspeedtech.com> <20210507011324.GA1119409@robh.at.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20210507011324.GA1119409@robh.at.kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 14731xV2019977 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Ulf Hansson , Ryan Chen , "moderated list:ASPEED SD/MMC DRIVER" , Andrew Jeffery , "open list:ASPEED SD/MMC DRIVER" , "moderated list:ASPEED SD/MMC DRIVER" , Ryan Chen , Adrian Hunter , Chin-Ting Kuo , open list , Philipp Zabel , "Hongweiz@ami.com" , "moderated list:ARM/ASPEED MACHINE SUPPORT" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" The 05/07/2021 09:13, Rob Herring wrote: > 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. > > It is for passing the dtbs_check of the second example. Without this definition, many device trees have the following error: ['aspeed,ast2600-sdhci', 'sdhci'] is too long Additional items are not allowed ('sdhci' was unexpected) Regardless, I will remove it, and move the new example to device tree. Thanks. > > reg: > > maxItems: 1 > > description: The SDHCI registers > > @@ -104,3 +110,90 @@ examples: > > clocks = <&syscon ASPEED_CLK_SDIO>; > > }; > > }; > > + > > + - | > > Why do we need another example? > The original example is for AST2500 which doesn't support UHS mode. The new example teaches users how to enable sdhci with UHS mode, add gpio regulators, and adjust clock phase for AST2600-A2. I will move the new example to ast2600 device tree per the review comment. https://lkml.org/lkml/2021/5/6/968 > > + #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 > > 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 X-Spam-Level: X-Spam-Status: No, score=-15.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB21AC433B4 for ; Fri, 7 May 2021 03:16:55 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 55A1161002 for ; Fri, 7 May 2021 03:16:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55A1161002 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:CC:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Xjq/FLwyxdtzudIn9aphWtRlmHh0vkHY5R+y3FUOV9Y=; b=b1ZToyPtoUB+P9Uc455Mvj3GL /AH2RaYLR7cbGt15+sUF4c9YZH8AGnh0kBCU5ivKS++huxwPeena+qf2zXYwOodUBp++qCVn0q8s9 W4hOVqlRe368txLpAgMImqgbeNGspGwCb/AJ0Lnz7ARwv1EEfzEzZEKRr9YFFp4wLjqJgiiRGyQ9X 5lLaA3QibKpxGDuBV/xYrpGFyl2efZmF+rhpEAdrBMGlVV94GbQw+T9THod4XAUu6EPT6YKaR40dd VknFUkFEGGngcgE54GmgjEBSh5cNkPOuuOIF8MuhjjbEl9hlPy0gSw6mXt/95IO/e3t0ZahpT3CNR UgNDhiE3A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leqxG-005x2f-So; Fri, 07 May 2021 03:15:07 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leqxD-005x2W-Bs for linux-arm-kernel@desiato.infradead.org; Fri, 07 May 2021 03:15:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:CC:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0ww/nYxexe6Z5Q317XdRhM8PhLZsA6ZOOTl6SmRV82s=; b=f40+FeX2yZVe8hbIX5LoO3DLmu IlpobNvKBABDeIiTHfzorvfSvBzKKQaIJWzeqDarA6DxeOYdwvklPRHg8y3IjuY22BLvZuJ/QAQ8k cOLdhp+BiRZW/JY5cqDgVs5kGSVtJOU8i4o/dtwesb1gUhLAlhwIhQrsO+3qIdsIeqRS8olHIzJYW EgTOi6xu1YC3u+UNmd7nIlEwZzbVU+0mdGfDpqak9aQQ1o8eEi9M4X44hzH1HQighffZdRtIikK9E kgKRiwmrZ5zuhHTyWUPQNo66qch8j2iPwDW8puMJh74om13CYPxRSVXN9JW5vESdSHZjPw8oygsLf lro62OsQ==; Received: from twspam01.aspeedtech.com ([211.20.114.71]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leqww-002lS5-5J for linux-arm-kernel@lists.infradead.org; Fri, 07 May 2021 03:14:56 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14731xV2019977; Fri, 7 May 2021 11:01:59 +0800 (GMT-8) (envelope-from steven_lee@aspeedtech.com) Received: from aspeedtech.com (192.168.100.253) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 May 2021 11:13:50 +0800 Date: Fri, 7 May 2021 11:13:48 +0800 From: Steven Lee To: Rob Herring 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" , Chin-Ting Kuo Subject: Re: [PATCH v3 1/5] dt-bindings: mmc: sdhci-of-aspeed: Add an example for AST2600-A2 EVB Message-ID: <20210507031348.GA23749@aspeedtech.com> References: <20210506100312.1638-1-steven_lee@aspeedtech.com> <20210506100312.1638-2-steven_lee@aspeedtech.com> <20210507011324.GA1119409@robh.at.kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210507011324.GA1119409@robh.at.kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [192.168.100.253] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 14731xV2019977 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210507_041453_745567_818EC7C6 X-CRM114-Status: GOOD ( 22.67 ) 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 The 05/07/2021 09:13, Rob Herring wrote: > 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. > > It is for passing the dtbs_check of the second example. Without this definition, many device trees have the following error: ['aspeed,ast2600-sdhci', 'sdhci'] is too long Additional items are not allowed ('sdhci' was unexpected) Regardless, I will remove it, and move the new example to device tree. Thanks. > > reg: > > maxItems: 1 > > description: The SDHCI registers > > @@ -104,3 +110,90 @@ examples: > > clocks = <&syscon ASPEED_CLK_SDIO>; > > }; > > }; > > + > > + - | > > Why do we need another example? > The original example is for AST2500 which doesn't support UHS mode. The new example teaches users how to enable sdhci with UHS mode, add gpio regulators, and adjust clock phase for AST2600-A2. I will move the new example to ast2600 device tree per the review comment. https://lkml.org/lkml/2021/5/6/968 > > + #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 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel