All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Kridner <jkridner@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] Add support for BeagleBoard.org PocketBeagle
Date: Wed,  7 Mar 2018 05:40:41 -0500	[thread overview]
Message-ID: <20180307104044.4739-2-jdk@ti.com> (raw)
In-Reply-To: <20180307104044.4739-1-jdk@ti.com>

Texas Instruments AM3358 based low-cost board using Octavo Systems OSD3358 SIP
with built-in TPS65217 PMIC and 512MB DDR3. Board features small 35mm x
55mm size, high-speed USB OTG, microSD and 72 0.1" expansion header
pins with 2xSPI, 2xI2C, 2xUART, USB, 8xADC, up-to-44 GPIO, PRU pins and much more.

https://beagleboard.org/pocket

This was tested using the am335x_evm_usbspl_defconfig.

Note that MII pins are enabled despite not having Ethernet on this
board. This avoids an issue where otherwise many timeout errors would be
generated. See https://e2e.ti.com/support/arm/sitara_arm/f/791/t/298976
for some related discussion.

Signed-off-by: Jason Kridner <jdk@ti.com>
Cc: Tom Rini <trini@konsulko.com>
---
 board/ti/am335x/board.c      | 10 ++++++----
 board/ti/am335x/board.h      |  7 ++++++-
 board/ti/am335x/mux.c        |  3 +++
 include/configs/am335x_evm.h |  2 ++
 4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index b144fd1821..87bdd2d63d 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -264,7 +264,7 @@ const struct dpll_params *get_dpll_ddr_params(void)
 
 	if (board_is_evm_sk())
 		return &dpll_ddr3_303MHz[ind];
-	else if (board_is_bone_lt() || board_is_icev2())
+	else if (board_is_pb() || board_is_bone_lt() || board_is_icev2())
 		return &dpll_ddr3_400MHz[ind];
 	else if (board_is_evm_15_or_later())
 		return &dpll_ddr3_303MHz[ind];
@@ -295,7 +295,7 @@ const struct dpll_params *get_dpll_mpu_params(void)
 	if (bone_not_connected_to_ac_power())
 		freq = MPUPLL_M_600;
 
-	if (board_is_bone_lt())
+	if (board_is_pb() || board_is_bone_lt())
 		freq = MPUPLL_M_1000;
 
 	switch (freq) {
@@ -341,7 +341,7 @@ static void scale_vcores_bone(int freq)
 	 * Override what we have detected since we know if we have
 	 * a Beaglebone Black it supports 1GHz.
 	 */
-	if (board_is_bone_lt())
+	if (board_is_pb() || board_is_bone_lt())
 		freq = MPUPLL_M_1000;
 
 	switch (freq) {
@@ -542,7 +542,7 @@ void sdram_init(void)
 	if (board_is_evm_sk())
 		config_ddr(303, &ioregs_evmsk, &ddr3_data,
 			   &ddr3_cmd_ctrl_data, &ddr3_emif_reg_data, 0);
-	else if (board_is_bone_lt())
+	else if (board_is_pb() || board_is_bone_lt())
 		config_ddr(400, &ioregs_bonelt,
 			   &ddr3_beagleblack_data,
 			   &ddr3_beagleblack_cmd_ctrl_data,
@@ -931,6 +931,8 @@ int board_fit_config_name_match(const char *name)
 		return 0;
 	else if (board_is_bone_lt() && !strcmp(name, "am335x-boneblack"))
 		return 0;
+	else if (board_is_pb() && !strcmp(name, "am335x-pocketbeagle"))
+		return 0;
 	else if (board_is_evm_sk() && !strcmp(name, "am335x-evmsk"))
 		return 0;
 	else if (board_is_bbg1() && !strcmp(name, "am335x-bonegreen"))
diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
index e13fcff02a..bab5b77f34 100644
--- a/board/ti/am335x/board.h
+++ b/board/ti/am335x/board.h
@@ -34,6 +34,11 @@ static inline int board_is_bone_lt(void)
 	return board_ti_is("A335BNLT");
 }
 
+static inline int board_is_pb(void)
+{
+	return board_ti_is("A335PBGL");
+}
+
 static inline int board_is_bbg1(void)
 {
 	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "BBG1", 4);
@@ -41,7 +46,7 @@ static inline int board_is_bbg1(void)
 
 static inline int board_is_beaglebonex(void)
 {
-	return board_is_bone() || board_is_bone_lt() || board_is_bbg1();
+	return board_is_pb() || board_is_bone() || board_is_bone_lt() || board_is_bbg1();
 }
 
 static inline int board_is_evm_sk(void)
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
index ad85b3a19a..aa187605d0 100644
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -390,6 +390,9 @@ void enable_board_pin_mux(void)
 #else
 		configure_module_pin_mux(mmc1_pin_mux);
 #endif
+	} else if (board_is_pb()) {
+		configure_module_pin_mux(mii1_pin_mux);
+		configure_module_pin_mux(mmc0_pin_mux);
 	} else if (board_is_icev2()) {
 		configure_module_pin_mux(mmc0_pin_mux);
 		configure_module_pin_mux(gpio0_18_pin_mux);
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 158b7d4e8e..8d45b6fade 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -133,6 +133,8 @@
 			"setenv fdtfile am335x-bone.dtb; fi; " \
 		"if test $board_name = A335BNLT; then " \
 			"setenv fdtfile am335x-boneblack.dtb; fi; " \
+		"if test $board_name = A335PBGL; then " \
+			"setenv fdtfile am335x-pocketbeagle.dtb; fi; " \
 		"if test $board_name = BBBW; then " \
 			"setenv fdtfile am335x-boneblack-wireless.dtb; fi; " \
 		"if test $board_name = BBG1; then " \
-- 
2.15.1

  reply	other threads:[~2018-03-07 10:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 10:40 [U-Boot] [PATCH 0/4] Add support for BeagleBoard.org PocketBeagle Jason Kridner
2018-03-07 10:40 ` Jason Kridner [this message]
2018-03-07 14:27   ` [U-Boot] [PATCH 1/4] " Tom Rini
2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini
2018-03-07 10:40 ` [U-Boot] [PATCH 2/4] am335x_evm: scan more partitions and use uname_r Jason Kridner
2018-03-07 14:27   ` Tom Rini
2018-03-10 16:34     ` Jason Kridner
2018-03-10 23:13       ` Vagrant Cascadian
2018-03-07 10:40 ` [U-Boot] [PATCH 3/4] Handle NETCONSOLE and SPL enabled Jason Kridner
2018-03-07 14:27   ` Tom Rini
2018-03-07 18:01   ` Joe Hershberger
2018-04-07  0:44   ` [U-Boot] [U-Boot,3/4] " Tom Rini
2018-03-07 10:40 ` [U-Boot] [PATCH 4/4] am335x: am335x_evm_usbspl_defconfig: NETCONSOLE Jason Kridner
2018-03-07 14:27   ` Tom Rini
2018-04-07  0:44   ` [U-Boot] [U-Boot, " Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2018-03-11 11:49 [U-Boot] [PATCH 1/4] Add support for BeagleBoard.org PocketBeagle David Summers

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=20180307104044.4739-2-jdk@ti.com \
    --to=jkridner@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.