Received: by 2002:a17:90a:c08a:0:0:0:0 with SMTP id o10csp4093065pjs; Mon, 9 Dec 2019 00:33:33 -0800 (PST) X-Google-Smtp-Source: APXvYqwAIqYarVFu9253FaNK8zcOlo9E6G50OfzcCCzLH5M4Xi5ikipqYTr4fbDUJutW3Z3JqLJy X-Received: by 2002:a05:6830:1251:: with SMTP id s17mr20276355otp.108.1575880413177; Mon, 09 Dec 2019 00:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575880413; cv=none; d=google.com; s=arc-20160816; b=cSEwpiqC4Qi/6YPYLGpVzQXXT1YGpVFGKgc5jnKoUHszoOEiSMK1QxVoJKHDpGEohs yvN/lpUCEIxTaGkE1HgoW9tEVCWDVYJefRYVO+/WIRDM+/9aZEKCRXTkow3ZzQ+xRhez LpV/MMrp4VpiFjkv9sskNMq4onwBiRDdJsd/wo7AZ6FLbzDoZ6q1SRVoP2zppE1JOHyv NNMJB7Il6zIQrdkRrwUGUoSSNqtkZWJrR7Oz9gXaL+BOsA7FGs4KZhHMw8/i3tba7bG2 Foh3bpIoXV6hyCFuJ6OHfxbhlbaw8rZt2q2HXyqOeIENpwJZ/7JJudmupbPqmB6IujOi S+Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:in-reply-to :subject:cc:to:from:user-agent:references:dkim-signature; bh=emf4IJEEMsmxfQFP3fayTObEfLJTqttr7F9XFtfzuqY=; b=vMfqAYDMuiExYMBxHGCCfH1/BSjMGUwXbXY7TxjFO6hiMKEB38UKJWGpdS88hwX2/y o+VDHkoseVJ+jUI77KQbyTENoC3ouFhmG/ZTUCiQ7lZZyB5o4X2rUdsSsw7ZKJsLP2Ib cah6StcTrTRy7Ybx+MCNvOuzXWBR/wXtM60vm3apGlF4q2i0hd6JQs16W8JnnAAzM+y3 73a5IkVSN1bfyqYbk714c9qe8PwlCENOZn4C8Jj4FKDWUZGThdY3HF+sDp8MDN1KIiCf 24LjukFoOj6pW0T32Nl8rWDZnymHiZ++u349v7SPqNmghJyFHtozyuLTNZzsMeLCG2HN oJGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=l2RINini; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a93si1225980otc.24.2019.12.09.00.33.20; Mon, 09 Dec 2019 00:33:33 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=l2RINini; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727263AbfLIIcX (ORCPT + 99 others); Mon, 9 Dec 2019 03:32:23 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:55881 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727195AbfLIIcW (ORCPT ); Mon, 9 Dec 2019 03:32:22 -0500 Received: by mail-wm1-f65.google.com with SMTP id q9so14437408wmj.5 for ; Mon, 09 Dec 2019 00:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=emf4IJEEMsmxfQFP3fayTObEfLJTqttr7F9XFtfzuqY=; b=l2RINiniKcey/jhYyNEjboTgQuFh87XyROBMa0gj84/Vm4tnZlbyZamK6aJYwRdYBn uqHL+5kmm95wY5dB41OWQXTWCUveOtySqUfhMwfer/v8Zb1TYo9st7wgVs1pPSWwjQnE CTWybUczEiNtygy24UTDLkRuDSYBdDwHu6Rw5oEQYbRCuQN3N1sOmM/QgTGJrqYK/+gd ZsBs5IBMow3rG8I+aOTopBP+NLYSYP93vryqBdFCNpkC9MIh76Nwq73qdxpBNEwpOy40 MLrjAHDJQUIoyS8+q75zjNhm3Z0PuAC7sNYZQKTbpnxuI+nQ0TAGdRfv5aoeVP8gz0BD SLmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=emf4IJEEMsmxfQFP3fayTObEfLJTqttr7F9XFtfzuqY=; b=BxN8n7x6LZVecTcdiWbAyEUaPsX/SvkWvjFsN66E45UiIZBYhkS20SeDKj5CVez8yd Lb9plWg5eJeETKKxOCXlPEtsMQFyH9so0Co5+xHN2rWzjo9mQVCpAkApm/11RTK5SRrG EyHh7htWb+h+Ap3q4XhNoNUzQUFCO+bgVa/ItyoEmYcExuaLisi3zzdVA3TLGUOC9dYm FJDDKSGhZFbn9Ai4vYJQxJFOVR1ZELvkN3ajvQ0HiEFOJw3G7ZFtMtJe9n5S9dbhFACv c8o+6b4lxRzV2cpAQ8AaHGZbtQ1gyD2YHIFWg8LZJDeRLkPEyrMBdHeARC/1Nivbbh6K 3UTg== X-Gm-Message-State: APjAAAW4C2/p0Hb0WUf3TYLTLXSgPZMlhaHoiydhr1Sv0XK0UTz1eYNq jy21OFPG1XAfZCHg5eHZaH/UnA== X-Received: by 2002:a05:600c:2144:: with SMTP id v4mr22522732wml.141.1575880340584; Mon, 09 Dec 2019 00:32:20 -0800 (PST) Received: from localhost (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.gmail.com with ESMTPSA id v188sm13242989wma.10.2019.12.09.00.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 00:32:19 -0800 (PST) References: <20191208210320.15539-1-repk@triplefau.lt> User-agent: mu4e 1.3.3; emacs 26.2 From: Jerome Brunet To: Remi Pommarel , Neil Armstrong , Kevin Hilman , Yue Wang Cc: Michael Turquette , Stephen Boyd , Lorenzo Pieralisi , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH 0/2] PCI: amlogic: Make PCIe working reliably on AXG platforms In-reply-to: <20191208210320.15539-1-repk@triplefau.lt> Date: Mon, 09 Dec 2019 09:32:18 +0100 Message-ID: <1jpngxew6l.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > This serie adds a way to set this bit through AXG clock gating logic. > Platforms having this kind of issue could make use of this gating by > applying a patch to their devicetree similar to: > > clocks = <&clkc CLKID_USB > &clkc CLKID_MIPI_ENABLE > &clkc CLKID_PCIE_A > - &clkc CLKID_PCIE_CML_EN0>; > + &clkc CLKID_PCIE_CML_EN0 > + &clkc CLKID_PCIE_PLL_CML_ENABLE>; > clock-names = "pcie_general", > "pcie_mipi_en", > "pcie", > - "port"; > + "port", > + "pll_cml_en"; > resets = <&reset RESET_PCIE_PHY>, > <&reset RESET_PCIE_A>, > <&reset RESET_PCIE_APB>; A few remarks for your future patches: * You need to document any need binding you introduce: It means that there should have been a patch in Documentation/devicetree/... before using your newclock name in the pcie driver. As Martin pointed out, dt-bindings should be dealt with in their own patches > > > Remi Pommarel (2): > clk: meson: axg: add pcie pll cml gating Whenever possible, patches intended for different maintainers should be sent separately (different series) > PCI: amlogic: Use PCIe pll gate when available > > drivers/clk/meson/axg.c | 3 +++ > drivers/clk/meson/axg.h | 2 +- > drivers/pci/controller/dwc/pci-meson.c | 5 +++++ > include/dt-bindings/clock/axg-clkc.h | 1 + > 4 files changed, 10 insertions(+), 1 deletion(-)