Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2786942pxb; Sat, 23 Oct 2021 08:00:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxd7t+1j7r9h1PV4y6PP0Ec+N+0nlVt4/WvFTsA8tqV+vZxBd+gAk9GBXi7Vkbh+rQUIq20 X-Received: by 2002:a17:902:db0e:b0:13e:f4d3:84c with SMTP id m14-20020a170902db0e00b0013ef4d3084cmr5865213plx.2.1635001247104; Sat, 23 Oct 2021 08:00:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635001247; cv=none; d=google.com; s=arc-20160816; b=DI/i0tp+XzBP6DWti4kD3ZHCSecFhcGC6SXKjxC6/E8VrYf1VQWu5I4SDoqgK94vbV FGtKajTSoR6qlPHAnAJgqSH/ZzLiWLXeLaxFof472FfqfUtHqegi3/Mluvm5YvfXXEta UZQ1ElL4Cd1TMf3g8sEM0ySVhRy2BZ7m5+gf9qFOjtUb+g3r5j+ug9Y004z4DqLO5I7M jKoLCyadcDH+WXJeX3eBVsYb4TKuPc4ULjypVKEBL1kjT7hXkVJPKvE5b74ZYMqn5zDY GYHVDqk5mQzkd1Dnd5rPTVifaYM1wKj8ITD6I6PIB8ms9qdErqXaBX6VW1GASzXm7hfr P0kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5K4UcFBbPSVNxLlaX5D3q2rm8Bj8nLXBihYBZ7krsu8=; b=dGIJMpdliFcgx3A7xF49pfNMk5/PGpcUE57XHKhrBZOlkYFFYgevSskoxbtqe+ueXo rDpwgYnk88vDUDmmf/rgKtaBq0/j1rrkyMuTgH35lFtbBHHvIZRR605uIACuSVkVqbdB Ha0TjIJT4R4NaKvqDVPyTZO1igqaWN4WdL3zC0MKSSLY+Trar3Dnbp0UMkZtQnmaJYfi Urjj9WEa2OZI0u2HRwQGSxbNGij5twifZJtBOfa3QwrZDI8o5tFDFpRdJsXqqFaX8j/o vFuIBjeTvf0R7WzX5OifeqWcWMVMZxVaTRMoDy7b5k5rh6l4TD2feByOeTYUsQZRr30i 1hBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZDy1fKjg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v204si1045668pfc.162.2021.10.23.08.00.18; Sat, 23 Oct 2021 08:00:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZDy1fKjg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230088AbhJWO6P (ORCPT + 99 others); Sat, 23 Oct 2021 10:58:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:39400 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbhJWO6O (ORCPT ); Sat, 23 Oct 2021 10:58:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E253760FD8; Sat, 23 Oct 2021 14:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635000955; bh=4XCfTzqibljJFYGtxk5OYG1tv/o6DDhpqQK2LhvRGqg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZDy1fKjgUK81hfKcvI5+pE8WbkN2ggBmkzH6T49Eis1598sfHzP1RdEqRBZKXpRcB 6FkuK+BmD6rKMMx2DGeNhCUyxZ7TLJDznU9JcZdI1O7qenAB2JpjGExFq+vhXygC0C kf5SwzG7udFRIB32GjfWvwd0LZ5H7jGiRO1z6Lso1JpXyYpRcKV8ryA05FpjHkF1uS eKsV/bG2wzzJj4ZIKpTS2/VMAW5dRUxsGSnD9r0O+Ym1UUEAU7/ODLhJ87Kgl8ex/p oTB2hM7eP+8lY3LjBo05Eh1z9nmW5QPeICaRJ71hB7BnKzH2nvpXmrR+OKhz0CB2gK gDdNib0+RMH6Q== Received: by pali.im (Postfix) id CAD4B883; Sat, 23 Oct 2021 16:55:52 +0200 (CEST) Date: Sat, 23 Oct 2021 16:55:52 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Mauro Carvalho Chehab Cc: Lorenzo Pieralisi , linuxarm@huawei.com, mauro.chehab@huawei.com, Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Songxiaowei , Binghui Wang , Bjorn Helgaas , Rob Herring , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v14 05/11] PCI: kirin: give more time for PERST# reset to finish Message-ID: <20211023145552.3ly4kukfyrark7c2@pali> References: <9a365cffe5af9ec5a1f79638968c3a2efa979b65.1634622716.git.mchehab+huawei@kernel.org> <20211022151624.mgsgobjsjgyevnyt@pali> <20211023103059.6add00e6@sal.lan> <20211023104011.zmj7y7vtplpnmhwd@pali> <20211023144534.55aaecf9@sal.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211023144534.55aaecf9@sal.lan> User-Agent: NeoMutt/20180716 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday 23 October 2021 14:45:34 Mauro Carvalho Chehab wrote: > Em Sat, 23 Oct 2021 12:40:11 +0200 > Pali Rohár escreveu: > > It is classic setup for boards with just one PCIe port. > > > > > with 3 elements connected to the bus: an Ethernet card, a M.2 slot and > > > a mini PCIe slot. It seems HiKey 970 is unique with regards to PERST# signal, > > > as there are 4 independent PERST# signals there: > > > > > > - one for PEX 8606 (the PCIe root port); > > > - one for Ethernet; > > > - one for M.2; > > > - one for mini-PCIe. > > > > This is not unique setup, its pretty normal. Every PCIe card has (own) > > PERST# pin and obviously you want to control each pin separately via SW. > > And because PCIe switch is also (upstream) PCIe device it has also > > PERST# pin. > > Based on the discussions we had to add per-port DT PERST# gpios, it > sounded to me that this is was not a typical setup ;-) > > It seems that the typical setup is to have a single PERST# connected > to all devices inside the bus. Hello! I'm sure it is not unique :) Just seems that these boards either do not use device tree (x86-based) or do not have specified reset-gpios in DTS at all. Sometimes there is no need to touch PERST# gpio as either firmware during boot handles it (x86 BIOS/UEFI case, or U-Boot for arm case) or because board/cpu reset toggle PERST# in a way that is compatible for cards init. Looks like you have non-x86 board, which does not have PCIe init code in firmware, needs special handling of PERST# and you are doing it with upstream kernel :-) So maybe all these conditions are unique... But HW design not. As this setup with reset-gpios per card in DTS nodes is something which I will need too, I sent email to Rob with proposal how to universally declare it in DTS, independently of PCIe controller (you are on CC): https://lore.kernel.org/linux-pci/20211023144252.z7ou2l2tvm6cvtf7@pali/ Due to how PCIe cards are broken, PERST# signal is sometimes the only one option how to reset card at runtime. So requirement for separate PERST# per card configurable at runtime by OS will be requirement for more and more boards.