Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4183624ybe; Mon, 9 Sep 2019 05:41:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqyXrMrg0aZ2b9xPXoeC0dtcoHUI4tE6UO7Kt5++DcWsB4z+YQbCUcHkjqEgqoNTgO+lIleN X-Received: by 2002:a05:6402:1685:: with SMTP id a5mr12056949edv.304.1568032904660; Mon, 09 Sep 2019 05:41:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568032904; cv=none; d=google.com; s=arc-20160816; b=TE/S0J2ZY99g8F2vIgbSxjwI/hCr6t0SMB2dJAYDt6DqigAtTzRu7erKwr7l6+G61g ue0ghTsqY00yRGRhxgUwHQzbq3XFsuykxRcj1mQ5NaPGAehHdGYC0HBqD5sBEHRWrqO3 iwD1rURaYrm81Qy2FIgByVK9cAUEKyyWLauZ7xdF1xYHOMpS1y1iqK18AF5Nn9OF0O4x hcS1wIYYLmAiDmMrZnS03SfWZ+x5wpHOyf5iY7C96BhuoGnN6vtzhI6cGNgiK/+QQLWP 4HB9VOCO/bI6LR4QFKiksGex28PLzVVoEZa4wMz8vf3f6wt3VH02TEZ+tgYCXhMTnUJB LL8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=MPMNuIvBDuMpXWllYYYQc+uQUL5Apc6pCcccd/3M7DI=; b=QOXgMTXsszfep9hmo4ncgTejOuNaaGUMd0Y6JUJvIRCshLcGUSthJq+ZcSmzvCN3pe FA4nFy1ijOXArFKRQmZHNbB76qqM1ixTtB4fh1XDDtadsZ4NRvQRVYXTuZeedqc+f7BU lit09agorOAW5TT79NpgajBd7HzWj/hCB+qV8aj3cjrISWu34+HcA7M2ZQ79LIHPZwZJ CxQBqxG5p/0++UaTktm+tPFSm8tDrREkReZ0YEo2DY0tT1ng/Yajn5KyJXGRGwoFZ7Kw AFcAsY0D7bCdf5zqpKQQtFvi4dywNm92KmIFJPdLuHYH3xIQELGsSIlmmlPC6QrslQ6+ lHKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=1YogVn8k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14si8259467edv.50.2019.09.09.05.41.20; Mon, 09 Sep 2019 05:41:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=1YogVn8k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728504AbfIHNnP (ORCPT + 99 others); Sun, 8 Sep 2019 09:43:15 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36954 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728362AbfIHNnN (ORCPT ); Sun, 8 Sep 2019 09:43:13 -0400 Received: by mail-wr1-f65.google.com with SMTP id i1so10430947wro.4 for ; Sun, 08 Sep 2019 06:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MPMNuIvBDuMpXWllYYYQc+uQUL5Apc6pCcccd/3M7DI=; b=1YogVn8kGos8KYTq7iFgHl8nNKzFAwaR62cZ1BnEPVcRFJF/CtzJpgnRxieBcmpBns BMc+Ppn2v3xM9ZWWG42Iv9Q3g4cpCEhC44zuVO585NDvAuOTD9b19ZhQwh34UD98voaj daaCrnsdN+1Egwx4tVBs5FD/Xy8l2Odfcz1gsIPIhaHoE8jDpfkxr1Vip00kqwk4dDIz LXhm/1DtkeWECYKe1P3ceIHzK57O3oL5PRURDiSYO/WIg1QTpKSZXlwRwamN+hzQ9M3g hNQPVbxrvwxM6klB5rCKV0ZIUA/qOfK49v2dI3LSrgfECoW6bUUlaLUbCExtmLmEc5oc s2AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MPMNuIvBDuMpXWllYYYQc+uQUL5Apc6pCcccd/3M7DI=; b=WrFBfDlwJkta5rtP80/xWZOC5bfakMHMfZdC6JOIQvG+WVCTR+itqMwzHezTn16VrF 1G1ENq3YoXfKEtRIIuMhYk2owgc9j5vdhowJGZGTGPAh9y7u0KQdq/m8bp9ZV4BmwRwm cF3Nn9IhkpfFnFO8qi7+yOHGBcahe2ZLg/GTUTo6nm5VIknG12eDJr6PJG3q8EmXgzzQ 1BNTmXMEJQ0+r2lNd2P6KlQkpoq4g950AdNYwnp943LunRfdudxx4GM4skn8mk3XIAg8 qIu713eLDeAoDwYFrn65JiB+g1dvJT/uvr+1vgFHsG2+l2bLnlGBgjYGPb7qAWnOCfS5 LxZA== X-Gm-Message-State: APjAAAU7wFdQGnZpbx25Q7wuh1IsbQykuIruOCr71ZQjxk5MpaEfCprJ n3hXjlB5C7Jk9YnyvBDdg5GeWw== X-Received: by 2002:adf:f482:: with SMTP id l2mr15178200wro.103.1567950190158; Sun, 08 Sep 2019 06:43:10 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.gmail.com with ESMTPSA id t203sm14313902wmf.42.2019.09.08.06.43.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 08 Sep 2019 06:43:09 -0700 (PDT) From: Neil Armstrong To: khilman@baylibre.com, bhelgaas@google.com, lorenzo.pieralisi@arm.com, yue.wang@Amlogic.com, kishon@ti.com Cc: repk@triplefau.lt, Neil Armstrong , maz@kernel.org, linux-amlogic@lists.infradead.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/6] arm64: dts: khadas-vim3: add commented support for PCIe Date: Sun, 8 Sep 2019 13:42:58 +0000 Message-Id: <1567950178-4466-7-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567950178-4466-1-git-send-email-narmstrong@baylibre.com> References: <1567950178-4466-1-git-send-email-narmstrong@baylibre.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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"; +}; + */ 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..1ef5c2f04f67 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,25 @@ / { 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. + */ +/* +&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 8647da7d6609..eac5720dc15f 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..d9c7cbedce53 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,25 @@ 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. + */ +/* +&pcie { + status = "okay"; +}; + +&usb { + phys = <&usb2_phy0>, <&usb2_phy1>; + phy-names = "usb2-phy0", "usb2-phy1"; +}; + */ -- 2.17.1