[{"id":1767286,"web_url":"http://patchwork.ozlabs.org/comment/1767286/","msgid":"<4df1bb54-5fa1-5089-7d96-799ccfc78fce@synopsys.com>","list_archive_url":null,"date":"2017-09-12T18:38:23","subject":"Re: [PATCH] ARC: [plat-axs10x]: DTS: fix sdio ciu frequency","submitter":{"id":26707,"url":"http://patchwork.ozlabs.org/api/people/26707/","name":"Vineet Gupta","email":"Vineet.Gupta1@synopsys.com"},"content":"On 09/12/2017 11:20 AM, Eugeniy Paltsev wrote:\n> DW sdio controller has external ciu clock divider controlled\n> via register in SDIO IP. It divides sdio_ref_clk\n> (which comes from CGU) by 16 for default. So default mmcclk\n> clock (which comes to sdk_in) is 25000000 Hz.\n>\n> So fix wrong current value (50000000 Hz) to actual 25000000 Hz.\n\nIs this a preventive fix or there are known issues with what we have today.\nIs this triggered after addition of AXS clk driver ?\n\n>\n> Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>\n> ---\n>   arch/arc/boot/dts/axs10x_mb.dtsi | 9 ++++++++-\n>   1 file changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi\n> index 0ff7e07..7bdf581 100644\n> --- a/arch/arc/boot/dts/axs10x_mb.dtsi\n> +++ b/arch/arc/boot/dts/axs10x_mb.dtsi\n> @@ -44,7 +44,14 @@\n>   \n>   \t\t\tmmcclk: mmcclk {\n>   \t\t\t\tcompatible = \"fixed-clock\";\n> -\t\t\t\tclock-frequency = <50000000>;\n> +\t\t\t\t/*\n> +\t\t\t\t * DW sdio controller has external ciu clock divider\n> +\t\t\t\t * controlled via register in SDIO IP. It divides\n> +\t\t\t\t * sdio_ref_clk (which comes from CGU) by 16 for\n> +\t\t\t\t * default. So default mmcclk clock (which comes\n> +\t\t\t\t * to sdk_in) is 25000000 Hz.\n> +\t\t\t\t */\n> +\t\t\t\tclock-frequency = <25000000>;\n>   \t\t\t\t#clock-cells = <0>;\n>   \t\t\t};\n>","headers":{"Return-Path":"<linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"B1jz/ZbP\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsD8f390Sz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 04:38:58 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drq5J-0005lH-1A; Tue, 12 Sep 2017 18:38:57 +0000","from smtprelay2.synopsys.com ([198.182.60.111]\n\thelo=smtprelay.synopsys.com)\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1drq5F-0005i9-VY for linux-snps-arc@lists.infradead.org;\n\tTue, 12 Sep 2017 18:38:55 +0000","from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66])\n\tby smtprelay.synopsys.com (Postfix) with ESMTP id 01D5C10C0E89;\n\tTue, 12 Sep 2017 11:38:31 -0700 (PDT)","from mailhost.synopsys.com (localhost [127.0.0.1])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id E1822CEA;\n\tTue, 12 Sep 2017 11:38:31 -0700 (PDT)","from US01WEHTC2.internal.synopsys.com\n\t(us01wehtc2.internal.synopsys.com [10.12.239.237])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 7C083CE5;\n\tTue, 12 Sep 2017 11:38:31 -0700 (PDT)","from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by\n\tUS01WEHTC2.internal.synopsys.com (10.12.239.237) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Tue, 12 Sep 2017 11:38:31 -0700","from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by\n\tIN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Wed, 13 Sep 2017 00:08:28 +0530","from [10.10.161.108] (10.10.161.108) by\n\tIN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP\n\tServer (TLS) id 14.3.266.1; Wed, 13 Sep 2017 00:08:28 +0530"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type:\n\tContent-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive:\n\tList-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From:\n\tReferences:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date:\n\tResent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=me107rcfe3ZAtpF9lqPEDR2PplMELfYyf5A3XI28L/8=;\n\tb=B1jz/ZbPx/cIOgfOkzY8lv8d0\n\tYw6JGZzwyvX9/2//Z7jZ485jxxJVlS8jMTFGUHgSNN6dOsNqBminBlI5+NXgj4YxS4xXzaoNuQG6b\n\tGyYMYn56Zq0ntTvktDyC7OZidZ7fLV8mjsb4xnz2Dg3MK0Fzam3Suj8nqVt6riGYOp73m9NiorIEz\n\t5mq1lJEtawBrkMKH5uVfqs38C7bHA/BJHsvB79dEDveM77DDpC4GkLj8eAbpHhZZH/eBPdjLWurgt\n\tdf7j4oZy9RF1gM91lIK0iLEX3FpvC7OK2MUF21bFMnnFB6opReN2kR1bK88qxK2uvaY8LaRd9wI2w\n\twK2lscSeg==;","Subject":"Re: [PATCH] ARC: [plat-axs10x]: DTS: fix sdio ciu frequency","To":"Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,\n\t\"linux-snps-arc@lists.infradead.org\" <linux-snps-arc@lists.infradead.org>","References":"<20170912182045.20941-1-Eugeniy.Paltsev@synopsys.com>","From":"Vineet Gupta <Vineet.Gupta1@synopsys.com>","Message-ID":"<4df1bb54-5fa1-5089-7d96-799ccfc78fce@synopsys.com>","Date":"Tue, 12 Sep 2017 11:38:23 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170912182045.20941-1-Eugeniy.Paltsev@synopsys.com>","Content-Language":"en-US","X-Originating-IP":"[10.10.161.108]","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170912_113854_035596_629F6F8C ","X-CRM114-Status":"GOOD (  10.58  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [198.182.60.111 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-snps-arc@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux on Synopsys ARC Processors\n\t<linux-snps-arc.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-snps-arc/>","List-Post":"<mailto:linux-snps-arc@lists.infradead.org>","List-Help":"<mailto:linux-snps-arc-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>","Cc":"\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tAlexey  Brodkin <Alexey.Brodkin@synopsys.com>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>,\n\tRob Herring <robh+dt@kernel.org>","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Sender":"\"linux-snps-arc\" <linux-snps-arc-bounces@lists.infradead.org>","Errors-To":"linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}},{"id":1767963,"web_url":"http://patchwork.ozlabs.org/comment/1767963/","msgid":"<1505315684.30546.32.camel@synopsys.com>","list_archive_url":null,"date":"2017-09-13T15:14:45","subject":"Re: [PATCH] ARC: [plat-axs10x]: DTS: fix sdio ciu frequency","submitter":{"id":69220,"url":"http://patchwork.ozlabs.org/api/people/69220/","name":"Eugeniy Paltsev","email":"Eugeniy.Paltsev@synopsys.com"},"content":"On Tue, 2017-09-12 at 11:38 -0700, Vineet Gupta wrote:\r\n> On 09/12/2017 11:20 AM, Eugeniy Paltsev wrote:\r\n> > DW sdio controller has external ciu clock divider controlled\r\n> > via register in SDIO IP. It divides sdio_ref_clk\r\n> > (which comes from CGU) by 16 for default. So default mmcclk\r\n> > clock (which comes to sdk_in) is 25000000 Hz.\r\n> > \r\n> > So fix wrong current value (50000000 Hz) to actual 25000000 Hz.\r\n> \r\n> Is this a preventive fix or there are known issues with what we have today.\r\n\r\nYes, it's kinda a preventive fix.\r\nWe check axs10x ciu frequency when we found what hsdk ciu frequency was wrong\r\nand found that it is wring too.\r\n\r\nI tried to run SD stress test with wrong ciu frequency (50000000 Hz) and it passed\r\nsuccessfully, but we must take into account the fact that it depends on SD\r\ncard itself. For example: this SD card mostly works fine on HSDK with ciu \r\nfrequency 8x times higher than expected!\r\n\r\nAlexey says that he faced with unstable SD card work on axs103 earlier but\r\nhe didn't save any artifacts about it.\r\n\r\n> Is this triggered after addition of AXS clk driver ?\r\nNo.\r\n\r\n> > \r\n> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>\r\n> > ---\r\n> >   arch/arc/boot/dts/axs10x_mb.dtsi | 9 ++++++++-\r\n> >   1 file changed, 8 insertions(+), 1 deletion(-)\r\n> > \r\n> > diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi\r\n> > index 0ff7e07..7bdf581 100644\r\n> > --- a/arch/arc/boot/dts/axs10x_mb.dtsi\r\n> > +++ b/arch/arc/boot/dts/axs10x_mb.dtsi\r\n> > @@ -44,7 +44,14 @@\r\n> >   \r\n> >   \t\t\tmmcclk: mmcclk {\r\n> >   \t\t\t\tcompatible = \"fixed-clock\";\r\n> > -\t\t\t\tclock-frequency = <50000000>;\r\n> > +\t\t\t\t/*\r\n> > +\t\t\t\t * DW sdio controller has external ciu clock divider\r\n> > +\t\t\t\t * controlled via register in SDIO IP. It divides\r\n> > +\t\t\t\t * sdio_ref_clk (which comes from CGU) by 16 for\r\n> > +\t\t\t\t * default. So default mmcclk clock (which comes\r\n> > +\t\t\t\t * to sdk_in) is 25000000 Hz.\r\n> > +\t\t\t\t */\r\n> > +\t\t\t\tclock-frequency = <25000000>;\r\n> >   \t\t\t\t#clock-cells = <0>;\r\n> >   \t\t\t};\r\n> >   \r\n> \r\n> \r\n-- \r\n Eugeniy Paltsev","headers":{"Return-Path":"<linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org; spf=none (mailfrom)\n\tsmtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133;\n\thelo=bombadil.infradead.org;\n\tenvelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"bpoLWkNo\"; \n\tdkim-atps=neutral"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xslb83G5Zz9s06\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 01:15:16 +1000 (AEST)","from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1ds9Ni-0007VB-RS; Wed, 13 Sep 2017 15:15:14 +0000","from smtprelay.synopsys.com ([198.182.60.111])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1ds9Nf-0006EK-2B for linux-snps-arc@lists.infradead.org;\n\tWed, 13 Sep 2017 15:15:13 +0000","from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238])\n\tby smtprelay.synopsys.com (Postfix) with ESMTP id 287D410C0466;\n\tWed, 13 Sep 2017 08:14:49 -0700 (PDT)","from mailhost.synopsys.com (localhost [127.0.0.1])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id 05D3323D;\n\tWed, 13 Sep 2017 08:14:49 -0700 (PDT)","from US01WXQAHTC1.internal.synopsys.com\n\t(us01wxqahtc1.internal.synopsys.com [10.12.238.230])\n\tby mailhost.synopsys.com (Postfix) with ESMTP id E517223C;\n\tWed, 13 Sep 2017 08:14:48 -0700 (PDT)","from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by\n\tUS01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft\n\tSMTP Server (TLS) id 14.3.266.1; Wed, 13 Sep 2017 08:14:48 -0700","from DE02WEMBXB.internal.synopsys.com ([fe80::95ce:118a:8321:a099])\n\tby DE02WEHTCA.internal.synopsys.com ([::1]) with mapi id\n\t14.03.0266.001; Wed, 13 Sep 2017 17:14:45 +0200"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To:\n\tReferences:Message-ID:Date:Subject:To:From:Reply-To:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=PwIMi37xFuHe1+GnZHYJCVLIBH5gxu+Bx5fXVOef5X8=;\n\tb=bpoLWkNoswKfVR\n\t9yRFkqmx4jbq54R9SHInxE7SnJTGrpFTDMmNBnm5ZCI9Fzyzfn/ngEDFSGblXhhN8RZ4zTpVZuQKO\n\tSIHuBId/L6QRb0cvZL9Gefh2kApyCw1SKYLmHhe5eMFz+ni3cCLMNEIKHPAdkHBoPsq42uY5+G9w1\n\te83aWgqTU/7VE9dRHZjl+l02oeXlPjdZ2RV3xHVJPI5dHV4mNhA4Q/bYtb4H0rtWks6APIu5pJTEU\n\thHb4T6O7CZfvOkbEFeWXfNWJ3j05ZQC846RfXTkSeUw3jZMD478H2Gsb854dfOgq22585LHHMwN03\n\tJxqtyR3WFRuUHqnuXx2Q==;","From":"Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>","To":"Vineet Gupta <Vineet.Gupta1@synopsys.com>,\n\t\"linux-snps-arc@lists.infradead.org\" <linux-snps-arc@lists.infradead.org>","Subject":"Re: [PATCH] ARC: [plat-axs10x]: DTS: fix sdio ciu frequency","Thread-Topic":"[PATCH] ARC: [plat-axs10x]: DTS: fix sdio ciu frequency","Thread-Index":"AQHTK/PecVhJ+i4KvUWRAQRulGl0NKKxczGAgAFZbwA=","Date":"Wed, 13 Sep 2017 15:14:45 +0000","Message-ID":"<1505315684.30546.32.camel@synopsys.com>","References":"<20170912182045.20941-1-Eugeniy.Paltsev@synopsys.com>\n\t<4df1bb54-5fa1-5089-7d96-799ccfc78fce@synopsys.com>","In-Reply-To":"<4df1bb54-5fa1-5089-7d96-799ccfc78fce@synopsys.com>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.121.8.106]","Content-ID":"<FED833E94A97B6449297767EABCD2C61@internal.synopsys.com>","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20170913_081511_156961_7ED7B0BA ","X-CRM114-Status":"GOOD (  12.99  )","X-Spam-Score":"-1.9 (-)","X-Spam-Report":"SpamAssassin version 3.4.1 on bombadil.infradead.org summary:\n\tContent analysis details:   (-1.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/,\n\tno trust [198.182.60.111 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]","X-BeenThere":"linux-snps-arc@lists.infradead.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"Linux on Synopsys ARC Processors\n\t<linux-snps-arc.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-snps-arc/>","List-Post":"<mailto:linux-snps-arc@lists.infradead.org>","List-Help":"<mailto:linux-snps-arc-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-snps-arc>, \n\t<mailto:linux-snps-arc-request@lists.infradead.org?subject=subscribe>","Cc":"\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tAlexey  Brodkin <Alexey.Brodkin@synopsys.com>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>,\n\t\"robh+dt@kernel.org\" <robh+dt@kernel.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"\"linux-snps-arc\" <linux-snps-arc-bounces@lists.infradead.org>","Errors-To":"linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}}]