[U-Boot] [PATCH v5] QE: add QE support on SD boot

2017-05-24 Thread Zhao Qiang
modify u_qe_init to upload QE firmware from SD card when it is SD
boot

Signed-off-by: Zhao Qiang 
---
Changes for v2:
- fix issue of memory leak
Changes for v3:
- add CONFIG_SYS_QE_FMAN_FW_IN_NOR to ls1021a
Changes for v4:
- rebase due to memory-mapping conflict
Changes for v5:
- fix compile issue for PowerPC 

 drivers/qe/qe.c  | 36 +++-
 include/configs/ls1021aqds.h |  1 +
 include/configs/ls1021atwr.h |  1 +
 include/configs/ls1043a_common.h |  2 ++
 include/configs/ls1043ardb.h |  4 +---
 5 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/drivers/qe/qe.c b/drivers/qe/qe.c
index 4f0a278..24e764d 100644
--- a/drivers/qe/qe.c
+++ b/drivers/qe/qe.c
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -17,6 +18,10 @@
 #include 
 #endif
 
+#ifdef CONFIG_SYS_QE_FMAN_FW_IN_MMC
+#include 
+#endif
+
 #define MPC85xx_DEVDISR_QE_DISABLE 0x1
 
 qe_map_t   *qe_immr = NULL;
@@ -194,8 +199,37 @@ void u_qe_init(void)
 {
qe_immr = (qe_map_t *)(CONFIG_SYS_IMMR + QE_IMMR_OFFSET);
 
-   u_qe_upload_firmware((const void *)CONFIG_SYS_QE_FW_ADDR);
+   void *addr = (void *)CONFIG_SYS_QE_FW_ADDR;
+#ifdef CONFIG_SYS_QE_FMAN_FW_IN_MMC
+   int dev = CONFIG_SYS_MMC_ENV_DEV;
+   u32 cnt = CONFIG_SYS_QE_FMAN_FW_LENGTH / 512;
+   u32 blk = CONFIG_SYS_QE_FW_ADDR / 512;
+
+   if (mmc_initialize(gd->bd)) {
+   printf("%s: mmc_initialize() failed\n", __func__);
+   return;
+   }
+   addr = malloc(CONFIG_SYS_QE_FMAN_FW_LENGTH);
+   struct mmc *mmc = find_mmc_device(CONFIG_SYS_MMC_ENV_DEV);
+
+   if (!mmc) {
+   free(addr);
+   printf("\nMMC cannot find device for ucode\n");
+   } else {
+   printf("\nMMC read: dev # %u, block # %u, count %u ...\n",
+  dev, blk, cnt);
+   mmc_init(mmc);
+   (void)mmc->block_dev.block_read(>block_dev, blk, cnt,
+   addr);
+   /* flush cache after read */
+   flush_cache((ulong)addr, cnt * 512);
+   }
+#endif
+   u_qe_upload_firmware(addr);
out_be32(_immr->iram.iready, QE_IRAM_READY);
+#ifdef CONFIG_SYS_QE_FMAN_FW_IN_MMC
+   free(addr);
+#endif
 }
 #endif
 
diff --git a/include/configs/ls1021aqds.h b/include/configs/ls1021aqds.h
index 5fcaf85..fb077fb 100644
--- a/include/configs/ls1021aqds.h
+++ b/include/configs/ls1021aqds.h
@@ -125,6 +125,7 @@ unsigned long get_board_ddr_clk(void);
 #if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
!defined(CONFIG_QSPI_BOOT)
 #define CONFIG_U_QE
+#define CONFIG_SYS_QE_FMAN_FW_IN_NOR
 #endif
 
 /*
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 2a20dec..240c2e2 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -150,6 +150,7 @@
 #if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
!defined(CONFIG_QSPI_BOOT)
 #define CONFIG_U_QE
+#define CONFIG_SYS_QE_FMAN_FW_IN_NOR
 #endif
 
 /*
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 155da92..56f5ee6 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -219,6 +219,7 @@
  */
 #define CONFIG_SYS_QE_FMAN_FW_IN_MMC
 #define CONFIG_SYS_FMAN_FW_ADDR(512 * 0x4800)
+#define CONFIG_SYS_QE_FW_ADDR  (512 * 0x4a08)
 #elif defined(CONFIG_QSPI_BOOT)
 #define CONFIG_SYS_QE_FW_IN_SPIFLASH
 #define CONFIG_SYS_FMAN_FW_ADDR0x4090
@@ -230,6 +231,7 @@
 #define CONFIG_SYS_QE_FMAN_FW_IN_NOR
 /* FMan fireware Pre-load address */
 #define CONFIG_SYS_FMAN_FW_ADDR0x6090
+#define CONFIG_SYS_QE_FW_ADDR  0x6094
 #endif
 #define CONFIG_SYS_QE_FMAN_FW_LENGTH   0x1
 #define CONFIG_SYS_FDT_PAD (0x3000 + CONFIG_SYS_QE_FMAN_FW_LENGTH)
diff --git a/include/configs/ls1043ardb.h b/include/configs/ls1043ardb.h
index a162378..2ce7ddd 100644
--- a/include/configs/ls1043ardb.h
+++ b/include/configs/ls1043ardb.h
@@ -277,11 +277,9 @@
 
 /* QE */
 #ifndef SPL_NO_QE
-#if !defined(CONFIG_SD_BOOT) && !defined(CONFIG_NAND_BOOT) && \
-   !defined(CONFIG_QSPI_BOOT)
+#if !defined(CONFIG_NAND_BOOT) && !defined(CONFIG_QSPI_BOOT)
 #define CONFIG_U_QE
 #endif
-#define CONFIG_SYS_QE_FW_ADDR 0x6094
 #endif
 
 /* USB */
-- 
2.1.0.27.g96db324

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 01/72] dm: core: Set return value first in lists_bind_fdt()

2017-05-24 Thread sjg
Adjust the order to make it clear that *devp is set to NULL by default.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/lists.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Please pull u-boot-dm

2017-05-24 Thread Simon Glass
Hi Tom,

This is the first two of the livetree series as well as some
driver-model adjustments for MMC.

It's up to you if you want to take this now, or wait. I will send a
new version of the 3rd livetree series later by early next week and am
happy to do this all at once if you prefer. On the other hand I don't
want to miss RC1 if I can help it.


The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:

  Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23
16:22:03 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-dm.git

for you to fetch changes up to 68dbdcb3cf8c59ab04b1b31d750fcee1e603e760:

  sandbox: Move to use live tree (2017-05-24 14:18:23 -0600)


Simon Glass (90):
  dm: Use dm.h header when driver mode is used
  dm: core: Move dev_get_addr() etc. into a separate file
  dm: Rename dev_addr..() functions
  atmel: Fix up use of dm_scan_fdt_node()
  dm: Fix up inclusion of common.h
  dm: core: Dont export dm_scan_fdt_node()
  dm: core: Replace of_offset with accessor (part 2)
  dm: core: Add ofnode to represent device tree nodes
  dm: core: Adjust device_bind_common() to take an ofnode
  dm: mmc: Don't call board_mmc_power_init() with driver model
  dm: mmc: Don't re-init when accessing environment
  dm: blk: Allow finding block devices without probing
  dm: blk: Add a function to find the next block device number
  dm: blk: Improve block device claiming
  dm: mmc: Avoid probing block devices in find_mmc_device()
  dm: mmc: Check that drivers have operations
  dm: mmc: Rewrite mmc_blk_probe()
  tegra: Convert MMC to use driver model for operations
  dm: core: Set return value first in lists_bind_fdt()
  Update WARN_ON() to return a value
  dm: core: Add livetree definitions
  dm: core: Add livetree access functions
  dm: Add a function to create a 'live' device tree
  dm: Build a live tree after relocation
  dm: core: Rename of_device_is_compatible()
  dm: core: Add operations on device tree references
  dm: core: Add livetree address functions
  fdt: Update fdt_get_base_address() to use const
  dm: core: Add address operations on device tree references
  dm: core: Add a place to put extra device-tree reading functions
  dm: core: Add device-based 'read' functions to access DT
  dm: core: Implement live tree 'read' functions
  dm: core: Allow binding a device from a live tree
  dm: core: Update lists_bind_fdt() to use ofnode
  dm: core: Update device_bind_driver_to_node() to use ofnode
  dm: core: Scan the live tree when setting up driver model
  dm: core: Add a way to find a device by ofnode
  dm: regmap: Add support for livetree
  dm: simple-bus: Add support for livetree
  dm: core: Update uclass_find_device_by_phandle() for livetree
  sandbox: Add a way to reset sandbox state for tests
  dm: test: Move test running code into a separate function
  dm: test: Show the test filename when running
  dm: test: Add support for running tests with livetree
  dm: core: Run tests with both livetree and flat tree
  dm: gpio: Refactor to prepare for live tree support
  dm: gpio: Drop blank line in gpio_xlate_offs_flags() comment
  dm: gpio: sandbox: Use dev_read...() functions to access DT
  dm: gpio: Add live tree support
  cros_ec: Fix debug() statement in ec_command_inptr()
  cros_ec: Convert to support live tree
  sandbox: Add a new sandbox_flattree board
  test: Update 'make test' to run more tests
  fdt: Rename a few functions in fdt_support
  dm: Add more livetree helpers and definitions
  string: Add strchrnul()
  string: Add strcspn()
  dm: i2c: Convert uclass to livetree
  samsung: Move pmic header out of config file
  dm: pmic: Convert uclass to livetree
  sandbox: pmic: Convert pmic emulator to support livetree
  dm: regulator: Convert regulator uclass to support livetree
  dm: regulator: Update fixed regulator to support livetree.
  dm: mmc: Convert uclass to livetree
  dm: adc: Convert uclass to livetree
  dm: usb: Convert uclass to livetree
  sandbox: usb: Convert emulators to livetree
  clk: Modify xlate() method for livetree
  dm: clk: Update uclass to support livetree
  dm: clk: fixed: Update to support livetree
  dm: test: Separate out the bus DT offset test
  dm: test: Disable the fdt_offset test with livetree
  dm: phy: Update tests to use ut_asserteq()
  dm: mailbox: Update uclass to support livetree
  dm: phy: Update uclass to support livetree
  sandbox: phy: Update driver for livetree
  dm: power-domain: Update uclass to support livetree
  dm: reset: Update uclass to support livetree
  dm: pci: Update uclass to support livetree
  dm: Update the I2C 

Re: [U-Boot] [PATCH v3 43/72] sandbox: pmic: Convert pmic emulator to support livetree

2017-05-24 Thread sjg
Update this driver to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/power/pmic/i2c_pmic_emul.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 07/72] dm: core: Rename of_device_is_compatible()

2017-05-24 Thread sjg
The of_ prefix conflicts with the livetree version of this function.
Rename it to avoid problems when we add livetree support.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/device.c | 2 +-
 drivers/firmware/psci.c   | 4 ++--
 drivers/mmc/xenon_sdhci.c | 2 +-
 drivers/net/cpsw-common.c | 4 ++--
 drivers/net/mvneta.c  | 2 +-
 drivers/phy/marvell/comphy_core.c | 4 ++--
 drivers/usb/host/ehci-marvell.c   | 2 +-
 drivers/usb/host/xhci-rockchip.c  | 2 +-
 include/dm/device.h   | 4 ++--
 9 files changed, 13 insertions(+), 13 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 13/72] dm: core: Add device-based 'read' functions to access DT

2017-05-24 Thread sjg
It is common to read a device-tree property from the node associated with
a device. Add convenience functions to do this so that drivers do not need
to deal with accessing the ofnode from the device.

These functions all start with 'dev_read_' to provide consistent naming
for all functions which read information from a device's device tree node.

These are inlined when using the flat DT to save code size. The live tree
implementation is added in a later commit.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/Kconfig |   4 +
 include/dm/read.h| 383 +++
 2 files changed, 387 insertions(+)
 create mode 100644 include/dm/read.h

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 08/72] dm: core: Add operations on device tree references

2017-05-24 Thread sjg
Since U-Boot supports both a live tree and a flat tree, we need an easy
way to access the tree without worrying about which is currently active.
To support this, U-Boot has the concept of an ofnode, which can refer
either to a live tree node or a flat tree node.

For the live tree, the reference contains a pointer to the node (struct
device_node *) or NULL if the node is invalid. For the flat tree, the
reference contains the node offset or -1 if the node is invalid.

Add a basic set of operations using ofnodes. These are implemented by
using either libfdt functions (in the case of a flat DT reference) or
the live-tree of_...() functions.

Note that it is not possible to have both live and flat references active
at the same time. As soon as the live tree is available, everything in
U-Boot should switch to using that. This avoids confusion and allows us to
assume that the type of a reference is simply based on whether we have a
live tree yet, or not.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Adjust header includes in ofnode.h to make it stand alone

Changes in v2: None

 drivers/core/Makefile |   1 +
 drivers/core/ofnode.c | 552 ++
 include/dm/ofnode.h   | 467 +-
 3 files changed, 1017 insertions(+), 3 deletions(-)
 create mode 100644 drivers/core/ofnode.c

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 22/72] dm: core: Update uclass_find_device_by_phandle() for livetree

2017-05-24 Thread sjg
Adjust this function to work with livetree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/uclass.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 40/72] dm: i2c: Convert uclass to livetree

2017-05-24 Thread sjg
Update the i2c uclass to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/i2c/i2c-uclass.c | 28 +---
 include/i2c.h|  3 +--
 2 files changed, 14 insertions(+), 17 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 23/72] sandbox: Add a way to reset sandbox state for tests

2017-05-24 Thread sjg
Running a new test should reset the sandbox state to avoid tests
interferring with each other. Move the existing state-reset code into a
function so it can be used from tests.

Also update the code to reset the SPI devices and adjust the test code to
call it.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Clear the watchdog state also

Changes in v2: None

 arch/sandbox/cpu/state.c | 15 +++
 arch/sandbox/include/asm/state.h |  7 +++
 test/dm/test-main.c  |  1 +
 3 files changed, 19 insertions(+), 4 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 31/72] dm: gpio: Add live tree support

2017-05-24 Thread sjg
Add support for requesting GPIOs with a live device tree.

This involves adjusting the function signature for the legacy function
gpio_request_by_name_nodev(), so fix up all callers.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 board/qualcomm/dragonboard410c/dragonboard410c.c | 12 +++---
 board/samsung/common/board.c |  4 +-
 board/samsung/common/exynos5-dt.c|  2 +-
 drivers/gpio/gpio-uclass.c   | 51 +++-
 drivers/i2c/mxc_i2c.c| 12 +++---
 drivers/mmc/fsl_esdhc.c  |  6 +--
 drivers/mmc/s5p_sdhci.c  |  8 ++--
 drivers/mtd/nand/sunxi_nand.c|  2 +-
 drivers/mtd/nand/tegra_nand.c|  4 +-
 drivers/net/pic32_eth.c  |  3 +-
 drivers/sound/max98095.c |  2 +
 drivers/sound/wm8994.c   |  2 +-
 drivers/spi/pic32_spi.c  |  2 +-
 drivers/usb/host/ehci-tegra.c|  7 ++--
 drivers/usb/host/ehci-vf.c   |  5 ++-
 include/asm-generic/gpio.h   | 10 ++---
 16 files changed, 65 insertions(+), 67 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 03/72] dm: core: Add livetree definitions

2017-05-24 Thread sjg
Add a Kconfig option to enable a live device tree, built at run time from
the flat tree. Also add structure definitions and a root node.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 dts/Kconfig   |  11 
 include/asm-generic/global_data.h |   3 ++
 include/dm/of.h   | 106 ++
 3 files changed, 120 insertions(+)
 create mode 100644 include/dm/of.h

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 39/72] string: Add strcspn()

2017-05-24 Thread sjg
Add an implementation of strcspn() which returns the number of initial
characters that do not match any in a rejection list.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/linux/string.h | 15 +++
 lib/string.c   | 24 
 2 files changed, 39 insertions(+)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 15/72] dm: core: Allow binding a device from a live tree

2017-05-24 Thread sjg
When a live tree is being used we need to record the node that was used to
create the device. Update device_bind_with_driver_data() to support this.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/device.c| 18 --
 drivers/core/lists.c |  2 +-
 include/dm/device-internal.h | 10 ++
 3 files changed, 15 insertions(+), 15 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 35/72] test: Update 'make test' to run more tests

2017-05-24 Thread sjg
The standard sandbox board cannot run the of-platdata test since it needs
SPL. Also, we should test the flat tree version of sandbox.

Add these tests to the default test script.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 test/run | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 48/72] dm: usb: Convert uclass to livetree

2017-05-24 Thread sjg
Update the usb uclass to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/usb/host/usb-uclass.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 52/72] dm: clk: fixed: Update to support livetree

2017-05-24 Thread sjg
Update the fixed-rate clock driver to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/clk/clk_fixed_rate.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 24/72] dm: test: Move test running code into a separate function

2017-05-24 Thread sjg
We want to run the same test on flat and live trees. In preparation for
this, create a new function which handles running a test.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 test/dm/test-main.c | 56 ++---
 1 file changed, 32 insertions(+), 24 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 04/72] dm: core: Add livetree access functions

2017-05-24 Thread sjg
Add a basic assortment of functions to access the live device tree. These
come from Linux v4.9 and are modified for U-Boot to the minimum extent
possible. While these functions are now very stable in Linux, it will be
possible to merge in fixes if needed.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/Makefile|   1 +
 drivers/core/of_access.c | 735 +++
 include/dm/of_access.h   | 347 ++
 3 files changed, 1083 insertions(+)
 create mode 100644 drivers/core/of_access.c
 create mode 100644 include/dm/of_access.h

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 25/72] dm: test: Show the test filename when running

2017-05-24 Thread sjg
Show the filename of the test being run. Skip the path and show just the
base name.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/test/test.h | 2 ++
 test/dm/test-main.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 20/72] dm: regmap: Add support for livetree

2017-05-24 Thread sjg
Modify regmap to support livetree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/regmap.c | 37 ++---
 1 file changed, 22 insertions(+), 15 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 09/72] dm: core: Add livetree address functions

2017-05-24 Thread sjg
Add functions to access addresses in the device tree. These are brought
in from Linux 4.10.

Also fix up the header guard for fdtaddr.h to avoid confusion.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Fix up the fdtaddr.h header guard to avoid conflicts

Changes in v2: None

 drivers/core/Makefile  |   2 +-
 drivers/core/of_addr.c | 359 +
 include/dm/fdtaddr.h   |   4 +-
 include/dm/of_addr.h   |  64 +
 4 files changed, 426 insertions(+), 3 deletions(-)
 create mode 100644 drivers/core/of_addr.c
 create mode 100644 include/dm/of_addr.h

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 26/72] dm: test: Add support for running tests with livetree

2017-05-24 Thread sjg
It is useful to run the driver model tests with both livetree and flat
tree in case something is different between the two. Add this feature to
the test runner.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 test/dm/test-main.c | 23 ---
 1 file changed, 16 insertions(+), 7 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 02/72] Update WARN_ON() to return a value

2017-05-24 Thread sjg
In linux v4.9 this returns a value. This saves checking the warning
condition twice in some code.

Update the U-Boot version to do this also.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/linux/compat.h | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 30/72] dm: gpio: sandbox: Use dev_read...() functions to access DT

2017-05-24 Thread sjg
Use the new dev_read...() functions to access the device tree, so that a
live tree can be used.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/gpio/sandbox.c | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 16/72] dm: core: Update lists_bind_fdt() to use ofnode

2017-05-24 Thread sjg
Adjust this function to use an ofnode instead of an offset, so it can be
used with livetree. This involves updating all callers.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/lists.c   | 12 ++--
 drivers/core/root.c|  2 +-
 drivers/serial/serial-uclass.c |  3 ++-
 drivers/timer/timer-uclass.c   |  3 ++-
 include/dm/lists.h |  7 +++
 5 files changed, 14 insertions(+), 13 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 45/72] dm: regulator: Update fixed regulator to support livetree.

2017-05-24 Thread sjg
Update this driver to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/power/regulator/fixed.c | 17 +
 1 file changed, 9 insertions(+), 8 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 18/72] dm: core: Scan the live tree when setting up driver model

2017-05-24 Thread sjg
When starting up driver model with a live tree we need to scan the tree
for devices. Add code to handle this.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/root.c | 58 +
 include/dm/root.h   |  3 ++-
 test/dm/test-main.c |  4 ++--
 3 files changed, 58 insertions(+), 7 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 28/72] dm: gpio: Refactor to prepare for live tree support

2017-05-24 Thread sjg
Move the main part of the GPIO request function into a separate function
so that it can be used by the live tree function when added. Update the
xlate method to use a node reference.

Update all GPIO drivers to handle the modified xlate() method.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/gpio/74x164_gpio.c   |  2 +-
 drivers/gpio/gpio-uclass.c   | 51 ++--
 drivers/gpio/pca953x_gpio.c  |  2 +-
 drivers/gpio/sandbox.c   |  3 ++-
 drivers/gpio/sunxi_gpio.c|  2 +-
 drivers/gpio/tegra186_gpio.c |  2 +-
 drivers/gpio/tegra_gpio.c|  2 +-
 include/asm-generic/gpio.h   |  6 --
 8 files changed, 41 insertions(+), 29 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 19/72] dm: core: Add a way to find a device by ofnode

2017-05-24 Thread sjg
Add a function which looks up a device by its node (either in live tree
or flat tree).

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/uclass.c| 37 +
 include/dm/uclass-internal.h | 18 ++
 include/dm/uclass.h  | 17 +
 3 files changed, 72 insertions(+)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 10/72] fdt: Update fdt_get_base_address() to use const

2017-05-24 Thread sjg
This function does not change the device tree so adjust it to use const
for this parameter.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 common/fdt_support.c  | 2 +-
 include/fdt_support.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 34/72] sandbox: Add a new sandbox_flattree board

2017-05-24 Thread sjg
Add a sandbox board to test the non-livetree build (i.e. with
CONFIG_OF_FLAT disabled). This increases our build and test coverage.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 board/sandbox/MAINTAINERS  |   7 ++
 configs/sandbox_flattree_defconfig | 179 +
 2 files changed, 186 insertions(+)
 create mode 100644 configs/sandbox_flattree_defconfig

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 12/72] dm: core: Add a place to put extra device-tree reading functions

2017-05-24 Thread sjg
Some functions deal with structured data rather than simple data types.
It makes sense to have these in their own file. For now this just has a
function to read a flashmap entry. Move the data types also.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/Makefile   |  2 +-
 drivers/core/of_extra.c | 37 +
 include/cros_ec.h   |  1 +
 include/dm/of_extra.h   | 46 ++
 include/fdtdec.h| 23 +--
 lib/fdtdec.c|  1 +
 6 files changed, 87 insertions(+), 23 deletions(-)
 create mode 100644 drivers/core/of_extra.c
 create mode 100644 include/dm/of_extra.h

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 05/72] dm: Add a function to create a 'live' device tree

2017-05-24 Thread sjg
This function converts the flat device tree into a hierarchical one with
C structures and pointers. This is easier to access.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/of_live.h |  24 
 lib/Makefile  |   1 +
 lib/of_live.c | 333 ++
 3 files changed, 358 insertions(+)
 create mode 100644 include/of_live.h
 create mode 100644 lib/of_live.c

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Please pull u-boot-fdt, take 2

2017-05-24 Thread Simon Glass
Hi Tom,

This incorporates the v2 patch for 'fdt: Build the new python libfdt
module' which should fix the problem with the original pull request.


The following changes since commit be62fbf376261ab3a4ed5db3bf54d5df9e216d9f:

  Merge branch 'rmobile' of git://git.denx.de/u-boot-sh (2017-05-23
16:22:03 -0400)

are available in the git repository at:

  git://git.denx.de/u-boot-fdt.git

for you to fetch changes up to da9c601049eb7c993c7f6e33ae10af7a847a483d:

  fdt: Drop fdt_select.py (2017-05-24 18:12:31 -0600)


Simon Glass (20):
  fdt: Add Python bindings
  pci: Correct cast for sandbox
  fdt: Correct cast for sandbox in fdtdec_setup_memory_size()
  fdt: Use SPDX format for licenses in the libfdt headers
  fdt: Move header files into lib/libfdt
  fdt: Allow swig options to be provided by Makefile
  fdt: Add all source files to the libfdt build
  fdt: Rename existing python libfdt module
  fdt: Build the new python libfdt module
  fdt: Update fdt_test to use 'dt' instead of 'fdt'
  fdt: dtoc: Add a full set of property tests
  fdt: Support use of the new python libfdt library
  fdt: Makefile: Build python libfdt library if needed
  fdt: Stop building the old python libfdt module
  fdt: Drop use of the legacy libfdt python module
  fdt: Drop fdt_fallback library
  binman: Drop a special case related to fdt_fallback
  fdt: Merge fdt_normal with its base class
  binman: Rename fdt variable to dtb
  fdt: Drop fdt_select.py

 Makefile|   16 +-
 cmd/pci.c   |3 +-
 include/fdt.h   |  112 +-
 include/libfdt.h| 2138 +-
 lib/fdtdec.c|3 +-
 lib/libfdt/fdt.h|   67 +
 lib/libfdt/libfdt.h | 2144 +++
 lib/libfdt/libfdt.swig  |  113 --
 lib/libfdt/pylibfdt/libfdt.i|  389 +
 lib/libfdt/pylibfdt/setup.py|  123 ++
 lib/libfdt/setup.py |   38 -
 scripts/Makefile.spl|   17 +-
 tools/Makefile  |   48 +-
 tools/binman/binman.py  |3 +
 tools/binman/control.py |   12 +-
 tools/binman/etype/u_boot_dtb_with_ucode.py |   24 +-
 tools/binman/fdt_test.py|   64 +-
 tools/binman/func_test.py   |   48 +-
 tools/binman/test/45_prop_test.dts  |   23 +
 tools/dtoc/dtoc.py  |3 +-
 tools/dtoc/fdt.py   |  183 ++-
 tools/dtoc/fdt_fallback.py  |  181 ---
 tools/dtoc/fdt_normal.py|  225 ---
 tools/dtoc/fdt_select.py|   36 -
 24 files changed, 3054 insertions(+), 2959 deletions(-)
 create mode 100644 lib/libfdt/fdt.h
 create mode 100644 lib/libfdt/libfdt.h
 delete mode 100644 lib/libfdt/libfdt.swig
 create mode 100644 lib/libfdt/pylibfdt/libfdt.i
 create mode 100755 lib/libfdt/pylibfdt/setup.py
 delete mode 100644 lib/libfdt/setup.py
 create mode 100644 tools/binman/test/45_prop_test.dts
 delete mode 100644 tools/dtoc/fdt_fallback.py
 delete mode 100644 tools/dtoc/fdt_normal.py
 delete mode 100644 tools/dtoc/fdt_select.py

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 63/72] cros_ec: Update the cros_ec keyboard driver to livetree

2017-05-24 Thread sjg
Update this driver and key_matrix to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/input/cros_ec_keyb.c | 24 
 drivers/input/key_matrix.c   | 19 +--
 drivers/input/tegra-kbc.c|  3 +--
 include/key_matrix.h |  3 +--
 4 files changed, 23 insertions(+), 26 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 37/72] dm: Add more livetree helpers and definitions

2017-05-24 Thread sjg
Add some definitions and helpers for livetree in the main of.h header
file. These include:

- reading multi-cell integers
- default number of address/size cells
- functions for comparing names

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/ofnode.c |  4 ++--
 include/dm/of.h   | 36 
 2 files changed, 38 insertions(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 32/72] cros_ec: Fix debug() statement in ec_command_inptr()

2017-05-24 Thread sjg
This prints out the wrong pointers. Fix it.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/misc/cros_ec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 42/72] dm: pmic: Convert uclass to livetree

2017-05-24 Thread sjg
Update the pmic uclass and all pmics to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/power/pmic/act8846.c |  8 +++-
 drivers/power/pmic/lp873x.c  | 12 +---
 drivers/power/pmic/max77686.c|  8 +++-
 drivers/power/pmic/palmas.c  | 16 +++-
 drivers/power/pmic/pfuze100.c|  8 +++-
 drivers/power/pmic/pmic-uclass.c | 22 ++
 drivers/power/pmic/rk8xx.c   |  8 +++-
 drivers/power/pmic/s5m8767.c |  7 +++
 drivers/power/pmic/sandbox.c |  2 +-
 drivers/power/pmic/tps65090.c|  8 +++-
 include/power/pmic.h |  2 +-
 11 files changed, 42 insertions(+), 59 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 59/72] dm: power-domain: Update uclass to support livetree

2017-05-24 Thread sjg
Update the power domain uclass to support livetree. Fix the xlate() method
which has no callers.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/power/domain/power-domain-uclass.c | 19 ---
 include/power-domain-uclass.h  |  2 +-
 2 files changed, 9 insertions(+), 12 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 06/72] dm: Build a live tree after relocation

2017-05-24 Thread sjg
If enabled, build a live device tree after relocation. This can then be
used by driver model.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 common/board_r.c | 12 
 1 file changed, 12 insertions(+)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 36/72] fdt: Rename a few functions in fdt_support

2017-05-24 Thread sjg
These two functions have an of_ prefix which conflicts with naming used
in of_addr. Rename them:

   fdt_read_number
   fdt_support_bus_default_count_cells

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 arch/arm/cpu/armv8/fsl-layerscape/fdt.c|  4 ++--
 arch/arm/mach-tegra/tegra186/nvtboot_mem.c |  4 ++--
 common/fdt_support.c   | 26 +-
 drivers/core/ofnode.c  |  4 ++--
 drivers/mtd/altera_qspi.c  |  2 +-
 drivers/mtd/cfi_flash.c|  2 +-
 drivers/mtd/pic32_flash.c  |  2 +-
 drivers/net/altera_tse.c   |  2 +-
 include/fdt_support.h  |  4 ++--
 9 files changed, 25 insertions(+), 25 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 61/72] dm: pci: Update uclass to support livetree

2017-05-24 Thread sjg
Update the PCI uclass to support livetree. This mostly involves fixing
the address decoding from the device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/pci/pci-uclass.c | 26 --
 1 file changed, 12 insertions(+), 14 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 33/72] cros_ec: Convert to support live tree

2017-05-24 Thread sjg
Convert this driver to support the live device tree and remove the old
fdtdec support.

The keyboard is not yet converted.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/misc/cros_ec.c | 33 ++---
 drivers/misc/cros_ec_sandbox.c | 23 +++
 include/cros_ec.h  |  7 ++-
 include/fdtdec.h   | 13 -
 lib/fdtdec.c   | 32 
 5 files changed, 27 insertions(+), 81 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 21/72] dm: simple-bus: Add support for livetree

2017-05-24 Thread sjg
Modify simple-bus to support livetree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/simple-bus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 11/72] dm: core: Add address operations on device tree references

2017-05-24 Thread sjg
Add functions to add addresses in the device tree using ofnode references.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/ofnode.c | 27 +++
 include/dm/ofnode.h   | 23 ++-
 2 files changed, 49 insertions(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 27/72] dm: core: Run tests with both livetree and flat tree

2017-05-24 Thread sjg
Some tests require either livetree or flat tree. Add flags to allow the
tests to specify this. Adjust the test runner to run with livetree (if
supported) and then flat tree.

Some video tests are quite slow and running on flat tree adds little extra
test value, so run these on livetree only.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/dm/test.h   |  2 ++
 include/test/test.h |  2 ++
 test/dm/test-main.c | 38 --
 3 files changed, 40 insertions(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 62/72] dm: Update the I2C eeprom driver for livetree

2017-05-24 Thread sjg
Update this driver so that it works with livetree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/misc/i2c_eeprom_emul.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 55/72] dm: phy: Update tests to use ut_asserteq()

2017-05-24 Thread sjg
Use ut_asserteq() to test equality since this gives a better error message
on failure. Also make a few of the tests more specific.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 test/dm/phy.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 29/72] dm: gpio: Drop blank line in gpio_xlate_offs_flags() comment

2017-05-24 Thread sjg
This is not needed. Drop it.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/asm-generic/gpio.h | 1 -
 1 file changed, 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 44/72] dm: regulator: Convert regulator uclass to support livetree

2017-05-24 Thread sjg
Update the regulator uclass to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/power/regulator/regulator-uclass.c | 39 --
 1 file changed, 16 insertions(+), 23 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 38/72] string: Add strchrnul()

2017-05-24 Thread sjg
This functions works like strchr() but returns the end of the string if
the character is not found. Add an implementation of this.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/linux/string.h | 13 +
 lib/string.c   |  8 
 2 files changed, 21 insertions(+)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 17/72] dm: core: Update device_bind_driver_to_node() to use ofnode

2017-05-24 Thread sjg
Adjust this function to us an ofnode instead of an offset, so it can be
used with livetree. This involves updating all callers.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/clk/at91/pmc.c |  2 +-
 drivers/core/lists.c   | 15 ++-
 drivers/cpu/cpu-uclass.c   |  6 +++---
 drivers/i2c/muxes/i2c-mux-uclass.c | 11 ---
 drivers/led/led_bcm6328.c  |  2 +-
 drivers/led/led_bcm6358.c  |  2 +-
 drivers/led/led_gpio.c | 13 +
 drivers/misc/tegra186_bpmp.c   |  6 +++---
 drivers/misc/tegra_car.c   |  4 ++--
 drivers/net/keystone_net.c |  6 +++---
 drivers/pinctrl/pinctrl-uclass.c   | 15 ++-
 drivers/usb/musb-new/ti-musb.c |  2 +-
 include/dm.h   |  2 ++
 include/dm/lists.h |  2 +-
 14 files changed, 39 insertions(+), 49 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 58/72] sandbox: phy: Update driver for livetree

2017-05-24 Thread sjg
Update the sandbox phy driver to support livetree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/phy/sandbox-phy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 14/72] dm: core: Implement live tree 'read' functions

2017-05-24 Thread sjg
When the live tree is supported some functions need to change a little.
Add an implementation which is used when not inlining these functions.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/core/Makefile |   3 +
 drivers/core/read.c   | 140 +
 include/dm/read.h | 240 +++---
 3 files changed, 291 insertions(+), 92 deletions(-)
 create mode 100644 drivers/core/read.c

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH V6 4/4] rockchip: rk3288: enable rockusb support on rk3288 based device

2017-05-24 Thread Simon Glass
Hi Eddie,

On 23 May 2017 at 19:43, Eddie Cai  wrote:
> 2017-05-24 8:44 GMT+08:00 Simon Glass :
>> Hi Eddie,
>>
>> On 22 May 2017 at 00:43, Eddie Cai  wrote:
>>> this patch enable rockusb support on rk3288 based device.
>>>
>>> Signed-off-by: Eddie Cai 
>>>
>>> Changes in v6:
>>> -enable rockusb in defconfig
>>>
>>> Changes in v5:
>>> -none
>>>
>>> Changes in v4:
>>> -move to rk3288_common.h
>>>
>>> Changes in v3:
>>> -move to defconfig
>>>
>>> ---
>>>  configs/evb-rk3288_defconfig  | 11 +++
>>>  configs/fennec-rk3288_defconfig   |  8 
>>>  configs/firefly-rk3288_defconfig  |  8 
>>>  configs/miqi-rk3288_defconfig |  8 
>>>  configs/popmetal-rk3288_defconfig |  8 
>>>  configs/tinker-rk3288_defconfig   |  8 
>>>  include/configs/rk3288_common.h   |  7 ---
>>>  7 files changed, 51 insertions(+), 7 deletions(-)
>>
>> Reviewed-by: Simon Glass 
>>
>> But can you use imply in the Kconfig to enable this for all rk2388 boards?
> I found only SPL things use imply in the Kconfig. Will it be compiled
> to SPL if i do so?

The 'imply' keyword only affects the config, it is separate from SPL / non-SPL.

If you add imply statements to rk3288 Kconfig, then use 'make
savedefconfig' should drop them from defconfig.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 49/72] sandbox: usb: Convert emulators to livetree

2017-05-24 Thread sjg
Update the sandbox flash and hub USB emulators to support a live device
tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/usb/emul/sandbox_flash.c | 4 +---
 drivers/usb/emul/sandbox_hub.c   | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 41/72] samsung: Move pmic header out of config file

2017-05-24 Thread sjg
We should not be including a PMIC header file in the board config. Move it
to a C file.

Signed-off-by: Simon Glass 
---

Changes in v3:
- Add new patch to move pmic header out of config file

Changes in v2: None

 board/samsung/common/misc.c | 1 +
 include/configs/trats2.h| 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 56/72] dm: mailbox: Update uclass to support livetree

2017-05-24 Thread sjg
Update the mailbox uclass to support livetree. Fix the xlate() method
in all callers.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/mailbox/mailbox-uclass.c | 20 
 drivers/mailbox/tegra-hsp.c  |  2 +-
 include/mailbox-uclass.h |  2 +-
 3 files changed, 10 insertions(+), 14 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 47/72] dm: adc: Convert uclass to livetree

2017-05-24 Thread sjg
Update the adc uclass to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/adc/adc-uclass.c | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 51/72] dm: clk: Update uclass to support livetree

2017-05-24 Thread sjg
Update the clk uclass to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/clk/clk-uclass.c | 17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 50/72] clk: Modify xlate() method for livetree

2017-05-24 Thread sjg
Update the xlate() method to use ofnode_phandle_args instead of the fdtdec
variant. This will allow drivers to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/clk/at91/pmc.c| 2 +-
 drivers/clk/at91/pmc.h| 2 +-
 drivers/clk/clk-uclass.c  | 7 ---
 drivers/clk/clk_stm32f7.c | 3 +--
 include/clk-uclass.h  | 5 +++--
 5 files changed, 10 insertions(+), 9 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 60/72] dm: reset: Update uclass to support livetree

2017-05-24 Thread sjg
Update the reset domain uclass to support livetree. Fix the xlate() method
which has no callers.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/reset/reset-uclass.c | 21 ++---
 include/reset-uclass.h   |  4 ++--
 2 files changed, 12 insertions(+), 13 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 46/72] dm: mmc: Convert uclass to livetree

2017-05-24 Thread sjg
Update the mmc uclass to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/mmc/mmc-uclass.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 57/72] dm: phy: Update uclass to support livetree

2017-05-24 Thread sjg
Update the phy uclass to support livetree. Fix the xlate() method
which has no callers.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/phy/phy-uclass.c | 21 +
 include/generic-phy.h|  3 +--
 2 files changed, 10 insertions(+), 14 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 53/72] dm: test: Separate out the bus DT offset test

2017-05-24 Thread sjg
We cannot access the device tree via an offset when running in livetree
mode. Separate out that part of the bus' children tests and mark it as
for the flat tree only.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 test/dm/bus.c | 16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 54/72] dm: test: Disable the fdt_offset test with livetree

2017-05-24 Thread sjg
We cannot run this test with livetree since it uses device tree offsets.
Mark it as flat tree only.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 test/dm/test-fdt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 65/72] dm: sandbox: i2c: Drop fdtdec.h header

2017-05-24 Thread sjg
This is not needed in this driver. Drop it.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/i2c/sandbox_i2c.c | 1 -
 1 file changed, 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 68/72] dm: sandbox: spi: Convert driver to support livetree

2017-05-24 Thread sjg
Update this driver to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/mtd/spi/sandbox.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 66/72] dm: sandbox: i2c_rtc: Drop fdtdec.h header

2017-05-24 Thread sjg
This is not needed in this driver. Drop it.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/rtc/i2c_rtc_emul.c | 1 -
 1 file changed, 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 64/72] dm: spi: Convert uclass to livetree

2017-05-24 Thread sjg
Update the SPI uclass to support a live device tree. Also adjust
spi_slave_ofdata_to_platdata() to accept a device instead of a blob and
offset.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/spi/spi-uclass.c | 31 ++-
 include/spi.h|  2 +-
 2 files changed, 15 insertions(+), 18 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 67/72] dm: spi-flash: Convert uclass to livetree

2017-05-24 Thread sjg
Update the SPI flash uclass to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/mtd/spi/spi_flash.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 69/72] dm: sandbox: sysreset: Convert driver to livetree

2017-05-24 Thread sjg
Update this driver to support a live device tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 drivers/sysreset/sysreset_sandbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 70/72] dm: test: Fix nit with position of backslash

2017-05-24 Thread sjg
Line up this backslash with all the others.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2: None

 include/test/ut.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH v3 72/72] sandbox: Move to use live tree

2017-05-24 Thread sjg
This updates sandbox to use a live device tree. This means that after
relocation (from board_init_r() onwards) it no-longer uses flat device
tree.

Signed-off-by: Simon Glass 
---

Changes in v3: None
Changes in v2:
- Rewrite based on testing and refining the v1 series
- Convert various subsystems to enable sandbox tests to pass

 configs/sandbox_defconfig | 1 +
 1 file changed, 1 insertion(+)

Applied to u-boot-dm
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] gcc-6 cross toolchain

2017-05-24 Thread Tom Rini
On Wed, May 24, 2017 at 09:39:04PM +, york sun wrote:

> Tom,
> 
> I am trying up update my test servers. You have been changing code to 
> make gcc-6 happy. Can you share where to get prebuilt (prefer 
> maintained) toolchain packages?

Yes.  For travis-ci, I have the Linaro 2017.02 gcc-6.3.1 toolchains
fetched for arm/aarch64.  For my build box, I have a Debian/unstable
chroot and that provides arm, aarch64, powerpc, mips sh4 and m68k
gcc-6.3 toolchains currently.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] gcc-6 cross toolchain

2017-05-24 Thread york sun
Tom,

I am trying up update my test servers. You have been changing code to 
make gcc-6 happy. Can you share where to get prebuilt (prefer 
maintained) toolchain packages?

York
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] i.Mx6q u-boot stuck

2017-05-24 Thread Fabio Estevam
On Wed, May 24, 2017 at 5:56 PM, Fabio Estevam  wrote:

> Then pass 'earyprintk' in the kernel command line as well.

I meant "earlyprintk".
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] i.Mx6q u-boot stuck

2017-05-24 Thread Fabio Estevam
Hi Fausto,

Please do not top post in mailing lists.

On Wed, May 24, 2017 at 1:29 PM, Fausto Sessego 
wrote
>
>
> I tried many procedures but i did'nt found any solution.
>

Try to do:

make menuconfig

Kernel hacking  --->
[*] Kernel low-level debugging functions (read help!)
  Kernel low-level debugging port (i.MX6Q/DL Debug UART)
(1) i.MX Debug UART Port Selection (NEW)
[*] Early printk

In this example the console port is at UART1. If you have the console on
another UART then adjust it properly.

Then pass 'earyprintk' in the kernel command line as well.

This would help you to see where the kernel is hanging.

Hope it helps.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] scripts/Makefile.lib: Only apply u-boot.dtsi files in the target directory

2017-05-24 Thread Pantelis Antoniou
Hi Tom,

On Wed, 2017-05-24 at 11:04 -0400, Tom Rini wrote:
> We only want to apply files such as 'omap5-u-boot.dtsi', which resides
> in arch/arm/dts/ to other files in arch/arm/dts/ and not say
> test/overlay/.  Rework the make logic to check for -u-boot.dtsi files in
> the same directory as their target dts.
> 

Verified that it fixes the build breakage.

Tested-by: Pantelis Antoniou 

> Cc: Simon Glass 
> Reported-by: Pantelis Antoniou 
> Signed-off-by: Tom Rini 
> ---
>  scripts/Makefile.lib | 12 +---
>  1 file changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 774aa89a3fe6..80ddb08474cd 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -164,14 +164,12 @@ cpp_flags  = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) 
> $(UBOOTINCLUDE) \
>  
>  ld_flags   = $(LDFLAGS) $(ldflags-y)
>  
> -dts_dir = $(srctree)/arch/$(ARCH)/dts
> -
>  # Try these files in order to find the U-Boot-specific .dtsi include file
> -u_boot_dtsi_options = $(wildcard $(dts_dir)/$(basename $(notdir 
> $<))-u-boot.dtsi) \
> - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
> - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
> - $(wildcard $(dts_dir)/$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
> - $(wildcard $(dts_dir)/u-boot.dtsi)
> +u_boot_dtsi_options = $(wildcard $(dir $<)$(basename $(notdir 
> $<))-u-boot.dtsi) \
> + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_SOC))-u-boot.dtsi) \
> + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_CPU))-u-boot.dtsi) \
> + $(wildcard $(dir $<)$(subst $\",,$(CONFIG_SYS_VENDOR))-u-boot.dtsi) \
> + $(wildcard $(dir $<)u-boot.dtsi)
>  
>  # Uncomment for debugging
>  # $(warning u_boot_dtsi_options: $(u_boot_dtsi_options))


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] armv7m: Fix larger builds

2017-05-24 Thread Vikas MANOCHA
Hi Phil,

> -Original Message-
> From: Phil Edworthy [mailto:phil.edwor...@renesas.com]
> Sent: Wednesday, May 24, 2017 7:34 AM
> To: Albert Aribaud 
> Cc: Tom Rini ; Vikas MANOCHA ; 
> Kamil Lulko ; u-
> b...@lists.denx.de; Phil Edworthy 
> Subject: [PATCH] armv7m: Fix larger builds
> 
> The branch instruction only has an 11-bit relative target address, which is 
> sometimes not enough.
> 
> Signed-off-by: Phil Edworthy 
> ---
>  arch/arm/cpu/armv7m/start.S | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/cpu/armv7m/start.S b/arch/arm/cpu/armv7m/start.S index 
> 49f2720..d79adb5 100644
> --- a/arch/arm/cpu/armv7m/start.S
> +++ b/arch/arm/cpu/armv7m/start.S
> @@ -8,7 +8,8 @@
>  .globl   reset
>  .type reset, %function
>  reset:
> - b   _main
> + ldr r0, =_main
> + mov pc, r0

How about using W(b) for wider range ?

Cheers,
Vikas

> 
>  .globl   c_runtime_cpu_setup
>  c_runtime_cpu_setup:
> --
> 2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 2/2] drivers: net: fsl-mc: Include MAC addr fixup to DPL

2017-05-24 Thread Bogdan Purcareata
Previous to MC v10.x, port mac address was specified via DPL. Since
newer MC versions are compatible with old style DPLs, make the u-boot
env mac addresses visible there. This applies only to DPLs that have an
older version.

DPLs use 32 bit values for specifying MAC addresses. U-boot environment
variables take precedence over the MAC addresses already visible in the
DPL/DPC.

Signed-off-by: Bogdan Purcareata 
Signed-off-by: Heinz Wrobel 
---
v2 -> v3:
- no changes

v1 -> v2:
- initialize variables to fix compiler warnings
- remove prints

 drivers/net/fsl-mc/mc.c | 258 
 1 file changed, 195 insertions(+), 63 deletions(-)

diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 543d08a..727f24a 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -155,19 +155,142 @@ int parse_mc_firmware_fit_image(u64 mc_fw_addr,
 }
 #endif
 
-static int mc_fixup_dpc_mac_addr(void *blob, int noff, int dpmac_id,
-   struct eth_device *eth_dev)
+#define MC_DT_INCREASE_SIZE64
+
+enum mc_fixup_type {
+   MC_FIXUP_DPL,
+   MC_FIXUP_DPC
+};
+
+static int mc_fixup_mac_addr(void *blob, int nodeoffset,
+const char *propname, struct eth_device *eth_dev,
+enum mc_fixup_type type)
 {
-   int nodeoffset, err = 0;
+   int err = 0, len = 0, size, i;
+   unsigned char env_enetaddr[ARP_HLEN];
+   unsigned int enetaddr_32[ARP_HLEN];
+   void *val = NULL;
+
+   switch (type) {
+   case MC_FIXUP_DPL:
+   /* DPL likes its addresses on 32 * ARP_HLEN bits */
+   for (i = 0; i < ARP_HLEN; i++)
+   enetaddr_32[i] = cpu_to_fdt32(eth_dev->enetaddr[i]);
+   val = enetaddr_32;
+   len = sizeof(enetaddr_32);
+   break;
+
+   case MC_FIXUP_DPC:
+   val = eth_dev->enetaddr;
+   len = ARP_HLEN;
+   break;
+   }
+
+   /* MAC address property present */
+   if (fdt_get_property(blob, nodeoffset, propname, NULL)) {
+   /* u-boot MAC addr randomly assigned - leave the present one */
+   if (!eth_getenv_enetaddr_by_index("eth", eth_dev->index,
+ env_enetaddr))
+   return err;
+   } else {
+   size = MC_DT_INCREASE_SIZE + strlen(propname) + len;
+   /* make room for mac address property */
+   err = fdt_increase_size(blob, size);
+   if (err) {
+   printf("fdt_increase_size: err=%s\n",
+  fdt_strerror(err));
+   return err;
+   }
+   }
+
+   err = fdt_setprop(blob, nodeoffset, propname, val, len);
+   if (err) {
+   printf("fdt_setprop: err=%s\n", fdt_strerror(err));
+   return err;
+   }
+
+   return err;
+}
+
+#define is_dpni(s) (s != NULL ? !strncmp(s, "dpni@", 5) : 0)
+
+const char *dpl_get_connection_endpoint(void *blob, char *endpoint)
+{
+   int connoffset = fdt_path_offset(blob, "/connections"), off;
+   const char *s1, *s2;
+
+   for (off = fdt_first_subnode(blob, connoffset);
+off >= 0;
+off = fdt_next_subnode(blob, off)) {
+   s1 = fdt_stringlist_get(blob, off, "endpoint1", 0, NULL);
+   s2 = fdt_stringlist_get(blob, off, "endpoint2", 0, NULL);
+
+   if (!s1 || !s2)
+   continue;
+
+   if (strcmp(endpoint, s1) == 0)
+   return s2;
+
+   if (strcmp(endpoint, s2) == 0)
+   return s1;
+   }
+
+   return NULL;
+}
+
+static int mc_fixup_dpl_mac_addr(void *blob, int dpmac_id,
+struct eth_device *eth_dev)
+{
+   int objoff = fdt_path_offset(blob, "/objects");
+   int dpmacoff = -1, dpnioff = -1;
+   const char *endpoint;
char mac_name[10];
-   const char link_type_mode[] = "FIXED_LINK";
-   unsigned char env_enetaddr[6];
+   int err;
+
+   sprintf(mac_name, "dpmac@%d", dpmac_id);
+   dpmacoff = fdt_subnode_offset(blob, objoff, mac_name);
+   if (dpmacoff < 0)
+   /* dpmac not defined in DPL, so skip it. */
+   return 0;
+
+   err = mc_fixup_mac_addr(blob, dpmacoff, "mac_addr", eth_dev,
+   MC_FIXUP_DPL);
+   if (err) {
+   printf("Error fixing up dpmac mac_addr in DPL\n");
+   return err;
+   }
+
+   /* now we need to figure out if there is any
+* DPNI connected to this MAC, so we walk the
+* connection list
+*/
+   endpoint = dpl_get_connection_endpoint(blob, mac_name);
+   if (!is_dpni(endpoint))
+   return 0;
+
+   /* let's see if we can fixup the DPNI as well */
+   dpnioff = fdt_subnode_offset(blob, objoff, endpoint);
+

[U-Boot] [PATCH v3 1/2] drivers: net: fsl-mc: Link MC boot to PHY_RESET_R

2017-05-24 Thread Bogdan Purcareata
DPAA2 platforms boot the Management Complex based on the u-boot env
variable "mcinitcmd". Instead of doing this step on each platform
individually, define a single mc_env_boot function in the MC driver,
since it's semantically tied to it.

Call the function in a per-board reset_phy hook, as it gets called at a
later moment, when all board PHY devices have been initialized.

Signed-off-by: Bogdan Purcareata 
Signed-off-by: Heinz Wrobel 
---
v2 -> v3:
- add dummy reset_phy() implementation in board/freescale/ls2080a/ls2080a.c
  for proper compilation on ls2080a_simu and ls2080a_emu

v1 -> v2:
- keep the reset_phy implementation on each board; some boards might
  want to do something else besides booting the MC.

 board/freescale/ls2080a/ls2080a.c  |  6 ++
 board/freescale/ls2080aqds/eth.c   | 13 ++---
 board/freescale/ls2080ardb/eth_ls2080rdb.c | 14 --
 drivers/net/fsl-mc/mc.c| 16 
 include/configs/ls2080a_common.h   |  5 +
 include/fsl-mc/fsl_mc.h|  1 +
 6 files changed, 42 insertions(+), 13 deletions(-)

diff --git a/board/freescale/ls2080a/ls2080a.c 
b/board/freescale/ls2080a/ls2080a.c
index 9e7701d..ecf4bd6 100644
--- a/board/freescale/ls2080a/ls2080a.c
+++ b/board/freescale/ls2080a/ls2080a.c
@@ -135,3 +135,9 @@ int ft_board_setup(void *blob, bd_t *bd)
return 0;
 }
 #endif
+
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+}
+#endif
diff --git a/board/freescale/ls2080aqds/eth.c b/board/freescale/ls2080aqds/eth.c
index 59361e9..7083224 100644
--- a/board/freescale/ls2080aqds/eth.c
+++ b/board/freescale/ls2080aqds/eth.c
@@ -834,7 +834,6 @@ void ls2080a_handle_phy_interface_xsgmii(int i)
 int board_eth_init(bd_t *bis)
 {
int error;
-   char *mc_boot_env_var;
 #ifdef CONFIG_FSL_MC_ENET
struct ccsr_gur __iomem *gur = (void *)CONFIG_SYS_FSL_GUTS_ADDR;
int serdes1_prtcl = (in_le32(>rcwsr[28]) &
@@ -902,9 +901,6 @@ int board_eth_init(bd_t *bis)
}
}
 
-   mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
-   if (mc_boot_env_var)
-   run_command_list(mc_boot_env_var, -1, 0);
error = cpu_eth_init(bis);
 
if (hwconfig_f("xqsgmii", env_hwconfig)) {
@@ -919,6 +915,9 @@ int board_eth_init(bd_t *bis)
return error;
 }
 
-#ifdef CONFIG_FSL_MC_ENET
-
-#endif
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+   mc_env_boot();
+}
+#endif /* CONFIG_RESET_PHY_R */
diff --git a/board/freescale/ls2080ardb/eth_ls2080rdb.c 
b/board/freescale/ls2080ardb/eth_ls2080rdb.c
index ba584c8..d6ea76a 100644
--- a/board/freescale/ls2080ardb/eth_ls2080rdb.c
+++ b/board/freescale/ls2080ardb/eth_ls2080rdb.c
@@ -20,11 +20,9 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#define MC_BOOT_ENV_VAR "mcinitcmd"
 int board_eth_init(bd_t *bis)
 {
 #if defined(CONFIG_FSL_MC_ENET)
-   char *mc_boot_env_var;
int i, interface;
struct memac_mdio_info mdio_info;
struct mii_dev *dev;
@@ -98,11 +96,8 @@ int board_eth_init(bd_t *bis)
}
}
 
-   mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
-   if (mc_boot_env_var)
-   run_command_list(mc_boot_env_var, -1, 0);
cpu_eth_init(bis);
-#endif /* CONFIG_FMAN_ENET */
+#endif /* CONFIG_FSL_MC_ENET */
 
 #ifdef CONFIG_PHY_AQUANTIA
/*
@@ -118,3 +113,10 @@ int board_eth_init(bd_t *bis)
 #endif
return pci_eth_init(bis);
 }
+
+#if defined(CONFIG_RESET_PHY_R)
+void reset_phy(void)
+{
+   mc_env_boot();
+}
+#endif /* CONFIG_RESET_PHY_R */
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 9f69d75..543d08a 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -26,6 +26,7 @@
 
 #define MC_MEM_SIZE_ENV_VAR"mcmemsize"
 #define MC_BOOT_TIMEOUT_ENV_VAR"mcboottimeout"
+#define MC_BOOT_ENV_VAR"mcinitcmd"
 
 DECLARE_GLOBAL_DATA_PTR;
 static int mc_boot_status = -1;
@@ -1362,3 +1363,18 @@ U_BOOT_CMD(
"fsl_mc lazyapply DPL [DPL_addr] - Apply DPL file on exit\n"
"fsl_mc start aiop [FW_addr] - Start AIOP\n"
 );
+
+void mc_env_boot(void)
+{
+#if defined(CONFIG_FSL_MC_ENET)
+   char *mc_boot_env_var;
+   /* The MC may only be initialized in the reset PHY function
+* because otherwise U-Boot has not yet set up all the MAC
+* address info properly. Without MAC addresses, the MC code
+* can not properly initialize the DPC.
+*/
+   mc_boot_env_var = getenv(MC_BOOT_ENV_VAR);
+   if (mc_boot_env_var)
+   run_command_list(mc_boot_env_var, -1, 0);
+#endif /* CONFIG_FSL_MC_ENET */
+}
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index 285e48d..63144b9 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -149,6 +149,11 @@ unsigned long long get_qixis_addr(void);
 #define 

Re: [U-Boot] i.Mx6q u-boot stuck

2017-05-24 Thread Fausto Sessego
Ok.

The Kernel doesn't start.

U-Boot 2016.07 (May 24 2017 - 17:11:18 +0200)

CPU:   Freescale i.MX6Q rev1.2 at 792MHz
CPU:   Industrial temperature grade (-40C to 105C) at 20C
Reset cause: POR
Board: i.MX6Q TIBIDABO
Support: http://www.infomob.it/
I2C:   ready
DRAM:  gd->ram_size: 2147483648
DRAM test not implemented!
2 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Error: FEC address not set.

Hit any key to stop autoboot:  0
reading imx6q-tibidabo.dtb
29640 bytes read in 22 ms (1.3 MiB/s)
reading uImage
6621928 bytes read in 324 ms (19.5 MiB/s)
## Booting kernel from Legacy Image at 1200 ...
   Image Name:   Linux-4.1.38
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:6621864 Bytes = 6.3 MiB
   Load Address: 10008000
   Entry Point:  10008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Can it depend on u-boot version?

I'm using u-boot 2016.07 and kernel 4.1-1.0.x.

I get u-boot and kernel directly from yocto, so i think the matching is
right.

I tried many procedures but i did'nt found any solution.

Thanks

--
*Ing. Fausto Sessego*
*R Hardware & Software Engineer*

info
mob
>
*Tecnologie Wireless per la logistica e la sicurezza*
*address:* Parco scientifico e tecnologico della Sardegna, Edificio 1 Loc.
Piscinamanna - 09010 Pula (CA)

*phone:* +39 070 92432952
*email:* fausto.sess...@infomob.it
*skype:* fausto.sessego.infomob
*web:* www.infomob.it

2017-05-05 13:56 GMT+02:00 Fabio Estevam :

>
>
> On Fri, May 5, 2017 at 8:51 AM, Fausto Sessego 
> wrote:
>
>> Ok.
>>
>> I have the problem the Kernel Stucks at startup "Starting Kernel  "
>>
>> Could it depend on boot configuration (the macro  CONFIG_MMCROOT) ?
>>
>
> No, the rootfs will be mounted at a much later stage.
>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH] mmc: sdhci-cadence: set timing mode register depending on frequency

2017-05-24 Thread Masahiro Yamada
2017-05-19 21:24 GMT+09:00 Masahiro Yamada :
> The MMC framework in U-Boot does not support a systematic API for
> timing switch like mmc_set_timing() in Linux.
>
> U-Boot just provides a hook to change the clock frequency via
> mmc_set_clock().  It is up to drivers if additional register
> settings are needed.
>
> This driver needs to set a correct timing mode into a register when
> it migrates to a different speed mode.  Only increasing clock frequency
> could result in setup/hold timing violation.
>
> The timing mode should be decided by checking MMC_TIMING_* like
> drivers/mmc/host/sdhci-cadence.c in Linux, but "timing" is not
> supported by U-Boot for now.  Just use mmc->clock to decide the
> timing mode.
>
> Signed-off-by: Masahiro Yamada 

I see lots of improvements for MMC core.

Looks like it is better to rebase my work
after they are merged.


I marked this patch Superseded.




-- 
Best Regards
Masahiro Yamada
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 25/30] ARM: dts: keystone-k2g: Remove skeleton.dtsi

2017-05-24 Thread Franklin S Cooper Jr
Adding the unit address to the memory node was causing the below error:
Warning (reg_format): "reg" property in /memory has invalid length
(8 bytes) (#address-cells == 2, #size-cells == 2)

Further debugging showed that this was due to the memory node added by
default to skeleton.dtsi which was being included in keystone-k2g.dtsi.
Adding a missing node was all that was needed to remove this deprecated
dtsi file from the SoC dtsi. With skeleton.dtsi removed the dtc compiler
no longer complained about including the unit address for the memory node.

Signed-off-by: Franklin S Cooper Jr 
---
Note:
This patch mimics similar changes being pulled in Linux kernel

 arch/arm/dts/keystone-k2g.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/keystone-k2g.dtsi b/arch/arm/dts/keystone-k2g.dtsi
index 191e3f1..f05afb7 100644
--- a/arch/arm/dts/keystone-k2g.dtsi
+++ b/arch/arm/dts/keystone-k2g.dtsi
@@ -9,7 +9,6 @@
  */
 
 #include 
-#include "skeleton.dtsi"
 
 / {
model = "Texas Instruments K2G SoC";
@@ -17,6 +16,8 @@
#size-cells = <1>;
interrupt-parent = <>;
 
+   chosen { };
+
aliases {
serial0 = 
spi0 = 
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 28/30] ARM: dts: k2g: Add DT support for K2G Industrial Communication Engine evm

2017-05-24 Thread Franklin S Cooper Jr
Add basic DT support for K2G ICE evm. Only minimal peripherals are
supported to allow console output and MMC boot.

Signed-off-by: Franklin S Cooper Jr 
---
Version 2 changes:
Updated the dts to mimic version accepted into the Linux kernel.

 arch/arm/dts/Makefile |  3 ++-
 arch/arm/dts/keystone-k2g-ice-u-boot.dtsi | 19 
 arch/arm/dts/keystone-k2g-ice.dts | 36 +++
 3 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/keystone-k2g-ice-u-boot.dtsi
 create mode 100644 arch/arm/dts/keystone-k2g-ice.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 63450f5..89bac41 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -355,7 +355,8 @@ dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \
keystone-k2l-evm.dtb \
keystone-k2e-evm.dtb \
keystone-k2g-evm.dtb \
-   keystone-k2g-generic.dtb
+   keystone-k2g-generic.dtb \
+   keystone-k2g-ice.dtb
 
 dtb-$(CONFIG_TARGET_AT91SAM9263EK) += at91sam9263ek.dtb
 
diff --git a/arch/arm/dts/keystone-k2g-ice-u-boot.dtsi 
b/arch/arm/dts/keystone-k2g-ice-u-boot.dtsi
new file mode 100644
index 000..4d073f3
--- /dev/null
+++ b/arch/arm/dts/keystone-k2g-ice-u-boot.dtsi
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+/{
+   soc {
+   u-boot,dm-pre-reloc;
+   };
+};
+
+ {
+   u-boot,dm-pre-reloc;
+};
+
+ {
+   u-boot,dm-pre-reloc;
+};
diff --git a/arch/arm/dts/keystone-k2g-ice.dts 
b/arch/arm/dts/keystone-k2g-ice.dts
new file mode 100644
index 000..be63782
--- /dev/null
+++ b/arch/arm/dts/keystone-k2g-ice.dts
@@ -0,0 +1,36 @@
+/*
+ * Device Tree Source for K2G Industrial Communication Engine EVM
+ *
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+/dts-v1/;
+
+#include "keystone-k2g.dtsi"
+
+/ {
+   compatible = "ti,k2g-ice", "ti,k2g", "ti,keystone";
+   model = "Texas Instruments K2G Industrial Communication EVM";
+
+   chosen {
+   stdout-path = 
+   };
+
+   memory@8000 {
+   device_type = "memory";
+   reg = <0x8000 0x2000>;
+   };
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
+
+ {
+   status = "okay";
+};
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 13/30] ARM: keystone2: Define board_fit_config_name_match for Keystone 2 boards

2017-05-24 Thread Franklin S Cooper Jr
Now with support for U-boot runtime dtb selection each board needs to
define board_fit_config_name_match so U-boot can determine what the
correct dtb is within the FIT blob.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/ks2_evm/board_k2e.c  | 10 ++
 board/ti/ks2_evm/board_k2g.c  | 14 ++
 board/ti/ks2_evm/board_k2hk.c | 10 ++
 board/ti/ks2_evm/board_k2l.c  | 10 ++
 4 files changed, 44 insertions(+)

diff --git a/board/ti/ks2_evm/board_k2e.c b/board/ti/ks2_evm/board_k2e.c
index 64f0c9c..266a66b 100644
--- a/board/ti/ks2_evm/board_k2e.c
+++ b/board/ti/ks2_evm/board_k2e.c
@@ -166,6 +166,16 @@ int get_num_eth_ports(void)
 }
 #endif
 
+#if defined(CONFIG_FIT_EMBED)
+int board_fit_config_name_match(const char *name)
+{
+   if (!strcmp(name, "keystone-k2e-evm"))
+   return 0;
+
+   return -1;
+}
+#endif
+
 #if defined(CONFIG_BOARD_EARLY_INIT_F)
 int board_early_init_f(void)
 {
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 4c3819d..d354415 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -214,6 +214,20 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_FIT_EMBED)
+int board_fit_config_name_match(const char *name)
+{
+   bool eeprom_read = board_ti_was_eeprom_read();
+
+   if (!strcmp(name, "keystone-k2g-generic") && !eeprom_read)
+   return 0;
+   else if (!strcmp(name, "keystone-k2g-evm") && board_ti_is("66AK2GGP"))
+   return 0;
+   else
+   return -1;
+}
+#endif
+
 #if defined(CONFIG_DTB_RESELECT)
 static int k2g_alt_board_detect(void)
 {
diff --git a/board/ti/ks2_evm/board_k2hk.c b/board/ti/ks2_evm/board_k2hk.c
index b35f24d..c733099 100644
--- a/board/ti/ks2_evm/board_k2hk.c
+++ b/board/ti/ks2_evm/board_k2hk.c
@@ -150,6 +150,16 @@ int board_early_init_f(void)
 }
 #endif
 
+#if defined(CONFIG_FIT_EMBED)
+int board_fit_config_name_match(const char *name)
+{
+   if (!strcmp(name, "keystone-k2hk-evm"))
+   return 0;
+
+   return -1;
+}
+#endif
+
 #ifdef CONFIG_SPL_BUILD
 void spl_init_keystone_plls(void)
 {
diff --git a/board/ti/ks2_evm/board_k2l.c b/board/ti/ks2_evm/board_k2l.c
index f3eea42..166367b 100644
--- a/board/ti/ks2_evm/board_k2l.c
+++ b/board/ti/ks2_evm/board_k2l.c
@@ -138,6 +138,16 @@ int board_early_init_f(void)
 }
 #endif
 
+#if defined(CONFIG_FIT_EMBED)
+int board_fit_config_name_match(const char *name)
+{
+   if (!strcmp(name, "keystone-k2l-evm"))
+   return 0;
+
+   return -1;
+}
+#endif
+
 #ifdef CONFIG_SPL_BUILD
 void spl_init_keystone_plls(void)
 {
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 11/30] ARM: keystone2: Allow to build with all image formats

2017-05-24 Thread Franklin S Cooper Jr
u-boot.bin is a copy of:
u-boot-fit-dtb.bin if CONFIG_FIT_EMBED is enabled,
u-boot-dtb.bin if CONFIG_OF_SEPARATE is enabled,
u-boot-nodtb.bin if DT is not enabled.
So, use u-boot.bin to to generate keystone images instead of
u-boot-dtb.bin

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 arch/arm/mach-keystone/config.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-keystone/config.mk b/arch/arm/mach-keystone/config.mk
index db556ea..5806f8f 100644
--- a/arch/arm/mach-keystone/config.mk
+++ b/arch/arm/mach-keystone/config.mk
@@ -22,13 +22,13 @@ spl/u-boot-spl.gph: spl/u-boot-spl.bin FORCE
 
 OBJCOPYFLAGS_u-boot-spi.gph = -I binary -O binary 
--pad-to=$(CONFIG_SPL_PAD_TO) \
  --gap-fill=0
-u-boot-spi.gph: spl/u-boot-spl.gph u-boot-dtb.img FORCE
+u-boot-spi.gph: spl/u-boot-spl.gph u-boot.img FORCE
$(call if_changed,pad_cat)
 
 ifndef CONFIG_SPL_BUILD
 MKIMAGEFLAGS_MLO = -A $(ARCH) -T gpimage -C none \
-a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -n U-Boot
-MLO: u-boot-dtb.bin FORCE
+MLO: u-boot.bin FORCE
$(call if_changed,mkimage)
@dd if=/dev/zero bs=8 count=1 2>/dev/null >> $@
 endif
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 22/30] board: ks2: Use board detection to wrap code not specific to K2G ICE evm

2017-05-24 Thread Franklin S Cooper Jr
Some code doesn't apply to K2G ICE evm. Therefore, use board detection to
wrap these calls.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/ks2_evm/board.c | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 4792311..c61baee 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -45,13 +45,17 @@ int dram_init(void)
gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
CONFIG_MAX_RAM_BANK_SIZE);
 #if defined(CONFIG_TI_AEMIF)
-   aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs);
+   if (!board_is_k2g_ice())
+   aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs);
 #endif
 
-   if (ddr3_size)
-   ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size);
-   else
-   ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, gd->ram_size >> 30);
+   if (!board_is_k2g_ice()) {
+   if (ddr3_size)
+   ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size);
+   else
+   ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE,
+ gd->ram_size >> 30);
+   }
 
return 0;
 }
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 18/30] ARM: k2g: Program DDRPHY_DATX8 registers via mask and value variables

2017-05-24 Thread Franklin S Cooper Jr
Different K2G evms may need to program the various
KS2_DDRPHY_DATX8_X_OFFSET registers in different ways. Therefore, use
the mask and val registers for each KS2_DDRPHY_DATAX_X_OFFSET to
properly program the register.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 arch/arm/mach-keystone/ddr3.c | 32 +++-
 board/ti/ks2_evm/ddr3_k2g.c   | 14 ++
 2 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-keystone/ddr3.c b/arch/arm/mach-keystone/ddr3.c
index 25a9637..4cad6a2 100644
--- a/arch/arm/mach-keystone/ddr3.c
+++ b/arch/arm/mach-keystone/ddr3.c
@@ -65,11 +65,33 @@ void ddr3_init_ddrphy(u32 base, struct ddr3_phy_config 
*phy_cfg)
;
 
if (cpu_is_k2g()) {
-   setbits_le32(base + KS2_DDRPHY_DATX8_4_OFFSET, 0x1);
-   clrbits_le32(base + KS2_DDRPHY_DATX8_5_OFFSET, 0x1);
-   clrbits_le32(base + KS2_DDRPHY_DATX8_6_OFFSET, 0x1);
-   clrbits_le32(base + KS2_DDRPHY_DATX8_7_OFFSET, 0x1);
-   clrbits_le32(base + KS2_DDRPHY_DATX8_8_OFFSET, 0x1);
+   clrsetbits_le32(base + KS2_DDRPHY_DATX8_2_OFFSET,
+   phy_cfg->datx8_2_mask,
+   phy_cfg->datx8_2_val);
+
+   clrsetbits_le32(base + KS2_DDRPHY_DATX8_3_OFFSET,
+   phy_cfg->datx8_3_mask,
+   phy_cfg->datx8_3_val);
+
+   clrsetbits_le32(base + KS2_DDRPHY_DATX8_4_OFFSET,
+   phy_cfg->datx8_4_mask,
+   phy_cfg->datx8_4_val);
+
+   clrsetbits_le32(base + KS2_DDRPHY_DATX8_5_OFFSET,
+   phy_cfg->datx8_5_mask,
+   phy_cfg->datx8_5_val);
+
+   clrsetbits_le32(base + KS2_DDRPHY_DATX8_6_OFFSET,
+   phy_cfg->datx8_6_mask,
+   phy_cfg->datx8_6_val);
+
+   clrsetbits_le32(base + KS2_DDRPHY_DATX8_7_OFFSET,
+   phy_cfg->datx8_7_mask,
+   phy_cfg->datx8_7_val);
+
+   clrsetbits_le32(base + KS2_DDRPHY_DATX8_8_OFFSET,
+   phy_cfg->datx8_8_mask,
+   phy_cfg->datx8_8_val);
}
 
__raw_writel(phy_cfg->pir_v2, base + KS2_DDRPHY_PIR_OFFSET);
diff --git a/board/ti/ks2_evm/ddr3_k2g.c b/board/ti/ks2_evm/ddr3_k2g.c
index aeb7da6..3b12943 100644
--- a/board/ti/ks2_evm/ddr3_k2g.c
+++ b/board/ti/ks2_evm/ddr3_k2g.c
@@ -34,6 +34,20 @@ struct ddr3_phy_config ddr3phy_800_2g = {
.zq1cr1 = 0x0001005Bul,
.zq2cr1 = 0x0001005Bul,
.pir_v1 = 0x0033ul,
+   .datx8_2_mask   = 0,
+   .datx8_2_val= 0,
+   .datx8_3_mask   = 0,
+   .datx8_3_val= 0,
+   .datx8_4_mask   = 0,
+   .datx8_4_val= ((1 << 0)),
+   .datx8_5_mask   = DXEN_MASK,
+   .datx8_5_val= 0,
+   .datx8_6_mask   = DXEN_MASK,
+   .datx8_6_val= 0,
+   .datx8_7_mask   = DXEN_MASK,
+   .datx8_7_val= 0,
+   .datx8_8_mask   = DXEN_MASK,
+   .datx8_8_val= 0,
.pir_v2 = 0x0F81ul,
 };
 
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 19/30] ks2_evm: Add EEPROM based board detection helper functions

2017-05-24 Thread Franklin S Cooper Jr
Add a function that can be used to determine if the board being ran on is
a K2G Industrial Communication Engine EVM or K2G General Purpose EVM based
on values programmed on the EEPROM.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/ks2_evm/board.h | 20 
 1 file changed, 20 insertions(+)

diff --git a/board/ti/ks2_evm/board.h b/board/ti/ks2_evm/board.h
index 0698921..b3ad188 100644
--- a/board/ti/ks2_evm/board.h
+++ b/board/ti/ks2_evm/board.h
@@ -15,6 +15,26 @@
 
 extern struct eth_priv_t eth_priv_cfg[];
 
+#if defined(CONFIG_TI_I2C_BOARD_DETECT)
+static inline int board_is_k2g_gp(void)
+{
+   return board_ti_is("66AK2GGP");
+}
+static inline int board_is_k2g_ice(void)
+{
+   return board_ti_is("66AK2GIC");
+}
+#else
+static inline int board_is_k2g_gp(void)
+{
+   return false;
+}
+static inline int board_is_k2g_ice(void)
+{
+   return false;
+}
+#endif
+
 int get_num_eth_ports(void);
 void spl_init_keystone_plls(void);
 
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 21/30] ARM: k2g: Add DDR3 configuration for K2G ICE evm

2017-05-24 Thread Franklin S Cooper Jr
Add configuration settings used by the K2G ICE evm. Also use board
detection to determine which DDR3 configuration to use.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/ks2_evm/ddr3_k2g.c | 62 +++--
 1 file changed, 60 insertions(+), 2 deletions(-)

diff --git a/board/ti/ks2_evm/ddr3_k2g.c b/board/ti/ks2_evm/ddr3_k2g.c
index 3b12943..44db335 100644
--- a/board/ti/ks2_evm/ddr3_k2g.c
+++ b/board/ti/ks2_evm/ddr3_k2g.c
@@ -10,7 +10,9 @@
 #include 
 #include "ddr3_cfg.h"
 #include 
+#include "board.h"
 
+/* K2G GP EVM DDR3 Configuration */
 struct ddr3_phy_config ddr3phy_800_2g = {
.pllcr  = 0x000DC000ul,
.pgcr1_mask = (IODDRM_MASK | ZCKSEL_MASK),
@@ -61,13 +63,69 @@ struct ddr3_emif_config ddr3_800_2g = {
.sdrfc  = 0x0C34ul,
 };
 
+/* K2G ICE evm DDR3 Configuration */
+struct ddr3_phy_config ddr3phy_800_512mb = {
+   .pllcr  = 0x000DC000ul,
+   .pgcr1_mask = (IODDRM_MASK | ZCKSEL_MASK),
+   .pgcr1_val  = ((1 << 2) | (2 << 7) | (1 << 23)),
+   .ptr0   = 0x42C21590ul,
+   .ptr1   = 0xD05612C0ul,
+   .ptr2   = 0,
+   .ptr3   = 0x06C30D40ul,
+   .ptr4   = 0x06413880ul,
+   .dcr_mask   = (PDQ_MASK | MPRDQ_MASK | BYTEMASK_MASK),
+   .dcr_val= ((1 << 10)),
+   .dtpr0  = 0x550E6644ul,
+   .dtpr1  = 0x32834200ul,
+   .dtpr2  = 0x50022A00ul,
+   .mr0= 0x1430ul,
+   .mr1= 0x0006ul,
+   .mr2= 0x0008ul,
+   .dtcr   = 0x710035C7ul,
+   .pgcr2  = 0x00F03D09ul,
+   .zq0cr1 = 0x0001005Dul,
+   .zq1cr1 = 0x0001005Bul,
+   .zq2cr1 = 0x0001005Bul,
+   .pir_v1 = 0x0033ul,
+   .datx8_2_mask   = DXEN_MASK,
+   .datx8_2_val= 0,
+   .datx8_3_mask   = DXEN_MASK,
+   .datx8_3_val= 0,
+   .datx8_4_mask   = DXEN_MASK,
+   .datx8_4_val= 0,
+   .datx8_5_mask   = DXEN_MASK,
+   .datx8_5_val= 0,
+   .datx8_6_mask   = DXEN_MASK,
+   .datx8_6_val= 0,
+   .datx8_7_mask   = DXEN_MASK,
+   .datx8_7_val= 0,
+   .datx8_8_mask   = DXEN_MASK,
+   .datx8_8_val= 0,
+   .pir_v2 = 0x0F81ul,
+};
+
+struct ddr3_emif_config ddr3_800_512mb = {
+   .sdcfg  = 0x62006662ul,
+   .sdtim1 = 0x0A385033ul,
+   .sdtim2 = 0x1CA5ul,
+   .sdtim3 = 0x21ADFF32ul,
+   .sdtim4 = 0x533F067Ful,
+   .zqcfg  = 0x70073200ul,
+   .sdrfc  = 0x0C34ul,
+};
+
 u32 ddr3_init(void)
 {
/* Reset DDR3 PHY after PLL enabled */
ddr3_reset_ddrphy();
 
-   ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC, _800_2g);
-   ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE, _800_2g);
+   if (board_is_k2g_gp()) {
+   ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC, _800_2g);
+   ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE, _800_2g);
+   } else if (board_is_k2g_ice()) {
+   ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC, _800_512mb);
+   ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE, _800_512mb);
+   }
 
return 0;
 }
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 12/30] ARM: k2g: Define embedded_dtb_select for runtime DTB selection in U-boot

2017-05-24 Thread Franklin S Cooper Jr
For K2G, runtime DTB selection utilizes the embedded_dtb_select function.
Therefore, define the function which will perform a EEPROM read and then
retries selecting the correct dtb now that it can detect which board its
on. For other Keystone devices use an empty function since they will still
use the embedded FIT functionality but their FIT will only contain a single
dtb.

Most production K2G boards do not have their EEPROM programmed. Therefore,
perform a test to verify a K2G GP is currently being used and if it is then
set the values normally set by a EEPROM read.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/ks2_evm/board.c |  7 +++
 board/ti/ks2_evm/board_k2g.c | 38 ++
 2 files changed, 45 insertions(+)

diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c
index 03254e1..4792311 100644
--- a/board/ti/ks2_evm/board.c
+++ b/board/ti/ks2_evm/board.c
@@ -277,3 +277,10 @@ void ft_board_setup_ex(void *blob, bd_t *bd)
ddr3_check_ecc_int(KS2_DDR3A_EMIF_CTRL_BASE);
 }
 #endif /* CONFIG_OF_BOARD_SETUP */
+
+#if defined(CONFIG_DTB_RESELECT)
+int __weak embedded_dtb_select(void)
+{
+   return 0;
+}
+#endif
diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 21aec8f..4c3819d 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -11,9 +11,13 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include "mux-k2g.h"
 #include "../common/board_detect.h"
 
+#define K2G_GP_AUDIO_CODEC_ADDRESS 0x1B
+
 const unsigned int sysclk_array[MAX_SYSCLK] = {
1920,
2400,
@@ -210,6 +214,40 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
+#if defined(CONFIG_DTB_RESELECT)
+static int k2g_alt_board_detect(void)
+{
+   int rc;
+
+   rc = i2c_set_bus_num(1);
+   if (rc)
+   return rc;
+
+   rc = i2c_probe(K2G_GP_AUDIO_CODEC_ADDRESS);
+   if (rc)
+   return rc;
+
+   ti_i2c_eeprom_am_set("66AK2GGP", "1.0X");
+
+   return 0;
+}
+
+int embedded_dtb_select(void)
+{
+   int rc;
+
+   rc = k2g_alt_board_detect();
+   if (rc) {
+   printf("Unable to do board detection\n");
+   return -1;
+   }
+
+   fdtdec_setup();
+
+   return 0;
+}
+#endif
+
 #ifdef CONFIG_BOARD_EARLY_INIT_F
 
 static void k2g_reset_mux_config(void)
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 23/30] ARM: k2g: Use board detection to wrap K2G GP specific calls

2017-05-24 Thread Franklin S Cooper Jr
Certain peripherals used by K2G GP aren't used on K2G ICE evm. Or
configuration is slightly different. Therefore, use board detection to
deal with these variations.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/ks2_evm/board_k2g.c | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index a93ef47..96b313f 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -208,7 +208,9 @@ int board_mmc_init(bd_t *bis)
return -1;
}
 
-   omap_mmc_init(0, 0, 0, -1, -1);
+   if (board_is_k2g_gp())
+   omap_mmc_init(0, 0, 0, -1, -1);
+
omap_mmc_init(1, 0, 0, -1, -1);
return 0;
 }
@@ -278,11 +280,13 @@ int embedded_dtb_select(void)
 
k2g_reset_mux_config();
 
-   /* deassert FLASH_HOLD */
-   clrbits_le32(K2G_GPIO1_BANK2_BASE + K2G_GPIO_DIR_OFFSET,
-BIT(9));
-   setbits_le32(K2G_GPIO1_BANK2_BASE + K2G_GPIO_SETDATA_OFFSET,
-BIT(9));
+   if (board_is_k2g_gp()) {
+   /* deassert FLASH_HOLD */
+   clrbits_le32(K2G_GPIO1_BANK2_BASE + K2G_GPIO_DIR_OFFSET,
+BIT(9));
+   setbits_le32(K2G_GPIO1_BANK2_BASE + K2G_GPIO_SETDATA_OFFSET,
+BIT(9));
+   }
 
return 0;
 }
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 05/30] ti: common: board_detect: Add function to determine if EEPROM was read

2017-05-24 Thread Franklin S Cooper Jr
When the EEPROM is first read its contents are stored in memory as a
cache to avoid further I2C operations. To determine if the EEPROM was
previously read the easiest way is to check the memory to see if the
EEPROM's magic header value is set. Create a new function that can
determine if the EEPROM was previously read or not without having to
perform a I2C transaction.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/common/board_detect.c | 10 ++
 board/ti/common/board_detect.h |  9 +
 2 files changed, 19 insertions(+)

diff --git a/board/ti/common/board_detect.c b/board/ti/common/board_detect.c
index bf594cb..1da5ace 100644
--- a/board/ti/common/board_detect.c
+++ b/board/ti/common/board_detect.c
@@ -457,3 +457,13 @@ void board_ti_set_ethaddr(int index)
}
}
 }
+
+bool __maybe_unused board_ti_was_eeprom_read(void)
+{
+   struct ti_common_eeprom *ep = TI_EEPROM_DATA;
+
+   if (ep->header == TI_EEPROM_HEADER_MAGIC)
+   return true;
+   else
+   return false;
+}
diff --git a/board/ti/common/board_detect.h b/board/ti/common/board_detect.h
index e8d9484..893e1ed 100644
--- a/board/ti/common/board_detect.h
+++ b/board/ti/common/board_detect.h
@@ -206,6 +206,15 @@ void set_board_info_env(char *name);
 void board_ti_set_ethaddr(int index);
 
 /**
+ * board_ti_was_eeprom_read() - Check to see if the eeprom contents have been 
read
+ *
+ * This function is useful to determine if the eeprom has already been read and
+ * its contents have already been loaded into memory. It utiltzes the magic
+ * number that the header value is set to upon successful eeprom read.
+ */
+bool board_ti_was_eeprom_read(void);
+
+/**
  * ti_i2c_eeprom_am_set() - Setup the eeprom data with predefined values
  * @name:  Name of the board
  * @rev:   Revision of the board
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 30/30] defconfig: k2g_evm_defconfig: Add K2G ICE to OF_LIST

2017-05-24 Thread Franklin S Cooper Jr
Include K2G ICE to OF_LIST so it can be used for runtime board
detection.

Signed-off-by: Franklin S Cooper Jr 
---
 configs/k2g_evm_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 7b105da..a5639ea 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -48,4 +48,4 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
 CONFIG_DTB_RESELECT=y
 CONFIG_FIT_EMBED=y
-CONFIG_OF_LIST="keystone-k2g-generic keystone-k2g-evm"
+CONFIG_OF_LIST="keystone-k2g-generic keystone-k2g-evm keystone-k2g-ice"
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 24/30] ARM: k2g: Update board_name u-boot env variable at runtime

2017-05-24 Thread Franklin S Cooper Jr
Enable CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG to allow "board_name" to
be set depending on the board it is being ran on.

Update findfdt to use this new dynamic board_name value to determine
which dtb should be used.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 board/ti/ks2_evm/board_k2g.c |  6 ++
 include/configs/k2g_evm.h| 13 +++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c
index 96b313f..5f3fc76 100644
--- a/board/ti/ks2_evm/board_k2g.c
+++ b/board/ti/ks2_evm/board_k2g.c
@@ -306,6 +306,12 @@ int board_late_init(void)
board_ti_set_ethaddr(1);
 #endif
 
+#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+   if (board_is_k2g_gp())
+   setenv("board_name", "66AK2GGP\0");
+   else if (board_is_k2g_ice())
+   setenv("board_name", "66AK2GIC\0");
+#endif
return 0;
 }
 #endif
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index bee1be7..c6eab0f 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -16,6 +16,8 @@
 /* Platform type */
 #define CONFIG_SOC_K2G
 
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+
 /* U-Boot general configuration */
 #define CONFIG_EXTRA_ENV_KS2_BOARD_SETTINGS\
DEFAULT_MMC_TI_ARGS \
@@ -28,7 +30,14 @@
"rd_spec=-\0"   \
"args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs "\
"root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048\0"   \
-   "name_fdt=keystone-k2g-evm.dtb\0"   \
+   "findfdt="\
+   "if test $board_name = 66AK2GGP; then " \
+"setenv name_fdt keystone-k2g-evm.dtb; " \
+   "else if test $board_name = 66AK2GIC; then " \
+"setenv name_fdt keystone-k2g-ice.dtb; " \
+   "else if test $name_fdt = undefined; then " \
+   "echo WARNING: Could not determine device tree to use;"\
+   "fi;fi;fi;\0" \
"name_mon=skern-k2g.bin\0"  \
"name_ubi=k2g-evm-ubifs.ubi\0"  \
"name_uboot=u-boot-spi-k2g-evm.gph\0"   \
@@ -46,7 +55,7 @@
"run envboot; " \
"run set_name_pmmc init_${boot} init_fw_rd_${boot} "\
"get_pmmc_${boot} run_pmmc get_mon_${boot} run_mon "\
-   "get_fdt_${boot} get_kern_${boot} run_kern"
+   "findfdt get_fdt_${boot} get_kern_${boot} run_kern"
 
 #include 
 
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 15/30] defconfig: keystone2: Enable U-boot runtime DTB detection

2017-05-24 Thread Franklin S Cooper Jr
Enable various config options to allow U-boot at runtime to select the
proper dtb to use from the list of dtb's within the FIT image.

Signed-off-by: Franklin S Cooper Jr 
Reviewed-by: Tom Rini 
---
 configs/k2e_evm_defconfig  | 3 +++
 configs/k2g_evm_defconfig  | 3 +++
 configs/k2hk_evm_defconfig | 3 +++
 configs/k2l_evm_defconfig  | 3 +++
 4 files changed, 12 insertions(+)

diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index 83e2138..9ab08c6 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -44,3 +44,6 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
+CONFIG_DTB_RESELECT=y
+CONFIG_FIT_EMBED=y
+CONFIG_OF_LIST="keystone-k2e-evm"
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 674ddcc..7b105da 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -46,3 +46,6 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
+CONFIG_DTB_RESELECT=y
+CONFIG_FIT_EMBED=y
+CONFIG_OF_LIST="keystone-k2g-generic keystone-k2g-evm"
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 7dc5cf5..a751a4f 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -43,3 +43,6 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
+CONFIG_DTB_RESELECT=y
+CONFIG_FIT_EMBED=y
+CONFIG_OF_LIST="keystone-k2hk-evm"
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index 6be4941..cf24d27 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -43,3 +43,6 @@ CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_STORAGE=y
+CONFIG_DTB_RESELECT=y
+CONFIG_FIT_EMBED=y
+CONFIG_OF_LIST="keystone-k2l-evm"
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 27/30] ARM: dts: k2g: Disable netcp by default

2017-05-24 Thread Franklin S Cooper Jr
Disable netcp by default like all other peripherals in the dtsi file.
Enable the peripheral explicitly in the board specific dts file.

Signed-off-by: Franklin S Cooper Jr 
---
 arch/arm/dts/keystone-k2g-evm.dts| 4 
 arch/arm/dts/keystone-k2g-netcp.dtsi | 1 +
 2 files changed, 5 insertions(+)

diff --git a/arch/arm/dts/keystone-k2g-evm.dts 
b/arch/arm/dts/keystone-k2g-evm.dts
index f6fce33..de208b3 100644
--- a/arch/arm/dts/keystone-k2g-evm.dts
+++ b/arch/arm/dts/keystone-k2g-evm.dts
@@ -37,6 +37,10 @@
phy-handle = <>;
 };
 
+ {
+   status = "okay";
+};
+
  {
status = "okay";
 
diff --git a/arch/arm/dts/keystone-k2g-netcp.dtsi 
b/arch/arm/dts/keystone-k2g-netcp.dtsi
index a9b26c3..d76f2a1 100644
--- a/arch/arm/dts/keystone-k2g-netcp.dtsi
+++ b/arch/arm/dts/keystone-k2g-netcp.dtsi
@@ -99,6 +99,7 @@ netcp: netcp@400 {
reg = <0x2620110 0x8>;
reg-names = "efuse";
compatible = "ti,netcp-1.0";
+   status = "disabled";
#address-cells = <1>;
#size-cells = <1>;
/* power-domains = <_pds K2G_DEV_NSS0>; */
-- 
2.10.0

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


  1   2   >