Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1192159pxf; Fri, 26 Mar 2021 03:06:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwROoPg9XPcpjJBR1QW7GDANViaDjxBUV/oioN+FMpW3294mOlJ1NbFroAChjA6Qs6ab+KJ X-Received: by 2002:a17:907:d1f:: with SMTP id gn31mr14170861ejc.536.1616753215879; Fri, 26 Mar 2021 03:06:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616753215; cv=none; d=google.com; s=arc-20160816; b=RfATc0iI+d1cL7ZZosUvRa1WZsPI64Fd/XQf/uUDxMqg66p4M92tEWZaTDY445T64u o2dvKf0/rS1xCzp9eZY2QN2WAYTv9o8Bx7TEYp3U+5AAlAlXZfNPGIFYc54TTktLnqL8 u2oeSIKAPzMjnh68EttvcG50v8V+AuKoY6dhI1gFFvB3C3TCa8b2Ln/pdtcele7193i5 PZy1+rjvawBKaDDBh6HQ5XDRIYxTE1Ynu2+UqQpEXuLF6LH6QEA7vuXIAIzKVu+bpHxL 1d2MoL+lBMgCUEyttpOvRHzP7dOfRYHAhFkH25sNkrTT8o6r5inTtrdtPaT37kjmbyQb 90Ow== 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=8Zd7bN7CGksOGiKQHU3d5KDQw/2pwxZOloqQ9OzIF8I=; b=pGhIPIctgPh/XwqQBWjQdYu3Ae8NTY+YCcyzT/DKUPnWnL4DAEUF5bxX7h2ukaaUYm cuSlUoqJ/2yN6Lc9GOu+/jjoi3P9yzYLiGd+347PyDUpkOP5wK0hGJ03AKPLnVReIe4U i8TWE+aNNpeEJB3xypdcBehnPWmZ5tdMBE7HOyVtznS7piDbO3tqdmBm5HvekdlweJdQ p+9uu5qus3QNdYLRfjmCc1m8YCLhSQ6F6/ffxOgT8EYL+h4Adi8zK2JsIF5FK8KSNEs6 djBhdQXxz86jWssfh3hM2wCtwJJ8EPmcTQw6JyfdfF2KNh+GoS+IrujUh6hv6BwJq1rV SNMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YU+Y18IR; 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 p8si6608455edm.44.2021.03.26.03.06.33; Fri, 26 Mar 2021 03:06:55 -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=YU+Y18IR; 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 S229963AbhCZKE5 (ORCPT + 99 others); Fri, 26 Mar 2021 06:04:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:47862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229961AbhCZKEe (ORCPT ); Fri, 26 Mar 2021 06:04:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 948A061A42; Fri, 26 Mar 2021 10:04:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616753073; bh=TVjO1AgSnLF3zZLd3P64jcFvlXrVSK+z3MXa7jHaaAc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YU+Y18IR4hpvzDGRoGZC78qc8DlcNDZaFKKaqPjUrX47Y7e5ie4Udn4g1hfz9HJpj gh722YJGt1fpF7VUCp275WTLTP2U91km927sH72u2vcErNTvGXR0IHtCCuPwyY/1MD v8wo0SbdNRqXq9rJSdHc9l+VuKsaEeKpz64ecApTXkJxSPN7q32pb60QwyQsb4Wn7O 4zBUckFBQz5lDLIsstusVjt60FdxLRfdzE6qZT1Nj75QKkt9yM4XBkwLYxkQ/j/xm+ At2b20h/CAtRIG0R7tLeJnohILB/OzllacIod4qxrSCiujDKuL3MZ30+JwnsRp2gIw xAYNtEdUeSrng== Date: Fri, 26 Mar 2021 11:04:28 +0100 From: Mauro Carvalho Chehab To: Manivannan Sadhasivam Cc: Rob Herring , Binghui Wang , Bjorn Helgaas , Lorenzo Pieralisi , Xiaowei Song , "linux-kernel@vger.kernel.org" , PCI Subject: Re: [PATCH v2 04/11] PCI: dwc: pcie-kirin: add support for Kirin 970 PCIe controller Message-ID: <20210326110428.51a0abc9@coco.lan> In-Reply-To: <20210326085102.GA25371@work> References: <4c9d6581478aa966698758c0420933f5defab4dd.1612335031.git.mchehab+huawei@kernel.org> <20210326093936.02ba3a03@coco.lan> <20210326085102.GA25371@work> X-Mailer: Claws Mail 3.17.8 (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 Fri, 26 Mar 2021 14:21:02 +0530 Manivannan Sadhasivam escreveu: > On Fri, Mar 26, 2021 at 09:39:36AM +0100, Mauro Carvalho Chehab wrote: > > Em Wed, 3 Feb 2021 08:34:21 -0600 > > Rob Herring escreveu: > > > > > On Wed, Feb 3, 2021 at 1:02 AM Mauro Carvalho Chehab > > > wrote: > > > > > > > > From: Manivannan Sadhasivam > > > > > > > > Add support for HiSilicon Kirin 970 (hi3670) SoC PCIe controller, based > > > > on Synopsys DesignWare PCIe controller IP. > > > > > > > > [mchehab+huawei@kernel.org: fix merge conflicts] > > > > Signed-off-by: Manivannan Sadhasivam > > > > Signed-off-by: Mauro Carvalho Chehab > > > > --- > > > > drivers/pci/controller/dwc/pcie-kirin.c | 723 +++++++++++++++++++++++- > > > > 1 file changed, 707 insertions(+), 16 deletions(-) > > > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c > > > > index 026fd1e42a55..5925d2b345a8 100644 > > > > --- a/drivers/pci/controller/dwc/pcie-kirin.c > > > > +++ b/drivers/pci/controller/dwc/pcie-kirin.c > > > > @@ -29,6 +29,7 @@ > > > > > [...] > > > > This looks like it is almost all phy related. I think it should all be > > > moved to a separate phy driver. Yes, we have some other PCI drivers > > > controlling their phys directly where the phy registers are > > > intermingled with the PCI host registers, but I think those either > > > predate the phy subsystem or are really simple. I also have a dream to > > > move all the phy control to the DWC core code. > > > > Please notice that this patch was not written by me, but, instead, > > by Mannivannan. So, I can't change it. > > Feel free to move the PHY pieces to a separate PHY driver as suggested. > My driver code was merely WIP one and I don't have any objection to > change the patch. > > I'd be happy if you add my Co-developed tag to the PCIe driver patch with > the SoB ofc. Ok. > > What I can certainly do is to > > write a separate patch at the end of this series moving the Kirin 970 > > phy to a separate driver. Would this be accepted? > > > > Ah, please don't do that. I know that you've already followed the same > process for other HiSi drivers but that looks messy IMO. The problem is related to licensing issues and US export regulations. By preserving the patches from the original authors, I played safe. > > > Btw, what should be done with the Kirin 960 PHY code that it is > > already embedded on this driver, and whose some of the DT properties > > are for its phy layer? > > > > You might need to create a PHY driver for both 960 and 970. I don't see > any harm there. But please make sure you test the patches on both boards. Testing on Kirin 960 will be harder. Well, I can get my hands on one such board, but right now I don't have any M.2 device I can spare with, in order to test. This will also break DT backward compatibility, as, for instance, the PERST# gpio seems to be part of the Kirin 960 PHY, as Kirin 970 has different PERST# logic: on Kirin 970, there's one PERST# GPIO per PCIe device. So, before starting such change, I need to know if DT maintainers are OK with that. Thanks, Mauro