Re: [PATCH v6 4/4] arm64: dts: Add MediaTek MT8188 dts and evaluation board and Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 24/10/2023 11:36, Chen-Yu Tsai wrote:
Hi,

On Mon, Oct 23, 2023 at 6:55 PM Alexandre Mergnat <amergnat@xxxxxxxxxxxx> wrote:



On 23/10/2023 10:38, Jason-ch Chen wrote:
From: jason-ch chen <Jason-ch.Chen@xxxxxxxxxxxx>

MT8188 is a SoC based on 64bit ARMv8 architecture. It contains 6 CA55
and 2 CA78 cores. MT8188 share many HW IP with MT65xx series.

We add basic chip support for MediaTek MT8188 on evaluation board.

Signed-off-by: jason-ch chen <Jason-ch.Chen@xxxxxxxxxxxx>
---
   arch/arm64/boot/dts/mediatek/Makefile       |   1 +
   arch/arm64/boot/dts/mediatek/mt8188-evb.dts | 387 ++++++++
   arch/arm64/boot/dts/mediatek/mt8188.dtsi    | 956 ++++++++++++++++++++
   3 files changed, 1344 insertions(+)
   create mode 100644 arch/arm64/boot/dts/mediatek/mt8188-evb.dts
   create mode 100644 arch/arm64/boot/dts/mediatek/mt8188.dtsi

diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile
index e6e7592a3645..8900b939ed52 100644
--- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku0.dtb
   dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-kukui-krane-sku176.dtb
   dtb-$(CONFIG_ARCH_MEDIATEK) += mt8183-pumpkin.dtb
   dtb-$(CONFIG_ARCH_MEDIATEK) += mt8186-evb.dtb
+dtb-$(CONFIG_ARCH_MEDIATEK) += mt8188-evb.dtb
   dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r1.dtb
   dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-hayato-r5-sku2.dtb
   dtb-$(CONFIG_ARCH_MEDIATEK) += mt8192-asurada-spherion-r0.dtb

..snip..


Order:


#address-cells = <1>;
#size-cells = <0>;

pinctrl-0 = <&nor_pins_default>;
pinctrl-names = "default";

I think pinctrl-names before pinctrl-* makes more sense. We declare the
names and by extension how many pinctrl-N entries are needed first. The
vast majority of the arm64 device tree files have pinctrl-names before
pinctrl-N. The only platform that exclusively has pinctrl-N before
pinctrl-names is amlogic.


AFAIK, people have it own logic explanation to justify order.
Personally, I use the dumb and generic one: pack related properties and alphabetical order.

Anyway, I don't have strong opinion of that

If there's a preference for a particular order platform-wide or tree-wide
then it should probably be documented somewhere?


I'm agree

status = "okay";

I think #address-cells and #size-cells belong at the end of the list,
even after "status", just before any child nodes. They describe
properties or requirements for the child nodes, not for the node they
sit in.

+
+     flash@0 {
+             compatible = "jedec,spi-nor";
+             reg = <0>;
+             spi-max-frequency = <52000000>;
+     };
+};
+

..snip..

+
+&pmic {
+     interrupts-extended = <&pio 222 IRQ_TYPE_LEVEL_HIGH>;
+};
+
+&scp {
+     memory-region = <&scp_mem_reserved>;
+     status = "okay";
+};
+
+&spi0 {
+     pinctrl-names = "default";
+     pinctrl-0 = <&spi0_pins>;

Order:

pinctrl-0 = <&spi0_pins>;
pinctrl-names = "default";

Please apply this to other nodes

See above.

ChenYu

+     status = "okay";
+};
+
+&spi1 {
+     pinctrl-names = "default";
+     pinctrl-0 = <&spi1_pins>;
+     status = "okay";
+};
+
+&spi2 {
+     pinctrl-names = "default";
+     pinctrl-0 = <&spi2_pins>;
+     status = "okay";
+};
+
+&u3phy0 {
+     status = "okay";
+};
+
+&u3phy1 {
+     status = "okay";
+};
+
+&u3phy2 {
+     status = "okay";
+};
+
+&uart0 {
+     pinctrl-names = "default";
+     pinctrl-0 = <&uart0_pins>;
+     status = "okay";
+};
+

..snip..

+             };
+     };
+};

After that:
Reviewed-by: Alexandre Mergnat <amergnat@xxxxxxxxxxxx>

--
Regards,
Alexandre

--
Regards,
Alexandre




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux