From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C704C433EF for ; Thu, 14 Oct 2021 15:32:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D80C60E54 for ; Thu, 14 Oct 2021 15:32:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232323AbhJNPeo (ORCPT ); Thu, 14 Oct 2021 11:34:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbhJNPem (ORCPT ); Thu, 14 Oct 2021 11:34:42 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E26FBC061570; Thu, 14 Oct 2021 08:32:36 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id v17so20706184wrv.9; Thu, 14 Oct 2021 08:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=iE/MtUVPAfoMVFLe0BXKKnnsIlilqyTpauMIjvCAd0A=; b=QuoKls4ob5V7G/zDS4y5xc0zYlQmDCZKj9bYDfrblv4udCW8q1yts8pi/Jjm1dO3Fu E5U1GUDm4ra3ewyBLuu+0D4rwAEKG68Mmb/IGY7LhAE0IZiWbRDC8wVq+LRT6dn5f1On 1bvC3inOUu5YFtD/GcwyELXzb9aLiExswCnVsSMXoZ4ELaVi794vso5ZVd47IjM4i3Bf ILXWW+lPl3P/SSOI2OmLq/5ZWohImz1VmkFIW11WyWo9048EnNAW0x/rztf5A92ZLmW5 chk6xTwEYJUQHLFL9/MZ2mAxB7VN/v80RdrJlYd+Q+N+a3NKV9rqqfzGffSpQPQNhmx5 2fKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=iE/MtUVPAfoMVFLe0BXKKnnsIlilqyTpauMIjvCAd0A=; b=ukflHLbdmX70PkgcmqrJGvZ2a0yKILON/mc0ES4C0Dx/W8YOzGMZhlSfgRAFBAeZ8s sFkP6MNZLH9usnBDDH8ItRgsahkBADt6mMDyIdLMxAzRrWWqpNqWLN1pxfXObiuG9y7E 8ieqxeRRd+iNKLlGfFM55NvSwYlkdeeZ5n8U2O0qkS3QfL+LbT2YtsTvBhT4Kq34E/5D SsAIcfm3hDHnNmYZjoKbsemGFjYrx4Cn9npfdhOw8WwwC3Rz/5oU80ke4eF7lUsq6BJ/ bjezSi6h/H/8Msgp/99gOCQsW2yR+abZw4JZJRg2fwd2N6kSETSeHb285rnPOfzLUwYx ffNQ== X-Gm-Message-State: AOAM5314nkkeoVZ5nGax/MpaB1R8UxI0L+QOoxdwSiOJ1ED43etNylE7 5+MFc9eP58zoQIW2cCCENmA= X-Google-Smtp-Source: ABdhPJyOk2ECVUNy43amtlSABt9O2pdQxjs72C1Nu7v3KW3Eul1e5U1a0tGmGLCVF7PRiLVRQHk9iw== X-Received: by 2002:a1c:a712:: with SMTP id q18mr6520597wme.23.1634225555417; Thu, 14 Oct 2021 08:32:35 -0700 (PDT) Received: from ?IPV6:2620:113:80c0:8000:c::779? (nat0.nue.suse.com. [2001:67c:2178:4000::1111]) by smtp.gmail.com with ESMTPSA id m4sm3005600wrz.45.2021.10.14.08.32.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Oct 2021 08:32:35 -0700 (PDT) Message-ID: <632e8d11-269c-d329-abf4-5d462aac4df4@gmail.com> Date: Thu, 14 Oct 2021 17:32:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [PATCH v6 3/3] arm64: dts: mediatek: add basic mt7986b support Content-Language: en-US To: Sam Shih , Rob Herring , Hsin-Yi Wang , Enric Balletbo i Serra , Fabien Parent , Seiya Wang , Sean Wang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: John Crispin , Ryder Lee References: <20211014074403.17346-1-sam.shih@mediatek.com> <20211014074403.17346-4-sam.shih@mediatek.com> From: Matthias Brugger In-Reply-To: <20211014074403.17346-4-sam.shih@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/10/2021 09:44, Sam Shih wrote: > Add basic chip support for Mediatek mt7986b, include > basic uart nodes, rng node and watchdog node. > > Add cpu node, timer node, gic node, psci and reserved-memory node > for ARM Trusted Firmware. > > Signed-off-by: Sam Shih > > --- > v6: separate basic part into a single patch series > v5: follow reviewr's comment: removed clock freqency node in timer due to > we have set CNTFRQ_EL0 in ATF firmware, and also corrected GICD range > v4: added missing gic register bases, and fixed range of GICR > v3: used the stdout-path instead of console=ttyS0 > v2: modified clock and uart node due to clock driver updated > --- > arch/arm64/boot/dts/mediatek/Makefile | 1 + > arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 26 ++++ > arch/arm64/boot/dts/mediatek/mt7986b.dtsi | 149 +++++++++++++++++++ > 3 files changed, 176 insertions(+) > create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts > create mode 100644 arch/arm64/boot/dts/mediatek/mt7986b.dtsi > > diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/mediatek/Makefile > index e6c3a73b9e4a..d555e43d1ccc 100644 > --- a/arch/arm64/boot/dts/mediatek/Makefile > +++ b/arch/arm64/boot/dts/mediatek/Makefile > @@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt6797-x20-dev.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-rfb1.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7622-bananapi-bpi-r64.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-rfb.dtb > +dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986b-rfb.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8167-pumpkin.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm.dtb > dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana.dtb > diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts > new file mode 100644 > index 000000000000..95a202505bb2 > --- /dev/null > +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts > @@ -0,0 +1,26 @@ > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > +/* > + * Copyright (C) 2021 MediaTek Inc. > + * Author: Sam.Shih > + */ > + > +/dts-v1/; > +#include "mt7986b.dtsi" > + > +/ { > + model = "MediaTek MT7986b RFB"; > + compatible = "mediatek,mt7986b-rfb"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:115200n8"; > + bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512"; > + }; > +}; > + > +&uart0 { > + status = "okay"; > +}; We are missing a memory node here. I wonder how the board was able to boot without memory. Did you test this series? Regards, Matthias > diff --git a/arch/arm64/boot/dts/mediatek/mt7986b.dtsi b/arch/arm64/boot/dts/mediatek/mt7986b.dtsi > new file mode 100644 > index 000000000000..2b8e0a382398 > --- /dev/null > +++ b/arch/arm64/boot/dts/mediatek/mt7986b.dtsi > @@ -0,0 +1,149 @@ > +// SPDX-License-Identifier: (GPL-2.0 OR MIT) > +/* > + * Copyright (C) 2021 MediaTek Inc. > + * Author: Sam.Shih > + */ > + > +#include > +#include > + > +/ { > + compatible = "mediatek,mt7986b"; > + interrupt-parent = <&gic>; > + #address-cells = <2>; > + #size-cells = <2>; > + > + system_clk: dummy40m { > + compatible = "fixed-clock"; > + clock-frequency = <40000000>; > + #clock-cells = <0>; > + }; > + > + cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + cpu0: cpu@0 { > + device_type = "cpu"; > + compatible = "arm,cortex-a53"; > + enable-method = "psci"; > + reg = <0x0>; > + #cooling-cells = <2>; > + }; > + > + cpu1: cpu@1 { > + device_type = "cpu"; > + compatible = "arm,cortex-a53"; > + enable-method = "psci"; > + reg = <0x1>; > + #cooling-cells = <2>; > + }; > + > + cpu2: cpu@2 { > + device_type = "cpu"; > + compatible = "arm,cortex-a53"; > + enable-method = "psci"; > + reg = <0x2>; > + #cooling-cells = <2>; > + }; > + > + cpu3: cpu@3 { > + device_type = "cpu"; > + enable-method = "psci"; > + compatible = "arm,cortex-a53"; > + reg = <0x3>; > + #cooling-cells = <2>; > + }; > + }; > + > + psci { > + compatible = "arm,psci-0.2"; > + method = "smc"; > + }; > + > + reserved-memory { > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; > + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */ > + secmon_reserved: secmon@43000000 { > + reg = <0 0x43000000 0 0x30000>; > + no-map; > + }; > + }; > + > + timer { > + compatible = "arm,armv8-timer"; > + interrupt-parent = <&gic>; > + interrupts = , > + , > + , > + ; > + }; > + > + soc { > + #address-cells = <2>; > + #size-cells = <2>; > + compatible = "simple-bus"; > + ranges; > + > + gic: interrupt-controller@c000000 { > + compatible = "arm,gic-v3"; > + #interrupt-cells = <3>; > + interrupt-parent = <&gic>; > + interrupt-controller; > + reg = <0 0x0c000000 0 0x10000>, /* GICD */ > + <0 0x0c080000 0 0x80000>, /* GICR */ > + <0 0x0c400000 0 0x2000>, /* GICC */ > + <0 0x0c410000 0 0x1000>, /* GICH */ > + <0 0x0c420000 0 0x2000>; /* GICV */ > + interrupts = ; > + }; > + > + watchdog: watchdog@1001c000 { > + compatible = "mediatek,mt7986-wdt", > + "mediatek,mt6589-wdt"; > + reg = <0 0x1001c000 0 0x1000>; > + interrupts = ; > + #reset-cells = <1>; > + status = "disabled"; > + }; > + > + trng: trng@1020f000 { > + compatible = "mediatek,mt7986-rng", > + "mediatek,mt7623-rng"; > + reg = <0 0x1020f000 0 0x100>; > + clocks = <&system_clk>; > + clock-names = "rng"; > + status = "disabled"; > + }; > + > + uart0: serial@11002000 { > + compatible = "mediatek,mt7986-uart", > + "mediatek,mt6577-uart"; > + reg = <0 0x11002000 0 0x400>; > + interrupts = ; > + clocks = <&system_clk>; > + status = "disabled"; > + }; > + > + uart1: serial@11003000 { > + compatible = "mediatek,mt7986-uart", > + "mediatek,mt6577-uart"; > + reg = <0 0x11003000 0 0x400>; > + interrupts = ; > + clocks = <&system_clk>; > + status = "disabled"; > + }; > + > + uart2: serial@11004000 { > + compatible = "mediatek,mt7986-uart", > + "mediatek,mt6577-uart"; > + reg = <0 0x11004000 0 0x400>; > + interrupts = ; > + clocks = <&system_clk>; > + status = "disabled"; > + }; > + > + }; > + > +}; >