public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] ARM: omap3_logic_somlv: Enable OF_CONTROL in SPL
Date: Wed, 23 Jan 2019 15:13:52 -0600	[thread overview]
Message-ID: <20190123211352.21988-1-aford173@gmail.com> (raw)

By removing EXT support from SPL, it makes room for the extra
overhead of enabling OF_CONTROL in SPL.  With SPL_OF_CONTROL
enabled, extra options need to be added to the device tree to
tell it which portions of the tree are needed early in boot time

Unfortunately, with these options as-is, the system doesn't boot
nor does it display anything on the UART.  I don't have a debugger
readily available, but I have seen others with AM33x boards which
are similar to OMAP3 boards. This is posted as an RFC just in case
anyone has any suggestions on what  might be missing.

Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi b/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi
index 6445048fe0..e53c7065cb 100644
--- a/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi
+++ b/arch/arm/dts/logicpd-som-lv-37xx-devkit-u-boot.dtsi
@@ -8,6 +8,18 @@
 	chosen {
 		stdout-path = &uart1;
 	};
+
+	ocp {
+		u-boot,dm-pre-reloc;
+	};
+};
+
+&l4_core {
+	u-boot,dm-pre-reloc;
+};
+
+&scm {
+	u-boot,dm-pre-reloc;
 };
 
 &i2c1 {
@@ -19,9 +31,14 @@
 };
 
 &mmc1 {
+	u-boot,dm-pre-reloc;
 	cd-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>;		/* gpio_110 */
 };
 
+&mmc1_pins {
+	u-boot,dm-pre-reloc;
+};
+
 &mmc2 {
       status = "disabled";
 };
@@ -30,3 +47,23 @@
       status = "disabled";
 };
 
+&omap3_pmx_wkup {
+	u-boot,dm-pre-reloc;
+};
+
+&omap3_pmx_core {
+	u-boot,dm-pre-reloc;
+};
+
+&omap3_pmx_core2 {
+	u-boot,dm-pre-reloc;
+};
+
+&uart1 {
+	u-boot,dm-pre-reloc;
+};
+
+&uart1_pins {
+	u-boot,dm-pre-reloc;
+};
+
diff --git a/arch/arm/dts/logicpd-som-lv-baseboard.dtsi b/arch/arm/dts/logicpd-som-lv-baseboard.dtsi
index 4990ed90dc..fcb35834e2 100644
--- a/arch/arm/dts/logicpd-som-lv-baseboard.dtsi
+++ b/arch/arm/dts/logicpd-som-lv-baseboard.dtsi
@@ -222,6 +222,13 @@
 			OMAP3_CORE1_IOPAD(0x20fa, PIN_OUTPUT_PULLDOWN | PIN_OFF_OUTPUT_LOW | MUX_MODE0)   /* dss_data15.dss_data15 */
 		>;
 	};
+	uart1_pins: pinmux_uart1_pins {
+		pinctrl-single,pins = <
+			OMAP3_CORE1_IOPAD(0x2182, PIN_INPUT | MUX_MODE0)                /* uart1_rx.uart1_rx */
+			OMAP3_CORE1_IOPAD(0x217c, PIN_OUTPUT | MUX_MODE0)               /* uart1_tx.uart1_tx */
+		>;
+	};
+
 };
 
 &omap3_pmx_wkup {
@@ -240,6 +247,8 @@
 
 
 &uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
 	interrupts-extended = <&intc 72 &omap3_pmx_core OMAP3_UART1_RX>;
 };
 
diff --git a/board/logicpd/omap3som/omap3logic.c b/board/logicpd/omap3som/omap3logic.c
index 144e6f68a4..ee77ce077c 100644
--- a/board/logicpd/omap3som/omap3logic.c
+++ b/board/logicpd/omap3som/omap3logic.c
@@ -56,36 +56,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define LOGIC_MT28_OMAP35_ASYNC_GPMC_CONFIG6	0x09030000
 #define LOGIC_MT28_OMAP35_ASYNC_GPMC_CONFIG7	0x00000C50
 
-/* This is only needed until SPL gets OF support */
-#ifdef CONFIG_SPL_BUILD
-static const struct ns16550_platdata omap3logic_serial = {
-	.base = OMAP34XX_UART1,
-	.reg_shift = 2,
-	.clock = V_NS16550_CLK,
-	.fcr = UART_FCR_DEFVAL,
-};
-
-U_BOOT_DEVICE(omap3logic_uart) = {
-	"omap_serial",
-	&omap3logic_serial
-};
-
-static const struct omap_hsmmc_plat omap3_logic_mmc0_platdata = {
-	.base_addr = (struct hsmmc *)OMAP_HSMMC1_BASE,
-	.cfg.host_caps = MMC_MODE_HS_52MHz | MMC_MODE_HS | MMC_MODE_4BIT,
-	.cfg.f_min = 400000,
-	.cfg.f_max = 52000000,
-	.cfg.voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195,
-	.cfg.b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT,
-};
-
-U_BOOT_DEVICE(omap3_logic_mmc0) = {
-	.name = "omap_hsmmc",
-	.platdata = &omap3_logic_mmc0_platdata,
-};
-
-#endif
-
 #ifdef CONFIG_SPL_OS_BOOT
 int spl_start_uboot(void)
 {
diff --git a/configs/omap3_logic_somlv_defconfig b/configs/omap3_logic_somlv_defconfig
index 6602af6abe..31a3909098 100644
--- a/configs/omap3_logic_somlv_defconfig
+++ b/configs/omap3_logic_somlv_defconfig
@@ -14,6 +14,7 @@ CONFIG_ANDROID_BOOT_IMAGE=y
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+# CONFIG_SPL_EXT_SUPPORT is not set
 CONFIG_SPL_MTD_SUPPORT=y
 CONFIG_SPL_OS_BOOT=y
 CONFIG_SYS_PROMPT="OMAP Logic # "
@@ -29,6 +30,7 @@ CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0,nor0=physmap-flash.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(MLO),1792k(u-boot),128k(spl-os),128k(u-boot-env),6m(kernel),-(fs);physmap-flash.0:-(nor)"
 CONFIG_CMD_UBI=y
 CONFIG_OF_CONTROL=y
+CONFIG_SPL_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="logicpd-som-lv-37xx-devkit"
 # CONFIG_ENV_IS_IN_FAT is not set
 CONFIG_ENV_IS_IN_NAND=y
@@ -52,6 +54,7 @@ CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x08000000
 CONFIG_SMC911X_32_BIT=y
 CONFIG_PINCTRL=y
+CONFIG_SPL_PINCTRL=y
 CONFIG_PINCTRL_SINGLE=y
 CONFIG_DM_PMIC=y
 # CONFIG_SPL_PMIC_CHILDREN is not set
-- 
2.17.1

             reply	other threads:[~2019-01-23 21:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-23 21:13 Adam Ford [this message]
2019-01-23 21:21 ` [U-Boot] [RFC] ARM: omap3_logic_somlv: Enable OF_CONTROL in SPL Tom Rini
2019-01-24 15:56   ` Adam Ford
2019-01-24 13:19 ` Felix Brack
2019-01-25 21:39   ` Adam Ford
2019-01-28 15:08     ` Adam Ford
2019-01-28 15:14       ` Tom Rini
2019-01-28 20:23         ` Adam Ford
2019-01-28 20:33           ` Tom Rini
2019-01-29 13:36             ` Adam Ford
2019-02-12  3:40               ` Adam Ford
2019-02-12 17:05                 ` Tom Rini
2019-02-12 17:19                   ` Tom Rini

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=20190123211352.21988-1-aford173@gmail.com \
    --to=aford173@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox