From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 29 Nov 2024 13:03:15 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tGziN-001qRu-0p for lore@lore.pengutronix.de; Fri, 29 Nov 2024 13:03:15 +0100 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tGziJ-0002DE-0g for lore@pengutronix.de; Fri, 29 Nov 2024 13:03:15 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Zf12iaBBPJDbaXo+ujVIizocUCSbXZdnopUCTRwr9eM=; b=2OI2eB/DGvydL/mXjn9dyZlpXh xBHDjl5+x4lZCtWAmF10DmfeEzFyyeHbEQhkQpANUt4e47Jtb4MjN+8Fdfb0oMt3gQXu81tM4ezz4 z3KDu+4WhSFlSYcWV5nuqSCZe7PsuRXKX8Id54nlHgFo9NvBZE7DLaD4de44dkFCoB4UQoXZEQAWN 27xsxccpIBiXrSFJ5NcBuX31RgEFwTCavbZsTnJ4ZW7WdcRQduBxrJZcD/8Rs9pfOuAZd/HH9Be/A SFL3pt6RaYDT2nCiApXq/8v4jafqPZiB3YNAKJloNEYJWULAoN5IajD24NBHq+ACE7tf/rFTFKwku XtkwO9wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tGzhU-000000001YB-09b3; Fri, 29 Nov 2024 12:02:20 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tGzhO-000000001Ri-3fEp for barebox@bombadil.infradead.org; Fri, 29 Nov 2024 12:02:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=Zf12iaBBPJDbaXo+ujVIizocUCSbXZdnopUCTRwr9eM=; b=I7dj4K/+KLKeV1Pdac9yM7CN9M pedm+uLu2bCtgt+jc/LHDE8g2n1jd9nFwMhx85kvGyMxrVduXB6cZkhVLfYUUo5LJ3XA5MmbafXNr ldoiWgWtBU2BRJPYyXM8RT7cMKQNpRNaMOOQ+sBnaKgbGkJ9gOUO4vCEFXAdcnZiX+wD1m6qxzeAl Y0gIBhpsF6rVBiT0SrzHiFwWzsHtz5EqeHAogZl5VJNr5cmCMCQRmb6TBmbSrXUY8vRsz/EAR9gfr Y5dUWhmRN0MRI4FnlIaj+jBTBXhEM/8tePP/OQCzqgFpHy/uvD2g5UtkFZEkq9mu/17Tv2DxfvqMT DhqX0qFw==; Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tGzhK-00000001jXt-2NqR for barebox@lists.infradead.org; Fri, 29 Nov 2024 12:02:13 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tGzhJ-0001NL-R7; Fri, 29 Nov 2024 13:02:09 +0100 Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tGzhI-000mM9-2B; Fri, 29 Nov 2024 13:02:09 +0100 Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de) by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1tGzQ9-000vyS-2Q; Fri, 29 Nov 2024 12:44:25 +0100 From: Sascha Hauer Date: Fri, 29 Nov 2024 12:44:34 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241129-k3-r5-v1-19-67c4bb42a5c7@pengutronix.de> References: <20241129-k3-r5-v1-0-67c4bb42a5c7@pengutronix.de> In-Reply-To: <20241129-k3-r5-v1-0-67c4bb42a5c7@pengutronix.de> To: "open list:BAREBOX" X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732880665; l=34680; i=s.hauer@pengutronix.de; s=20230412; h=from:subject:message-id; bh=lgSaLFCQf+IVVQpLm5s2xuZgFTkU+zzDVx5QaMmiltw=; b=KoZA3QE8sSsGNkAn8TbiBsppSqJatLitEFmwVOGw0PwyMCYkat8JjDcT63U4ApuTZUouRlyJH WzZ1zcA5+YPDuLKveA1wJ6UWGJicLpIpyKbRiO+bTFo5xfNLsaozdMh X-Developer-Key: i=s.hauer@pengutronix.de; a=ed25519; pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241129_120210_784101_C3254F40 X-CRM114-Status: GOOD ( 14.82 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH 19/20] ARM: beagleplay: add Cortex-R5 boot support X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) This adds a new image for the beagleplay board for running on the Cortex-R5 boot processor. It will setup the SDRAM and load and start the following stages from the boot medium. Signed-off-by: Sascha Hauer --- arch/arm/boards/beagleplay/Makefile | 4 +- arch/arm/boards/beagleplay/ddr.c | 567 ++++++++++++++++++++++++++++++++ arch/arm/boards/beagleplay/ddr.h | 6 + arch/arm/boards/beagleplay/entry-r5.S | 18 + arch/arm/boards/beagleplay/lowlevel.c | 39 +++ arch/arm/dts/Makefile | 2 +- arch/arm/dts/k3-am625-r5-beagleplay.dts | 4 + images/Makefile.k3 | 17 + 8 files changed, 655 insertions(+), 2 deletions(-) diff --git a/arch/arm/boards/beagleplay/Makefile b/arch/arm/boards/beagleplay/Makefile index 69935cc168..396dff29a2 100644 --- a/arch/arm/boards/beagleplay/Makefile +++ b/arch/arm/boards/beagleplay/Makefile @@ -1 +1,3 @@ -pbl-y += lowlevel.o entry.o +pbl-y += lowlevel.o +pbl-$(CONFIG_MACH_K3_CORTEX_A) += entry.o +pbl-$(CONFIG_MACH_K3_CORTEX_R5) += entry-r5.o ddr.o diff --git a/arch/arm/boards/beagleplay/ddr.c b/arch/arm/boards/beagleplay/ddr.c new file mode 100644 index 0000000000..efab06a1dc --- /dev/null +++ b/arch/arm/boards/beagleplay/ddr.c @@ -0,0 +1,567 @@ +#include + +#include "ddr.h" + +static struct reginitdata reginitdata = { + .ctl_regs = { + 0x00000a00, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x000890b8, + 0x00000000, 0x00000000, 0x00000000, 0x000890b8, + 0x00000000, 0x00000000, 0x00000000, 0x000890b8, + 0x00000000, 0x00000000, 0x00000000, 0x01010100, + 0x01000100, 0x01000110, 0x02010002, 0x00027100, + 0x00061a80, 0x04000400, 0x00000400, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0400091c, 0x1c1c1c1c, + 0x0400091c, 0x1c1c1c1c, 0x0400091c, 0x1c1c1c1c, + 0x05050404, 0x00002706, 0x0602001d, 0x05001d0b, + 0x00270605, 0x0602001d, 0x05001d0b, 0x00270605, + 0x0602001d, 0x07001d0b, 0x00180807, 0x0400db60, + 0x07070009, 0x00001808, 0x0400db60, 0x07070009, + 0x00001808, 0x0400db60, 0x03000009, 0x0d0c0002, + 0x0d0c0d0c, 0x01010000, 0x03191919, 0x0b0b0b0b, + 0x00000b0b, 0x00000101, 0x00000000, 0x01000000, + 0x01180803, 0x00001860, 0x00000118, 0x00001860, + 0x00000118, 0x00001860, 0x00000005, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00090009, + 0x00000009, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00010001, 0x00040001, + 0x04000120, 0x04000120, 0x01200120, 0x01200120, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x03010000, 0x00010000, + 0x00000000, 0x01000000, 0x80104002, 0x00040003, + 0x00040005, 0x00030000, 0x00050004, 0x00000004, + 0x00040003, 0x00040005, 0x00000000, 0x00061800, + 0x00061800, 0x00061800, 0x00061800, 0x00061800, + 0x00000000, 0x0000aaa0, 0x00061800, 0x00061800, + 0x00061800, 0x00061800, 0x00061800, 0x00000000, + 0x0000aaa0, 0x00061800, 0x00061800, 0x00061800, + 0x00061800, 0x00061800, 0x00000000, 0x0000aaa0, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x080c0000, 0x080c080c, 0x08000000, 0x00000808, + 0x000e0000, 0x00080808, 0x0e000000, 0x08080800, + 0x00000000, 0x0000080e, 0x00040003, 0x00000007, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x01000000, 0x00000000, + 0x00001500, 0x0000100e, 0x00000000, 0x00000000, + 0x00000001, 0x00000002, 0x00000c00, 0x00001000, + 0x00000c00, 0x00001000, 0x00000c00, 0x00001000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00042400, 0x00000301, 0x00000000, 0x00000424, + 0x00000301, 0x00000000, 0x00000424, 0x00000301, + 0x00000000, 0x00000424, 0x00000301, 0x00000000, + 0x00000424, 0x00000301, 0x00000000, 0x00000424, + 0x00000301, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00001401, 0x00001401, 0x00001401, 0x00001401, + 0x00001401, 0x00001401, 0x00000493, 0x00000493, + 0x00000493, 0x00000493, 0x00000493, 0x00000493, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00010000, 0x00000000, 0x00000000, + 0x00000000, 0x00000101, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0c181511, 0x00000304, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00040000, 0x00800200, 0x00000000, + 0x02000400, 0x00000080, 0x00040000, 0x00800200, + 0x00000000, 0x00000000, 0x00000000, 0x00000100, + 0x01010000, 0x00000000, 0x3fff0000, 0x000fff00, + 0xffffffff, 0x00ffff00, 0x0a000000, 0x0001ffff, + 0x01010101, 0x01010101, 0x00000118, 0x00000c01, + 0x00000000, 0x00000000, 0x00000000, 0x01000000, + 0x00000100, 0x00010000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x0c000000, 0x060c0606, + 0x06060c06, 0x00010101, 0x02000000, 0x05020101, + 0x00000505, 0x02020200, 0x02020202, 0x02020202, + 0x02020202, 0x00000000, 0x00000000, 0x04000100, + 0x1e000004, 0x000030c0, 0x00000200, 0x00000200, + 0x00000200, 0x00000200, 0x0000db60, 0x0001e780, + 0x0c0d0302, 0x001e090a, 0x000030c0, 0x00000200, + 0x00000200, 0x00000200, 0x00000200, 0x0000db60, + 0x0001e780, 0x0c0d0302, 0x001e090a, 0x000030c0, + 0x00000200, 0x00000200, 0x00000200, 0x00000200, + 0x0000db60, 0x0001e780, 0x0c0d0302, 0x0000090a, + 0x00000000, 0x0302000a, 0x01000500, 0x01010001, + 0x00010001, 0x01010001, 0x02010000, 0x00000200, + 0x02000201, 0x00000000, 0x00202020 + }, + + .pi_regs = { + 0x00000a00, 0x00000000, 0x00000000, 0x01000000, + 0x00000001, 0x00010064, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00010001, 0x00000000, 0x00010001, + 0x00000005, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x280d0001, 0x00000000, 0x00010000, 0x00003200, + 0x00000000, 0x00000000, 0x00060602, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000055, + 0x000000aa, 0x000000ad, 0x00000052, 0x0000006a, + 0x00000095, 0x00000095, 0x000000ad, 0x00000000, + 0x00000000, 0x00010100, 0x00000014, 0x000007d0, + 0x00000300, 0x00000000, 0x00000000, 0x01000000, + 0x00010101, 0x01000000, 0x00000000, 0x00010000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00001400, 0x00000000, 0x01000000, 0x00000404, + 0x00000001, 0x0001010e, 0x02040100, 0x00010000, + 0x00000034, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000005, + 0x01000000, 0x04000100, 0x00020000, 0x00010002, + 0x00000001, 0x00020001, 0x00020002, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000300, + 0x0a090b0c, 0x04060708, 0x01000005, 0x00000800, + 0x00000000, 0x00010008, 0x00000000, 0x0000aa00, + 0x00000000, 0x00010000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000008, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00010100, 0x00000000, 0x00000000, + 0x00027100, 0x00061a80, 0x00000100, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x01000000, 0x00010003, 0x02000101, 0x01030001, + 0x00010400, 0x06000105, 0x01070001, 0x00000000, + 0x00000000, 0x00000000, 0x00010000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00010000, + 0x00000004, 0x00000000, 0x00000000, 0x00000000, + 0x00007800, 0x00780078, 0x00141414, 0x0000003a, + 0x0000003a, 0x0004003a, 0x04000400, 0xc8040009, + 0x0400091c, 0x00091cc8, 0x001cc804, 0x00000118, + 0x00001860, 0x00000118, 0x00001860, 0x00000118, + 0x04001860, 0x01010404, 0x00001901, 0x00190019, + 0x010c010c, 0x0000010c, 0x00000000, 0x05000000, + 0x01010505, 0x01010101, 0x00181818, 0x00000000, + 0x00000000, 0x0d000000, 0x0a0a0d0d, 0x0303030a, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x0d090000, 0x0d09000d, 0x0d09000d, + 0x0000000d, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x16000000, 0x001600c8, 0x001600c8, + 0x010100c8, 0x00001b01, 0x1f0f0053, 0x05000001, + 0x001b0a0d, 0x1f0f0053, 0x05000001, 0x001b0a0d, + 0x1f0f0053, 0x05000001, 0x00010a0d, 0x0c0b0700, + 0x000d0605, 0x0000c570, 0x0000001d, 0x180a0800, + 0x0b071c1c, 0x0d06050c, 0x0000c570, 0x0000001d, + 0x180a0800, 0x0b071c1c, 0x0d06050c, 0x0000c570, + 0x0000001d, 0x180a0800, 0x00001c1c, 0x000030c0, + 0x0001e780, 0x000030c0, 0x0001e780, 0x000030c0, + 0x0001e780, 0x04000400, 0x03030400, 0x00040003, + 0x04000400, 0x0c080c08, 0x00000c08, 0x000890b8, + 0x00000000, 0x00000000, 0x00000000, 0x00000120, + 0x000890b8, 0x00000000, 0x00000000, 0x00000000, + 0x00000120, 0x000890b8, 0x00000000, 0x00000000, + 0x00000000, 0x02000120, 0x00000080, 0x00020000, + 0x00000080, 0x00020000, 0x00000080, 0x00000000, + 0x00000000, 0x00040404, 0x00000000, 0x02010102, + 0x67676767, 0x00000202, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x0d100f00, + 0x0003020e, 0x00000001, 0x01000000, 0x00020201, + 0x00000000, 0x00000424, 0x00000301, 0x00000000, + 0x00000000, 0x00000000, 0x00001401, 0x00000493, + 0x00000000, 0x00000424, 0x00000301, 0x00000000, + 0x00000000, 0x00000000, 0x00001401, 0x00000493, + 0x00000000, 0x00000424, 0x00000301, 0x00000000, + 0x00000000, 0x00000000, 0x00001401, 0x00000493, + 0x00000000, 0x00000424, 0x00000301, 0x00000000, + 0x00000000, 0x00000000, 0x00001401, 0x00000493, + 0x00000000, 0x00000424, 0x00000301, 0x00000000, + 0x00000000, 0x00000000, 0x00001401, 0x00000493, + 0x00000000, 0x00000424, 0x00000301, 0x00000000, + 0x00000000, 0x00000000, 0x00001401, 0x00000493, + 0x00000000 + }, + + .phy_regs = { + 0x04c00000, 0x00000000, 0x00000200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x010101ff, + 0x00010000, 0x00c00004, 0x00cc0008, 0x00660201, + 0x00000000, 0x00000000, 0x00000000, 0x0000aaaa, + 0x00005555, 0x0000b5b5, 0x00004a4a, 0x00005656, + 0x0000a9a9, 0x0000b7b7, 0x00004848, 0x00000000, + 0x00000000, 0x08000000, 0x0f000008, 0x00000f0f, + 0x00e4e400, 0x00070820, 0x000c0020, 0x00062000, + 0x00000000, 0x55555555, 0xaaaaaaaa, 0x55555555, + 0xaaaaaaaa, 0x00005555, 0x01000100, 0x00800180, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000004, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x041f07ff, 0x00000000, 0x01ccb001, 0x2000ccb0, + 0x20000140, 0x07ff0200, 0x0000dd01, 0x10100303, + 0x10101010, 0x10101010, 0x00021010, 0x00100010, + 0x00100010, 0x00100010, 0x00100010, 0x02020010, + 0x51515041, 0x31804000, 0x04bf0340, 0x01008080, + 0x04050001, 0x00000504, 0x42100010, 0x010c053e, + 0x000f0c14, 0x01000140, 0x007a0120, 0x00000c00, + 0x000001cc, 0x20100200, 0x00000005, 0x76543210, + 0x00000008, 0x02800280, 0x02800280, 0x02800280, + 0x02800280, 0x00000280, 0x00008000, 0x00800080, + 0x00800080, 0x00800080, 0x00800080, 0x00800080, + 0x00800080, 0x00800080, 0x00800080, 0x01000080, + 0x01000000, 0x00000000, 0x00000000, 0x00080200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x04c00000, 0x00000000, 0x00000200, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000001, 0x00000000, 0x00000000, 0x010101ff, + 0x00010000, 0x00c00004, 0x00cc0008, 0x00660201, + 0x00000000, 0x00000000, 0x00000000, 0x0000aaaa, + 0x00005555, 0x0000b5b5, 0x00004a4a, 0x00005656, + 0x0000a9a9, 0x0000b7b7, 0x00004848, 0x00000000, + 0x00000000, 0x08000000, 0x0f000008, 0x00000f0f, + 0x00e4e400, 0x00070820, 0x000c0020, 0x00062000, + 0x00000000, 0x55555555, 0xaaaaaaaa, 0x55555555, + 0xaaaaaaaa, 0x00005555, 0x01000100, 0x00800180, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000004, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x041f07ff, 0x00000000, 0x01ccb001, 0x2000ccb0, + 0x20000140, 0x07ff0200, 0x0000dd01, 0x10100303, + 0x10101010, 0x10101010, 0x00021010, 0x00100010, + 0x00100010, 0x00100010, 0x00100010, 0x02020010, + 0x51515041, 0x31804000, 0x04bf0340, 0x01008080, + 0x04050001, 0x00000504, 0x42100010, 0x010c053e, + 0x000f0c14, 0x01000140, 0x007a0120, 0x00000c00, + 0x000001cc, 0x20100200, 0x00000005, 0x76543210, + 0x00000008, 0x02800280, 0x02800280, 0x02800280, + 0x02800280, 0x00000280, 0x00008000, 0x00800080, + 0x00800080, 0x00800080, 0x00800080, 0x00800080, + 0x00800080, 0x00800080, 0x00800080, 0x01000080, + 0x01000000, 0x00000000, 0x00000000, 0x00080200, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000100, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000100, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00dcba98, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x0a418820, 0x103f0000, 0x000f0100, 0x0000000f, + 0x020002cc, 0x00030000, 0x00000300, 0x00000300, + 0x00000300, 0x00000300, 0x00000300, 0x42080010, + 0x0000003e, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000100, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000100, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00dcba98, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x16a4a0e6, 0x103f0000, 0x000f0000, 0x0000000f, + 0x020002cc, 0x00030000, 0x00000300, 0x00000300, + 0x00000300, 0x00000300, 0x00000300, 0x42080010, + 0x0000003e, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000100, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000100, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00dcba98, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x2307b9ac, 0x10030000, 0x000f0000, 0x0000000f, + 0x020002cc, 0x00030000, 0x00000300, 0x00000300, + 0x00000300, 0x00000300, 0x00000300, 0x42080010, + 0x0000003e, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000100, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00050000, 0x04000100, + 0x00000055, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x01002000, 0x00004001, 0x00020028, + 0x00010100, 0x00000001, 0x00000000, 0x0f0f0e06, + 0x00010101, 0x010f0004, 0x00000000, 0x00000000, + 0x00000064, 0x00000000, 0x00000000, 0x01020103, + 0x0f020102, 0x03030303, 0x03030303, 0x00040000, + 0x00004201, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x07070001, + 0x00005400, 0x000040a2, 0x00024410, 0x00004410, + 0x00004410, 0x00004410, 0x00004410, 0x00004410, + 0x00004410, 0x00004410, 0x00004410, 0x00004410, + 0x00000000, 0x00000046, 0x00000400, 0x00000008, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x03000000, 0x00000000, 0x00000000, + 0x00000000, 0x04102006, 0x00041020, 0x01c98c98, + 0x3f400000, 0x3f3f1f3f, 0x0000001f, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x76543210, + 0x00000098, 0x00000000, 0x00000000, 0x00000000, + 0x00040700, 0x00000000, 0x00000000, 0x00000000, + 0x00000002, 0x00000100, 0x00000000, 0x00000fc3, + 0x00020002, 0x00000000, 0x00001142, 0x03020400, + 0x00000080, 0x03900390, 0x03900390, 0x03900390, + 0x03900390, 0x03900390, 0x03900390, 0x00000300, + 0x00000300, 0x00000300, 0x00000300, 0x31823fc7, + 0x00000000, 0x0c000d3f, 0x30000d3f, 0x300d3f11, + 0x01990000, 0x000d3fcc, 0x00000c11, 0x300d3f11, + 0x01990000, 0x300c3f11, 0x01990000, 0x300c3f11, + 0x01990000, 0x300d3f11, 0x01990000, 0x300d3f11 + } +}; + +static struct k3_ddr_initdata initdata = { + .reginit = ®initdata, +}; + +void beagleplay_ddr_init(void) +{ + k3_ddrss_init(&initdata); +} diff --git a/arch/arm/boards/beagleplay/ddr.h b/arch/arm/boards/beagleplay/ddr.h new file mode 100644 index 0000000000..8f35c03ed4 --- /dev/null +++ b/arch/arm/boards/beagleplay/ddr.h @@ -0,0 +1,6 @@ +#ifndef __BEAGLEPLAY_DDR_H +#define __BEAGLEPLAY_DDR_H + +void beagleplay_ddr_init(void); + +#endif /* __BEAGLEPLAY_DDR_H */ diff --git a/arch/arm/boards/beagleplay/entry-r5.S b/arch/arm/boards/beagleplay/entry-r5.S new file mode 100644 index 0000000000..712f0f4b8c --- /dev/null +++ b/arch/arm/boards/beagleplay/entry-r5.S @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include + +#define SRAM_BASE 0x43c00000 + +#define STACK_TOP SRAM_BASE + 0x3d000 + +.arm +.section .text_head_entry_start_beagleplay_r5; + +ENTRY(start_beagleplay_r5) + ldr r3, =STACK_TOP + mov sp, r3 + ldr pc, _reset + +_reset: .word SRAM_BASE + beagleplay_r5_entry + +ENDPROC(start_beagleplay_r5) diff --git a/arch/arm/boards/beagleplay/lowlevel.c b/arch/arm/boards/beagleplay/lowlevel.c index 9d76dbd0a2..1d1c42aed4 100644 --- a/arch/arm/boards/beagleplay/lowlevel.c +++ b/arch/arm/boards/beagleplay/lowlevel.c @@ -3,8 +3,13 @@ #include #include #include +#include #include #include +#include +#include + +#include "ddr.h" /* Called from assembly */ void beagleplay(void); @@ -31,3 +36,37 @@ void beagleplay(void) beagleplay_continue(); } + +extern char __dtb_k3_am625_r5_beagleplay_start[]; + +static noinline void beagleplay_r5_continue(void) +{ + pbl_set_putc((void *)debug_ll_ns16550_putc, (void *)AM62X_UART_UART0_BASE); + + putc_ll('>'); + + k3_mpu_setup_regions(); + icache_enable(); + + am625_early_init(); + beagleplay_ddr_init(); + + barebox_arm_entry(0x80000000, 0x80000000, __dtb_k3_am625_r5_beagleplay_start); +} + +void beagleplay_r5_entry(void); + +void beagleplay_r5_entry(void) +{ + k3_ctrl_mmr_unlock(); + + writel(0x00050000, 0xf41c8); + writel(0x00010000, 0xf41cc); + + k3_debug_ll_init((void *)AM62X_UART_UART0_BASE); + + relocate_to_current_adr(); + setup_c(); + + beagleplay_r5_continue(); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index fe32b812f6..ee9ac88c33 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -7,7 +7,7 @@ obj- += dummy.o lwl-$(CONFIG_MACH_ADVANTECH_ROM_742X) += imx6dl-advantech-rom-7421.dtb.o lwl-$(CONFIG_MACH_AFI_GF) += am335x-afi-gf.dtb.o lwl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.dtb.o am335x-bone-common.dtb.o -lwl-$(CONFIG_MACH_BEAGLEPLAY) += k3-am625-beagleplay.dtb.o +lwl-$(CONFIG_MACH_BEAGLEPLAY) += k3-am625-beagleplay.dtb.o k3-am625-r5-beagleplay.dtb.o lwl-$(CONFIG_MACH_CLEP7212) += ep7212-clep7212.dtb.o lwl-$(CONFIG_MACH_CM_FX6) += imx6dl-cm-fx6.dtb.o imx6q-cm-fx6.dtb.o imx6q-utilite.dtb.o lwl-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts b/arch/arm/dts/k3-am625-r5-beagleplay.dts new file mode 100644 index 0000000000..49649acc3e --- /dev/null +++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts @@ -0,0 +1,4 @@ +/dts-v1/; + +#include "k3-am625-beagleplay.dts" +#include "k3-am625-r5.dtsi" diff --git a/images/Makefile.k3 b/images/Makefile.k3 index f2857791c8..8d86f1f2e1 100644 --- a/images/Makefile.k3 +++ b/images/Makefile.k3 @@ -3,6 +3,8 @@ # barebox image generation Makefile for K3 images # +ifdef CONFIG_MACH_K3_CORTEX_A + pblb-$(CONFIG_MACH_BEAGLEPLAY) += start_beagleplay FILE_barebox-beagleplay.img = start_beagleplay.pblb image-$(CONFIG_MACH_BEAGLEPLAY) += barebox-beagleplay.img @@ -11,6 +13,21 @@ $(obj)/k3-am625-beagleplay.fit: $(obj)/barebox-beagleplay.img FILE_barebox-beagleplay-fit.img = k3-am625-beagleplay.fit image-$(CONFIG_MACH_BEAGLEPLAY) += barebox-beagleplay-fit.img +endif + +ifdef CONFIG_MACH_K3_CORTEX_R5 + +SYSFW_start_beagleplay_r5.pblb.k3img=$(srctree)/firmware/ti-fs-firmware-am62x-gp.bin +SYSFWDATA_start_beagleplay_r5.pblb.k3img=$(board)/beagleplay/combined-sysfw-cfg.bin +DMDATA_start_beagleplay_r5.pblb.k3img=$(board)/beagleplay/combined-dm-cfg.bin +KEY_start_beagleplay_r5.pblb.k3img=$(srctree)/arch/arm/mach-k3/ti-degenerate-key.pem + +pblb-$(CONFIG_MACH_BEAGLEPLAY) += start_beagleplay_r5 +FILE_barebox-beagleplay-r5.img = start_beagleplay_r5.pblb.k3img +image-$(CONFIG_MACH_BEAGLEPLAY) += barebox-beagleplay-r5.img + +endif + quiet_cmd_k3_image = K3IMG $@ cmd_k3_image = $(srctree)/scripts/k3img --sysfw $(SYSFW_$(@F)) \ --sysfwdata $(SYSFWDATA_$(@F)) --dmdata $(DMDATA_$(@F)) \ -- 2.39.5