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=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 41F44C4740C for ; Mon, 9 Sep 2019 16:37:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 079A82082C for ; Mon, 9 Sep 2019 16:37:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568047059; bh=mpLdfMUT8ALKmTj/ufjnldmb2WFPL9T1AcYl+u7yFxA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=NLBmN7PRFtzpmZJBHQMM0LVdj58ss8HEMUVJNwFLUiJlSYL334qTK4wfiKvctBlru dSOU+jftyoHQZlUaKdYkFE9JYBqiUxkHzGq8+k4+z8D9FBYum7xQefB8gRN3zbtyNW CozVHUJl2HgQkeglShkm2b9V0xiYZVH98vD/tYMs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728012AbfIIQhi (ORCPT ); Mon, 9 Sep 2019 12:37:38 -0400 Received: from foss.arm.com ([217.140.110.172]:53562 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727006AbfIIQhi (ORCPT ); Mon, 9 Sep 2019 12:37:38 -0400 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 C891628; Mon, 9 Sep 2019 09:37:37 -0700 (PDT) Received: from big-swifty.misterjones.org (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 23A9A3F59C; Mon, 9 Sep 2019 09:37:34 -0700 (PDT) Date: Mon, 09 Sep 2019 17:37:33 +0100 Message-ID: <864l1ls9wy.wl-maz@kernel.org> From: Marc Zyngier To: Neil Armstrong Cc: khilman@baylibre.com, bhelgaas@google.com, lorenzo.pieralisi@arm.com, yue.wang@Amlogic.com, kishon@ti.com, repk@triplefau.lt, linux-amlogic@lists.infradead.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] arm64: dts: khadas-vim3: add commented support for PCIe In-Reply-To: <1567950178-4466-7-git-send-email-narmstrong@baylibre.com> References: <1567950178-4466-1-git-send-email-narmstrong@baylibre.com> <1567950178-4466-7-git-send-email-narmstrong@baylibre.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Organization: Approximate MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On Sun, 08 Sep 2019 14:42:58 +0100, 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 uncommented to disable USB3.0 from the > USB Complex and enable the PCIe controller. > > Signed-off-by: Neil Armstrong > --- > .../amlogic/meson-g12b-a311d-khadas-vim3.dts | 22 +++++++++++++++++++ > .../amlogic/meson-g12b-s922x-khadas-vim3.dts | 22 +++++++++++++++++++ > .../boot/dts/amlogic/meson-khadas-vim3.dtsi | 4 ++++ > .../dts/amlogic/meson-sm1-khadas-vim3l.dts | 22 +++++++++++++++++++ > 4 files changed, 70 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..0577b1435cbb 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,25 @@ > / { > 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. > + */ > +/* > +&pcie { > + status = "okay"; > +}; > + > +&usb { > + phys = <&usb2_phy0>, <&usb2_phy1>; > + phy-names = "usb2-phy0", "usb2-phy1"; > +}; > + */ Although you can't do much more than this here, I'd expect firmware on the machine to provide the DT that matches its configuration. Is it the way it actually works? Or is the user actually expected to edit this file? Thanks, M. -- Jazz is not dead, it just smells funny.