summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-11-17 08:19:40 -0500
committerTom Rini <trini@konsulko.com>2018-11-17 08:19:40 -0500
commit0c4b382f9041f9f2f00246c8a0ece90dae5451be (patch)
treea2307a0658de178c47d7a063c169347e60e1810c /include
parent1d6edcbfed2af33c748f2beb399810a0441888da (diff)
parentad890cace37d0e2d3e0f9649bdb9c320947e4bb0 (diff)
Merge branch '2018-11-16-master-imports'
- Initial bcm968580xref, am65x_evm_r5 support - lpc32xx, omap3_logic/am3517_evm updates - pinctrl command - fs_loader available for SPL
Diffstat (limited to 'include')
-rw-r--r--include/config_distro_bootcmd.h7
-rw-r--r--include/configs/am3517_evm.h16
-rw-r--r--include/configs/am65x_evm.h6
-rw-r--r--include/configs/broadcom_bcm968580xref.h36
-rw-r--r--include/configs/picosam9g45.h4
-rw-r--r--include/configs/smartweb.h7
-rw-r--r--include/configs/taurus.h7
-rw-r--r--include/configs/ti_armv7_common.h2
-rw-r--r--include/dm/pinctrl.h59
-rw-r--r--include/dm/uclass.h28
-rw-r--r--include/serial.h4
-rw-r--r--include/w1.h1
12 files changed, 137 insertions, 40 deletions
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 373fee78a9..5838eb3477 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -355,15 +355,16 @@
"boot_script_dhcp=boot.scr.uimg\0" \
BOOTENV_BOOT_TARGETS \
\
+ "boot_syslinux_conf=extlinux/extlinux.conf\0" \
"boot_extlinux=" \
"sysboot ${devtype} ${devnum}:${distro_bootpart} any " \
- "${scriptaddr} ${prefix}extlinux/extlinux.conf\0" \
+ "${scriptaddr} ${prefix}${boot_syslinux_conf}\0" \
\
"scan_dev_for_extlinux=" \
"if test -e ${devtype} " \
"${devnum}:${distro_bootpart} " \
- "${prefix}extlinux/extlinux.conf; then " \
- "echo Found ${prefix}extlinux/extlinux.conf; " \
+ "${prefix}${boot_syslinux_conf}; then " \
+ "echo Found ${prefix}${boot_syslinux_conf}; " \
"run boot_extlinux; " \
"echo SCRIPT FAILED: continuing...; " \
"fi\0" \
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 0463e42048..4e7e5209d4 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -12,16 +12,6 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-/*
- * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
- * 64 bytes before this address should be set aside for u-boot.img's
- * header. That is 0x800FFFC0--0x80100000 should not be used for any
- * other needs.
- */
-
-#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
-#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
-
#include <configs/ti_omap3_common.h>
#undef CONFIG_DM_I2C_COMPAT
@@ -176,8 +166,6 @@
/* Physical Memory Map */
#define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024)
-#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
-#define CONFIG_SYS_INIT_RAM_SIZE 0x800
/* FLASH and environment organization */
@@ -203,10 +191,6 @@
#undef CONFIG_SPL_TEXT_BASE
#define CONFIG_SPL_TEXT_BASE 0x40200000
-#undef CONFIG_SPL_BSS_START_ADDR
-#define CONFIG_SPL_BSS_START_ADDR 0x80000000
-#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
-
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
diff --git a/include/configs/am65x_evm.h b/include/configs/am65x_evm.h
index 65015df131..484c5ef2fe 100644
--- a/include/configs/am65x_evm.h
+++ b/include/configs/am65x_evm.h
@@ -21,6 +21,12 @@
/* SPL Loader Configuration */
#ifdef CONFIG_TARGET_AM654_A53_EVM
#define CONFIG_SPL_TEXT_BASE 0x80080000
+#else
+#define CONFIG_SPL_TEXT_BASE 0x41c00000
+#endif
+
+#ifdef CONFIG_SYS_K3_SPL_ATF
+#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "tispl.bin"
#endif
#define CONFIG_SKIP_LOWLEVEL_INIT
diff --git a/include/configs/broadcom_bcm968580xref.h b/include/configs/broadcom_bcm968580xref.h
new file mode 100644
index 0000000000..1c0945e140
--- /dev/null
+++ b/include/configs/broadcom_bcm968580xref.h
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2018 Philippe Reynes <philippe.reynes@softathome.com>
+ */
+
+#include <linux/sizes.h>
+
+/*
+ * common
+ */
+
+/* UART */
+#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200, \
+ 230400, 500000, 1500000 }
+/* Memory usage */
+#define CONFIG_SYS_MAXARGS 24
+#define CONFIG_SYS_MALLOC_LEN (1024 * 1024)
+
+/*
+ * 6858
+ */
+
+/* RAM */
+#define CONFIG_SYS_SDRAM_BASE 0x00000000
+
+/* U-Boot */
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + SZ_16M)
+#define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_TEXT_BASE
+
+#define CONFIG_SKIP_LOWLEVEL_INIT
+
+/*
+ * 968580xref
+ */
+
+#define CONFIG_ENV_SIZE (8 * 1024)
diff --git a/include/configs/picosam9g45.h b/include/configs/picosam9g45.h
index 0b240e7ebc..c2882e6daf 100644
--- a/include/configs/picosam9g45.h
+++ b/include/configs/picosam9g45.h
@@ -57,10 +57,6 @@
*/
#define CONFIG_BOOTP_BOOTFILESIZE
-/* Enable the watchdog */
-#define CONFIG_AT91SAM9_WATCHDOG
-#define CONFIG_HW_WATCHDOG
-
/*
* Command line configuration.
*/
diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h
index 114b87e1b3..28af575bf2 100644
--- a/include/configs/smartweb.h
+++ b/include/configs/smartweb.h
@@ -112,13 +112,6 @@
"root=/dev/nfs ip=dhcp nfsroot=${serverip}:/srv/nfs/rootfs; " \
"dhcp"
-/* Enable the watchdog */
-#define CONFIG_AT91SAM9_WATCHDOG
-#if !defined(CONFIG_SPL_BUILD)
-#define CONFIG_HW_WATCHDOG
-#endif
-#define CONFIG_AT91_HW_WDT_TIMEOUT 15
-
#if !defined(CONFIG_SPL_BUILD)
/* USB configuration */
#define CONFIG_USB_ATMEL
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index 4fdb0dd962..f283ab7fca 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -85,13 +85,6 @@
#define CONFIG_RMII
#define CONFIG_AT91_WANTS_COMMON_PHY
-#define CONFIG_AT91SAM9_WATCHDOG
-#define CONFIG_AT91_HW_WDT_TIMEOUT 15
-#if !defined(CONFIG_SPL_BUILD)
-/* Enable the watchdog */
-#define CONFIG_HW_WATCHDOG
-#endif
-
/* USB */
#if defined(CONFIG_BOARD_TAURUS)
#define CONFIG_USB_ATMEL
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 55b9b45eec..0f892e51d1 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -165,7 +165,9 @@
/* FAT sd card locations. */
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
+#ifndef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
+#endif
#ifdef CONFIG_SPL_OS_BOOT
/* FAT */
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index 80de3f3fed..63a7d55b88 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -6,6 +6,9 @@
#ifndef __PINCTRL_H
#define __PINCTRL_H
+#define PINNAME_SIZE 10
+#define PINMUX_SIZE 40
+
/**
* struct pinconf_param - pin config parameters
*
@@ -66,6 +69,7 @@ struct pinconf_param {
* pointing a config node. (necessary for pinctrl_full)
* @set_state_simple: do needed pinctrl operations for a peripherl @periph.
* (necessary for pinctrl_simple)
+ * @get_pin_muxing: display the muxing of a given pin.
*/
struct pinctrl_ops {
int (*get_pins_count)(struct udevice *dev);
@@ -129,6 +133,24 @@ struct pinctrl_ops {
* @return mux value (SoC-specific, e.g. 0 for input, 1 for output)
*/
int (*get_gpio_mux)(struct udevice *dev, int banknum, int index);
+
+ /**
+ * get_pin_muxing() - show pin muxing
+ *
+ * This allows to display the muxing of a given pin. It's useful for
+ * debug purpose to know if a pin is configured as GPIO or as an
+ * alternate function and which one.
+ * Typically it is used by a PINCTRL driver with knowledge of the SoC
+ * pinctrl setup.
+ *
+ * @dev: Pinctrl device to use
+ * @selector: Pin selector
+ * @buf Pin's muxing description
+ * @size Pin's muxing description length
+ * return 0 if OK, -ve on error
+ */
+ int (*get_pin_muxing)(struct udevice *dev, unsigned int selector,
+ char *buf, int size);
};
#define pinctrl_get_ops(dev) ((struct pinctrl_ops *)(dev)->driver->ops)
@@ -348,4 +370,41 @@ int pinctrl_decode_pin_config(const void *blob, int node);
*/
int pinctrl_get_gpio_mux(struct udevice *dev, int banknum, int index);
+/**
+ * pinctrl_get_pin_muxing() - Returns the muxing description
+ *
+ * This allows to display the muxing description of the given pin for
+ * debug purpose
+ *
+ * @dev: Pinctrl device to use
+ * @selector Pin index within pin-controller
+ * @buf Pin's muxing description
+ * @size Pin's muxing description length
+ * @return 0 if OK, -ve on error
+ */
+int pinctrl_get_pin_muxing(struct udevice *dev, int selector, char *buf,
+ int size);
+
+/**
+ * pinctrl_get_pins_count() - display pin-controller pins number
+ *
+ * This allows to know the number of pins owned by a given pin-controller
+ *
+ * @dev: Pinctrl device to use
+ * @return pins number if OK, -ve on error
+ */
+int pinctrl_get_pins_count(struct udevice *dev);
+
+/**
+ * pinctrl_get_pin_name() - Returns the pin's name
+ *
+ * This allows to display the pin's name for debug purpose
+ *
+ * @dev: Pinctrl device to use
+ * @selector Pin index within pin-controller
+ * @buf Pin's name
+ * @return 0 if OK, -ve on error
+ */
+int pinctrl_get_pin_name(struct udevice *dev, int selector, char *buf,
+ int size);
#endif /* __PINCTRL_H */
diff --git a/include/dm/uclass.h b/include/dm/uclass.h
index 4ef0d0f0c0..1bc62d523e 100644
--- a/include/dm/uclass.h
+++ b/include/dm/uclass.h
@@ -308,6 +308,18 @@ int uclass_first_device_err(enum uclass_id id, struct udevice **devp);
int uclass_next_device(struct udevice **devp);
/**
+ * uclass_next_device_err() - Get the next device in a uclass
+ *
+ * The device returned is probed if necessary, and ready for use
+ *
+ * @devp: On entry, pointer to device to lookup. On exit, returns pointer
+ * to the next device in the uclass if no error occurred, or -ENODEV if
+ * there is no next device.
+ * @return 0 if found, -ENODEV if not found, other -ve on error
+ */
+int uclass_next_device_err(struct udevice **devp);
+
+/**
* uclass_first_device_check() - Get the first device in a uclass
*
* The device returned is probed if necessary, and ready for use
@@ -381,4 +393,20 @@ int uclass_resolve_seq(struct udevice *dev);
#define uclass_foreach_dev_safe(pos, next, uc) \
list_for_each_entry_safe(pos, next, &uc->dev_head, uclass_node)
+/**
+ * uclass_foreach_dev_probe() - Helper function to iteration through devices
+ * of given uclass
+ *
+ * This creates a for() loop which works through the available devices in
+ * a uclass in order from start to end. Devices are probed if necessary,
+ * and ready for use.
+ *
+ * @id: Uclass ID
+ * @dev: struct udevice * to hold the current device. Set to NULL when there
+ * are no more devices.
+ */
+#define uclass_foreach_dev_probe(id, dev) \
+ for (int _ret = uclass_first_device_err(id, &dev); !_ret && dev; \
+ _ret = uclass_next_device_err(&dev))
+
#endif
diff --git a/include/serial.h b/include/serial.h
index 020cd392e8..ec25db6e60 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -195,9 +195,7 @@ struct dm_serial_ops {
* Set up a new config for this device.
*
* @dev: Device pointer
- * @parity: parity to use
- * @bits: bits number to use
- * @stop: stop bits number to use
+ * @serial_config: number of bits, parity and number of stopbits to use
* @return 0 if OK, -ve on error
*/
int (*setconfig)(struct udevice *dev, uint serial_config);
diff --git a/include/w1.h b/include/w1.h
index 399177a12e..b958b1c92c 100644
--- a/include/w1.h
+++ b/include/w1.h
@@ -12,6 +12,7 @@
#define W1_FAMILY_DS24B33 0x23
#define W1_FAMILY_DS2431 0x2d
+#define W1_FAMILY_DS2502 0x09
#define W1_FAMILY_EEP_SANDBOX 0xfe
struct w1_device {