All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622>
@ 2020-08-20 14:37 Frank Wunderlich
  2020-08-20 14:37 ` [PATCH v6 1/7] phy: mtk-tphy: make shared reg optional for v1 Frank Wunderlich
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

This series adds Mediatek AHCI driver, makes neccessary phy modifications
creates new dts for bananapi-r64 (because it's a bit different to rfb)
and adds all DTS nodes to get SATA and USB working on mt7622 and mt7623

they are based on top of this:

Add PCIe and its clock support for mt7622
https://patchwork.ozlabs.org/project/uboot/list/?series=194888

and to get USB working (no hard depency, ports get enumerated without it):
usb: xhci: add a member hci_version in xhci_ctrl struct
https://patchwork.ozlabs.org/project/uboot/list/?series=195331

v5->v6:
 - fix commit-subjects/messages to take care of actual changes in part 2+3
   there are only small changes like dropping comment and reorder Authors
 - rename now existing bpi-r64.dts to follow naming convensions
 - drop commits creating new r64 dts and adding sata-nodes
v4->v5:
 - rebased on master because old series got merged
v3->v4:
 - fix wrong squashing of pciesys-comment
v2->v3:
 - fixed code style suggested by sam
v1->v2:
 - made register of phy optional for tphy v1 and remove it in dts


Frank Wunderlich (7):
  phy: mtk-tphy: make shared reg optional for v1
  reset: drop unnecessary comment for pciesys
  ahci: mediatek: fix copyright and author-lines
  clk: mt7622: add needed clocks for ssusb-node
  arm: dts: rename mt7622-bpi-r64.dts
  arm: dts: mt7622: add USB nodes
  arm: dts: mt7623: add USB nodes

 arch/arm/dts/Makefile                         |  2 +-
 ...pi-r64.dts => mt7622-bananapi-bpi-r64.dts} |  8 +++
 arch/arm/dts/mt7622-rfb.dts                   |  8 +++
 arch/arm/dts/mt7622.dtsi                      | 56 +++++++++++++++++++
 arch/arm/dts/mt7623.dtsi                      | 46 +++++++++++++++
 arch/arm/dts/mt7623n-bananapi-bpi-r2.dts      | 16 ++++++
 drivers/ata/mtk_ahci.c                        |  6 +-
 drivers/clk/mediatek/clk-mt7622.c             | 43 +++++++++++++-
 drivers/phy/phy-mtk-tphy.c                    |  5 +-
 9 files changed, 181 insertions(+), 9 deletions(-)
 rename arch/arm/dts/{mt7622-bpi-r64.dts => mt7622-bananapi-bpi-r64.dts} (98%)

-- 
2.25.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 1/7] phy: mtk-tphy: make shared reg optional for v1
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
@ 2020-08-20 14:37 ` Frank Wunderlich
  2020-08-25 12:16   ` Tom Rini
  2020-08-20 14:37 ` [PATCH v6 2/7] reset: drop unnecessary comment for pciesys Frank Wunderlich
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

make the shared reg optional when version is v1 for sata

Suggested-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 drivers/phy/phy-mtk-tphy.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c
index 326227a30d..3d7b9cd2b1 100644
--- a/drivers/phy/phy-mtk-tphy.c
+++ b/drivers/phy/phy-mtk-tphy.c
@@ -698,11 +698,10 @@ static int mtk_tphy_probe(struct udevice *dev)
 	tphy->dev = dev;
 	tphy->version = dev_get_driver_data(dev);
 
-	/* v1 has shared banks */
+	/* v1 has shared banks for usb/pcie mode, */
+	/* but not for sata mode */
 	if (tphy->version == MTK_TPHY_V1) {
 		tphy->sif_base = dev_read_addr_ptr(dev);
-		if (!tphy->sif_base)
-			return -ENOENT;
 	}
 
 	dev_for_each_subnode(subnode, dev) {
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v6 2/7] reset: drop unnecessary comment for pciesys
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
  2020-08-20 14:37 ` [PATCH v6 1/7] phy: mtk-tphy: make shared reg optional for v1 Frank Wunderlich
@ 2020-08-20 14:37 ` Frank Wunderlich
  2020-08-25 12:16   ` Tom Rini
  2020-08-20 14:37 ` [PATCH v6 3/7] ahci: mediatek: fix copyright and author-lines Frank Wunderlich
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

after review from sam this comment should be removed

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 drivers/clk/mediatek/clk-mt7622.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index d53ed69189..a1a35f72a3 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -599,7 +599,6 @@ static int mt7622_pciesys_bind(struct udevice *dev)
 	int ret = 0;
 
 	if (IS_ENABLED(CONFIG_RESET_MEDIATEK)) {
-//	PCIESYS uses in linux also 0x34 = ETHSYS reset controller
 	ret = mediatek_reset_bind(dev, ETHSYS_HIFSYS_RST_CTRL_OFS, 1);
 	if (ret)
 		debug("Warning: failed to bind reset controller\n");
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v6 3/7] ahci: mediatek: fix copyright and author-lines
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
  2020-08-20 14:37 ` [PATCH v6 1/7] phy: mtk-tphy: make shared reg optional for v1 Frank Wunderlich
  2020-08-20 14:37 ` [PATCH v6 2/7] reset: drop unnecessary comment for pciesys Frank Wunderlich
@ 2020-08-20 14:37 ` Frank Wunderlich
  2020-08-25 12:16   ` Tom Rini
  2020-08-20 14:37 ` [PATCH v6 4/7] clk: mt7622: add needed clocks for ssusb-node Frank Wunderlich
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

after review of sam copyright should be on one line and link should
not between author lines

just remove the link and put ryder first as he is author of linux-driver

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 drivers/ata/mtk_ahci.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/ata/mtk_ahci.c b/drivers/ata/mtk_ahci.c
index 8e09c5f9e6..4ad260a5bb 100644
--- a/drivers/ata/mtk_ahci.c
+++ b/drivers/ata/mtk_ahci.c
@@ -2,12 +2,10 @@
 /*
  * MTK SATA platform driver
  *
- * (C) Copyright 2020
- *     Mediatek
+ * Copyright (C) 2020 MediaTek Inc.
  *
- * Author: Frank Wunderlich <frank-w@public-files.de>
- * based on https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ata/ahci_mtk.c
  * Author: Ryder Lee <ryder.lee@mediatek.com>
+ * Author: Frank Wunderlich <frank-w@public-files.de>
  */
 
 #include <common.h>
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v6 4/7] clk: mt7622: add needed clocks for ssusb-node
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
                   ` (2 preceding siblings ...)
  2020-08-20 14:37 ` [PATCH v6 3/7] ahci: mediatek: fix copyright and author-lines Frank Wunderlich
@ 2020-08-20 14:37 ` Frank Wunderlich
  2020-08-25 12:16   ` Tom Rini
  2020-08-20 14:37 ` [PATCH v6 5/7] arm: dts: rename mt7622-bpi-r64.dts Frank Wunderlich
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

MT7622 needs additional clock definitions to work properly

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 drivers/clk/mediatek/clk-mt7622.c | 42 +++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/drivers/clk/mediatek/clk-mt7622.c b/drivers/clk/mediatek/clk-mt7622.c
index a1a35f72a3..0246149107 100644
--- a/drivers/clk/mediatek/clk-mt7622.c
+++ b/drivers/clk/mediatek/clk-mt7622.c
@@ -521,6 +521,20 @@ static const struct mtk_gate_regs sgmii_cg_regs = {
 	.flags = CLK_GATE_NO_SETCLR_INV | CLK_PARENT_TOPCKGEN,	\
 }
 
+static const struct mtk_gate_regs ssusb_cg_regs = {
+	.set_ofs = 0x30,
+	.clr_ofs = 0x30,
+	.sta_ofs = 0x30,
+};
+
+#define GATE_SSUSB(_id, _parent, _shift) {                      \
+	.id = _id,                                              \
+	.parent = _parent,                                      \
+	.regs = &ssusb_cg_regs,                                 \
+	.shift = _shift,                                        \
+	.flags = CLK_GATE_NO_SETCLR_INV | CLK_PARENT_TOPCKGEN,  \
+}
+
 static const struct mtk_gate sgmii_cgs[] = {
 	GATE_SGMII(CLK_SGMII_TX250M_EN, CLK_TOP_SSUSB_TX250M, 2),
 	GATE_SGMII(CLK_SGMII_RX250M_EN, CLK_TOP_SSUSB_EQ_RX250M, 3),
@@ -528,6 +542,15 @@ static const struct mtk_gate sgmii_cgs[] = {
 	GATE_SGMII(CLK_SGMII_CDR_FB, CLK_TOP_SSUSB_CDR_FB, 5),
 };
 
+static const struct mtk_gate ssusb_cgs[] = {
+	GATE_SSUSB(CLK_SSUSB_U2_PHY_1P_EN, CLK_TOP_TO_U2_PHY_1P, 0),
+	GATE_SSUSB(CLK_SSUSB_U2_PHY_EN, CLK_TOP_TO_U2_PHY, 1),
+	GATE_SSUSB(CLK_SSUSB_REF_EN, CLK_TOP_TO_USB3_REF, 5),
+	GATE_SSUSB(CLK_SSUSB_SYS_EN, CLK_TOP_TO_USB3_SYS, 6),
+	GATE_SSUSB(CLK_SSUSB_MCU_EN, CLK_TOP_AXI_SEL, 7),
+	GATE_SSUSB(CLK_SSUSB_DMA_EN, CLK_TOP_HIF_SEL, 8),
+};
+
 static const struct mtk_clk_tree mt7622_clk_tree = {
 	.xtal_rate = 25 * MHZ,
 	.xtal2_rate = 25 * MHZ,
@@ -630,6 +653,11 @@ static int mt7622_sgmiisys_probe(struct udevice *dev)
 	return mtk_common_clk_gate_init(dev, &mt7622_clk_tree, sgmii_cgs);
 }
 
+static int mt7622_ssusbsys_probe(struct udevice *dev)
+{
+	return mtk_common_clk_gate_init(dev, &mt7622_clk_tree, ssusb_cgs);
+}
+
 static const struct udevice_id mt7622_apmixed_compat[] = {
 	{ .compatible = "mediatek,mt7622-apmixedsys" },
 	{ }
@@ -670,6 +698,11 @@ static const struct udevice_id mt7622_mcucfg_compat[] = {
 	{ }
 };
 
+static const struct udevice_id mt7622_ssusbsys_compat[] = {
+	{ .compatible = "mediatek,mt7622-ssusbsys" },
+	{ }
+};
+
 U_BOOT_DRIVER(mtk_mcucfg) = {
 	.name = "mt7622-mcucfg",
 	.id = UCLASS_SYSCON,
@@ -746,3 +779,12 @@ U_BOOT_DRIVER(mtk_clk_sgmiisys) = {
 	.priv_auto_alloc_size = sizeof(struct mtk_cg_priv),
 	.ops = &mtk_clk_gate_ops,
 };
+
+U_BOOT_DRIVER(mtk_clk_ssusbsys) = {
+	.name = "mt7622-clock-ssusbsys",
+	.id = UCLASS_CLK,
+	.of_match = mt7622_ssusbsys_compat,
+	.probe = mt7622_ssusbsys_probe,
+	.priv_auto_alloc_size = sizeof(struct mtk_cg_priv),
+	.ops = &mtk_clk_gate_ops,
+};
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v6 5/7] arm: dts: rename mt7622-bpi-r64.dts
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
                   ` (3 preceding siblings ...)
  2020-08-20 14:37 ` [PATCH v6 4/7] clk: mt7622: add needed clocks for ssusb-node Frank Wunderlich
@ 2020-08-20 14:37 ` Frank Wunderlich
  2020-08-25 12:17   ` Tom Rini
  2020-08-20 14:37 ` [PATCH v6 6/7] arm: dts: mt7622: add USB nodes Frank Wunderlich
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

rename mt7622-bpi-r64.dts to mt7622-bananapi-bpi-r64.dts
to follow naming convensions

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm/dts/Makefile                                           | 2 +-
 .../arm/dts/{mt7622-bpi-r64.dts => mt7622-bananapi-bpi-r64.dts} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/arm/dts/{mt7622-bpi-r64.dts => mt7622-bananapi-bpi-r64.dts} (100%)

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index b2b5360f6d..9a28958103 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -962,7 +962,7 @@ dtb-$(CONFIG_SOC_K3_J721E) += k3-j721e-common-proc-board.dtb \
 dtb-$(CONFIG_ARCH_MEDIATEK) += \
 	mt7622-rfb.dtb \
 	mt7623a-unielec-u7623-02-emmc.dtb \
-	mt7622-bpi-r64.dtb \
+	mt7622-bananapi-bpi-r64.dtb \
 	mt7623n-bananapi-bpi-r2.dtb \
 	mt7629-rfb.dtb \
 	mt8512-bm1-emmc.dtb \
diff --git a/arch/arm/dts/mt7622-bpi-r64.dts b/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
similarity index 100%
rename from arch/arm/dts/mt7622-bpi-r64.dts
rename to arch/arm/dts/mt7622-bananapi-bpi-r64.dts
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v6 6/7] arm: dts: mt7622: add USB nodes
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
                   ` (4 preceding siblings ...)
  2020-08-20 14:37 ` [PATCH v6 5/7] arm: dts: rename mt7622-bpi-r64.dts Frank Wunderlich
@ 2020-08-20 14:37 ` Frank Wunderlich
  2020-08-25 12:17   ` Tom Rini
  2020-08-20 14:37 ` [PATCH v6 7/7] arm: dts: mt7623: " Frank Wunderlich
  2020-08-22 16:50 ` [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
  7 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

Add DTS nodes for MT7622/BPI-R64

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
v1->v2:
 - remove clk25m as it's not needed
---
 arch/arm/dts/mt7622-bananapi-bpi-r64.dts |  8 ++++
 arch/arm/dts/mt7622-rfb.dts              |  8 ++++
 arch/arm/dts/mt7622.dtsi                 | 56 ++++++++++++++++++++++++
 3 files changed, 72 insertions(+)

diff --git a/arch/arm/dts/mt7622-bananapi-bpi-r64.dts b/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
index 51287cea3a..4f2f04851d 100644
--- a/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
@@ -244,3 +244,11 @@
 		output-low;
 	};
 };
+
+&ssusb {
+	status = "okay";
+};
+
+&u3phy {
+	status = "okay";
+};
diff --git a/arch/arm/dts/mt7622-rfb.dts b/arch/arm/dts/mt7622-rfb.dts
index 317fc78abd..ef7d0f0270 100644
--- a/arch/arm/dts/mt7622-rfb.dts
+++ b/arch/arm/dts/mt7622-rfb.dts
@@ -222,3 +222,11 @@
 		full-duplex;
 	};
 };
+
+&ssusb {
+	status = "okay";
+};
+
+&u3phy {
+       status = "okay";
+};
diff --git a/arch/arm/dts/mt7622.dtsi b/arch/arm/dts/mt7622.dtsi
index c43ad65702..d888545809 100644
--- a/arch/arm/dts/mt7622.dtsi
+++ b/arch/arm/dts/mt7622.dtsi
@@ -192,6 +192,14 @@
 		status = "disabled";
 	};
 
+	ssusbsys: ssusbsys at 1a000000 {
+		compatible = "mediatek,mt7622-ssusbsys",
+			     "syscon";
+		reg = <0x1a000000 0x1000>;
+		#clock-cells = <1>;
+		#reset-cells = <1>;
+	};
+
 	pciesys: pciesys at 1a100800 {
 		compatible = "mediatek,mt7622-pciesys", "syscon";
 		reg = <0x1a100800 0x1000>;
@@ -302,6 +310,54 @@
 		};
 	};
 
+	ssusb: usb at 1a0c0000 {
+		compatible = "mediatek,mt7622-xhci",
+			     "mediatek,mtk-xhci";
+		reg = <0x1a0c0000 0x01000>,
+		      <0x1a0c4700 0x0100>;
+		reg-names = "mac", "ippc";
+		interrupts = <GIC_SPI 232 IRQ_TYPE_LEVEL_LOW>;
+		power-domains = <&scpsys MT7629_POWER_DOMAIN_HIF1>;
+		clocks = <&ssusbsys CLK_SSUSB_SYS_EN>,
+			 <&ssusbsys CLK_SSUSB_REF_EN>,
+			 <&ssusbsys CLK_SSUSB_MCU_EN>,
+			 <&ssusbsys CLK_SSUSB_DMA_EN>;
+		clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck";
+		phys = <&u2port0 PHY_TYPE_USB2>,
+		       <&u3port0 PHY_TYPE_USB3>,
+		       <&u2port1 PHY_TYPE_USB2>;
+		status = "disabled";
+	};
+
+	u3phy: usb-phy at 1a0c4000 {
+		compatible = "mediatek,mt7622-u3phy",
+			     "mediatek,generic-tphy-v1";
+		reg = <0x1a0c4000 0x700>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		status = "disabled";
+
+		u2port0: usb-phy at 1a0c4800 {
+			reg = <0x1a0c4800 0x0100>;
+			#phy-cells = <1>;
+			clocks = <&ssusbsys CLK_SSUSB_U2_PHY_EN>;
+			clock-names = "ref";
+		};
+
+		u3port0: usb-phy at 1a0c4900 {
+			reg = <0x1a0c4900 0x0700>;
+			#phy-cells = <1>;
+		};
+
+		u2port1: usb-phy at 1a0c5000 {
+			reg = <0x1a0c5000 0x0100>;
+			#phy-cells = <1>;
+			clocks = <&ssusbsys CLK_SSUSB_U2_PHY_1P_EN>;
+			clock-names = "ref";
+		};
+	};
+
 	ethsys: syscon at 1b000000 {
 		compatible = "mediatek,mt7622-ethsys", "syscon";
 		reg = <0x1b000000 0x1000>;
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v6 7/7] arm: dts: mt7623: add USB nodes
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
                   ` (5 preceding siblings ...)
  2020-08-20 14:37 ` [PATCH v6 6/7] arm: dts: mt7622: add USB nodes Frank Wunderlich
@ 2020-08-20 14:37 ` Frank Wunderlich
  2020-08-25 12:17   ` Tom Rini
  2020-08-22 16:50 ` [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
  7 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-20 14:37 UTC (permalink / raw)
  To: u-boot

From: Frank Wunderlich <frank-w@public-files.de>

This adds USB nodes for MT7623/BPI-R2

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 arch/arm/dts/mt7623.dtsi                 | 46 ++++++++++++++++++++++++
 arch/arm/dts/mt7623n-bananapi-bpi-r2.dts | 16 +++++++++
 2 files changed, 62 insertions(+)

diff --git a/arch/arm/dts/mt7623.dtsi b/arch/arm/dts/mt7623.dtsi
index 0452889ef8..b5a802552b 100644
--- a/arch/arm/dts/mt7623.dtsi
+++ b/arch/arm/dts/mt7623.dtsi
@@ -352,6 +352,52 @@
 		};
 	};
 
+	usb1: usb at 1a1c0000 {
+		compatible = "mediatek,mt7623-xhci", "mediatek,mtk-xhci";
+		reg = <0x1a1c0000 0x1000>, <0x1a1c4700 0x0100>;
+		reg-names = "mac", "ippc";
+		power-domains = <&scpsys MT7623_POWER_DOMAIN_HIF>;
+		clocks = <&hifsys CLK_HIFSYS_USB0PHY>, <&topckgen CLK_TOP_ETHIF_SEL>;
+		clock-names = "sys_ck", "ref_ck";
+		phys = <&u2port0 PHY_TYPE_USB2>, <&u3port0 PHY_TYPE_USB3>;
+		status = "disabled";
+	};
+
+	u3phy1: usb-phy at 1a1c4000 {
+		compatible = "mediatek,mt7623-tphy", "mediatek,generic-tphy-v1";
+
+		reg = <0x1a1c4000 0x0700>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges;
+		status = "disabled";
+
+		u2port0: usb-phy at 1a1c4800 {
+			reg = <0x1a1c4800 0x0100>;
+			#phy-cells = <1>;
+			clocks = <&topckgen CLK_TOP_USB_PHY48M>;
+			clock-names = "ref";
+		};
+
+		u3port0: usb-phy at 1a1c4900 {
+			reg = <0x1a1c4900 0x0700>;
+			#phy-cells = <1>;
+			clocks = <&clk26m>;
+			clock-names = "ref";
+		};
+	};
+
+	usb2: usb at 1a240000 {
+		compatible = "mediatek,mt7623-xhci", "mediatek,mtk-xhci";
+		reg = <0x1a240000 0x1000>, <0x1a244700 0x0100>;
+		reg-names = "mac", "ippc";
+		power-domains = <&scpsys MT7623_POWER_DOMAIN_HIF>;
+		clocks = <&hifsys CLK_HIFSYS_USB1PHY>, <&topckgen CLK_TOP_ETHIF_SEL>;
+		clock-names = "sys_ck", "ref_ck";
+		phys = <&u2port1 PHY_TYPE_USB2>, <&u3port1 PHY_TYPE_USB3>;
+		status = "disabled";
+	};
+
 	u3phy2: usb-phy at 1a244000 {
 		compatible = "mediatek,generic-tphy-v1";
 		reg = <0x1a244000 0x0700>;
diff --git a/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts
index bcedcf20f1..ef07369627 100644
--- a/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts
@@ -248,3 +248,19 @@
 	pinctrl-0 = <&uart2_pins_a>;
 	status = "okay";
 };
+
+&usb1 {
+	status = "okay";
+};
+
+&u3phy1 {
+	status = "okay";
+};
+
+&usb2 {
+	status = "okay";
+};
+
+&u3phy2 {
+	status = "okay";
+};
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622>
  2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
                   ` (6 preceding siblings ...)
  2020-08-20 14:37 ` [PATCH v6 7/7] arm: dts: mt7623: " Frank Wunderlich
@ 2020-08-22 16:50 ` Frank Wunderlich
  7 siblings, 0 replies; 16+ messages in thread
From: Frank Wunderlich @ 2020-08-22 16:50 UTC (permalink / raw)
  To: u-boot

Pcie is already merged and usb is v2

https://patchwork.ozlabs.org/project/uboot/list/?series=195873
regards Frank

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 1/7] phy: mtk-tphy: make shared reg optional for v1
  2020-08-20 14:37 ` [PATCH v6 1/7] phy: mtk-tphy: make shared reg optional for v1 Frank Wunderlich
@ 2020-08-25 12:16   ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-08-25 12:16 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 20, 2020 at 04:37:52PM +0200, Frank Wunderlich wrote:

> From: Frank Wunderlich <frank-w@public-files.de>
> 
> make the shared reg optional when version is v1 for sata
> 
> Suggested-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200825/9ca4e8c7/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 2/7] reset: drop unnecessary comment for pciesys
  2020-08-20 14:37 ` [PATCH v6 2/7] reset: drop unnecessary comment for pciesys Frank Wunderlich
@ 2020-08-25 12:16   ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-08-25 12:16 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 20, 2020 at 04:37:53PM +0200, Frank Wunderlich wrote:

> From: Frank Wunderlich <frank-w@public-files.de>
> 
> after review from sam this comment should be removed
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200825/60e984b9/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 3/7] ahci: mediatek: fix copyright and author-lines
  2020-08-20 14:37 ` [PATCH v6 3/7] ahci: mediatek: fix copyright and author-lines Frank Wunderlich
@ 2020-08-25 12:16   ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-08-25 12:16 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 20, 2020 at 04:37:54PM +0200, Frank Wunderlich wrote:

> From: Frank Wunderlich <frank-w@public-files.de>
> 
> after review of sam copyright should be on one line and link should
> not between author lines
> 
> just remove the link and put ryder first as he is author of linux-driver
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200825/69811fc8/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 4/7] clk: mt7622: add needed clocks for ssusb-node
  2020-08-20 14:37 ` [PATCH v6 4/7] clk: mt7622: add needed clocks for ssusb-node Frank Wunderlich
@ 2020-08-25 12:16   ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-08-25 12:16 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 20, 2020 at 04:37:55PM +0200, Frank Wunderlich wrote:

> From: Frank Wunderlich <frank-w@public-files.de>
> 
> MT7622 needs additional clock definitions to work properly
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200825/eb4a631a/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 5/7] arm: dts: rename mt7622-bpi-r64.dts
  2020-08-20 14:37 ` [PATCH v6 5/7] arm: dts: rename mt7622-bpi-r64.dts Frank Wunderlich
@ 2020-08-25 12:17   ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-08-25 12:17 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 20, 2020 at 04:37:56PM +0200, Frank Wunderlich wrote:

> From: Frank Wunderlich <frank-w@public-files.de>
> 
> rename mt7622-bpi-r64.dts to mt7622-bananapi-bpi-r64.dts
> to follow naming convensions
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200825/43780bd5/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 6/7] arm: dts: mt7622: add USB nodes
  2020-08-20 14:37 ` [PATCH v6 6/7] arm: dts: mt7622: add USB nodes Frank Wunderlich
@ 2020-08-25 12:17   ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-08-25 12:17 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 20, 2020 at 04:37:57PM +0200, Frank Wunderlich wrote:

> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add DTS nodes for MT7622/BPI-R64
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200825/a3b20a26/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v6 7/7] arm: dts: mt7623: add USB nodes
  2020-08-20 14:37 ` [PATCH v6 7/7] arm: dts: mt7623: " Frank Wunderlich
@ 2020-08-25 12:17   ` Tom Rini
  0 siblings, 0 replies; 16+ messages in thread
From: Tom Rini @ 2020-08-25 12:17 UTC (permalink / raw)
  To: u-boot

On Thu, Aug 20, 2020 at 04:37:58PM +0200, Frank Wunderlich wrote:

> From: Frank Wunderlich <frank-w@public-files.de>
> 
> This adds USB nodes for MT7623/BPI-R2
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> Reviewed-by: Chunfeng Yun <chunfeng.yun@mediatek.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200825/86df8bc6/attachment.sig>

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-08-25 12:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 14:37 [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich
2020-08-20 14:37 ` [PATCH v6 1/7] phy: mtk-tphy: make shared reg optional for v1 Frank Wunderlich
2020-08-25 12:16   ` Tom Rini
2020-08-20 14:37 ` [PATCH v6 2/7] reset: drop unnecessary comment for pciesys Frank Wunderlich
2020-08-25 12:16   ` Tom Rini
2020-08-20 14:37 ` [PATCH v6 3/7] ahci: mediatek: fix copyright and author-lines Frank Wunderlich
2020-08-25 12:16   ` Tom Rini
2020-08-20 14:37 ` [PATCH v6 4/7] clk: mt7622: add needed clocks for ssusb-node Frank Wunderlich
2020-08-25 12:16   ` Tom Rini
2020-08-20 14:37 ` [PATCH v6 5/7] arm: dts: rename mt7622-bpi-r64.dts Frank Wunderlich
2020-08-25 12:17   ` Tom Rini
2020-08-20 14:37 ` [PATCH v6 6/7] arm: dts: mt7622: add USB nodes Frank Wunderlich
2020-08-25 12:17   ` Tom Rini
2020-08-20 14:37 ` [PATCH v6 7/7] arm: dts: mt7623: " Frank Wunderlich
2020-08-25 12:17   ` Tom Rini
2020-08-22 16:50 ` [PATCH v6 0/7] Add MTK AHCI driver, BPI-R64 dts and USB-Nodes for mt7622> Frank Wunderlich

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.