devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Po-Kai Chi <pk.chi@mediatek.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <wsd_upstream@mediatek.com>,
	CC Hwang <cc.hwang@mediatek.com>,
	Po-Kai Chi <pk.chi@mediatek.com>
Subject: [PATCH v2 3/4] arm64: dts: add DRAMC node for MT6779
Date: Fri, 16 Apr 2021 17:32:17 +0800	[thread overview]
Message-ID: <1618565538-6972-4-git-send-email-pk.chi@mediatek.com> (raw)
In-Reply-To: <1618565538-6972-1-git-send-email-pk.chi@mediatek.com>

Add the DRAMC node for the DRAMC kernel driver.

Properties are divided into three categories:

- Platform DTS:
    MediaTek DRAMC platform common part.

- Project DTS:
    Runtime filled in by bootloader according to the board
    hardware configuration.

- Driver level:
    Hardware-specific register settings, encapsulated as
    compatible data for better DTS compatibility.

Signed-off-by: Po-Kai Chi <pk.chi@mediatek.com>
---
 arch/arm64/boot/dts/mediatek/mt6779-evb.dts |    9 +++++++++
 arch/arm64/boot/dts/mediatek/mt6779.dtsi    |   18 ++++++++++++++++++
 2 files changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt6779-evb.dts b/arch/arm64/boot/dts/mediatek/mt6779-evb.dts
index 164f5cb..5d2dde7 100644
--- a/arch/arm64/boot/dts/mediatek/mt6779-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt6779-evb.dts
@@ -29,3 +29,12 @@
 &uart0 {
 	status = "okay";
 };
+
+&dramc {
+	mediatek,dram-type = <0>;
+	mediatek,channel-cnt = <2>;
+	mediatek,rank-cnt = <2>;
+	mediatek,rank-size = <0x0 0x0>;
+	mediatek,mr-cnt = <1>;
+	mediatek,mr = <0x5 0xff>;
+};
diff --git a/arch/arm64/boot/dts/mediatek/mt6779.dtsi b/arch/arm64/boot/dts/mediatek/mt6779.dtsi
index 9bdf514..28492a0 100644
--- a/arch/arm64/boot/dts/mediatek/mt6779.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt6779.dtsi
@@ -206,6 +206,24 @@
 			clock-names = "devapc-infra-clock";
 		};
 
+		dramc: dramc@10230000 {
+			compatible = "mediatek,mt6779-dramc";
+			reg = <0 0x10230000 0 0x2000>, /* DRAMC AO CHA */
+				<0 0x10240000 0 0x2000>, /* DRAMC AO CHB */
+				<0 0x10234000 0 0x1000>, /* DRAMC NAO CHA */
+				<0 0x10244000 0 0x1000>, /* DRAMC NAO CHB */
+				<0 0x10238000 0 0x2000>, /* DDRPHY AO CHA */
+				<0 0x10248000 0 0x2000>; /* DDRPHY AO CHB */
+			mediatek,support-channel-cnt = <2>;
+			mediatek,freq-cnt = <6>;
+			mediatek,freq-step = <3718 3733>,
+				<3094 3200>,
+				<2392 2400>,
+				<1534 1600>,
+				<1196 1200>,
+				<754 800>;
+		};
+
 		uart0: serial@11002000 {
 			compatible = "mediatek,mt6779-uart",
 				     "mediatek,mt6577-uart";
-- 
1.7.9.5


  parent reply	other threads:[~2021-04-16  9:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16  9:32 [PATCH v2] memory: mediatek: add DRAM controller driver Po-Kai Chi
2021-04-16  9:32 ` [PATCH v2 1/4] dt-bindings: memory: Add binding for MediaTek DRAM Controller Po-Kai Chi
2021-05-04 14:00   ` Krzysztof Kozlowski
2021-04-16  9:32 ` [PATCH v2 2/4] memory: mediatek: add DRAM controller driver Po-Kai Chi
2021-04-20 18:28   ` Rob Herring
2021-04-27  5:13     ` Po-Kai Chi
2021-05-04 14:05   ` Krzysztof Kozlowski
2021-04-16  9:32 ` Po-Kai Chi [this message]
2021-04-16  9:32 ` [PATCH v2 4/4] arm64: defconfig: Enable MediaTek DRAMC common driver Po-Kai Chi
2021-05-04 14:06   ` Krzysztof Kozlowski
2021-05-04 13:56 ` [PATCH v2] memory: mediatek: add DRAM controller driver Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1618565538-6972-4-git-send-email-pk.chi@mediatek.com \
    --to=pk.chi@mediatek.com \
    --cc=cc.hwang@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).