]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
omap3_logic: Add Device Tree Support and more DM drivers
authorAdam Ford <aford173@gmail.com>
Mon, 17 Apr 2017 13:09:45 +0000 (08:09 -0500)
committerTom Rini <trini@konsulko.com>
Wed, 10 May 2017 00:35:38 +0000 (20:35 -0400)
This patch also removes all the excessive code for NS16550 intiailization
as the device tree can do that now.  This also adds DM_I2C and DM_MMC
since the overlying drivers have the built-in support already.  The
corresponding include/config/omap3_logic.h also reduced in size
due to the new device tree support.

Signed-off-by: Adam Ford <aford173@gmail.com>
Changes in V2:
  Retain Auto-detect ability between SOM-LV and Torpedo
  Split this off from the device sub submissions

arch/arm/dts/Makefile
board/logicpd/omap3som/README [new file with mode: 0644]
board/logicpd/omap3som/omap3logic.c
configs/omap3_logic_defconfig
include/configs/omap3_logic.h

index 6b9d6fb0721f96d658578d441de677747779916d..5ccd63d4e0ffbc1eb2689464831129f90db33e6a 100644 (file)
@@ -373,6 +373,10 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \
 
 dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb
 
 
 dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb
 
+dtb-$(CONFIG_TARGET_OMAP3_LOGIC) += \
+       logicpd-torpedo-37xx-devkit.dtb \
+       logicpd-som-lv-37xx-devkit.dts
+
 dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
        at91-sama5d2_xplained.dtb
 
 dtb-$(CONFIG_TARGET_SAMA5D2_XPLAINED) += \
        at91-sama5d2_xplained.dtb
 
diff --git a/board/logicpd/omap3som/README b/board/logicpd/omap3som/README
new file mode 100644 (file)
index 0000000..06b3998
--- /dev/null
@@ -0,0 +1,19 @@
+Summary
+=======
+
+The source for omap3som encompases the DM3730 SOM-LV and DM3730 Torpedo platforms.
+
+By default, the Torpedo Device Tree is integrated into U-Boot,but the MMC controller, GPIO and I2C controllers are the same, so for the purposes of loading U-Boot, it should be sufficient.  However this will display the Model as "LogicPD Zoom DM3730 Torpedo + Wireless Development Kit" upon boot.
+
+The actual board remains autodetected and the Board will read "DM37xx SOM LV" when used on the DM37 SOM-LV.  The device tree loaded with Linux is also correct.
+
+Integrating the SOM-LV Device Tree into U-Boot
+==============================================
+
+This step is optional, but should you want to change the default to the SOM-LV, locate the configs/omap3_logic_defconfig file and make the following change.
+
+  CONFIG_DEFAULT_DEVICE_TREE="logicpd-som-lv-37xx-devkit"
+
+  make distclean
+  make omap3_logic_defconfig
+
index 4ad496e5e2b8beb9ad29518a9f9c513cdef000de..ce17db6bf9f9003f03d4a9734ed8d624a6eb2751 100644 (file)
 
 DECLARE_GLOBAL_DATA_PTR;
 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define CONTROL_WKUP_CTRL      0x48002a5c
-#define GPIO_IO_PWRDNZ (1 << 6)
-#define PBIASLITEVMODE1        (1 << 8)
-
-/*
- * two dimensional array of strucures containining board name and Linux
- * machine IDs; row it selected based on CPU column is slected based
- * on hsusb0_data5 pin having a pulldown resistor
- */
-
+/* 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,
 static const struct ns16550_platdata omap3logic_serial = {
        .base = OMAP34XX_UART1,
        .reg_shift = 2,
@@ -57,7 +49,13 @@ U_BOOT_DEVICE(omap3logic_uart) = {
        "ns16550_serial",
        &omap3logic_serial
 };
        "ns16550_serial",
        &omap3logic_serial
 };
+#endif
 
 
+/*
+ * two dimensional array of strucures containining board name and Linux
+ * machine IDs; row it selected based on CPU column is slected based
+ * on hsusb0_data5 pin having a pulldown resistor
+ */
 static struct board_id {
        char *name;
        int machine_id;
 static struct board_id {
        char *name;
        int machine_id;
index 5a88d2986251ad22f31578a5557871057ffaff9c..561bdfbcebed2f7882b28410320a447985c0ff6a 100644 (file)
@@ -4,6 +4,8 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_OMAP3_LOGIC=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_OMAP34XX=y
 CONFIG_TARGET_OMAP3_LOGIC=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
+CONFIG_DEFAULT_DEVICE_TREE="logicpd-torpedo-37xx-devkit"
+CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
 CONFIG_VERSION_VARIABLE=y
@@ -37,6 +39,11 @@ CONFIG_CMD_FS_GENERIC=y
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
 CONFIG_CMD_UBI=y
 CONFIG_ISO_PARTITION=y
 CONFIG_EFI_PARTITION=y
+CONFIG_OF_CONTROL=y
+# CONFIG_BLK is not set
+CONFIG_DM_I2C=y
+CONFIG_DM_MMC=y
+# CONFIG_DM_MMC_OPS is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_SYS_NS16550=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_SYS_NS16550=y
@@ -47,4 +54,3 @@ CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_G_DNL_MANUFACTURER="TI"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
 CONFIG_G_DNL_MANUFACTURER="TI"
 CONFIG_G_DNL_VENDOR_NUM=0x0451
 CONFIG_G_DNL_PRODUCT_NUM=0xd022
-CONFIG_OF_LIBFDT=y
index 706175c93e82c0a6da46004de9fb9b797e37e5dd..772fc60c9c3e17422202d8ec98b2622cbe7be0fc 100644 (file)
 
 #include <configs/ti_omap3_common.h>
 
 
 #include <configs/ti_omap3_common.h>
 
+#ifdef CONFIG_SPL_BUILD
+/*
+ * Disable MMC DM for SPL build and can be re-enabled after adding
+ * DM support in SPL
+ */
+#undef CONFIG_DM_MMC
+#undef OMAP_HSMMC_USE_GPIO
+
+/* select serial console configuration for SPL */
+#undef CONFIG_CONS_INDEX
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_SYS_NS16550_COM1                OMAP34XX_UART1
+#endif
+
+
 /*
  * We are only ever GP parts and will utilize all of the "downloaded image"
  * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in
  * order to allow for BCH8 to fit in.
  */
 #undef CONFIG_SPL_TEXT_BASE
 /*
  * We are only ever GP parts and will utilize all of the "downloaded image"
  * area in SRAM which starts at 0x40200000 and ends at 0x4020FFFF (64KB) in
  * order to allow for BCH8 to fit in.
  */
 #undef CONFIG_SPL_TEXT_BASE
+#define CONFIG_SPL_FRAMEWORK
 #define CONFIG_SPL_TEXT_BASE           0x40200000
 
 #define CONFIG_MISC_INIT_R             /* misc_init_r dumps the die id */
 #define CONFIG_SPL_TEXT_BASE           0x40200000
 
 #define CONFIG_MISC_INIT_R             /* misc_init_r dumps the die id */
 /* Hardware drivers */
 
 /* GPIO banks */
 /* Hardware drivers */
 
 /* GPIO banks */
+#define CONFIG_OMAP3_GPIO_4            /* GPIO 96..128 is in GPIO bank 4 */
 #define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
 
 #define CONFIG_USB_OMAP3
 
 #define CONFIG_OMAP3_GPIO_6            /* GPIO160..191 is in GPIO bank 6 */
 
 #define CONFIG_USB_OMAP3
 
-/* select serial console configuration */
-#undef CONFIG_CONS_INDEX
-#define CONFIG_CONS_INDEX              1
-#define CONFIG_SYS_NS16550_COM1                OMAP34XX_UART1
-#define CONFIG_SERIAL1                 1       /* UART1 on OMAP Logic boards */
-
 /* commands to include */
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_MTDPARTS
 /* commands to include */
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_MTDPARTS
@@ -52,8 +63,6 @@
 /* I2C */
 #define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50    /* EEPROM AT24C64      */
 /* I2C */
 #define CONFIG_SYS_I2C_OMAP34XX
 #define CONFIG_SYS_I2C_EEPROM_ADDR     0x50    /* EEPROM AT24C64      */
-#define EXPANSION_EEPROM_I2C_BUS       2       /* I2C Bus for AT24C64 */
-#define CONFIG_OMAP3_LOGIC_USE_NEW_PRODUCT_ID
 
 /* USB */
 #define CONFIG_USB_MUSB_OMAP2PLUS
 
 /* USB */
 #define CONFIG_USB_MUSB_OMAP2PLUS