[U-Boot] [PATCH 2/2] video: Support multiple lines version string display

2018-01-01 Thread Peng Fan
The calculation of left space for version string is not correct, should
use VIDEO_COLS not VIDEO_LINE_LEN / 2, otherwise we will get larger space
than actual have and cause string to overlay logo picture.

Also current version string display only supports two lines words at max.
This also causes overlay when the LCD pixel colume size is not enough.

Signed-off-by: Peng Fan 
---
 drivers/video/cfb_console.c | 30 +++---
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 74cc20d653..0b25897062 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1900,16 +1900,32 @@ static void *video_logo(void)
sprintf(info, " %s", version_string);
 
 #ifndef CONFIG_HIDE_LOGO_VERSION
-   space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
+   space = (VIDEO_COLS - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
len = strlen(info);
 
if (len > space) {
-   video_drawchars(VIDEO_INFO_X, VIDEO_INFO_Y,
-   (uchar *) info, space);
-   video_drawchars(VIDEO_INFO_X + VIDEO_FONT_WIDTH,
-   VIDEO_INFO_Y + VIDEO_FONT_HEIGHT,
-   (uchar *) info + space, len - space);
-   y_off = 1;
+   int xx = VIDEO_INFO_X, yy = VIDEO_INFO_Y;
+   uchar *p = (uchar *) info;
+
+   while (len) {
+   if (len > space) {
+   video_drawchars(xx, yy, p, space);
+   len -= space;
+
+   p = (uchar *)p + space;
+
+   if (!y_off) {
+   xx += VIDEO_FONT_WIDTH;
+   space--;
+   }
+   yy += VIDEO_FONT_HEIGHT;
+
+   y_off++;
+   } else {
+   video_drawchars(xx, yy, p, len);
+   len = 0;
+   }
+   }
} else
video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
 
-- 
2.14.1

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


[U-Boot] [PATCH 1/2] video: ipu: Fix dereferencing NULL pointer problem

2018-01-01 Thread Peng Fan
The clk_set_rate function dereferences the clk pointer without
checking whether it is NULL. This may cause problem when clk is NULL.

Signed-off-by: Peng Fan 
---
 drivers/video/ipu_common.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 96229da502..b3b09e6982 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -134,6 +134,10 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
 {
if (clk && clk->set_rate)
clk->set_rate(clk, rate);
+
+   if (!clk)
+   return 0;
+
return clk->rate;
 }
 
-- 
2.14.1

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


[U-Boot] [PATCH 2/2] imx: mx6ull-14x14-evk: enable DM QSPI driver

2018-01-01 Thread Peng Fan
To support QSPI DM driver
 - Add spi0 alias for qspi node. Which is used for bus number 0.
 - Modify the n25q256a@0 compatible property to "spi-flash".
 - Modify spi4 (gpio_spi) node to spi5
 - Define DM SPI/QSPI related config to enable QSPI

Signed-off-by: Peng Fan 
---
 arch/arm/dts/imx6ull-14x14-evk.dts|  5 +++--
 arch/arm/dts/imx6ull.dtsi |  9 +
 configs/mx6ull_14x14_evk_defconfig|  6 ++
 configs/mx6ull_14x14_evk_plugin_defconfig |  6 ++
 include/configs/mx6ullevk.h   | 10 ++
 5 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/imx6ull-14x14-evk.dts 
b/arch/arm/dts/imx6ull-14x14-evk.dts
index 375bd4ea31..2a941bff1c 100644
--- a/arch/arm/dts/imx6ull-14x14-evk.dts
+++ b/arch/arm/dts/imx6ull-14x14-evk.dts
@@ -67,7 +67,7 @@
};
};
 
-   spi4 {
+   spi5 {
compatible = "spi-gpio";
pinctrl-names = "default";
pinctrl-0 = <_spi4>;
@@ -455,7 +455,8 @@
flash0: n25q256a@0 {
#address-cells = <1>;
#size-cells = <1>;
-   compatible = "micron,n25q256a";
+   /* compatible = "micron,n25q256a"; */
+   compatible = "spi-flash";
spi-max-frequency = <2900>;
spi-nor,ddr-quad-read-dummy = <6>;
reg = <0>;
diff --git a/arch/arm/dts/imx6ull.dtsi b/arch/arm/dts/imx6ull.dtsi
index 65950e8019..ea882a7f14 100644
--- a/arch/arm/dts/imx6ull.dtsi
+++ b/arch/arm/dts/imx6ull.dtsi
@@ -38,10 +38,11 @@
serial5 = 
serial6 = 
serial7 = 
-   spi0 = 
-   spi1 = 
-   spi2 = 
-   spi3 = 
+   spi0 = 
+   spi1 = 
+   spi2 = 
+   spi3 = 
+   spi4 = 
usbphy0 = 
usbphy1 = 
};
diff --git a/configs/mx6ull_14x14_evk_defconfig 
b/configs/mx6ull_14x14_evk_defconfig
index 4960056fe4..5305c12fdb 100644
--- a/configs/mx6ull_14x14_evk_defconfig
+++ b/configs/mx6ull_14x14_evk_defconfig
@@ -10,6 +10,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
@@ -24,7 +25,12 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_74X164=y
 CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_SPI=y
+CONFIG_FSL_QSPI=y
diff --git a/configs/mx6ull_14x14_evk_plugin_defconfig 
b/configs/mx6ull_14x14_evk_plugin_defconfig
index d07be226f5..f1023b2aae 100644
--- a/configs/mx6ull_14x14_evk_plugin_defconfig
+++ b/configs/mx6ull_14x14_evk_plugin_defconfig
@@ -11,6 +11,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_SF=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
@@ -25,7 +26,12 @@ CONFIG_DM_GPIO=y
 CONFIG_DM_74X164=y
 CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
 CONFIG_DM_REGULATOR=y
 CONFIG_DM_SPI=y
+CONFIG_FSL_QSPI=y
diff --git a/include/configs/mx6ullevk.h b/include/configs/mx6ullevk.h
index 8787df4907..6a48742fd0 100644
--- a/include/configs/mx6ullevk.h
+++ b/include/configs/mx6ullevk.h
@@ -164,4 +164,14 @@
 
 #define CONFIG_SOFT_SPI
 
+#ifdef CONFIG_FSL_QSPI
+#define CONFIG_SYS_FSL_QSPI_AHB
+#define CONFIG_SF_DEFAULT_BUS  0
+#define CONFIG_SF_DEFAULT_CS   0
+#define CONFIG_SF_DEFAULT_SPEED4000
+#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
+#define FSL_QSPI_FLASH_NUM 1
+#define FSL_QSPI_FLASH_SIZESZ_32M
+#endif
+
 #endif
-- 
2.14.1

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


[U-Boot] [PATCH 1/2] spi: fsl_qspi: support i.MX6UL/7D

2018-01-01 Thread Peng Fan
The QSPI module on i.MX7D is modified from i.MX6SX. The module used on
i.MX6UL is reused from i.MX7D. They share same tx buffer size.

The endianness is not set at qspi driver initialization. So if we don't
boot from QSPI, we will get wrong endianness when accessing from AHB
address directly.

Add the compatible entry for 6ul/7d.

Signed-off-by: Peng Fan 
---
 drivers/spi/fsl_qspi.c | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
index 0f3f7d97f0..e37f4538e2 100644
--- a/drivers/spi/fsl_qspi.c
+++ b/drivers/spi/fsl_qspi.c
@@ -20,7 +20,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 #define RX_BUFFER_SIZE 0x80
-#ifdef CONFIG_MX6SX
+#if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX7D)
 #define TX_BUFFER_SIZE 0x200
 #else
 #define TX_BUFFER_SIZE 0x40
@@ -268,7 +268,7 @@ static void qspi_set_lut(struct fsl_qspi_priv *priv)
 INSTR0(LUT_CMD) | OPRND1(ADDR32BIT) |
 PAD1(LUT_PAD1) | INSTR1(LUT_ADDR));
 #endif
-#ifdef CONFIG_MX6SX
+#if defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX7D)
/*
 * To MX6SX, OPRND0(TX_BUFFER_SIZE) can not work correctly.
 * So, Use IDATSZ in IPCR to determine the size and here set 0.
@@ -905,6 +905,11 @@ struct spi_slave *spi_setup_slave(unsigned int bus, 
unsigned int cs,
qspi->slave.max_write_size = TX_BUFFER_SIZE;
 
mcr_val = qspi_read32(qspi->priv.flags, >mcr);
+
+   /* Set endianness to LE for i.mx */
+   if (IS_ENABLED(CONFIG_MX6) || IS_ENABLED(CONFIG_MX7))
+   mcr_val = QSPI_MCR_END_CFD_LE;
+
qspi_write32(qspi->priv.flags, >mcr,
 QSPI_MCR_RESERVED_MASK | QSPI_MCR_MDIS_MASK |
 (mcr_val & QSPI_MCR_END_CFD_MASK));
@@ -1023,6 +1028,11 @@ static int fsl_qspi_probe(struct udevice *bus)
}
 
mcr_val = qspi_read32(priv->flags, >regs->mcr);
+
+   /* Set endianness to LE for i.mx */
+   if (IS_ENABLED(CONFIG_MX6) || IS_ENABLED(CONFIG_MX7))
+   mcr_val = QSPI_MCR_END_CFD_LE;
+
qspi_write32(priv->flags, >regs->mcr,
 QSPI_MCR_RESERVED_MASK | QSPI_MCR_MDIS_MASK |
 (mcr_val & QSPI_MCR_END_CFD_MASK));
@@ -1227,6 +1237,8 @@ static const struct dm_spi_ops fsl_qspi_ops = {
 static const struct udevice_id fsl_qspi_ids[] = {
{ .compatible = "fsl,vf610-qspi" },
{ .compatible = "fsl,imx6sx-qspi" },
+   { .compatible = "fsl,imx6ul-qspi" },
+   { .compatible = "fsl,imx7d-qspi" },
{ }
 };
 
-- 
2.14.1

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


[U-Boot] [PATCH] Revert "Kconfig: mx6ull: Deselect MX6UL from CONFIG_MX6ULL"

2018-01-01 Thread Peng Fan
6ULL reuses as much as possible code from 6UL. Removing
the selection will cause 6ULL could not boot up. So revert it.

This reverts commit 051ba9e082f71f4709c32a69378192ca8964ca50.

Signed-off-by: Peng Fan 
---
 arch/arm/mach-imx/mx6/Kconfig | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 58ee20a8b6..74cc3cb16e 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -73,9 +73,8 @@ config MX6UL_OPOS6UL
select SUPPORT_SPL
 
 config MX6ULL
-   select SYS_L2CACHE_OFF
-   select ROM_UNIFIED_SECTIONS
bool
+   select MX6UL
 
 config MX6_DDRCAL
bool "Include dynamic DDR calibration routines"
-- 
2.14.1

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


Re: [U-Boot] [PATCH v2] board: ti: dra7xx: Select MCAN instead of DCAN on DRA76 EVM

2018-01-01 Thread Faiz Abbas
Hi,

On Tuesday 12 December 2017 05:14 PM, Faiz Abbas wrote:
> From: Vignesh R 
> 
> MCAN can be accessed via DCAN1 or DCAN2. Determining which DCAN instance
> to use if any at all is done through
> CTRL_CORE_CONTROL_SPARE_RW.SEL_ALT_MCAN. Since general pinmuxing is
> handled in U-boot. Handle this additional pinmuxing requirement in U-boot
> to ensure that MCAN is used by default via the DCAN1 pins.
> 
> Signed-off-by: Vignesh R 
> [fcoo...@ti.com: Update commit message and use DCAN1 not DCAN2 for MCAN]
> Signed-off-by: Franklin S Cooper Jr 
> Signed-off-by: Lokesh Vutla 
> 
> Signed-off-by: Faiz Abbas 
> ---
>  arch/arm/include/asm/arch-omap5/mux_dra7xx.h | 3 +++
>  board/ti/dra7xx/evm.c| 5 +
>  2 files changed, 8 insertions(+)
> 
> diff --git a/arch/arm/include/asm/arch-omap5/mux_dra7xx.h 
> b/arch/arm/include/asm/arch-omap5/mux_dra7xx.h
> index 55f49c7..dc2eb60 100644
> --- a/arch/arm/include/asm/arch-omap5/mux_dra7xx.h
> +++ b/arch/arm/include/asm/arch-omap5/mux_dra7xx.h
> @@ -351,4 +351,7 @@
>  #define NMIN_DSP 0x460
>  #define RSTOUTN  0x464
>  
> +#define MCAN_SEL_ALT_MASK0x6000
> +#define MCAN_SEL 0x2000
> +
>  #endif /* _MUX_DRA7XX_H_ */
> diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c
> index 6bcfa48..ddcbe31 100644
> --- a/board/ti/dra7xx/evm.c
> +++ b/board/ti/dra7xx/evm.c
> @@ -823,6 +823,11 @@ void recalibrate_iodelay(void)
>   do_set_mux32((*ctrl)->control_padconf_core_base,
>delta_pads, delta_npads);
>  
> + if (is_dra76x())
> + /* Set mux for MCAN instead of DCAN1 */
> + clrsetbits_le32((*ctrl)->control_core_control_spare_rw,
> + MCAN_SEL_ALT_MASK, MCAN_SEL);
> +
>   /* Setup IOdelay configuration */
>   ret = do_set_iodelay((*ctrl)->iodelay_config_base, iodelay, niodelays);
>  err:
> 

Gentle Ping

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


Re: [U-Boot] [PATCH] driver: net: ldpaa_eth: Add PHY-less SGMII support

2018-01-01 Thread Ashish Kumar


> -Original Message-
> From: U-Boot [mailto:u-boot-boun...@lists.denx.de] On Behalf Of Ashish
> Kumar
> Sent: Thursday, November 09, 2017 10:46 AM
> To: York Sun ; u-boot@lists.denx.de; Prabhakar Kushwaha
> 
> Cc: joe.hershber...@ni.com
> Subject: Re: [U-Boot] [PATCH] driver: net: ldpaa_eth: Add PHY-less SGMII
> support
> 
> -Original Message-
> From: York Sun
> Sent: Thursday, November 09, 2017 2:07 AM
> To: Ashish Kumar ; u-boot@lists.denx.de
> Cc: joe.hershber...@ni.com; Prabhakar Kushwaha
> 
> Subject: Re: [PATCH] driver: net: ldpaa_eth: Add PHY-less SGMII support
> 
> On 11/06/2017 01:09 AM, Ashish Kumar wrote:
> > In case of PHY-less mode, there is no interaction with PHY so auto-neg
> > etc is not required and link will have fixed attributes
> >
> > Signed-off-by: Ashish Kumar 
> > Signed-off-by: Prabhakar Kushwaha 
> > ---
> >  drivers/net/ldpaa_eth/ldpaa_eth.c | 9 +++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/ldpaa_eth/ldpaa_eth.c
> > b/drivers/net/ldpaa_eth/ldpaa_eth.c
> > index 21be79a..85e7faa 100644
> > --- a/drivers/net/ldpaa_eth/ldpaa_eth.c
> > +++ b/drivers/net/ldpaa_eth/ldpaa_eth.c
> > @@ -440,12 +440,17 @@ static int ldpaa_eth_open(struct eth_device
> *net_dev, bd_t *bd)
> > bus = wriop_get_mdio(priv->dpmac_id);
> > enet_if = wriop_get_enet_if(priv->dpmac_id);
> > if ((bus == NULL) &&
> > -   (enet_if == PHY_INTERFACE_MODE_XGMII)) {
> > +  ((enet_if == PHY_INTERFACE_MODE_XGMII) ||
> > +  (enet_if == PHY_INTERFACE_MODE_SGMII))) {
> > priv->phydev = (struct phy_device *)
> > malloc(sizeof(struct phy_device));
> > memset(priv->phydev, 0, sizeof(struct phy_device));
> >
> > -   priv->phydev->speed = SPEED_1;
> > +   if (enet_if == PHY_INTERFACE_MODE_XGMII)
> > +   priv->phydev->speed = SPEED_1;
> > +   else
> > +   priv->phydev->speed = SPEED_1000;
> > +
> > priv->phydev->link = 1;
> > priv->phydev->duplex = DUPLEX_FULL;
> > }
> >
> 
> How was this patch tested?
> 
> >It can be tested with PHY-less SGMII riser cards after adding patches 
> >attached.
> >With the existing Riser card, which are PHY enabled, the test is that PHYs 
> >are
> not configured by adding these to patches.
> 
> >Do you suggest to add these patches in upstream?
> 
> Regards
> Ashish
> 
> A little off-topic. I remember a similar discussion somewhere (maybe
> internal) for PowerPC-based boards regarding fixed SGMII port. When the port
> doesn't have a PHY, it fails due to PHY id check. I don't find the change in 
> U-Boot
> code. Does anyone remember it?

Hello York,

Please provide more details of the PowerPC target in which this these changes 
may be required?

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


[U-Boot] [PATCH] armv8: ls1088aqds: Add IFC-NOR as boot source for LS1088

2018-01-01 Thread Ashish Kumar
IFC-NOR and QSPI-NOR pins are muxed on SoC,so they
cannot be accessed simultaneously, but
IFC-NOR can be accessed along with SD-BOOT.

ls1088aqds_sdcard_ifc_defconfig: is defconfig for
SD as boot source and IFC-NOR to be used as flash,
this will be used to write IFC-NOR image on IFC flash.
QSPI and DSPI cannot be accessed in this defconfig.

IFC-NOR image is generated by ls1088aqds_defconfig.

Signed-off-by: Ashish Kumar 
---
depends on: https://patchwork.ozlabs.org/patch/853615/

Tested on 2018.01-rc3

More accurate timing are used which where provided by 
validation team

to switch to IFC-NOR use command for qspi prompt:
i2c mw 66 0x60 0x12; i2c mw 66 50 00;i2c mw 66 10 21

 arch/arm/dts/fsl-ls1088a-qds.dts| 37 +++
 arch/arm/dts/fsl-ls1088a.dtsi   |  5 
 board/freescale/ls1088a/MAINTAINERS |  2 ++
 configs/ls1088aqds_defconfig| 42 ++
 configs/ls1088aqds_sdcard_ifc_defconfig | 53 +
 include/configs/ls1088aqds.h| 36 ++
 6 files changed, 154 insertions(+), 21 deletions(-)
 create mode 100644 configs/ls1088aqds_defconfig
 create mode 100644 configs/ls1088aqds_sdcard_ifc_defconfig

diff --git a/arch/arm/dts/fsl-ls1088a-qds.dts b/arch/arm/dts/fsl-ls1088a-qds.dts
index 9b7bef4..acd8cfd 100644
--- a/arch/arm/dts/fsl-ls1088a-qds.dts
+++ b/arch/arm/dts/fsl-ls1088a-qds.dts
@@ -19,6 +19,43 @@
};
 };
 
+ {
+   #address-cells = <2>;
+   #size-cells = <1>;
+   /* NOR, NAND Flashes and FPGA on board */
+   ranges = <0 0 0x5 0x8000 0x0800
+   2 0 0x5 0x3000 0x0001
+   3 0 0x5 0x2000 0x0001>;
+   status = "okay";
+
+   nor@0,0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "cfi-flash";
+   reg = <0x0 0x0 0x800>;
+   bank-width = <2>;
+   device-width = <1>;
+   };
+
+   nand@2,0 {
+   compatible = "fsl,ifc-nand";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   reg = <0x1 0x0 0x1>;
+   };
+
+   fpga: board-control@3,0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "simple-bus", "fsl,ls1088aqds-fpga",
+   "fsl,fpga-qixis";
+   reg = <0x2 0x0 0x100>;
+   bank-width = <1>;
+   device-width = <1>;
+   ranges = <0 2 0 0x100>;
+   };
+};
+
  {
bus-num = <0>;
status = "okay";
diff --git a/arch/arm/dts/fsl-ls1088a.dtsi b/arch/arm/dts/fsl-ls1088a.dtsi
index 64b4fcf..ce5e235 100644
--- a/arch/arm/dts/fsl-ls1088a.dtsi
+++ b/arch/arm/dts/fsl-ls1088a.dtsi
@@ -75,6 +75,11 @@
reg-names = "QuadSPI", "QuadSPI-memory";
num-cs = <4>;
};
+   ifc: ifc@153 {
+   compatible = "fsl,ifc", "simple-bus";
+   reg = <0x0 0x224 0x0 0x2>;
+   interrupts = <0 21 0x4>; /* Level high type */
+   };
 
usb0: usb3@310 {
compatible = "fsl,layerscape-dwc3";
diff --git a/board/freescale/ls1088a/MAINTAINERS 
b/board/freescale/ls1088a/MAINTAINERS
index de3961d..bc91f26 100644
--- a/board/freescale/ls1088a/MAINTAINERS
+++ b/board/freescale/ls1088a/MAINTAINERS
@@ -15,6 +15,8 @@ F:board/freescale/ls1088a/
 F: include/configs/ls1088aqds.h
 F: configs/ls1088aqds_qspi_defconfig
 F: configs/ls1088aqds_sdcard_qspi_defconfig
+F: configs/ls1088aqds_defconfig
+F: configs/ls1088aqds_sdcard_ifc_defconfig
 
 LS1088AQDS_QSPI_SECURE_BOOT BOARD
 M: Udit Agarwal 
diff --git a/configs/ls1088aqds_defconfig b/configs/ls1088aqds_defconfig
new file mode 100644
index 000..5624595
--- /dev/null
+++ b/configs/ls1088aqds_defconfig
@@ -0,0 +1,42 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1088AQDS=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_DM_SPI=y
+CONFIG_DM_SPI_FLASH=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1088a-qds"
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_OF_STDOUT_VIA_ALIAS=y
+CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_PING=y
+CONFIG_OF_CONTROL=y
+CONFIG_FSL_IFC=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_DM=y
+CONFIG_SCSI_AHCI=y
+CONFIG_MTD_NOR_FLASH=y
+CONFIG_NETDEVICES=y
+CONFIG_E1000=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_LAYERSCAPE=y
+CONFIG_SYS_NS16550=y
+CONFIG_ENV_IS_IN_FLASH=y
+CONFIG_FSL_LS_PPA=y
+CONFIG_USB=y
+CONFIG_USB_GADGET=y
+CONFIG_CMD_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_STORAGE=y
+# CONFIG_DISPLAY_BOARDINFO is not set
+# CONFIG_USE_BOOTCOMMAND is not set
diff --git 

[U-Boot] [PATCH] armv8: ls1088: Add USB and PCI configs in SD-BOOT defconfig

2018-01-01 Thread Ashish Kumar
Signed-off-by: Ashish Kumar 
---
depends on: https://patchwork.ozlabs.org/patch/853615/

Tested on 2018.01-rc3

 configs/ls1088aqds_sdcard_qspi_defconfig | 12 
 configs/ls1088ardb_sdcard_qspi_defconfig | 12 
 2 files changed, 24 insertions(+)

diff --git a/configs/ls1088aqds_sdcard_qspi_defconfig 
b/configs/ls1088aqds_sdcard_qspi_defconfig
index 0ba6981..659bc4f 100644
--- a/configs/ls1088aqds_sdcard_qspi_defconfig
+++ b/configs/ls1088aqds_sdcard_qspi_defconfig
@@ -23,6 +23,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
@@ -35,6 +36,17 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_LAYERSCAPE=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_DSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
diff --git a/configs/ls1088ardb_sdcard_qspi_defconfig 
b/configs/ls1088ardb_sdcard_qspi_defconfig
index 77e6f0a..2e3c287 100644
--- a/configs/ls1088ardb_sdcard_qspi_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_defconfig
@@ -24,6 +24,7 @@ CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_ENV_IS_IN_MMC=y
@@ -34,6 +35,17 @@ CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_LAYERSCAPE=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_SPI=y
 CONFIG_FSL_DSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_GADGET=y
-- 
2.7.4

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


[U-Boot] [PATCH] mmc: Poll for broken card detection case

2018-01-01 Thread Jun Nie
Poll for broken card detection case instead of return
no card detected.

Signed-off-by: Jun Nie 
---
 drivers/mmc/Kconfig | 5 +
 drivers/mmc/mmc.c   | 4 
 2 files changed, 9 insertions(+)

diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 8fbeaa7..ed194a3 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -10,6 +10,11 @@ config MMC
  If you want MMC/SD/SDIO support, you should say Y here and
  also to your specific host controller driver.
 
+config MMC_BROKEN_CD
+   bool "Poll for broken card detection case"
+   help
+ If card  detection feature is broken, just poll to detect.
+
 config DM_MMC
bool "Enable MMC controllers using Driver Model"
depends on DM
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 38d2e07..13c5bf5 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1650,8 +1650,12 @@ int mmc_start_init(struct mmc *mmc)
bool no_card;
int err;
 
+#if !defined(CONFIG_MMC_BROKEN_CD)
/* we pretend there's no card when init is NULL */
no_card = mmc_getcd(mmc) == 0;
+#else
+   no_card = 0;
+#endif
 #if !CONFIG_IS_ENABLED(DM_MMC)
no_card = no_card || (mmc->cfg->ops->init == NULL);
 #endif
-- 
1.9.1

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


[U-Boot] [PATCH 7/7] imx: mx6sxsabresd: enlarge ENV offset

2018-01-01 Thread Peng Fan
The u-boot-dtb.imx size is about 519KB, so 8 * 64KB conflicts
with u-boot-dtb.imx. Enlarge the offset to 14 * 64KB to fix it.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
 include/configs/mx6sxsabresd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/mx6sxsabresd.h b/include/configs/mx6sxsabresd.h
index b20e436f93..1eaaf013f7 100644
--- a/include/configs/mx6sxsabresd.h
+++ b/include/configs/mx6sxsabresd.h
@@ -203,7 +203,7 @@
 #endif
 #endif
 
-#define CONFIG_ENV_OFFSET  (8 * SZ_64K)
+#define CONFIG_ENV_OFFSET  (14 * SZ_64K)
 #define CONFIG_ENV_SIZESZ_8K
 
 #define CONFIG_SYS_FSL_USDHC_NUM   3
-- 
2.14.1

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


[U-Boot] [PATCH 5/7] imx: mx6sxsabresd: Enable DM driver

2018-01-01 Thread Peng Fan
Enable I2C/MMC/GPIO/REGUALTOR/PMIC/USB DM drivers.
There are some dependency, such as when DM MMC enabled, USB compile error.
Also the i.MX I2C MMC DM driver does not support legacy GPIO interface.
So enable them all together.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
 board/freescale/mx6sxsabresd/mx6sxsabresd.c | 369 ++--
 configs/mx6sxsabresd_defconfig  |  12 +
 configs/mx6sxsabresd_spl_defconfig  |  12 +
 include/configs/mx6sxsabresd.h  |   7 -
 4 files changed, 149 insertions(+), 251 deletions(-)

diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c 
b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 3ad2140314..8940f37208 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -26,8 +26,6 @@
 #include 
 #include 
 #include "../common/pfuze.h"
-#include 
-#include 
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -39,11 +37,6 @@ DECLARE_GLOBAL_DATA_PTR;
PAD_CTL_PUS_22K_UP  | PAD_CTL_SPEED_LOW |   \
PAD_CTL_DSE_80ohm   | PAD_CTL_SRE_FAST  | PAD_CTL_HYS)
 
-#define I2C_PAD_CTRL(PAD_CTL_PKE | PAD_CTL_PUE |\
-   PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |   \
-   PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
-   PAD_CTL_ODE)
-
 #define ENET_PAD_CTRL  (PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \
PAD_CTL_SPEED_HIGH   |   \
PAD_CTL_DSE_48ohm   | PAD_CTL_SRE_FAST)
@@ -54,11 +47,6 @@ DECLARE_GLOBAL_DATA_PTR;
 #define ENET_RX_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |  \
PAD_CTL_SPEED_HIGH   | PAD_CTL_SRE_FAST)
 
-#define I2C_PAD_CTRL(PAD_CTL_PKE | PAD_CTL_PUE |\
-   PAD_CTL_PUS_100K_UP | PAD_CTL_SPEED_MED |   \
-   PAD_CTL_DSE_40ohm | PAD_CTL_HYS |   \
-   PAD_CTL_ODE)
-
 #define LCD_PAD_CTRL(PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \
PAD_CTL_PKE | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm)
 
@@ -74,44 +62,6 @@ static iomux_v3_cfg_t const uart1_pads[] = {
MX6_PAD_GPIO1_IO05__UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
-static iomux_v3_cfg_t const usdhc2_pads[] = {
-   MX6_PAD_SD2_CLK__USDHC2_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_CMD__USDHC2_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_DATA0__USDHC2_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_DATA1__USDHC2_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_DATA2__USDHC2_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD2_DATA3__USDHC2_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const usdhc3_pads[] = {
-   MX6_PAD_SD3_CLK__USDHC3_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_CMD__USDHC3_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA0__USDHC3_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA1__USDHC3_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA2__USDHC3_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA3__USDHC3_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA4__USDHC3_DATA4 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA5__USDHC3_DATA5 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA6__USDHC3_DATA6 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD3_DATA7__USDHC3_DATA7 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-
-   /* CD pin */
-   MX6_PAD_KEY_COL0__GPIO2_IO_10 | MUX_PAD_CTRL(NO_PAD_CTRL),
-
-   /* RST_B, used for power reset cycle */
-   MX6_PAD_KEY_COL1__GPIO2_IO_11 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
-static iomux_v3_cfg_t const usdhc4_pads[] = {
-   MX6_PAD_SD4_CLK__USDHC4_CLK | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD4_CMD__USDHC4_CMD | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD4_DATA0__USDHC4_DATA0 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD4_DATA1__USDHC4_DATA1 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD4_DATA2__USDHC4_DATA2 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD4_DATA3__USDHC4_DATA3 | MUX_PAD_CTRL(USDHC_PAD_CTRL),
-   MX6_PAD_SD4_DATA7__GPIO6_IO_21 | MUX_PAD_CTRL(NO_PAD_CTRL),
-};
-
 static iomux_v3_cfg_t const fec1_pads[] = {
MX6_PAD_ENET1_MDC__ENET1_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
MX6_PAD_ENET1_MDIO__ENET1_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL),
@@ -166,9 +116,11 @@ static int setup_fec(void)
 ARRAY_SIZE(phy_control_pads));
 
/* Enable the ENET power, active low */
+   gpio_request(IMX_GPIO_NR(2, 6), "enet_rst");
gpio_direction_output(IMX_GPIO_NR(2, 6) , 0);
 
/* Reset AR8031 PHY */
+   gpio_request(IMX_GPIO_NR(2, 7), "phy_rst");
gpio_direction_output(IMX_GPIO_NR(2, 7) , 0);
mdelay(10);
gpio_set_value(IMX_GPIO_NR(2, 7), 1);
@@ -188,86 +140,28 @@ int board_eth_init(bd_t *bis)
return cpu_eth_init(bis);
 }
 

[U-Boot] [PATCH 6/7] imx: mx6sxsabresd: config wdog pinmux

2018-01-01 Thread Peng Fan
Because kernel set WDOG_B mux before pad with the common pinctrl
framwork now and wdog reset will be triggered once set WDOG_B mux
with default pad setting, we set pad setting here to workaround this.
Since imx_iomux_v3_setup_pad also set mux before pad setting, we set
as GPIO mux firstly here to workaround it.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
 board/freescale/mx6sxsabresd/mx6sxsabresd.c | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/board/freescale/mx6sxsabresd/mx6sxsabresd.c 
b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
index 8940f37208..34371ad34a 100644
--- a/board/freescale/mx6sxsabresd/mx6sxsabresd.c
+++ b/board/freescale/mx6sxsabresd/mx6sxsabresd.c
@@ -50,6 +50,9 @@ DECLARE_GLOBAL_DATA_PTR;
 #define LCD_PAD_CTRL(PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \
PAD_CTL_PKE | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm)
 
+#define WDOG_PAD_CTRL (PAD_CTL_PUE | PAD_CTL_PKE | PAD_CTL_SPEED_MED | \
+   PAD_CTL_DSE_40ohm)
+
 int dram_init(void)
 {
gd->ram_size = imx_ddr_size();
@@ -62,6 +65,9 @@ static iomux_v3_cfg_t const uart1_pads[] = {
MX6_PAD_GPIO1_IO05__UART1_RX | MUX_PAD_CTRL(UART_PAD_CTRL),
 };
 
+static iomux_v3_cfg_t const wdog_b_pad = {
+   MX6_PAD_GPIO1_IO13__GPIO1_IO_13 | MUX_PAD_CTRL(WDOG_PAD_CTRL),
+};
 static iomux_v3_cfg_t const fec1_pads[] = {
MX6_PAD_ENET1_MDC__ENET1_MDC | MUX_PAD_CTRL(ENET_PAD_CTRL),
MX6_PAD_ENET1_MDIO__ENET1_MDIO | MUX_PAD_CTRL(ENET_PAD_CTRL),
@@ -295,6 +301,15 @@ int board_init(void)
/* Address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
 
+   /*
+* Because kernel set WDOG_B mux before pad with the common pinctrl
+* framwork now and wdog reset will be triggered once set WDOG_B mux
+* with default pad setting, we set pad setting here to workaround this.
+* Since imx_iomux_v3_setup_pad also set mux before pad setting, we set
+* as GPIO mux firstly here to workaround it.
+*/
+   imx_iomux_v3_setup_pad(wdog_b_pad);
+
/* Active high for ncp692 */
gpio_request(IMX_GPIO_NR(4, 16), "ncp692_en");
gpio_direction_output(IMX_GPIO_NR(4, 16), 1);
-- 
2.14.1

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


[U-Boot] [PATCH 4/7] pci: imx: request gpio before use

2018-01-01 Thread Peng Fan
Before use GPIO, we need to request gpio first.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
 drivers/pci/pcie_imx.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/pcie_imx.c b/drivers/pci/pcie_imx.c
index 2900c8d9d1..37a554abf2 100644
--- a/drivers/pci/pcie_imx.c
+++ b/drivers/pci/pcie_imx.c
@@ -517,6 +517,7 @@ static int imx6_pcie_init_phy(void)
 __weak int imx6_pcie_toggle_power(void)
 {
 #ifdef CONFIG_PCIE_IMX_POWER_GPIO
+   gpio_request(CONFIG_PCIE_IMX_POWER_GPIO, "pcie_reset");
gpio_direction_output(CONFIG_PCIE_IMX_POWER_GPIO, 0);
mdelay(20);
gpio_set_value(CONFIG_PCIE_IMX_POWER_GPIO, 1);
@@ -556,6 +557,7 @@ __weak int imx6_pcie_toggle_reset(void)
 * state due to being previously used in U-Boot.
 */
 #ifdef CONFIG_PCIE_IMX_PERST_GPIO
+   gpio_request(CONFIG_PCIE_IMX_PERST_GPIO, "pcie_reset");
gpio_direction_output(CONFIG_PCIE_IMX_PERST_GPIO, 0);
mdelay(20);
gpio_set_value(CONFIG_PCIE_IMX_PERST_GPIO, 1);
-- 
2.14.1

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


[U-Boot] [PATCH 3/7] board: freescale: common: add pfuze dm code

2018-01-01 Thread Peng Fan
Add pfuze dm code, this code could be enabled with CONFIG_DM_PMIC_PFUZE100.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
 board/freescale/common/Makefile |  1 +
 board/freescale/common/pfuze.c  | 79 +
 board/freescale/common/pfuze.h  |  5 +++
 3 files changed, 85 insertions(+)

diff --git a/board/freescale/common/Makefile b/board/freescale/common/Makefile
index 1c53fb605b..e13cb2063c 100644
--- a/board/freescale/common/Makefile
+++ b/board/freescale/common/Makefile
@@ -61,6 +61,7 @@ obj-$(CONFIG_VSC_CROSSBAR)+= vsc3316_3308.o
 obj-$(CONFIG_IDT8T49N222A) += idt8t49n222a_serdes_clk.o
 obj-$(CONFIG_ZM7300)   += zm7300.o
 obj-$(CONFIG_POWER_PFUZE100)   += pfuze.o
+obj-$(CONFIG_DM_PMIC_PFUZE100) += pfuze.o
 obj-$(CONFIG_POWER_MC34VR500)  += mc34vr500.o
 
 obj-$(CONFIG_LS102XA_STREAM_ID)+= ls102xa_stream_id.o
diff --git a/board/freescale/common/pfuze.c b/board/freescale/common/pfuze.c
index 69afa83562..f194d0b79d 100644
--- a/board/freescale/common/pfuze.c
+++ b/board/freescale/common/pfuze.c
@@ -92,4 +92,83 @@ struct pmic *pfuze_common_init(unsigned char i2cbus)
 
return p;
 }
+#else
+int pfuze_mode_init(struct udevice *dev, u32 mode)
+{
+   unsigned char offset, i, switch_num;
+   u32 id;
+   int ret;
+
+   id = pmic_reg_read(dev, PFUZE100_DEVICEID);
+   id = id & 0xf;
+
+   if (id == 0) {
+   switch_num = 6;
+   offset = PFUZE100_SW1CMODE;
+   } else if (id == 1) {
+   switch_num = 4;
+   offset = PFUZE100_SW2MODE;
+   } else {
+   printf("Not supported, id=%d\n", id);
+   return -EINVAL;
+   }
+
+   ret = pmic_reg_write(dev, PFUZE100_SW1ABMODE, mode);
+   if (ret < 0) {
+   printf("Set SW1AB mode error!\n");
+   return ret;
+   }
+
+   for (i = 0; i < switch_num - 1; i++) {
+   ret = pmic_reg_write(dev, offset + i * SWITCH_SIZE, mode);
+   if (ret < 0) {
+   printf("Set switch 0x%x mode error!\n",
+  offset + i * SWITCH_SIZE);
+   return ret;
+   }
+   }
+
+   return ret;
+}
+
+struct udevice *pfuze_common_init(void)
+{
+   struct udevice *dev;
+   int ret;
+   unsigned int reg, dev_id, rev_id;
+
+   ret = pmic_get("pfuze100", );
+   if (ret == -ENODEV)
+   return NULL;
+
+   dev_id = pmic_reg_read(dev, PFUZE100_DEVICEID);
+   rev_id = pmic_reg_read(dev, PFUZE100_REVID);
+   printf("PMIC: PFUZE100! DEV_ID=0x%x REV_ID=0x%x\n", dev_id, rev_id);
+
+   /* Set SW1AB stanby volage to 0.975V */
+   reg = pmic_reg_read(dev, PFUZE100_SW1ABSTBY);
+   reg &= ~SW1x_STBY_MASK;
+   reg |= SW1x_0_975V;
+   pmic_reg_write(dev, PFUZE100_SW1ABSTBY, reg);
+
+   /* Set SW1AB/VDDARM step ramp up time from 16us to 4us/25mV */
+   reg = pmic_reg_read(dev, PFUZE100_SW1ABCONF);
+   reg &= ~SW1xCONF_DVSSPEED_MASK;
+   reg |= SW1xCONF_DVSSPEED_4US;
+   pmic_reg_write(dev, PFUZE100_SW1ABCONF, reg);
+
+   /* Set SW1C standby voltage to 0.975V */
+   reg = pmic_reg_read(dev, PFUZE100_SW1CSTBY);
+   reg &= ~SW1x_STBY_MASK;
+   reg |= SW1x_0_975V;
+   pmic_reg_write(dev, PFUZE100_SW1CSTBY, reg);
+
+   /* Set SW1C/VDDSOC step ramp up time from 16us to 4us/25mV */
+   reg = pmic_reg_read(dev, PFUZE100_SW1CCONF);
+   reg &= ~SW1xCONF_DVSSPEED_MASK;
+   reg |= SW1xCONF_DVSSPEED_4US;
+   pmic_reg_write(dev, PFUZE100_SW1CCONF, reg);
+
+   return dev;
+}
 #endif
diff --git a/board/freescale/common/pfuze.h b/board/freescale/common/pfuze.h
index 53cfc99225..3f8c107f6b 100644
--- a/board/freescale/common/pfuze.h
+++ b/board/freescale/common/pfuze.h
@@ -7,7 +7,12 @@
 #ifndef __PFUZE_BOARD_HELPER__
 #define __PFUZE_BOARD_HELPER__
 
+#ifdef CONFIG_DM_PMIC_PFUZE100
+struct udevice *pfuze_common_init(void);
+int pfuze_mode_init(struct udevice *dev, u32 mode);
+#else
 struct pmic *pfuze_common_init(unsigned char i2cbus);
 int pfuze_mode_init(struct pmic *p, u32 mode);
+#endif
 
 #endif
-- 
2.14.1

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


[U-Boot] [PATCH 2/7] ARM: imx: Enable dts for i.MX6SX-SDB

2018-01-01 Thread Peng Fan
Enable DTS and OF_CONTROL for i.MX6SX-SDB.

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
 configs/mx6sxsabresd_defconfig | 3 ++-
 configs/mx6sxsabresd_spl_defconfig | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig
index b707322714..9ac5236df0 100644
--- a/configs/mx6sxsabresd_defconfig
+++ b/configs/mx6sxsabresd_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_MX6SXSABRESD=y
 # CONFIG_CMD_BMODE is not set
 CONFIG_NXP_BOARD_REVISION=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6sx-sdb"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg"
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -27,6 +28,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_PHYLIB=y
@@ -36,4 +38,3 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_VIDEO=y
-CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6sxsabresd_spl_defconfig 
b/configs/mx6sxsabresd_spl_defconfig
index 9ab4b2f006..6a1423bd0c 100644
--- a/configs/mx6sxsabresd_spl_defconfig
+++ b/configs/mx6sxsabresd_spl_defconfig
@@ -10,6 +10,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_WATCHDOG_SUPPORT=y
 # CONFIG_CMD_BMODE is not set
 CONFIG_NXP_BOARD_REVISION=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6sx-sdb"
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
 # CONFIG_CONSOLE_MUX is not set
 CONFIG_SYS_CONSOLE_IS_IN_ENV=y
@@ -36,6 +37,7 @@ CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
+CONFIG_OF_CONTROL=y
 CONFIG_SPI_FLASH=y
 CONFIG_PHYLIB=y
 CONFIG_PCI=y
@@ -44,4 +46,3 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_HOST_ETHER=y
 CONFIG_USB_ETHER_ASIX=y
 CONFIG_VIDEO=y
-CONFIG_OF_LIBFDT=y
-- 
2.14.1

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


[U-Boot] [PATCH 1/7] ARM: imx: Introduce dts for i.MX6SX-SDB

2018-01-01 Thread Peng Fan
Introduce dts from Kernel commit
commit 71ee203389f7cb1c("Merge tag 'scsi-fixes' of
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi")

Signed-off-by: Peng Fan 
Cc: Stefano Babic 
Cc: Fabio Estevam 
---
 arch/arm/dts/Makefile|   1 +
 arch/arm/dts/imx6sx-sdb.dts  | 138 ++
 arch/arm/dts/imx6sx-sdb.dtsi | 612 +++
 3 files changed, 751 insertions(+)
 create mode 100644 arch/arm/dts/imx6sx-sdb.dts
 create mode 100644 arch/arm/dts/imx6sx-sdb.dtsi

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 7b798ae738..1d201c9989 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -380,6 +380,7 @@ dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb \
imx6q-icore-rqs.dtb \
imx6q-logicpd.dtb \
imx6sx-sabreauto.dtb \
+   imx6sx-sdb.dtb \
imx6ul-geam-kit.dtb \
imx6ul-isiot-emmc.dtb \
imx6ul-isiot-mmc.dtb \
diff --git a/arch/arm/dts/imx6sx-sdb.dts b/arch/arm/dts/imx6sx-sdb.dts
new file mode 100644
index 00..6dd9bebfe0
--- /dev/null
+++ b/arch/arm/dts/imx6sx-sdb.dts
@@ -0,0 +1,138 @@
+/*
+ * Copyright (C) 2015 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "imx6sx-sdb.dtsi"
+
+/ {
+   model = "Freescale i.MX6 SoloX SDB RevB Board";
+};
+
+ {
+   clock-frequency = <10>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_i2c1>;
+   status = "okay";
+
+   pmic: pfuze100@8 {
+   compatible = "fsl,pfuze200";
+   reg = <0x08>;
+
+   regulators {
+   sw1a_reg: sw1ab {
+   regulator-min-microvolt = <30>;
+   regulator-max-microvolt = <1875000>;
+   regulator-boot-on;
+   regulator-always-on;
+   regulator-ramp-delay = <6250>;
+   };
+
+   sw2_reg: sw2 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <330>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   sw3a_reg: sw3a {
+   regulator-min-microvolt = <40>;
+   regulator-max-microvolt = <1975000>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   sw3b_reg: sw3b {
+   regulator-min-microvolt = <40>;
+   regulator-max-microvolt = <1975000>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   swbst_reg: swbst {
+   regulator-min-microvolt = <500>;
+   regulator-max-microvolt = <515>;
+   };
+
+   snvs_reg: vsnvs {
+   regulator-min-microvolt = <100>;
+   regulator-max-microvolt = <300>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   vref_reg: vrefddr {
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   vgen1_reg: vgen1 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <155>;
+   regulator-always-on;
+   };
+
+   vgen2_reg: vgen2 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <155>;
+   };
+
+   vgen3_reg: vgen3 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+   regulator-always-on;
+   };
+
+   vgen4_reg: vgen4 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+   regulator-always-on;
+   };
+
+   vgen5_reg: vgen5 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+   

Re: [U-Boot] U-Boot and Builman Toolchains

2018-01-01 Thread Tom Rini
On Sat, Dec 30, 2017 at 08:08:39AM -0600, Adam Ford wrote:

> Tom,
> 
> I know that we need GCC 6 or newer to compile GCC, but buildman is
> still using older toolchains.
> 
> Do you know if there are plans to update buildman to use newer
> toolchains?  It seems to be linked to kernel.org, but it seems strange
> to me to have the build-in tools like Buildman use a toolchain that we
> are not allowed to use for compile.

So, there've been some effort to make buildman fetch toolchains from the
free-electrons toolchain site, but they're not going to be ready for
v2018.01.  I should note in the release email that if nothing else, the
Linaro toolchains are available via tarball in a static manner as it's
what travis uses.

-- 
Tom


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


Re: [U-Boot] [PATCH] mx6: ddr: Do not access MMDC_P1_BASE_ADDR on i.MX6ULL

2018-01-01 Thread Peng Fan


> -Original Message-
> From: Fabio Estevam [mailto:feste...@gmail.com]
> Sent: Tuesday, January 02, 2018 8:52 AM
> To: sba...@denx.de
> Cc: u-boot@lists.denx.de; ste...@agner.ch; Peng Fan ;
> Fabio Estevam 
> Subject: [PATCH] mx6: ddr: Do not access MMDC_P1_BASE_ADDR on i.MX6ULL
> 
> From: Fabio Estevam 
> 
> i.MX6ULL also does not have a MMDC_P1_BASE_ADDR, so do not try to access
> it.
> 
> Signed-off-by: Fabio Estevam 
> ---
>  arch/arm/mach-imx/mx6/ddr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c
> index 52a9a25..39dbd2f 100644
> --- a/arch/arm/mach-imx/mx6/ddr.c
> +++ b/arch/arm/mach-imx/mx6/ddr.c
> @@ -908,7 +908,7 @@ void mx6sdl_dram_iocfg(unsigned width,  #define
> MR(val, ba, cmd, cs1) \
>   ((val << 16) | (1 << 15) | (cmd << 4) | (cs1 << 3) | ba)
>  #define MMDC1(entry, value) do {   \
> - if (!is_mx6sx() && !is_mx6ul() && !is_mx6sl())\
> + if (!is_mx6sx() && !is_mx6ul() && !is_mx6ull() && !is_mx6sl())\
>   mmdc1->entry = value; \
>   } while (0)
> 
> @@ -1215,7 +1215,7 @@ void mx6_ddr3_cfg(const struct mx6_ddr_sysinfo
> *sysinfo,
>   u16 mem_speed = ddr3_cfg->mem_speed;
> 
>   mmdc0 = (struct mmdc_p_regs *)MMDC_P0_BASE_ADDR;
> - if (!is_mx6sx() && !is_mx6ul() && !is_mx6sl())
> + if (!is_mx6sx() && !is_mx6ul() && !is_mx6ull() && !is_mx6sl())
>   mmdc1 = (struct mmdc_p_regs *)MMDC_P1_BASE_ADDR;

Reviewed-by: Peng Fan 

> 
>   /* Limit mem_speed for MX6D/MX6Q */
> --
> 2.7.4

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


[U-Boot] [PATCH] mx6: ddr: Do not access MMDC_P1_BASE_ADDR on i.MX6ULL

2018-01-01 Thread Fabio Estevam
From: Fabio Estevam 

i.MX6ULL also does not have a MMDC_P1_BASE_ADDR, so do not try to
access it.

Signed-off-by: Fabio Estevam 
---
 arch/arm/mach-imx/mx6/ddr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/mx6/ddr.c b/arch/arm/mach-imx/mx6/ddr.c
index 52a9a25..39dbd2f 100644
--- a/arch/arm/mach-imx/mx6/ddr.c
+++ b/arch/arm/mach-imx/mx6/ddr.c
@@ -908,7 +908,7 @@ void mx6sdl_dram_iocfg(unsigned width,
 #define MR(val, ba, cmd, cs1) \
((val << 16) | (1 << 15) | (cmd << 4) | (cs1 << 3) | ba)
 #define MMDC1(entry, value) do { \
-   if (!is_mx6sx() && !is_mx6ul() && !is_mx6sl())\
+   if (!is_mx6sx() && !is_mx6ul() && !is_mx6ull() && !is_mx6sl())\
mmdc1->entry = value; \
} while (0)
 
@@ -1215,7 +1215,7 @@ void mx6_ddr3_cfg(const struct mx6_ddr_sysinfo *sysinfo,
u16 mem_speed = ddr3_cfg->mem_speed;
 
mmdc0 = (struct mmdc_p_regs *)MMDC_P0_BASE_ADDR;
-   if (!is_mx6sx() && !is_mx6ul() && !is_mx6sl())
+   if (!is_mx6sx() && !is_mx6ul() && !is_mx6ull() && !is_mx6sl())
mmdc1 = (struct mmdc_p_regs *)MMDC_P1_BASE_ADDR;
 
/* Limit mem_speed for MX6D/MX6Q */
-- 
2.7.4

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


[U-Boot] [ANN] U-Boot v2018.01-rc3 released

2018-01-01 Thread Tom Rini
Hey all,

It's late in the day, but it's still release day and I've put
v2018.01-rc3 out.  There's a few more fixes that are going to come in,
but as things stand, release is looking to be on track for January 8th.
Thanks all!

-- 
Tom


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


Re: [U-Boot] configs: am335x_boneblack: Bring back missed bootcmd

2018-01-01 Thread Tom Rini
On Thu, Dec 28, 2017 at 11:03:25PM +0200, Sam Protsenko wrote:

> Commit b6251db8c3f0 ("Kconfig: Introduce USE_BOOTCOMMAND and migrate
> BOOTCOMMAND") removed CONFIG_BOOTCOMMAND option from
> include/configs/am335x_evm.h file. But that option wasn't added to
> defconfig files for BeagleBone Black board.
> 
> Because of this we can't boot Linux from SD card using just
> "run bootcmd", getting next error:
> 
> ** File not found /boot/undefined **
> 
> That's because "fdtfile" variable has "undefined" value by default, and
> "bootcmd" doesn't call "run findfdt" command, which assigns "fdtfile" to
> correct device tree file for current board name (obtained from EEPROM).
> 
> So we are forced to either call "run findfdt" command manually, or
> assign manually "fdtfile=am335x-boneblack.dtb" (e.g. in uEnv.txt file).
> 
> Bring back CONFIG_BOOTCOMMAND to BBB defconfigs so that we can boot
> Linux rootfs from SD card automatically without any addition actions.
> 
> Signed-off-by: Sam Protsenko 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, v4, 2/3] ARM: dts: omap3-evm: Enable DM and devicetree for TMDSEVM{3530, 3730}

2018-01-01 Thread Tom Rini
On Wed, Dec 27, 2017 at 09:40:16AM -0600, Derald D. Woods wrote:

> This commit updates the configuration files needed to support OF_CONTROL
> on the OMAP3 EVM baseboard.
> 
> Additionally:
> - CONFIG_SYS_THUMB_BUILD is enabled
> - CONFIG_SPL_ENV_SUPPORT is enabled
> 
> Tested using GCC 7.2.0 [--with-float=hard --with-mode=thumb].
> 
> Signed-off-by: Derald D. Woods 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] ARM: omap3: evm: Do not relocate FDT address

2018-01-01 Thread Tom Rini
On Thu, Dec 28, 2017 at 01:25:43AM -0600, Derald D. Woods wrote:

> This commit keeps the 'fdtaddr' as provided by DEFAULT_LINUX_BOOT_ENV.
> 
> Signed-off-by: Derald D. Woods 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] power: tps65910: replace error() by pr_err()

2018-01-01 Thread Tom Rini
On Mon, Dec 18, 2017 at 03:38:28PM +0100, Felix Brack wrote:

> The patch replaces the former error() by the new pr_err().
> This makes the TPS65910 driver conform to Masahiro's patch
> 'treewide:replace with error() with pr_err()' introduced
> October 2017.
> 
> Signed-off-by: Felix Brack 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 1/1] dm: core: remove orphaned parameter description in platdata.h

2018-01-01 Thread Tom Rini
On Sun, Dec 24, 2017 at 01:14:12PM +0100, Heinrich Schuchardt wrote:

> struct driver_info has no field 'flags'.
> 
> Signed-off-by: Heinrich Schuchardt 
> Reviewed-by: Simon Glass 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 3/3] ARM: omap3: evm: Refactor 'board_eth_init'

2018-01-01 Thread Tom Rini
On Sat, Dec 16, 2017 at 02:14:50PM -0600, Derald D. Woods wrote:

> This commit clears 'ethaddr' before calling 'smc911x_initialize' to
> allow the SROM MAC address to be assigned properly.
> 
> Signed-off-by: Derald D. Woods 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [PULL] Please pull u-boot-rockchip/master

2018-01-01 Thread Tom Rini
On Mon, Jan 01, 2018 at 02:50:47PM +0100, Dr. Philipp Tomsich wrote:

> Tom,
> 
> We have two minor config-fixes for the upcoming release on the Rockchip side 
> for you.
> Travis-CI (prior to the rebase): 
> https://travis-ci.org/ptomsich/u-boot-rockchip/builds/322304850
> 
> I expect to send another pull-request later this week with two more 
> stabilisation fixes
> (RK3368-uQ7 environment location & backward-compatibility with ATF versions 
> that
> have broken parameter validation on the platform-specific data structure).

OK, thanks for the heads up.

> 
> Best regards,
> Philipp.
> 
> 
> 
> The following changes since commit 3bb6dc04a9b78c3db7c130bea7e817d77add275e:
> 
>   Merge git://git.denx.de/u-boot-imx (2017-12-29 09:27:04 -0500)
> 
> are available in the git repository at:
> 
>   git://git.denx.de/u-boot-rockchip.git master
> 
> for you to fetch changes up to f777df3628c544d2f982cbb631fbd053f4072955:
> 
>   rockchip: dts: rk3399-evb: support boot from sd-card (2018-01-01 14:45:37 
> +0100)
> 

Applied to u-boot/master, thanks!

-- 
Tom


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


Re: [U-Boot] [U-Boot, 1/3] ARM: dts: omap3-evm: Add support for TMDSEVM{3530, 3730}

2018-01-01 Thread Tom Rini
On Sat, Dec 16, 2017 at 02:14:48PM -0600, Derald D. Woods wrote:

> This commit adds OMAP3 EVM devicetree files from Linux v4.15-rc3. Note
> that this is the first addition of OMAP34XX devicetree files.
> 
> Signed-off-by: Derald D. Woods 

Applied to u-boot/master, thanks!

-- 
Tom


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


[U-Boot] [PATCH 3/3] imx: initialize and use generic timer on i.MX 6UL/ULL

2018-01-01 Thread Stefan Agner
The i.MX 6UL/ULL feature a Cortex-A7 CPU which suppor the ARM
generic timer. This change makes use of the ARM generic timer in
U-Boot.

This is crucial to make the ARM generic timers usable in Linux since
timer_init() initalizes the system counter module, which is necessary
to use the generic timers CP15 registers.

Signed-off-by: Stefan Agner 
---

 arch/arm/include/asm/arch-mx6/imx-regs.h | 1 +
 arch/arm/mach-imx/Makefile   | 2 +-
 arch/arm/mach-imx/mx6/Kconfig| 4 +++-
 include/configs/mx6_common.h | 5 -
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h 
b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 4be7aab18a..48ce0edd06 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -291,6 +291,7 @@
 #endif
 #define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5)
 #if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
+#define SCTR_BASE_ADDR  (AIPS2_OFF_BASE_ADDR + 0x5C000)
 #define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x6)
 #define UART6_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000)
 #elif defined(CONFIG_MX6SX)
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 9322c1ce83..d7966cfd4a 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -22,7 +22,6 @@ endif
 ifeq ($(SOC),$(filter $(SOC),mx7))
 obj-y  += cpu.o
 obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
-obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o
 endif
 ifeq ($(SOC),$(filter $(SOC),mx6 mx7))
 obj-y  += cache.o init.o
@@ -31,6 +30,7 @@ obj-$(CONFIG_IMX_VIDEO_SKIP) += video.o
 obj-$(CONFIG_IMX_RDC) += rdc-sema.o
 obj-$(CONFIG_IMX_BOOTAUX) += imx_bootaux.o
 obj-$(CONFIG_SECURE_BOOT)+= hab.o
+obj-$(CONFIG_SYSCOUNTER_TIMER) += syscounter.o
 endif
 ifeq ($(SOC),$(filter $(SOC),mx7ulp))
 obj-y  += cache.o
diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 1af60df8d8..86b80ca576 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -9,7 +9,7 @@ config MX6_SMP
 
 config MX6
select ARM_ERRATA_743622 if !MX6UL && !MX6ULL
-   select GPT_TIMER
+   select GPT_TIMER if !MX6UL && !MX6ULL
bool
default y
imply CMD_FUSE
@@ -54,6 +54,7 @@ config MX6UL
select HAS_CAAM
select SYS_L2CACHE_OFF
select ROM_UNIFIED_SECTIONS
+   select SYSCOUNTER_TIMER
bool
 
 config MX6UL_LITESOM
@@ -76,6 +77,7 @@ config MX6UL_OPOS6UL
 config MX6ULL
select SYS_L2CACHE_OFF
select ROM_UNIFIED_SECTIONS
+   select SYSCOUNTER_TIMER
bool
 
 config MX6_DDRCAL
diff --git a/include/configs/mx6_common.h b/include/configs/mx6_common.h
index 59e6daea62..ddc645c136 100644
--- a/include/configs/mx6_common.h
+++ b/include/configs/mx6_common.h
@@ -7,7 +7,10 @@
 #ifndef __MX6_COMMON_H
 #define __MX6_COMMON_H
 
-#if !(defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
+#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
+#define CONFIG_SC_TIMER_CLK 800 /* 8Mhz */
+#define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK
+#else
 #ifndef CONFIG_SYS_L2CACHE_OFF
 #define CONFIG_SYS_L2_PL310
 #define CONFIG_SYS_PL310_BASE  L2_PL310_BASE
-- 
2.15.1

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


[U-Boot] [PATCH 1/3] imx: move CONFIG_SYSCOUNTER_TIMER to Kconfig

2018-01-01 Thread Stefan Agner
Signed-off-by: Stefan Agner 
---

 arch/arm/mach-imx/Kconfig | 3 +++
 arch/arm/mach-imx/mx7/Kconfig | 1 +
 include/configs/mx7_common.h  | 1 -
 scripts/config_whitelist.txt  | 1 -
 4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index e687048b31..653819123c 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -7,6 +7,9 @@ config IMX_CONFIG
 config ROM_UNIFIED_SECTIONS
bool
 
+config SYSCOUNTER_TIMER
+   bool
+
 config IMX_RDC
bool "i.MX Resource domain controller driver"
depends on ARCH_MX6 || ARCH_MX7
diff --git a/arch/arm/mach-imx/mx7/Kconfig b/arch/arm/mach-imx/mx7/Kconfig
index 4f8b4e138e..2a3db860bb 100644
--- a/arch/arm/mach-imx/mx7/Kconfig
+++ b/arch/arm/mach-imx/mx7/Kconfig
@@ -3,6 +3,7 @@ if ARCH_MX7
 config MX7
bool
select ROM_UNIFIED_SECTIONS
+   select SYSCOUNTER_TIMER
select CPU_V7_HAS_VIRT
select CPU_V7_HAS_NONSEC
select ARCH_SUPPORT_PSCI
diff --git a/include/configs/mx7_common.h b/include/configs/mx7_common.h
index 16e4d95ff4..17850400c1 100644
--- a/include/configs/mx7_common.h
+++ b/include/configs/mx7_common.h
@@ -19,7 +19,6 @@
 
 /* Timer settings */
 #define CONFIG_MXC_GPT_HCLK
-#define CONFIG_SYSCOUNTER_TIMER
 #define CONFIG_SC_TIMER_CLK 800 /* 8Mhz */
 #define COUNTER_FREQUENCY CONFIG_SC_TIMER_CLK
 #define CONFIG_SYS_FSL_CLK
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 43a4ff0892..5d8d907cc4 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2219,7 +2219,6 @@ CONFIG_SUPPORT_RAW_INITRD
 CONFIG_SUPPORT_VFAT
 CONFIG_SUVD3
 CONFIG_SXNI855T
-CONFIG_SYSCOUNTER_TIMER
 CONFIG_SYSFLAGS_ADDR
 CONFIG_SYSFS
 CONFIG_SYSMGR_ISWGRP_HANDOFF
-- 
2.15.1

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


[U-Boot] [PATCH 2/3] imx: introduce CONFIG_GPT_TIMER

2018-01-01 Thread Stefan Agner
Introduce a new config symbol to select the i.MX
General Purpose Timer (GPT).

Signed-off-by: Stefan Agner 
---

 arch/arm/mach-imx/Kconfig | 3 +++
 arch/arm/mach-imx/Makefile| 3 ++-
 arch/arm/mach-imx/mx5/Kconfig | 1 +
 arch/arm/mach-imx/mx6/Kconfig | 1 +
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 653819123c..3aec89d440 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -10,6 +10,9 @@ config ROM_UNIFIED_SECTIONS
 config SYSCOUNTER_TIMER
bool
 
+config GPT_TIMER
+   bool
+
 config IMX_RDC
bool "i.MX Resource domain controller driver"
depends on ARCH_MX6 || ARCH_MX7
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index d77c10e176..9322c1ce83 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -11,7 +11,8 @@ ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 mx7 vf610))
 obj-y  = iomux-v3.o
 endif
 ifeq ($(SOC),$(filter $(SOC),mx5 mx6))
-obj-y  += timer.o cpu.o speed.o
+obj-y  += cpu.o speed.o
+obj-$(CONFIG_GPT_TIMER) += timer.o
 obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o
 endif
 ifeq ($(SOC),$(filter $(SOC),mx7 mx6 mxs))
diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig
index 250194b623..735cd240f1 100644
--- a/arch/arm/mach-imx/mx5/Kconfig
+++ b/arch/arm/mach-imx/mx5/Kconfig
@@ -1,6 +1,7 @@
 if ARCH_MX5
 
 config MX5
+   GPT_TIMER
bool
default y
 
diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index 752471fb72..1af60df8d8 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -9,6 +9,7 @@ config MX6_SMP
 
 config MX6
select ARM_ERRATA_743622 if !MX6UL && !MX6ULL
+   select GPT_TIMER
bool
default y
imply CMD_FUSE
-- 
2.15.1

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


Re: [U-Boot] [PATCH] mx6ull: Handle the CONFIG_MX6ULL cases correctly

2018-01-01 Thread Fabio Estevam
On Mon, Jan 1, 2018 at 10:01 PM, Stefan Agner  wrote:

> Found one more:

Thanks, Stefan. Sent a v2 with your feedback into account.
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v2] mx6ull: Handle the CONFIG_MX6ULL cases correctly

2018-01-01 Thread Fabio Estevam
From: Fabio Estevam 

Since commit 051ba9e082f7 ("Kconfig: mx6ull: Deselect MX6UL from
CONFIG_MX6ULL") CONFIG_MX6ULL does not select CONFIG_MX6UL anymore, so
take this into consideration in all the checks for CONFIG_MX6UL.

Reported-by: Stefan Agner 
Signed-off-by: Fabio Estevam 
Reviewed-by: Stefan Agner 
---
Changes since v1:
- Improve the ordering of the defines (Stefan)
- Also change arch/arm/mach-imx/mx6/Kconfig (Stefan)
- Make checkpatch happy

 arch/arm/include/asm/arch-mx6/imx-regs.h   | 23 +--
 arch/arm/include/asm/arch-mx6/mx6-ddr.h|  2 +-
 arch/arm/include/asm/arch-mx6/mx6ul-ddr.h  |  2 +-
 arch/arm/include/asm/mach-imx/iomux-v3.h   |  4 ++--
 arch/arm/include/asm/mach-imx/regs-lcdif.h | 19 +--
 arch/arm/mach-imx/mx6/Kconfig  |  2 +-
 arch/arm/mach-imx/mx6/ddr.c|  2 +-
 drivers/gpio/mxc_gpio.c|  4 ++--
 include/configs/mx6_common.h   |  7 ---
 9 files changed, 38 insertions(+), 27 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h 
b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 7736b6a..4be7aab 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -17,7 +17,7 @@
 #define GPU_2D_ARB_END_ADDR 0x02203FFF
 #define OPENVG_ARB_BASE_ADDR0x02204000
 #define OPENVG_ARB_END_ADDR 0x02207FFF
-#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
+#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || 
defined(CONFIG_MX6ULL))
 #define CAAM_ARB_BASE_ADDR  0x0010
 #define CAAM_ARB_END_ADDR   0x00107FFF
 #define GPU_ARB_BASE_ADDR   0x0180
@@ -46,7 +46,8 @@
 #define MXS_BCH_BASE   (APBH_DMA_ARB_BASE_ADDR + 0x04000)
 
 /* GPV - PL301 configuration ports */
-#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
+#if (defined(CONFIG_MX6SX) || \
+   defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) || \
defined(CONFIG_MX6SL) || defined(CONFIG_MX6SLL))
 #define GPV2_BASE_ADDR  0x00D0
 #define GPV3_BASE_ADDR 0x00E0
@@ -88,7 +89,7 @@
 #define QSPI0_AMBA_END 0x6FFF
 #define QSPI1_AMBA_BASE0x7000
 #define QSPI1_AMBA_END 0x7FFF
-#elif defined(CONFIG_MX6UL)
+#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define WEIM_ARB_BASE_ADDR  0x5000
 #define WEIM_ARB_END_ADDR   0x57FF
 #define QSPI0_AMBA_BASE 0x6000
@@ -109,7 +110,8 @@
 #endif
 
 #if (defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL) || \
-   defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
+   defined(CONFIG_MX6SX) || \
+   defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define MMDC0_ARB_BASE_ADDR 0x8000
 #define MMDC0_ARB_END_ADDR  0x
 #define MMDC1_ARB_BASE_ADDR 0xC000
@@ -262,7 +264,7 @@
 #define MMDC_P0_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x3)
 /* i.MX6SL/SLL */
 #define RNGB_IPS_BASE_ADDR  (AIPS2_OFF_BASE_ADDR + 0x34000)
-#ifdef CONFIG_MX6UL
+#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define ENET2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000)
 #else
 /* i.MX6SX */
@@ -288,7 +290,7 @@
 #define IP2APB_PERFMON3_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x4C000)
 #endif
 #define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5)
-#ifdef CONFIG_MX6UL
+#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x6)
 #define UART6_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000)
 #elif defined(CONFIG_MX6SX)
@@ -337,7 +339,7 @@
 #define PWM6_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xA8000)
 #define PWM7_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xAC000)
 #define PWM8_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xB)
-#elif defined(CONFIG_MX6ULL)
+#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define AIPS3_CONFIG_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x7C000)
 #define DCP_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x8)
 #define RNGB_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x84000)
@@ -354,7 +356,8 @@
 #define MX6SX_LCDIF1_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x2)
 #define MX6SX_WDOG3_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x88000)
 
-#if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
+#if !(defined(CONFIG_MX6SX) || \
+   defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) || \
defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL))
 #define IRAM_SIZE0x0004
 #else
@@ -573,7 +576,7 @@ struct src {
 #define IOMUXC_GPR12_LOS_LEVEL (0x1f << 4)
 
 struct iomuxc {
-#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
  

Re: [U-Boot] [PATCH] mx6ull: Handle the CONFIG_MX6ULL cases correctly

2018-01-01 Thread Stefan Agner
On 2018-01-01 23:29, Fabio Estevam wrote:
> From: Fabio Estevam 
> 
> Since commit 051ba9e082f7 ("Kconfig: mx6ull: Deselect MX6UL from
> CONFIG_MX6ULL") CONFIG_MX6ULL does not select CONFIG_MX6UL anymore, so
> take this into consideration in all the checks for CONFIG_MX6UL.

Found one more:

--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -8,7 +8,7 @@ config MX6_SMP
bool
 
 config MX6
-   select ARM_ERRATA_743622 if !MX6UL
+   select ARM_ERRATA_743622 if !MX6UL && ! MX6ULL
bool
default y
imply CMD_FUSE


--
Stefan

> 
> Reported-by: Stefan Agner 
> Signed-off-by: Fabio Estevam 
> ---
>  arch/arm/include/asm/arch-mx6/imx-regs.h   | 20 ++--
>  arch/arm/include/asm/arch-mx6/mx6-ddr.h|  2 +-
>  arch/arm/include/asm/arch-mx6/mx6ul-ddr.h  |  2 +-
>  arch/arm/include/asm/mach-imx/iomux-v3.h   |  4 ++--
>  arch/arm/include/asm/mach-imx/regs-lcdif.h |  9 ++---
>  arch/arm/mach-imx/mx6/ddr.c|  2 +-
>  drivers/gpio/mxc_gpio.c|  4 ++--
>  include/configs/mx6_common.h   |  4 ++--
>  8 files changed, 25 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
> b/arch/arm/include/asm/arch-mx6/imx-regs.h
> index 7736b6a..8c7ff6a 100644
> --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
> @@ -17,7 +17,7 @@
>  #define GPU_2D_ARB_END_ADDR 0x02203FFF
>  #define OPENVG_ARB_BASE_ADDR0x02204000
>  #define OPENVG_ARB_END_ADDR 0x02207FFF
> -#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
> +#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) ||
> defined(CONFIG_MX6ULL))
>  #define CAAM_ARB_BASE_ADDR  0x0010
>  #define CAAM_ARB_END_ADDR   0x00107FFF
>  #define GPU_ARB_BASE_ADDR   0x0180
> @@ -46,7 +46,7 @@
>  #define MXS_BCH_BASE (APBH_DMA_ARB_BASE_ADDR + 0x04000)
>  
>  /* GPV - PL301 configuration ports */
> -#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
> +#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) ||
> defined(CONFIG_MX6ULL) || \
>   defined(CONFIG_MX6SL) || defined(CONFIG_MX6SLL))
>  #define GPV2_BASE_ADDR  0x00D0
>  #define GPV3_BASE_ADDR   0x00E0
> @@ -88,7 +88,7 @@
>  #define QSPI0_AMBA_END 0x6FFF
>  #define QSPI1_AMBA_BASE0x7000
>  #define QSPI1_AMBA_END 0x7FFF
> -#elif defined(CONFIG_MX6UL)
> +#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define WEIM_ARB_BASE_ADDR  0x5000
>  #define WEIM_ARB_END_ADDR   0x57FF
>  #define QSPI0_AMBA_BASE 0x6000
> @@ -109,7 +109,7 @@
>  #endif
>  
>  #if (defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL) || \
> - defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
> + defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || 
> defined(CONFIG_MX6ULL))
>  #define MMDC0_ARB_BASE_ADDR 0x8000
>  #define MMDC0_ARB_END_ADDR  0x
>  #define MMDC1_ARB_BASE_ADDR 0xC000
> @@ -262,7 +262,7 @@
>  #define MMDC_P0_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x3)
>  /* i.MX6SL/SLL */
>  #define RNGB_IPS_BASE_ADDR  (AIPS2_OFF_BASE_ADDR + 0x34000)
> -#ifdef CONFIG_MX6UL
> +#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define ENET2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000)
>  #else
>  /* i.MX6SX */
> @@ -288,7 +288,7 @@
>  #define IP2APB_PERFMON3_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x4C000)
>  #endif
>  #define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5)
> -#ifdef CONFIG_MX6UL
> +#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x6)
>  #define UART6_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000)
>  #elif defined(CONFIG_MX6SX)
> @@ -337,7 +337,7 @@
>  #define PWM6_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xA8000)
>  #define PWM7_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xAC000)
>  #define PWM8_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xB)
> -#elif defined(CONFIG_MX6ULL)
> +#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define AIPS3_CONFIG_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x7C000)
>  #define DCP_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x8)
>  #define RNGB_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x84000)
> @@ -354,7 +354,7 @@
>  #define MX6SX_LCDIF1_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x2)
>  #define MX6SX_WDOG3_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x88000)
>  
> -#if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
> +#if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) ||
> defined(CONFIG_MX6ULL) || \
>   defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL))
>  #define IRAM_SIZE

Re: [U-Boot] [PATCH] mx6ull: Handle the CONFIG_MX6ULL cases correctly

2018-01-01 Thread Stefan Agner
Hi Fabio,

On 2018-01-01 23:29, Fabio Estevam wrote:
> From: Fabio Estevam 
> 
> Since commit 051ba9e082f7 ("Kconfig: mx6ull: Deselect MX6UL from
> CONFIG_MX6ULL") CONFIG_MX6ULL does not select CONFIG_MX6UL anymore, so
> take this into consideration in all the checks for CONFIG_MX6UL.

Those changes seem to cover it.

Reviewed-by: Stefan Agner 

One minor nit below.


> 
> Reported-by: Stefan Agner 
> Signed-off-by: Fabio Estevam 
> ---
>  arch/arm/include/asm/arch-mx6/imx-regs.h   | 20 ++--
>  arch/arm/include/asm/arch-mx6/mx6-ddr.h|  2 +-
>  arch/arm/include/asm/arch-mx6/mx6ul-ddr.h  |  2 +-
>  arch/arm/include/asm/mach-imx/iomux-v3.h   |  4 ++--
>  arch/arm/include/asm/mach-imx/regs-lcdif.h |  9 ++---
>  arch/arm/mach-imx/mx6/ddr.c|  2 +-
>  drivers/gpio/mxc_gpio.c|  4 ++--
>  include/configs/mx6_common.h   |  4 ++--
>  8 files changed, 25 insertions(+), 22 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h
> b/arch/arm/include/asm/arch-mx6/imx-regs.h
> index 7736b6a..8c7ff6a 100644
> --- a/arch/arm/include/asm/arch-mx6/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
> @@ -17,7 +17,7 @@
>  #define GPU_2D_ARB_END_ADDR 0x02203FFF
>  #define OPENVG_ARB_BASE_ADDR0x02204000
>  #define OPENVG_ARB_END_ADDR 0x02207FFF
> -#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
> +#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) ||
> defined(CONFIG_MX6ULL))
>  #define CAAM_ARB_BASE_ADDR  0x0010
>  #define CAAM_ARB_END_ADDR   0x00107FFF
>  #define GPU_ARB_BASE_ADDR   0x0180
> @@ -46,7 +46,7 @@
>  #define MXS_BCH_BASE (APBH_DMA_ARB_BASE_ADDR + 0x04000)
>  
>  /* GPV - PL301 configuration ports */
> -#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
> +#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) ||
> defined(CONFIG_MX6ULL) || \
>   defined(CONFIG_MX6SL) || defined(CONFIG_MX6SLL))
>  #define GPV2_BASE_ADDR  0x00D0
>  #define GPV3_BASE_ADDR   0x00E0
> @@ -88,7 +88,7 @@
>  #define QSPI0_AMBA_END 0x6FFF
>  #define QSPI1_AMBA_BASE0x7000
>  #define QSPI1_AMBA_END 0x7FFF
> -#elif defined(CONFIG_MX6UL)
> +#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define WEIM_ARB_BASE_ADDR  0x5000
>  #define WEIM_ARB_END_ADDR   0x57FF
>  #define QSPI0_AMBA_BASE 0x6000
> @@ -109,7 +109,7 @@
>  #endif
>  
>  #if (defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL) || \
> - defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
> + defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || 
> defined(CONFIG_MX6ULL))
>  #define MMDC0_ARB_BASE_ADDR 0x8000
>  #define MMDC0_ARB_END_ADDR  0x
>  #define MMDC1_ARB_BASE_ADDR 0xC000
> @@ -262,7 +262,7 @@
>  #define MMDC_P0_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x3)
>  /* i.MX6SL/SLL */
>  #define RNGB_IPS_BASE_ADDR  (AIPS2_OFF_BASE_ADDR + 0x34000)
> -#ifdef CONFIG_MX6UL
> +#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define ENET2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000)
>  #else
>  /* i.MX6SX */
> @@ -288,7 +288,7 @@
>  #define IP2APB_PERFMON3_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x4C000)
>  #endif
>  #define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5)
> -#ifdef CONFIG_MX6UL
> +#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x6)
>  #define UART6_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000)
>  #elif defined(CONFIG_MX6SX)
> @@ -337,7 +337,7 @@
>  #define PWM6_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xA8000)
>  #define PWM7_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xAC000)
>  #define PWM8_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xB)
> -#elif defined(CONFIG_MX6ULL)
> +#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
>  #define AIPS3_CONFIG_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x7C000)
>  #define DCP_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x8)
>  #define RNGB_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x84000)
> @@ -354,7 +354,7 @@
>  #define MX6SX_LCDIF1_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x2)
>  #define MX6SX_WDOG3_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x88000)
>  
> -#if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
> +#if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) ||
> defined(CONFIG_MX6ULL) || \
>   defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL))
>  #define IRAM_SIZE0x0004
>  #else
> @@ -573,7 +573,7 @@ struct src {
>  #define IOMUXC_GPR12_LOS_LEVEL   (0x1f << 4)
>  
>  struct iomuxc {
> -#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
> 

Re: [U-Boot] [PATCH 4/5] Kconfig: mx6ull: Deselect MX6UL from CONFIG_MX6ULL

2018-01-01 Thread Fabio Estevam
Hi Stefan,

On Mon, Jan 1, 2018 at 7:53 PM, Stefan Agner  wrote:
>
> While I agree with the idea of the change in general, it must be done
> more carefully! There are several places where we rely that
> CONFIG_MX6ULL selects CONFIG_MX6ULL, e.g.
> include/configs/mx6_common.h
> arch/arm/include/asm/arch-mx6/imx-regs.h
> arch/arm/include/asm/mach-imx/regs-lcdif.h
>
> I see that this patch already got merged... So I guess we either fix all
> those places before the release, or we revert this patch...

You are right.

I have just sent a patch for this issue.

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


[U-Boot] [PATCH] mx6ull: Handle the CONFIG_MX6ULL cases correctly

2018-01-01 Thread Fabio Estevam
From: Fabio Estevam 

Since commit 051ba9e082f7 ("Kconfig: mx6ull: Deselect MX6UL from
CONFIG_MX6ULL") CONFIG_MX6ULL does not select CONFIG_MX6UL anymore, so
take this into consideration in all the checks for CONFIG_MX6UL.

Reported-by: Stefan Agner 
Signed-off-by: Fabio Estevam 
---
 arch/arm/include/asm/arch-mx6/imx-regs.h   | 20 ++--
 arch/arm/include/asm/arch-mx6/mx6-ddr.h|  2 +-
 arch/arm/include/asm/arch-mx6/mx6ul-ddr.h  |  2 +-
 arch/arm/include/asm/mach-imx/iomux-v3.h   |  4 ++--
 arch/arm/include/asm/mach-imx/regs-lcdif.h |  9 ++---
 arch/arm/mach-imx/mx6/ddr.c|  2 +-
 drivers/gpio/mxc_gpio.c|  4 ++--
 include/configs/mx6_common.h   |  4 ++--
 8 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx6/imx-regs.h 
b/arch/arm/include/asm/arch-mx6/imx-regs.h
index 7736b6a..8c7ff6a 100644
--- a/arch/arm/include/asm/arch-mx6/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx6/imx-regs.h
@@ -17,7 +17,7 @@
 #define GPU_2D_ARB_END_ADDR 0x02203FFF
 #define OPENVG_ARB_BASE_ADDR0x02204000
 #define OPENVG_ARB_END_ADDR 0x02207FFF
-#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
+#elif (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || 
defined(CONFIG_MX6ULL))
 #define CAAM_ARB_BASE_ADDR  0x0010
 #define CAAM_ARB_END_ADDR   0x00107FFF
 #define GPU_ARB_BASE_ADDR   0x0180
@@ -46,7 +46,7 @@
 #define MXS_BCH_BASE   (APBH_DMA_ARB_BASE_ADDR + 0x04000)
 
 /* GPV - PL301 configuration ports */
-#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) 
|| \
defined(CONFIG_MX6SL) || defined(CONFIG_MX6SLL))
 #define GPV2_BASE_ADDR  0x00D0
 #define GPV3_BASE_ADDR 0x00E0
@@ -88,7 +88,7 @@
 #define QSPI0_AMBA_END 0x6FFF
 #define QSPI1_AMBA_BASE0x7000
 #define QSPI1_AMBA_END 0x7FFF
-#elif defined(CONFIG_MX6UL)
+#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define WEIM_ARB_BASE_ADDR  0x5000
 #define WEIM_ARB_END_ADDR   0x57FF
 #define QSPI0_AMBA_BASE 0x6000
@@ -109,7 +109,7 @@
 #endif
 
 #if (defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL) || \
-   defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
+   defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || 
defined(CONFIG_MX6ULL))
 #define MMDC0_ARB_BASE_ADDR 0x8000
 #define MMDC0_ARB_END_ADDR  0x
 #define MMDC1_ARB_BASE_ADDR 0xC000
@@ -262,7 +262,7 @@
 #define MMDC_P0_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x3)
 /* i.MX6SL/SLL */
 #define RNGB_IPS_BASE_ADDR  (AIPS2_OFF_BASE_ADDR + 0x34000)
-#ifdef CONFIG_MX6UL
+#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define ENET2_BASE_ADDR (AIPS1_OFF_BASE_ADDR + 0x34000)
 #else
 /* i.MX6SX */
@@ -288,7 +288,7 @@
 #define IP2APB_PERFMON3_BASE_ADDR   (AIPS2_OFF_BASE_ADDR + 0x4C000)
 #endif
 #define IP2APB_TZASC1_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x5)
-#ifdef CONFIG_MX6UL
+#if (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define QSPI0_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x6)
 #define UART6_BASE_ADDR (AIPS2_OFF_BASE_ADDR + 0x7C000)
 #elif defined(CONFIG_MX6SX)
@@ -337,7 +337,7 @@
 #define PWM6_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xA8000)
 #define PWM7_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xAC000)
 #define PWM8_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0xB)
-#elif defined(CONFIG_MX6ULL)
+#elif (defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
 #define AIPS3_CONFIG_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x7C000)
 #define DCP_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x8)
 #define RNGB_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x84000)
@@ -354,7 +354,7 @@
 #define MX6SX_LCDIF1_BASE_ADDR  (AIPS3_ARB_BASE_ADDR + 0x2)
 #define MX6SX_WDOG3_BASE_ADDR   (AIPS3_ARB_BASE_ADDR + 0x88000)
 
-#if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || \
+#if !(defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL) 
|| \
defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL))
 #define IRAM_SIZE0x0004
 #else
@@ -573,7 +573,7 @@ struct src {
 #define IOMUXC_GPR12_LOS_LEVEL (0x1f << 4)
 
 struct iomuxc {
-#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL))
+#if (defined(CONFIG_MX6SX) || defined(CONFIG_MX6UL) || defined(CONFIG_MX6ULL))
u8 reserved[0x4000];
 #endif
u32 gpr[14];
@@ -700,7 +700,7 @@ struct cspi_regs {
 #define MXC_CSPICON_SSPOL  12 /* SS polarity */
 #define MXC_CSPICON_CTL20 /* inactive state of SCLK */
 #if defined(CONFIG_MX6SLL) || defined(CONFIG_MX6SL) || \
-   

[U-Boot] uboot img

2018-01-01 Thread Ivan Yakymenko
Could you share img for jtag flash (my rigol HW da07)
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 4/5] Kconfig: mx6ull: Deselect MX6UL from CONFIG_MX6ULL

2018-01-01 Thread Stefan Agner
On 2017-11-28 00:07, Breno Lima wrote:
> From: Breno Lima 
> 
> MX6UL contains features that MX6ULL doesn't support.
> Deselect CONFIG_MX6UL and select SYS_L2CACHE_OFF and ROM_UNIFIED_SECTIONS.
> 
> The motivation for doing this change is that MX6UL supports CAAM and
> MX6ULL does not.

While I agree with the idea of the change in general, it must be done
more carefully! There are several places where we rely that
CONFIG_MX6ULL selects CONFIG_MX6ULL, e.g.
include/configs/mx6_common.h
arch/arm/include/asm/arch-mx6/imx-regs.h
arch/arm/include/asm/mach-imx/regs-lcdif.h

I see that this patch already got merged... So I guess we either fix all
those places before the release, or we revert this patch...

--
Stefan


> 
> Signed-off-by: Breno Lima 
> ---
>  arch/arm/mach-imx/mx6/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
> index 4f8bb8f..279f088 100644
> --- a/arch/arm/mach-imx/mx6/Kconfig
> +++ b/arch/arm/mach-imx/mx6/Kconfig
> @@ -66,8 +66,9 @@ config MX6UL_OPOS6UL
>   select SUPPORT_SPL
>  
>  config MX6ULL
> + select SYS_L2CACHE_OFF
> + select ROM_UNIFIED_SECTIONS
>   bool
> - select MX6UL
>  
>  config MX6_DDRCAL
>   bool "Include dynamic DDR calibration routines"
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/1] fs/fat: remove distractive message in file_fat_read_at()

2018-01-01 Thread Heinrich Schuchardt
The message "reading %s\n" may be interesting when
debugging but otherwise it is superfluous.

Only output the message when debugging.

Signed-off-by: Heinrich Schuchardt 
---
 fs/fat/fat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index d16883fa10..1283818761 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -1106,7 +1106,7 @@ int file_fat_read_at(const char *filename, loff_t pos, 
void *buffer,
if (ret)
goto out_free_both;
 
-   printf("reading %s\n", filename);
+   debug("reading %s\n", filename);
ret = get_contents(, itr->dent, pos, buffer, maxsize, actread);
 
 out_free_both:
-- 
2.14.2

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


[U-Boot] [PATCH 1/1] fs: remove distractive message in fs_read()

2018-01-01 Thread Heinrich Schuchardt
The message
"** %s shorter than offset + len **\n"
may be interesting when debugging but it does not indicate an
error.

So we should not write it if we are not in debug mode.

Fixes: 7a3e70cfd88c fs/fs.c: read up to EOF when len would read past EOF
Signed-off-by: Heinrich Schuchardt 
---
 fs/fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fs.c b/fs/fs.c
index 9c4d67faf8..6155cb1daf 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -407,7 +407,7 @@ int fs_read(const char *filename, ulong addr, loff_t 
offset, loff_t len,
 
/* If we requested a specific number of bytes, check we got it */
if (ret == 0 && len && *actread != len)
-   printf("** %s shorter than offset + len **\n", filename);
+   debug("** %s shorter than offset + len **\n", filename);
fs_close();
 
return ret;
-- 
2.14.2

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


Re: [U-Boot] [PATCH] ARM: omap3: evm: Do not relocate FDT address

2018-01-01 Thread Derald Woods
On Mon, Jan 1, 2018 at 7:29 AM, Tom Rini  wrote:

> On Thu, Dec 28, 2017 at 05:17:13PM -0600, Derald D. Woods wrote:
> > On Thu, Dec 28, 2017 at 02:24:08PM -0500, Tom Rini wrote:
> > > On Thu, Dec 28, 2017 at 01:21:05PM -0600, Derald D. Woods wrote:
> > > > On Thu, Dec 28, 2017 at 01:43:43PM -0500, Tom Rini wrote:
> > > > > On Thu, Dec 28, 2017 at 11:48:29AM -0600, Derald D. Woods wrote:
> > > > > > On Thu, Dec 28, 2017 at 10:37:18AM -0500, Tom Rini wrote:
> > > > > > > On Thu, Dec 28, 2017 at 01:25:43AM -0600, Derald D. Woods
> wrote:
> > > > > > >
> > > > > > > > This commit keeps the 'fdtaddr' as provided by
> DEFAULT_LINUX_BOOT_ENV.
> > > > > > > >
> > > > > > > > Signed-off-by: Derald D. Woods 
> > > > > > > > ---
> > > > > > > >  include/configs/omap3_evm.h | 1 +
> > > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > >
> > > > > > > > diff --git a/include/configs/omap3_evm.h
> b/include/configs/omap3_evm.h
> > > > > > > > index 629d60b961..d95ccdf035 100644
> > > > > > > > --- a/include/configs/omap3_evm.h
> > > > > > > > +++ b/include/configs/omap3_evm.h
> > > > > > > > @@ -127,6 +127,7 @@
> > > > > > > >   "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
> > > > > > > >   "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
> > > > > > > >   "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
> > > > > > > > + "fdt_high=0x\0" \
> > > > > > > >   "bootenv=uEnv.txt\0" \
> > > > > > > >   "optargs=\0" \
> > > > > > > >   "mmcdev=0\0" \
> > > > > > >
> > > > > > > What's the problem this solves, and how much memory is on the
> system in
> > > > > > > question?  bootm_size should be ensuring we never relocate it
> outside of
> > > > > > > the first 256MB of memory.  Thanks!
> > > > > > >
> > > > > >
> > > > > > The logic within "common/image-fdt.c" lead me down this path. The
> > > > > > addition of this fairly common environment variable allowed my
> > > > > > OMAP34XX board to boot the kernel without an appended devicetree.
> > > > > > When I use the variable to trigger 'disable_relocation', as the
> code
> > > > > > indicates, the kernel boot behavior is what I expect. I spent a
> few
> > > > > > hours following the code path to a single line edition that
> works.
> > > > > >
> > > > > >
> > > > > > Without 'fdt_high'
> > > > > > ==
> > > > > >
> > > > > > U-Boot SPL 2018.01-rc2-00028-gaf9da945cd-dirty (Dec 28 2017 -
> 11:16:52)
> > > > > > Trying to boot from MMC1
> > > > > > reading u-boot.img
> > > > > > reading u-boot.img
> > > > > >
> > > > > >
> > > > > > U-Boot 2018.01-rc2-00028-gaf9da945cd-dirty (Dec 28 2017 -
> 11:16:52 -0600)
> > > > > >
> > > > > > OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 720 MHz
> > > > > > Model: TI OMAP35XX EVM (TMDSEVM3530)
> > > > > > OMAP3 EVM board + LPDDR/NAND
> > > > > > I2C:   ready
> > > > > > DRAM:  256 MiB
> > > > > > NAND:  256 MiB
> > > > > > MMC:   OMAP SD/MMC: 0
> > > > > > Read back SMSC id 0x9220
> > > > > > OMAP die ID: 265a0024040365fa1801b01f
> > > > > > Net:   smc911x-0
> > > > > > starting USB...
> > > > > > USB0:   USB EHCI 1.00
> > > > > > scanning bus 0 for devices... 1 USB Device(s) found
> > > > > > Hit any key to stop autoboot:  0
> > > > > > switch to partitions #0, OK
> > > > > > mmc0 is current device
> > > > > > Scanning mmc 0:1...
> > > > > > switch to partitions #0, OK
> > > > > > mmc0 is current device
> > > > > > ** Unable to read file uEnv.txt **
> > > > > > reading zImage
> > > > > > 4637344 bytes read in 407 ms (10.9 MiB/s)
> > > > > > reading omap3-evm.dtb
> > > > > > 62832 bytes read in 10 ms (6 MiB/s)
> > > > > > Booting zImage from mmc ...
> > > > > > *  fdt: cmdline image address = 0x8800
> > > > > > ## Checking for 'FDT'/'FDT Image' at 8800
> > > > > > *  fdt: raw FDT blob
> > > > > > ## Flattened Device Tree blob at 8800
> > > > > >Booting using the fdt blob at 0x8800
> > > > > >of_flat_tree at 0x8800 size 0xf570
> > > > > > ## device tree at 8800 ... 8800f56f (len=75120 [0x12570])
> > > > > >Loading Device Tree to 8ffed000, end 856f ... OK
> > > > > >
> > > > > > Starting kernel ...
> > > > > >
> > > > > > [HANG]
> > > > > >
> > > > > >
> > > > > > Make note of the "of_flat_tree" and "Loading Device Tree" lines.
> > > > >
> > > > > Ah, hmmm.  Can you please try setting bootm_size, as an
> experiment, to
> > > > > 0x0a00 ?  I wonder if, since you have 256MB of memory we're not
> > > > > putting the DTB into where U-Boot is and we stomp on it a bit,
> causing
> > > > > Linux to boot, see an invalid DTB and not have a console available
> to
> > > > > tell us.  Thanks!
> > > > >
> > > >
> > > >
> > > > That seemed to do it.
> > >
> > > Ah, good!
> > >
> > > > ---8<---
> -
> > > >
> > > > OMAP3_EVM # echo $bootm_size
> > > > 0x0a00
> > > > OMAP3_EVM # reset
> > > > resetting ...
> > > > O
> > > > U-Boot SPL 2018.01-rc2-00028-gaf9da945cd-dirty (Dec 

[U-Boot] [PULL] Please pull u-boot-rockchip/master

2018-01-01 Thread Dr. Philipp Tomsich
Tom,

We have two minor config-fixes for the upcoming release on the Rockchip side 
for you.
Travis-CI (prior to the rebase): 
https://travis-ci.org/ptomsich/u-boot-rockchip/builds/322304850

I expect to send another pull-request later this week with two more 
stabilisation fixes
(RK3368-uQ7 environment location & backward-compatibility with ATF versions that
have broken parameter validation on the platform-specific data structure).

Best regards,
Philipp.



The following changes since commit 3bb6dc04a9b78c3db7c130bea7e817d77add275e:

  Merge git://git.denx.de/u-boot-imx (2017-12-29 09:27:04 -0500)

are available in the git repository at:

  git://git.denx.de/u-boot-rockchip.git master

for you to fetch changes up to f777df3628c544d2f982cbb631fbd053f4072955:

  rockchip: dts: rk3399-evb: support boot from sd-card (2018-01-01 14:45:37 
+0100)


Jakob Unterwurzacher (1):
  rockchip: rk3399-puma: reduce env size to 8kiB

Kever Yang (1):
  rockchip: dts: rk3399-evb: support boot from sd-card

 arch/arm/dts/rk3399-evb.dts | 3 +++
 board/theobroma-systems/puma_rk3399/Kconfig | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

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


Re: [U-Boot] [PATCH] wait_bit: add big endian version of wait_for_bit function

2018-01-01 Thread Tom Rini
On Sat, Dec 30, 2017 at 11:12:36AM +0100, Álvaro Fernández Rojas wrote:

> The only difference with the existing wait_for_bit function is the fact that
> wait_for_bit_be expects the register size to be read.
> 
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  include/wait_bit.h | 69 
> ++
>  1 file changed, 69 insertions(+)
> 
> diff --git a/include/wait_bit.h b/include/wait_bit.h
> index 06ad43a122..828fdcda02 100644
> --- a/include/wait_bit.h
> +++ b/include/wait_bit.h
> @@ -69,5 +69,74 @@ static inline int wait_for_bit(const char *prefix, const 
> u32 *reg,
>   return -ETIMEDOUT;
>  }
>  
> +/**
> + * wait_for_bit_be() waits for bit set/cleared in BE register
> + *
> + * Function polls register waiting for specific bit(s) change
> + * (either 0->1 or 1->0). It can fail under two conditions:
> + * - Timeout
> + * - User interaction (CTRL-C)
> + * Function succeeds only if all bits of masked register are set/cleared
> + * (depending on set option).
> + *
> + * @param prefix Prefix added to timeout messagge (message visible only
> + *   with debug enabled)
> + * @param regRegister that will be read (using read_be())
> + * @param size   Size of the register that will be read
> + * @param mask   Bit(s) of register that must be active
> + * @param setSelects wait condition (bit set or clear)
> + * @param timeout_ms Timeout (in miliseconds)
> + * @param breakable  Enables CTRL-C interruption
> + * @return   0 on success, -EINVAL, -ETIMEDOUT or -EINTR on failure
> + */
> +static inline int wait_for_bit_be(const char *prefix,
> +   const u32 *reg, const u8 size,
> +   const u32 mask, const bool set,
> +   const unsigned int timeout_ms,
> +   const bool breakable)
> +{
> + u32 val;
> + unsigned long start = get_timer(0);
> +
> + while (1) {
> + switch(size)
> + {
> + case 8:
> + val = readb_be(reg);
> + break;
> + case 16:
> + val = readw_be(reg);
> + break;
> + case 32:
> + val = readl_be(reg);
> + break;
> + default:
> + debug("%s: invalid size %u\n", prefix, size);
> + return -EINVAL;
> + }
> +
> + if (!set)
> + val = ~val;
> +
> + if ((val & mask) == mask)
> + return 0;
> +
> + if (get_timer(start) > timeout_ms)
> + break;
> +
> + if (breakable && ctrlc()) {
> + puts("Abort\n");
> + return -EINTR;
> + }
> +
> + udelay(1);
> + WATCHDOG_RESET();
> + }
> +
> + debug("%s: Timeout (reg=%p mask=%08x wait_set=%i)\n", prefix, reg, mask,
> +   set);
> +
> + return -ETIMEDOUT;
> +}

Where is this used?  Thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH v3 6/6] board: ti: k2g: Make ddr3* declarations as static

2018-01-01 Thread Tom Rini
On Thu, Dec 28, 2017 at 08:40:03PM +0530, Lokesh Vutla wrote:

> All ddr3_emif declarations are not used outside ddr3_k2g.c
> file. So make all of them as static.
> 
> Signed-off-by: Lokesh Vutla 

Reviewed-by: Tom Rini 

-- 
Tom


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


Re: [U-Boot] [PATCH] Travis-CI: Split 't208xrdb t4qds t102*'-job into separate jobs

2018-01-01 Thread Tom Rini
On Thu, Dec 28, 2017 at 08:13:57PM -0700, Simon Glass wrote:
> Hi Philipp,
> 
> On 20 December 2017 at 03:06, Philipp Tomsich
>  wrote:
> > The 't208xrdb t4qds t102*' job is close to the time limit and
> > sometimes fails, so this splits it into 3 separate jobs.
> 
> Should buidman have a time limit parameter? Then it could build for
> (say) and hour and exit after that, writing out the boards that it
> completed building.
> 
> It would be fairly easy to implement.

I don't think so.  We need to build everything and have it pass, and
using --dry-run to see / tweak what would be built to re-work jobs works
well enough I think.  Thanks!

-- 
Tom


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


Re: [U-Boot] [PATCH] ARM: omap3: evm: Do not relocate FDT address

2018-01-01 Thread Tom Rini
On Thu, Dec 28, 2017 at 05:17:13PM -0600, Derald D. Woods wrote:
> On Thu, Dec 28, 2017 at 02:24:08PM -0500, Tom Rini wrote:
> > On Thu, Dec 28, 2017 at 01:21:05PM -0600, Derald D. Woods wrote:
> > > On Thu, Dec 28, 2017 at 01:43:43PM -0500, Tom Rini wrote:
> > > > On Thu, Dec 28, 2017 at 11:48:29AM -0600, Derald D. Woods wrote:
> > > > > On Thu, Dec 28, 2017 at 10:37:18AM -0500, Tom Rini wrote:
> > > > > > On Thu, Dec 28, 2017 at 01:25:43AM -0600, Derald D. Woods wrote:
> > > > > > 
> > > > > > > This commit keeps the 'fdtaddr' as provided by 
> > > > > > > DEFAULT_LINUX_BOOT_ENV.
> > > > > > > 
> > > > > > > Signed-off-by: Derald D. Woods 
> > > > > > > ---
> > > > > > >  include/configs/omap3_evm.h | 1 +
> > > > > > >  1 file changed, 1 insertion(+)
> > > > > > > 
> > > > > > > diff --git a/include/configs/omap3_evm.h 
> > > > > > > b/include/configs/omap3_evm.h
> > > > > > > index 629d60b961..d95ccdf035 100644
> > > > > > > --- a/include/configs/omap3_evm.h
> > > > > > > +++ b/include/configs/omap3_evm.h
> > > > > > > @@ -127,6 +127,7 @@
> > > > > > >   "fdtfile=" CONFIG_DEFAULT_FDT_FILE "\0" \
> > > > > > >   "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
> > > > > > >   "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
> > > > > > > + "fdt_high=0x\0" \
> > > > > > >   "bootenv=uEnv.txt\0" \
> > > > > > >   "optargs=\0" \
> > > > > > >   "mmcdev=0\0" \
> > > > > > 
> > > > > > What's the problem this solves, and how much memory is on the 
> > > > > > system in
> > > > > > question?  bootm_size should be ensuring we never relocate it 
> > > > > > outside of
> > > > > > the first 256MB of memory.  Thanks!
> > > > > > 
> > > > > 
> > > > > The logic within "common/image-fdt.c" lead me down this path. The
> > > > > addition of this fairly common environment variable allowed my
> > > > > OMAP34XX board to boot the kernel without an appended devicetree.
> > > > > When I use the variable to trigger 'disable_relocation', as the code
> > > > > indicates, the kernel boot behavior is what I expect. I spent a few
> > > > > hours following the code path to a single line edition that works.
> > > > > 
> > > > > 
> > > > > Without 'fdt_high'
> > > > > ==
> > > > > 
> > > > > U-Boot SPL 2018.01-rc2-00028-gaf9da945cd-dirty (Dec 28 2017 - 
> > > > > 11:16:52)
> > > > > Trying to boot from MMC1
> > > > > reading u-boot.img
> > > > > reading u-boot.img
> > > > > 
> > > > > 
> > > > > U-Boot 2018.01-rc2-00028-gaf9da945cd-dirty (Dec 28 2017 - 11:16:52 
> > > > > -0600)
> > > > > 
> > > > > OMAP3530-GP ES3.1, CPU-OPP2, L3-165MHz, Max CPU Clock 720 MHz
> > > > > Model: TI OMAP35XX EVM (TMDSEVM3530)
> > > > > OMAP3 EVM board + LPDDR/NAND
> > > > > I2C:   ready
> > > > > DRAM:  256 MiB
> > > > > NAND:  256 MiB
> > > > > MMC:   OMAP SD/MMC: 0
> > > > > Read back SMSC id 0x9220
> > > > > OMAP die ID: 265a0024040365fa1801b01f
> > > > > Net:   smc911x-0
> > > > > starting USB...
> > > > > USB0:   USB EHCI 1.00
> > > > > scanning bus 0 for devices... 1 USB Device(s) found
> > > > > Hit any key to stop autoboot:  0 
> > > > > switch to partitions #0, OK
> > > > > mmc0 is current device
> > > > > Scanning mmc 0:1...
> > > > > switch to partitions #0, OK
> > > > > mmc0 is current device
> > > > > ** Unable to read file uEnv.txt **
> > > > > reading zImage
> > > > > 4637344 bytes read in 407 ms (10.9 MiB/s)
> > > > > reading omap3-evm.dtb
> > > > > 62832 bytes read in 10 ms (6 MiB/s)
> > > > > Booting zImage from mmc ...
> > > > > *  fdt: cmdline image address = 0x8800
> > > > > ## Checking for 'FDT'/'FDT Image' at 8800
> > > > > *  fdt: raw FDT blob
> > > > > ## Flattened Device Tree blob at 8800
> > > > >Booting using the fdt blob at 0x8800
> > > > >of_flat_tree at 0x8800 size 0xf570
> > > > > ## device tree at 8800 ... 8800f56f (len=75120 [0x12570])
> > > > >Loading Device Tree to 8ffed000, end 856f ... OK
> > > > > 
> > > > > Starting kernel ...
> > > > > 
> > > > > [HANG]
> > > > > 
> > > > > 
> > > > > Make note of the "of_flat_tree" and "Loading Device Tree" lines.
> > > > 
> > > > Ah, hmmm.  Can you please try setting bootm_size, as an experiment, to
> > > > 0x0a00 ?  I wonder if, since you have 256MB of memory we're not
> > > > putting the DTB into where U-Boot is and we stomp on it a bit, causing
> > > > Linux to boot, see an invalid DTB and not have a console available to
> > > > tell us.  Thanks!
> > > > 
> > > 
> > > 
> > > That seemed to do it.
> > 
> > Ah, good!
> > 
> > > ---8<
> > > 
> > > OMAP3_EVM # echo $bootm_size
> > > 0x0a00
> > > OMAP3_EVM # reset
> > > resetting ...
> > > O
> > > U-Boot SPL 2018.01-rc2-00028-gaf9da945cd-dirty (Dec 28 2017 - 13:03:42)
> > > Trying to boot from MMC1
> > > reading u-boot.img
> > > reading u-boot.img
> > > 
> > > 
> > > U-Boot 2018.01-rc2-00028-gaf9da945cd-dirty (Dec 28 2017 - 13:03:42 -0600)
> > > 
> > > OMAP3530-GP 

[U-Boot] [PATCH] patman: Unquote output from get_maintainer.pl

2018-01-01 Thread Stefan Brüns
get_maintainer.pl quotes names which it considers unsafe, i.e. anything
containing [^a-zA-Z0-9_ \-]. This confuses patman, it will duplicate
addresses which are also in Series-to/cc. Strip the quotes.

Signed-off-by: Stefan Brüns 

---

 tools/patman/get_maintainer.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/patman/get_maintainer.py b/tools/patman/get_maintainer.py
index 2deb5db6ec..22b091808a 100644
--- a/tools/patman/get_maintainer.py
+++ b/tools/patman/get_maintainer.py
@@ -44,4 +44,5 @@ def GetMaintainer(fname, verbose=False):
 return []
 
 stdout = command.Output(get_maintainer, '--norolestats', fname)
-return stdout.splitlines()
+lines = stdout.splitlines()
+return [ x.replace('"', '') for x in lines ]
-- 
2.15.1

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