Skip to contentSkip to conversation

cm-t43 maintenance

PATCH New Nikita Kiryanov 2 participants 34 messages Feb 19, 2016 – Feb 25, 2016

lore
Share & tools
lore
#0 lore raw

cover cm-t43 maintenance

This is a bugfix series for cm-t43 resolving issues with boot and power supply, as well as some cleanups and minor adjustments. It also update raw mmc boot parameters for cm-t43, and adds some useful features to the tps65218 driver.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>

Nikita Kiryanov (10):
arm: am437x: cm-t43: fix cm-t43 boot
arm: am437x: cm-t43: migrate CONFIG_DM_SERIAL to config file
arm: am437x: cm-t43: support all available SPI flash chips
arm: am437x: cm-t43: define prompt
arm: am437x: cm-t43: split board file
pmic: tps65218: add useful functions and defines
arm: am437x: cm-t43: set tps fseal bit
arm: am437x: cm-t43: get rid of enable_vtt_regulator()
arm: am437x: cm-t43: set MPU and CORE voltages on boot
arm: am437x: cm-t43: update parameters for raw mmc boot

 board/compulab/cm_t43/Makefile     |   6 +-
 board/compulab/cm_t43/board.c      | 272 -------------------------------------
 board/compulab/cm_t43/cm_t43.c     | 151 ++++++++++++++++++++
 board/compulab/cm_t43/spl.c        | 137 +++++++++++++++++++
 configs/cm_t43_defconfig           |  13 ++
 drivers/power/pmic/pmic_tps65218.c |  56 ++++++++
 include/configs/cm_t43.h           |  13 +-
 include/power/tps65218.h           |  12 ++
 8 files changed, 383 insertions(+), 277 deletions(-)
 delete mode 100644 board/compulab/cm_t43/board.c
 create mode 100644 board/compulab/cm_t43/cm_t43.c
 create mode 100644 board/compulab/cm_t43/spl.c
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/10 arm: am437x: cm-t43: fix cm-t43 boot

spl_board_init() is necessary for boot. Remove the #undef that keeps it out of the boot sequence.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 include/configs/cm_t43.h | 1 -
 1 file changed, 1 deletion(-)
include/configs/cm_t43.h +0 -1
index d3cd38d..d0dfdef 100644
@@ -98,7 +98,6 @@
 #undef CONFIG_SPL_OS_BOOT
 #undef CONFIG_SPL_GPIO_SUPPORT
 #undef CONFIG_SPL_NAND_SUPPORT
-#undef CONFIG_SPL_BOARD_INIT
 #undef CONFIG_BOOTDELAY
 #include <config_distro_defaults.h>
 #define CONFIG_ZERO_BOOTDELAY_CHECK
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/10 arm: am437x: cm-t43: fix cm-t43 boot

Quoted 7 lines · Nikita Kiryanov

spl_board_init() is necessary for boot. Remove the #undef that keeps it out of the boot sequence.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/175a8541/attachment.sig>
#3 lore raw

PATCH 1/10 arm: am437x: cm-t43: fix cm-t43 boot

In reply to Nikita Kiryanov
Quoted 8 lines · Nikita Kiryanov

spl_board_init() is necessary for boot. Remove the #undef that keeps it out of the boot sequence.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/4122d9c6/attachment.sig>
#4 lore raw

PATCH 2/10 arm: am437x: cm-t43: migrate CONFIG_DM_SERIAL to config file

In reply to Nikita Kiryanov

Move CONFIG_DM_SERIAL to cm_t43_defconfig. This forces us to update the CONFIG_SYS_NS16550_REG_SIZE value for SPL.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 configs/cm_t43_defconfig | 1 +
 include/configs/cm_t43.h | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
configs/cm_t43_defconfig +1 -0
index 6044ae9..98e21cf 100644
@@ -10,3 +10,4 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_NFS is not set
 CONFIG_DM=y
 CONFIG_SYS_NS16550=y
+CONFIG_DM_SERIAL=y
include/configs/cm_t43.h +3 -1
index d0dfdef..6abc085 100644
@@ -18,10 +18,12 @@
 #include <asm/arch/omap.h>
 
 /* Serial support */
-#define CONFIG_DM_SERIAL
 #define CONFIG_SYS_NS16550_SERIAL
 #define CONFIG_SYS_NS16550_CLK		48000000
 #define CONFIG_SYS_NS16550_COM1		0x44e09000
+#ifdef CONFIG_SPL_BUILD
+#define CONFIG_SYS_NS16550_REG_SIZE	(-4)
+#endif
 
 /* NAND support */
 #define CONFIG_NAND
Signature · 1 line
1.9.1
#5 lore raw

PATCH 2/10 arm: am437x: cm-t43: migrate CONFIG_DM_SERIAL to config file

Quoted 7 lines · Nikita Kiryanov

Move CONFIG_DM_SERIAL to cm_t43_defconfig. This forces us to update the CONFIG_SYS_NS16550_REG_SIZE value for SPL.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/9530e207/attachment.sig>
#6 lore raw

PATCH 2/10 arm: am437x: cm-t43: migrate CONFIG_DM_SERIAL to config file

In reply to Nikita Kiryanov
Quoted 8 lines · Nikita Kiryanov

Move CONFIG_DM_SERIAL to cm_t43_defconfig. This forces us to update the CONFIG_SYS_NS16550_REG_SIZE value for SPL.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/e588d155/attachment.sig>
#7 lore raw

PATCH 3/10 arm: am437x: cm-t43: support all available SPI flash chips

In reply to Nikita Kiryanov

Add full support for SPI flash chips to future-proof U-Boot for cm-t43.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 configs/cm_t43_defconfig | 11 +++++++++++
 include/configs/cm_t43.h |  2 --
 2 files changed, 11 insertions(+), 2 deletions(-)
configs/cm_t43_defconfig +11 -0
index 98e21cf..672117a 100644
@@ -11,3 +11,14 @@ CONFIG_CMD_GPIO=y
 CONFIG_DM=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_SERIAL=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_WINBOND=y
+CONFIG_SPI_FLASH_SST=y
+CONFIG_SPI_FLASH_STMICRO=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_SPI_FLASH_MACRONIX=y
+CONFIG_SPI_FLASH_ISSI=y
+CONFIG_SPI_FLASH_GIGADEVICE=y
+CONFIG_SPI_FLASH_EON=y
+CONFIG_SPI_FLASH_ATMEL=y
include/configs/cm_t43.h +0 -2
index 6abc085..3bc3336 100644
@@ -70,9 +70,7 @@
 #define CONFIG_AM437X_USB2PHY2_HOST
 
 /* SPI Flash support */
-#define CONFIG_SPI_FLASH
 #define CONFIG_TI_SPI_MMAP
-#define CONFIG_SPI_FLASH_BAR
 #define CONFIG_SF_DEFAULT_SPEED		48000000
 #define CONFIG_DEFAULT_SPI_MODE		SPI_MODE_3
 
Signature · 1 line
1.9.1
#8 lore raw

PATCH 3/10 arm: am437x: cm-t43: support all available SPI flash chips

Quoted 6 lines · Nikita Kiryanov

Add full support for SPI flash chips to future-proof U-Boot for cm-t43.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/cc4f86fa/attachment.sig>
#9 lore raw

PATCH 3/10 arm: am437x: cm-t43: support all available SPI flash chips

In reply to Nikita Kiryanov
Quoted 7 lines · Nikita Kiryanov

Add full support for SPI flash chips to future-proof U-Boot for cm-t43.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/a328d215/attachment.sig>
#10 lore raw

PATCH 4/10 arm: am437x: cm-t43: define prompt

In reply to Nikita Kiryanov

Define prompt for cm-t43.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 configs/cm_t43_defconfig | 1 +
 1 file changed, 1 insertion(+)
configs/cm_t43_defconfig +1 -0
index 672117a..d1da759 100644
@@ -2,6 +2,7 @@ CONFIG_ARM=y
 CONFIG_TARGET_CM_T43=y
 CONFIG_DM_GPIO=y
 CONFIG_SPL=y
+CONFIG_SYS_PROMPT="CM-T43 # "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
Signature · 1 line
1.9.1
#11 lore raw

PATCH 4/10 arm: am437x: cm-t43: define prompt

Quoted 6 lines · Nikita Kiryanov

Define prompt for cm-t43.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/b8fa7cc3/attachment.sig>
#12 lore raw

PATCH 4/10 arm: am437x: cm-t43: define prompt

In reply to Nikita Kiryanov
Quoted 7 lines · Nikita Kiryanov

Define prompt for cm-t43.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/babc4d84/attachment.sig>
#13 lore raw

PATCH 5/10 arm: am437x: cm-t43: split board file

In reply to Nikita Kiryanov

Simplify the board file by splitting it to spl portion and u-boot portion. Some unnecessary includes were identified and removed. No functional changes.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 board/compulab/cm_t43/Makefile |   6 +-
 board/compulab/cm_t43/board.c  | 272 -----------------------------------------
 board/compulab/cm_t43/cm_t43.c | 144 ++++++++++++++++++++++
 board/compulab/cm_t43/spl.c    | 134 ++++++++++++++++++++
 4 files changed, 283 insertions(+), 273 deletions(-)
 delete mode 100644 board/compulab/cm_t43/board.c
 create mode 100644 board/compulab/cm_t43/cm_t43.c
 create mode 100644 board/compulab/cm_t43/spl.c
board/compulab/cm_t43/Makefile +5 -1
index 3993689..c749659 100644
@@ -6,4 +6,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-obj-y	+= board.o mux.o
+ifdef CONFIG_SPL_BUILD
+obj-y	+= spl.o mux.o
+else
+obj-y	+= cm_t43.o mux.o
+endif
board/compulab/cm_t43/board.c deleted +0 -272

272 lines not on this page · raw message

board/compulab/cm_t43/cm_t43.c new file +144 -0

144 lines not on this page · raw message

board/compulab/cm_t43/spl.c new file +134 -0

134 lines not on this page · raw message

Signature · 1 line
1.9.1
#14 lore raw

PATCH 5/10 arm: am437x: cm-t43: split board file

Quoted 7 lines · Nikita Kiryanov

Simplify the board file by splitting it to spl portion and u-boot portion. Some unnecessary includes were identified and removed. No functional changes.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/38b4989d/attachment.sig>
#15 lore raw

PATCH 5/10 arm: am437x: cm-t43: split board file

In reply to Nikita Kiryanov
Quoted 8 lines · Nikita Kiryanov

Simplify the board file by splitting it to spl portion and u-boot portion. Some unnecessary includes were identified and removed. No functional changes.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/87d2893f/attachment.sig>
#16 lore raw

PATCH 6/10 pmic: tps65218: add useful functions and defines

In reply to Nikita Kiryanov

Add the following functions:
tps65218_reg_read() for accessing redisters tps65218_toggle_fseal() for toggling the fseal bit tps65218_lock_fsea() for locking the fseal bit to 1

Add the following defines:
All status register bits

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 drivers/power/pmic/pmic_tps65218.c | 56 ++++++++++++++++++++++++++++++++++++++
 include/power/tps65218.h           | 12 ++++++++
 2 files changed, 68 insertions(+)
drivers/power/pmic/pmic_tps65218.c +56 -0
index dbc7a73..0fd0ad4 100644
@@ -11,6 +11,20 @@
 #include <power/pmic.h>
 #include <power/tps65218.h>
 
+int tps65218_reg_read(uchar dest_reg, uchar *dest_val)
+{
+	uchar read_val;
+	int ret;
+
+	ret = i2c_read(TPS65218_CHIP_PM, dest_reg, 1, &read_val, 1);
+	if (ret)
+		return ret;
+
+	*dest_val = read_val;
+
+	return 0;
+}
+
 /**
  *  tps65218_reg_write() - Generic function that can write a TPS65218 PMIC
  *			   register or bit field regardless of protection
@@ -98,6 +112,48 @@ int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel)
 	return 0;
 }
 
+/**
+ * tps65218_toggle_fseal() - Perform the sequence that toggles the FSEAL bit.
+ *
+ * @return:		     0 on success, -EBADE if the sequence was broken
+ */
+int tps65218_toggle_fseal(void)
+{
+	if (tps65218_reg_write(TPS65218_PROT_LEVEL_NONE, TPS65218_PASSWORD,
+			       0xb1, TPS65218_MASK_ALL_BITS))
+		return -EBADE;
+
+	if (tps65218_reg_write(TPS65218_PROT_LEVEL_NONE, TPS65218_PASSWORD,
+			       0xfe, TPS65218_MASK_ALL_BITS))
+		return -EBADE;
+
+	if (tps65218_reg_write(TPS65218_PROT_LEVEL_NONE, TPS65218_PASSWORD,
+			       0xa3, TPS65218_MASK_ALL_BITS))
+		return -EBADE;
+
+	return 0;
+}
+
+/**
+ * tps65218_lock_fseal() - Perform the sequence that locks the FSEAL bit to 1.
+ *
+ * The FSEAL bit prevents the PMIC from turning off DCDC5 and DCDC6. It can be
+ * toggled at most 3 times: 0->1, 1->0, and finally 0->1. After the third switch
+ * its value is locked and can only be reset by powering off the PMIC entirely.
+ *
+ * @return:		   0 on success, -EBADE if the sequence was broken
+ */
+int tps65218_lock_fseal(void)
+{
+	int i;
+
+	for (i = 0; i < 3; i++)
+		if (tps65218_toggle_fseal())
+			return -EBADE;
+
+	return 0;
+}
+
 int power_tps65218_init(unsigned char bus)
 {
 	static const char name[] = "TPS65218_PMIC";
include/power/tps65218.h +12 -0
index 63fc7b3..4d68faa 100644
@@ -8,6 +8,8 @@
 #ifndef __POWER_TPS65218_H__
 #define __POWER_TPS65218_H__
 
+#include <linux/bitops.h>
+
 /* I2C chip address */
 #define TPS65218_CHIP_PM			0x24
 
@@ -60,8 +62,18 @@ enum {
 #define TPS65218_DCDC_VOLT_SEL_1260MV		0x29
 #define TPS65218_DCDC_VOLT_SEL_1330MV		0x30
 
+#define TPS65218_CC_STAT	(BIT(0) | BIT(1))
+#define TPS65218_STATE		(BIT(2) | BIT(3))
+#define TPS65218_PB_STATE	BIT(4)
+#define TPS65218_AC_STATE	BIT(5)
+#define TPS65218_EE		BIT(6)
+#define TPS65218_FSEAL		BIT(7)
+
+int tps65218_reg_read(uchar dest_reg, uchar *dest_val);
 int tps65218_reg_write(uchar prot_level, uchar dest_reg, uchar dest_val,
 		       uchar mask);
 int tps65218_voltage_update(uchar dc_cntrl_reg, uchar volt_sel);
+int tps65218_toggle_fseal(void);
+int tps65218_lock_fseal(void);
 int power_tps65218_init(unsigned char bus);
 #endif	/* __POWER_TPS65218_H__ */
Signature · 1 line
1.9.1
#17 lore raw

PATCH 6/10 pmic: tps65218: add useful functions and defines

Quoted 5 lines · Nikita Kiryanov

Add the following functions:
tps65218_reg_read() for accessing redisters tps65218_toggle_fseal() for toggling the fseal bit tps65218_lock_fsea() for locking the fseal bit to 1

Quoted 7 lines

Add the following defines:
All status register bits

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/7afaa6f1/attachment.sig>
#18 lore raw

PATCH 6/10 pmic: tps65218: add useful functions and defines

In reply to Nikita Kiryanov
Quoted 5 lines · Nikita Kiryanov

Add the following functions:
tps65218_reg_read() for accessing redisters tps65218_toggle_fseal() for toggling the fseal bit tps65218_lock_fsea() for locking the fseal bit to 1

Quoted 8 lines

Add the following defines:
All status register bits

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/b198ad4c/attachment.sig>
#19 lore raw

PATCH 7/10 arm: am437x: cm-t43: set tps fseal bit

In reply to Nikita Kiryanov

Set TPS65218 FSEAL bit to 1 so that RTC could be powered using on-board 3V battery. This is necessary so that time and date will survive reboots and power offs.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 board/compulab/cm_t43/cm_t43.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
board/compulab/cm_t43/cm_t43.c +8 -1
index 445b609..0d5da6f 100644
@@ -23,11 +23,18 @@ static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 int power_init_board(void)
 {
 	struct pmic *p;
+	uchar tps_status = 0;
 
 	power_tps65218_init(I2C_PMIC);
 	p = pmic_get("TPS65218_PMIC");
-	if (p && !pmic_probe(p))
+	if (p && !pmic_probe(p)) {
 		puts("PMIC:  TPS65218\n");
+		/* We don't care if fseal is locked, but we do need it set */
+		tps65218_lock_fseal();
+		tps65218_reg_read(TPS65218_STATUS, &tps_status);
+		if (!(tps_status & TPS65218_FSEAL))
+			printf("WARNING: RTC not backed by battery!\n");
+	}
 
 	return 0;
 }
Signature · 1 line
1.9.1
#20 lore raw

PATCH 7/10 arm: am437x: cm-t43: set tps fseal bit

Quoted 8 lines · Nikita Kiryanov

Set TPS65218 FSEAL bit to 1 so that RTC could be powered using on-board 3V battery. This is necessary so that time and date will survive reboots and power offs.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/b47c43ce/attachment.sig>
#21 lore raw

PATCH 7/10 arm: am437x: cm-t43: set tps fseal bit

In reply to Nikita Kiryanov
Quoted 9 lines · Nikita Kiryanov

Set TPS65218 FSEAL bit to 1 so that RTC could be powered using on-board 3V battery. This is necessary so that time and date will survive reboots and power offs.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/064ea462/attachment.sig>
#22 lore raw

PATCH 8/10 arm: am437x: cm-t43: get rid of enable_vtt_regulator()

In reply to Nikita Kiryanov

CM-T43 does not have a vtt regulator. Remove the function that's supposed to enable it.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 board/compulab/cm_t43/spl.c | 12 ------------
 1 file changed, 12 deletions(-)
board/compulab/cm_t43/spl.c +0 -12
index 03ecf8a..520de24 100644
@@ -100,22 +100,10 @@ const struct dpll_params *get_dpll_per_params(void)
 	return &dpll_per;
 }
 
-static void enable_vtt_regulator(void)
-{
-	u32 temp;
-
-	writel(GPIO_CTRL_ENABLEMODULE, AM33XX_GPIO5_BASE + OMAP_GPIO_CTRL);
-	writel(GPIO_SETDATAOUT(7), AM33XX_GPIO5_BASE + OMAP_GPIO_SETDATAOUT);
-	temp = readl(AM33XX_GPIO5_BASE + OMAP_GPIO_OE);
-	temp = temp & ~(GPIO_OE_ENABLE(7));
-	writel(temp, AM33XX_GPIO5_BASE + OMAP_GPIO_OE);
-}
-
 void sdram_init(void)
 {
 	unsigned long ram_size;
 
-	enable_vtt_regulator();
 	config_ddr(0, &ioregs_ddr3, NULL, NULL, &ddr3_emif_regs, 0);
 	ram_size = get_ram_size((long int *)CONFIG_SYS_SDRAM_BASE, 0x80000000);
 	if (ram_size == 0x80000000 ||
Signature · 1 line
1.9.1
#23 lore raw

PATCH 8/10 arm: am437x: cm-t43: get rid of enable_vtt_regulator()

Quoted 7 lines · Nikita Kiryanov

CM-T43 does not have a vtt regulator. Remove the function that's supposed to enable it.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/eb9198c2/attachment.sig>
#24 lore raw

PATCH 8/10 arm: am437x: cm-t43: get rid of enable_vtt_regulator()

In reply to Nikita Kiryanov
Quoted 8 lines · Nikita Kiryanov

CM-T43 does not have a vtt regulator. Remove the function that's supposed to enable it.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/960d0f06/attachment.sig>
#25 lore raw

PATCH 9/10 arm: am437x: cm-t43: set MPU and CORE voltages on boot

In reply to Nikita Kiryanov

During boot, U-Boot raises the CPU frequency but the CORE and MPU regulators are not updated. This is not a problem in cold boot since the default values that the pmic outputs are correct, but if Linux were to switch the module to a low power OPP, the new voltage values will be retained after a reboot and the module will likely hang once U-Boot raises the CPU frequency back up.

Set both CORE and MPU regulators to to 1.1V on boot.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 board/compulab/cm_t43/spl.c | 15 +++++++++++++++
 include/configs/cm_t43.h    |  2 ++
 2 files changed, 17 insertions(+)
board/compulab/cm_t43/spl.c +15 -0
index 520de24..b7d118e 100644
@@ -6,9 +6,13 @@
 
 #include <common.h>
 #include <spl.h>
+#include <i2c.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/ddr_defs.h>
 #include <asm/gpio.h>
+#include <power/pmic.h>
+#include <power/tps65218.h>
+#include "board.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -100,6 +104,17 @@ const struct dpll_params *get_dpll_per_params(void)
 	return &dpll_per;
 }
 
+void scale_vcores(void)
+{
+	set_i2c_pin_mux();
+	i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE);
+	if (i2c_probe(TPS65218_CHIP_PM))
+		return;
+
+	tps65218_voltage_update(TPS65218_DCDC1, TPS65218_DCDC_VOLT_SEL_1100MV);
+	tps65218_voltage_update(TPS65218_DCDC2, TPS65218_DCDC_VOLT_SEL_1100MV);
+}
+
 void sdram_init(void)
 {
 	unsigned long ram_size;
include/configs/cm_t43.h +2 -0
index 3bc3336..329a5ea 100644
@@ -167,5 +167,7 @@
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
+#define CONFIG_SPL_I2C_SUPPORT
+#define CONFIG_SPL_POWER_SUPPORT
 
 #endif	/* __CONFIG_CM_T43_H */
Signature · 1 line
1.9.1
#26 lore raw

PATCH 9/10 arm: am437x: cm-t43: set MPU and CORE voltages on boot

Quoted 6 lines · Nikita Kiryanov

During boot, U-Boot raises the CPU frequency but the CORE and MPU regulators are not updated. This is not a problem in cold boot since the default values that the pmic outputs are correct, but if Linux were to switch the module to a low power OPP, the new voltage values will be retained after a reboot and the module will likely hang once U-Boot raises the CPU frequency back up.

Quoted 6 lines

Set both CORE and MPU regulators to to 1.1V on boot.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/65502e5e/attachment.sig>
#27 lore raw

PATCH 9/10 arm: am437x: cm-t43: set MPU and CORE voltages on boot

In reply to Nikita Kiryanov
Quoted 6 lines · Nikita Kiryanov

During boot, U-Boot raises the CPU frequency but the CORE and MPU regulators are not updated. This is not a problem in cold boot since the default values that the pmic outputs are correct, but if Linux were to switch the module to a low power OPP, the new voltage values will be retained after a reboot and the module will likely hang once U-Boot raises the CPU frequency back up.

Quoted 7 lines

Set both CORE and MPU regulators to to 1.1V on boot.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/157d1dae/attachment.sig>
#28 lore raw

PATCH 10/10 arm: am437x: cm-t43: update parameters for raw mmc boot

In reply to Nikita Kiryanov

Update U-Boot offset and size for raw mmc boot.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
---
 include/configs/cm_t43.h | 4 ++++
 1 file changed, 4 insertions(+)
include/configs/cm_t43.h +4 -0
index 329a5ea..ae15095 100644
@@ -99,6 +99,8 @@
 #undef CONFIG_SPL_GPIO_SUPPORT
 #undef CONFIG_SPL_NAND_SUPPORT
 #undef CONFIG_BOOTDELAY
+#undef CONFIG_SYS_MONITOR_LEN
+#undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
 #include <config_distro_defaults.h>
 #define CONFIG_ZERO_BOOTDELAY_CHECK
 #undef CONFIG_CMD_IMLS
@@ -164,6 +166,8 @@
 #define CONFIG_SYS_SPL_ARGS_ADDR	(CONFIG_SYS_SDRAM_BASE + (128 << 20))
 #define CONFIG_SPL_POWER_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	(256 * 1024)
+#define CONFIG_SYS_MONITOR_LEN		(512 * 1024)
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x480
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
Signature · 1 line
1.9.1
#29 lore raw

PATCH 10/10 arm: am437x: cm-t43: update parameters for raw mmc boot

Quoted 6 lines · Nikita Kiryanov

Update U-Boot offset and size for raw mmc boot.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160219/0364af55/attachment.sig>
#30 lore raw

PATCH 10/10 arm: am437x: cm-t43: update parameters for raw mmc boot

In reply to Nikita Kiryanov
Quoted 7 lines · Nikita Kiryanov

Update U-Boot offset and size for raw mmc boot.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/351e1527/attachment.sig>
#31 lore raw

PATCH 1/1 arm: am437x: cm-t43: bring back BOOTDELAY feature

In reply to Nikita Kiryanov

Commit 755324 (configs: Use config_distro_defaults.h in ti_armv7_common.h) made ti_armv7_common.h include config_distro_defaults.h. This breaks the bootdelay feature in cm_t43 because now the
- #include ti_armv7_common.h (#define CONFIG_BOOTDELAY 1)
- #undef CONFIG_BOOTDELAY
- #include config_distro_defaults.h (#define CONFIG_BOOTDELAY 2)
dance in cm_t43.h is no longer valid and in fact leads to CONFIG_BOOTDELAY not being defined.

Adapt the config file to the new inclusion hierarchy.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>

---
NOTE: this patch depends on the cm-t43 maintenance series:
https://www.mail-archive.com/u-boot at lists.denx.de/msg204112.html

 include/configs/cm_t43.h | 2 --
 1 file changed, 2 deletions(-)
include/configs/cm_t43.h +0 -2
index ae15095..1c1951c 100644
@@ -98,10 +98,8 @@
 #undef CONFIG_SPL_OS_BOOT
 #undef CONFIG_SPL_GPIO_SUPPORT
 #undef CONFIG_SPL_NAND_SUPPORT
-#undef CONFIG_BOOTDELAY
 #undef CONFIG_SYS_MONITOR_LEN
 #undef CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
-#include <config_distro_defaults.h>
 #define CONFIG_ZERO_BOOTDELAY_CHECK
 #undef CONFIG_CMD_IMLS
 
Signature · 1 line
1.9.1
#32 lore raw

PATCH 1/1 arm: am437x: cm-t43: bring back BOOTDELAY feature

Quoted 9 lines · Nikita Kiryanov

Commit 755324 (configs: Use config_distro_defaults.h in ti_armv7_common.h) made ti_armv7_common.h include config_distro_defaults.h. This breaks the bootdelay feature in cm_t43 because now the
- #include ti_armv7_common.h (#define CONFIG_BOOTDELAY 1)
- #undef CONFIG_BOOTDELAY
- #include config_distro_defaults.h (#define CONFIG_BOOTDELAY 2)
dance in cm_t43.h is no longer valid and in fact leads to CONFIG_BOOTDELAY not being defined.

Quoted 6 lines

Adapt the config file to the new inclusion hierarchy.

Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Igor Grinberg <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160221/ee949ca2/attachment.sig>
#33 lore raw

[U-Boot] arm: am437x: cm-t43: bring back BOOTDELAY feature

In reply to Nikita Kiryanov
Quoted 9 lines · Nikita Kiryanov

Commit 755324 (configs: Use config_distro_defaults.h in ti_armv7_common.h) made ti_armv7_common.h include config_distro_defaults.h. This breaks the bootdelay feature in cm_t43 because now the
- #include ti_armv7_common.h (#define CONFIG_BOOTDELAY 1)
- #undef CONFIG_BOOTDELAY
- #include config_distro_defaults.h (#define CONFIG_BOOTDELAY 2)
dance in cm_t43.h is no longer valid and in fact leads to CONFIG_BOOTDELAY not being defined.

Quoted 7 lines

Adapt the config file to the new inclusion hierarchy.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/ca833d5c/attachment.sig>