Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3564924ybl; Sun, 15 Dec 2019 12:46:26 -0800 (PST) X-Google-Smtp-Source: APXvYqyQoUVbDGMQZLx9ruyOV5UVk3AUW4Ygpcyjjrdd5LJtJz0nMA3H/Gt+3l8H038SfFsqpUg2 X-Received: by 2002:a9d:6206:: with SMTP id g6mr27499568otj.51.1576442786861; Sun, 15 Dec 2019 12:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576442786; cv=none; d=google.com; s=arc-20160816; b=VROcQilsNtvgze8RNv5deWKzGrJ4235RM6gPU0zFStsMWoCwqou2yrujb5Lt7IZg5H sMTV4rO7L+gYnI/N/36U4pNf687fwf55q0o+2OOFapcSp4GYl8pJ4uaP5sdKDdfDUCBQ Vu15WAWvehzEk94nSEi14llLrgef6C9qsYVZtxSYSS5+jstO3MjMyT9QnrsODMvyec/w F9n8+8cR2yekIA14mQ+7N4OvRTvWcgXKA8/6A82/Re3LIQvUcHPPg6sdL3P74wF3GywP RoS0bkDtMBbeqsBPBfxY91ssLL4+Pd1DwQtF9nnB0Li6a43RYvjomj/KRQEBX6Y3IzzB Gnjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=zt9xL93I8MsKs6Socqd2NmMVjNPgCRRv4tjGDgdBCSw=; b=CLsiydKROf25kPUtDdDSl1C11RSvsIFgeX/HliECn4bmDRxpbVBr0/qERCmXA/lfsP 8fgWPI0OJgtE2vhk+wn47UBzpVar3cPY12q9TljM5GJCGG31/9lPSj1+/r1L3/6wAcKr mlPmr5p2laGNyIgbvLYUAQ4slGYeqLDwUHpASTxzugWVUWoyTALXtvR6jdTMdJnjM7wx U5hzR46MQ2CL1py0RqW3gsM/fkNGiaFvBzpvnxtphbGTiE3uSIeJN8JpRcYZqBnq6vip VsOMMr3qYVmAsdo3sW4Yx0KXDJ5A8S+GxG0UkR34sr/e7Oybf1k6FTUW85Bgs1GDxtex PtlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=IQ2bT4OF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t84si9252671oif.115.2019.12.15.12.46.14; Sun, 15 Dec 2019 12:46:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@googlemail.com header.s=20161025 header.b=IQ2bT4OF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726373AbfLOUoc (ORCPT + 99 others); Sun, 15 Dec 2019 15:44:32 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:40201 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726146AbfLOUoc (ORCPT ); Sun, 15 Dec 2019 15:44:32 -0500 Received: by mail-ot1-f66.google.com with SMTP id i15so6273647oto.7; Sun, 15 Dec 2019 12:44:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zt9xL93I8MsKs6Socqd2NmMVjNPgCRRv4tjGDgdBCSw=; b=IQ2bT4OFZQWWliGC6Q+V6Kf26jnuzpQACPXwyY6cwPMUJe0lD7BDA0rJLHRc9AXQ+7 nUEzp1ASKVPv7h6zeGDoll31LQwdkrQtAcIN2+6nx5WZny6yhUJOnqiwFNTkut6yFTA1 kMeckmsoC3tLNdBKledAnfZnx8cHXghd3aBmZLI7ZhyyT7sXyrt14wocHkFxe9A4kW/J SThbE0Mx/WoCntEioF+6KZz/gHL1umZFXDjGJA0WjPEcfmhgXl2Jo3YntsteRQfjRX/4 ZPaNmW+HeQ2+x76oRGia3CS2jcc7ASMO27s5yHqdVri5kjws8+FioaxM5SYJmTl3k36V MjAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zt9xL93I8MsKs6Socqd2NmMVjNPgCRRv4tjGDgdBCSw=; b=YsOZ8p23FujVJpt6g83z7C+/UmbsFuZj4MjSEb5jmPLv67I0g5zjYH+xPvRe73Hq0a Xz2VKS90KDsl0Sa2dI2BpHgTjEN9THK1f+A2dzOUOwFgKLt8mTQ7VkPECbl6jneGOyxD drj9leeoFi68jb96Zlr1f5swARTu4dmpTSvP/tytgEHrH0BGLyYdcANujRda5bD/oCkW xgHwYqLSa9JomxLbzNviN1CTbV4iMhlErCkPlpzXFfVVfoXdEAsxm4m7vIxn4KUO7aH3 WpYU/BSTOCscxppv1VEL8nLpjqL6Ll+jb2hqif37+fKyiBhbxMLwcdiWg2D37wBDWUT0 Ab1w== X-Gm-Message-State: APjAAAW2KGwmOhvKtzvONpv0fh/der++C5hn889UjuIcguyB9v5R523P Z+Mcxbi7LGI065mvDmiYdn0xY8IhonhdqH2CsCU= X-Received: by 2002:a9d:6a4c:: with SMTP id h12mr28669493otn.81.1576442671149; Sun, 15 Dec 2019 12:44:31 -0800 (PST) MIME-Version: 1.0 References: <20191208210320.15539-1-repk@triplefau.lt> <1jpngxew6l.fsf@starbuckisacylon.baylibre.com> <20191215113634.GB7304@voidbox> In-Reply-To: <20191215113634.GB7304@voidbox> From: Martin Blumenstingl Date: Sun, 15 Dec 2019 21:44:20 +0100 Message-ID: Subject: Re: [PATCH 0/2] PCI: amlogic: Make PCIe working reliably on AXG platforms To: Remi Pommarel Cc: Jerome Brunet , Lorenzo Pieralisi , Neil Armstrong , Stephen Boyd , Kevin Hilman , Michael Turquette , linux-kernel@vger.kernel.org, Yue Wang , linux-pci@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, jianxin.pan@amlogic.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Remi, On Sun, Dec 15, 2019 at 12:28 PM Remi Pommarel wrote: > > On Mon, Dec 09, 2019 at 09:32:18AM +0100, Jerome Brunet wrote: > > > > On Sun 08 Dec 2019 at 22:03, Remi Pommarel wrote: > > > > > PCIe device probing failures have been seen on some AXG platforms and were > > > due to unreliable clock signal output. Setting HHI_MIPI_CNTL0[26] bit > > > solved the problem. After being contacted about this, vendor reported that > > > this bit was linked to PCIe PLL CML output. > > > > Thanks for reporting the problem. > > > > As Martin pointed out, the CML outputs already exist in the AXG clock > > controller but are handled using HHI_PCIE_PLL_CNTL6. Although > > incomplete, it seems to be aligned with the datasheet I have (v0.9) > > > > According to the same document, HHI_MIPI_CNTL0 belong to the MIPI Phy. > > Unfortunately bit 26 is not documented > > > > AFAICT, the clock controller is not appropriate driver to deal with this > > register/bit > > > > Regarding both @Martin's and your remark. > > Unfortunately the documentation I have and vendor feedback are a bit > vague to me. I do agree that CLKID_PCIE_PLL_CML_ENABLE is not a proper > name for this bit because this register is MIPI related. > > Here is the information I got from the vendor [1]. As you can see > HHI_MIPI_CNTL0[29] and HHI_MIPI_CNTL0[26] are related together, and > HHI_MIPI_CNTL0[29] is implemented in the clock controller as > axg_mipi_enable which is why I used this driver for HHI_MIPI_CNTL0[26]. I agree, the details you got so far are unfortunately pretty vague (with my knowledge at least) from my experience Amlogic has very good documentation internally, so I'm sure that more details are available. Yue Wang (the Amlogic PCIe controller maintainer) is already Cc'ed and I added Jianxin. I hope that they can explain the meaning of bis 26 and 29 in HHI_MIPI_CNTL0 on the AXG SoCs (assuming Remi's contact at Amlogic can't) and how they are related to the PCIe controller (even though they're in a MIPI related register). Martin