All of lore.kernel.org
 help / color / mirror / Atom feed
From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<devicetree@vger.kernel.org>
Cc: Bear Wang <bear.wang@mediatek.com>,
	Pablo Sun <pablo.sun@mediatek.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	Macpaul Lin <macpaul@gmail.com>,
	Miles Chen <miles.chen@mediatek.com>, <linux-usb@vger.kernel.org>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Tinghan Shen <tinghan.shen@mediatek.com>,
	Rex-BC Chen <rex-bc.chen@mediatek.com>,
	Chen-Yu Tsai <wenst@chromium.org>
Subject: [PATCH 3/3] arm64: dts: mediatek: enable USB device port for mt8195-demo board
Date: Thu, 5 Jan 2023 17:28:09 +0800	[thread overview]
Message-ID: <20230105092809.14214-3-macpaul.lin@mediatek.com> (raw)
In-Reply-To: <20230105092809.14214-1-macpaul.lin@mediatek.com>

1. Enable USB device port (USB port0).
2. Enable u2 speed for other USB HOST (USB port1/2/3).
3. Configure mt6360 (TYPEC) related pinctrls.

Note: Full dual-role switch capability requires TYPEC MUX driver and dts
update will be send in separate patches.

Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 51 ++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index 07a864cb8b54..207bb5f4c58f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -12,6 +12,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
 #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
+#include <dt-bindings/usb/pd.h>
 
 / {
 	model = "MediaTek MT8195 demo board";
@@ -380,6 +381,22 @@
 		};
 	};
 
+	mt6360_pins: mt6360-pins {
+		pins {
+			pinmux = <PINMUX_GPIO100__FUNC_GPIO100>,
+				 <PINMUX_GPIO101__FUNC_GPIO101>;
+			input-enable;
+			bias-pull-up;
+		};
+	};
+
+	u3_p0_vbus: u3_p0vbusdefault {
+		pins_cmd_dat {
+			pinmux = <PINMUX_GPIO63__FUNC_VBUSVALID>;
+			input-enable;
+		};
+	};
+
 	uart0_pins: uart0-pins {
 		pins {
 			pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
@@ -393,6 +410,14 @@
 				 <PINMUX_GPIO103__FUNC_URXD1>;
 		};
 	};
+
+	usb_otg_vbus: usb-otg-vbus-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "otg-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+	};
 };
 
 
@@ -412,6 +437,22 @@
 	status = "okay";
 };
 
+&u3port0 {
+	status = "okay";
+};
+
+&u2port1 {
+	status = "okay";
+};
+
+&u2port2 {
+	status = "okay";
+};
+
+&u2port3 {
+	status = "okay";
+};
+
 &u3phy0 {
 	status = "okay";
 };
@@ -428,6 +469,16 @@
 	status = "okay";
 };
 
+&ssusb {
+	pinctrl-names = "default";
+	pinctrl-0 = <&u3_p0_vbus>;
+	vusb33-supply = <&mt6359_vusb_ldo_reg>;
+	dr_mode = "otg";
+	mediatek,usb3-drd;
+	usb-role-switch;
+	status = "okay";
+};
+
 &xhci0 {
 	vusb33-supply = <&mt6359_vusb_ldo_reg>;
 	vbus-supply = <&otg_vbus_regulator>;
-- 
2.18.0


WARNING: multiple messages have this Message-ID (diff)
From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>,
	<devicetree@vger.kernel.org>
Cc: Bear Wang <bear.wang@mediatek.com>,
	Pablo Sun <pablo.sun@mediatek.com>,
	Macpaul Lin <macpaul.lin@mediatek.com>,
	Macpaul Lin <macpaul@gmail.com>,
	Miles Chen <miles.chen@mediatek.com>, <linux-usb@vger.kernel.org>,
	Chunfeng Yun <chunfeng.yun@mediatek.com>,
	Tinghan Shen <tinghan.shen@mediatek.com>,
	Rex-BC Chen <rex-bc.chen@mediatek.com>,
	Chen-Yu Tsai <wenst@chromium.org>
Subject: [PATCH 3/3] arm64: dts: mediatek: enable USB device port for mt8195-demo board
Date: Thu, 5 Jan 2023 17:28:09 +0800	[thread overview]
Message-ID: <20230105092809.14214-3-macpaul.lin@mediatek.com> (raw)
In-Reply-To: <20230105092809.14214-1-macpaul.lin@mediatek.com>

1. Enable USB device port (USB port0).
2. Enable u2 speed for other USB HOST (USB port1/2/3).
3. Configure mt6360 (TYPEC) related pinctrls.

Note: Full dual-role switch capability requires TYPEC MUX driver and dts
update will be send in separate patches.

Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 51 ++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index 07a864cb8b54..207bb5f4c58f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -12,6 +12,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/mt8195-pinfunc.h>
 #include <dt-bindings/regulator/mediatek,mt6360-regulator.h>
+#include <dt-bindings/usb/pd.h>
 
 / {
 	model = "MediaTek MT8195 demo board";
@@ -380,6 +381,22 @@
 		};
 	};
 
+	mt6360_pins: mt6360-pins {
+		pins {
+			pinmux = <PINMUX_GPIO100__FUNC_GPIO100>,
+				 <PINMUX_GPIO101__FUNC_GPIO101>;
+			input-enable;
+			bias-pull-up;
+		};
+	};
+
+	u3_p0_vbus: u3_p0vbusdefault {
+		pins_cmd_dat {
+			pinmux = <PINMUX_GPIO63__FUNC_VBUSVALID>;
+			input-enable;
+		};
+	};
+
 	uart0_pins: uart0-pins {
 		pins {
 			pinmux = <PINMUX_GPIO98__FUNC_UTXD0>,
@@ -393,6 +410,14 @@
 				 <PINMUX_GPIO103__FUNC_URXD1>;
 		};
 	};
+
+	usb_otg_vbus: usb-otg-vbus-regulator {
+		compatible = "regulator-fixed";
+		regulator-name = "otg-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		enable-active-high;
+	};
 };
 
 
@@ -412,6 +437,22 @@
 	status = "okay";
 };
 
+&u3port0 {
+	status = "okay";
+};
+
+&u2port1 {
+	status = "okay";
+};
+
+&u2port2 {
+	status = "okay";
+};
+
+&u2port3 {
+	status = "okay";
+};
+
 &u3phy0 {
 	status = "okay";
 };
@@ -428,6 +469,16 @@
 	status = "okay";
 };
 
+&ssusb {
+	pinctrl-names = "default";
+	pinctrl-0 = <&u3_p0_vbus>;
+	vusb33-supply = <&mt6359_vusb_ldo_reg>;
+	dr_mode = "otg";
+	mediatek,usb3-drd;
+	usb-role-switch;
+	status = "okay";
+};
+
 &xhci0 {
 	vusb33-supply = <&mt6359_vusb_ldo_reg>;
 	vbus-supply = <&otg_vbus_regulator>;
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-01-05  9:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-05  9:28 [PATCH 1/3] arm64: dts: mediatek: Introduce MT8195 LAPTOP and IOT's USB configurations Macpaul Lin
2023-01-05  9:28 ` Macpaul Lin
2023-01-05  9:28 ` [PATCH 2/3] arm64: dts: mediatek: switch MT8195 boards into different " Macpaul Lin
2023-01-05  9:28   ` Macpaul Lin
2023-01-05  9:28 ` Macpaul Lin [this message]
2023-01-05  9:28   ` [PATCH 3/3] arm64: dts: mediatek: enable USB device port for mt8195-demo board Macpaul Lin
2023-01-06 12:56   ` Krzysztof Kozlowski
2023-01-06 12:56     ` Krzysztof Kozlowski
2023-01-11  5:41     ` Macpaul Lin
2023-01-11  5:41       ` Macpaul Lin
2023-02-01 12:24   ` Matthias Brugger
2023-02-01 12:24     ` Matthias Brugger
2023-02-07  9:36     ` Chunfeng Yun (云春峰)
2023-02-07  9:36       ` Chunfeng Yun (云春峰)
2023-01-06 12:56 ` [PATCH 1/3] arm64: dts: mediatek: Introduce MT8195 LAPTOP and IOT's USB configurations Krzysztof Kozlowski
2023-01-06 12:56   ` Krzysztof Kozlowski
2023-01-11  2:19   ` Chunfeng Yun (云春峰)
2023-01-11  2:19     ` Chunfeng Yun (云春峰)
2023-01-11  3:53     ` Macpaul Lin
2023-01-11  3:53       ` Macpaul Lin
2023-01-09 15:13 ` AngeloGioacchino Del Regno
2023-01-09 15:13   ` AngeloGioacchino Del Regno
2023-01-11  5:37   ` Macpaul Lin
2023-01-11  5:37     ` Macpaul Lin
2023-02-01 12:52     ` Matthias Brugger
2023-02-01 12:52       ` Matthias Brugger
2023-02-09 10:44       ` Macpaul Lin
2023-02-09 10:44         ` Macpaul Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230105092809.14214-3-macpaul.lin@mediatek.com \
    --to=macpaul.lin@mediatek.com \
    --cc=bear.wang@mediatek.com \
    --cc=chunfeng.yun@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=macpaul@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=miles.chen@mediatek.com \
    --cc=pablo.sun@mediatek.com \
    --cc=rex-bc.chen@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=tinghan.shen@mediatek.com \
    --cc=wenst@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.