From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Lee Date: Tue, 25 May 2021 17:48:16 +0800 Subject: [PATCH v5 0/4] mmc: sdhci-of-aspeed: Support toggling SD bus signal In-Reply-To: References: <20210524073308.9328-1-steven_lee@aspeedtech.com> Message-ID: <20210525094815.GA8757@aspeedtech.com> List-Id: To: linux-aspeed@lists.ozlabs.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit The 05/25/2021 15:55, Joel Stanley wrote: > On Mon, 24 May 2021 at 07:33, Steven Lee wrote: > > > > AST2600-A2 EVB has the reference design for enabling SD bus > > power and toggling SD bus signal voltage between 3.3v and 1.8v by > > GPIO regulators. > > This patch series adds sdhci node and gpio regulators in a new dts file > > for AST2600-A2 EVB. > > The description of the reference design of AST2600-A2 EVB is added > > in the new dts file. > > > > This patch also include a helper for updating AST2600 sdhci capability > > registers. > > The device trees look good: > > Reviewed-by: Joel Stanley > > I've applied patches 1-3 to the aspeed tree for v5.14. I made a little > fix to patch 3 as it needed to add the new device tree to the > makefile. > Thanks! > When I was testing on my A2 EVB I saw this: > > [ 1.436219] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 192 for 9 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > [ 1.450913] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 963 for 45 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > > Do you know what is happening there? > Per MMC spec, eMMC bus speed is set as legacy mode(0~26MHz) at startup of eMMC initializtion flow. Clock phase calculation is triggered in set_clock() and it calculates taps based on phase_deg(<9>, <225>) in the dts file and the current speed(1562500Hz), which causes the warning message you mentioned. As the phase_deg in the dts file should be calculated with 100MHz. https://lkml.org/lkml/2021/5/24/95 But after some initialization flow, eMMC bus speed will be set to correct speed(100MHz). Clock phase calculation will be triggered again to get correct taps. > Cheers, > > Joel 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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 F10C8C4707F for ; Tue, 25 May 2021 09:48:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1CD0613E6 for ; Tue, 25 May 2021 09:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232723AbhEYJuA (ORCPT ); Tue, 25 May 2021 05:50:00 -0400 Received: from twspam01.aspeedtech.com ([211.20.114.71]:48537 "EHLO twspam01.aspeedtech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232705AbhEYJtz (ORCPT ); Tue, 25 May 2021 05:49:55 -0400 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14P9ZLSX049551; Tue, 25 May 2021 17:35:21 +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; Tue, 25 May 2021 17:48:19 +0800 Date: Tue, 25 May 2021 17:48:16 +0800 From: Steven Lee To: Joel Stanley CC: Andrew Jeffery , Rob Herring , "Adrian Hunter" , Ulf Hansson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , linux-mmc , "moderated list:ASPEED SD/MMC DRIVER" , "Hongwei Zhang" , Ryan Chen , Chin-Ting Kuo Subject: Re: [PATCH v5 0/4] mmc: sdhci-of-aspeed: Support toggling SD bus signal Message-ID: <20210525094815.GA8757@aspeedtech.com> References: <20210524073308.9328-1-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: 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 14P9ZLSX049551 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org The 05/25/2021 15:55, Joel Stanley wrote: > On Mon, 24 May 2021 at 07:33, Steven Lee wrote: > > > > AST2600-A2 EVB has the reference design for enabling SD bus > > power and toggling SD bus signal voltage between 3.3v and 1.8v by > > GPIO regulators. > > This patch series adds sdhci node and gpio regulators in a new dts file > > for AST2600-A2 EVB. > > The description of the reference design of AST2600-A2 EVB is added > > in the new dts file. > > > > This patch also include a helper for updating AST2600 sdhci capability > > registers. > > The device trees look good: > > Reviewed-by: Joel Stanley > > I've applied patches 1-3 to the aspeed tree for v5.14. I made a little > fix to patch 3 as it needed to add the new device tree to the > makefile. > Thanks! > When I was testing on my A2 EVB I saw this: > > [ 1.436219] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 192 for 9 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > [ 1.450913] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 963 for 45 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > > Do you know what is happening there? > Per MMC spec, eMMC bus speed is set as legacy mode(0~26MHz) at startup of eMMC initializtion flow. Clock phase calculation is triggered in set_clock() and it calculates taps based on phase_deg(<9>, <225>) in the dts file and the current speed(1562500Hz), which causes the warning message you mentioned. As the phase_deg in the dts file should be calculated with 100MHz. https://lkml.org/lkml/2021/5/24/95 But after some initialization flow, eMMC bus speed will be set to correct speed(100MHz). Clock phase calculation will be triggered again to get correct taps. > Cheers, > > Joel 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=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,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 220E8C2B9F8 for ; Tue, 25 May 2021 09:49:26 +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 4527B613E6 for ; Tue, 25 May 2021 09:49:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4527B613E6 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 4Fq8S35TR8z2yxL for ; Tue, 25 May 2021 19:49:23 +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 4Fq8Rf5w4tz2yYT; Tue, 25 May 2021 19:48:59 +1000 (AEST) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14P9ZLSX049551; Tue, 25 May 2021 17:35:21 +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; Tue, 25 May 2021 17:48:19 +0800 Date: Tue, 25 May 2021 17:48:16 +0800 From: Steven Lee To: Joel Stanley Subject: Re: [PATCH v5 0/4] mmc: sdhci-of-aspeed: Support toggling SD bus signal Message-ID: <20210525094815.GA8757@aspeedtech.com> References: <20210524073308.9328-1-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: 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 14P9ZLSX049551 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:ARM/ASPEED MACHINE SUPPORT" , Andrew Jeffery , "moderated list:ASPEED SD/MMC DRIVER" , linux-mmc , Adrian Hunter , Chin-Ting Kuo , open list , Rob Herring , Hongwei Zhang , "moderated list:ARM/ASPEED MACHINE SUPPORT" Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" The 05/25/2021 15:55, Joel Stanley wrote: > On Mon, 24 May 2021 at 07:33, Steven Lee wrote: > > > > AST2600-A2 EVB has the reference design for enabling SD bus > > power and toggling SD bus signal voltage between 3.3v and 1.8v by > > GPIO regulators. > > This patch series adds sdhci node and gpio regulators in a new dts file > > for AST2600-A2 EVB. > > The description of the reference design of AST2600-A2 EVB is added > > in the new dts file. > > > > This patch also include a helper for updating AST2600 sdhci capability > > registers. > > The device trees look good: > > Reviewed-by: Joel Stanley > > I've applied patches 1-3 to the aspeed tree for v5.14. I made a little > fix to patch 3 as it needed to add the new device tree to the > makefile. > Thanks! > When I was testing on my A2 EVB I saw this: > > [ 1.436219] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 192 for 9 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > [ 1.450913] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 963 for 45 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > > Do you know what is happening there? > Per MMC spec, eMMC bus speed is set as legacy mode(0~26MHz) at startup of eMMC initializtion flow. Clock phase calculation is triggered in set_clock() and it calculates taps based on phase_deg(<9>, <225>) in the dts file and the current speed(1562500Hz), which causes the warning message you mentioned. As the phase_deg in the dts file should be calculated with 100MHz. https://lkml.org/lkml/2021/5/24/95 But after some initialization flow, eMMC bus speed will be set to correct speed(100MHz). Clock phase calculation will be triggered again to get correct taps. > Cheers, > > Joel 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=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 08D41C4707F for ; Tue, 25 May 2021 09:51:15 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C3A3C613E6 for ; Tue, 25 May 2021 09:51:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3A3C613E6 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=bombadil.20210309; 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=odE2f5uCT8vBZ+2RH4oFEtwMvdKCreCv211fCRwlc2U=; b=M4P/k7mNrKilqA kuFpd4yhhUOfiKG7kZlYMxkOEvnDmeaydjFUK//dKGxKw/Uhqc58Iw4iYGOvpfxq2IK6N0a29zvQt NQL98m4LbwBvAfXGUeAQrjQKD3EFus+aHKUguUUdcr2E0T382QV3lED0Q+5G3YbQjD3dkyN5dQybZ upnAJDwF8qoj0apSj4ZuiV26a5WirHPU6MIU/jaMSQee+UT7/z2+eRGwXYK+6iNR0nEKOyMDqrmKY CsiBFR1Zd56E2XzMub0GUdZgLW/PF12AoxU8NW3K9FA6vSmh1fDSMqXRYHteLa4UKEtAJBmxrCOHk EpfLgg2a0YqNS01Wgwng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llTgH-004RnE-1r; Tue, 25 May 2021 09:48:57 +0000 Received: from twspam01.aspeedtech.com ([211.20.114.71]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llTgC-004RmC-8s for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 09:48:54 +0000 Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 14P9ZLSX049551; Tue, 25 May 2021 17:35:21 +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; Tue, 25 May 2021 17:48:19 +0800 Date: Tue, 25 May 2021 17:48:16 +0800 From: Steven Lee To: Joel Stanley CC: Andrew Jeffery , Rob Herring , "Adrian Hunter" , Ulf Hansson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , "moderated list:ARM/ASPEED MACHINE SUPPORT" , open list , linux-mmc , "moderated list:ASPEED SD/MMC DRIVER" , "Hongwei Zhang" , Ryan Chen , Chin-Ting Kuo Subject: Re: [PATCH v5 0/4] mmc: sdhci-of-aspeed: Support toggling SD bus signal Message-ID: <20210525094815.GA8757@aspeedtech.com> References: <20210524073308.9328-1-steven_lee@aspeedtech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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 14P9ZLSX049551 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210525_024852_610233_38452B43 X-CRM114-Status: GOOD ( 21.60 ) 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/25/2021 15:55, Joel Stanley wrote: > On Mon, 24 May 2021 at 07:33, Steven Lee wrote: > > > > AST2600-A2 EVB has the reference design for enabling SD bus > > power and toggling SD bus signal voltage between 3.3v and 1.8v by > > GPIO regulators. > > This patch series adds sdhci node and gpio regulators in a new dts file > > for AST2600-A2 EVB. > > The description of the reference design of AST2600-A2 EVB is added > > in the new dts file. > > > > This patch also include a helper for updating AST2600 sdhci capability > > registers. > > The device trees look good: > > Reviewed-by: Joel Stanley > > I've applied patches 1-3 to the aspeed tree for v5.14. I made a little > fix to patch 3 as it needed to add the new device tree to the > makefile. > Thanks! > When I was testing on my A2 EVB I saw this: > > [ 1.436219] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 192 for 9 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > [ 1.450913] sdhci-aspeed 1e750100.sdhci: Requested out of range > phase tap 963 for 45 degrees of phase compensation at 1562500Hz, > clamping to tap 15 > > Do you know what is happening there? > Per MMC spec, eMMC bus speed is set as legacy mode(0~26MHz) at startup of eMMC initializtion flow. Clock phase calculation is triggered in set_clock() and it calculates taps based on phase_deg(<9>, <225>) in the dts file and the current speed(1562500Hz), which causes the warning message you mentioned. As the phase_deg in the dts file should be calculated with 100MHz. https://lkml.org/lkml/2021/5/24/95 But after some initialization flow, eMMC bus speed will be set to correct speed(100MHz). Clock phase calculation will be triggered again to get correct taps. > Cheers, > > Joel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel