* [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support
@ 2025-01-27 13:40 Christian Marangi
2025-01-27 13:40 ` [PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format Christian Marangi
` (8 more replies)
0 siblings, 9 replies; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
This is the last batch of part to push actual support of
OF_UPSTREAM for the mediatek SoC.
The plan is to make the current downstream DTS on part with
upstream implementation so we can permit a gradual transition to
it while we don't cause any regression to any user.
This is to have the same node downstream and upstream.
Mediatek is working hard upstream to also push all the remaining
nodes.
All patch are the final changes after the pinctrl patch
merged previously.
All patch pass CI tests tested in this PR [0]
[0] https://github.com/u-boot/u-boot/pull/731
Christian Marangi (7):
pinctrl: mediatek: mt7981: rename reg-names to upstream linux format
pinctrl: mediatek: mt7986: rename reg-names to upstream linux format
mediatek: mt7986: move gpio-controller up and rename pinctrl to pio
pinctrl: mediatek: mt7988: rename reg-names to upstream linux format
mediatek: mt7988: move gpio-controller up and rename pinctrl to pio
mediatek: mt7981: move gpio-controller up and rename pinctrl to pio
arm: dts: mediatek: add PCIe node for MT7981
John Crispin (1):
arm: dts: mediatek: add USB nodes for MT7981
arch/arm/dts/mt7981-emmc-rfb.dts | 4 +-
arch/arm/dts/mt7981-rfb.dts | 4 +-
arch/arm/dts/mt7981-sd-rfb.dts | 4 +-
arch/arm/dts/mt7981.dtsi | 97 +++++++++++++++++++++--
arch/arm/dts/mt7986.dtsi | 14 ++--
arch/arm/dts/mt7986a-bpi-r3-sd.dts | 12 +--
arch/arm/dts/mt7986a-rfb.dts | 4 +-
arch/arm/dts/mt7986a-sd-rfb.dts | 4 +-
arch/arm/dts/mt7986b-rfb.dts | 4 +-
arch/arm/dts/mt7986b-sd-rfb.dts | 4 +-
arch/arm/dts/mt7988-rfb.dts | 2 +-
arch/arm/dts/mt7988-sd-rfb.dts | 2 +-
arch/arm/dts/mt7988.dtsi | 12 ++-
drivers/pinctrl/mediatek/pinctrl-mt7981.c | 5 +-
14 files changed, 125 insertions(+), 47 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:47 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 2/8] pinctrl: mediatek: mt7986: " Christian Marangi
` (7 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
Rename reg-names to upstream linux format. Upstream linux drop the
"_base". To make use of upstream DTSI, align to the upstream naming.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7981.dtsi | 6 +++---
drivers/pinctrl/mediatek/pinctrl-mt7981.c | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
index 2844ab010de..3c8b9ab0574 100644
--- a/arch/arm/dts/mt7981.dtsi
+++ b/arch/arm/dts/mt7981.dtsi
@@ -117,9 +117,9 @@
<0x11f00000 0x1000>,
<0x11f10000 0x1000>,
<0x1000b000 0x1000>;
- reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rm_base",
- "iocfg_rb_base", "iocfg_lb_base", "iocfg_bl_base",
- "iocfg_tm_base", "iocfg_tl_base", "eint";
+ reg-names = "gpio", "iocfg_rt", "iocfg_rm",
+ "iocfg_rb", "iocfg_lb", "iocfg_bl",
+ "iocfg_tm", "iocfg_tl", "eint";
gpio: gpio-controller {
gpio-controller;
#gpio-cells = <2>;
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
index 047e37bc9cd..d1c8afd9252 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
@@ -1012,8 +1012,9 @@ static const struct mtk_function_desc mt7981_functions[] = {
};
static const char *const mt7981_pinctrl_register_base_names[] = {
- "gpio_base", "iocfg_rt_base", "iocfg_rm_base", "iocfg_rb_base",
- "iocfg_lb_base", "iocfg_bl_base", "iocfg_tm_base", "iocfg_tl_base",
+ "gpio", "iocfg_rt", "iocfg_rm", "iocfg_rb",
+ "iocfg_lb", "iocfg_bl", "iocfg_tm", "iocfg_tl",
+ "eint",
};
static const struct mtk_pinctrl_soc mt7981_data = {
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/8] pinctrl: mediatek: mt7986: rename reg-names to upstream linux format
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
2025-01-27 13:40 ` [PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:47 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio Christian Marangi
` (6 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
Rename reg-names to upstream linux format. Upstream linux drop the
"_base". To make use of upstream DTSI, align to the upstream naming.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7986.dtsi | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/dts/mt7986.dtsi b/arch/arm/dts/mt7986.dtsi
index f871f2394c5..64ce45a6530 100644
--- a/arch/arm/dts/mt7986.dtsi
+++ b/arch/arm/dts/mt7986.dtsi
@@ -132,9 +132,9 @@
<0x11f00000 0x1000>,
<0x11f10000 0x1000>,
<0x1000b000 0x1000>;
- reg-names = "gpio_base", "iocfg_rt_base", "iocfg_rb_base",
- "iocfg_lt_base", "iocfg_lb_base", "iocfg_tr_base",
- "iocfg_tl_base", "eint";
+ reg-names = "gpio", "iocfg_rt", "iocfg_rb",
+ "iocfg_lt", "iocfg_lb", "iocfg_tr",
+ "iocfg_tl", "eint";
gpio: gpio-controller {
gpio-controller;
#gpio-cells = <2>;
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
2025-01-27 13:40 ` [PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format Christian Marangi
2025-01-27 13:40 ` [PATCH 2/8] pinctrl: mediatek: mt7986: " Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:49 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format Christian Marangi
` (5 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
Move gpio-controller up to pinctrl node and rename label to "pio" to
match the label used in upstream kernel linux.
Update any DTS that reference the pinctrl to follow the new naming and
structure.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7986.dtsi | 8 +++-----
arch/arm/dts/mt7986a-bpi-r3-sd.dts | 12 ++++++------
arch/arm/dts/mt7986a-rfb.dts | 4 ++--
arch/arm/dts/mt7986a-sd-rfb.dts | 4 ++--
arch/arm/dts/mt7986b-rfb.dts | 4 ++--
arch/arm/dts/mt7986b-sd-rfb.dts | 4 ++--
6 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/arch/arm/dts/mt7986.dtsi b/arch/arm/dts/mt7986.dtsi
index 64ce45a6530..b2c57098a5e 100644
--- a/arch/arm/dts/mt7986.dtsi
+++ b/arch/arm/dts/mt7986.dtsi
@@ -122,7 +122,7 @@
#clock-cells = <1>;
};
- pinctrl: pinctrl@1001f000 {
+ pio: pinctrl@1001f000 {
compatible = "mediatek,mt7986-pinctrl";
reg = <0x1001f000 0x1000>,
<0x11c30000 0x1000>,
@@ -135,10 +135,8 @@
reg-names = "gpio", "iocfg_rt", "iocfg_rb",
"iocfg_lt", "iocfg_lb", "iocfg_tr",
"iocfg_tl", "eint";
- gpio: gpio-controller {
- gpio-controller;
- #gpio-cells = <2>;
- };
+ gpio-controller;
+ #gpio-cells = <2>;
};
pwm: pwm@10048000 {
diff --git a/arch/arm/dts/mt7986a-bpi-r3-sd.dts b/arch/arm/dts/mt7986a-bpi-r3-sd.dts
index c156a813634..e01ae4c3dc7 100644
--- a/arch/arm/dts/mt7986a-bpi-r3-sd.dts
+++ b/arch/arm/dts/mt7986a-bpi-r3-sd.dts
@@ -38,12 +38,12 @@
factory {
label = "reset";
- gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
+ gpios = <&pio 9 GPIO_ACTIVE_LOW>;
};
wps {
label = "wps";
- gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ gpios = <&pio 10 GPIO_ACTIVE_LOW>;
};
};
@@ -52,12 +52,12 @@
led_status_green: green {
label = "green:status";
- gpios = <&gpio 69 GPIO_ACTIVE_HIGH>;
+ gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
};
led_status_blue: blue {
label = "blue:status";
- gpios = <&gpio 86 GPIO_ACTIVE_HIGH>;
+ gpios = <&pio 86 GPIO_ACTIVE_HIGH>;
};
};
@@ -78,7 +78,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -86,7 +86,7 @@
};
};
-&pinctrl {
+&pio {
spic_pins: spi1-pins-func-1 {
mux {
function = "spi";
diff --git a/arch/arm/dts/mt7986a-rfb.dts b/arch/arm/dts/mt7986a-rfb.dts
index 67d14a99dae..d4bbb23204a 100644
--- a/arch/arm/dts/mt7986a-rfb.dts
+++ b/arch/arm/dts/mt7986a-rfb.dts
@@ -57,7 +57,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -65,7 +65,7 @@
};
};
-&pinctrl {
+&pio {
spi_flash_pins: spi0-pins-func-1 {
mux {
function = "flash";
diff --git a/arch/arm/dts/mt7986a-sd-rfb.dts b/arch/arm/dts/mt7986a-sd-rfb.dts
index 4f8fa70ec99..11823e05bda 100644
--- a/arch/arm/dts/mt7986a-sd-rfb.dts
+++ b/arch/arm/dts/mt7986a-sd-rfb.dts
@@ -49,7 +49,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -57,7 +57,7 @@
};
};
-&pinctrl {
+&pio {
spi_flash_pins: spi0-pins-func-1 {
mux {
function = "flash";
diff --git a/arch/arm/dts/mt7986b-rfb.dts b/arch/arm/dts/mt7986b-rfb.dts
index f98b04ab140..0a731fe87fd 100644
--- a/arch/arm/dts/mt7986b-rfb.dts
+++ b/arch/arm/dts/mt7986b-rfb.dts
@@ -48,7 +48,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -56,7 +56,7 @@
};
};
-&pinctrl {
+&pio {
spi_flash_pins: spi0-pins-func-1 {
mux {
function = "flash";
diff --git a/arch/arm/dts/mt7986b-sd-rfb.dts b/arch/arm/dts/mt7986b-sd-rfb.dts
index ec80a2fb710..e5fb4d73e70 100644
--- a/arch/arm/dts/mt7986b-sd-rfb.dts
+++ b/arch/arm/dts/mt7986b-sd-rfb.dts
@@ -49,7 +49,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -57,7 +57,7 @@
};
};
-&pinctrl {
+&pio {
spi_flash_pins: spi0-pins-func-1 {
mux {
function = "flash";
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
` (2 preceding siblings ...)
2025-01-27 13:40 ` [PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:50 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio Christian Marangi
` (4 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
Rename reg-names to upstream linux format. Upstream linux drop the
"_base". To make use of upstream DTSI, align to the upstream naming.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7988.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/dts/mt7988.dtsi b/arch/arm/dts/mt7988.dtsi
index f2bfde547e6..ee2ad2dbe6e 100644
--- a/arch/arm/dts/mt7988.dtsi
+++ b/arch/arm/dts/mt7988.dtsi
@@ -119,8 +119,8 @@
<0 0x11e00000 0 0x1000>,
<0 0x11f00000 0 0x1000>,
<0 0x1000b000 0 0x1000>;
- reg-names = "gpio_base", "iocfg_tr_base", "iocfg_br_base",
- "iocfg_rb_base", "iocfg_lb_base", "iocfg_tl_base",
+ reg-names = "gpio", "iocfg_tr", "iocfg_br",
+ "iocfg_rb", "iocfg_lb", "iocfg_tl",
"eint";
gpio: gpio-controller {
gpio-controller;
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
` (3 preceding siblings ...)
2025-01-27 13:40 ` [PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:50 ` Weijie Gao (高惟杰)
2025-01-27 13:40 ` [PATCH 6/8] mediatek: mt7981: " Christian Marangi
` (3 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
Move gpio-controller up to pinctrl node and rename label to "pio" to
match the label used in upstream kernel linux.
Update any DTS that reference the pinctrl to follow the new naming and
structure.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7988-rfb.dts | 2 +-
arch/arm/dts/mt7988-sd-rfb.dts | 2 +-
arch/arm/dts/mt7988.dtsi | 8 +++-----
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/arm/dts/mt7988-rfb.dts b/arch/arm/dts/mt7988-rfb.dts
index 2579d7099fb..1694ef8d9c3 100644
--- a/arch/arm/dts/mt7988-rfb.dts
+++ b/arch/arm/dts/mt7988-rfb.dts
@@ -80,7 +80,7 @@
status = "disabled";
};
-&pinctrl {
+&pio {
i2c1_pins: i2c1-pins {
mux {
function = "i2c";
diff --git a/arch/arm/dts/mt7988-sd-rfb.dts b/arch/arm/dts/mt7988-sd-rfb.dts
index 38727a271b2..63e923137c2 100644
--- a/arch/arm/dts/mt7988-sd-rfb.dts
+++ b/arch/arm/dts/mt7988-sd-rfb.dts
@@ -53,7 +53,7 @@
};
};
-&pinctrl {
+&pio {
i2c1_pins: i2c1-pins {
mux {
function = "i2c";
diff --git a/arch/arm/dts/mt7988.dtsi b/arch/arm/dts/mt7988.dtsi
index ee2ad2dbe6e..2d57c6f5709 100644
--- a/arch/arm/dts/mt7988.dtsi
+++ b/arch/arm/dts/mt7988.dtsi
@@ -110,7 +110,7 @@
#clock-cells = <1>;
};
- pinctrl: pinctrl@1001f000 {
+ pio: pinctrl@1001f000 {
compatible = "mediatek,mt7988-pinctrl";
reg = <0 0x1001f000 0 0x1000>,
<0 0x11c10000 0 0x1000>,
@@ -122,10 +122,8 @@
reg-names = "gpio", "iocfg_tr", "iocfg_br",
"iocfg_rb", "iocfg_lb", "iocfg_tl",
"eint";
- gpio: gpio-controller {
- gpio-controller;
- #gpio-cells = <2>;
- };
+ gpio-controller;
+ #gpio-cells = <2>;
};
sgmiisys0: syscon@10060000 {
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/8] mediatek: mt7981: move gpio-controller up and rename pinctrl to pio
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
` (4 preceding siblings ...)
2025-01-27 13:40 ` [PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:50 ` Weijie Gao (高惟杰)
2025-01-27 13:40 ` [PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981 Christian Marangi
` (2 subsequent siblings)
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
Move gpio-controller up to pinctrl node and rename label to "pio" to
match the label used in upstream kernel linux.
Update any DTS that reference the pinctrl to follow the new naming and
structure.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7981-emmc-rfb.dts | 4 ++--
arch/arm/dts/mt7981-rfb.dts | 4 ++--
arch/arm/dts/mt7981-sd-rfb.dts | 4 ++--
arch/arm/dts/mt7981.dtsi | 8 +++-----
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/arch/arm/dts/mt7981-emmc-rfb.dts b/arch/arm/dts/mt7981-emmc-rfb.dts
index d6590f01cf8..67f178bc232 100644
--- a/arch/arm/dts/mt7981-emmc-rfb.dts
+++ b/arch/arm/dts/mt7981-emmc-rfb.dts
@@ -48,7 +48,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -56,7 +56,7 @@
};
};
-&pinctrl {
+&pio {
spic_pins: spi1-pins-func-1 {
mux {
function = "spi";
diff --git a/arch/arm/dts/mt7981-rfb.dts b/arch/arm/dts/mt7981-rfb.dts
index d6ebd6539c3..08e1b76b473 100644
--- a/arch/arm/dts/mt7981-rfb.dts
+++ b/arch/arm/dts/mt7981-rfb.dts
@@ -39,7 +39,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -47,7 +47,7 @@
};
};
-&pinctrl {
+&pio {
spi_flash_pins: spi0-pins-func-1 {
mux {
function = "flash";
diff --git a/arch/arm/dts/mt7981-sd-rfb.dts b/arch/arm/dts/mt7981-sd-rfb.dts
index 2adbc374725..2f43e65ac5b 100644
--- a/arch/arm/dts/mt7981-sd-rfb.dts
+++ b/arch/arm/dts/mt7981-sd-rfb.dts
@@ -48,7 +48,7 @@
mediatek,gmac-id = <0>;
phy-mode = "2500base-x";
mediatek,switch = "mt7531";
- reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
fixed-link {
speed = <2500>;
@@ -56,7 +56,7 @@
};
};
-&pinctrl {
+&pio {
spic_pins: spi1-pins-func-1 {
mux {
function = "spi";
diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
index 3c8b9ab0574..b2c4cd7b54a 100644
--- a/arch/arm/dts/mt7981.dtsi
+++ b/arch/arm/dts/mt7981.dtsi
@@ -106,7 +106,7 @@
bootph-all;
};
- pinctrl: pinctrl@11d00000 {
+ pio: pinctrl@11d00000 {
compatible = "mediatek,mt7981-pinctrl";
reg = <0x11d00000 0x1000>,
<0x11c00000 0x1000>,
@@ -120,10 +120,8 @@
reg-names = "gpio", "iocfg_rt", "iocfg_rm",
"iocfg_rb", "iocfg_lb", "iocfg_bl",
"iocfg_tm", "iocfg_tl", "eint";
- gpio: gpio-controller {
- gpio-controller;
- #gpio-cells = <2>;
- };
+ gpio-controller;
+ #gpio-cells = <2>;
};
pwm: pwm@10048000 {
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
` (5 preceding siblings ...)
2025-01-27 13:40 ` [PATCH 6/8] mediatek: mt7981: " Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:51 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 8/8] arm: dts: mediatek: add PCIe node " Christian Marangi
2025-02-04 19:43 ` [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Tom Rini
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
From: John Crispin <john@phrozen.org>
Add USB PHY nodes for MT7981. These are needed for USB support and also
for PCIe support as the u3 PHY can also be used for PHY.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7981.dtsi | 48 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
index b2c4cd7b54a..2360c6bbdca 100644
--- a/arch/arm/dts/mt7981.dtsi
+++ b/arch/arm/dts/mt7981.dtsi
@@ -6,6 +6,7 @@
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/phy/phy.h>
#include <dt-bindings/clock/mt7981-clk.h>
#include <dt-bindings/reset/mt7629-reset.h>
#include <dt-bindings/pinctrl/mt65xx.h>
@@ -315,4 +316,51 @@
status = "disabled";
};
+ xhci: xhci@11200000 {
+ compatible = "mediatek,mt7981-xhci",
+ "mediatek,mtk-xhci";
+ reg = <0x11200000 0x2e00>,
+ <0x11203e00 0x0100>;
+ reg-names = "mac", "ippc";
+ interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&u2port0 PHY_TYPE_USB2>,
+ <&u3port0 PHY_TYPE_USB3>;
+ clocks = <&infracfg CLK_INFRA_IUSB_SYS_CK>,
+ <&infracfg CLK_INFRA_IUSB_CK>,
+ <&infracfg CLK_INFRA_IUSB_133_CK>,
+ <&infracfg CLK_INFRA_IUSB_66M_CK>,
+ <&topckgen CLK_TOP_U2U3_XHCI_SEL>;
+ clock-names = "sys_ck",
+ "ref_ck",
+ "mcu_ck",
+ "dma_ck",
+ "xhci_ck";
+ mediatek,u3p-dis-msk = <0x1>;
+ status = "okay";
+ };
+
+ usbtphy: usb-phy@11e10000 {
+ compatible = "mediatek,mt7981",
+ "mediatek,generic-tphy-v2";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "okay";
+
+ u2port0: usb-phy@11e10000 {
+ reg = <0x11e10000 0x700>;
+ clocks = <&topckgen CLK_TOP_USB_FRMCNT_SEL>;
+ clock-names = "ref";
+ #phy-cells = <1>;
+ status = "okay";
+ };
+
+ u3port0: usb-phy@11e10700 {
+ reg = <0x11e10700 0x900>;
+ clocks = <&topckgen CLK_TOP_USB3_PHY_SEL>;
+ clock-names = "ref";
+ #phy-cells = <1>;
+ mediatek,syscon-type = <&topmisc 0x218 0>;
+ status = "okay";
+ };
+ };
};
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 8/8] arm: dts: mediatek: add PCIe node for MT7981
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
` (6 preceding siblings ...)
2025-01-27 13:40 ` [PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981 Christian Marangi
@ 2025-01-27 13:40 ` Christian Marangi
2025-01-31 6:51 ` Weijie Gao
2025-02-04 19:43 ` [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Tom Rini
8 siblings, 1 reply; 18+ messages in thread
From: Christian Marangi @ 2025-01-27 13:40 UTC (permalink / raw)
To: Tom Rini, Ryder Lee, Weijie Gao, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, Christian Marangi,
SkyLake.Huang, John Crispin, Dong Huang, u-boot
Add PCIe node for MT7981 with all the required properties to make PCIe
work.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
arch/arm/dts/mt7981.dtsi | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
index 2360c6bbdca..5b4cadc22f7 100644
--- a/arch/arm/dts/mt7981.dtsi
+++ b/arch/arm/dts/mt7981.dtsi
@@ -339,6 +339,41 @@
status = "okay";
};
+ pcie: pcie@11280000 {
+ compatible = "mediatek,mt8192-pcie";
+ device_type = "pci";
+ reg = <0x11280000 0x4000>;
+ reg-names = "pcie-mac";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&infracfg CLK_INFRA_IPCIE_CK>,
+ <&infracfg CLK_INFRA_IPCIE_PIPE_CK>,
+ <&infracfg CLK_INFRA_IPCIER_CK>,
+ <&infracfg CLK_INFRA_IPCIEB_CK>;
+ clock-names = "pl_250m", "tl_26m", "peri_26m", "top_133m";
+ phys = <&u3port0 PHY_TYPE_PCIE>;
+ phy-names = "pcie-phy";
+ bus-range = <0x00 0xff>;
+ ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>;
+
+ #interrupt-cells = <1>;
+
+ interrupt-map-mask = <0 0 0 7>;
+ interrupt-map = <0 0 0 1 &pcie_intc 0>,
+ <0 0 0 2 &pcie_intc 1>,
+ <0 0 0 3 &pcie_intc 2>,
+ <0 0 0 4 &pcie_intc 3>;
+
+ status = "disabled";
+
+ pcie_intc: interrupt-controller {
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ #address-cells = <0>;
+ };
+ };
+
usbtphy: usb-phy@11e10000 {
compatible = "mediatek,mt7981",
"mediatek,generic-tphy-v2";
--
2.47.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format
2025-01-27 13:40 ` [PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format Christian Marangi
@ 2025-01-31 6:47 ` Weijie Gao
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao @ 2025-01-31 6:47 UTC (permalink / raw)
To: Christian Marangi, Tom Rini, Ryder Lee, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, SkyLake.Huang, John Crispin,
Dong Huang, u-boot
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Rename reg-names to upstream linux format. Upstream linux drop the
> "_base". To make use of upstream DTSI, align to the upstream naming.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7981.dtsi | 6 +++---
> drivers/pinctrl/mediatek/pinctrl-mt7981.c | 5 +++--
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
> index 2844ab010de..3c8b9ab0574 100644
> --- a/arch/arm/dts/mt7981.dtsi
> +++ b/arch/arm/dts/mt7981.dtsi
> @@ -117,9 +117,9 @@
> <0x11f00000 0x1000>,
> <0x11f10000 0x1000>,
> <0x1000b000 0x1000>;
> - reg-names = "gpio_base", "iocfg_rt_base",
> "iocfg_rm_base",
> - "iocfg_rb_base", "iocfg_lb_base",
> "iocfg_bl_base",
> - "iocfg_tm_base", "iocfg_tl_base", "eint";
> + reg-names = "gpio", "iocfg_rt", "iocfg_rm",
> + "iocfg_rb", "iocfg_lb", "iocfg_bl",
> + "iocfg_tm", "iocfg_tl", "eint";
> gpio: gpio-controller {
> gpio-controller;
> #gpio-cells = <2>;
> diff --git a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
> b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
> index 047e37bc9cd..d1c8afd9252 100644
> --- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
> +++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
> @@ -1012,8 +1012,9 @@ static const struct mtk_function_desc
> mt7981_functions[] = {
> };
>
> static const char *const mt7981_pinctrl_register_base_names[] = {
> - "gpio_base", "iocfg_rt_base", "iocfg_rm_base",
> "iocfg_rb_base",
> - "iocfg_lb_base", "iocfg_bl_base", "iocfg_tm_base",
> "iocfg_tl_base",
> + "gpio", "iocfg_rt", "iocfg_rm", "iocfg_rb",
> + "iocfg_lb", "iocfg_bl", "iocfg_tm", "iocfg_tl",
> + "eint",
> };
>
> static const struct mtk_pinctrl_soc mt7981_data = {
> --
> 2.47.1
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 2/8] pinctrl: mediatek: mt7986: rename reg-names to upstream linux format
2025-01-27 13:40 ` [PATCH 2/8] pinctrl: mediatek: mt7986: " Christian Marangi
@ 2025-01-31 6:47 ` Weijie Gao
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao @ 2025-01-31 6:47 UTC (permalink / raw)
To: Christian Marangi, Tom Rini, Ryder Lee, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, SkyLake.Huang, John Crispin,
Dong Huang, u-boot
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Rename reg-names to upstream linux format. Upstream linux drop the
> "_base". To make use of upstream DTSI, align to the upstream naming.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7986.dtsi | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/dts/mt7986.dtsi b/arch/arm/dts/mt7986.dtsi
> index f871f2394c5..64ce45a6530 100644
> --- a/arch/arm/dts/mt7986.dtsi
> +++ b/arch/arm/dts/mt7986.dtsi
> @@ -132,9 +132,9 @@
> <0x11f00000 0x1000>,
> <0x11f10000 0x1000>,
> <0x1000b000 0x1000>;
> - reg-names = "gpio_base", "iocfg_rt_base",
> "iocfg_rb_base",
> - "iocfg_lt_base", "iocfg_lb_base",
> "iocfg_tr_base",
> - "iocfg_tl_base", "eint";
> + reg-names = "gpio", "iocfg_rt", "iocfg_rb",
> + "iocfg_lt", "iocfg_lb", "iocfg_tr",
> + "iocfg_tl", "eint";
> gpio: gpio-controller {
> gpio-controller;
> #gpio-cells = <2>;
> --
> 2.47.1
>
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio
2025-01-27 13:40 ` [PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio Christian Marangi
@ 2025-01-31 6:49 ` Weijie Gao
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao @ 2025-01-31 6:49 UTC (permalink / raw)
To: Christian Marangi, Tom Rini, Ryder Lee, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, SkyLake.Huang, John Crispin,
Dong Huang, u-boot
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Move gpio-controller up to pinctrl node and rename label to "pio" to
> match the label used in upstream kernel linux.
>
> Update any DTS that reference the pinctrl to follow the new naming
> and
> structure.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7986.dtsi | 8 +++-----
> arch/arm/dts/mt7986a-bpi-r3-sd.dts | 12 ++++++------
> arch/arm/dts/mt7986a-rfb.dts | 4 ++--
> arch/arm/dts/mt7986a-sd-rfb.dts | 4 ++--
> arch/arm/dts/mt7986b-rfb.dts | 4 ++--
> arch/arm/dts/mt7986b-sd-rfb.dts | 4 ++--
> 6 files changed, 17 insertions(+), 19 deletions(-)
>
> diff --git a/arch/arm/dts/mt7986.dtsi b/arch/arm/dts/mt7986.dtsi
> index 64ce45a6530..b2c57098a5e 100644
> --- a/arch/arm/dts/mt7986.dtsi
> +++ b/arch/arm/dts/mt7986.dtsi
> @@ -122,7 +122,7 @@
> #clock-cells = <1>;
> };
>
> - pinctrl: pinctrl@1001f000 {
> + pio: pinctrl@1001f000 {
> compatible = "mediatek,mt7986-pinctrl";
> reg = <0x1001f000 0x1000>,
> <0x11c30000 0x1000>,
> @@ -135,10 +135,8 @@
> reg-names = "gpio", "iocfg_rt", "iocfg_rb",
> "iocfg_lt", "iocfg_lb", "iocfg_tr",
> "iocfg_tl", "eint";
> - gpio: gpio-controller {
> - gpio-controller;
> - #gpio-cells = <2>;
> - };
> + gpio-controller;
> + #gpio-cells = <2>;
> };
>
> pwm: pwm@10048000 {
> diff --git a/arch/arm/dts/mt7986a-bpi-r3-sd.dts
> b/arch/arm/dts/mt7986a-bpi-r3-sd.dts
> index c156a813634..e01ae4c3dc7 100644
> --- a/arch/arm/dts/mt7986a-bpi-r3-sd.dts
> +++ b/arch/arm/dts/mt7986a-bpi-r3-sd.dts
> @@ -38,12 +38,12 @@
>
> factory {
> label = "reset";
> - gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
> + gpios = <&pio 9 GPIO_ACTIVE_LOW>;
> };
>
> wps {
> label = "wps";
> - gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
> + gpios = <&pio 10 GPIO_ACTIVE_LOW>;
> };
> };
>
> @@ -52,12 +52,12 @@
>
> led_status_green: green {
> label = "green:status";
> - gpios = <&gpio 69 GPIO_ACTIVE_HIGH>;
> + gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
> };
>
> led_status_blue: blue {
> label = "blue:status";
> - gpios = <&gpio 86 GPIO_ACTIVE_HIGH>;
> + gpios = <&pio 86 GPIO_ACTIVE_HIGH>;
> };
> };
>
> @@ -78,7 +78,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -86,7 +86,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spic_pins: spi1-pins-func-1 {
> mux {
> function = "spi";
> diff --git a/arch/arm/dts/mt7986a-rfb.dts b/arch/arm/dts/mt7986a-
> rfb.dts
> index 67d14a99dae..d4bbb23204a 100644
> --- a/arch/arm/dts/mt7986a-rfb.dts
> +++ b/arch/arm/dts/mt7986a-rfb.dts
> @@ -57,7 +57,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -65,7 +65,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spi_flash_pins: spi0-pins-func-1 {
> mux {
> function = "flash";
> diff --git a/arch/arm/dts/mt7986a-sd-rfb.dts b/arch/arm/dts/mt7986a-
> sd-rfb.dts
> index 4f8fa70ec99..11823e05bda 100644
> --- a/arch/arm/dts/mt7986a-sd-rfb.dts
> +++ b/arch/arm/dts/mt7986a-sd-rfb.dts
> @@ -49,7 +49,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -57,7 +57,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spi_flash_pins: spi0-pins-func-1 {
> mux {
> function = "flash";
> diff --git a/arch/arm/dts/mt7986b-rfb.dts b/arch/arm/dts/mt7986b-
> rfb.dts
> index f98b04ab140..0a731fe87fd 100644
> --- a/arch/arm/dts/mt7986b-rfb.dts
> +++ b/arch/arm/dts/mt7986b-rfb.dts
> @@ -48,7 +48,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -56,7 +56,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spi_flash_pins: spi0-pins-func-1 {
> mux {
> function = "flash";
> diff --git a/arch/arm/dts/mt7986b-sd-rfb.dts b/arch/arm/dts/mt7986b-
> sd-rfb.dts
> index ec80a2fb710..e5fb4d73e70 100644
> --- a/arch/arm/dts/mt7986b-sd-rfb.dts
> +++ b/arch/arm/dts/mt7986b-sd-rfb.dts
> @@ -49,7 +49,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -57,7 +57,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spi_flash_pins: spi0-pins-func-1 {
> mux {
> function = "flash";
> --
> 2.47.1
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format
2025-01-27 13:40 ` [PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format Christian Marangi
@ 2025-01-31 6:50 ` Weijie Gao
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao @ 2025-01-31 6:50 UTC (permalink / raw)
To: Christian Marangi, Tom Rini, Ryder Lee, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, SkyLake.Huang, John Crispin,
Dong Huang, u-boot
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Rename reg-names to upstream linux format. Upstream linux drop the
> "_base". To make use of upstream DTSI, align to the upstream naming.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7988.dtsi | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/dts/mt7988.dtsi b/arch/arm/dts/mt7988.dtsi
> index f2bfde547e6..ee2ad2dbe6e 100644
> --- a/arch/arm/dts/mt7988.dtsi
> +++ b/arch/arm/dts/mt7988.dtsi
> @@ -119,8 +119,8 @@
> <0 0x11e00000 0 0x1000>,
> <0 0x11f00000 0 0x1000>,
> <0 0x1000b000 0 0x1000>;
> - reg-names = "gpio_base", "iocfg_tr_base",
> "iocfg_br_base",
> - "iocfg_rb_base", "iocfg_lb_base",
> "iocfg_tl_base",
> + reg-names = "gpio", "iocfg_tr", "iocfg_br",
> + "iocfg_rb", "iocfg_lb", "iocfg_tl",
> "eint";
> gpio: gpio-controller {
> gpio-controller;
> --
> 2.47.1
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio
2025-01-27 13:40 ` [PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio Christian Marangi
@ 2025-01-31 6:50 ` Weijie Gao (高惟杰)
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao (高惟杰) @ 2025-01-31 6:50 UTC (permalink / raw)
To: SkyLake Huang (黃啟澤),
Sam Shih (史碩三),
Chunfeng Yun (云春峰), john@phrozen.org,
u-boot@lists.denx.de, trini@konsulko.com,
Dong Huang (黄栋), ansuelsmth@gmail.com,
GSS_MTK_Uboot_upstream, Ryder Lee
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Move gpio-controller up to pinctrl node and rename label to "pio" to
> match the label used in upstream kernel linux.
>
> Update any DTS that reference the pinctrl to follow the new naming
> and
> structure.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7988-rfb.dts | 2 +-
> arch/arm/dts/mt7988-sd-rfb.dts | 2 +-
> arch/arm/dts/mt7988.dtsi | 8 +++-----
> 3 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/dts/mt7988-rfb.dts b/arch/arm/dts/mt7988-
> rfb.dts
> index 2579d7099fb..1694ef8d9c3 100644
> --- a/arch/arm/dts/mt7988-rfb.dts
> +++ b/arch/arm/dts/mt7988-rfb.dts
> @@ -80,7 +80,7 @@
> status = "disabled";
> };
>
> -&pinctrl {
> +&pio {
> i2c1_pins: i2c1-pins {
> mux {
> function = "i2c";
> diff --git a/arch/arm/dts/mt7988-sd-rfb.dts b/arch/arm/dts/mt7988-sd-
> rfb.dts
> index 38727a271b2..63e923137c2 100644
> --- a/arch/arm/dts/mt7988-sd-rfb.dts
> +++ b/arch/arm/dts/mt7988-sd-rfb.dts
> @@ -53,7 +53,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> i2c1_pins: i2c1-pins {
> mux {
> function = "i2c";
> diff --git a/arch/arm/dts/mt7988.dtsi b/arch/arm/dts/mt7988.dtsi
> index ee2ad2dbe6e..2d57c6f5709 100644
> --- a/arch/arm/dts/mt7988.dtsi
> +++ b/arch/arm/dts/mt7988.dtsi
> @@ -110,7 +110,7 @@
> #clock-cells = <1>;
> };
>
> - pinctrl: pinctrl@1001f000 {
> + pio: pinctrl@1001f000 {
> compatible = "mediatek,mt7988-pinctrl";
> reg = <0 0x1001f000 0 0x1000>,
> <0 0x11c10000 0 0x1000>,
> @@ -122,10 +122,8 @@
> reg-names = "gpio", "iocfg_tr", "iocfg_br",
> "iocfg_rb", "iocfg_lb", "iocfg_tl",
> "eint";
> - gpio: gpio-controller {
> - gpio-controller;
> - #gpio-cells = <2>;
> - };
> + gpio-controller;
> + #gpio-cells = <2>;
> };
>
> sgmiisys0: syscon@10060000 {
> --
> 2.47.1
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 6/8] mediatek: mt7981: move gpio-controller up and rename pinctrl to pio
2025-01-27 13:40 ` [PATCH 6/8] mediatek: mt7981: " Christian Marangi
@ 2025-01-31 6:50 ` Weijie Gao (高惟杰)
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao (高惟杰) @ 2025-01-31 6:50 UTC (permalink / raw)
To: SkyLake Huang (黃啟澤),
Sam Shih (史碩三),
Chunfeng Yun (云春峰), john@phrozen.org,
u-boot@lists.denx.de, trini@konsulko.com,
Dong Huang (黄栋), ansuelsmth@gmail.com,
GSS_MTK_Uboot_upstream, Ryder Lee
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Move gpio-controller up to pinctrl node and rename label to "pio" to
> match the label used in upstream kernel linux.
>
> Update any DTS that reference the pinctrl to follow the new naming
> and
> structure.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7981-emmc-rfb.dts | 4 ++--
> arch/arm/dts/mt7981-rfb.dts | 4 ++--
> arch/arm/dts/mt7981-sd-rfb.dts | 4 ++--
> arch/arm/dts/mt7981.dtsi | 8 +++-----
> 4 files changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/dts/mt7981-emmc-rfb.dts b/arch/arm/dts/mt7981-
> emmc-rfb.dts
> index d6590f01cf8..67f178bc232 100644
> --- a/arch/arm/dts/mt7981-emmc-rfb.dts
> +++ b/arch/arm/dts/mt7981-emmc-rfb.dts
> @@ -48,7 +48,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -56,7 +56,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spic_pins: spi1-pins-func-1 {
> mux {
> function = "spi";
> diff --git a/arch/arm/dts/mt7981-rfb.dts b/arch/arm/dts/mt7981-
> rfb.dts
> index d6ebd6539c3..08e1b76b473 100644
> --- a/arch/arm/dts/mt7981-rfb.dts
> +++ b/arch/arm/dts/mt7981-rfb.dts
> @@ -39,7 +39,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -47,7 +47,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spi_flash_pins: spi0-pins-func-1 {
> mux {
> function = "flash";
> diff --git a/arch/arm/dts/mt7981-sd-rfb.dts b/arch/arm/dts/mt7981-sd-
> rfb.dts
> index 2adbc374725..2f43e65ac5b 100644
> --- a/arch/arm/dts/mt7981-sd-rfb.dts
> +++ b/arch/arm/dts/mt7981-sd-rfb.dts
> @@ -48,7 +48,7 @@
> mediatek,gmac-id = <0>;
> phy-mode = "2500base-x";
> mediatek,switch = "mt7531";
> - reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
> + reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
>
> fixed-link {
> speed = <2500>;
> @@ -56,7 +56,7 @@
> };
> };
>
> -&pinctrl {
> +&pio {
> spic_pins: spi1-pins-func-1 {
> mux {
> function = "spi";
> diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
> index 3c8b9ab0574..b2c4cd7b54a 100644
> --- a/arch/arm/dts/mt7981.dtsi
> +++ b/arch/arm/dts/mt7981.dtsi
> @@ -106,7 +106,7 @@
> bootph-all;
> };
>
> - pinctrl: pinctrl@11d00000 {
> + pio: pinctrl@11d00000 {
> compatible = "mediatek,mt7981-pinctrl";
> reg = <0x11d00000 0x1000>,
> <0x11c00000 0x1000>,
> @@ -120,10 +120,8 @@
> reg-names = "gpio", "iocfg_rt", "iocfg_rm",
> "iocfg_rb", "iocfg_lb", "iocfg_bl",
> "iocfg_tm", "iocfg_tl", "eint";
> - gpio: gpio-controller {
> - gpio-controller;
> - #gpio-cells = <2>;
> - };
> + gpio-controller;
> + #gpio-cells = <2>;
> };
>
> pwm: pwm@10048000 {
> --
> 2.47.1
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981
2025-01-27 13:40 ` [PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981 Christian Marangi
@ 2025-01-31 6:51 ` Weijie Gao
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao @ 2025-01-31 6:51 UTC (permalink / raw)
To: Christian Marangi, Tom Rini, Ryder Lee, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, SkyLake.Huang, John Crispin,
Dong Huang, u-boot
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> From: John Crispin <john@phrozen.org>
>
> Add USB PHY nodes for MT7981. These are needed for USB support and
> also
> for PCIe support as the u3 PHY can also be used for PHY.
>
> Signed-off-by: John Crispin <john@phrozen.org>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7981.dtsi | 48
> ++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
> index b2c4cd7b54a..2360c6bbdca 100644
> --- a/arch/arm/dts/mt7981.dtsi
> +++ b/arch/arm/dts/mt7981.dtsi
> @@ -6,6 +6,7 @@
>
> #include <dt-bindings/interrupt-controller/irq.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> +#include <dt-bindings/phy/phy.h>
> #include <dt-bindings/clock/mt7981-clk.h>
> #include <dt-bindings/reset/mt7629-reset.h>
> #include <dt-bindings/pinctrl/mt65xx.h>
> @@ -315,4 +316,51 @@
> status = "disabled";
> };
>
> + xhci: xhci@11200000 {
> + compatible = "mediatek,mt7981-xhci",
> + "mediatek,mtk-xhci";
> + reg = <0x11200000 0x2e00>,
> + <0x11203e00 0x0100>;
> + reg-names = "mac", "ippc";
> + interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
> + phys = <&u2port0 PHY_TYPE_USB2>,
> + <&u3port0 PHY_TYPE_USB3>;
> + clocks = <&infracfg CLK_INFRA_IUSB_SYS_CK>,
> + <&infracfg CLK_INFRA_IUSB_CK>,
> + <&infracfg CLK_INFRA_IUSB_133_CK>,
> + <&infracfg CLK_INFRA_IUSB_66M_CK>,
> + <&topckgen CLK_TOP_U2U3_XHCI_SEL>;
> + clock-names = "sys_ck",
> + "ref_ck",
> + "mcu_ck",
> + "dma_ck",
> + "xhci_ck";
> + mediatek,u3p-dis-msk = <0x1>;
> + status = "okay";
> + };
> +
> + usbtphy: usb-phy@11e10000 {
> + compatible = "mediatek,mt7981",
> + "mediatek,generic-tphy-v2";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + status = "okay";
> +
> + u2port0: usb-phy@11e10000 {
> + reg = <0x11e10000 0x700>;
> + clocks = <&topckgen CLK_TOP_USB_FRMCNT_SEL>;
> + clock-names = "ref";
> + #phy-cells = <1>;
> + status = "okay";
> + };
> +
> + u3port0: usb-phy@11e10700 {
> + reg = <0x11e10700 0x900>;
> + clocks = <&topckgen CLK_TOP_USB3_PHY_SEL>;
> + clock-names = "ref";
> + #phy-cells = <1>;
> + mediatek,syscon-type = <&topmisc 0x218 0>;
> + status = "okay";
> + };
> + };
> };
> --
> 2.47.1
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 8/8] arm: dts: mediatek: add PCIe node for MT7981
2025-01-27 13:40 ` [PATCH 8/8] arm: dts: mediatek: add PCIe node " Christian Marangi
@ 2025-01-31 6:51 ` Weijie Gao
0 siblings, 0 replies; 18+ messages in thread
From: Weijie Gao @ 2025-01-31 6:51 UTC (permalink / raw)
To: Christian Marangi, Tom Rini, Ryder Lee, Chunfeng Yun,
GSS_MTK_Uboot_upstream, Sam Shih, SkyLake.Huang, John Crispin,
Dong Huang, u-boot
On Mon, 2025-01-27 at 14:40 +0100, Christian Marangi wrote:
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
>
>
> Add PCIe node for MT7981 with all the required properties to make
> PCIe
> work.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> arch/arm/dts/mt7981.dtsi | 35 +++++++++++++++++++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
> index 2360c6bbdca..5b4cadc22f7 100644
> --- a/arch/arm/dts/mt7981.dtsi
> +++ b/arch/arm/dts/mt7981.dtsi
> @@ -339,6 +339,41 @@
> status = "okay";
> };
>
> + pcie: pcie@11280000 {
> + compatible = "mediatek,mt8192-pcie";
> + device_type = "pci";
> + reg = <0x11280000 0x4000>;
> + reg-names = "pcie-mac";
> + #address-cells = <3>;
> + #size-cells = <2>;
> + interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&infracfg CLK_INFRA_IPCIE_CK>,
> + <&infracfg CLK_INFRA_IPCIE_PIPE_CK>,
> + <&infracfg CLK_INFRA_IPCIER_CK>,
> + <&infracfg CLK_INFRA_IPCIEB_CK>;
> + clock-names = "pl_250m", "tl_26m", "peri_26m",
> "top_133m";
> + phys = <&u3port0 PHY_TYPE_PCIE>;
> + phy-names = "pcie-phy";
> + bus-range = <0x00 0xff>;
> + ranges = <0x82000000 0 0x20000000 0x20000000 0
> 0x10000000>;
> +
> + #interrupt-cells = <1>;
> +
> + interrupt-map-mask = <0 0 0 7>;
> + interrupt-map = <0 0 0 1 &pcie_intc 0>,
> + <0 0 0 2 &pcie_intc 1>,
> + <0 0 0 3 &pcie_intc 2>,
> + <0 0 0 4 &pcie_intc 3>;
> +
> + status = "disabled";
> +
> + pcie_intc: interrupt-controller {
> + interrupt-controller;
> + #interrupt-cells = <1>;
> + #address-cells = <0>;
> + };
> + };
> +
> usbtphy: usb-phy@11e10000 {
> compatible = "mediatek,mt7981",
> "mediatek,generic-tphy-v2";
> --
> 2.47.1
>
Thanks!
Reviewed-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Weijie Gao <weijie.gao@mediatek.com>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
` (7 preceding siblings ...)
2025-01-27 13:40 ` [PATCH 8/8] arm: dts: mediatek: add PCIe node " Christian Marangi
@ 2025-02-04 19:43 ` Tom Rini
8 siblings, 0 replies; 18+ messages in thread
From: Tom Rini @ 2025-02-04 19:43 UTC (permalink / raw)
To: Ryder Lee, Weijie Gao, Chunfeng Yun, GSS_MTK_Uboot_upstream,
Sam Shih, SkyLake.Huang, John Crispin, Dong Huang, u-boot,
Christian Marangi
On Mon, 27 Jan 2025 14:40:37 +0100, Christian Marangi wrote:
> This is the last batch of part to push actual support of
> OF_UPSTREAM for the mediatek SoC.
>
> The plan is to make the current downstream DTS on part with
> upstream implementation so we can permit a gradual transition to
> it while we don't cause any regression to any user.
>
> [...]
Applied to u-boot/master, thanks!
--
Tom
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2025-02-04 19:43 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27 13:40 [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Christian Marangi
2025-01-27 13:40 ` [PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format Christian Marangi
2025-01-31 6:47 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 2/8] pinctrl: mediatek: mt7986: " Christian Marangi
2025-01-31 6:47 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio Christian Marangi
2025-01-31 6:49 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format Christian Marangi
2025-01-31 6:50 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio Christian Marangi
2025-01-31 6:50 ` Weijie Gao (高惟杰)
2025-01-27 13:40 ` [PATCH 6/8] mediatek: mt7981: " Christian Marangi
2025-01-31 6:50 ` Weijie Gao (高惟杰)
2025-01-27 13:40 ` [PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981 Christian Marangi
2025-01-31 6:51 ` Weijie Gao
2025-01-27 13:40 ` [PATCH 8/8] arm: dts: mediatek: add PCIe node " Christian Marangi
2025-01-31 6:51 ` Weijie Gao
2025-02-04 19:43 ` [PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox