From 1473f6ac882fde8078826ca828aa3494ff98bf08 Mon Sep 17 00:00:00 2001 From: Prasanthi Chellakumar Date: Tue, 9 Oct 2018 11:46:40 -0700 Subject: arm: at91: wdt: Convert watchdog driver to dm/dt Convert the Watchdog driver for AT91SAM9x processors to support the driver model and device tree. Changes "CONFIG_AT91SAM9_WATCHDOG" to new "CONFIG_WDT_AT91" Kconfig option. Signed-off-by: Prasanthi Chellakumar --- include/configs/picosam9g45.h | 4 ---- include/configs/smartweb.h | 7 ------- include/configs/taurus.h | 7 ------- 3 files changed, 18 deletions(-) (limited to 'include') 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 -- cgit From 786dc91492b3e759fb22aa88c5d9cc07dc7986f1 Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Thu, 11 Oct 2018 18:31:59 +0200 Subject: bcm968580xref: add initial support This add the initial support of the broadcom reference board bcm968580xref with a bcm6858 SoC. This board has 512 MB of ram, 256 MB of flash (nand), 2 usb port, 1 uart, 4 ethernet ports (LAN), 1 ethernet port (WAN). Signed-off-by: Philippe Reynes --- include/configs/broadcom_bcm968580xref.h | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/configs/broadcom_bcm968580xref.h (limited to 'include') 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 + */ + +#include + +/* + * 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) -- cgit From 9a2cff744b803b186a1336ac8067bb372af9e688 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Sun, 21 Oct 2018 10:34:49 -0500 Subject: configs: am3517_evm: Use default OMAP3 memory settings The AM3517 is mostly am omap3, so this partch removes the custom memory configurations and just uses the default common entries for omap3 and armv7. Signed-off-by: Adam Ford --- include/configs/am3517_evm.h | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'include') 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 #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" -- cgit From f9c87adc47a84fbe44f580ffa5fd2540ce7793b2 Mon Sep 17 00:00:00 2001 From: Martin Fuzzey Date: Wed, 24 Oct 2018 10:21:19 +0200 Subject: w1-eeprom: Add support for Maxim DS2502 add only memory Signed-off-by: Martin Fuzzey --- include/w1.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') 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 { -- cgit From f55a0c0a20cad56440ebe9a9b2999f21ae00f61a Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 24 Oct 2018 14:10:13 +0200 Subject: dm: pinctrl: Add get_pin_muxing() ops Add get_pin_muxing() which allows to display the muxing of a given pin belonging to a pin-controller. Signed-off-by: Patrice Chotard Reviewed-by: Simon Glass --- include/dm/pinctrl.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'include') diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index 80de3f3fed..e88438d6a5 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -66,6 +66,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 +130,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 +367,19 @@ 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); + #endif /* __PINCTRL_H */ -- cgit From 8bbb5b20852aa81024eb7b2dcc3eb58275e83bb0 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 24 Oct 2018 14:10:14 +0200 Subject: dm: pinctrl: Add pinctrl_get_pin_name and pinctrl_get_pins_count Add pinctrl_get_pin_name() and pinctrl_get_pins_count() methods to obtain pin's name and pin's muxing given a pin reference. This will be used by the new pinmux command. Signed-off-by: Patrice Chotard Reviewed-by: Simon Glass --- include/dm/pinctrl.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'include') diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index e88438d6a5..5a7c5f102e 100644 --- a/include/dm/pinctrl.h +++ b/include/dm/pinctrl.h @@ -382,4 +382,26 @@ int pinctrl_get_gpio_mux(struct udevice *dev, int banknum, int index); 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 */ -- cgit From f6abd5389ceab5fce185126c2364a324465fafbe Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 24 Oct 2018 14:10:15 +0200 Subject: dm: uclass: Add uclass_next_device_err() to return a valid device Similarly to uclass_first_device_err(), add uclass_next_device_err() which returns an error if there are no next devices in that uclass. Signed-off-by: Patrice Chotard Reviewed-by: Simon Glass --- include/dm/uclass.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include') diff --git a/include/dm/uclass.h b/include/dm/uclass.h index 4ef0d0f0c0..93f761c96e 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -307,6 +307,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 * -- cgit From 37b596ac5c5f7ac405602af2577405b1f7d38cce Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 24 Oct 2018 14:10:16 +0200 Subject: dm: uclass: Add uclass_foreach_dev_probe Add uclass_foreach_dev_probe() which iterates through devices of a given uclass. Devices are probed if necessary and are ready to use. Signed-off-by: Patrice Chotard Reviewed-by: Simon Glass --- include/dm/uclass.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/dm/uclass.h b/include/dm/uclass.h index 93f761c96e..1bc62d523e 100644 --- a/include/dm/uclass.h +++ b/include/dm/uclass.h @@ -393,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 -- cgit From d5a8313905f54ebdf128ac428c3cf58a2ebcbda2 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 24 Oct 2018 14:10:17 +0200 Subject: cmd: pinmux: Add pinmux command pinmux command allows to : - list all pin-controllers available on platforms - select a pin-controller - display the muxing of all pins of the current pin-controller or all pin-controllers depending of given options Signed-off-by: Patrice Chotard cmd: pinmux: Fix pinmux command if "pinmux status" command is used without having set dev using "pinmux dev", print pinmux usage Reviewed-by: Simon Glass --- include/dm/pinctrl.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h index 5a7c5f102e..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 * -- cgit From 9dba883a45b06a99233ab46f11ed24369da62446 Mon Sep 17 00:00:00 2001 From: Lokesh Vutla Date: Fri, 2 Nov 2018 19:51:07 +0530 Subject: board: ti: am654: r5: Add initial support for am654 Add initial support for AM654 based EVM running on R5. Reviewed-by: Tom Rini Signed-off-by: Lokesh Vutla Signed-off-by: Andreas Dannenberg --- include/configs/am65x_evm.h | 6 ++++++ include/configs/ti_armv7_common.h | 2 ++ 2 files changed, 8 insertions(+) (limited to 'include') 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/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 */ -- cgit From 0a16868757f40a4b5578c0cf65d3bfc8d3fd7dc0 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Fri, 2 Nov 2018 21:08:16 +0100 Subject: dm: serial: fix comment on dm_serial_ops setconfig The comment on this function prototype describes nonexistent parameters. It seems to be copied from 'setparity'. Update it to match its the parameter list. Signed-off-by: Simon Goldschmidt Reviewed-by: Simon Glass --- include/serial.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include') 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); -- cgit From ad5fbc6e8858d0f57a0712f7dba2c710aed9a43c Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 6 Nov 2018 12:23:53 +0000 Subject: Ability to modify distro boot filename Add in the ability to modify the distro boot filename. Whilst not immediately useful in normal usage, it allows an alternative configuration to be provided when other u-boot functionality is used, such as bootcount limit, to fallback to an alternative boot configuration. In this case we can follow the same boot path as for normal boot, just using an alternatively named configuration file. For example, by providing the following `altbootcmd` when bootcount is in use: altbootcmd=setenv boot_extlinx_conf extlinux-rollback.conf; \ run distro_bootcmd Signed-off-by: Martyn Welch Reviewed-by: Heinrich Schuchardt --- include/config_distro_bootcmd.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') 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" \ -- cgit