Re: [U-Boot] [PATCH v2 1/4] dm: spi: add BCM63xx HSSPI driver
Am 03.06.2017 um 12:16 schrieb Álvaro Fernández Rojas: > This driver is a simplified version of linux/drivers/spi/spi-bcm63xx-hsspi.c > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v2: Introduce changes suggested by Simon Glass: > - Split bcm63xx_hsspi_xfer() into smaller functions. > - Check possible clock errors. > - Check possible reset errors. > - Switch to devfdt_get_addr_size_index(). > - Use setbits32_be() for clock gate. > > drivers/spi/Kconfig | 8 + > drivers/spi/Makefile| 1 + > drivers/spi/bcm63xx_hsspi.c | 413 > > 3 files changed, 422 insertions(+) > create mode 100644 drivers/spi/bcm63xx_hsspi.c > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 2/4] mips: bmips: add bcm63xx-hsspi driver support for BCM6328
Am 03.06.2017 um 12:16 schrieb Álvaro Fernández Rojas: > This driver manages the SPI controller present on this SoC. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v2: no changes > > arch/mips/dts/brcm,bcm6328.dtsi | 24 > 1 file changed, 24 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 3/4] mips: bmips: add bcm63xx-hsspi driver support for BCM63268
Am 03.06.2017 um 12:16 schrieb Álvaro Fernández Rojas: > This driver manages the high speed SPI controller present on this SoC. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v2: no changes > > arch/mips/dts/brcm,bcm63268.dtsi | 21 + > 1 file changed, 21 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 4/4] mips: bmips: enable the SPI flash on the Comtrend AR-5387un
Am 03.06.2017 um 12:16 schrieb Álvaro Fernández Rojas: > It's a Macronix (mx25l12805d) 16 MB SPI flash. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v2: no changes > > arch/mips/dts/comtrend,ar-5387un.dts| 12 > configs/comtrend_ar5387un_ram_defconfig | 8 > 2 files changed, 20 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 01/10] drivers: spi: allow limiting reads
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > For some SPI controllers it's not possible to keep the CS active between > transfers and they are limited to a known number of bytes. > This splits spi_flash reads into different iterations in order to respect > the SPI controller limits. > > Signed-off-by: Álvaro Fernández Rojas > Reviewed-by: Simon Glass Reviewed-by: Daniel Schwierzeck > --- > v3: no changes > v2: no changes > > drivers/mtd/spi/spi_flash.c | 3 +++ > include/spi.h | 3 +++ > 2 files changed, 6 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 02/10] drivers: spi: consider command bytes when sending transfers
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > Command bytes are part of the written bytes and they should be taken into > account when sending a spi transfer. > > Signed-off-by: Álvaro Fernández Rojas > Reviewed-by: Simon Glass Reviewed-by: Daniel Schwierzeck > --- > v3: Fix bug introduced in v2: sizeof(cmd) vs len > v2: Introduce changes requested by Simon Glass: > - Always include command bytes when determining max write size. > > drivers/mtd/spi/spi_flash.c | 2 +- > include/spi.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 03/10] dm: spi: add BCM63xx SPI driver
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > This driver is a simplified version of linux/drivers/spi/spi-bcm63xx.c > Instead of supporting both HW revisions of the controller in a single build, > support has been split by the selected config to save space. > > Signed-off-by: Álvaro Fernández Rojas > Reviewed-by: Simon Glass Reviewed-by: Daniel Schwierzeck > --- > v3: rename BCM6338 SPI driver to BCM6348 > switch to devfdt_get_addr_size_index() > v2: no changes > > drivers/spi/Kconfig | 21 +++ > drivers/spi/Makefile | 1 + > drivers/spi/bcm63xx_spi.c | 404 > ++ > 3 files changed, 426 insertions(+) > create mode 100644 drivers/spi/bcm63xx_spi.c > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 04/10] mips: bmips: add bcm63xx-spi driver support for BCM6338
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > This driver manages the SPI controller present on this SoC. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v3: rename BCM6338 SPI driver to BCM6348 > v2: add spi alias > > arch/mips/dts/brcm,bcm6338.dtsi | 17 + > 1 file changed, 17 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 05/10] mips: bmips: add bcm63xx-spi driver support for BCM6348
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > This driver manages the SPI controller present on this SoC. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v3: rename BCM6338 SPI driver to BCM6348 > v2: add spi alias > > arch/mips/dts/brcm,bcm6348.dtsi | 17 + > 1 file changed, 17 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 06/10] mips: bmips: add bcm63xx-spi driver support for BCM6358
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > This driver manages the SPI controller present on this SoC. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v3: no changes > v2: add spi alias > > arch/mips/dts/brcm,bcm6358.dtsi | 17 + > 1 file changed, 17 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 07/10] mips: bmips: add bcm63xx-spi driver support for BCM3380
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > This driver manages the SPI controller present on this SoC. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v3: no changes > v2: add spi alias > > arch/mips/dts/brcm,bcm3380.dtsi | 17 + > 1 file changed, 17 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 08/10] mips: bmips: add bcm63xx-spi driver support for BCM63268
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > This driver manages the low speed SPI controller present on this SoC. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v3: no changes > v2: add spi alias > > arch/mips/dts/brcm,bcm63268.dtsi | 17 + > 1 file changed, 17 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 09/10] mips: bmips: enable the SPI flash on the Sagem F@ST1704
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > It's a Winbond (w25x32) 4 MB SPI flash. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v3: rename BCM6338 SPI driver to BCM6348 > v2: remove spi alias > > arch/mips/dts/sagem,f...@st1704.dts | 12 > configs/sagem_f@st1704_ram_defconfig | 8 > 2 files changed, 20 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v3 10/10] mips: bmips: enable the SPI flash on the Netgear CG3100D
Am 03.06.2017 um 11:57 schrieb Álvaro Fernández Rojas: > It's a Spansion (s25fl064a) 8 MB SPI flash. > > Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Daniel Schwierzeck > --- > v3: no changes > v2: remove spi alias > > arch/mips/dts/netgear,cg3100d.dts | 12 > configs/netgear_cg3100d_ram_defconfig | 8 > 2 files changed, 20 insertions(+) > -- - Daniel signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] armv7m: Disable D-cache when booting nommu(ARMv7M) Linux kernel
Disable D-Cache is required when booting nommu Linux kernel. (please see Linux kernel source "arch/arm/kernel/head-nommu.S") U-Boot is enabled D-cache and I-Cache at startup. However, it does not disable D-Cache before booting nommu Linux kernel. Therefore, I call dcache_disable() when the CPU is ARMv7M to fix this problem. Signed-off-by: Toshifumi NISHINAGA --- arch/arm/lib/bootm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 4dbe6a5303..d14a8b5737 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -359,6 +359,7 @@ static void boot_jump_linux(bootm_headers_t *images, int flag) #ifdef CONFIG_CPU_V7M ulong addr = (ulong)kernel_entry | 1; kernel_entry = (void *)addr; + dcache_disable(); #endif s = getenv("machid"); if (s) { -- 2.13.0 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 6/7] board: ti: enable support for writing to fat partition
On Fri, Jun 02, 2017 at 05:54:04PM +0530, Sekhar Nori wrote: > Enable support for writing to FAT partitions on > TI's boards. > > Signed-off-by: Sekhar Nori > --- > board/ti/common/Kconfig | 1 + > include/configs/am43xx_evm.h | 1 - > include/configs/ti_armv7_common.h | 8 > 3 files changed, 1 insertion(+), 9 deletions(-) I included the Kconfig logic here in the first patch in the series, and then migrated it with everything else. -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH RESEND 1/7] fs: fat: add kbuild configuration support
On Fri, Jun 02, 2017 at 05:53:59PM +0530, Sekhar Nori wrote: > Add Kconfig symbols for various configurations > supported by FAT filesystem support code. > > CONFIG_SUPPORT_VFAT has been left out since its > force enabled in include/fat.h and probably > should get removed at some point. > > Signed-off-by: Sekhar Nori Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/7] configs: k2*_evm: let each board decide env location
On Fri, Jun 02, 2017 at 05:54:00PM +0530, Sekhar Nori wrote: > Not all TI Keystone2 EVMs want environment in NAND flash. > K2G EVM which has an MMC/SD slot, keep environment in a > FAT partition on SD card. > > Since ti_armv7_keystone2.h defines environment is in NAND, > boards which do not follow that have to #undef'ine that > configuration. This leads to ugly ordering issues around > where exactly the include of ti_armv7_keystone2.h can come > in within the k2*_evm.h files. > > Move environment location to config file of each board. > This should make it easy to change it for any one board > without affecting all other boards. > > Signed-off-by: Sekhar Nori Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 4/7] config_fallbacks: add additional fallbacks for fat filesystem
On Fri, Jun 02, 2017 at 05:54:02PM +0530, Sekhar Nori wrote: > Add fallbacks needed to keep all boards building > while they are migrated to use Kconfig symbols > instead of defines in _config.h files for > FAT filesystem. > > These should eventually go away once Kconfig select > or imply statements are put in place and duplicated > defines in _config.h removed. > > Signed-off-by: Sekhar Nori Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Kconfig: Migrate FS_FAT / FAT_WRITE
On Sat, Jun 03, 2017 at 06:00:04PM -0400, Tom Rini wrote: > Now that these symbols are in Kconfig, migrate all users. Use imply on > a number of platforms that default to having this enabled. As part of > this we must migrate some straglers for CMD_FAT and DOS_PARTITION. > > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 3/7] configs: k2g_evm: make sure config fallbacks take effect
On Fri, Jun 02, 2017 at 05:54:01PM +0530, Sekhar Nori wrote: > Since config fallbacks contained in include/config_fallbacks.h > come into k2g_evm.h file through ti_armv7_keystone2.h, it should > be the last file included. > > Without this, #define of FAT_WRITE when environment is in FAT > does not happen as the environment location is decided later > in the file. > > Similar issues can come with other config fallbacks implemented. > > Signed-off-by: Sekhar Nori Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-fsl-qoriq master
On Fri, Jun 02, 2017 at 05:46:33PM +, york sun wrote: > Tom, > > The following changes since commit 380e86f361e4e2aef83295972863654fde157560: > >Merge git://git.denx.de/u-boot-fsl-qoriq (2017-05-26 11:19:27 -0400) > > are available in the git repository at: > >git://git.denx.de/u-boot-fsl-qoriq.git > > for you to fetch changes up to 8d75d52878514e23e0bd9c30743255570d05409c: > >armv8: ls1046ardb: Enable loading PPA during SPL stage for SD boot > (2017-06-01 19:57:24 -0700) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Pull Request: u-boot-sunxi/master
On Thu, Jun 01, 2017 at 01:43:17PM +, Jagan Teki wrote: > Hi Tom, > > Please take this PR. > > thanks, > Jagan. > > The following changes since commit 4c78028737c3185f49f5691183aeac3478b5f699: > > mksunxi_fit_atf.sh: Allow for this to complete when bl31.bin is missing > (2017-05-22 20:18:01 -0400) > > are available in the git repository at: > > git://git.denx.de/u-boot-sunxi.git master > > for you to fetch changes up to 2dbe9c1362c7481fac93524f65340a48c79eed9a: > > sun50i: a64: Add initial Banana Pi M64 support (2017-06-01 09:26:05 +) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Pull request: u-boot-net.git master
On Fri, Jun 02, 2017 at 02:45:15PM -0500, Joe Hershberger wrote: > Hi Tom, > > The following changes since commit 46bac66b20da6d50e757bdca74703153f233090b: > > sandbox: Move to use live tree (2017-06-01 07:03:17 -0600) > > are available in the git repository at: > > git://git.denx.de/u-boot-net.git master > > for you to fetch changes up to 2303bff7d55df47105740e5d635d50ef9f6856b6: > > net: pch_gbe: Add cache maintenance (2017-06-02 14:44:20 -0500) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 0/5] add support for GPT partition name manipulation
From: Alison Chaiken One way for userspace and the bootloader to exchange information about dynamic image selection is via the storage device partition table, as described at https://source.android.com/devices/tech/ota/ab_updates The scheme described there relies on setting partitions' "boot" flag. When no partition on a device is bootable since the kernel and U-Boot are stored elsewhere, the name field in the GPT partition table offers another logical place to store information. These patches allow users to easily modify GPT partition names via bootscripts that can select different images based on a boot-failure counter, or when userspace installs a software update. These patches have been tested in the u-boot sandbox and (re)tested on a TI DRA7xx-based SOM with U-Boot 2015.07. Significant changes since v3: -- Testing in sandbox showed error in NULL termination of UUID string in cmd/gpt.c. That problem is fixed in 0001-GPT-read-partition-table-from-device-into-a-data-str.patch. -- Patch 3 "GPT: fix error in partitions string doc" now only treats the topic in the commit title, as the part dealing with the proposed 'flip' feature is moved to that patch. -- Two new commits come from testing in the sandbox (of which I was previously unaware). One fixes an error in README.sandbox, and one adds a few comments about sandbox testing to README.gpt. Significant changes since v2: -- Got rid of the need to allocate memory for the GUID string in do_gpt(); -- Fixed the problems with string NULL termination in allocate_disk_part(); -- Removed duplicate definition of MAX_SEARCH_PARTITIONS from disk/part.c and increased the value in include/part.h to 64; -- Improved the commit message for "rename GPT partitions to detect boot failure" to better describe the version of the patch I submitted; -- Fixed numerous small problems with function return values. Significant changes since v1: -- Put the gpt_flip() function and auxiliary ones inside a new CONFIG_CMD_GPT_FLIP option that depends on CMD_GPT. -- Replace intentional overwriting of name and type string arrays with memset() instead. -- Move part.h changes earlier in the patchset. -- Add a few lines to README.gpt about the new gpt subcommands. Added a few simple patches to do the following: -- Replace remaining occurrences of '37' with UUID_STR_LEN+1; -- Introduce new macros to get rid of the similar '32'; -- fix a smaller error in doc/README.gpt. There are also some fixups of whitespace and formatting errors (plus usual inevitable addition of new ones). To do in future: -- Add support for preserving the type flag for partitions. The u-boot version on which this patchset is based did not have this feature, and it's easy to add, but I need to figure how to test it first. -- Add tests for the new gpt commands to the sandbox. Alison Chaiken (5): GPT: read partition table from device into a data structure rename GPT partitions to detect boot failure GPT: fix error in partitions string doc sandbox: README: fix partition command invocation cmd gpt: test in sandbox board/sandbox/README.sandbox | 2 +- cmd/Kconfig | 7 + cmd/gpt.c| 298 +++ doc/README.gpt | 31 - include/part.h | 7 + 5 files changed, 340 insertions(+), 5 deletions(-) -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 2/5] rename GPT partitions to detect boot failure
From: Alison Chaiken This patch provides support in u-boot for renaming GPT partitions. The renaming is accomplished via a new 'gpt flip' command. The concept for the bootloader state machine is the following: -- u-boot renames ‘primary’ partitions as ‘candidate’ and tries to boot them. -- Linux, at boot, will rename ‘candidate’ partitions as ‘primary’. -- If u-boot sees a ‘candidate’ partition after a boot attempt, it tries to boot the ‘backup’ partition. Rewriting the partition table has the side-effect that all partitions end up with "msftdata" flag set. The reason is that partition type PARTITION_BASIC_DATA_GUID is hard-coded in the gpt_fill_pte() function. This does not appear to cause any harm. Changes since v3: -- Squashed changes to comments that had been made in a different patch into this one. -- Fixed lines over 80 chars. -- Tested in u-boot sandbox. Signed-off-by: Alison Chaiken --- cmd/Kconfig| 7 +++ cmd/gpt.c | 190 +++-- doc/README.gpt | 13 3 files changed, 206 insertions(+), 4 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 6f75b86..8b925e5 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -593,6 +593,13 @@ config CMD_GPT Enable the 'gpt' command to ready and write GPT style partition tables. +config CMD_GPT_FLIP + bool "GPT flip-partitions command" + depends on CMD_GPT + help + Enables the 'gpt' command to write modified GPT partition + tables via the 'gpt flip' command. + config CMD_ARMFLASH #depends on FLASH_CFI_DRIVER bool "armflash" diff --git a/cmd/gpt.c b/cmd/gpt.c index e898f35..f806492 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -20,6 +20,7 @@ #include #include #include +#include static LIST_HEAD(disk_partitions); @@ -194,16 +195,33 @@ static struct disk_part *allocate_disk_part(disk_partition_t *info, int partnum) return newpart; } +static void prettyprint_part_size(char *sizestr, unsigned long partsize, + unsigned long blksize) +{ + unsigned long long partbytes; + unsigned long partmegabytes; + + partbytes = partsize * blksize; + partmegabytes = lldiv(partbytes, SZ_1M); + snprintf(sizestr, 16, "%luMiB", partmegabytes); +} + static void print_gpt_info(void) { struct list_head *pos; struct disk_part *curr; + char partstartstr[16]; + char partsizestr[16]; list_for_each(pos, &disk_partitions) { curr = list_entry(pos, struct disk_part, list); + prettyprint_part_size(partstartstr, (unsigned long)curr->gpt_part_info.start, + (unsigned long) curr->gpt_part_info.blksz); + prettyprint_part_size(partsizestr, (unsigned long)curr->gpt_part_info.size, + (unsigned long) curr->gpt_part_info.blksz); + printf("Partition %d:\n", curr->partnum); - printf("1st block %x, size %x\n", (unsigned)curr->gpt_part_info.start, - (unsigned)curr->gpt_part_info.size); + printf("Start %s, size %s\n", partstartstr, partsizestr); printf("Block size %lu, name %s\n", curr->gpt_part_info.blksz, curr->gpt_part_info.name); printf("Type %s, bootable %d\n", curr->gpt_part_info.type, @@ -215,6 +233,74 @@ static void print_gpt_info(void) } } +#ifdef CONFIG_CMD_GPT_FLIP +static int calc_parts_list_len(int numparts) +{ + int partlistlen = UUID_STR_LEN + 1 + strlen("uuid_disk="); + /* for the comma */ + partlistlen++; + + /* per-partition additions; numparts starts at 1, so this should be correct */ + partlistlen += numparts * (strlen("name=,") + PART_NAME_LEN + 1); + /* 17 because partstr in create_gpt_partitions_list() is 16 chars */ + partlistlen += numparts * (strlen("start=MiB,") + 17); + partlistlen += numparts * (strlen("size=MiB,") + 17); + partlistlen += numparts * (strlen("uuid=;") + UUID_STR_LEN + 1); + /* for the terminating null */ + partlistlen++; + debug("Length of partitions_list is %d for %d partitions\n", partlistlen, + numparts); + return partlistlen; +} + +/* + * create the string that upstream 'gpt write' command will accept as an + * argument + * + * From doc/README.gpt, Format of partitions layout: + *"uuid_disk=...;name=u-boot,size=60MiB,uuid=...; + * name=kernel,size=60MiB,uuid=...;" + * The fields 'name' and 'size' are mandatory for every partition. + * The field 'start' is optional. The fields 'uuid' and 'uuid_disk' + * are optional if CONFIG_RANDOM_UUID is enabled. + */ +static int create_gpt_partitions_list(int numparts, const char *guid, char *partitions_list) +{ + struct list_head *pos; + struct disk_part *curr; + char partstr[PART_NAME_L
[U-Boot] [PATCH 5/5] cmd gpt: test in sandbox
From: Alison Chaiken Make minor changes to README.gpt and sandbox_defconfig to support testing of the gpt command's functionality in the sandbox. Signed-off-by: Alison Chaiken --- doc/README.gpt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/doc/README.gpt b/doc/README.gpt index 754e490..7b3936b 100644 --- a/doc/README.gpt +++ b/doc/README.gpt @@ -224,6 +224,16 @@ U-BOOT> gpt flip mmc 0 Choose different partition names by modifying these strings in gpt.c. +The GPT functionality may be tested with the 'sandbox' board by +creating a disk image as described under 'Block Device Emulation' in +board/sandbox/README.sandbox: + +=>host bind 0 ./disk.raw +=> gpt read host 0 +[ . . . ] +=> gpt flip host 0 +[ . . . ] + Partition type GUID: -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 3/5] GPT: fix error in partitions string doc
From: Alison Chaiken The existing partitions-list parsing in cmd/gpt.c passes a value from gpt_default() to set_gpt_info() that README.gpt suggests should begin with 'partitions='. Partition-list strings should in fact begin with 'uuid_disk', as otherwise the call from set_gpt_info() to extract_val() to find 'uuid_disk' will fail. Change README.gpt accordingly. Changes since v3: -- The part of this patch dealing with the partition-flipping behavior was squashed into the patch that introduces that feature. Signed-off-by: Alison Chaiken --- doc/README.gpt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/README.gpt b/doc/README.gpt index e29b188..754e490 100644 --- a/doc/README.gpt +++ b/doc/README.gpt @@ -156,10 +156,10 @@ Creating GPT partitions in U-Boot: To restore GUID partition table one needs to: 1. Define partition layout in the environment. Format of partitions layout: - "partitions=uuid_disk=...;name=u-boot,size=60MiB,uuid=...; + "uuid_disk=...;name=u-boot,size=60MiB,uuid=...; name=kernel,size=60MiB,uuid=...;" or - "partitions=uuid_disk=${uuid_gpt_disk};name=${uboot_name}, + "uuid_disk=${uuid_gpt_disk};name=${uboot_name}, size=${uboot_size},uuid=${uboot_uuid};" The fields 'name' and 'size' are mandatory for every partition. @@ -233,7 +233,7 @@ PARTITION_BASIC_DATA_GUID (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7). If you define 'CONFIG_PARTITION_TYPE_GUID', a optionnal parameter 'type' can specify a other partition type guid: - "partitions=uuid_disk=...;name=u-boot,size=60MiB,uuid=...; + "uuid_disk=...;name=u-boot,size=60MiB,uuid=...; name=kernel,size=60MiB,uuid=..., type=0FC63DAF-8483-4772-8E79-3D69D8477DE4;" @@ -255,7 +255,7 @@ Some strings can be also used at the place of known GUID : "lvm"= PARTITION_LINUX_LVM_GUID (E6D6D379-F507-44C2-A23C-238F2A3DF928) -"partitions=uuid_disk=...;name=u-boot,size=60MiB,uuid=...; +"uuid_disk=...;name=u-boot,size=60MiB,uuid=...; name=kernel,size=60MiB,uuid=...,type=linux;" They are also used to display the type of partition in "part list" command. -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/5] sandbox: README: fix partition command invocation
From: Alison Chaiken The instructions for creating a disk image that are presently in README.sandbox fail because sfdisk doesn't know about GPT. Signed-off-by: Alison Chaiken --- board/sandbox/README.sandbox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/sandbox/README.sandbox b/board/sandbox/README.sandbox index 02d8ab3..9dc2eb0 100644 --- a/board/sandbox/README.sandbox +++ b/board/sandbox/README.sandbox @@ -333,7 +333,7 @@ the contents of the root directory on the second partion of the image A disk image can be created using the following commands: $> truncate -s 1200M ./disk.raw -$> echo -e "label: gpt\n,64M,U\n,,L" | /usr/sbin/sfdisk ./disk.raw +$> echo -e "label: gpt\n,64M,U\n,,L" | /usr/sbin/sgdisk ./disk.raw $> lodev=`sudo losetup -P -f --show ./disk.raw` $> sudo mkfs.vfat -n EFI -v ${lodev}p1 $> sudo mkfs.ext4 -L ROOT -v ${lodev}p2 -- 2.1.4 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v4 1/5] GPT: read partition table from device into a data structure
From: Alison Chaiken Make the partition table available for modification by reading it from the user-specified device into a linked list. Provide an accessor function for command-line testing. Changes since v3: Fixed problem with NULL termination of the newly created uuid[] member of the partitions list in allocate_disk_part. This version has been tested in the u-boot sandbox. Signed-off-by: Alison Chaiken --- cmd/gpt.c | 116 + include/part.h | 7 2 files changed, 123 insertions(+) diff --git a/cmd/gpt.c b/cmd/gpt.c index 4d00a35..e898f35 100644 --- a/cmd/gpt.c +++ b/cmd/gpt.c @@ -19,6 +19,9 @@ #include #include #include +#include + +static LIST_HEAD(disk_partitions); /** * extract_env(): Expand env name from string format '&{env_name}' @@ -151,6 +154,115 @@ static bool found_key(const char *str, const char *key) return result; } +static void del_gpt_info(void) +{ + struct list_head *pos = &disk_partitions; + struct disk_part *curr; + while (!list_empty(pos)) { + curr = list_entry(pos->next, struct disk_part, list); + list_del(pos->next); + free(curr); + } +} + +static struct disk_part *allocate_disk_part(disk_partition_t *info, int partnum) +{ + struct disk_part *newpart; + newpart = (struct disk_part *)malloc(sizeof(*newpart)); + if (!newpart) + return ERR_PTR(-ENOMEM); + memset(newpart, '\0', sizeof(newpart)); + + newpart->gpt_part_info.start = info->start; + newpart->gpt_part_info.size = info->size; + newpart->gpt_part_info.blksz = info->blksz; + strncpy((char *)newpart->gpt_part_info.name, (const char *)info->name, + PART_NAME_LEN); + newpart->gpt_part_info.name[PART_NAME_LEN - 1] = '\0'; + strncpy((char *)newpart->gpt_part_info.type, (const char *)info->type, + PART_TYPE_LEN); + newpart->gpt_part_info.type[PART_TYPE_LEN - 1] = '\0'; + newpart->gpt_part_info.bootable = info->bootable; +#ifdef CONFIG_PARTITION_UUIDS + strncpy(newpart->gpt_part_info.uuid, (const char *)info->uuid, + UUID_STR_LEN); + /* UUID_STR_LEN is correct, as uuid[]'s length is UUID_STR_LEN+1 chars */ + newpart->gpt_part_info.uuid[UUID_STR_LEN] = '\0'; +#endif + newpart->partnum = partnum; + + return newpart; +} + +static void print_gpt_info(void) +{ + struct list_head *pos; + struct disk_part *curr; + + list_for_each(pos, &disk_partitions) { + curr = list_entry(pos, struct disk_part, list); + printf("Partition %d:\n", curr->partnum); + printf("1st block %x, size %x\n", (unsigned)curr->gpt_part_info.start, + (unsigned)curr->gpt_part_info.size); + printf("Block size %lu, name %s\n", curr->gpt_part_info.blksz, + curr->gpt_part_info.name); + printf("Type %s, bootable %d\n", curr->gpt_part_info.type, + curr->gpt_part_info.bootable); +#ifdef CONFIG_PARTITION_UUIDS + printf("UUID %s\n", curr->gpt_part_info.uuid); +#endif + printf("\n"); + } +} + +/* + * read partition info into disk_partitions list where + * it can be printed or modified + */ +static int get_gpt_info(struct blk_desc *dev_desc) +{ + /* start partition numbering at 1, as U-Boot does */ + int valid_parts = 1, p, ret; + disk_partition_t info; + struct disk_part *new_disk_part; + + if (disk_partitions.next == NULL) + INIT_LIST_HEAD(&disk_partitions); + + for (p = 1; p <= MAX_SEARCH_PARTITIONS; p++) { + ret = part_get_info(dev_desc, p, &info); + if (ret) + continue; + + new_disk_part = allocate_disk_part(&info, valid_parts); + if (IS_ERR(new_disk_part) && valid_parts >= 2) + return -ENODEV; + + list_add_tail(&new_disk_part->list, &disk_partitions); + valid_parts++; + } + if (!valid_parts) { + printf("** No valid partitions found **\n"); + del_gpt_info(); + return -ENODEV; + } + return --valid_parts; +} + +/* a wrapper to test get_gpt_info */ +static int do_get_gpt_info(struct blk_desc *dev_desc) +{ + int ret; + + ret = get_gpt_info(dev_desc); + if (ret > 0) { + print_gpt_info(); + del_gpt_info(); + } + return ret; +} + + /** * set_gpt_info(): Fill partition information from string * function allocates memory, remember to free! @@ -455,6 +567,8 @@ static int do_gpt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("Verify GPT: "); } else if (strcmp(argv[1], "guid") == 0) { return do_disk_guid(blk_dev_desc
Re: [U-Boot] [PATCH 01/33] mmc: select the available type from host_caps and card_caps
hi Jaehoon, On 05/25/2017 09:08 PM, Jaehoon Chung wrote: Hi Ziyuan, On 05/25/2017 05:12 PM, Ziyuan wrote: hi Jaehoon, On 05/16/2017 09:55 AM, Jaehoon Chung wrote: Hi Ziyuan, On 05/16/2017 10:15 AM, Ziyuan wrote: hi Simon & Jaehoon, On 05/16/2017 08:18 AM, Simon Glass wrote: Hi Ziyuan, On 15 May 2017 at 00:06, Ziyuan Xu wrote: The original implementation select HS timing by default, add available type selection for higher speed mode compatibility, such as hs200, hs400, hs400es. By the way, we assume that card run at 1.8V or 1.2V I/O when its timing is ddr52/hs200/hs400(es). Signed-off-by: Ziyuan Xu --- drivers/mmc/mmc.c | 59 ++- include/mmc.h | 16 +++ 2 files changed, 74 insertions(+), 1 deletion(-) Is there a cover letter for this series, please? This patchset is used for hs200/hs400/ddr52 mode of eMMC device, and fixes some bug for dw_mmc & sdhci controller. It's only valid in U-Boot stage, we still use 'High Speed' in SPL. I tested it on evb-rk3288 board(eMMC 4.5) and evb-rk3388 board(eMMC 5.0). I just reviewed an MMC series at add higher speed support. I'm not sure but I suspect these overlap. Ha, I just reviewed Vignesh's patches, it focuses on uhs mode of sd card. It looks to me. But some details are not the same as mine. Anyway, what do you think? I didn't review both yet..After checking, i will share my opinion. how about? *ping*... Did you test this patchset on Samsung platform? As far as I know, Samsung SoCs also make use of dw_mmc and sdhci controllers. some details are not the same as yours..but some points are duplicated. DWMMC and sdhci controller side are not duplicated.. As i am feeling..your patches are based on Linux kernel code..right? Yup, the kernel's mmc driver is stabilized and it was tested on so many various boards. Simon had review Jean-jacques's patch, but a little glitch need to be debugged. So I should wait for him, and rebase? Regards, Simon ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] Please pull u-boot-x86
Hi Tom, The following changes since commit 5cafcbab580bac6c7f44ca4a164c422b7e1ecf20: Merge git://git.denx.de/u-boot-net (2017-06-03 18:05:28 -0400) are available in the git repository at: git://git.denx.de/u-boot-x86.git for you to fetch changes up to d7f7ba36b2edecb16393f8373cca833adb8ea6c3: x86: fsp: Remove the call to set up internal uart in fsp_init() (2017-06-05 08:55:22 +0800) Bin Meng (6): x86: baytrail: Change "fsp, mrc-init-tseg-size" default value to 1 x86: baytrail: Remove "serial-debug-port-*" settings x86: baytrail: Use macros instead of magic numbers for FSP settings x86: baytrail: Change lpe/lpss-sio/scc FSP properties to integer x86: baytrail: Fix boot hang with a debug build x86: fsp: Remove the call to set up internal uart in fsp_init() arch/x86/cpu/baytrail/Kconfig| 4 arch/x86/cpu/baytrail/early_uart.c | 5 + arch/x86/cpu/baytrail/fsp_configs.c | 50 ++ arch/x86/dts/bayleybay.dts | 25 - arch/x86/dts/baytrail_som-db5800-som-6867.dts| 21 ++--- arch/x86/dts/conga-qeval20-qa3-e3845.dts | 35 ++- arch/x86/dts/dfi-bt700.dtsi | 35 ++- arch/x86/dts/minnowmax.dts | 37 ++--- arch/x86/include/asm/arch-baytrail/fsp/fsp_configs.h | 87 +++ arch/x86/include/asm/arch-baytrail/fsp/fsp_vpd.h | 9 - arch/x86/lib/fsp/fsp_support.c | 4 doc/device-tree-bindings/misc/intel,baytrail-fsp.txt | 88 12 files changed, 230 insertions(+), 170 deletions(-) Regards, Bin ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 01/33] mmc: select the available type from host_caps and card_caps
Hi Ziyuan, On 06/05/2017 09:50 AM, Ziyuan wrote: > hi Jaehoon, > > On 05/25/2017 09:08 PM, Jaehoon Chung wrote: >> Hi Ziyuan, >> >> On 05/25/2017 05:12 PM, Ziyuan wrote: >>> hi Jaehoon, >>> >>> On 05/16/2017 09:55 AM, Jaehoon Chung wrote: Hi Ziyuan, On 05/16/2017 10:15 AM, Ziyuan wrote: > hi Simon & Jaehoon, > > On 05/16/2017 08:18 AM, Simon Glass wrote: >> Hi Ziyuan, >> >> On 15 May 2017 at 00:06, Ziyuan Xu wrote: >>> The original implementation select HS timing by default, add available >>> type selection for higher speed mode compatibility, such as hs200, >>> hs400, hs400es. >>> >>> By the way, we assume that card run at 1.8V or 1.2V I/O when its timing >>> is ddr52/hs200/hs400(es). >>> >>> Signed-off-by: Ziyuan Xu >>> --- >>> >>> drivers/mmc/mmc.c | 59 >>> ++- >>> include/mmc.h | 16 +++ >>> 2 files changed, 74 insertions(+), 1 deletion(-) >>> >> Is there a cover letter for this series, please? > This patchset is used for hs200/hs400/ddr52 mode of eMMC device, and > fixes some bug for dw_mmc & sdhci controller. > It's only valid in U-Boot stage, we still use 'High Speed' in SPL. > > I tested it on evb-rk3288 board(eMMC 4.5) and evb-rk3388 board(eMMC 5.0). >> I just reviewed an MMC series at add higher speed support. I'm not >> sure but I suspect these overlap. > Ha, I just reviewed Vignesh's patches, it focuses on uhs mode of sd card. > It looks to me. > But some details are not the same as mine. Anyway, what do you think? I didn't review both yet..After checking, i will share my opinion. how about? >>> *ping*... >>> Did you test this patchset on Samsung platform? As far as I know, Samsung >>> SoCs also make use of dw_mmc and sdhci controllers. >> some details are not the same as yours..but some points are duplicated. >> DWMMC and sdhci controller side are not duplicated.. >> >> As i am feeling..your patches are based on Linux kernel code..right? > > Yup, the kernel's mmc driver is stabilized and it was tested on so many > various boards. > Simon had review Jean-jacques's patch, but a little glitch need to be > debugged. So I should wait for him, and rebase? I will make a branch for testing about HS200 and UHS-I..then you can make the patches based on it. Well, after making branch, i will share it at mailing. Thanks for your effort! Best Regards, Jaehoon Chung > >> Regards, >> Simon >> >> >> > > > >>> >>> >>> >>> >> >> >> > > > > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] Please pull u-boot-fdt (take 4)
On Fri, Jun 02, 2017 at 05:59:04PM -0600, Simon Glass wrote: > Hi Tom, > > This includes moving the error message to stderr so that buildman picks it up. > > > > The following changes since commit 46bac66b20da6d50e757bdca74703153f233090b: > > sandbox: Move to use live tree (2017-06-01 07:03:17 -0600) > > are available in the git repository at: > > git://git.denx.de/u-boot-fdt.git > > for you to fetch changes up to 99ed4a2e979150879fb70aea71898709536375d3: > > fdt: Drop fdt_select.py (2017-06-02 10:18:20 -0600) > Applied to u-boot/master, thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v7 3/6] arm: socfpga: Enable FPGA driver on SPL
On Sab, 2017-06-03 at 13:27 +0200, Marek Vasut wrote: > On 05/29/2017 06:00 AM, tien.fong.c...@intel.com wrote: > > > > From: Tien Fong Chee > > > > This patch is for enabling the FPGA driver support on SPL. > > > > Signed-off-by: Tien Fong Chee > > --- > > include/configs/socfpga_common.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/include/configs/socfpga_common.h > > b/include/configs/socfpga_common.h > > index da7e4ad..e74e7eb 100644 > > --- a/include/configs/socfpga_common.h > > +++ b/include/configs/socfpga_common.h > > @@ -110,6 +110,7 @@ > > #define CONFIG_FPGA > > #define CONFIG_FPGA_ALTERA > > #define CONFIG_FPGA_SOCFPGA > > +#define CONFIG_SPL_FPGA_SUPPORT > This should be Kconfig symbol selected in board config. Why is it not > Kconfig symbol ? > I have a patch that is specific for converting all FPGA related Macro config by tool created which will be submited after this patch set. Let me know if you prefer kconfig symbol. > > > > #define CONFIG_FPGA_COUNT 1 > > #endif > > #endif > > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] configs: enable the CONFIG_DM_MMC for exynos4 series
Hi 2017. 5. 30. 10:04에 "Jaehoon Chung" 님이 작성: Enable the CONFIG_DM_MMC for exynos4 series. Signed-off-by: Jaehoon Chung --- configs/odroid_defconfig| 1 + configs/origen_defconfig| 1 + configs/s5pc210_universal_defconfig | 1 + configs/trats2_defconfig| 1 + configs/trats_defconfig | 1 + 5 files changed, 5 insertions(+) diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig index a28058a..45c8904 100644 --- a/configs/odroid_defconfig +++ b/configs/odroid_defconfig @@ -39,6 +39,7 @@ CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_DFU_MMC=y CONFIG_DM_I2C_COMPAT=y +CONFIG_DM_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y diff --git a/configs/origen_defconfig b/configs/origen_defconfig index dfb08fb..573c9e2 100644 --- a/configs/origen_defconfig +++ b/configs/origen_defconfig @@ -32,6 +32,7 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_DFU_MMC=y +CONFIG_DM_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig index c342fa9..021e6c5 100644 --- a/configs/s5pc210_universal_defconfig +++ b/configs/s5pc210_universal_defconfig @@ -33,6 +33,7 @@ CONFIG_ISO_PARTITION=y CONFIG_OF_CONTROL=y CONFIG_DFU_MMC=y CONFIG_SYS_I2C_S3C24X0=y +CONFIG_DM_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig index 8c92f2f..16ac27f 100644 --- a/configs/trats2_defconfig +++ b/configs/trats2_defconfig @@ -37,6 +37,7 @@ CONFIG_OF_CONTROL=y CONFIG_DFU_MMC=y CONFIG_DM_I2C_GPIO=y CONFIG_SYS_I2C_S3C24X0=y +CONFIG_DM_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y diff --git a/configs/trats_defconfig b/configs/trats_defconfig index 09797c3..0f2445b 100644 --- a/configs/trats_defconfig +++ b/configs/trats_defconfig @@ -36,6 +36,7 @@ CONFIG_OF_CONTROL=y CONFIG_DFU_MMC=y CONFIG_DM_I2C_GPIO=y CONFIG_SYS_I2C_S3C24X0=y +CONFIG_DM_MMC=y CONFIG_MMC_DW=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_SDMA=y -- 2.10.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot applied to u-boot-samsung Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 1/2] ARM: dts: exynos4: change the nodes relevant to mmc/sd
Hi 2017. 5. 30. 10:05에 "Jaehoon Chung" 님이 작성: Change the nodes relevant to mmc/sd for using DM. compatible are also changed to each SoCs. Signed-off-by: Jaehoon Chung --- arch/arm/dts/exynos4.dtsi | 25 +-- arch/arm/dts/exynos4210-origen.dts | 24 -- arch/arm/dts/exynos4210-trats.dts | 40 +--- arch/arm/dts/exynos4210-universal_c210.dts | 36 + arch/arm/dts/exynos4412-odroid.dts | 50 -- arch/arm/dts/exynos4412-trats2.dts | 49 +++-- arch/arm/dts/exynos4x12.dtsi | 13 7 files changed, 94 insertions(+), 143 deletions(-) diff --git a/arch/arm/dts/exynos4.dtsi b/arch/arm/dts/exynos4.dtsi index a5a00c8..53d39dc 100644 --- a/arch/arm/dts/exynos4.dtsi +++ b/arch/arm/dts/exynos4.dtsi @@ -122,44 +122,49 @@ interrupts = <7 63 0>; }; - sdhci@1251 { + sdhci0: sdhci@1251 { #address-cells = <1>; #size-cells = <0>; - compatible = "samsung,exynos-mmc"; + compatible = "samsung,exynos4412-sdhci"; reg = <0x1251 0x1000>; interrupts = <0 75 0>; + status = "disabled"; }; - sdhci@1252 { + sdhci1: sdhci@1252 { #address-cells = <1>; #size-cells = <0>; - compatible = "samsung,exynos-mmc"; + compatible = "samsung,exynos4412-sdhci"; reg = <0x1252 0x1000>; interrupts = <0 76 0>; + status = "disabled"; }; - sdhci@1253 { + sdhci2: sdhci@1253 { #address-cells = <1>; #size-cells = <0>; - compatible = "samsung,exynos-mmc"; + compatible = "samsung,exynos4412-sdhci"; reg = <0x1253 0x1000>; interrupts = <0 77 0>; + status = "disabled"; }; - sdhci@1254 { + sdhci3: sdhci@1254 { #address-cells = <1>; #size-cells = <0>; - compatible = "samsung,exynos-mmc"; + compatible = "samsung,exynos4412-sdhci"; reg = <0x1254 0x1000>; interrupts = <0 78 0>; + status = "disabled"; }; - dwmmc@1255 { + mshc_0: dwmmc@1255 { #address-cells = <1>; #size-cells = <0>; - compatible = "samsung,exynos-dwmmc"; + compatible = "samsung,exynos4412-dw-mshc"; reg = <0x1255 0x1000>; interrupts = <0 131 0>; + status = "disabled"; }; }; diff --git a/arch/arm/dts/exynos4210-origen.dts b/arch/arm/dts/exynos4210- origen.dts index 26c4d7f..a13d033 100644 --- a/arch/arm/dts/exynos4210-origen.dts +++ b/arch/arm/dts/exynos4210-origen.dts @@ -22,24 +22,12 @@ aliases { serial0 = "/serial@1380"; console = "/serial@1382"; - mmc2 = "/sdhci@1253"; - }; - - sdhci@1251 { - status = "disabled"; - }; - - sdhci@1252 { - status = "disabled"; - }; - - sdhci@1253 { - samsung,bus-width = <4>; - samsung,timing = <1 2 3>; - cd-gpios = <&gpk2 2 0>; }; +}; - sdhci@1254 { - status = "disabled"; - }; +&sdhci2 { + samsung,bus-width = <4>; + samsung,timing = <1 2 3>; + cd-gpios = <&gpk2 2 0>; + status = "okay"; }; diff --git a/arch/arm/dts/exynos4210-trats.dts b/arch/arm/dts/exynos4210- trats.dts index ac422e4..2abe3e9 100644 --- a/arch/arm/dts/exynos4210-trats.dts +++ b/arch/arm/dts/exynos4210-trats.dts @@ -21,8 +21,6 @@ aliases { serial0 = "/serial@1380"; console = "/serial@1382"; - mmc0 = "/sdhci@1251"; - mmc2 = "/sdhci@1253"; i2c8 = &i2c_fg; }; @@ -91,30 +89,6 @@ samsung,dsim-device-reverse-panel = <1>; }; - sdhci@1251 { - samsung,bus-width = <8>; - samsung,timing = <1 3 3>; - pwr-gpios = <&gpk0 2 0>; - }; - - sdhci@1252 { - status = "disabled"; - }; - - sdhci@1253 { - samsung,bus-width = <4>; - samsung,timing = <1 2 3>; - cd-gpios = <&gpx3 4 0>; - }; - - sdhci@1254 { - status = "disabled"; - }; - - dwmmc@1255 { - status = "disabled"; - }; - i2c_fg: fuel-gauge { compatible = "i2c-gpio"; gpios = <&gpy4 1 0>,/* sda */ @@ -265,3 +239,17 @@ }; }; }; + +&sdhci0 { +
Re: [U-Boot] [PATCH 1/2] ARM: dts: exynos5422-odroidxu3: add the LDO's nodes
Hi 2017. 5. 30. 15:08에 "Jaehoon Chung" 님이 작성: Add the LDO's nodes that taken from Linux Kernel. Signed-off-by: Jaehoon Chung --- arch/arm/dts/exynos5422-odroidxu3.dts | 209 ++ 1 file changed, 209 insertions(+) diff --git a/arch/arm/dts/exynos5422-odroidxu3.dts b/arch/arm/dts/exynos5422-odroidxu3.dts index 690c747..b6f4333 100644 --- a/arch/arm/dts/exynos5422-odroidxu3.dts +++ b/arch/arm/dts/exynos5422-odroidxu3.dts @@ -40,6 +40,215 @@ s2mps11_pmic@66 { compatible = "samsung,s2mps11-pmic"; reg = <0x66>; + voltage-regulators { + ldo1_reg: LDO1 { + regulator-name = "vdd_ldo1"; + regulator-min-microvolt = <100>; + regulator-max-microvolt = <100>; + regulator-always-on; + }; + + ldo3_reg: LDO3 { + regulator-name = "vddq_mmc0"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + }; + + ldo4_reg: LDO4 { + regulator-name = "vdd_adc"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + }; + + ldo5_reg: LDO5 { + regulator-name = "vdd_ldo5"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-always-on; + }; + + ldo6_reg: LDO6 { + regulator-name = "vdd_ldo6"; + regulator-min-microvolt = <100>; + regulator-max-microvolt = <100>; + regulator-always-on; + }; + + ldo7_reg: LDO7 { + regulator-name = "vdd_ldo7"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-always-on; + }; + + ldo8_reg: LDO8 { + regulator-name = "vdd_ldo8"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-always-on; + }; + + ldo9_reg: LDO9 { + regulator-name = "vdd_ldo9"; + regulator-min-microvolt = <300>; + regulator-max-microvolt = <300>; + regulator-always-on; + }; + + ldo10_reg: LDO10 { + regulator-name = "vdd_ldo10"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-always-on; + }; + + ldo11_reg: LDO11 { + regulator-name = "vdd_ldo11"; + regulator-min-microvolt = <100>; + regulator-max-microvolt = <100>; + regulator-always-on; + }; + + ldo12_reg: LDO12 { + regulator-name = "vdd_ldo12"; + regulator-min-microvolt = <180>; + regulator-max-microvolt = <180>; + regulator-always-on; + }; + + ldo13_reg: LDO13 { + regulator-name = "vddq_mmc2"; + regulator-min-microvolt = <280>; + regulator-max-microvolt = <280>; + }; + + ldo15_reg: LDO15 { +
Re: [U-Boot] [PATCH 2/2] configs: odroid-xu3: remove the CONFIG_I2C_COMPAT
Hi 2017. 5. 30. 15:08에 "Jaehoon Chung" 님이 작성: Remove the CONFIG_I2C_COMPAT, instead enable the CONFIG_SYS_I2C_S3C24X0. Signed-off-by: Jaehoon Chung --- configs/odroid-xu3_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig index dab4cc1..29b5010 100644 --- a/configs/odroid-xu3_defconfig +++ b/configs/odroid-xu3_defconfig @@ -25,7 +25,7 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_ADC=y CONFIG_ADC_EXYNOS=y CONFIG_DFU_MMC=y -CONFIG_DM_I2C_COMPAT=y +CONFIG_SYS_I2C_S3C24X0=y CONFIG_MMC_DW=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_S5P=y -- 2.10.2 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot applied to u-boot-samsung Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] odroid: remove COMPAT_DM_I2C_COMPAT config
Hi 2017. 6. 1. 12:35에 "Simon Glass" 님이 작성: On 29 May 2017 at 19:06, Jaehoon Chung wrote: > Remove the COMPAT_DM_I2C_COMPAT config. > > Signed-off-by: Jaehoon Chung > --- > This patch is based on "Enable the CONFIG_DM_MMC for Exynos4 series" > > configs/odroid_defconfig | 2 +- > include/configs/odroid.h | 5 - > 2 files changed, 1 insertion(+), 6 deletions(-) > Reviewed-by: Simon Glass ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot Could you please rebase? Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v7 3/6] arm: socfpga: Enable FPGA driver on SPL
On Isn, 2017-06-05 at 11:32 +0800, Chee, Tien Fong wrote: > > > > > > On Sab, 2017-06-03 at 13:27 +0200, Marek Vasut wrote: > > > > On 05/29/2017 06:00 AM, tien.fong.c...@intel.com wrote: > > > > > > > > > From: Tien Fong Chee > > > > > > This patch is for enabling the FPGA driver support on SPL. > > > > > > Signed-off-by: Tien Fong Chee > > > --- > > > include/configs/socfpga_common.h | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/include/configs/socfpga_common.h > > > b/include/configs/socfpga_common.h > > > index da7e4ad..e74e7eb 100644 > > > --- a/include/configs/socfpga_common.h > > > +++ b/include/configs/socfpga_common.h > > > @@ -110,6 +110,7 @@ > > > #define CONFIG_FPGA > > > #define CONFIG_FPGA_ALTERA > > > #define CONFIG_FPGA_SOCFPGA > > > +#define CONFIG_SPL_FPGA_SUPPORT > > This should be Kconfig symbol selected in board config. Why is it > > not > > Kconfig symbol ? > > Ahhaijust recalled there is a very important reason i did this because CONFIG_CMD_FPGA which is wrapping all these FPGA related CONFIG is not part of kconfig. During the build, kconfig and Macro #define are in two different phase/order, so we might having build issue during kconfig build(1st phase) when some Macro #define which is 2nd phase are required. > I have a patch that is specific for converting all FPGA related Macro > config by tool created which will be submited after this patch set. > Let me know if you prefer kconfig symbol. > > > > > > #define CONFIG_FPGA_COUNT1 > > > #endif > > > #endif > > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] odroid: remove COMPAT_DM_I2C_COMPAT config
Hi Minkyu, On 06/05/2017 01:01 PM, Minkyu Kang wrote: > Hi Sure, I will rebase on your latest. And i will modify the subject about typo. s/COMPAT/CONFIG/ Will send the patch. Best Regards, Jaehoon Chung > > 2017. 6. 1. 12:35에 "Simon Glass" 님이 작성: > > On 29 May 2017 at 19:06, Jaehoon Chung wrote: >> Remove the COMPAT_DM_I2C_COMPAT config. >> >> Signed-off-by: Jaehoon Chung >> --- >> This patch is based on "Enable the CONFIG_DM_MMC for Exynos4 series" >> >> configs/odroid_defconfig | 2 +- >> include/configs/odroid.h | 5 - >> 2 files changed, 1 insertion(+), 6 deletions(-) >> > > Reviewed-by: Simon Glass > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot > > > Could you please rebase? > > Thanks > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2 07/10] usb: dwc2: fix macro error and change default config for rk3328
On 2017/6/3 18:23, Marek Vasut wrote: On 06/01/2017 01:25 PM, Meng Dongyang wrote: Fix macro error of dwc2 driver, add macro definition to config force mode and HNP/SRP capability. Can you please elaborate some more on the purpose of this patch ? It seems wrong, since the driver works on systems using DWC2 as is and this patch changes constants used in the driver. OK, I will think about making it works as before. But I found that some config need to be change on some platform. Signed-off-by: Meng Dongyang --- Changes in v2: - Splited from patch [07/08] of v1 drivers/usb/host/dwc2.c | 9 - drivers/usb/host/dwc2.h | 10 ++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c index 0e5df15..51619d6 100644 --- a/drivers/usb/host/dwc2.c +++ b/drivers/usb/host/dwc2.c @@ -370,7 +370,7 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) usbcfg &= ~DWC2_GUSBCFG_DDRSEL; #endif } else {/* UTMI+ interface */ -#if (CONFIG_DWC2_UTMI_PHY_WIDTH == 16) +#if (CONFIG_DWC2_UTMI_WIDTH == 16) The macro definition of UTMI width is CONFIG_DWC2_UTMI_WIDTH, yet here is CONFIG_DWC2_UTMI_PHY_WIDTH. So maybe it's better to change them to the same one. usbcfg |= DWC2_GUSBCFG_PHYIF; #endif } @@ -394,6 +394,11 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) usbcfg |= DWC2_GUSBCFG_ULPI_CLK_SUS_M; } #endif + +#ifdef CONFIG_DWC2_FORCE_HOST_MODE + usbcfg |= DWC2_GUSBCFG_FORCEHOSTMODE; +#endif + I found that on the platform not support HNP/SRP capability, the dr_mode will still be otg after init and the host mode can't work. So may be a config of force_mode is necessary. writel(usbcfg, ®s->gusbcfg); /* Program the GAHBCFG Register. */ @@ -422,8 +427,10 @@ static void dwc_otg_core_init(struct dwc2_priv *priv) writel(ahbcfg, ®s->gahbcfg); +#ifdef CONFIG_DWC2_HNP_SRP_CAP /* Program the GUSBCFG register for HNP/SRP. */ setbits_le32(®s->gusbcfg, DWC2_GUSBCFG_HNPCAP | DWC2_GUSBCFG_SRPCAP); +#endif #ifdef CONFIG_DWC2_IC_USB_CAP setbits_le32(®s->gusbcfg, DWC2_GUSBCFG_IC_USB_CAP); diff --git a/drivers/usb/host/dwc2.h b/drivers/usb/host/dwc2.h index 4482dc6..3c62e9b 100644 --- a/drivers/usb/host/dwc2.h +++ b/drivers/usb/host/dwc2.h @@ -771,11 +771,11 @@ struct dwc2_core_regs { #define CONFIG_DWC2_MAX_TRANSFER_SIZE 65535 #define CONFIG_DWC2_MAX_PACKET_COUNT 511 -#define DWC2_PHY_TYPE_FS 0 -#define DWC2_PHY_TYPE_UTMI 1 -#define DWC2_PHY_TYPE_ULPI 2 +#define DWC2_PHY_TYPE_UTMI 0 +#define DWC2_PHY_TYPE_ULPI 1 +#define DWC2_PHY_TYPE_FS 2 According to table 5-10 of "DesignWare Cores USB 2.0 Hi-Speed On-The-Go(OTG)" 3.10a databook, ULPI or UTMI+ Select (ULPI_UTMI_Sel) The application uses this bit to select either a UTMI+ interface or ULPI Interface. ■ 1'b0: UTMI+ Interface ■ 1'b1: ULPI Interface But the macor definition in current code would make a opposite config on ULPI_UTMI_Sel bit, (in the function "dwc_otg_core_init") 1: UTMI+ Interface 0: ULPI Interface It seems wrong. #define CONFIG_DWC2_PHY_TYPE DWC2_PHY_TYPE_UTMI /* PHY type */ -#define CONFIG_DWC2_UTMI_WIDTH 8 /* UTMI bus width (8/16) */ +#define CONFIG_DWC2_UTMI_WIDTH 16 /* UTMI bus width (8/16) */ So basically you now force 16bit UTMI bus width instead of 8 ? Three changes basically 1. force 16bit UTMI bus width instead of 8 2. config force mode on the platform without HNP/SRP capability. 3. change macro definition about PHY type (ULPI_UTMI_Sel). This breaks every single platform in U-Boot using the DWC2. #undef CONFIG_DWC2_PHY_ULPI_DDR /* ULPI PHY uses DDR mode */ #define CONFIG_DWC2_PHY_ULPI_EXT_VBUS /* ULPI PHY controls VBUS */ @@ -785,5 +785,7 @@ struct dwc2_core_regs { #undef CONFIG_DWC2_THR_CTL/* Threshold control */ #define CONFIG_DWC2_TX_THR_LENGTH 64 #undef CONFIG_DWC2_IC_USB_CAP /* IC Cap */ +#define CONFIG_DWC2_FORCE_HOST_MODE/* Force host mode */ +#undef CONFIG_DWC2_HNP_SRP_CAP /* HNP/SRP Cap */ #endif /* __DWC2_H__ */ ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v7 4/6] drivers: Enable FPGA driver build on SPL
On Sab, 2017-06-03 at 13:29 +0200, Marek Vasut wrote: > On 05/29/2017 06:00 AM, tien.fong.c...@intel.com wrote: > > > > From: Tien Fong Chee > > > > Enable FPGA driver build for SPL because FPGA driver is needed for > > SPL > > to configure and getting DDR up before loading U-boot into DDR and > > booting from there. > > > > Signed-off-by: Tien Fong Chee > The thing I fail to understand is why you're sending the patches in > seemingly random order. You add/change piece of code, then enable > something and then add the relevant code you're enabling. I really do > not understand that. > > The patches should have some logical order -- change existing code, > add > new code, enable stuff. > > Anyway, please collect the Acks, fix the nit and resubmit. > Sorry for confusing, i enabled the stuff just to detect any break and bugs as early as possible. I will follow the logical order next time :) . > > > > --- > > drivers/Makefile | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/Makefile b/drivers/Makefile > > index 64c39d3..4478212 100644 > > --- a/drivers/Makefile > > +++ b/drivers/Makefile > > @@ -48,6 +48,7 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/ > > obj-$(CONFIG_SPL_SATA_SUPPORT) += block/ > > obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/ > > obj-$(CONFIG_SPL_MMC_SUPPORT) += block/ > > +obj-$(CONFIG_SPL_FPGA_SUPPORT) += fpga/ > > endif > > > > ifdef CONFIG_TPL_BUILD > > > ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH v2] Kconfig: Add description for CMD_POWEROFF
Add poweroff description to Kconfig to make it selectable via menuconfig. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- Changes in v2: - Remove default n value which doesn't need to be specified - Add Simon's Reviewed-by: cmd/Kconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 270cff6297d9..412bf24fb259 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -266,7 +266,9 @@ config CMD_XIMG Extract a part of a multi-image. config CMD_POWEROFF - bool + bool "poweroff" + help + Poweroff/Shutdown the system endmenu -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH] Move CONFIG_SF_DUAL_FLASH to defconfig
On 1.6.2017 10:42, Mike Looijmans wrote: > Move the only use of CONFIG_SF_DUAL_FLASH to defconfig. This makes the > associated topic_miamiplus.h header obsolete, so remove that as well. > > Signed-off-by: Mike Looijmans > --- > configs/topic_miamiplus_defconfig | 3 ++- > include/configs/topic_miamiplus.h | 2 -- > scripts/config_whitelist.txt | 1 - > 3 files changed, 2 insertions(+), 4 deletions(-) > delete mode 100644 include/configs/topic_miamiplus.h > > diff --git a/configs/topic_miamiplus_defconfig > b/configs/topic_miamiplus_defconfig > index 10762f8..535ce6d 100644 > --- a/configs/topic_miamiplus_defconfig > +++ b/configs/topic_miamiplus_defconfig > @@ -1,6 +1,6 @@ > CONFIG_ARM=y > CONFIG_SYS_VENDOR="topic" > -CONFIG_SYS_CONFIG_NAME="topic_miamiplus" > +CONFIG_SYS_CONFIG_NAME="topic_miami" > CONFIG_ARCH_ZYNQ=y > CONFIG_SYS_TEXT_BASE=0x400 > CONFIG_BOOT_INIT_FILE="board/topic/zynq/zynq-topic-miamiplus/ps7_regs.txt" > @@ -28,6 +28,7 @@ CONFIG_SPL_DM_SEQ_ALIAS=y > CONFIG_DFU_RAM=y > CONFIG_MMC_SDHCI=y > CONFIG_MMC_SDHCI_ZYNQ=y > +CONFIG_SF_DUAL_FLASH=y > CONFIG_SPI_FLASH=y > CONFIG_SPI_FLASH_BAR=y > CONFIG_SPI_FLASH_STMICRO=y > diff --git a/include/configs/topic_miamiplus.h > b/include/configs/topic_miamiplus.h > deleted file mode 100644 > index 46ca6bd..000 > --- a/include/configs/topic_miamiplus.h > +++ /dev/null > @@ -1,2 +0,0 @@ > -#include "topic_miami.h" > -#define CONFIG_SF_DUAL_FLASH > diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt > index e8f49eb..642c433 100644 > --- a/scripts/config_whitelist.txt > +++ b/scripts/config_whitelist.txt > @@ -2401,7 +2401,6 @@ CONFIG_SF_DEFAULT_BUS > CONFIG_SF_DEFAULT_CS > CONFIG_SF_DEFAULT_MODE > CONFIG_SF_DEFAULT_SPEED > -CONFIG_SF_DUAL_FLASH > CONFIG_SGI_IP28 > CONFIG_SH4_PCI > CONFIG_SH73A0 > Where is that Kconfig entry change? Thanks, Michal -- Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Xilinx Microblaze Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP SoCs signature.asc Description: OpenPGP digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v2] ARM: zynq: Add support for the topic-miamilite system-on-module
On 1.6.2017 10:49, Mike Looijmans wrote: > The topic-miamilite SoM contains a Zynq xc7z010 SoC, 1GB DDR3L RAM, > 64MB dual-parallel QSPI NOR flash and clock sources. > > Signed-off-by: Mike Looijmans > --- > v2: Move CONFIG_SF_DUAL_FLASH to defconfig > > arch/arm/dts/Makefile | 1 + > arch/arm/dts/zynq-topic-miamilite.dts | 17 ++ > .../topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c | 227 > + > board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt | 61 ++ > configs/topic_miamilite_defconfig | 53 + > 5 files changed, 359 insertions(+) > create mode 100644 arch/arm/dts/zynq-topic-miamilite.dts > create mode 100644 board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c > create mode 100644 board/topic/zynq/zynq-topic-miamilite/ps7_regs.txt > create mode 100644 configs/topic_miamilite_defconfig > > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile > index 2b1a4e9..8745f04 100644 > --- a/arch/arm/dts/Makefile > +++ b/arch/arm/dts/Makefile > @@ -122,6 +122,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \ > zynq-microzed.dtb \ > zynq-picozed.dtb \ > zynq-topic-miami.dtb \ > + zynq-topic-miamilite.dtb \ > zynq-topic-miamiplus.dtb \ > zynq-zc770-xm010.dtb \ > zynq-zc770-xm011.dtb \ > diff --git a/arch/arm/dts/zynq-topic-miamilite.dts > b/arch/arm/dts/zynq-topic-miamilite.dts > new file mode 100644 > index 000..f88cb4b > --- /dev/null > +++ b/arch/arm/dts/zynq-topic-miamilite.dts > @@ -0,0 +1,17 @@ > +/* > + * Topic Miami Lite board DTS > + * > + * Copyright (C) 2017 Topic Embedded Products > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > +#include "zynq-topic-miami.dts" > + > +/ { > + model = "Topic Miami Lite Zynq Board"; > + compatible = "topic,miamilite", "xlnx,zynq-7000"; > +}; > + > +&qspi { > + is-dual = <1>; > +}; > diff --git a/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c > b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c > new file mode 100644 > index 000..ec0cc7d > --- /dev/null > +++ b/board/topic/zynq/zynq-topic-miamilite/ps7_init_gpl.c > @@ -0,0 +1,227 @@ > +/* > + * (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved. > + * (c) Copyright 2016 Topic Embedded Products. > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +#include "../ps7_init_gpl.h" > + > +static unsigned long ps7_pll_init_data_3_0[] = { > + EMIT_MASKWRITE(0xF808, 0xU, 0xDF0DU), > + EMIT_MASKWRITE(0xF8000110, 0x0030U, 0x000FA220U), > + EMIT_MASKWRITE(0xF8000100, 0x0007F000U, 0x00028000U), > + EMIT_MASKWRITE(0xF8000100, 0x0010U, 0x0010U), > + EMIT_MASKWRITE(0xF8000100, 0x0001U, 0x0001U), > + EMIT_MASKWRITE(0xF8000100, 0x0001U, 0xU), > + EMIT_MASKPOLL(0xF800010C, 0x0001U), > + EMIT_MASKWRITE(0xF8000100, 0x0010U, 0xU), > + EMIT_MASKWRITE(0xF8000120, 0x1F003F30U, 0x1F000200U), > + EMIT_MASKWRITE(0xF8000114, 0x0030U, 0x0012C220U), > + EMIT_MASKWRITE(0xF8000104, 0x0007F000U, 0x0002U), > + EMIT_MASKWRITE(0xF8000104, 0x0010U, 0x0010U), > + EMIT_MASKWRITE(0xF8000104, 0x0001U, 0x0001U), > + EMIT_MASKWRITE(0xF8000104, 0x0001U, 0xU), > + EMIT_MASKPOLL(0xF800010C, 0x0002U), > + EMIT_MASKWRITE(0xF8000104, 0x0010U, 0xU), > + EMIT_MASKWRITE(0xF8000124, 0xFFF3U, 0x0C23U), > + EMIT_MASKWRITE(0xF8000118, 0x0030U, 0x00113220U), > + EMIT_MASKWRITE(0xF8000108, 0x0007F000U, 0x00024000U), > + EMIT_MASKWRITE(0xF8000108, 0x0010U, 0x0010U), > + EMIT_MASKWRITE(0xF8000108, 0x0001U, 0x0001U), > + EMIT_MASKWRITE(0xF8000108, 0x0001U, 0xU), > + EMIT_MASKPOLL(0xF800010C, 0x0004U), > + EMIT_MASKWRITE(0xF8000108, 0x0010U, 0xU), > + EMIT_MASKWRITE(0xF804, 0xU, 0x767BU), > + EMIT_EXIT(), > +}; > + > +static unsigned long ps7_clock_init_data_3_0[] = { > + EMIT_MASKWRITE(0xF808, 0xU, 0xDF0DU), > + EMIT_MASKWRITE(0xF8000128, 0x03F03F01U, 0x00302301U), > + EMIT_MASKWRITE(0xF8000138, 0x0011U, 0x0011U), > + EMIT_MASKWRITE(0xF800013C, 0x0011U, 0x0011U), > + EMIT_MASKWRITE(0xF8000140, 0x03F03F71U, 0x00100141U), > + EMIT_MASKWRITE(0xF8000144, 0x03F03F71U, 0x00100141U), > + EMIT_MASKWRITE(0xF8000148, 0x3F31U, 0x0C01U), > + EMIT_MASKWRITE(0xF800014C, 0x3F31U, 0x0601U), > + EMIT_MASKWRITE(0xF8000150, 0x3F33U, 0x1803U), > + EMIT_MASKWRITE(0xF8000154, 0x3F33U, 0x0C03U), > + EMIT_MASKWRITE(0xF8000158, 0x3F33U, 0x0601U), > + EMIT_MASKWRITE(0xF8000168, 0x3F31U, 0x0601U), > + EMIT_MASKWRITE(0xF8000170, 0x03F03F30U, 0x00100C00U), > + EMIT_MASKWRITE(0xF8000180, 0x03F03F30U, 0x00100C00U), > + EMIT_MASKWRITE(0xF8000190, 0x03F03F30U, 0x00100600U), > + EMIT_MASKWRITE(0
Re: [U-Boot] [PATCH v7 07/10] usb: dwc3: Add dwc3 glue driver support for STi
Hi Marek On 06/03/2017 08:06 AM, Marek Vasut wrote: > On 06/01/2017 02:05 PM, patrice.chot...@st.com wrote: >> From: Patrice Chotard >> >> This patch adds the ST glue logic to manage the DWC3 HC >> on STiH407 SoC family. It configures the internal glue >> logic and syscfg registers. >> >> Part of this code been extracted from kernel.org driver >> (drivers/usb/dwc3/dwc3-st.c) >> >> Signed-off-by: Patrice Chotard >> Reviewed-by: Simon Glass >> --- >> >> v7: _ none >> >> v6: _ add reviewed-by Simon Glass >> _ put #define first >> >> v5: _ none >> >> v4: _ none >> >> v3: _ rename dwc3-sti.c to dwc3-sti-glue.c >> _ respect device tree hierarchy, this driver is now responsible >>for xhci-sti binding (done in sti_dwc3_glue_bind()) >> >> v2: _ use setbits_le32() instead of read, modify, write sequence >> _ add missing parenthesis >> >> arch/arm/include/asm/arch-stih410/sys_proto.h | 11 ++ >> doc/device-tree-bindings/usb/dwc3-st.txt | 60 ++ >> drivers/usb/host/Kconfig | 9 + >> drivers/usb/host/Makefile | 1 + >> drivers/usb/host/dwc3-sti-glue.c | 256 >> ++ >> include/dwc3-sti-glue.h | 43 + >> 6 files changed, 380 insertions(+) >> create mode 100644 arch/arm/include/asm/arch-stih410/sys_proto.h >> create mode 100644 doc/device-tree-bindings/usb/dwc3-st.txt >> create mode 100644 drivers/usb/host/dwc3-sti-glue.c >> create mode 100644 include/dwc3-sti-glue.h >> >> diff --git a/arch/arm/include/asm/arch-stih410/sys_proto.h >> b/arch/arm/include/asm/arch-stih410/sys_proto.h >> new file mode 100644 >> index 000..5c40d3b >> --- /dev/null >> +++ b/arch/arm/include/asm/arch-stih410/sys_proto.h >> @@ -0,0 +1,11 @@ >> +/* >> + * Copyright (c) 2017 >> + * Patrice Chotard >> + * >> + * SPDX-License-Identifier: GPL-2.0+ >> + */ >> + >> +#ifndef _ASM_ARCH_SYS_PROTO_H >> +#define _ASM_ARCH_SYS_PROTO_H >> + >> +#endif /* _ASM_ARCH_SYS_PROTO_H */ >> diff --git a/doc/device-tree-bindings/usb/dwc3-st.txt >> b/doc/device-tree-bindings/usb/dwc3-st.txt >> new file mode 100644 >> index 000..a26a139 >> --- /dev/null >> +++ b/doc/device-tree-bindings/usb/dwc3-st.txt >> @@ -0,0 +1,60 @@ >> +ST DWC3 glue logic > > Is this DT binding imported from Linux ? Yes > >> +This file documents the parameters for the dwc3-st driver. >> +This driver controls the glue logic used to configure the dwc3 core on >> +STiH407 based platforms. >> + >> +Required properties: >> + - compatible : must be "st,stih407-dwc3" >> + - reg : glue logic base address and USB syscfg ctrl register >> offset >> + - reg-names: should be "reg-glue" and "syscfg-reg" >> + - st,syscon: should be phandle to system configuration node which >> + encompasses the glue registers >> + - resets : list of phandle and reset specifier pairs. There should be >> two entries, one >> + for the powerdown and softreset lines of the usb3 IP >> + - reset-names : list of reset signal names. Names should be >> "powerdown" and "softreset" >> + >> + - #address-cells, #size-cells : should be '1' if the device has sub-nodes >> + with 'reg' property >> + >> + - pinctl-names : A pinctrl state named "default" must be defined >> + >> + - pinctrl-0: Pin control group >> + >> + - ranges : allows valid 1:1 translation between child's address space and >> + parent's address space >> + >> +Sub-nodes: >> +The dwc3 core should be added as subnode to ST DWC3 glue as shown in the >> +example below. >> + >> +NB: The dr_mode property is NOT optional for this driver, as the default >> value >> +is "otg", which isn't supported by this SoC. Valid dr_mode values for >> dwc3-st are >> +either "host" or "device". >> + [...] >> +static int sti_dwc3_glue_probe(struct udevice *dev) >> +{ >> +struct sti_dwc3_glue_platdata *plat = dev_get_platdata(dev); >> +int ret; >> + >> +/* deassert both powerdown and softreset */ >> +ret = reset_deassert(&plat->powerdown_ctl); >> +if (ret < 0) { >> +error("DWC3 powerdown reset deassert failed: %d", ret); >> +return ret; >> +} >> + >> +ret = reset_deassert(&plat->softreset_ctl); >> +if (ret < 0) { >> +error("DWC3 soft reset deassert failed: %d", ret); >> +goto err1; >> +} >> + >> +ret = sti_dwc3_glue_drd_init(plat); >> +if (ret) >> +goto err2; >> + >> +sti_dwc3_glue_init(plat); >> + >> +return 0; >> + >> +err2: > > Invent some more descriptive failpath label names please Ok > >> +ret = reset_assert(&plat->softreset_ctl); >> +if (ret < 0) { >> +error("DWC3 soft reset deassert failed: %d", ret); >> +return ret; >> +} >> + >> +err1: >> +ret = reset_assert(&plat->powerdown_ctl); >> +if (ret < 0) >> +error("DWC3 powerd
[U-Boot] [PATCH] arm64: ls1043ardb: Add distro secure boot support
Enable validation of boot.scr script prior to its execution dependent on "secureboot" flag in environment. Disable fall back option to nor/qspi boot in case of secure boot. Also enable "secureboot=y" flag in environment for ARM based platforms instead of bootcmd. Signed-off-by: Sumit Garg Tested-by: Vinitha Pillai --- board/freescale/common/fsl_chain_of_trust.c | 6 ++ configs/ls1043ardb_SECURE_BOOT_defconfig| 1 + configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig | 1 + include/configs/ls1043a_common.h| 23 +-- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/board/freescale/common/fsl_chain_of_trust.c b/board/freescale/common/fsl_chain_of_trust.c index 438e781..609e2b2 100644 --- a/board/freescale/common/fsl_chain_of_trust.c +++ b/board/freescale/common/fsl_chain_of_trust.c @@ -80,7 +80,13 @@ int fsl_setenv_chain_of_trust(void) * bootcmd = CONFIG_CHAIN_BOOT_CMD (Validate and execute Boot script) */ setenv("bootdelay", "0"); + +#ifdef CONFIG_ARM + setenv("secureboot", "y"); +#else setenv("bootcmd", CONFIG_CHAIN_BOOT_CMD); +#endif + return 0; } #endif diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig b/configs/ls1043ardb_SECURE_BOOT_defconfig index 861d49b..3f535cc 100644 --- a/configs/ls1043ardb_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_SECURE_BOOT_defconfig @@ -40,3 +40,4 @@ CONFIG_USB_STORAGE=y CONFIG_RSA=y CONFIG_SPL_RSA=y CONFIG_RSA_SOFTWARE_EXP=y +CONFIG_DISTRO_DEFAULTS=y diff --git a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig index 5f9b21d..2d57e79 100644 --- a/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig +++ b/configs/ls1043ardb_sdcard_SECURE_BOOT_defconfig @@ -56,3 +56,4 @@ CONFIG_RSA=y CONFIG_SPL_RSA=y CONFIG_SPL_CRYPTO_SUPPORT=y CONFIG_SPL_HASH_SUPPORT=y +CONFIG_DISTRO_DEFAULTS=y diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h index e8a756f..6e30427 100644 --- a/include/configs/ls1043a_common.h +++ b/include/configs/ls1043a_common.h @@ -282,6 +282,7 @@ "fdt_addr=0x64f0\0" \ "kernel_addr=0x6500\0" \ "scriptaddr=0x8000\0" \ + "scripthdraddr=0x8008\0"\ "fdtheader_addr_r=0x8010\0" \ "kernelheader_addr_r=0x8020\0" \ "kernel_addr_r=0x8100\0"\ @@ -292,6 +293,7 @@ "mtdparts=" MTDPARTS_DEFAULT "\0" \ BOOTENV \ "boot_scripts=ls1043ardb_boot.scr\0"\ + "boot_script_hdr=hdr_ls1043ardb_bs.out\0" \ "scan_dev_for_boot_part=" \ "part list ${devtype} ${devnum} devplist; " \ "env exists devplist || setenv devplist 1; " \ @@ -302,6 +304,21 @@ "run scan_dev_for_boot; " \ "fi; " \ "done\0"\ + "scan_dev_for_boot=" \ + "echo Scanning ${devtype} " \ + "${devnum}:${distro_bootpart}...; " \ + "for prefix in ${boot_prefixes}; do " \ + "run scan_dev_for_scripts; " \ + "done;" \ + "\0" \ + "boot_a_script=" \ + "load ${devtype} ${devnum}:${distro_bootpart} " \ + "${scriptaddr} ${prefix}${script}; "\ + "env exists secureboot && load ${devtype} " \ + "${devnum}:${distro_bootpart} " \ + "${scripthdraddr} ${prefix}${boot_script_hdr} " \ + "&& esbc_validate ${scripthdraddr};"\ + "source ${scriptaddr}\0" \ "installer=load mmc 0:2 $load_addr " \ "/flex_installer_arm64.itb; " \ "bootm $load_addr#ls1043ardb\0"\ @@ -315,9 +332,11 @@ #undef CONFIG_BOOTCOMMAND #if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) -#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd" +#define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ + "&& esbc_halt; run qspi_bootcmd;" #else -#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run nor_bootcmd" +#define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \ + "&& esbc_halt; run nor_bootcmd;" #endif #define CONFIG_BOOTARGS"console=ttyS0,115200 root=/dev/ram0 " \ -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH v7 04/10] usb: phy: Add STi USB2 PHY
Hi Marek On 06/03/2017 08:08 AM, Marek Vasut wrote: > On 06/01/2017 02:05 PM, patrice.chot...@st.com wrote: >> From: Patrice Chotard >> >> This is the generic phy driver for the picoPHY ports >> used by USB2/1.1 controllers. It is found on STiH407 SoC >> family from STMicroelectronics. >> >> Signed-off-by: Patrice Chotard >> Reviewed-by: Marek Vasut >> --- >> v7: _ replace fdtdec_parse_phandle_with_args() by >> dev_read_phandle_with_args() >> _ replace uclass_get_device_by_of_offset() by >> uclass_get_device_by_ofnode() >> > > You should drop RB if you do significant changes. > >> >> v5: _ add Reviewed-by: Marek Vasut >> >> v4: _ update to use the new PHY uclass currently available on dm-next branch >> >> v3: _ convert driver to USB PHY uclass >> >> v2: _ replace bitfield_replace() by clrsetbits_le32() >> >> doc/device-tree-bindings/phy/phy-stih407-usb.txt | 24 +++ >> drivers/phy/Kconfig | 8 + >> drivers/phy/Makefile | 1 + >> drivers/phy/sti_usb_phy.c| 181 >> +++ >> 4 files changed, 214 insertions(+) >> create mode 100644 doc/device-tree-bindings/phy/phy-stih407-usb.txt >> create mode 100644 drivers/phy/sti_usb_phy.c >> >> diff --git a/doc/device-tree-bindings/phy/phy-stih407-usb.txt >> b/doc/device-tree-bindings/phy/phy-stih407-usb.txt >> new file mode 100644 >> index 000..de6a706 >> --- /dev/null >> +++ b/doc/device-tree-bindings/phy/phy-stih407-usb.txt >> @@ -0,0 +1,24 @@ >> +ST STiH407 USB PHY controller >> + >> +This file documents the dt bindings for the usb picoPHY driver which is the >> PHY for both USB2 and USB3 >> +host controllers (when controlling usb2/1.1 devices) available on STiH407 >> SoC family from STMicroelectronics. >> + >> +Required properties: >> +- compatible: should be "st,stih407-usb2-phy" >> +- st,syscfg : phandle of sysconfig bank plus integer array >> containing phyparam and phyctrl register offsets >> +- resets: list of phandle and reset specifier pairs. There >> should be two entries, one >> + for the whole phy and one for the port >> +- reset-names : list of reset signal names. Should be >> "global" and "port" >> +See: Documentation/devicetree/bindings/reset/st,sti-powerdown.txt >> +See: Documentation/devicetree/bindings/reset/reset.txt >> + >> +Example: >> + >> +usb2_picophy0: usbpicophy@f8 { > > This example uses address, but has no reg property ? Agree, but following advices from Arnd Bergman about not mixing address space and sysconfig registers int the reg property, the reg property was removed. For more details, see https://patches.linaro.org/patch/44081/ > >> +compatible = "st,stih407-usb2-phy"; >> +#phy-cells = <0>; >> +st,syscfg = <&syscfg_core 0x100 0xf4>; >> +resets = <&softreset STIH407_PICOPHY_SOFTRESET>, >> + <&picophyreset STIH407_PICOPHY0_RESET>; >> +reset-names = "global", "port"; >> +}; >> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig >> index a91a694..4330b36 100644 >> --- a/drivers/phy/Kconfig >> +++ b/drivers/phy/Kconfig >> @@ -59,4 +59,12 @@ config SPL_PIPE3_PHY >>This PHY is found on omap devices supporting SATA such as dra7, am57x >>and omap5 >> >> +config STI_USB_PHY >> +bool "STMicroelectronics USB2 picoPHY driver for STiH407 family" >> +depends on PHY && ARCH_STI >> +help >> + This is the generic phy driver for the picoPHY ports >> + used by USB2 and USB3 Host controllers available on >> + STiH407 SoC families. >> + >> endmenu >> diff --git a/drivers/phy/Makefile b/drivers/phy/Makefile >> index 6ce96d2..22d92d3 100644 >> --- a/drivers/phy/Makefile >> +++ b/drivers/phy/Makefile >> @@ -8,3 +8,4 @@ >> obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o >> obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o >> obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o >> +obj-$(CONFIG_STI_USB_PHY) += sti_usb_phy.o >> diff --git a/drivers/phy/sti_usb_phy.c b/drivers/phy/sti_usb_phy.c >> new file mode 100644 >> index 000..0e0b1c0 >> --- /dev/null >> +++ b/drivers/phy/sti_usb_phy.c >> @@ -0,0 +1,181 @@ >> +/* >> + * Copyright (c) 2017 >> + * Patrice Chotard >> + * >> + * SPDX-License-Identifier: GPL-2.0+ >> + */ >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> + >> +DECLARE_GLOBAL_DATA_PTR; >> + >> +/* Default PHY_SEL and REFCLKSEL configuration */ >> +#define STIH407_USB_PICOPHY_CTRL_PORT_CONF 0x6 >> + >> +/* ports parameters overriding */ >> +#define STIH407_USB_PICOPHY_PARAM_DEF 0x39a4dc >> + >> +#define PHYPARAM_REG1 >> +#define PHYCTRL_REG 2 >> +#define PHYPARAM_NB 3 >> + >> +struct sti_usb_phy { >> +struct regmap *regmap; >> +struct