From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7114C433EF for ; Sat, 16 Apr 2022 23:30:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232460AbiDPXd0 (ORCPT ); Sat, 16 Apr 2022 19:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbiDPXdZ (ORCPT ); Sat, 16 Apr 2022 19:33:25 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D72722C105; Sat, 16 Apr 2022 16:30:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 89FC1B80A0B; Sat, 16 Apr 2022 23:30:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E860DC385A3; Sat, 16 Apr 2022 23:30:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650151849; bh=nd58mF27wY5dwLAgcNLOqzjElU7YpZR3Sqgx6KMTHsQ=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=CxkZ57ZY0YSf0tqM3LLSzmXfOTlRCIFafAFh8ewm7kECNWlAsOQD0hn8/YaEa8D4/ AkZ/SBqlDh/2qX0SyhIKeKoPhP+u06oXkDlw+w57iVvLuG0o8JcwQxqr56MtjN7s2D IgFYIjIrJmvRY7bWhgVfaXR8KWnPWhMheaW8ePLY1tbfBcEokJrVf9lZ4DhFvdihXV 9BFdl8PU4cWHxHRFiit2boF1OrYIEUFhWXF53ey1CcV3B+LYW2EbAsx68TkMTvO3f3 6osWFM2d7qpf4Z4laoiC86U+Wsm194awp7BmnnCYBtVPaiKVzgrtjDs/FWrBW2Ipe6 /Iu4b2l2XBuEg== Date: Sat, 16 Apr 2022 18:30:47 -0500 From: Bjorn Helgaas To: Frank Wunderlich , Rob Herring Cc: linux-rockchip@lists.infradead.org, Frank Wunderlich , Kishon Vijay Abraham I , Vinod Koul , Krzysztof Kozlowski , Heiko Stuebner , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Philipp Zabel , Johan Jonker , Peter Geis , Michael Riesch , linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [RFC/RFT 4/6] PCI: rockchip-dwc: add pcie bifurcation Message-ID: <20220416233047.GA938296@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220416135458.104048-5-linux@fw-web.de> Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sat, Apr 16, 2022 at 03:54:56PM +0200, Frank Wunderlich wrote: > From: Frank Wunderlich > > PCIe Lanes can be split to 2 slots with bifurcation. > Add support for this in existing pcie driver. Please s/pcie/PCIe/ in subject and above to be consistent. You also have kind of a random usage in other patches. Mention the DT property used for this in the commit log. Is the "rockchip,bifurcation" DT property something that should be generalized so it's not rockchip-specific? Other controllers are likely to support similar functionality. > Co-developed-by: Peter Geis > Signed-off-by: Frank Wunderlich > --- > drivers/pci/controller/dwc/pcie-dw-rockchip.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c > index 863374604fb1..1b0c2115b32e 100644 > --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c > +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > > #include "pcie-designware.h" > > @@ -59,6 +60,7 @@ struct rockchip_pcie { > struct regulator *vpcie3v3; > struct irq_domain *irq_domain; > raw_spinlock_t irq_lock; > + bool bifurcation; > }; > > static int rockchip_pcie_readl_apb(struct rockchip_pcie *rockchip, > @@ -273,6 +275,12 @@ static int rockchip_pcie_phy_init(struct rockchip_pcie *rockchip) > return dev_err_probe(dev, PTR_ERR(rockchip->phy), > "missing PHY\n"); > > + if (rockchip->bifurcation) { > + ret = phy_set_mode_ext(rockchip->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_BIFURCATION); > + if (ret) > + return ret; > + } > + > ret = phy_init(rockchip->phy); > if (ret < 0) > return ret; > @@ -345,6 +353,9 @@ static int rockchip_pcie_probe(struct platform_device *pdev) > } > } > > + if (device_property_read_bool(dev, "rockchip,bifurcation")) > + rockchip->bifurcation = true; > + > ret = rockchip_pcie_phy_init(rockchip); > if (ret) > goto disable_regulator; > -- > 2.25.1 > > > -- > linux-phy mailing list > linux-phy@lists.infradead.org > https://lists.infradead.org/mailman/listinfo/linux-phy