Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1974068pxb; Thu, 4 Nov 2021 11:43:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4Y9sInhS8J9qMsGq213iJZaaNnkR9sokUvZd7DHO7FeoH/LdWS7saq5O6tuab8V7Cy1Cy X-Received: by 2002:a17:906:309b:: with SMTP id 27mr1255778ejv.129.1636051424911; Thu, 04 Nov 2021 11:43:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636051424; cv=none; d=google.com; s=arc-20160816; b=BA3bxmLSAk75MonGod+n6lEdEg7zY0gkdUBy5a0olQihxJ76GKSdQFFs+TTXfTdBwK eUJgxtvP9Nw7YxPkBG80q/7LSQIV0gVJ0ohPeOA3g1OR8vRNBC5qQoB7q4w4RZWkeRQT dHoi1TuZtbM8j513A1c77wlMGJ3OIiYkePAMfC2xK9NiQiXL8OuQHbPLgg573oanyA2I wQTP4lN+dtUyHXyAlep4EX8Q1tPPAdk5J7Bfk60GP5wqehvg+xYYd7OW+A1kkdMsCy2n kxIvWA+1+TnEajGmQgLYTF1qXfSPPtDF2Yi/KLoprZzuMqCUl83rkyjeyYTwhPmAF9mi 5XRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=J3AgNm1p15fMaxX1m15Ad21wr7Kl6tJ/5ky5gIT2JcU=; b=hq4mD3+w4AuedWRt/vhZoQ5gNtTzUMgxF511s00dNeiTpJyOzI/b1svZV8/tkorhVT gDaa+PxfPRVC3s8Z2ja/lcfXLpNoDsxE6sEJxg3PIXJNJmnYPhHGo8mHwCDAEoUXFblH dYVX7RoE+7e8HiU/JUy/M3giDo+P7q4ZGyOc4N/kVt1Lcqc0nqwbg+JKkNHGuyRpfURN tpVAvhWge4t5aJMRMumYxQxut3A8qxAHcDfN7+wj9b09Ja00q1itoOf5qNC35KeflDUI n6STa7k5El97E8YfzF+P64Rwr8nrNp0OgbOi6dHrEdleGzisj7aAbT08jyJkHc5BSwFh wzuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UDmkZIwP; 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 sa40si11528297ejc.226.2021.11.04.11.43.19; Thu, 04 Nov 2021 11:43:44 -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=UDmkZIwP; 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 S231958AbhKDRac (ORCPT + 99 others); Thu, 4 Nov 2021 13:30:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:45922 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231709AbhKDRab (ORCPT ); Thu, 4 Nov 2021 13:30:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E67B961058; Thu, 4 Nov 2021 17:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636046873; bh=+05o/sEV+lAerK5i0XMWSi8zPzYOQpDfBy38xWvfnHI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UDmkZIwPkCgCUGQewQ40yC8kRN6D1V378iVmzuasT5rHGF/0L11gXqhlOMVOgT0Hf jMOTqkkEDbkjaeaJ2N0d+14vatF3l8fWQtIWzNLWfxTMZYBM8AuAN1sdLSrDhZ9Ojh RjfsZqA9IlDH8m67SQTaFZRBhnrXsDYYuAGv0tZqUMXvbNd44nM3G9IDtzinjUlIxy eqLLrQDoqECcioQwMxbisohw685SdUB/qzdlHZTo1JydZv8m5Lh04Z8LuaLLVy5AK2 RBsumDDaHZKcrPolztUdBQveG+juBJHQHNhAFRikqow6q+igXbt/m9Lh5O4sGwguqG S0Q8E5WUfLlxw== Date: Thu, 4 Nov 2021 17:27:46 +0000 From: Mauro Carvalho Chehab To: Rob Herring Cc: Bjorn Helgaas , Lorenzo Pieralisi , Linuxarm , mauro.chehab@huawei.com, Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Binghui Wang , Bjorn Helgaas , Xiaowei Song , "linux-kernel@vger.kernel.org" , PCI , Kishon Vijay Abraham I Subject: Re: [PATCH v15 04/13] PCI: kirin: Add support for bridge slot DT schema Message-ID: <20211104172746.4cacf498@sal.lan> In-Reply-To: References: <20211102160612.GA612467@bhelgaas> <20211102174415.58cd3d4f@sal.lan> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 4 Nov 2021 10:36:52 -0500 Rob Herring escreveu: > On Tue, Nov 2, 2021 at 12:44 PM Mauro Carvalho Chehab > wrote: > > > > Hi Bjorn, > > > > Em Tue, 2 Nov 2021 11:06:12 -0500 > > Bjorn Helgaas escreveu: > > > > > > + > > > > + /* Per-slot clkreq */ > > > > + int n_gpio_clkreq; > > > > + int gpio_id_clkreq[MAX_PCI_SLOTS]; > > > > + const char *clkreq_names[MAX_PCI_SLOTS]; > > > > > > I think there's been previous discussion about this, but I didn't > > > follow it, so I'm just double-checking that this is what we want here. > > > > > > IIUC, this (MAX_PCI_SLOTS, "hisilicon,clken-gpios") applies to an > > > external PEX 8606 bridge, which seems a little strange to be > > > hard-coded into the kirin driver this way. > > > > > > I see that "hisilicon,clken-gpios" is optional, but what if some > > > platform connects all 6 lanes? What if there's a different bridge > > > altogether? > > Keep in mind this is HiKey. There's never been a 2nd board upstream > for the SoCs, the boards have a short lifespan in terms of both > support and availability. And yet Hikey manages to do multiple > complicated things on the board design. I have a hard time caring... > > > > > > > I'll assume this is actually the way we want thing unless I hear > > > otherwise. > > > > Yes, there was past discussions about that with Rob, with regards > > to how the DT would represent it, which got reflected at the code. > > At first I thought these were CLKREQ connections which absolutely > should be per port/bridge like PERST, but they are not. They are > simply enables for the refclk's and pretty specific to HiKey. > > > At the end, it was decided to just add a single property inside PCIe: > > > > > > pcie@f4000000 { > > compatible = "hisilicon,kirin970-pcie"; > > ... > > hisilicon,clken-gpios = <&gpio27 3 0>, <&gpio17 0 0>, > > <&gpio20 6 0>; > > > > I don't think this is a problem, as, if some day another bridge would > > need a larger number of slots, it is just a matter of changing the > > number at the MAX_PCI_SLOTS, as this controls only the size of the array > > (and the check for array overflow when parsing the properties). > > It is a problem that your host bridge driver has hardcoded board > specifics. That's not the first time you've heard that from me. But > given the board-to-soc ratio of Hikey is 1:1, I don't care that much. Ok, understood. Yeah, it sounds unlikely that we would get more boards for Kirin 960/970 with PCI support, as this SoC is used for mobile phones, where neither USB nor PCI bridges are needed. So, AFAIKT, the only the only publicly-available boards that will be using this driver are HiKey 960 and HiKey 970. Regards, Mauro