summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-11-24 12:02:12 -0500
committerTom Rini <trini@ti.com>2014-11-24 12:02:12 -0500
commitdee332ffb735f65ab922118791a583c17bb0b795 (patch)
treed07bc0821792831aa4baeb27868252c2d32c7738 /include
parent1739564e753bc3a8097f8937a3cbe738bdaaed5d (diff)
parente7eb277dced570f177d75d56f40219d9dc599ed1 (diff)
downloadu-boot-imx-dee332ffb735f65ab922118791a583c17bb0b795.zip
u-boot-imx-dee332ffb735f65ab922118791a583c17bb0b795.tar.gz
u-boot-imx-dee332ffb735f65ab922118791a583c17bb0b795.tar.bz2
Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Diffstat (limited to 'include')
-rw-r--r--include/configs/mx6qsabreauto.h16
-rw-r--r--include/configs/mx6sabre_common.h7
-rw-r--r--include/configs/mx6slevk.h2
-rw-r--r--include/configs/mx6sxsabresd.h8
-rw-r--r--include/configs/tqma6.h28
-rw-r--r--include/dm/uclass-id.h1
-rw-r--r--include/imx_thermal.h17
-rw-r--r--include/power/pfuze100_pmic.h80
-rw-r--r--include/sata.h3
-rw-r--r--include/thermal.h42
10 files changed, 186 insertions, 18 deletions
diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
index 3f1c88e..51042ca 100644
--- a/include/configs/mx6qsabreauto.h
+++ b/include/configs/mx6qsabreauto.h
@@ -37,6 +37,16 @@
#include "mx6sabre_common.h"
+#undef CONFIG_SYS_NO_FLASH
+#define CONFIG_SYS_FLASH_BASE WEIM_ARB_BASE_ADDR
+#define CONFIG_SYS_FLASH_SECT_SIZE (128 * 1024)
+#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
+#define CONFIG_SYS_MAX_FLASH_SECT 256 /* max number of sectors on one chip */
+#define CONFIG_SYS_FLASH_CFI /* Flash memory is CFI compliant */
+#define CONFIG_FLASH_CFI_DRIVER /* Use drivers/cfi_flash.c */
+#define CONFIG_SYS_FLASH_USE_BUFFER_WRITE /* Use buffered writes*/
+#define CONFIG_SYS_FLASH_EMPTY_INFO
+
#define CONFIG_SYS_FSL_USDHC_NUM 2
#if defined(CONFIG_ENV_IS_IN_MMC)
#define CONFIG_SYS_MMC_ENV_DEV 0
@@ -64,4 +74,10 @@
#define CONFIG_APBH_DMA_BURST
#define CONFIG_APBH_DMA_BURST8
+/* PMIC */
+#define CONFIG_POWER
+#define CONFIG_POWER_I2C
+#define CONFIG_POWER_PFUZE100
+#define CONFIG_POWER_PFUZE100_I2C_ADDR 0x08
+
#endif /* __MX6QSABREAUTO_CONFIG_H */
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 1e10422..9fdd841 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -25,6 +25,11 @@
#define CONFIG_INITRD_TAG
#define CONFIG_REVISION_TAG
+#define CONFIG_DM
+#define CONFIG_DM_THERMAL
+#define CONFIG_SYS_MALLOC_F_LEN (1 << 10)
+#define CONFIG_IMX6_THERMAL
+
#define CONFIG_SYS_GENERIC_BOARD
/* Size of malloc() pool */
@@ -37,7 +42,7 @@
#define CONFIG_MXC_UART
#define CONFIG_CMD_FUSE
-#ifdef CONFIG_CMD_FUSE
+#if defined(CONFIG_CMD_FUSE) || defined(CONFIG_IMX6_THERMAL)
#define CONFIG_MXC_OCOTP
#endif
diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h
index 4fcaf51..271548c 100644
--- a/include/configs/mx6slevk.h
+++ b/include/configs/mx6slevk.h
@@ -87,7 +87,7 @@
"fdt_addr=0x88000000\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
- "mmcdev=0\0" \
+ "mmcdev=1\0" \
"mmcpart=1\0" \
"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index e02ea18..d8ab291 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -59,7 +59,7 @@
"fdt_addr=0x88000000\0" \
"boot_fdt=try\0" \
"ip_dyn=yes\0" \
- "mmcdev=0\0" \
+ "mmcdev=2\0" \
"mmcpart=1\0" \
"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
@@ -214,7 +214,6 @@
#define CONFIG_ENV_OFFSET (6 * SZ_64K)
#define CONFIG_ENV_SIZE SZ_8K
#define CONFIG_ENV_IS_IN_MMC
-#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_OF_LIBFDT
#define CONFIG_CMD_BOOTZ
@@ -223,4 +222,9 @@
#define CONFIG_CMD_CACHE
#endif
+#define CONFIG_SYS_FSL_USDHC_NUM 3
+#if defined(CONFIG_ENV_IS_IN_MMC)
+#define CONFIG_SYS_MMC_ENV_DEV 2 /*USDHC4*/
+#endif
+
#endif /* __CONFIG_H */
diff --git a/include/configs/tqma6.h b/include/configs/tqma6.h
index c94eee1..a099687 100644
--- a/include/configs/tqma6.h
+++ b/include/configs/tqma6.h
@@ -68,6 +68,8 @@
#define CONFIG_SPI_FLASH
#define CONFIG_SPI_FLASH_STMICRO
+#define TQMA6_SPI_FLASH_SECTOR_SIZE SZ_64K
+
#define CONFIG_CMD_SF
#define CONFIG_SF_DEFAULT_BUS 0
#define CONFIG_SF_DEFAULT_CS 0
@@ -275,12 +277,10 @@
#elif defined(CONFIG_TQMA6X_SPI_BOOT)
-#define CONFIG_FLASH_SECTOR_SIZE 0x10000
-
#define TQMA6_UBOOT_OFFSET 0x400
#define TQMA6_UBOOT_SECTOR_START 0x0
/* max u-boot size: 512k */
-#define TQMA6_UBOOT_SECTOR_SIZE CONFIG_FLASH_SECTOR_SIZE
+#define TQMA6_UBOOT_SECTOR_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE
#define TQMA6_UBOOT_SECTOR_COUNT 0x8
#define TQMA6_UBOOT_SIZE (TQMA6_UBOOT_SECTOR_SIZE * \
TQMA6_UBOOT_SECTOR_COUNT)
@@ -288,7 +288,7 @@
#define CONFIG_ENV_IS_IN_SPI_FLASH
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
#define CONFIG_ENV_OFFSET (TQMA6_UBOOT_SIZE)
-#define CONFIG_ENV_SECT_SIZE CONFIG_FLASH_SECTOR_SIZE
+#define CONFIG_ENV_SECT_SIZE TQMA6_SPI_FLASH_SECTOR_SIZE
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
CONFIG_ENV_SECT_SIZE)
@@ -299,7 +299,7 @@
#define TQMA6_FDT_OFFSET (CONFIG_ENV_OFFSET_REDUND + \
CONFIG_ENV_SECT_SIZE)
-#define TQMA6_FDT_SECT_SIZE (CONFIG_FLASH_SECTOR_SIZE)
+#define TQMA6_FDT_SECT_SIZE (TQMA6_SPI_FLASH_SECTOR_SIZE)
#define TQMA6_FDT_SECTOR_START 0x0a /* 8 Sector u-boot, 2 Sector env */
#define TQMA6_FDT_SECTOR_COUNT 0x01
@@ -320,7 +320,7 @@
"setexpr blkc ${filesize} + " \
__stringify(TQMA6_UBOOT_OFFSET) "; " \
"setexpr size ${uboot_sectors} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"if itest ${blkc} <= ${size}; then " \
"sf probe; " \
"sf erase 0 ${size}; " \
@@ -332,9 +332,9 @@
"update_kernel=run kernel_name; if tftp ${kernel}; then " \
"if itest ${filesize} > 0; then " \
"setexpr size ${kernel_sectors} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"setexpr offset ${kernel_start} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"if itest ${filesize} <= ${size}; then " \
"sf probe; " \
"sf erase ${offset} ${size}; " \
@@ -346,9 +346,9 @@
"update_fdt=if tftp ${fdt_file}; then " \
"if itest ${filesize} > 0; then " \
"setexpr size ${fdt_sectors} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"setexpr offset ${fdt_start} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"if itest ${filesize} <= ${size}; then " \
"sf probe; " \
"sf erase ${offset} ${size}; " \
@@ -359,16 +359,16 @@
"setenv filesize 0; setenv size ; setenv offset\0" \
"loadimage=sf probe; " \
"setexpr size ${kernel_sectors} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"setexpr offset ${kernel_start} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"sf read ${loadaddr} ${offset} ${size}; " \
"setenv size ; setenv offset\0" \
"loadfdt=sf probe; " \
"setexpr size ${fdt_sectors} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"setexpr offset ${fdt_start} * " \
- __stringify(CONFIG_FLASH_SECTOR_SIZE)"; " \
+ __stringify(TQMA6_SPI_FLASH_SECTOR_SIZE)"; " \
"sf read ${${fdt_addr}} ${offset} ${size}; " \
"setenv size ; setenv offset\0" \
diff --git a/include/dm/uclass-id.h b/include/dm/uclass-id.h
index a8944c9..202f59b 100644
--- a/include/dm/uclass-id.h
+++ b/include/dm/uclass-id.h
@@ -28,6 +28,7 @@ enum uclass_id {
UCLASS_SPI_GENERIC, /* Generic SPI flash target */
UCLASS_SPI_FLASH, /* SPI flash */
UCLASS_CROS_EC, /* Chrome OS EC */
+ UCLASS_THERMAL, /* Thermal sensor */
UCLASS_COUNT,
UCLASS_INVALID = -1,
diff --git a/include/imx_thermal.h b/include/imx_thermal.h
new file mode 100644
index 0000000..be13652
--- /dev/null
+++ b/include/imx_thermal.h
@@ -0,0 +1,17 @@
+/*
+ *
+ * (C) Copyright 2014 Freescale Semiconductor, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _IMX_THERMAL_H_
+#define _IMX_THERMAL_H_
+
+struct imx_thermal_plat {
+ void *regs;
+ int fuse_bank;
+ int fuse_word;
+};
+
+#endif /* _IMX_THERMAL_H_ */
diff --git a/include/power/pfuze100_pmic.h b/include/power/pfuze100_pmic.h
index 0002f1e..1118489 100644
--- a/include/power/pfuze100_pmic.h
+++ b/include/power/pfuze100_pmic.h
@@ -38,6 +38,86 @@ enum {
};
/*
+ * Buck Regulators
+ */
+
+/* SW1A/B/C Output Voltage Configuration */
+#define SW1x_0_300V 0
+#define SW1x_0_325V 1
+#define SW1x_0_350V 2
+#define SW1x_0_375V 3
+#define SW1x_0_400V 4
+#define SW1x_0_425V 5
+#define SW1x_0_450V 6
+#define SW1x_0_475V 7
+#define SW1x_0_500V 8
+#define SW1x_0_525V 9
+#define SW1x_0_550V 10
+#define SW1x_0_575V 11
+#define SW1x_0_600V 12
+#define SW1x_0_625V 13
+#define SW1x_0_650V 14
+#define SW1x_0_675V 15
+#define SW1x_0_700V 16
+#define SW1x_0_725V 17
+#define SW1x_0_750V 18
+#define SW1x_0_775V 19
+#define SW1x_0_800V 20
+#define SW1x_0_825V 21
+#define SW1x_0_850V 22
+#define SW1x_0_875V 23
+#define SW1x_0_900V 24
+#define SW1x_0_925V 25
+#define SW1x_0_950V 26
+#define SW1x_0_975V 27
+#define SW1x_1_000V 28
+#define SW1x_1_025V 29
+#define SW1x_1_050V 30
+#define SW1x_1_075V 31
+#define SW1x_1_100V 32
+#define SW1x_1_125V 33
+#define SW1x_1_150V 34
+#define SW1x_1_175V 35
+#define SW1x_1_200V 36
+#define SW1x_1_225V 37
+#define SW1x_1_250V 38
+#define SW1x_1_275V 39
+#define SW1x_1_300V 40
+#define SW1x_1_325V 41
+#define SW1x_1_350V 42
+#define SW1x_1_375V 43
+#define SW1x_1_400V 44
+#define SW1x_1_425V 45
+#define SW1x_1_450V 46
+#define SW1x_1_475V 47
+#define SW1x_1_500V 48
+#define SW1x_1_525V 49
+#define SW1x_1_550V 50
+#define SW1x_1_575V 51
+#define SW1x_1_600V 52
+#define SW1x_1_625V 53
+#define SW1x_1_650V 54
+#define SW1x_1_675V 55
+#define SW1x_1_700V 56
+#define SW1x_1_725V 57
+#define SW1x_1_750V 58
+#define SW1x_1_775V 59
+#define SW1x_1_800V 60
+#define SW1x_1_825V 61
+#define SW1x_1_850V 62
+#define SW1x_1_875V 63
+
+#define SW1x_NORMAL_MASK 0x3f
+#define SW1x_STBY_MASK 0x3f
+#define SW1x_OFF_MASK 0x3f
+
+#define SW1xCONF_DVSSPEED_MASK 0xc0
+#define SW1xCONF_DVSSPEED_2US 0x00
+#define SW1xCONF_DVSSPEED_4US 0x40
+#define SW1xCONF_DVSSPEED_8US 0x80
+#define SW1xCONF_DVSSPEED_16US 0xc0
+
+/*
* LDO Configuration
*/
diff --git a/include/sata.h b/include/sata.h
index 38f4b4a..fa61da8 100644
--- a/include/sata.h
+++ b/include/sata.h
@@ -3,12 +3,15 @@
#include <part.h>
int init_sata(int dev);
+int reset_sata(int dev);
int scan_sata(int dev);
ulong sata_read(int dev, ulong blknr, lbaint_t blkcnt, void *buffer);
ulong sata_write(int dev, ulong blknr, lbaint_t blkcnt, const void *buffer);
int sata_initialize(void);
int __sata_initialize(void);
+int sata_stop(void);
+int __sata_stop(void);
int sata_port_status(int dev, int port);
extern block_dev_desc_t sata_dev_desc[];
diff --git a/include/thermal.h b/include/thermal.h
new file mode 100644
index 0000000..5d6101b
--- /dev/null
+++ b/include/thermal.h
@@ -0,0 +1,42 @@
+/*
+ *
+ * (C) Copyright 2014 Freescale Semiconductor, Inc
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _THERMAL_H_
+#define _THERMAL_H_
+
+#include <dm.h>
+
+int thermal_get_temp(struct udevice *dev, int *temp);
+
+/**
+ * struct struct dm_thermal_ops - Driver model Thermal operations
+ *
+ * The uclass interface is implemented by all Thermal devices which use
+ * driver model.
+ */
+struct dm_thermal_ops {
+ /**
+ * Get the current temperature
+ *
+ * The device provided is the slave device. It's parent controller
+ * will be used to provide the communication.
+ *
+ * This must be called before doing any transfers with a Thermal slave.
+ * It will enable and initialize any Thermal hardware as necessary,
+ * and make sure that the SCK line is in the correct idle state. It is
+ * not allowed to claim the same bus for several slaves without
+ * releasing the bus in between.
+ *
+ * @dev: The Thermal device
+ *
+ * Returns: 0 if the bus was claimed successfully, or a negative value
+ * if it wasn't.
+ */
+ int (*get_temp)(struct udevice *dev, int *temp);
+};
+
+#endif /* _THERMAL_H_ */