Skip to contentSkip to conversation

Add minimal MT8365 and MT8365-EVK support

PATCH Applied Bernhard Rosenkränzer 5 participants 10 messages Mar 9, 2023 – Oct 16, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v11 cover Add minimal MT8365 and MT8365-EVK support

v11:
- Fix typo in systimer (Thanks Angelo)

v10:
- Fix systimer properties (Thanks Amjad)
- Drop components of the patchset that have already been merged

v9:
- Fix a regression in v8 that broke the USB port
- Remove superfluous include in mt8365.dtsi
- Fix some naming issues pointed out by dtbs_check

v8:
- Add binding descriptions for mediatek,mt8365-systimer and

    mediatek,mt8365-uart

- Specify ranges with parameters for u3phy

v7:
- Update GIC information in mt8365.dtsi (thanks to Marc Zyngier for pointing out the problem)
- Adjust the timer to match the updated GIC information

v6:
- Add systimer in mt8365.dtsi
- Add I/D caches and L2 cache details in mt8365.dtsi
- Move bl31_secmon_reserved from mt8365.dtsi to mt8365-evk.dts
- Fix inconsistent indentation in mt8365-pinctrl example
- Further mt8365.dtsi cleanups
- Submit to additional maintainers spotted by get_maintainer.pl

v5:
- Reorder top-level entries in mediatek,mt8365-pinctrl.yaml to match example-schema
- Use consistent quotes

v4:
- Remove pins-are-numbered references that have been holding things up now that the patches removing it from dt-bindings have landed in linux-next

v3:
- Remove a number of components that are not yet supported (they will come back alongside the corresponding drivers)
- Address issues found by dt_binding_check (mostly fixing pinctrl bindings)
- Address issues pointed out in comments
- Reorder patches

v2:
- Add missing dt-bindings documentation
- Small cleanups addressing issues in v1 pointed out by Krzysztof Kozlowski

Bernhard Rosenkränzer (2):
dt-bindings: irq: mtk, sysirq: add support for mt8365
dt-bindings: serial: mediatek,uart: add MT8365

Fabien Parent (1):
arm64: dts: mediatek: Initial mt8365-evk support

 .../interrupt-controller/mediatek,sysirq.txt  |   1 +
 .../bindings/serial/mediatek,uart.yaml        |   1 +
 arch/arm64/boot/dts/mediatek/Makefile         |   1 +
 arch/arm64/boot/dts/mediatek/mt8365-evk.dts   | 168 ++++++++
 arch/arm64/boot/dts/mediatek/mt8365.dtsi      | 377 ++++++++++++++++++
 5 files changed, 548 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-evk.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365.dtsi
Signature · 1 line
2.40.0.rc2
#1 lore raw

PATCH v11 1/3 dt-bindings: irq: mtk, sysirq: add support for mt8365

Add binding documentation of mediatek,sysirq for mt8365 SoC.

---
 .../devicetree/bindings/interrupt-controller/mediatek,sysirq.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/mediatek,sysirq.txt +1 -0
index 84ced3f4179b9..3ffc60184e445 100644
@@ -25,6 +25,7 @@ Required properties:
 	"mediatek,mt6577-sysirq": for MT6577
 	"mediatek,mt2712-sysirq", "mediatek,mt6577-sysirq": for MT2712
 	"mediatek,mt2701-sysirq", "mediatek,mt6577-sysirq": for MT2701
+	"mediatek,mt8365-sysirq", "mediatek,mt6577-sysirq": for MT8365
 - interrupt-controller : Identifies the node as an interrupt controller
 - #interrupt-cells : Use the same format as specified by GIC in arm,gic.txt.
 - reg: Physical base address of the intpol registers and length of memory
Signature · 1 line
2.40.0.rc2
maintainer Applied
#2 lore raw

Re: [PATCH v11 1/3] dt-bindings: irq: mtk, sysirq: add support for mt8365

Quoted 9 lines · Bernhard Rosenkränzer

Add binding documentation of mediatek,sysirq for mt8365 SoC.

---
 .../devicetree/bindings/interrupt-controller/mediatek,sysirq.txt | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks.

#3 lore raw

PATCH v11 2/3 dt-bindings: serial: mediatek,uart: add MT8365

In reply to Bernhard Rosenkränzer

Add binding description for mediatek,mt8365-uart

---
 Documentation/devicetree/bindings/serial/mediatek,uart.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/mediatek,uart.yaml +1 -0
index fe098d98af6ee..303d02ca4e1ba 100644
@@ -45,6 +45,7 @@ properties:
               - mediatek,mt8188-uart
               - mediatek,mt8192-uart
               - mediatek,mt8195-uart
+              - mediatek,mt8365-uart
               - mediatek,mt8516-uart
           - const: mediatek,mt6577-uart
 
Signature · 1 line
2.40.0.rc2
maintainer Applied
#4 lore raw

Re: [PATCH v11 2/3] dt-bindings: serial: mediatek,uart: add MT8365

Quoted 9 lines · Bernhard Rosenkränzer

Add binding description for mediatek,mt8365-uart

---
 Documentation/devicetree/bindings/serial/mediatek,uart.yaml | 1 +
 1 file changed, 1 insertion(+)

Applied, thanks!

#5 lore raw

PATCH v11 3/3 arm64: dts: mediatek: Initial mt8365-evk support

In reply to Bernhard Rosenkränzer

From: Fabien Parent <[email protected]>

This adds minimal support for the Mediatek 8365 SOC and the EVK reference board, allowing the board to boot to initramfs with serial port I/O.

[[email protected]: Removed parts depending on drivers that aren't upstream yet, cleanups, add CPU cache layout, add systimer, fix GIC]
[[email protected]: Fix systimer properties]
---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 168 +++++++++
 arch/arm64/boot/dts/mediatek/mt8365.dtsi    | 377 ++++++++++++++++++++
 3 files changed, 546 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-evk.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365.dtsi
arch/arm64/boot/dts/mediatek/Makefile +1 -0
index d5cd7b3e09cf5..c99c3372a4b5e 100644
@@ -52,4 +52,5 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r2.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-cherry-tomato-r3.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-demo.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8195-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8365-evk.dtb
 dtb-$(CONFIG_ARCH_MEDIATEK) += mt8516-pumpkin.dtb
arch/arm64/boot/dts/mediatek/mt8365-evk.dts new file +168 -0

168 lines not on this page · raw message

arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +377 -0

377 lines not on this page · raw message

Signature · 1 line
2.40.0.rc2
#6 lore raw

Re: [PATCH v11 3/3] arm64: dts: mediatek: Initial mt8365-evk support

Quoted 5 lines · Bernhard Rosenkränzer

From: Fabien Parent <[email protected]>

This adds minimal support for the Mediatek 8365 SOC and the EVK reference board, allowing the board to boot to initramfs with serial port I/O.

Quoted 8 lines
[[email protected]: Removed parts depending on drivers that aren't upstream yet, cleanups, add CPU cache layout, add systimer, fix GIC]
[[email protected]: Fix systimer properties]

Tested (again) and things are working well. This is the last patch remaining to be merged. As soon as this lands in linux-next, I'll add this board to my KernelCI lab.

Kevin

maintainer
#7 lore raw

Re: [PATCH v11 3/3] arm64: dts: mediatek: Initial mt8365-evk support

Quoted 16 lines · Kevin Hilman
Quoted 5 lines · Bernhard Rosenkränzer

From: Fabien Parent <[email protected]>

This adds minimal support for the Mediatek 8365 SOC and the EVK reference board, allowing the board to boot to initramfs with serial port I/O.

Quoted 8 lines
[[email protected]: Removed parts depending on drivers that aren't upstream yet, cleanups, add CPU cache layout, add systimer, fix GIC]
[[email protected]: Fix systimer properties]
Quoted 4 lines

Tested (again) and things are working well. This is the last patch remaining to be merged. As soon as this lands in linux-next, I'll add this board to my KernelCI lab.

Applied now, thanks for testing. This should show up in linux-next in the next couple of days.

Regards,
Matthias

#8 lore raw

Re: [PATCH v11 3/3] arm64: dts: mediatek: Initial mt8365-evk support

In reply to Bernhard Rosenkränzer

Hello,

A bit of a late reply, but I've just noticed an issue related to this patch.

Quoted 20 lines · Bernhard Rosenkränzer

From: Fabien Parent <[email protected]>

This adds minimal support for the Mediatek 8365 SOC and the EVK reference board, allowing the board to boot to initramfs with serial port I/O.

[[email protected]: Removed parts depending on drivers that aren't upstream yet, cleanups, add CPU cache layout, add systimer, fix GIC]
[[email protected]: Fix systimer properties]
---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 168 +++++++++
 arch/arm64/boot/dts/mediatek/mt8365.dtsi    | 377 ++++++++++++++++++++
 3 files changed, 546 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-evk.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365.dtsi

[snip]

Quoted 19 lines
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +13 -0
new file mode 100644
index 0000000000000..351197c453c91
@@ -0,0 +1,377 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * (C) 2018 MediaTek Inc.
+ * Copyright (C) 2022 BayLibre SAS
+ * Fabien Parent <[email protected]>
+ * Bernhard Rosenkränzer <[email protected]>
+ */
+#include <dt-bindings/clock/mediatek,mt8365-clk.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/phy/phy.h>
+
+/ {

[snip]

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +1 -0
+	soc {

[snip]

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +5 -0
+		infracfg: syscon@10001000 {
+			compatible = "mediatek,mt8365-infracfg", "syscon";
+			reg = <0 0x10001000 0 0x1000>;
+			#clock-cells = <1>;
+		};

[snip]

arch/arm64/boot/dts/mediatek/mt8365.dtsi line 210

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +5 -0
+		infracfg_nao: infracfg@1020e000 {
+			compatible = "mediatek,mt8365-infracfg", "syscon";
+			reg = <0 0x1020e000 0 0x1000>;
+			#clock-cells = <1>;
+		};

These two nodes cause the infracfg clocks to be registered twice, with the second probe of the clk-mt8365 driver failing with -EEXIST.

[snip]

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +1 -0
+	};

[snip]

Quoted 1 line

+};

Signature · 3 lines
Regards,

Laurent Pinchart
#9 lore raw

Re: [PATCH v11 3/3] arm64: dts: mediatek: Initial mt8365-evk support

Quoted 63 lines · Laurent Pinchart

Hello,

A bit of a late reply, but I've just noticed an issue related to this patch.

Quoted 20 lines · Bernhard Rosenkränzer

From: Fabien Parent <[email protected]>

This adds minimal support for the Mediatek 8365 SOC and the EVK reference board, allowing the board to boot to initramfs with serial port I/O.

[[email protected]: Removed parts depending on drivers that aren't upstream yet, cleanups, add CPU cache layout, add systimer, fix GIC]
[[email protected]: Fix systimer properties]
---
 arch/arm64/boot/dts/mediatek/Makefile       |   1 +
 arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 168 +++++++++
 arch/arm64/boot/dts/mediatek/mt8365.dtsi    | 377 ++++++++++++++++++++
 3 files changed, 546 insertions(+)
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365-evk.dts
 create mode 100644 arch/arm64/boot/dts/mediatek/mt8365.dtsi

[snip]

Quoted 19 lines
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +13 -0
new file mode 100644
index 0000000000000..351197c453c91
@@ -0,0 +1,377 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * (C) 2018 MediaTek Inc.
+ * Copyright (C) 2022 BayLibre SAS
+ * Fabien Parent <[email protected]>
+ * Bernhard Rosenkränzer <[email protected]>
+ */
+#include <dt-bindings/clock/mediatek,mt8365-clk.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/phy/phy.h>
+
+/ {

[snip]

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +1 -0
+	soc {

[snip]

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +5 -0
+		infracfg: syscon@10001000 {
+			compatible = "mediatek,mt8365-infracfg", "syscon";
+			reg = <0 0x10001000 0 0x1000>;
+			#clock-cells = <1>;
+		};

[snip]

Quoted 8 lines

arch/arm64/boot/dts/mediatek/mt8365.dtsi line 210

Quoted 5 lines
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +5 -0
+		infracfg_nao: infracfg@1020e000 {
+			compatible = "mediatek,mt8365-infracfg", "syscon";
+			reg = <0 0x1020e000 0 0x1000>;
+			#clock-cells = <1>;
+		};

These two nodes cause the infracfg clocks to be registered twice, with the second probe of the clk-mt8365 driver failing with -EEXIST.

These are the messages printed by v6.6-rc6:

[    0.540254] Failed to register clk ifr_pmic_tmr: -EEXIST
[    0.541003] clk-mt8365: probe of 1020e000.infracfg failed with error -17
Quoted 7 lines

[snip]

Quoted 1 line
arch/arm64/boot/dts/mediatek/mt8365.dtsi new file +1 -0
+	};

[snip]

Quoted 1 line

+};

Signature · 3 lines
Regards,

Laurent Pinchart