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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6CDAAC49ED7 for ; Mon, 16 Sep 2019 13:46:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 420A920830 for ; Mon, 16 Sep 2019 13:46:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JZr+5r3N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 420A920830 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NDZBVbmi9JE6YkeRRT8vfyIvLf7S2SRcpsjgKXNQ8LI=; b=JZr+5r3Nxla6Zi O/Waf3pqF+ZwS1cwQrtAdQmJ9/IWvlKB4nZnM4LDadsScTZZ1qM8MX9cau+EaQLC0DHqCi4c9Z77X Or+jKkRxZfBROEyIssNwgqo71+bQPwcm4qtgMQbSOtLKNeB7K5hyUxD2xo1uoUJkoE3YDYToMQMFF IYdXPKLxTmfqsf0YsmsgEfEuq7iBUQ4CglBGzNNRYotuKZCAOxzHgOyfmneQUcl70aByDjxq3Kdxd VV637FmefLLRUJ+2lmLMIEXkOdl9m5qUyyRoA8+PiJbmqnBstipqeWUDRq1RN3bVs/tRC8faXIL7/ 93QY2LqE67pwN/oLxxyA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i9rKF-0002bB-1L; Mon, 16 Sep 2019 13:45:55 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.2 #3 (Red Hat Linux)) id 1i9rKB-0002aA-BB; Mon, 16 Sep 2019 13:45:52 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7CD1F337; Mon, 16 Sep 2019 06:45:49 -0700 (PDT) Received: from localhost (unknown [10.37.6.20]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E84043F67D; Mon, 16 Sep 2019 06:45:48 -0700 (PDT) Date: Mon, 16 Sep 2019 14:45:47 +0100 From: Andrew Murray To: Neil Armstrong Subject: Re: [PATCH v2 6/6] arm64: dts: khadas-vim3: add commented support for PCIe Message-ID: <20190916134546.GS9720@e119886-lin.cambridge.arm.com> References: <20190916125022.10754-1-narmstrong@baylibre.com> <20190916125022.10754-7-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190916125022.10754-7-narmstrong@baylibre.com> User-Agent: Mutt/1.10.1+81 (426a6c1) (2018-08-26) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190916_064551_477542_F4D78E06 X-CRM114-Status: GOOD ( 20.81 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maz@kernel.org, lorenzo.pieralisi@arm.com, gouwa@khadas.com, khilman@baylibre.com, nick@khadas.com, linux-kernel@vger.kernel.org, kishon@ti.com, repk@triplefau.lt, linux-pci@vger.kernel.org, bhelgaas@google.com, linux-amlogic@lists.infradead.org, yue.wang@Amlogic.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On Mon, Sep 16, 2019 at 02:50:22PM +0200, Neil Armstrong wrote: > The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential > lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between > an USB3.0 Type A connector and a M.2 Key M slot. > The PHY driving these differential lines is shared between > the USB3.0 controller and the PCIe Controller, thus only > a single controller can use it. > > The needed DT configuration when the MCU is configured to mux > the PCIe/USB3.0 differential lines to the M.2 Key M slot is > added commented and may be uncommented to disable USB3.0 from the > USB Complex and enable the PCIe controller. > > The End User is not expected to uncomment the following except for > testing purposes, but instead rely on the firmware/bootloader to > update these nodes accordingly if PCIe mode is selected by the MCU. > > Signed-off-by: Neil Armstrong Reviewed-by: Andrew Murray > --- > .../amlogic/meson-g12b-a311d-khadas-vim3.dts | 25 +++++++++++++++++++ > .../amlogic/meson-g12b-s922x-khadas-vim3.dts | 25 +++++++++++++++++++ > .../boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 +++ > .../dts/amlogic/meson-sm1-khadas-vim3l.dts | 25 +++++++++++++++++++ > 4 files changed, 79 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts > index 3a6a1e0c1e32..124a80901084 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-a311d-khadas-vim3.dts > @@ -14,3 +14,28 @@ > / { > compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b"; > }; > + > +/* > + * The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential > + * lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between > + * an USB3.0 Type A connector and a M.2 Key M slot. > + * The PHY driving these differential lines is shared between > + * the USB3.0 controller and the PCIe Controller, thus only > + * a single controller can use it. > + * If the MCU is configured to mux the PCIe/USB3.0 differential lines > + * to the M.2 Key M slot, uncomment the following block to disable > + * USB3.0 from the USB Complex and enable the PCIe controller. > + * The End User is not expected to uncomment the following except for > + * testing purposes, but instead rely on the firmware/bootloader to > + * update these nodes accordingly if PCIe mode is selected by the MCU. > + */ > +/* > +&pcie { > + status = "okay"; > +}; > + > +&usb { > + phys = <&usb2_phy0>, <&usb2_phy1>; > + phy-names = "usb2-phy0", "usb2-phy1"; > +}; > + */ > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts > index b73deb282120..bba98f982ad6 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-s922x-khadas-vim3.dts > @@ -14,3 +14,28 @@ > / { > compatible = "khadas,vim3", "amlogic,s922x", "amlogic,g12b"; > }; > + > +/* > + * The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential > + * lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between > + * an USB3.0 Type A connector and a M.2 Key M slot. > + * The PHY driving these differential lines is shared between > + * the USB3.0 controller and the PCIe Controller, thus only > + * a single controller can use it. > + * If the MCU is configured to mux the PCIe/USB3.0 differential lines > + * to the M.2 Key M slot, uncomment the following block to disable > + * USB3.0 from the USB Complex and enable the PCIe controller. > + * The End User is not expected to uncomment the following except for > + * testing purposes, but instead rely on the firmware/bootloader to > + * update these nodes accordingly if PCIe mode is selected by the MCU. > + */ > +/* > +&pcie { > + status = "okay"; > +}; > + > +&usb { > + phys = <&usb2_phy0>, <&usb2_phy1>; > + phy-names = "usb2-phy0", "usb2-phy1"; > +}; > + */ > diff --git a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi > index 4fe7d33ebe8a..90815fa25ec6 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-khadas-vim3.dtsi > @@ -246,6 +246,10 @@ > linux,rc-map-name = "rc-khadas"; > }; > > +&pcie { > + reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>; > +}; > + > &pwm_ef { > status = "okay"; > pinctrl-0 = <&pwm_e_pins>; > diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts > index 5233bd7cacfb..dbbf29a0dbf6 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts > +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-khadas-vim3l.dts > @@ -68,3 +68,28 @@ > clock-names = "clkin1"; > status = "okay"; > }; > + > +/* > + * The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential > + * lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between > + * an USB3.0 Type A connector and a M.2 Key M slot. > + * The PHY driving these differential lines is shared between > + * the USB3.0 controller and the PCIe Controller, thus only > + * a single controller can use it. > + * If the MCU is configured to mux the PCIe/USB3.0 differential lines > + * to the M.2 Key M slot, uncomment the following block to disable > + * USB3.0 from the USB Complex and enable the PCIe controller. > + * The End User is not expected to uncomment the following except for > + * testing purposes, but instead rely on the firmware/bootloader to > + * update these nodes accordingly if PCIe mode is selected by the MCU. > + */ > +/* > +&pcie { > + status = "okay"; > +}; > + > +&usb { > + phys = <&usb2_phy0>, <&usb2_phy1>; > + phy-names = "usb2-phy0", "usb2-phy1"; > +}; > + */ > -- > 2.22.0 > _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic