[U-Boot] Re : Re: [PATCH] exynos: imply SYS_THUMB_BUILD

2018-12-03 Thread Guillaume GARDET

- Lukasz Majewski  a écrit :
> Hi Guillaume,
> 
> > Hi,
> > 
> > not sure through which tree it should go and who should take care of
> > it?
> 
> Please rebase on top of u-boot/master branch.

No need, it applies just fine.

> 
> Then Minkyu will take the patch to his tree.

Tom should take it (see Minkyu e-mail).

Thanks,
Guillaume

> 
> > 
> > Guillaume
> > 
> > - Lukasz Majewski  a écrit :
> > > Hi Guillaume,
> > >   
> > > > This patch allows smaller binaries.
> > > > This is needed for and has been tested on Arndale board, as
> > > > u-boot.bin is now bigger than the 512K load limit, with GCC8,
> > > > without thumb mode.
> > > >   
> > > 
> > > Acked-by: Lukasz Majewski 
> > >   
> > > > Signed-off-by: Guillaume GARDET 
> > > > 
> > > > Cc: Albert Aribaud 
> > > > Cc: Minkyu Kang 
> > > > Cc: Tom Rini 
> > > > ---
> > > >  arch/arm/Kconfig | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > > index f5d4d39683..1ccd53fd0b 100644
> > > > --- a/arch/arm/Kconfig
> > > > +++ b/arch/arm/Kconfig
> > > > @@ -607,6 +607,7 @@ config ARCH_EXYNOS
> > > > select DM_SPI
> > > > select DM_SPI_FLASH
> > > > select SPI
> > > > +   imply SYS_THUMB_BUILD
> > > > imply CMD_DM
> > > > imply FAT_WRITE
> > > >
> > > 
> > > 
> > > 
> > > 
> > > Best regards,
> > > 
> > > Lukasz Majewski
> > > 
> > > --
> > > 
> > > DENX Software Engineering GmbH,  Managing Director: Wolfgang
> > > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > > lu...@denx.de  
> > 
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de

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


Re: [U-Boot] about rk3399 boot speed

2018-12-03 Thread klaus . goger

Hi Kever,

I can confirm that current master behaves the same on Puma.
For a fix please take a look at:
https://patchwork.ozlabs.org/patch/1003412/

On 2018-12-04 04:04, Kever Yang wrote:

Hi Philipp,

    When I test on firefly-rk3399 with latest mainline U-Boot, it boots
very very slow,

and it's due to the first time of cru driver bind(U-Boot proper) and 
the

clk_set_defaults() cost about 5S.

    Does puma board has the same problem?


Thanks,

- Kever

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


Re: [U-Boot] [PATCH] driver/spi: fsl_qspi: Remove non-DM stuff

2018-12-03 Thread Ashish Kumar
> -Original Message-
> From: Schrempf Frieder 
> Sent: Monday, December 3, 2018 4:49 PM
> To: Ashish Kumar ; u-boot@lists.denx.de;
> ja...@openedev.com
> Cc: Rajat Srivastava 
> Subject: Re: [U-Boot] [PATCH] driver/spi: fsl_qspi: Remove non-DM stuff
> 
> Hi,
> 
> On 07.09.18 06:19, Ashish Kumar wrote:
> > Convert fsl_qspi.c to complete DM mode.
> >
> > Signed-off-by: Ashish Kumar 
> > Tested-by: Rajat Srivastava 
> > Tested-by: Ye Li 
> > ---
> >
> > Tested on LS1088ARDB(arm64).
> > Tested on LS1021ATWR(arm32) by Rajat
> > Tested on i.mx6 and i.mx7 by Ye Li
> >
> > Depends on patch series:
> > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatc
> >
> hwork.ozlabs.org%2Fpatch%2F935858%2F&data=02%7C01%7Cashish.ku
> mar%4
> >
> 0nxp.com%7C208728d582b6489f20de08d6591119e0%7C686ea1d3bc2b4c6fa
> 92cd99c
> >
> 5c301635%7C0%7C0%7C636794327324057470&sdata=AADhm3h9n9kh
> O3RDwtvDPS
> > dkrNUOBVaZLYCWETPZzf4%3D&reserved=0
> > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatc
> >
> hwork.ozlabs.org%2Fpatch%2F935860%2F&data=02%7C01%7Cashish.ku
> mar%4
> >
> 0nxp.com%7C208728d582b6489f20de08d6591119e0%7C686ea1d3bc2b4c6fa
> 92cd99c
> >
> 5c301635%7C0%7C0%7C636794327324057470&sdata=UgRyuaG7n0n8
> w2vLwxPAvn
> > iaUMRsKtYod%2F2YPjjLgVg%3D&reserved=0
> 
> This patch breaks the build if you enable CONFIG_SPL_SPI_SUPPORT. I guess
> that SPL does not use DM for SPI.
> 
> How is the SPI support for SPL supposed to work?
> Will it use DM in the future?
++ Peng fan and Ye li, 
Could you please help. If i.mx has SPL SPI ? As of now FSL-QSPI does not have 
this(SPL SPI) yet.

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


Re: [U-Boot] Uboot File not found in MMC

2018-12-03 Thread Kever Yang
Hi

    Does the boot partition marks as 'bootable' in partition table?

Thanks,
- Kever
On 12/01/2018 12:16 PM, kasiviswanathan.venkatakrish...@us.fujitsu.com
wrote:
> Hi all,
>
> We are using U-Boot of version 2015.01 in one of our PPC boards. The 
> development board
> has few FPGA's and its corresponding images are downloaded into the /boot 
> partition from 
> the linux prompt which is of ext2 type.
>
> If we download new files to the /boot partition i.e when we update the FPGA 
> images and reboot
> U-Boot is not able to identify the updated files from the /boot partition. 
> But when we do a listing
> of the files in U-Boot it is shown as available.
>
> We tried to change the partition type of /boot from ext2 to ext4 but still 
> U-Boot is not able to 
> find the files.
>
> Is there any fix available for this issue ?
>
> Thanks in advance.
>
> Thanks,
> Kasiviswanathan.V
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot


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


[U-Boot] [RFC PATCH] mmc: sdhci: zynqmp: Added support to read tap delay values from DT

2018-12-03 Thread Siva Durga Prasad Paladugu
From: Vipul Kumar 

This patch added support to read ITAP and OTAP delay values from
the device tree. If the DT does not contain tap delay values, the
predefined values will be used for the same.

Signed-off-by: Vipul Kumar 
Signed-off-by: Siva Durga Prasad Paladugu 
Signed-off-by: Michal Simek 
---
- These bindings were sent to mainline but not accepted yet.
---
 board/xilinx/zynqmp/tap_delays.c | 195 ++-
 drivers/mmc/zynq_sdhci.c | 217 ++-
 include/zynqmp_tap_delay.h   |   5 +-
 3 files changed, 249 insertions(+), 168 deletions(-)

diff --git a/board/xilinx/zynqmp/tap_delays.c b/board/xilinx/zynqmp/tap_delays.c
index c3ae357..3788d67 100644
--- a/board/xilinx/zynqmp/tap_delays.c
+++ b/board/xilinx/zynqmp/tap_delays.c
@@ -24,43 +24,12 @@
 #define SD1_ITAPDLYENA_MASK0x0100
 #define SD1_ITAPDLYENA 0x0100
 #define SD0_ITAPDLYSEL_MASK0x00FF
-#define SD0_ITAPDLYSEL_HSD 0x0015
-#define SD0_ITAPDLYSEL_SD_DDR500x003D
-#define SD0_ITAPDLYSEL_MMC_DDR50   0x0012
 
 #define SD1_ITAPDLYSEL_MASK0x00FF
-#define SD1_ITAPDLYSEL_HSD 0x0015
-#define SD1_ITAPDLYSEL_SD_DDR500x003D
-#define SD1_ITAPDLYSEL_MMC_DDR50   0x0012
 
 #define SD0_OTAPDLYSEL_MASK0x003F
-#define SD0_OTAPDLYSEL_MMC_HSD 0x0006
-#define SD0_OTAPDLYSEL_SD_HSD  0x0005
-#define SD0_OTAPDLYSEL_SDR50   0x0003
-#define SD0_OTAPDLYSEL_SDR104_B0   0x0003
-#define SD0_OTAPDLYSEL_SDR104_B2   0x0002
-#define SD0_OTAPDLYSEL_SD_DDR500x0004
-#define SD0_OTAPDLYSEL_MMC_DDR50   0x0006
 
 #define SD1_OTAPDLYSEL_MASK0x003F
-#define SD1_OTAPDLYSEL_MMC_HSD 0x0006
-#define SD1_OTAPDLYSEL_SD_HSD  0x0005
-#define SD1_OTAPDLYSEL_SDR50   0x0003
-#define SD1_OTAPDLYSEL_SDR104_B0   0x0003
-#define SD1_OTAPDLYSEL_SDR104_B2   0x0002
-#define SD1_OTAPDLYSEL_SD_DDR500x0004
-#define SD1_OTAPDLYSEL_MMC_DDR50   0x0006
-
-#define MMC_BANK2  0x2
-
-#define MMC_TIMING_UHS_SDR25   1
-#define MMC_TIMING_UHS_SDR50   2
-#define MMC_TIMING_UHS_SDR104  3
-#define MMC_TIMING_UHS_DDR50   4
-#define MMC_TIMING_MMC_HS200   5
-#define MMC_TIMING_SD_HS   6
-#define MMC_TIMING_MMC_DDR52   7
-#define MMC_TIMING_MMC_HS  8
 
 void zynqmp_dll_reset(u8 deviceid)
 {
@@ -81,149 +50,49 @@ void zynqmp_dll_reset(u8 deviceid)
zynqmp_mmio_write(SD_DLL_CTRL, SD1_DLL_RST_MASK, 0x0);
 }
 
-static void arasan_zynqmp_tap_sdr104(u8 deviceid, u8 timing, u8 bank)
-{
-   if (deviceid == 0) {
-   /* Program OTAP */
-   if (bank == MMC_BANK2)
-   zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK,
- SD0_OTAPDLYSEL_SDR104_B2);
-   else
-   zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK,
- SD0_OTAPDLYSEL_SDR104_B0);
-   } else {
-   /* Program OTAP */
-   if (bank == MMC_BANK2)
-   zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK,
- SD1_OTAPDLYSEL_SDR104_B2);
-   else
-   zynqmp_mmio_write(SD_OTAP_DLY, SD1_OTAPDLYSEL_MASK,
- SD1_OTAPDLYSEL_SDR104_B0);
-   }
-}
-
-static void arasan_zynqmp_tap_hs(u8 deviceid, u8 timing, u8 bank)
-{
-   if (deviceid == 0) {
-   /* Program ITAP */
-   zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPCHGWIN_MASK,
- SD0_ITAPCHGWIN);
-   zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPDLYENA_MASK,
- SD0_ITAPDLYENA);
-   zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPDLYSEL_MASK,
- SD0_ITAPDLYSEL_HSD);
-   zynqmp_mmio_write(SD_ITAP_DLY, SD0_ITAPCHGWIN_MASK, 0x0);
-   /* Program OTAP */
-   if (timing == MMC_TIMING_MMC_HS)
-   zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK,
- SD0_OTAPDLYSEL_MMC_HSD);
-   else
-   zynqmp_mmio_write(SD_OTAP_DLY, SD0_OTAPDLYSEL_MASK,
- SD0_OTAPDLYSEL_SD_HSD);
-   } else {
-   /* Program ITAP */
-   zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPCHGWIN_MASK,
- SD1_ITAPCHGWIN);
-   zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPDLYENA_MASK,
- SD1_ITAPDLYENA);
-   zynqmp_mmio_write(SD_ITAP_DLY, SD1_ITAPDLYSEL_MASK,
- S

Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-03 Thread Rick Chen
> > From: Anup Patel [mailto:a...@brainfault.org]
> > Sent: Monday, December 03, 2018 6:30 PM
> > To: Bin Meng
> > Cc: Rick Jian-Zhi Chen(陳建志); Lukas Auer; Alexander Graf; Palmer Dabbelt;
> > Atish Patra; Christoph Hellwig; U-Boot Mailing List
> > Subject: Re: [PATCH v7 4/4] RISC-V: Add S-mode timer implementation
> >
> > On Mon, Dec 3, 2018 at 2:16 PM Bin Meng  wrote:
> > >
> > > Hi Anup,
> > >
> > > On Mon, Dec 3, 2018 at 4:12 PM Anup Patel  wrote:
> > > >
> > > > On Mon, Dec 3, 2018 at 1:27 PM Bin Meng  wrote:
> > > > >
> > > > > Hi Anup,
> > > > >
> > > > > On Mon, Dec 3, 2018 at 3:44 PM Anup Patel  wrote:
> > > > > >
> > > > > > On Mon, Dec 3, 2018 at 1:08 PM Bin Meng 
> > wrote:
> > > > > > >
> > > > > > > Hi Anup,
> > > > > > >
> > > > > > > On Mon, Dec 3, 2018 at 3:31 PM Anup Patel 
> > wrote:
> > > > > > > >
> > > > > > > > On Mon, Dec 3, 2018 at 12:56 PM Bin Meng 
> > wrote:
> > > > > > > > >
> > > > > > > > > Hi Anup,
> > > > > > > > >
> > > > > > > > > On Mon, Dec 3, 2018 at 3:19 PM Anup Patel 
> > > > > > > > > 
> > wrote:
> > > > > > > > > >
> > > > > > > > > > On Mon, Dec 3, 2018 at 12:32 PM Bin Meng
> >  wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Anup,
> > > > > > > > > > >
> > > > > > > > > > > On Mon, Dec 3, 2018 at 2:43 PM Anup Patel
> >  wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > On Mon, Dec 3, 2018 at 12:06 PM Bin Meng
> >  wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Anup,
> > > > > > > > > > > > >
> > > > > > > > > > > > > On Mon, Dec 3, 2018 at 1:28 PM Anup Patel
> >  wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > When running in S-mode, we can use rdtime and
> > > > > > > > > > > > > > rdtimeh instructions for reading timer ticks
> > > > > > > > > > > > > > (just like Linux). The frequency of timer ticks
> > > > > > > > > > > > > > is passed by prior booting stages in 
> > > > > > > > > > > > > > "timebase-frequency"
> > DT property of the "/cpus" DT node.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > This patch provides a generic timer
> > > > > > > > > > > > > > implementation for U-Boot running in S-mode. For
> > > > > > > > > > > > > > U-Boot running in M-mode, specific timer drivers 
> > > > > > > > > > > > > > will have
> > to be provided.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Signed-off-by: Anup Patel 
> > > > > > > > > > > > > > ---
> > > > > > > > > > > > > >  arch/Kconfig|  1 -
> > > > > > > > > > > > > >  arch/riscv/Kconfig  | 22 +++
> > > > > > > > > > > > > >  arch/riscv/lib/Makefile |  1 +
> > > > > > > > > > > > > >  arch/riscv/lib/time.c   | 60
> > +
> > > > > > > > > > > > > >  4 files changed, 78 insertions(+), 6
> > > > > > > > > > > > > > deletions(-)  create mode 100644
> > > > > > > > > > > > > > arch/riscv/lib/time.c
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > diff --git a/arch/Kconfig b/arch/Kconfig index
> > > > > > > > > > > > > > 9fdd2f7e66..a4fcb3522d 100644
> > > > > > > > > > > > > > --- a/arch/Kconfig
> > > > > > > > > > > > > > +++ b/arch/Kconfig
> > > > > > > > > > > > > > @@ -72,7 +72,6 @@ config RISCV
> > > > > > > > > > > > > > imply BLK
> > > > > > > > > > > > > > imply CLK
> > > > > > > > > > > > > > imply MTD
> > > > > > > > > > > > > > -   imply TIMER
> > > > > > > > > > > > >
> > > > > > > > > > > > > No, please don't do this.
> > > > > > > > > > > >
> > > > > > > > > > > > I am removing here but selecting it only for M-mode 
> > > > > > > > > > > > U-Boot.
> > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > > imply CMD_DM
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >  config SANDBOX
> > > > > > > > > > > > > > diff --git a/arch/riscv/Kconfig
> > > > > > > > > > > > > > b/arch/riscv/Kconfig index
> > > > > > > > > > > > > > 732a357a99..20a060454b 100644
> > > > > > > > > > > > > > --- a/arch/riscv/Kconfig
> > > > > > > > > > > > > > +++ b/arch/riscv/Kconfig
> > > > > > > > > > > > > > @@ -44,6 +44,23 @@ config ARCH_RV64I
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >  endchoice
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > +choice
> > > > > > > > > > > > > > +   prompt "Run Mode"
> > > > > > > > > > > > > > +   default RISCV_MMODE
> > > > > > > > > > > > > > +
> > > > > > > > > > > > > > +config RISCV_MMODE
> > > > > > > > > > > > > > +   bool "Machine"
> > > > > > > > > > > > > > +   select TIMER
> > > > > > > > > > > > > > +   help
> > > > > > > > > > > > > > +  Choose this option to build U-Boot for 
> > > > > > > > > > > > > > RISC-V
> > M-Mode.
> > > > > > > > > > > > > > +
> > > > > > > > > > > > > > +config RISCV_SMODE
> > > > > > > > > > > > > > +   bool "Supervisor"
> > > > > > > > > > > > > > +   help
> > > > > > > > > > > > > > +  Choose this option to build U-Boot for 
> > > > > > > > > > > > > > RISC-V
> > S-Mode.
> > > > > > > > > > > >

Re: [U-Boot] [PATCH] rockchip: rk3288: dts: remove 'vmmc' from emmc node

2018-12-03 Thread Kever Yang
Hi Fabio,


On 12/03/2018 07:27 PM, Fabio Estevam wrote:
> Hi Kever,
>
> On Mon, Dec 3, 2018 at 2:00 AM Kever Yang  wrote:
>> The U-Boot eMMC does not need to care about the power for Rockchip
>> SoC, because if the board is using eMMC, the power will default on
>> (for bootrom), and we do not do power management for it like kernel,
>> so the 'vmmc', 'vqmmc' is only useful for SD in U-Boot.
> Devicetree should represent the hardware and should not rely on
> details of BootROM / kernel / U-Boot.
>
> If these supplies are present in the hardware, they should be
> represented in the devicetree.
>
> What is the exact issue you are trying to solve?

The U-Boot will fail to boot if eMMC driver try to enable the regulator
with error return.
These two nodes makes the eMMC driver need depends on pmic/regulator driver
works good.
My case is I have two similar boards, but have different pmic or pmic
config,
then only the one with correct config can boot successful.
I know you would ask me to commit a new dts with correct pmic config,
but please
note that there are much much more boards then what the upstream already
have.
We are not possible to add every board, and I don't think we have to.

After sync with rockchip eMMC maintainer, we think if a board wants eMMC
as main storage,
the power will default on, only the SD is the one need to take care
about default power.

The basic functionality of a boot loader is to load next stage firmware
to RAM and
boot into it, the only driver mucs work is eMMC(if this is main
storage), so that the CPU
and eMMC works then we can boot into kernel even if the pmic driver is
broken.

I understand the Device tree 'should' represent the hardware, but you
'should' know every
program has different requirement to dts, many nodes are U-Boot only,
and many nodes
are kernel only. In this case, I choose not to use these two nodes in
U-Boot.

Thanks,
- Kever
>



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


[U-Boot] [PATCH] net: mvgbe: fallback phy-mode to GMII

2018-12-03 Thread Chris Packham
Some existing device trees don't specify a phy-mode so fallback to GMII
when a phy-mode is not provided.

Signed-off-by: Chris Packham 
---
This is similar to what the Linux mv643xx_eth.c network driver does to
handle the same case.

 drivers/net/mvgbe.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index 74fed7abd837..037e59ec6e3c 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -1005,10 +1005,8 @@ static int mvgbe_ofdata_to_platdata(struct udevice *dev)
phy_mode = fdt_getprop(gd->fdt_blob, pnode, "phy-mode", NULL);
if (phy_mode)
pdata->phy_interface = phy_get_interface_by_name(phy_mode);
-   if (pdata->phy_interface == -1) {
-   debug("%s: Invalid PHY interface '%s'\n", __func__, phy_mode);
-   return -EINVAL;
-   }
+   else
+   pdata->phy_interface = PHY_INTERFACE_MODE_GMII;
 
dmvgbe->phy_interface = pdata->phy_interface;
 
-- 
2.19.2

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


[U-Boot] [PATCH] distro: not taint environment variables if possible

2018-12-03 Thread AKASHI Takahiro
The aim of this patch is not to have temporary variables used in
distro_bootcmd left as environment variables after run something.
See the discussion[1].
Without this patch, saveenv command also saves those variables, too.
While they are apparently safe, scsi_need_init can be harmful.

Please note that, in most cases, a variable should be converted to
hush's local variable, while "devplist" cannot because it is created
by "part" command as an environment variable.

[1] https://lists.denx.de/pipermail/u-boot/2018-December/350209.html

Signed-off-by: AKASHI Takahiro 
---
 include/config_distro_bootcmd.h | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 373fee78a999..979aca6475a9 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -27,7 +27,7 @@
 
 #define BOOTENV_SHARED_BLKDEV_BODY(devtypel) \
"if " #devtypel " dev ${devnum}; then " \
-   "setenv devtype " #devtypel "; " \
+   "devtype=" #devtypel "; " \
"run scan_dev_for_boot_part; " \
"fi\0"
 
@@ -37,7 +37,7 @@
 
 #define BOOTENV_DEV_BLKDEV(devtypeu, devtypel, instance) \
"bootcmd_" #devtypel #instance "=" \
-   "setenv devnum " #instance "; " \
+   "devnum=" #instance "; " \
"run " #devtypel "_boot\0"
 
 #define BOOTENV_DEV_NAME_BLKDEV(devtypeu, devtypel, instance) \
@@ -77,7 +77,7 @@
"if ubi part ${bootubipart} && " \
"ubifsmount ubi${devnum}:${bootubivol}; " \
"then " \
-   "setenv devtype ubi; " \
+   "devtype=ubi; " \
"run scan_dev_for_boot; " \
"fi\0"
 #define BOOTENV_DEV_UBIFS  BOOTENV_DEV_BLKDEV
@@ -180,11 +180,11 @@
 
 #ifdef CONFIG_SCSI
 #define BOOTENV_RUN_SCSI_INIT "run scsi_init; "
-#define BOOTENV_SET_SCSI_NEED_INIT "setenv scsi_need_init; "
+#define BOOTENV_SET_SCSI_NEED_INIT "scsi_need_init=; "
 #define BOOTENV_SHARED_SCSI \
"scsi_init=" \
"if ${scsi_need_init}; then " \
-   "setenv scsi_need_init false; " \
+   "scsi_need_init=false; " \
"scsi scan; " \
"fi\0" \
\
@@ -404,7 +404,8 @@
"bootfstype; then "   \
"run scan_dev_for_boot; " \
"fi; "\
-   "done\0"  \
+   "done; "  \
+   "setenv devplist\0"   \
\
BOOT_TARGET_DEVICES(BOOTENV_DEV)  \
\
-- 
2.19.1

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


Re: [U-Boot] Some tegra cleanups and Kconfig migrations

2018-12-03 Thread Peter Robinson
Tom,

> The SYS_I2C patch doesn't apply cleanly to TOT u-boot-tegra/master (see below 
> git am spew).  Please take a look & let me know when you've resent a fixed 
> patchset and I'll retry.

I'm not sure where u-boot-tegra/master is but I just applied the
patches to 2019.01-rc1 upstream and they all applied fine with git am
so I'm not sure the difference between your branch and upstream.

Peter

> tom@tom-lt2:~/denx/uboot-tegra$ git am -s --whitespace=strip 
> ~/Downloads/bundle-17667-Peter-cleanup-6.mbox
> Applying: tegra: cleanup dangling comments in include/configs
> Applying: tegra20: common: fix USB_EHCI_TXFIFO_THRESH value
> Applying: Kconfig: tegra: Migrate SYS_I2C_TEGRA
> error: patch failed: configs/apalis-tk1_defconfig:29
> error: configs/apalis-tk1_defconfig: patch does not apply
> error: patch failed: configs/apalis_t30_defconfig:26
> error: configs/apalis_t30_defconfig: patch does not apply
> error: patch failed: configs/beaver_defconfig:26
> error: configs/beaver_defconfig: patch does not apply
> error: patch failed: configs/cardhu_defconfig:23
> error: configs/cardhu_defconfig: patch does not apply
> error: patch failed: configs/cei-tk1-som_defconfig:25
> error: configs/cei-tk1-som_defconfig: patch does not apply
> error: patch failed: configs/colibri_t20_defconfig:33
> error: configs/colibri_t20_defconfig: patch does not apply
> error: patch failed: configs/colibri_t30_defconfig:25
> error: configs/colibri_t30_defconfig: patch does not apply
> error: patch failed: configs/dalmore_defconfig:25
> error: configs/dalmore_defconfig: patch does not apply
> error: patch failed: configs/jetson-tk1_defconfig:26
> error: configs/jetson-tk1_defconfig: patch does not apply
> error: patch failed: configs/nyan-big_defconfig:41
> error: configs/nyan-big_defconfig: patch does not apply
> error: patch failed: configs/p2771--000_defconfig:20
> error: configs/p2771--000_defconfig: patch does not apply
> error: patch failed: configs/p2771--500_defconfig:20
> error: configs/p2771--500_defconfig: patch does not apply
> error: patch failed: configs/seaboard_defconfig:22
> error: configs/seaboard_defconfig: patch does not apply
> error: patch failed: configs/tec-ng_defconfig:23
> error: configs/tec-ng_defconfig: patch does not apply
> error: patch failed: configs/trimslice_defconfig:24
> error: configs/trimslice_defconfig: patch does not apply
> error: patch failed: configs/venice2_defconfig:24
> error: configs/venice2_defconfig: patch does not apply
> Patch failed at 0003 Kconfig: tegra: Migrate SYS_I2C_TEGRA
> The copy of the patch that failed is found in:
>/home/tom/denx/uboot-tegra/.git/rebase-apply/patch
> When you have resolved this problem, run "git am --resolved".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
>
> -Original Message-
> From: Tom Warren
> Sent: Wednesday, November 7, 2018 8:17 AM
> To: Peter Robinson ; u-boot@lists.denx.de; Tom Rini 
> 
> Subject: RE: Some tegra cleanups and Kconfig migrations
>
> Sorry, Peter. I missed these. I'll take a look today and get a PR out to Tom 
> before EOW.
>
> -Original Message-
> From: Peter Robinson 
> Sent: Wednesday, November 7, 2018 7:12 AM
> To: u-boot@lists.denx.de; Tom Warren ; Tom Rini 
> 
> Subject: Re: Some tegra cleanups and Kconfig migrations
>
> Tom or Tom,
>
> Any chance we could get these reviewed and merged, mostly generic cleanups so 
> I don't think most of them are controversial.
>
> Peter
>
> On Sun, Sep 16, 2018 at 6:23 PM Peter Robinson  wrote:
> >
> > The following patches are a few cleanups to dangling comments from
> > Kconfig cleanups and migrations of SYS_I2C_TEGRA, USB_EHCI_TEGRA and 
> > TEGRA_KEYBOARD.
> > There's also a couple of other minors fixes and cleanups as well.
>
> ---
> This email message is for the sole use of the intended recipient(s) and may 
> contain
> confidential information.  Any unauthorized review, use, disclosure or 
> distribution
> is prohibited.  If you are not the intended recipient, please contact the 
> sender by
> reply email and destroy all copies of the original message.
> ---
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [RFC PATCH] tools: add a generic config for native tools building

2018-12-03 Thread Peter Robinson
On Sat, Dec 1, 2018 at 2:34 PM Otavio Salvador
 wrote:
>
> On Sat, Dec 1, 2018 at 12:18 PM Peter Robinson  wrote:
> > On Sat, 1 Dec 2018, 13:54 Tom Rini  > > On Sat, Dec 01, 2018 at 10:27:49AM +, Peter Robinson wrote:
> > > > On Thu, Nov 29, 2018 at 6:40 PM Tom Rini  wrote:
> > > > >
> > > > > On Tue, Nov 27, 2018 at 06:20:08PM -0200, Otavio Salvador wrote:
> > > > >
> > > > > > The motivation for this is to allow distributions to distribute all
> > > > > > possible tools in a generic way, avoiding the need of specific tools
> > > > > > building for each machine.
> > > > > >
> > > > > > Especially on OpenEmbedded / Yocto Project ecosystem, it is very
> > > > > > common each BSP to end providing their specific tools when they need
> > > > > > to generate images for some SoC (e.g MX23 / MX28 in meta-freescale
> > > > > > case).
> > > > > >
> > > > > > Using this, we can package the tools doing:
> > > > > >
> > > > > > $: make tools-only_defconfig
> > > > > > $: make tools-only
> > > > > >
> > > > > > Signed-off-by: Otavio Salvador 
> > > > > > ---
> > > > > >
> > > > > >  configs/tools-only_defconfig | 3 +++
> > > > > >  tools/Makefile   | 2 +-
> > > > > >  2 files changed, 4 insertions(+), 1 deletion(-)
> > > > > >  create mode 100644 configs/tools-only_defconfig
> > > > > >
> > > > > > diff --git a/configs/tools-only_defconfig
> > > b/configs/tools-only_defconfig
> > > > > > new file mode 100644
> > > > > > index 00..be69bdf43a
> > > > > > --- /dev/null
> > > > > > +++ b/configs/tools-only_defconfig
> > > > > > @@ -0,0 +1,3 @@
> > > > > > +CONFIG_SYS_TEXT_BASE=0
> > > > > > +CONFIG_FIT=y
> > > > > > +CONFIG_FIT_SIGNATURE=y
> > > > > > diff --git a/tools/Makefile b/tools/Makefile
> > > > > > index 3c0521f655..e916d0cebb 100644
> > > > > > --- a/tools/Makefile
> > > > > > +++ b/tools/Makefile
> > > > > > @@ -124,7 +124,7 @@ fit_info-objs   := $(dumpimage-mkimage-objs)
> > > fit_info.o
> > > > > >  fit_check_sign-objs   := $(dumpimage-mkimage-objs) fit_check_sign.o
> > > > > >  file2include-objs := file2include.o
> > > > > >
> > > > > > -ifneq ($(CONFIG_MX23)$(CONFIG_MX28),)
> > > > > > +ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CONFIG_FIT_SIGNATURE),)
> > > > > >  # Add CONFIG_MXS into host CFLAGS, so we can check whether or not
> > > register
> > > > > >  # the mxsimage support within tools/mxsimage.c .
> > > > > >  HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS
> > > > >
> > > > > Adding in Peter since Fedora had this same problem crop up.  Does
> > > > > something like this work for you guys?  Also adding in Vagrant
> > > Cascadian
> > > > > since Debian might want to switch to this too.  Thoughts?  Thanks!
> > > >
> > > > We currently use the tools-all option, details below, to build the
> > > > tools, which broken in 2018.11 on non arm/x86 platforms due to the
> > > > sandbox dep being added in there. I'm happy to adjust as necessary to
> > > > fix that but I'm not sure the difference between tools-all vs the
> > > > above.
> > > >
> > > > make CROSS_COMPILE="" defconfig V=1 O=builds/
> > > > make CROSS_COMPILE="" tools-all V=1 O=builds/
> > >
> > > Well, with the above you would do tools-only_defconfig then tools-all,
> > > and we would make sure to _not_ enable options in tools-only_defconfig
> > > that may not build on some host platforms as it's intended only for
> > > building tools rather than the myriad of things sandbox is used for.
> > >
> >
> > That would be fine as far as I'm concerned.
>
> If people are likely to use tools-all, we may use tools-all_defconfig
> so we connect both. What do you think guys?

That seems fine to me, let me know when there's something you'd like me to test.

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


[U-Boot] [ANN] U-Boot v2019.01-rc1 released

2018-12-03 Thread Tom Rini
Hey all,

So it's release day and I've put up v2019.01-rc1.  The merge window is
now closed and I've updated git and the tarballs are also up now.

Before I get into other comments, I need to talk about DM related
deadlines.  You may have seen a big series go out and say things related
to CONFIG_BLK need to be converted _right_now_ or be removed.  This was
a tad overzealous, and we had problems with prior notifications not
being noisy enough.  So, good news, we have some build related warnings
now.  And more good news, we've pushed some deadlines out until at least
v2019.04 or v2019.07.  But the bad news is that those are going to be
some rather firm deadlines.  So if you see a build warning, please do
look into fixing it, or asking for some help in fixing it as not all
issues are board-specific and we have some SoC-wide drivers that need
fixing.  But we need to update them.

Looking over my patchwork queue I see a few things I do want to grab but
given the time a CI cycle takes and that due to the RTC issue (thanks
again Heinrich for the fix!) I didn't get as much applied over the
weekend as I wanted, I see the following as things I want to pull in
over the next few days, even with -rc1 out:
https://patchwork.ozlabs.org/project/uboot/list/?series=78259
https://patchwork.ozlabs.org/project/uboot/list/?series=78360
https://patchwork.ozlabs.org/project/uboot/list/?series=78668

And I will be doing that in the next day or two.

Looking over git log --merges v2018.11.. I can make out the following
for a changelog:
- ftgmac100 improvements
- TI: CPSW improvements
- VSC8584 PHY support
- Add MT7628 ethernet driver
- Various sunxi, socfpga, riscv improvements
- virtio implementation and supporting patches
- DM_FLAG_PRE_RELOC fixes
- regmap improvements
- Various improvements in sandbox and buildman
- Initial bcm968580xref, am65x_evm_r5 support
- lpc32xx, omap3_logic/am3517_evm updates
- pinctrl command
- fs_loader available for SPL
- MIPS: fix long-standing issue with linking of standalone programs
- MIPS: MT76xx: add GPIO and WDT drivers
- MIPS: MT76xx: various fixes and updates to gardena-smart-gateway board
- MIPS: MT76xx: various fixes and updates to linkit-smart-7688 board
- adc enhancements
- Clearfog GT-8K support added by Baruch / Raheeb
- Minor cleanup to db-88f6820 from Chris
- Bring in the series from Simon for SPL logging support and bloblist
- chiliboard updates
- misc TI platform updates
- chiliboard updates
- Introduce CONFIG_SPL_DM_USB
- Add MediaTek support
- mmc: meson-gx: Add AXG compatible
- net: designware: add meson meson compatibles
- Amlogic Meson cleanup for AXG SoC support
- meson: Add regmap support for clock driver and sync DT with 4.19
- Some Kirkwood boards converted to DM_SPI by Chris
- New Armada-385 SoC revision printed by Chris
- Ethernet enable on mcbin by Baruch
- Support 2 DRAM banks on Armada-8k boards by Baruch
- Convert TPM fully to DM
- Add a 'make qcheck' target for faster testing 
- Rockchip improvements:
- RK3188 USB-UART functionality
- errors triggering a hard-stop in SPL on the RK3399 are reported
- Rockchip RV1108 (SoC) support
- MicroCrystal RV3029 (RTC) DM driver
- Rockchip fixes:
- RK3188 early UART setup
- limit SD-card frequency to 40MHz on the RK3399-Q7
- MIPI fixes
- RK3399 CPUB clock initialisation
- ARC:
- Try to match found HW features to known ARC core templates
- Print CPU frequency for all ARC boards
- Add more board-specific info
- microblaze:
- Use default functions for memory decoding
- Showing model from DT
- zynq:
- Fix spi flash DTs
- Fix zynq_help_text with CONFIG_SYS_LONGHELP
- Tune cse/mini configurations
- Enabling cse/mini testing with current targets
- zynqmp:
- Enable gzip SPL support
- Fix chip detection logic
- Tune mini configurations
- DT fixes(spi-flash, models, clocks, etc)
- Add support for OF_SEPARATE configurations
- Enabling mini testing with current targets
- Add mini mtest configuration
- Some minor config setting
- Raspberry Pi: 3A+, Allow 2nd MMC device, Allow UUID to find filesystem
- UEFI:
- Make PE images more standards compliant
- Improve sandbox support
- Improve correctness
- Fix RISC-V execution on virt model
- Honor board defined top of ram (fixes a few boards)
- Imply DM USB access when distro boot is available
- Code cleanups

And I'm glad a lot of custodians have taken the time to put a brief
summary of what's in a pull request.  I've even switched to making my
own branches and merging those in rather than directly applying to
master to have more information available when writing these summa

Re: [U-Boot] [U-Boot, PATCHv3, 4/4] dm: MIGRATION: Update migration plan for BLK

2018-12-03 Thread Tom Rini
On Thu, Nov 29, 2018 at 06:21:14PM -0500, Tom Rini wrote:

> The biggest part of migration to using CONFIG_BLK is that we need to
> have the various subsystems migrated first, so reword the plan here to
> reference the new deadlines.
> 
> Reviewed-by: Simon Glass 
> Signed-off-by: Tom Rini 

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] MAINTAINERS: board: qcom: db820c: update email.

2018-12-03 Thread Tom Rini
On Sat, Dec 01, 2018 at 09:20:28PM +0100, Jorge Ramirez-Ortiz wrote:

> Update email address
> 
> Signed-off-by: Jorge Ramirez-Ortiz 

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, PATCHv3, 2/4] dm: MIGRATION: Add migration plan for DM_USB

2018-12-03 Thread Tom Rini
On Thu, Nov 29, 2018 at 06:21:12PM -0500, Tom Rini wrote:

> As much of the USB system has been migrated to DM now, formalize a
> deadline for migration.
> 
> Reviewed-by: Marek Vasut 
> Reviewed-by: Simon Glass 
> Signed-off-by: Tom Rini 

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] rpi patch queue 2018-12-03

2018-12-03 Thread Tom Rini
On Mon, Dec 03, 2018 at 08:26:32PM +0100, Alexander Graf wrote:

> Hi Tom,
> 
> This is my current patch queue for rpi.  Please pull.
> 
> Alex
> 
> 
> The following changes since commit 952061352acfd24034e6990b6b7d32cded020c0a:
> 
>   drivers: rtc: correctly convert seconds to time structure (2018-12-01 
> 18:03:14 -0500)
> 
> are available in the git repository at:
> 
>   git://github.com/agraf/u-boot.git tags/signed-rpi-next
> 
> for you to fetch changes up to d61cf138bce890b0b79745e48a908062bc36b99f:
> 
>   rpi: add 3 Model A+ (2018-12-03 20:25:06 +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] Revert "serial: ns16550: fix debug uart putc called before init"

2018-12-03 Thread Tom Rini
On Mon, Dec 03, 2018 at 09:55:33PM +0100, Simon Goldschmidt wrote:

> This reverts commit 6f57c34473d37b8da5e6a3764d0d377d748aeef1 since it
> does not seem to work at least on rk3399.
> 
> The Rockchip Technical Reference Manual (TRM) for the rk3399 says the baud
> rate prescaler register is readable only when USR[0] is zero. Since this
> bit is defined as "reserved" in the socfpga cylcone5 TRM, let's rather
> drop this than making the ns16550 debug uart more platform specific.
> 
> Reported-by: Roosen Henri 
> Signed-off-by: Simon Goldschmidt 
> Reviewed-by: Philipp Tomsich 

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, PATCHv3, 3/4] dm: MIGRATION: Add migration plan for CONFIG_SATA

2018-12-03 Thread Tom Rini
On Thu, Nov 29, 2018 at 06:21:13PM -0500, Tom Rini wrote:

> As the core of the subsystem has been converted along with some of the
> drivers, formalize a deadline for migration.
> 
> Cc: Akshay Bhat 
> Cc: Andreas Geisreiter 
> Cc: Bin Meng 
> Cc: Christian Gmeiner 
> Cc: Fabio Estevam 
> Cc: Jason Liu 
> Cc: Ken Lin 
> Cc: Ludwig Zenz 
> Cc: Marek Vasut 
> Cc: Max Krummenacher 
> Cc: Nikita Kiryanov 
> Cc: Otavio Salvador 
> Cc: Peng Fan 
> Reviewed-by: Simon Glass 
> Cc: Soeren Moch 
> Cc: Stefan Roese 
> Cc: Stefano Babic 
> Cc: Tim Harvey 
> Cc: Troy Kisky 
> Cc: Tuomas Tynkkynen 
> Cc: York Sun 
> Signed-off-by: Tom Rini 

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] [GIT PULL] Xilinx patches for v2019.01

2018-12-03 Thread Tom Rini
On Mon, Dec 03, 2018 at 04:50:47PM +0100, Michal Simek wrote:

> Hi Tom,
> 
> Here are patches for v2019.01 which I have put together.
> 
> Travis build is still running that's why will see how it will look like.
> https://travis-ci.org/michalsimek/u-boot/builds/462865171
> 
> I can't see any problem with patches now and wanted to get this to your
> attention because of end of MW.
> 
> Thanks,
> Michal
> 
> 
> The following changes since commit 5830791d91d1200854ef78fcb32f808c8080f0f0:
> 
>   Merge tag 'pull-tg18' of git://git.denx.de/u-boot-dm (2018-11-23
> 17:25:27 -0500)
> 
> are available in the git repository at:
> 
> 
>   git://www.denx.de/git/u-boot-microblaze.git tags/xilinx-for-v2019.01
> 
> for you to fetch changes up to 5f68f44c14ab93ffc44a9285e0970cba467276c6:
> 
>   net: zynq_gem: Add check for 64-bit dma support by hardware
> (2018-12-03 16:22:06 +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, PATCHv3, 1/4] dm: MIGRATION: Add migration plan for DM_MMC

2018-12-03 Thread Tom Rini
On Thu, Nov 29, 2018 at 06:21:11PM -0500, Tom Rini wrote:

> Given that at this point the MMC subsystem itself has been migrated
> along with a number of subsystem drivers, formalize a deadline for
> migration.
> 
> Reviewed-by: Simon Glass 
> Cc: Jaehoon Chung 
> Signed-off-by: Tom Rini 
> Reviewed-by: Simon Goldschmidt 
> Reviewed-by: Philipp Tomsich 

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] efi patch queue 2018-12-03

2018-12-03 Thread Tom Rini
On Mon, Dec 03, 2018 at 08:22:59PM +0100, Alexander Graf wrote:

> Hi Tom,
> 
> This is my current patch queue for efi.  Please pull.
> 
> Alex
> 
> 
> The following changes since commit 952061352acfd24034e6990b6b7d32cded020c0a:
> 
>   drivers: rtc: correctly convert seconds to time structure (2018-12-01 
> 18:03:14 -0500)
> 
> are available in the git repository at:
> 
>   git://github.com/agraf/u-boot.git tags/signed-efi-next
> 
> for you to fetch changes up to 1a82b3413cb577cd52cf8a1dc22dd306e4ce0772:
> 
>   efi_loader: bootmgr: add load option helper functions (2018-12-03 00:17:45 
> +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] [PULL] u-boot-sh/master

2018-12-03 Thread Tom Rini
On Mon, Dec 03, 2018 at 08:08:05PM +0100, Marek Vasut wrote:

> The following changes since commit 952061352acfd24034e6990b6b7d32cded020c0a:
> 
>   drivers: rtc: correctly convert seconds to time structure (2018-12-01
> 18:03:14 -0500)
> 
> are available in the Git repository at:
> 
>   git://git.denx.de/u-boot-sh.git master
> 
> for you to fetch changes up to 8e6442e3cd07249dd45948e44f17f7e51d638f8d:
> 
>   ARM: rmobile: Enable MMC HS400 on Salvator-X, ULCB, Ebisu (2018-12-03
> 12:51:17 +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] Re : Re: [PATCH] exynos: imply SYS_THUMB_BUILD

2018-12-03 Thread Minkyu Kang
Dear Tom,

On 04/12/18 05:23, Tom Rini wrote:
> On Mon, Dec 03, 2018 at 08:57:21PM +0100, Guillaume GARDET wrote:
> 
>>
>> Hi,
>>
>> not sure through which tree it should go and who should take care of it?
> 
> I will likely pick this up "soon" if I don't seen an overall Samsung PR,
> thanks!
> 

It's OK to take this patch by you.

Acked-by: Minkyu Kang 

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


[U-Boot] about rk3399 boot speed

2018-12-03 Thread Kever Yang
Hi Philipp,

    When I test on firefly-rk3399 with latest mainline U-Boot, it boots
very very slow,

and it's due to the first time of cru driver bind(U-Boot proper) and the
clk_set_defaults() cost about 5S.

    Does puma board has the same problem?


Thanks,

- Kever



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


Re: [U-Boot] [PATCH] Revert "serial: ns16550: fix debug uart putc called before init"

2018-12-03 Thread Kever Yang
Hi Simon,


On 12/04/2018 04:55 AM, Simon Goldschmidt wrote:
> This reverts commit 6f57c34473d37b8da5e6a3764d0d377d748aeef1 since it
> does not seem to work at least on rk3399.
>
> The Rockchip Technical Reference Manual (TRM) for the rk3399 says the baud
> rate prescaler register is readable only when USR[0] is zero. Since this
> bit is defined as "reserved" in the socfpga cylcone5 TRM, let's rather
> drop this than making the ns16550 debug uart more platform specific.
>
> Reported-by: Roosen Henri 
> Signed-off-by: Simon Goldschmidt 

Reviewed-by:  Kever Yang 

Thanks,
- Kever
> ---
>
>  drivers/serial/ns16550.c | 18 ++
>  1 file changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
> index f21c240e64..25b9d17243 100644
> --- a/drivers/serial/ns16550.c
> +++ b/drivers/serial/ns16550.c
> @@ -272,26 +272,12 @@ static inline void _debug_uart_init(void)
>   serial_dout(&com_port->lcr, UART_LCRVAL);
>  }
>  
> -static inline int NS16550_read_baud_divisor(struct NS16550 *com_port)
> -{
> - int ret;
> -
> - serial_dout(&com_port->lcr, UART_LCR_BKSE | UART_LCRVAL);
> - ret = serial_din(&com_port->dll) & 0xff;
> - ret |= (serial_din(&com_port->dlm) & 0xff) << 8;
> - serial_dout(&com_port->lcr, UART_LCRVAL);
> -
> - return ret;
> -}
> -
>  static inline void _debug_uart_putc(int ch)
>  {
>   struct NS16550 *com_port = (struct NS16550 *)CONFIG_DEBUG_UART_BASE;
>  
> - while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) {
> - if (!NS16550_read_baud_divisor(com_port))
> - return;
> - }
> + while (!(serial_din(&com_port->lsr) & UART_LSR_THRE))
> + ;
>   serial_dout(&com_port->thr, ch);
>  }
>  


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


[U-Boot] [PATCH] ARM: dts: Turn ULCB into Multi-DTB config

2018-12-03 Thread Marek Vasut
Bundle DTBs for R8A7795, R8A7796 ULCB variants into single U-Boot
build and let U-Boot choose between them based on the CPU model.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 board/renesas/ulcb/ulcb.c  | 18 ++
 configs/r8a7795_ulcb_defconfig |  2 ++
 configs/r8a7796_ulcb_defconfig |  2 ++
 3 files changed, 22 insertions(+)

diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 628c5364b8..81d6f8f6f2 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -82,3 +82,21 @@ int dram_init_banksize(void)
 
return 0;
 }
+
+#ifdef CONFIG_MULTI_DTB_FIT
+int board_fit_config_name_match(const char *name)
+{
+   /* PRR driver is not available yet */
+   u32 cpu_type = rmobile_get_cpu_type();
+
+   if ((cpu_type == RMOBILE_CPU_TYPE_R8A7795) &&
+   !strcmp(name, "r8a7795-h3ulcb-u-boot"))
+   return 0;
+
+   if ((cpu_type == RMOBILE_CPU_TYPE_R8A7796) &&
+   !strcmp(name, "r8a7796-m3ulcb-u-boot"))
+   return 0;
+
+   return -1;
+}
+#endif
diff --git a/configs/r8a7795_ulcb_defconfig b/configs/r8a7795_ulcb_defconfig
index 2cefb1295e..df639f765f 100644
--- a/configs/r8a7795_ulcb_defconfig
+++ b/configs/r8a7795_ulcb_defconfig
@@ -33,6 +33,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7795-h3ulcb-u-boot"
+CONFIG_OF_LIST="r8a7795-h3ulcb-u-boot r8a7796-m3ulcb-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
diff --git a/configs/r8a7796_ulcb_defconfig b/configs/r8a7796_ulcb_defconfig
index 7e338e1fcb..536318da10 100644
--- a/configs/r8a7796_ulcb_defconfig
+++ b/configs/r8a7796_ulcb_defconfig
@@ -34,6 +34,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7796-m3ulcb-u-boot"
+CONFIG_OF_LIST="r8a7795-h3ulcb-u-boot r8a7796-m3ulcb-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
-- 
2.18.0

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


[U-Boot] [PATCH] ARM: rmobile: Drop unused macros from Gen3 boards

2018-12-03 Thread Marek Vasut
Drop unused MSTP macros from Gen3 boards. These are no longer needed
as the boards are using clock framework to manipulate clock.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 board/renesas/salvator-x/salvator-x.c | 1 -
 board/renesas/ulcb/ulcb.c | 2 --
 2 files changed, 3 deletions(-)

diff --git a/board/renesas/salvator-x/salvator-x.c 
b/board/renesas/salvator-x/salvator-x.c
index 9b37c34d66..8f0247e046 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -31,7 +31,6 @@ void s_init(void)
 {
 }
 
-#define SCIF2_MSTP310  BIT(10) /* SCIF2 */
 #define DVFS_MSTP926   BIT(26)
 #define HSUSB_MSTP704  BIT(4)  /* HSUSB */
 
diff --git a/board/renesas/ulcb/ulcb.c b/board/renesas/ulcb/ulcb.c
index 63550af1f0..628c5364b8 100644
--- a/board/renesas/ulcb/ulcb.c
+++ b/board/renesas/ulcb/ulcb.c
@@ -30,8 +30,6 @@ void s_init(void)
 {
 }
 
-#define GSX_MSTP112BIT(12) /* 3DG */
-#define SCIF2_MSTP310  BIT(10) /* SCIF2 */
 #define DVFS_MSTP926   BIT(26)
 #define HSUSB_MSTP704  BIT(4)  /* HSUSB */
 
-- 
2.18.0

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


[U-Boot] [PATCH] ARM: dts: Turn Salvator-X into Multi-DTB config

2018-12-03 Thread Marek Vasut
Bundle DTBs for R8A7795, R8A7796, R8A77965 Salvator-X variants
into the single U-Boot build and let U-Boot choose between them
based on the CPU model.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 board/renesas/salvator-x/salvator-x.c | 22 ++
 configs/r8a7795_salvator-x_defconfig  |  2 ++
 configs/r8a77965_salvator-x_defconfig |  2 ++
 configs/r8a7796_salvator-x_defconfig  |  2 ++
 4 files changed, 28 insertions(+)

diff --git a/board/renesas/salvator-x/salvator-x.c 
b/board/renesas/salvator-x/salvator-x.c
index 8b15267d7b..9b37c34d66 100644
--- a/board/renesas/salvator-x/salvator-x.c
+++ b/board/renesas/salvator-x/salvator-x.c
@@ -100,3 +100,25 @@ void reset_cpu(ulong addr)
writel(RST_CODE, RST_CA57RESCNT);
 #endif
 }
+
+#ifdef CONFIG_MULTI_DTB_FIT
+int board_fit_config_name_match(const char *name)
+{
+   /* PRR driver is not available yet */
+   u32 cpu_type = rmobile_get_cpu_type();
+
+   if ((cpu_type == RMOBILE_CPU_TYPE_R8A7795) &&
+   !strcmp(name, "r8a7795-salvator-x-u-boot"))
+   return 0;
+
+   if ((cpu_type == RMOBILE_CPU_TYPE_R8A7796) &&
+   !strcmp(name, "r8a7796-salvator-x-u-boot"))
+   return 0;
+
+   if ((cpu_type == RMOBILE_CPU_TYPE_R8A77965) &&
+   !strcmp(name, "r8a77965-salvator-x-u-boot"))
+   return 0;
+
+   return -1;
+}
+#endif
diff --git a/configs/r8a7795_salvator-x_defconfig 
b/configs/r8a7795_salvator-x_defconfig
index 0899de16b4..823688f0b1 100644
--- a/configs/r8a7795_salvator-x_defconfig
+++ b/configs/r8a7795_salvator-x_defconfig
@@ -33,6 +33,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7795-salvator-x-u-boot"
+CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot 
r8a77965-salvator-x-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
diff --git a/configs/r8a77965_salvator-x_defconfig 
b/configs/r8a77965_salvator-x_defconfig
index 4af3960c14..1753f03ea2 100644
--- a/configs/r8a77965_salvator-x_defconfig
+++ b/configs/r8a77965_salvator-x_defconfig
@@ -34,6 +34,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a77965-salvator-x-u-boot"
+CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot 
r8a77965-salvator-x-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
diff --git a/configs/r8a7796_salvator-x_defconfig 
b/configs/r8a7796_salvator-x_defconfig
index 8d6763a944..84a87f6a59 100644
--- a/configs/r8a7796_salvator-x_defconfig
+++ b/configs/r8a7796_salvator-x_defconfig
@@ -34,6 +34,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7796-salvator-x-u-boot"
+CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot 
r8a77965-salvator-x-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
-- 
2.18.0

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


[U-Boot] [PATCH] ARM: rmobile: Set environment variable containing CPU type

2018-12-03 Thread Marek Vasut
Set environment variable 'platform' containing the CPU type.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/Kconfig |  1 +
 arch/arm/mach-rmobile/cpu_info.c | 41 +---
 2 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 96eadb6fd6..17de95bf4e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -784,6 +784,7 @@ config ARCH_RMOBILE
imply CMD_DM
imply FAT_WRITE
imply SYS_THUMB_BUILD
+   imply ARCH_MISC_INIT if DISPLAY_CPUINFO
 
 config TARGET_S32V234EVB
bool "Support s32v234evb"
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index c9ebc9f40e..65a9ca8c01 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -5,6 +5,7 @@
  */
 #include 
 #include 
+#include 
 
 /* R-Car Gen3 caches are enabled in memmap-gen3.c */
 #ifndef CONFIG_RCAR_GEN3
@@ -67,19 +68,41 @@ static const struct {
{ 0x0, "CPU" },
 };
 
-int print_cpuinfo(void)
+static int rmobile_cpuinfo_idx(void)
 {
int i = 0;
u32 cpu_type = rmobile_get_cpu_type();
-   for (; i < ARRAY_SIZE(rmobile_cpuinfo); i++) {
-   if (rmobile_cpuinfo[i].cpu_type == cpu_type) {
-   printf("CPU: Renesas Electronics %s rev %d.%d\n",
-  rmobile_cpuinfo[i].cpu_name,
-  rmobile_get_cpu_rev_integer(),
-  rmobile_get_cpu_rev_fraction());
+
+   for (; i < ARRAY_SIZE(rmobile_cpuinfo); i++)
+   if (rmobile_cpuinfo[i].cpu_type == cpu_type)
break;
-   }
-   }
+
+   return i;
+}
+
+#ifdef CONFIG_ARCH_MISC_INIT
+int arch_misc_init(void)
+{
+   int i, idx = rmobile_cpuinfo_idx();
+   char cpu[10] = { 0 };
+
+   for (i = 0; i < sizeof(cpu); i++)
+   cpu[i] = tolower(rmobile_cpuinfo[idx].cpu_name[i]);
+
+   env_set("platform", cpu);
+
+   return 0;
+}
+#endif
+
+int print_cpuinfo(void)
+{
+   int i = rmobile_cpuinfo_idx();
+
+   printf("CPU: Renesas Electronics %s rev %d.%d\n",
+   rmobile_cpuinfo[i].cpu_name, rmobile_get_cpu_rev_integer(),
+   rmobile_get_cpu_rev_fraction());
+
return 0;
 }
 #endif /* CONFIG_DISPLAY_CPUINFO */
-- 
2.18.0

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


Re: [U-Boot] [PATCH v3 1/1] dm: core: add functions to get/remap I/O addresses by name

2018-12-03 Thread Simon Glass
On Mon, 3 Dec 2018 at 11:37, Álvaro Fernández Rojas  wrote:
>
> This functions allow us to get and remap I/O addresses by name, which is 
> useful when there are multiple reg addresses indexed by reg-names property.
> This is needed in bmips dma/eth patch series, but can also be used on many
> other drivers.
>
> Signed-off-by: Álvaro Fernández Rojas 
> ---
>  v3: add commit message
>  v2: add remap tests
>
>  arch/sandbox/dts/test.dts |  1 +
>  drivers/core/fdtaddr.c| 10 ++
>  drivers/core/read.c   | 20 
>  include/dm/fdtaddr.h  | 13 
>  include/dm/read.h | 36 +
>  test/dm/test-fdt.c| 82 
> +--
>  6 files changed, 160 insertions(+), 2 deletions(-)

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


Re: [U-Boot] [PATCH v3 0/8] Fix CVE-2018-18440 and CVE-2018-18439

2018-12-03 Thread Simon Glass
Hi Simon,

On Mon, 3 Dec 2018 at 12:05, Simon Goldschmidt
 wrote:
>
>
>
> Am Mo., 3. Dez. 2018, 19:20 hat Simon Glass  geschrieben:
>>
>> Hi Simon,
>>
>> On Mon, 3 Dec 2018 at 00:50, Simon Goldschmidt
>>  wrote:
>> >
>> > Simon,
>> >
>> > On Tue, Nov 27, 2018 at 6:45 AM Simon Goldschmidt
>> >  wrote:
>> > >
>> > > On Tue, Nov 27, 2018 at 2:02 AM Simon Glass  wrote:
>> > > >
>> > > > Hi Simon,
>> > > >
>> > > > On Sat, 17 Nov 2018 at 05:25, Simon Goldschmidt
>> > > >  wrote:
>> > > > >
>> > > > > This series fixes CVE-2018-18440 ("insufficient boundary checks in
>> > > > > filesystem image load") by adding restrictions to the 'load'
>> > > > > command and fixes CVE-2018-18439 ("insufficient boundary checks in
>> > > > > network image boot") by adding restrictions to the tftp code.
>> > > > >
>> > > > > The functions from lmb.c are used to setup regions of allowed and
>> > > > > reserved memory. Then, the file size to load is checked against these
>> > > > > addresses and loading the file is aborted if it would overwrite
>> > > > > reserved memory.
>> > > > >
>> > > > > The memory reservation code is reused from bootm/image.
>> > > > >
>> > > > > Changes in v3:
>> > > > > - No patch changes, but needed to resend since patman added too many 
>> > > > > cc
>> > > > >   addresses that gmail seemed to detect as spam :-(
>> > > > >
>> > > > > Changes in v2:
>> > > > > - added code to reserve devicetree reserved-memory in lmb
>> > > > > - added tftp fixes (patches 7 and 8)
>> > > > > - fixed a bug in new function lmb_alloc_addr
>> > > > >
>> > > > > Simon Goldschmidt (8):
>> > > > >   lib: lmb: reserving overlapping regions should fail
>> > > > >   fdt: parse "reserved-memory" for memory reservation
>> > > > >   lib: lmb: extend lmb for checks at load time
>> > > > >   fs: prevent overwriting reserved memory
>> > > > >   bootm: use new common function lmb_init_and_reserve
>> > > > >   lmb: remove unused extern declaration
>> > > > >   net: remove CONFIG_MCAST_TFTP
>> > > > >   tftp: prevent overwriting reserved memory
>> > > > >
>> > > > >  README   |   9 --
>> > > > >  common/bootm.c   |   8 +-
>> > > > >  common/image-fdt.c   |  52 ++-
>> > > > >  drivers/net/rtl8139.c|   9 --
>> > > > >  drivers/net/tsec.c   |  52 ---
>> > > > >  drivers/usb/gadget/ether.c   |   3 -
>> > > > >  fs/fs.c  |  56 ++-
>> > > > >  include/lmb.h|   7 +-
>> > > > >  include/net.h|  17 ---
>> > > > >  lib/lmb.c|  69 +
>> > > > >  net/eth-uclass.c |   4 -
>> > > > >  net/eth_legacy.c |  46 --
>> > > > >  net/net.c|   9 +-
>> > > > >  net/tftp.c   | 289 
>> > > > > +++
>> > > > >  scripts/config_whitelist.txt |   1 -
>> > > > >  15 files changed, 232 insertions(+), 399 deletions(-)
>> > > >
>> > > > This is great work, but what is missing is a test for lmb.
>> > >
>> > > Yeah, well, the tests didn't work on my system and I figured it's
>> > > better to get the code fixed than to use my time on trying to get the
>> > > tests running.
>> > >
>> > > However, after searching for the required packages and fiddling around
>> > > some more, I guess I made them work so I could add tests now...
>> > >
>> > > I also have work-in-progress for compressing fit image contents (we
>> > > currently only support uncompressing the kernel). It will switch some
>> > > 'lmb_reserve' calls to the new 'lmb_alloc_addr' as this is more safe.
>> > > Maybe I can combine the tests in that series?
>> >
>> > After managing to get the tests to run via 'make qcheck' (and 'make
>> > tests'; had to install much more than listed in 'test/py/README.md'),
>> > I tried to add tests to 'test/lib/' (next to hexdump.c), but I failed
>> > to get them run. Even chaning 'test/lib/hexdump.c' to fail did not
>> > produce errors. Are these tests not included in 'make qcheck'?
>>
>> That runs the Python tests which are in test/py/tests. Some of those
>> tests run compiled-in code (e.g. log_test.c and cmd_ut.c). Is your
>> test intended to be Python or C?
>
>
> I thought I'd create a unit test under test/lib that calls functions from 
> lmb.c, so that would be C code. Python would not work without adding extra 
> commands to call from Python.
>
> There are tests in test/lib, how do I run them?

I suspect it is lib/ since it is holds tests for library functions,
although hex_to_bin() is an inline function.

Better to put tests in another dir. Maybe test/image ?

You can run an individual test with something like:

/tmp/b/sandbox/u-boot  -d /tmp/b/sandbox/arch/sandbox/dts/test.dtb  -c
"ut dm lib_test_bin2hex"

where /tmp/b/sandbox is the build directory for sandbox.

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


Re: [U-Boot] Is mxsldr and mxsboot supported for imx7 processors

2018-12-03 Thread Otavio Salvador
Hello Sonu,

On Mon, Dec 3, 2018 at 9:06 PM Sonu Abraham  wrote:
> I would like to know the following regarding u-boot for imx7 processors.
>
> 1) Is the mxsldr and mxsboot tools  supported for imx7 processors from NXP ?

It is not. It supports MX23 and MX28 only.

> 2) If the above tools are supported for imx7 processors , is it possible to 
> provision QSPI NOR flash using the mxsldr and mxsboot.

I didn't try it but I expect it to be as all other i.MX processors.
You could try following:
https://github.com/FrankBau/meta-marsboard-bsp/wiki/Update-U-Boot-in-SPI-Flash

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9 9981-7854  Mobile: +1 (347) 903-9750
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH V2 11/13] ARM: dts: rmobile: Extract i2c6 on M2W Porter

2018-12-03 Thread Marek Vasut
The i2c6 node is missing in mainline Linux thus far, pull it
into U-Boot specific DT until it hits mainline Linux, to make
syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a7791-porter-u-boot.dts | 5 +
 arch/arm/dts/r8a7791-porter.dts| 5 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/dts/r8a7791-porter-u-boot.dts 
b/arch/arm/dts/r8a7791-porter-u-boot.dts
index 797fa9d6e7..275f6b4375 100644
--- a/arch/arm/dts/r8a7791-porter-u-boot.dts
+++ b/arch/arm/dts/r8a7791-porter-u-boot.dts
@@ -11,3 +11,8 @@
 &scif0 {
u-boot,dm-pre-reloc;
 };
+
+&i2c6 {
+   status = "okay";
+   clock-frequency = <40>;
+};
diff --git a/arch/arm/dts/r8a7791-porter.dts b/arch/arm/dts/r8a7791-porter.dts
index fa9a57d770..f2d5723fbd 100644
--- a/arch/arm/dts/r8a7791-porter.dts
+++ b/arch/arm/dts/r8a7791-porter.dts
@@ -372,11 +372,6 @@
clock-frequency = <40>;
 };
 
-&i2c6 {
-   status = "okay";
-   clock-frequency = <40>;
-};
-
 &sata0 {
status = "okay";
 };
-- 
2.18.0

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


[U-Boot] [PATCH V2 10/13] ARM: dts: rmobile: Extract SCIF2 node on E3 Ebisu

2018-12-03 Thread Marek Vasut
The SCIF2 node is not in Linux 4.17 DTs on E3, pull it into U-Boot
specific DT extras until it hits mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a77990-ebisu-u-boot.dts | 19 +++
 arch/arm/dts/r8a77990-ebisu.dts| 16 
 2 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/arch/arm/dts/r8a77990-ebisu-u-boot.dts 
b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
index 17b749545f..b030d5c649 100644
--- a/arch/arm/dts/r8a77990-ebisu-u-boot.dts
+++ b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
@@ -77,6 +77,19 @@
 };
 
 &pfc {
+   pinctrl-0 = <&scif_clk_pins>;
+   pinctrl-names = "default";
+
+   scif2_pins: scif2 {
+   groups = "scif2_data_a";
+   function = "scif2";
+   };
+
+   scif_clk_pins: scif_clk {
+   groups = "scif_clk_a";
+   function = "scif_clk";
+   };
+
sdhi0_pins: sd0 {
groups = "sdhi0_data4", "sdhi0_ctrl";
function = "sdhi0";
@@ -114,6 +127,12 @@
};
 };
 
+&scif2 {
+   pinctrl-0 = <&scif2_pins>;
+   pinctrl-names = "default";
+   status = "okay";
+};
+
 &sdhi0 {
/* full size SD */
pinctrl-0 = <&sdhi0_pins>;
diff --git a/arch/arm/dts/r8a77990-ebisu.dts b/arch/arm/dts/r8a77990-ebisu.dts
index cea08d7488..e337c902cb 100644
--- a/arch/arm/dts/r8a77990-ebisu.dts
+++ b/arch/arm/dts/r8a77990-ebisu.dts
@@ -122,9 +122,6 @@
 };
 
 &pfc {
-   pinctrl-0 = <&scif_clk_pins>;
-   pinctrl-names = "default";
-
avb_pins: avb {
mux {
groups = "avb_link", "avb_mii";
@@ -132,16 +129,6 @@
};
};
 
-   scif2_pins: scif2 {
-   groups = "scif2_data_a";
-   function = "scif2";
-   };
-
-   scif_clk_pins: scif_clk {
-   groups = "scif_clk_a";
-   function = "scif_clk";
-   };
-
usb0_pins: usb0 {
groups = "usb0";
function = "usb0";
@@ -208,8 +195,5 @@
 };
 
 &scif2 {
-   pinctrl-0 = <&scif2_pins>;
-   pinctrl-names = "default";
-
status = "okay";
 };
-- 
2.18.0

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


[U-Boot] [PATCH V2 09/13] ARM: dts: rmobile: Extract SDHI nodes on E3 Ebisu

2018-12-03 Thread Marek Vasut
The SDHI nodes are not in Linux 4.17 DTs in E3, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a77990-ebisu-u-boot.dts | 158 +
 arch/arm/dts/r8a77990-ebisu.dts|  36 --
 arch/arm/dts/r8a77990-u-boot.dtsi  |  24 
 arch/arm/dts/r8a77990.dtsi |  24 
 4 files changed, 182 insertions(+), 60 deletions(-)

diff --git a/arch/arm/dts/r8a77990-ebisu-u-boot.dts 
b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
index 8d4ea88a91..17b749545f 100644
--- a/arch/arm/dts/r8a77990-ebisu-u-boot.dts
+++ b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
@@ -7,3 +7,161 @@
 
 #include "r8a77990-ebisu.dts"
 #include "r8a77990-u-boot.dtsi"
+
+/ {
+   reg_1p8v: regulator0 {
+   compatible = "regulator-fixed";
+   regulator-name = "fixed-1.8V";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   reg_3p3v: regulator1 {
+   compatible = "regulator-fixed";
+   regulator-name = "fixed-3.3V";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   vcc_sdhi0: regulator-vcc-sdhi0 {
+   compatible = "regulator-fixed";
+
+   regulator-name = "SDHI0 Vcc";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+
+   gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   };
+
+   vccq_sdhi0: regulator-vccq-sdhi0 {
+   compatible = "regulator-gpio";
+
+   regulator-name = "SDHI0 VccQ";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+
+   gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
+   gpios-states = <1>;
+   states = <330 1
+ 180 0>;
+   };
+
+   vcc_sdhi1: regulator-vcc-sdhi1 {
+   compatible = "regulator-fixed";
+
+   regulator-name = "SDHI1 Vcc";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+
+   gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   };
+
+   vccq_sdhi1: regulator-vccq-sdhi1 {
+   compatible = "regulator-gpio";
+
+   regulator-name = "SDHI1 VccQ";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+
+   gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
+   gpios-states = <1>;
+   states = <330 1
+ 180 0>;
+   };
+};
+
+&pfc {
+   sdhi0_pins: sd0 {
+   groups = "sdhi0_data4", "sdhi0_ctrl";
+   function = "sdhi0";
+   power-source = <3300>;
+   };
+
+   sdhi0_pins_uhs: sd0_uhs {
+   groups = "sdhi0_data4", "sdhi0_ctrl";
+   function = "sdhi0";
+   power-source = <1800>;
+   };
+
+   sdhi1_pins: sd1 {
+   groups = "sdhi1_data4", "sdhi1_ctrl";
+   function = "sdhi1";
+   power-source = <3300>;
+   };
+
+   sdhi1_pins_uhs: sd1_uhs {
+   groups = "sdhi1_data4", "sdhi1_ctrl";
+   function = "sdhi1";
+   power-source = <1800>;
+   };
+
+   sdhi3_pins: sd2 {
+   groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
+   function = "sdhi3";
+   power-source = <1800>;
+   };
+
+   sdhi3_pins_uhs: sd2_uhs {
+   groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
+   function = "sdhi3";
+   power-source = <1800>;
+   };
+};
+
+&sdhi0 {
+   /* full size SD */
+   pinctrl-0 = <&sdhi0_pins>;
+   pinctrl-1 = <&sdhi0_pins_uhs>;
+   pinctrl-names = "default", "state_uhs";
+
+   vmmc-supply = <&vcc_sdhi0>;
+   vqmmc-supply = <&vccq_sdhi0>;
+   cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
+   wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
+   bus-width = <4>;
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr50;
+   sd-uhs-sdr104;
+   status = "okay";
+   max-frequency = <20800>;
+};
+
+&sdhi1 {
+   /* microSD */
+   pinctrl-0 = <&sdhi1_pins>;
+   pinctrl-1 = <&sdhi1_pins_uhs>;
+   pinctrl-names = "default", "state_uhs";
+
+   vmmc-supply = <&vcc_sdhi1>;
+   vqmmc-supply = <&vccq_sdhi1>;
+   cd-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>;
+   bus-width = <4>;
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr50;
+   sd-uhs-sdr104;
+   status 

[U-Boot] [PATCH V2] ARM: rmobile: Enable MMC extensions

2018-12-03 Thread Marek Vasut
Enable extended MMC commands and GPT partition table support.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/mach-rmobile/Kconfig | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-rmobile/Kconfig b/arch/arm/mach-rmobile/Kconfig
index d82023acf3..c6e5f75daf 100644
--- a/arch/arm/mach-rmobile/Kconfig
+++ b/arch/arm/mach-rmobile/Kconfig
@@ -13,6 +13,11 @@ config RCAR_GEN3
select ARM64
select PHY
select CMD_CACHE
+   imply CMD_FS_UUID
+   imply CMD_GPT
+   imply CMD_UUID
+   imply CMD_MMC_SWRITE if MMC
+   imply SUPPORT_EMMC_RPMB if MMC
 
 endchoice
 
-- 
2.18.0

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


[U-Boot] [PATCH V2 08/13] ARM: dts: rmobile: Extract SDHI extras on H3, M3W, M3N Salvator-X

2018-12-03 Thread Marek Vasut
The SDHI nodes are missing features supported in upstream U-Boot,
like mode support properties. Pull the extras into U-Boot specific
DT until it hits mainline Linux, to make syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a7795-salvator-x-u-boot.dts  | 28 +++
 arch/arm/dts/r8a7796-salvator-x-u-boot.dts  | 28 +++
 arch/arm/dts/r8a77965-salvator-x-u-boot.dts | 31 +
 arch/arm/dts/salvator-common.dtsi   | 17 ++-
 4 files changed, 90 insertions(+), 14 deletions(-)

diff --git a/arch/arm/dts/r8a7795-salvator-x-u-boot.dts 
b/arch/arm/dts/r8a7795-salvator-x-u-boot.dts
index 666fbf5a83..8be5e41a51 100644
--- a/arch/arm/dts/r8a7795-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a7795-salvator-x-u-boot.dts
@@ -7,3 +7,31 @@
 
 #include "r8a7795-salvator-x.dts"
 #include "r8a7795-u-boot.dtsi"
+
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
+
+&sdhi3 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
diff --git a/arch/arm/dts/r8a7796-salvator-x-u-boot.dts 
b/arch/arm/dts/r8a7796-salvator-x-u-boot.dts
index 7a8ad27795..44b2f9fb37 100644
--- a/arch/arm/dts/r8a7796-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a7796-salvator-x-u-boot.dts
@@ -7,3 +7,31 @@
 
 #include "r8a7796-salvator-x.dts"
 #include "r8a7796-u-boot.dtsi"
+
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
+
+&sdhi3 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
diff --git a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts 
b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
index 06002b629a..9e0cd26f40 100644
--- a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
@@ -7,3 +7,34 @@
 
 #include "r8a77965-salvator-x.dts"
 #include "r8a77965-u-boot.dtsi"
+
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+   status = "okay";
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+   status = "okay";
+};
+
+&sdhi3 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+   status = "okay";
+};
diff --git a/arch/arm/dts/salvator-common.dtsi 
b/arch/arm/dts/salvator-common.dtsi
index b036a713ea..2a7f36abd2 100644
--- a/arch/arm/dts/salvator-common.dtsi
+++ b/arch/arm/dts/salvator-common.dtsi
@@ -480,13 +480,13 @@
};
 
sdhi2_pins: sd2 {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
-   power-source = <1800>;
+   power-source = <3300>;
};
 
sdhi2_pins_uhs: sd2_uhs {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
power-source = <1800>;
};
@@ -618,13 +618,8 @@
cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
bus-width = <4>;
-   sd-uhs-sdr12;
-   sd-uhs-sdr25;
sd-uhs-sdr50;
-   sd-uhs-sdr104;
status = "okay";
-
-   max-frequency = <20800>;
 };
 
 &sdhi2 {
@@ -637,11 +632,9 @@
vqmmc-supply = <®_1p8v>;
bus-width = <8>;
mmc-hs200-1_8v;
-   mmc-hs400-1_8v;
non-removable;
fixed-emmc-driver-type = <1>;
status = "okay";
-   max-frequency = <2>;
 };
 
 &sdhi3 {
@@ -654,12 +647,8 @@
cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
bus-width = <4>;
-   sd-uhs-sdr12;
-   sd-uhs-sdr25;
sd-uhs-sdr50;
-   sd-uhs-sdr104;
status = "okay";
-   max-frequency = <20800>;
 };
 
 &ssi1 {
-- 
2.18.0

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


[U-Boot] [PATCH V2 03/13] ARM: dts: rmobile: Extract USB nodes on M3N

2018-12-03 Thread Marek Vasut
The USB nodes are not in Linux 4.17 DTs in M3N, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a77965-u-boot.dtsi | 55 +++
 arch/arm/dts/r8a77965.dtsi| 53 +
 2 files changed, 64 insertions(+), 44 deletions(-)

diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi 
b/arch/arm/dts/r8a77965-u-boot.dtsi
index ca80ef8f29..15d9467ec0 100644
--- a/arch/arm/dts/r8a77965-u-boot.dtsi
+++ b/arch/arm/dts/r8a77965-u-boot.dtsi
@@ -19,4 +19,59 @@
bank-width = <2>;
status = "disabled";
};
+
+   ehci0: usb@ee080100 {
+   compatible = "generic-ehci";
+   reg = <0 0xee080100 0 0x100>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 703>;
+   phys = <&usb2_phy0>;
+   phy-names = "usb";
+   companion= <&ohci0>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 703>;
+   };
+
+   usb2_phy0: usb-phy@ee080200 {
+   compatible = "renesas,usb2-phy-r8a77965",
+"renesas,rcar-gen3-usb2-phy";
+   reg = <0 0xee080200 0 0x700>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 703>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 703>;
+   #phy-cells = <0>;
+   };
+
+   ehci1: usb@ee0a0100 {
+   compatible = "generic-ehci";
+   reg = <0 0xee0a0100 0 0x100>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 702>;
+   phys = <&usb2_phy1>;
+   phy-names = "usb";
+   companion= <&ohci1>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 702>;
+   };
+
+   usb2_phy1: usb-phy@ee0a0200 {
+   compatible = "renesas,usb2-phy-r8a77965",
+"renesas,rcar-gen3-usb2-phy";
+   reg = <0 0xee0a0200 0 0x700>;
+   clocks = <&cpg CPG_MOD 702>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 702>;
+   #phy-cells = <0>;
+   };
+
+   xhci0: usb@ee00 {
+   compatible = "renesas,xhci-r8a77965",
+"renesas,rcar-gen3-xhci";
+   reg = <0 0xee00 0 0xc00>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 328>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 328>;
+   };
 };
diff --git a/arch/arm/dts/r8a77965.dtsi b/arch/arm/dts/r8a77965.dtsi
index 840512ecfa..a47f079c02 100644
--- a/arch/arm/dts/r8a77965.dtsi
+++ b/arch/arm/dts/r8a77965.dtsi
@@ -645,28 +645,18 @@
};
 
ehci0: usb@ee080100 {
-   compatible = "generic-ehci";
reg = <0 0xee080100 0 0x100>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 703>;
-   phys = <&usb2_phy0>;
-   phy-names = "usb";
-   companion= <&ohci0>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 703>;
-   status = "disabled";
+   /* placeholder */
};
 
usb2_phy0: usb-phy@ee080200 {
-   compatible = "renesas,usb2-phy-r8a77965",
-"renesas,rcar-gen3-usb2-phy";
reg = <0 0xee080200 0 0x700>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 703>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 703>;
-   #phy-cells = <0>;
-   status = "disabled";
+   /* placeholder */
+   };
+
+   usb2_phy1: usb-phy@ee0a0200 {
+   reg = <0 0xee0a0200 0 0x700>;
+   /* placeholder */
};
 
ohci1: usb@ee0a {
@@ -675,16 +665,8 @@
};
 
ehci1: usb@ee0a0100 {
-   compatible = "generic-ehci";
reg = <0 0xee0a0100 0 0x100>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 702>;
-   phys = <&usb2_phy1>;
-   phy-names = "usb";
-   companion= <&ohci1>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 702>;
-   status = "disabled";
+   /* placeholder */
};
 
i2c0: i2c@e650 {
@@ -852,17 +834,6 @@
};
};
 
-   usb2_phy1: usb-phy@ee0a02

[U-Boot] [PATCH V2 06/13] ARM: dts: rmobile: Extract CPLD node on H3 and M3W ULCB

2018-12-03 Thread Marek Vasut
The CPLD node is missing in Linux 4.17 DTs on H3/M3W ULCB, pull the
node into U-Boot specific DT until it hits mainline Linux, to make
syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a7795-h3ulcb-u-boot.dts | 11 +++
 arch/arm/dts/r8a7796-m3ulcb-u-boot.dts | 11 +++
 arch/arm/dts/ulcb.dtsi |  9 -
 3 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
index 06bd4f24ca..5cb5e9c6fb 100644
--- a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
@@ -7,3 +7,14 @@
 
 #include "r8a7795-h3ulcb.dts"
 #include "r8a7795-u-boot.dtsi"
+
+/ {
+   cpld {
+   compatible = "renesas,ulcb-cpld";
+   status = "okay";
+   gpio-sck = <&gpio6 8 0>;
+   gpio-mosi = <&gpio6 7 0>;
+   gpio-miso = <&gpio6 10 0>;
+   gpio-sstbz = <&gpio2 3 0>;
+   };
+};
diff --git a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
index a1d13ccf28..78bd4f26bd 100644
--- a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
@@ -7,3 +7,14 @@
 
 #include "r8a7796-m3ulcb.dts"
 #include "r8a7796-u-boot.dtsi"
+
+/ {
+   cpld {
+   compatible = "renesas,ulcb-cpld";
+   status = "okay";
+   gpio-sck = <&gpio6 8 0>;
+   gpio-mosi = <&gpio6 7 0>;
+   gpio-miso = <&gpio6 10 0>;
+   gpio-sstbz = <&gpio2 3 0>;
+   };
+};
diff --git a/arch/arm/dts/ulcb.dtsi b/arch/arm/dts/ulcb.dtsi
index e16c7f245e..c805265343 100644
--- a/arch/arm/dts/ulcb.dtsi
+++ b/arch/arm/dts/ulcb.dtsi
@@ -24,15 +24,6 @@
stdout-path = "serial0:115200n8";
};
 
-   cpld {
-   compatible = "renesas,ulcb-cpld";
-   status = "okay";
-   gpio-sck = <&gpio6 8 0>;
-   gpio-mosi = <&gpio6 7 0>;
-   gpio-miso = <&gpio6 10 0>;
-   gpio-sstbz = <&gpio2 3 0>;
-   };
-
audio_clkout: audio-clkout {
/*
 * This is same as <&rcar_sound 0>
-- 
2.18.0

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


[U-Boot] [PATCH V2 12/13] ARM: dts: rmobile: Sync Gen2 DTs with Linux 4.19.6

2018-12-03 Thread Marek Vasut
Synchronize DTs with mainline Linux 4.19.6 ,
commit 96db90800c06d3fe3fa08eb6222fe201286bb778

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a7790-lager.dts   |   8 ++-
 arch/arm/dts/r8a7790.dtsi| 101 ---
 arch/arm/dts/r8a7791-koelsch.dts |  11 ++--
 arch/arm/dts/r8a7791-porter.dts  |  41 -
 arch/arm/dts/r8a7791.dtsi|  51 +++-
 arch/arm/dts/r8a7792-blanche.dts |   5 ++
 arch/arm/dts/r8a7792.dtsi|  19 +-
 arch/arm/dts/r8a7793-gose.dts|  11 ++--
 arch/arm/dts/r8a7793.dtsi|  52 +++-
 arch/arm/dts/r8a7794-alt.dts |  14 -
 arch/arm/dts/r8a7794-silk.dts|   8 ++-
 arch/arm/dts/r8a7794.dtsi|  28 -
 12 files changed, 309 insertions(+), 40 deletions(-)

diff --git a/arch/arm/dts/r8a7790-lager.dts b/arch/arm/dts/r8a7790-lager.dts
index dcda98c6ae..50312e752e 100644
--- a/arch/arm/dts/r8a7790-lager.dts
+++ b/arch/arm/dts/r8a7790-lager.dts
@@ -899,9 +899,6 @@
status = "okay";
 
port {
-   #address-cells = <1>;
-   #size-cells = <0>;
-
vin1ep0: endpoint {
remote-endpoint = <&adv7180>;
bus-width = <8>;
@@ -926,6 +923,11 @@
};
 };
 
+&rwdt {
+   timeout-sec = <60>;
+   status = "okay";
+};
+
 &ssi1 {
shared-pin;
 };
diff --git a/arch/arm/dts/r8a7790.dtsi b/arch/arm/dts/r8a7790.dtsi
index ed09e56c36..0925bdca43 100644
--- a/arch/arm/dts/r8a7790.dtsi
+++ b/arch/arm/dts/r8a7790.dtsi
@@ -76,12 +76,12 @@
compatible = "arm,cortex-a15";
reg = <0>;
clock-frequency = <13>;
-   voltage-tolerance = <1>; /* 1% */
clocks = <&cpg CPG_CORE R8A7790_CLK_Z>;
-   clock-latency = <30>; /* 300 us */
power-domains = <&sysc R8A7790_PD_CA15_CPU0>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
 
/* kHz - uV - OPPs unknown yet */
operating-points = <140 100>,
@@ -101,6 +101,16 @@
power-domains = <&sysc R8A7790_PD_CA15_CPU1>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
+
+   /* kHz - uV - OPPs unknown yet */
+   operating-points = <140 100>,
+  <1225000 100>,
+  <105 100>,
+  < 875000 100>,
+  < 70 100>,
+  < 35 100>;
};
 
cpu2: cpu@2 {
@@ -112,6 +122,16 @@
power-domains = <&sysc R8A7790_PD_CA15_CPU2>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
+
+   /* kHz - uV - OPPs unknown yet */
+   operating-points = <140 100>,
+  <1225000 100>,
+  <105 100>,
+  < 875000 100>,
+  < 70 100>,
+  < 35 100>;
};
 
cpu3: cpu@3 {
@@ -123,6 +143,16 @@
power-domains = <&sysc R8A7790_PD_CA15_CPU3>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
+
+   /* kHz - uV - OPPs unknown yet */
+   operating-points = <140 100>,
+  <1225000 100>,
+  <105 100>,
+  < 875000 100>,
+  < 70 100>,
+  < 35 100>;
};
 
cpu4: cpu@100 {
@@ -199,6 +229,24 @@
clock-frequency = <0>;
};
 
+   pmu-0 {
+   compatible = "arm,cortex-a15-pmu";
+   interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>

[U-Boot] [PATCH V2 05/13] ARM: dts: rmobile: Extract AVB node extras on V3M Eagle

2018-12-03 Thread Marek Vasut
The AVB node is not complete in Linux 4.17 DTs on V3M Eagle, pull the
AVB node extras into U-Boot specific DT until they hit mainline Linux,
to make syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a77970-eagle-u-boot.dts | 20 
 arch/arm/dts/r8a77970-eagle.dts| 11 ---
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/arch/arm/dts/r8a77970-eagle-u-boot.dts 
b/arch/arm/dts/r8a77970-eagle-u-boot.dts
index 0c716deb6f..5b17f1d1f0 100644
--- a/arch/arm/dts/r8a77970-eagle-u-boot.dts
+++ b/arch/arm/dts/r8a77970-eagle-u-boot.dts
@@ -7,6 +7,7 @@
 
 #include "r8a77970-eagle.dts"
 #include "r8a77970-u-boot.dtsi"
+#include 
 
 / {
aliases {
@@ -14,6 +15,25 @@
};
 };
 
+&avb {
+   pinctrl-0 = <&avb0_pins>;
+   pinctrl-names = "default";
+
+};
+
+&phy0 {
+   reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
+};
+
+&pfc {
+   avb0_pins: avb {
+   mux {
+   groups = "avb0_link", "avb0_mdio", "avb0_rgmii", 
"avb0_txcrefclk";
+   function = "avb0";
+   };
+   };
+};
+
 &rpc {
num-cs = <1>;
status = "okay";
diff --git a/arch/arm/dts/r8a77970-eagle.dts b/arch/arm/dts/r8a77970-eagle.dts
index 107ac5d393..7fee1aa1ac 100644
--- a/arch/arm/dts/r8a77970-eagle.dts
+++ b/arch/arm/dts/r8a77970-eagle.dts
@@ -8,7 +8,6 @@
 
 /dts-v1/;
 #include "r8a77970.dtsi"
-#include 
 
 / {
model = "Renesas Eagle board based on r8a77970";
@@ -32,8 +31,6 @@
 };
 
 &avb {
-   pinctrl-0 = <&avb0_pins>;
-   pinctrl-names = "default";
renesas,no-ether-link;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
@@ -44,7 +41,6 @@
reg = <0>;
interrupt-parent = <&gpio1>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
-   reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
};
 };
 
@@ -72,13 +68,6 @@
 };
 
 &pfc {
-   avb0_pins: avb {
-   mux {
-   groups = "avb0_link", "avb0_mdio", "avb0_rgmii", 
"avb0_txcrefclk";
-   function = "avb0";
-   };
-   };
-
i2c0_pins: i2c0 {
groups = "i2c0";
function = "i2c0";
-- 
2.18.0

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


[U-Boot] [PATCH V2 04/13] ARM: dts: rmobile: Extract SDHI nodes on M3N

2018-12-03 Thread Marek Vasut
The SDHI nodes are not in Linux 4.17 DTs in M3N, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a77965-u-boot.dtsi | 44 +++
 arch/arm/dts/r8a77965.dtsi| 32 +++---
 2 files changed, 48 insertions(+), 28 deletions(-)

diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi 
b/arch/arm/dts/r8a77965-u-boot.dtsi
index 15d9467ec0..cbd29b3aed 100644
--- a/arch/arm/dts/r8a77965-u-boot.dtsi
+++ b/arch/arm/dts/r8a77965-u-boot.dtsi
@@ -20,6 +20,50 @@
status = "disabled";
};
 
+   sdhi0: sd@ee10 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee10 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 314>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 314>;
+   status = "disabled";
+   };
+
+   sdhi1: sd@ee12 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee12 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 313>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 313>;
+   status = "disabled";
+   };
+
+   sdhi2: sd@ee14 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee14 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 312>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 312>;
+   status = "disabled";
+   };
+
+   sdhi3: sd@ee16 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee16 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 311>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 311>;
+   status = "disabled";
+   };
+
ehci0: usb@ee080100 {
compatible = "generic-ehci";
reg = <0 0xee080100 0 0x100>;
diff --git a/arch/arm/dts/r8a77965.dtsi b/arch/arm/dts/r8a77965.dtsi
index a47f079c02..84ecb4631f 100644
--- a/arch/arm/dts/r8a77965.dtsi
+++ b/arch/arm/dts/r8a77965.dtsi
@@ -835,47 +835,23 @@
};
 
sdhi0: sd@ee10 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee10 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 314>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 314>;
-   status = "disabled";
+   /* placeholder */
};
 
sdhi1: sd@ee12 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee12 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 313>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 313>;
-   status = "disabled";
+   /* placeholder */
};
 
sdhi2: sd@ee14 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee14 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 312>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 312>;
-   status = "disabled";
+   /* placeholder */
};
 
sdhi3: sd@ee16 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee16 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 311>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 311>;
-   status = "disabled";
+   /* placeholder */
};
 
usb3_phy0: usb-phy@e65ee000 {
-- 
2.18.0

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


[U-Boot] [PATCH V2 07/13] ARM: dts: rmobile: Extract SDHI extras on H3 and M3W ULCB

2018-12-03 Thread Marek Vasut
The SDHI nodes are missing features supported in upstream U-Boot,
like mode support properties. Pull the extras into U-Boot specific
DT until it hits mainline Linux, to make syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a7795-h3ulcb-u-boot.dts | 21 +
 arch/arm/dts/r8a7796-m3ulcb-u-boot.dts | 21 +
 arch/arm/dts/ulcb.dtsi | 12 +++-
 3 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
index 5cb5e9c6fb..ebbd234d78 100644
--- a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
@@ -18,3 +18,24 @@
gpio-sstbz = <&gpio2 3 0>;
};
 };
+
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
diff --git a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
index 78bd4f26bd..4e960081f9 100644
--- a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
@@ -18,3 +18,24 @@
gpio-sstbz = <&gpio2 3 0>;
};
 };
+
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
diff --git a/arch/arm/dts/ulcb.dtsi b/arch/arm/dts/ulcb.dtsi
index c805265343..6f814845f8 100644
--- a/arch/arm/dts/ulcb.dtsi
+++ b/arch/arm/dts/ulcb.dtsi
@@ -299,13 +299,13 @@
};
 
sdhi2_pins: sd2 {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
-   power-source = <1800>;
+   power-source = <3300>;
};
 
sdhi2_pins_uhs: sd2_uhs {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
power-source = <1800>;
};
@@ -387,12 +387,8 @@
vqmmc-supply = <&vccq_sdhi0>;
cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
bus-width = <4>;
-   sd-uhs-sdr12;
-   sd-uhs-sdr25;
sd-uhs-sdr50;
-   sd-uhs-sdr104;
status = "okay";
-   max-frequency = <20800>;
 };
 
 &sdhi2 {
@@ -405,10 +401,8 @@
vqmmc-supply = <®_1p8v>;
bus-width = <8>;
mmc-hs200-1_8v;
-   mmc-hs400-1_8v;
non-removable;
status = "okay";
-   max-frequency = <2>;
 };
 
 &ssi1 {
-- 
2.18.0

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


[U-Boot] [PATCH V2 02/13] ARM: dts: rmobile: Extract RPC node to u-boot specific DT

2018-12-03 Thread Marek Vasut
The RPC DT bindings are still work in progress. Extract the RPC DT node
from the DT to allow easier update and so it can be replaced once the DT
bindings are stable.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a7795-u-boot.dtsi   | 10 ++
 arch/arm/dts/r8a7795.dtsi  |  8 
 arch/arm/dts/r8a7796-u-boot.dtsi   | 10 ++
 arch/arm/dts/r8a7796.dtsi  |  8 
 arch/arm/dts/r8a77965-u-boot.dtsi  | 10 ++
 arch/arm/dts/r8a77965.dtsi |  8 
 arch/arm/dts/r8a77970-eagle-u-boot.dts | 25 +
 arch/arm/dts/r8a77970-eagle.dts| 20 
 arch/arm/dts/r8a77970-u-boot.dtsi  | 10 ++
 arch/arm/dts/r8a77970.dtsi |  8 
 arch/arm/dts/r8a77990-u-boot.dtsi  | 10 ++
 arch/arm/dts/r8a77990.dtsi |  8 
 arch/arm/dts/r8a77995-u-boot.dtsi  | 10 ++
 arch/arm/dts/r8a77995.dtsi |  8 
 14 files changed, 85 insertions(+), 68 deletions(-)

diff --git a/arch/arm/dts/r8a7795-u-boot.dtsi b/arch/arm/dts/r8a7795-u-boot.dtsi
index 526966ab24..cc22c57ae3 100644
--- a/arch/arm/dts/r8a7795-u-boot.dtsi
+++ b/arch/arm/dts/r8a7795-u-boot.dtsi
@@ -10,3 +10,13 @@
 &extalr_clk {
u-boot,dm-pre-reloc;
 };
+
+&soc {
+   rpc: rpc@0xee20 {
+   compatible = "renesas,rpc-r8a7795", "renesas,rpc";
+   reg = <0 0xee20 0 0x100>, <0 0x0800 0 0>;
+   clocks = <&cpg CPG_MOD 917>;
+   bank-width = <2>;
+   status = "disabled";
+   };
+};
diff --git a/arch/arm/dts/r8a7795.dtsi b/arch/arm/dts/r8a7795.dtsi
index af77bfe4e4..e2713eea48 100644
--- a/arch/arm/dts/r8a7795.dtsi
+++ b/arch/arm/dts/r8a7795.dtsi
@@ -1812,14 +1812,6 @@
dma-channels = <2>;
};
 
-   rpc: rpc@0xee20 {
-   compatible = "renesas,rpc-r8a7795", "renesas,rpc";
-   reg = <0 0xee20 0 0x100>, <0 0x0800 0 0>;
-   clocks = <&cpg CPG_MOD 917>;
-   bank-width = <2>;
-   status = "disabled";
-   };
-
sdhi0: sd@ee10 {
compatible = "renesas,sdhi-r8a7795",
 "renesas,rcar-gen3-sdhi";
diff --git a/arch/arm/dts/r8a7796-u-boot.dtsi b/arch/arm/dts/r8a7796-u-boot.dtsi
index 7cc60bc54a..4655259afe 100644
--- a/arch/arm/dts/r8a7796-u-boot.dtsi
+++ b/arch/arm/dts/r8a7796-u-boot.dtsi
@@ -10,3 +10,13 @@
 &extalr_clk {
u-boot,dm-pre-reloc;
 };
+
+&soc {
+   rpc: rpc@0xee20 {
+   compatible = "renesas,rpc-r8a7796", "renesas,rpc";
+   reg = <0 0xee20 0 0x100>, <0 0x0800 0 0>;
+   clocks = <&cpg CPG_MOD 917>;
+   bank-width = <2>;
+   status = "disabled";
+   };
+};
diff --git a/arch/arm/dts/r8a7796.dtsi b/arch/arm/dts/r8a7796.dtsi
index 2b25a1d146..903fef7284 100644
--- a/arch/arm/dts/r8a7796.dtsi
+++ b/arch/arm/dts/r8a7796.dtsi
@@ -1588,14 +1588,6 @@
status = "disabled";
};
 
-   rpc: rpc@0xee20 {
-   compatible = "renesas,rpc-r8a7796", "renesas,rpc";
-   reg = <0 0xee20 0 0x100>, <0 0x0800 0 0>;
-   clocks = <&cpg CPG_MOD 917>;
-   bank-width = <2>;
-   status = "disabled";
-   };
-
sdhi0: sd@ee10 {
compatible = "renesas,sdhi-r8a7796",
 "renesas,rcar-gen3-sdhi";
diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi 
b/arch/arm/dts/r8a77965-u-boot.dtsi
index f0023114d1..ca80ef8f29 100644
--- a/arch/arm/dts/r8a77965-u-boot.dtsi
+++ b/arch/arm/dts/r8a77965-u-boot.dtsi
@@ -10,3 +10,13 @@
 &extalr_clk {
u-boot,dm-pre-reloc;
 };
+
+&soc {
+   rpc: rpc@0xee20 {
+   compatible = "renesas,rpc-r8a77965", "renesas,rpc";
+   reg = <0 0xee20 0 0x100>, <0 0x0800 0 0>;
+   clocks = <&cpg CPG_MOD 917>;
+   bank-width = <2>;
+   status = "disabled";
+   };
+};
diff --git a/arch/arm/dts/r8a77965.dtsi b/arch/arm/dts/r8a77965.dtsi
index f28a82c1d4..840512ecfa 100644
--- a/arch/arm/dts/r8a77965.dtsi
+++ b/arch/arm/dts/r8a77965.dtsi
@@ -863,14 +863,6 @@
status = "disabled";
};
 
-   rpc: rpc@0xee20 {
-   compatible = "renesas,rpc-r8a77965", "renesas,rpc";
-   reg = <0 0xee20 0 0x100>, <0 0x0800 0 0>;
-   clocks = <&cpg CPG_MOD 917>;
-   bank-width = <2>;
-   status = "disabled";
-   };
-
sdhi0: sd@ee10 {
 

[U-Boot] [PATCH V2 01/13] ARM: dts: rmobile: Add soc label to Gen3

2018-12-03 Thread Marek Vasut
Add label to the /soc node, so it can be referenced from the U-Boot DTs.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
V2: Rebase on u-boot/master
---
 arch/arm/dts/r8a7796.dtsi  | 2 +-
 arch/arm/dts/r8a77965.dtsi | 2 +-
 arch/arm/dts/r8a77970.dtsi | 2 +-
 arch/arm/dts/r8a77995.dtsi | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/dts/r8a7796.dtsi b/arch/arm/dts/r8a7796.dtsi
index 011f0e596a..2b25a1d146 100644
--- a/arch/arm/dts/r8a7796.dtsi
+++ b/arch/arm/dts/r8a7796.dtsi
@@ -259,7 +259,7 @@
clock-frequency = <0>;
};
 
-   soc {
+   soc: soc {
compatible = "simple-bus";
interrupt-parent = <&gic>;
#address-cells = <2>;
diff --git a/arch/arm/dts/r8a77965.dtsi b/arch/arm/dts/r8a77965.dtsi
index 7a5d68be13..f28a82c1d4 100644
--- a/arch/arm/dts/r8a77965.dtsi
+++ b/arch/arm/dts/r8a77965.dtsi
@@ -144,7 +144,7 @@
 <&a57_1>;
};
 
-   soc {
+   soc: soc {
compatible = "simple-bus";
interrupt-parent = <&gic>;
#address-cells = <2>;
diff --git a/arch/arm/dts/r8a77970.dtsi b/arch/arm/dts/r8a77970.dtsi
index 8dc599edfa..4f9f8ba3c1 100644
--- a/arch/arm/dts/r8a77970.dtsi
+++ b/arch/arm/dts/r8a77970.dtsi
@@ -72,7 +72,7 @@
clock-frequency = <0>;
};
 
-   soc {
+   soc: soc {
compatible = "simple-bus";
interrupt-parent = <&gic>;
 
diff --git a/arch/arm/dts/r8a77995.dtsi b/arch/arm/dts/r8a77995.dtsi
index 1d49279ac9..5ae37c60fd 100644
--- a/arch/arm/dts/r8a77995.dtsi
+++ b/arch/arm/dts/r8a77995.dtsi
@@ -66,7 +66,7 @@
clock-frequency = <0>;
};
 
-   soc {
+   soc: soc {
compatible = "simple-bus";
interrupt-parent = <&gic>;
#address-cells = <2>;
-- 
2.18.0

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


Re: [U-Boot] [PATCH v7 4/4] RISC-V: Add S-mode timer implementation

2018-12-03 Thread Auer, Lukas
Hi Bin,

On Mon, 2018-12-03 at 16:45 +0800, Bin Meng wrote:
> Hi Anup,
> 
> On Mon, Dec 3, 2018 at 4:12 PM Anup Patel 
> wrote:
> > 
> > On Mon, Dec 3, 2018 at 1:27 PM Bin Meng  wrote:
> > > 
> > > Hi Anup,
> > > 
> > > On Mon, Dec 3, 2018 at 3:44 PM Anup Patel 
> > > wrote:
> > > > 
> > > > On Mon, Dec 3, 2018 at 1:08 PM Bin Meng 
> > > > wrote:
> > > > > 
> > > > > Hi Anup,
> > > > > 
> > > > > On Mon, Dec 3, 2018 at 3:31 PM Anup Patel <
> > > > > a...@brainfault.org> wrote:
> > > > > > 
> > > > > > On Mon, Dec 3, 2018 at 12:56 PM Bin Meng <
> > > > > > bmeng...@gmail.com> wrote:
> > > > > > > 
> > > > > > > Hi Anup,
> > > > > > > 
> > > > > > > On Mon, Dec 3, 2018 at 3:19 PM Anup Patel <
> > > > > > > a...@brainfault.org> wrote:
> > > > > > > > 
> > > > > > > > On Mon, Dec 3, 2018 at 12:32 PM Bin Meng <
> > > > > > > > bmeng...@gmail.com> wrote:
> > > > > > > > > 
> > > > > > > > > Hi Anup,
> > > > > > > > > 
> > > > > > > > > On Mon, Dec 3, 2018 at 2:43 PM Anup Patel <
> > > > > > > > > a...@brainfault.org> wrote:
> > > > > > > > > > 
> > > > > > > > > > On Mon, Dec 3, 2018 at 12:06 PM Bin Meng <
> > > > > > > > > > bmeng...@gmail.com> wrote:
> > > > > > > > > > > 
> > > > > > > > > > > Hi Anup,
> > > > > > > > > > > 
> > > > > > > > > > > On Mon, Dec 3, 2018 at 1:28 PM Anup Patel <
> > > > > > > > > > > a...@brainfault.org> wrote:
> > > > > > > > > > > > 
> > > > > > > > > > > > When running in S-mode, we can use rdtime and
> > > > > > > > > > > > rdtimeh instructions
> > > > > > > > > > > > for reading timer ticks (just like Linux). The
> > > > > > > > > > > > frequency of timer
> > > > > > > > > > > > ticks is passed by prior booting stages in
> > > > > > > > > > > > "timebase-frequency" DT
> > > > > > > > > > > > property of the "/cpus" DT node.
> > > > > > > > > > > > 
> > > > > > > > > > > > This patch provides a generic timer
> > > > > > > > > > > > implementation for U-Boot
> > > > > > > > > > > > running in S-mode. For U-Boot running in M-
> > > > > > > > > > > > mode, specific timer
> > > > > > > > > > > > drivers will have to be provided.
> > > > > > > > > > > > 
> > > > > > > > > > > > Signed-off-by: Anup Patel 
> > > > > > > > > > > > ---
> > > > > > > > > > > >  arch/Kconfig|  1 -
> > > > > > > > > > > >  arch/riscv/Kconfig  | 22 +++
> > > > > > > > > > > >  arch/riscv/lib/Makefile |  1 +
> > > > > > > > > > > >  arch/riscv/lib/time.c   | 60
> > > > > > > > > > > > +
> > > > > > > > > > > >  4 files changed, 78 insertions(+), 6
> > > > > > > > > > > > deletions(-)
> > > > > > > > > > > >  create mode 100644 arch/riscv/lib/time.c
> > > > > > > > > > > > 
> > > > > > > > > > > > diff --git a/arch/Kconfig b/arch/Kconfig
> > > > > > > > > > > > index 9fdd2f7e66..a4fcb3522d 100644
> > > > > > > > > > > > --- a/arch/Kconfig
> > > > > > > > > > > > +++ b/arch/Kconfig
> > > > > > > > > > > > @@ -72,7 +72,6 @@ config RISCV
> > > > > > > > > > > > imply BLK
> > > > > > > > > > > > imply CLK
> > > > > > > > > > > > imply MTD
> > > > > > > > > > > > -   imply TIMER
> > > > > > > > > > > 
> > > > > > > > > > > No, please don't do this.
> > > > > > > > > > 
> > > > > > > > > > I am removing here but selecting it only for M-mode 
> > > > > > > > > > U-Boot.
> > > > > > > > > > 
> > > > > > > > > > > 
> > > > > > > > > > > > imply CMD_DM
> > > > > > > > > > > > 
> > > > > > > > > > > >  config SANDBOX
> > > > > > > > > > > > diff --git a/arch/riscv/Kconfig
> > > > > > > > > > > > b/arch/riscv/Kconfig
> > > > > > > > > > > > index 732a357a99..20a060454b 100644
> > > > > > > > > > > > --- a/arch/riscv/Kconfig
> > > > > > > > > > > > +++ b/arch/riscv/Kconfig
> > > > > > > > > > > > @@ -44,6 +44,23 @@ config ARCH_RV64I
> > > > > > > > > > > > 
> > > > > > > > > > > >  endchoice
> > > > > > > > > > > > 
> > > > > > > > > > > > +choice
> > > > > > > > > > > > +   prompt "Run Mode"
> > > > > > > > > > > > +   default RISCV_MMODE
> > > > > > > > > > > > +
> > > > > > > > > > > > +config RISCV_MMODE
> > > > > > > > > > > > +   bool "Machine"
> > > > > > > > > > > > +   select TIMER
> > > > > > > > > > > > +   help
> > > > > > > > > > > > +  Choose this option to build U-Boot
> > > > > > > > > > > > for RISC-V M-Mode.
> > > > > > > > > > > > +
> > > > > > > > > > > > +config RISCV_SMODE
> > > > > > > > > > > > +   bool "Supervisor"
> > > > > > > > > > > > +   help
> > > > > > > > > > > > +  Choose this option to build U-Boot
> > > > > > > > > > > > for RISC-V S-Mode.
> > > > > > > > > > > > +
> > > > > > > > > > > > +endchoice
> > > > > > > > > > > > +
> > > > > > > > > > > 
> > > > > > > > > > > The above changes deserve separate patch, or
> > > > > > > > > > > merge that in the 1st
> > > > > > > > > > > patch in the series.
> > > > > > > > > > 
> > > > > > > > > > Sure, I will put Kconfig changes as separate patch.
> > > > > > > > > > 
> > > > > > > > > > > 
> > > > 

[U-Boot] Is mxsldr and mxsboot supported for imx7 processors

2018-12-03 Thread Sonu Abraham

Hi All,

I would like to know the following regarding u-boot for imx7 processors.

1) Is the mxsldr and mxsboot tools  supported for imx7 processors from NXP ?
2) If the above tools are supported for imx7 processors , is it possible to 
provision QSPI NOR flash using the mxsldr and mxsboot.

Thanks in advance,
Sonu Abraham



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


Re: [U-Boot] [U-Boot, V4, 6/7] test: vboot: add padding pss for rsa signature

2018-12-03 Thread Tom Rini
On Wed, Nov 14, 2018 at 01:51:04PM +0100, Philippe Reynes wrote:

> The padding pss is now supported for rsa signature.
> This add test with padding pss on vboot test.
> 
> Signed-off-by: Philippe Reynes 
> 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,V4,3/7] rsa: add support of padding pss

2018-12-03 Thread Tom Rini
On Wed, Nov 14, 2018 at 01:51:01PM +0100, Philippe Reynes wrote:

> We add the support of the padding pss for rsa signature.
> This new padding is often recommended instead of pkcs-1.5.
> 
> Signed-off-by: Philippe Reynes 
> 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, V4, 1/7] rsa: use new openssl API to create signature

2018-12-03 Thread Tom Rini
On Wed, Nov 14, 2018 at 01:50:59PM +0100, Philippe Reynes wrote:

> Previous implementation of the rsa signature was using
> the openssl API EVP_Sign*, but the new openssl API
> EVP_DigestSign* is more flexible. So we move to this
> new API.
> 
> Signed-off-by: Philippe Reynes 
> 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,v2,4/9] board: MCR3000: use new DM watchdog

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:47AM +, Christophe Leroy wrote:

> This patch switches MCR3000 board to the new DM watchdog.
> 
> The change in u-boot.lds is because MCR3000.o grows a bit
> with this patch and doesn't fit anymore below env_offset on
> some versions of GCC.
> 
> Signed-off-by: Christophe Leroy 

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,v2,9/9] spi, mpc8xx: migrate to DM_SPI

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:57AM +, Christophe Leroy wrote:

> Signed-off-by: Christophe Leroy 

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,v2,8/9] board_r: fix build with DM_SPI

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:55AM +, Christophe Leroy wrote:

> CC  common/board_r.o
> common/board_r.c:747:2: error: ‘initr_spi’ undeclared here (not in a function)
>   initr_spi,
>   ^
> make[1]: *** [common/board_r.o] Error 1
> 
> Fixes: ebe76a2df9f6 ("dm: Remove spi_init() from board_r.c when using driver 
> model")
> Signed-off-by: Christophe Leroy 

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,v2,6/9] board: MCR3000: migrate to DM_SERIAL

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:51AM +, Christophe Leroy wrote:

> Signed-off-by: Christophe Leroy 

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, 5/7] configs: sandbox: enable padding pss for rsa signature

2018-12-03 Thread Tom Rini
On Wed, Nov 14, 2018 at 01:51:03PM +0100, Philippe Reynes wrote:

> Signed-off-by: Philippe Reynes 
> 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, v2, 2/9] board: MCR3000: Activate CONFIG_DM and CONFIG_OF_CONTROL

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:43AM +, Christophe Leroy wrote:

> Add mcr3000 device tree and activate CONFIG_DM and CONFIG_OF_CONTROL
> 
> Signed-off-by: Christophe Leroy 

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/7] rsa: add a structure for the padding

2018-12-03 Thread Tom Rini
On Wed, Nov 14, 2018 at 01:51:00PM +0100, Philippe Reynes wrote:

> The rsa signature use a padding algorithm. By default, we use the
> padding pkcs-1.5. In order to add some new padding algorithm, we
> add a padding framework to manage several padding algorithm.
> The choice of the padding is done in the file .its.
> 
> Signed-off-by: Philippe Reynes 
> 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,v2,5/9] drivers: serial: migrate mpc8xx to DM

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:49AM +, Christophe Leroy wrote:

> Signed-off-by: Christophe Leroy 

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, v2, 4/4] rtc: m41t62: Convert the RTC driver to support the driver model (DM)

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 02:54:34PM +0100, Lukasz Majewski wrote:

> After this change the m41t62.c can be used with RTC subsystem (i.e. date
> command) which uses device model (DM).
> 
> Signed-off-by: Lukasz Majewski 
> Reviewed-by: Stefan Roese 

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, 4/7] doc: uImage.FIT: signature.txt: add option padding

2018-12-03 Thread Tom Rini
On Wed, Nov 14, 2018 at 01:51:02PM +0100, Philippe Reynes wrote:

> Signed-off-by: Philippe Reynes 
> 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,v2,1/9] powerpc, mpc8xx: clear top of stack

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:41AM +, Christophe Leroy wrote:

> Reported-by: Joakim Tjernlund 
> Signed-off-by: Christophe Leroy 
> Reviewed-by: Joakim Tjernlund 

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, v2, 3/4] rtc: m41t62: Extract common RTC handling code to facilitate DM conversion

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 02:54:33PM +0100, Lukasz Majewski wrote:

> This change facilitates the conversion of m41t62 RTC driver to device
> model (DM).
> 
> Signed-off-by: Lukasz Majewski 
> Reviewed-by: Stefan Roese 

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, v2, 2/4] rtc: m41t62: Break i2c_write() arguments to fix checkpatch warning

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 02:54:32PM +0100, Lukasz Majewski wrote:

> No functional change for this commit.
> 
> Signed-off-by: Lukasz Majewski 
> Reviewed-by: Stefan Roese 

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,7/7] test: vboot: clean its file

2018-12-03 Thread Tom Rini
On Wed, Nov 14, 2018 at 01:51:05PM +0100, Philippe Reynes wrote:

> This update the its file used in vboot test to respect the new
> node style name defined in doc/uImage.FIT (for example: replace
> kernel@1 by kernel and fdt@1 by fdt-1)
> 
> Signed-off-by: Philippe Reynes 
> 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, v2, 3/9] drivers: watchdog: add a DM driver for the MPC8xx watchdog

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:45AM +, Christophe Leroy wrote:

> This patch adds a DM driver for the MPC8xx watchdog.
> Basically, the watchdog is enabled by default from the start and
> SYPCR register has to be writen once to set the timeout and/or
> deactivate the watchdog. Once written, it cannot be written again.
> 
> It means that wdt_stop() can be called before wdt_start() to stop the
> watchdog, but cannot be called if wdt_start() has been called.
> 
> Signed-off-by: Christophe Leroy 

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, v2, 3/4] arm: baltos: move CONFIG_SYS_NAND_U_BOOT_OFFS to defconfig

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 09:19:32AM +0100, yegorsli...@googlemail.com wrote:

> From: Yegor Yefremov 
> 
> Also get rid of CONFIG_SYS_NAND_SPL_KERNEL_OFFS as SPL_OS_BOOT
> feature won't be used.
> 
> Signed-off-by: Yegor Yefremov 
> 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


[U-Boot] [PATCH] ARM: rmobile: Enable MMC extensions on Gen3

2018-12-03 Thread Marek Vasut
Enable extended MMC commands and GPT partition table support.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/mach-rmobile/Kconfig | 5 +
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-rmobile/Kconfig b/arch/arm/mach-rmobile/Kconfig
index d82023acf3..ba7bd2def9 100644
--- a/arch/arm/mach-rmobile/Kconfig
+++ b/arch/arm/mach-rmobile/Kconfig
@@ -13,6 +13,11 @@ config RCAR_GEN3
select ARM64
select PHY
select CMD_CACHE
+   imply CMD_FS_UUID if BLK
+   imply CMD_GPT if BLK
+   imply CMD_MMC_SWRITE if MMC
+   imply CMD_UUID if BLK
+   imply SUPPORT_EMMC_RPMB if MMC
 
 endchoice
 
-- 
2.18.0

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


Re: [U-Boot] [U-Boot, v2] Kconfig: Migrate CONFIG_RTC_M41T62 define to Kconfig

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 02:54:31PM +0100, Lukasz Majewski wrote:

> This patch moves the RTC M41T62 config define to Kconfig.
> 
> Signed-off-by: Lukasz Majewski 
> Reviewed-by: Stefan Roese 
> 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, v2, 4/4] arm: baltos: migrate Ethernet PHYs configuration to Kconfig

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 09:19:33AM +0100, yegorsli...@googlemail.com wrote:

> From: Yegor Yefremov 
> 
> Remove CONFIG_PHY_ATHEROS and CONFIG_PHY_SMSC from defconfig
> and select them in Kconfig.
> 
> Signed-off-by: Yegor Yefremov 
> 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, v2, 7/9] drivers: serial: get rid of non DM mpc8xx driver

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 08:51:53AM +, Christophe Leroy wrote:

> Signed-off-by: Christophe Leroy 

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, v1] eeprom: Add device model based I2C support to eeprom command

2018-12-03 Thread Tom Rini
On Wed, Nov 21, 2018 at 11:40:43PM +0100, Lukasz Majewski wrote:

> After this change the 'eeprom' command can be used with DM aware boards.
> 
> Signed-off-by: Lukasz Majewski 

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,v2,2/4] arm: baltos: remove unused header

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 09:19:31AM +0100, yegorsli...@googlemail.com wrote:

> From: Yegor Yefremov 
> 
> OnRISC Baltos series uses SoM with tps65910 PMIC, so remove
> "power/tps65217.h" header inclusion.
> 
> Signed-off-by: Yegor Yefremov 
> 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, v2, 1/4] arm: baltos: move the board to CONFIG_BLK

2018-12-03 Thread Tom Rini
On Thu, Nov 22, 2018 at 09:19:30AM +0100, yegorsli...@googlemail.com wrote:

> From: Yegor Yefremov 
> 
> Use DM for both MMC and USB subsystems and use dedicated DTS
> for U-Boot configuration.
> 
> Disable SPL support for GPIO and remove EVMSK leftover for
> DDR power control via GPIO.
> 
> Signed-off-by: Yegor Yefremov 
> 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] [PATCH 17/19] riscv: Pass correct exception code to _exit_trap()

2018-12-03 Thread Auer, Lukas
Hi Bin,

On Fri, 2018-11-30 at 17:56 +0800, Bin Meng wrote:
> Hi Lukas,
> 
> On Thu, Nov 15, 2018 at 6:59 AM Auer, Lukas
>  wrote:
> > 
> > Hi Bin,
> > 
> > On Tue, 2018-11-13 at 00:22 -0800, Bin Meng wrote:
> > > The most significant bit in mcause register should be masked to
> > > form the exception code for _exit_trap().
> > > 
> > > Signed-off-by: Bin Meng 
> > > ---
> > > 
> > >  arch/riscv/lib/interrupts.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/riscv/lib/interrupts.c
> > > b/arch/riscv/lib/interrupts.c
> > > index c568706..5e09196 100644
> > > --- a/arch/riscv/lib/interrupts.c
> > > +++ b/arch/riscv/lib/interrupts.c
> > > @@ -73,7 +73,7 @@ ulong handle_trap(ulong mcause, ulong epc,
> > > struct
> > > pt_regs *regs)
> > >   else if ((is_int) && ((mcause & MCAUSE_CAUSE)  ==
> > > IRQ_M_TIMER))
> > >   timer_interrupt(0); /* handle_m_timer_interrupt
> > > */
> > >   else
> > > - _exit_trap(mcause, epc, regs);
> > > + _exit_trap(mcause & MCAUSE_CAUSE, epc, regs);
> > 
> > The exception codes differ between traps caused by an interrupt
> > (MSB
> > set) and those that are not. Besides software interrupts, the
> > handle_trap already checks for all possible machine-mode
> > interrupts.
> 
> For the M-mode software interrupts, it will fall into the
> _exit_trap()
> branch which is wrong. Do you mean we just leave it for now until we
> support the SBI in the future?
> 

You are right. It is probably best to add a software_interrupt
function, similar to those for external and timer interrupts.

I also just noticed that I should have included more information, when
an undefined exception code is encountered in _exit_trap. I will send a
patch to fix this tomorrow.

Thanks,
Lukas

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


Re: [U-Boot] [PATCH 12/19] riscv: Do some basic architecture level cpu initialization

2018-12-03 Thread Auer, Lukas
Hi Bin,

On Fri, 2018-11-30 at 17:48 +0800, Bin Meng wrote:
> Hi Lukas,
> 
> On Fri, Nov 16, 2018 at 7:10 AM Auer, Lukas
>  wrote:
> > 
> > Hi Bin,
> > 
> > On Tue, 2018-11-13 at 00:22 -0800, Bin Meng wrote:
> > > Implement arch_cpu_init() to do some basic architecture level cpu
> > > initialization, like FPU enable, etc.
> > > 
> > > Signed-off-by: Bin Meng 
> > > ---
> > > 
> > >  arch/riscv/cpu/cpu.c | 21 +
> > >  1 file changed, 21 insertions(+)
> > > 
> > > diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
> > > index d9f820c..4e508cf 100644
> > > --- a/arch/riscv/cpu/cpu.c
> > > +++ b/arch/riscv/cpu/cpu.c
> > > @@ -5,6 +5,7 @@
> > > 
> > >  #include 
> > >  #include 
> > > +#include 
> > > 
> > >  /*
> > >   * prior_stage_fdt_address must be stored in the data section
> > > since
> > > it is used
> > > @@ -53,3 +54,23 @@ int print_cpuinfo(void)
> > > 
> > >   return 0;
> > >  }
> > > +
> > > +int arch_cpu_init(void)
> > > +{
> > > + /* Enable FPU */
> > > + if (supports_extension('d') || supports_extension('f')) {
> > > + csr_write(mstatus, MSTATUS_FS);
> > 
> > This should use csr_set(), so that we don't overwrite the other
> > mstatus
> > entries.
> > 
> 
> Ah, yes!
> 
> > > + csr_write(fcsr, 0);
> > 
> > BBL also clears the floating point registers before clearing fcsr.
> > Coreboot does neither of these, I am not sure if they are required.
> > 
> 
> It's not required. I believe this is just for sanitizing these
> registers.
> 

Ok, makes sense.

> > > + }
> > > +
> > > + /* Enable user/supervisor use of perf counters */
> > > + if (supports_extension('s'))
> > > + csr_write(scounteren, -1);
> > > + csr_write(mcounteren, -1);
> > 
> > Should we really enable all counters, and for both user and
> > supervisor
> > code? I would tend to enable only the ones we need. How about only
> > enabling the cycle, time, and instret counters (the rest are not
> > currently used in the kernel) and only for supervisor code (so in
> > mcounteren)?
> > 
> 
> Yes, not all of them are used by current kernel, but they might be
> used in the future. To enable all of them is not a bad idea, unless
> turning it on brings some consequences.
> 

Hardware performance counters can be used as part of side-channel
attacks. It is therefore a good idea to disable them by default. Here,
I would restrict them to accesses from the supervisor mode. If needed,
software running in supervisor mode can still enable access for the
user mode.

Thanks,
Lukas

> > > +
> > > + /* Disable paging */
> > > + if (supports_extension('s'))
> > > + csr_write(sptbr, 0);
> > 
> > sptbr has been renamed to satp.
> > 
> 
> Good catch! Will fix in v2.
> 
> Regards,
> Bin
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] Question regarding early pinctrl and driver model in u-boot

2018-12-03 Thread Lukasz Majewski
Dear All,

I've stumbled upon a following issue:

- I do have a vybrid SoC which is not using SPL. It only uses U-boot
  proper (u-boot.vyb).

- In the board_early_init_f() (when we are still in SRAM) I do perform
  pinctrl (pinmux) setup for UART1 (this is the console device).

- I also do use ucalss-serial.c for this device and have proper pinmux
  definition for it in the *.dts file - but this is done latter. 

The problem is that, when I try to remove pinmux setup code
(imx_iomux_v3_setup_multiple_pads()) from board_early_init_f(), then I
do see uart output late (no U-boot early output - U-Boot
2018.11-00052-g6552299a40-dirty (Nov 23 2018 - 16:13:51 +0100)).

The reason for this is the lack of pinctrl UART pins setup.


Do you see any idea how to move to full dts support for uart? The uart
driver and pinmux have defined DM_FLAG_PRE_RELOC.


The same kind of problem I do have with DDR memory controller pin
setup. It would be nice to have it all in DTS, not in a board file.




[ My idea would be to manually extract relevant data from fdt blob and
configure pins in board_early_init_f(), but this looks like a hack -
maybe there is another, better solution? ]



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpCaslnrnMF9.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH] arm: mx5: Enable WDT and bootcounter on M53Menlo

2018-12-03 Thread Marek Vasut
Enable watchdog and bootcounter support on the M53Menlo board.

Signed-off-by: Marek Vasut 
Cc: Stefano Babic 
---
 configs/m53menlo_defconfig | 7 +++
 include/configs/m53menlo.h | 5 +
 2 files changed, 12 insertions(+)

diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig
index 795f8a3ebc..8e26431969 100644
--- a/configs/m53menlo_defconfig
+++ b/configs/m53menlo_defconfig
@@ -20,6 +20,7 @@ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
 CONFIG_VERSION_VARIABLE=y
 CONFIG_SPL_BOARD_INIT=y
 CONFIG_SPL_NAND_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
 CONFIG_HUSH_PARSER=y
 CONFIG_CMD_ASKENV=y
 CONFIG_CMD_GREPENV=y
@@ -33,6 +34,7 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_BMP=y
+CONFIG_CMD_BOOTCOUNT=y
 CONFIG_CMD_DATE=y
 CONFIG_CMD_BTRFS=y
 CONFIG_CMD_EXT4=y
@@ -44,6 +46,11 @@ CONFIG_MTDIDS_DEFAULT="nand0=mxc_nand"
 
CONFIG_MTDPARTS_DEFAULT="mtdparts=mxc_nand:1m(u-boot),512k(env1),512k(env2),-(ubi)"
 CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
+CONFIG_BOOTCOUNT_LIMIT=y
+CONFIG_BOOTCOUNT_BOOTLIMIT=3
+CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
+CONFIG_SYS_BOOTCOUNT_ADDR=0x53FA401C
+CONFIG_SYS_BOOTCOUNT_MAGIC=0x0B01C041
 CONFIG_FSL_ESDHC=y
 CONFIG_NAND=y
 CONFIG_NAND_MXC=y
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 94214b135d..bef0c9b31d 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -158,6 +158,11 @@
 /* IIM Fuses */
 #define CONFIG_FSL_IIM
 
+/* Watchdog */
+#define CONFIG_HW_WATCHDOG
+#define CONFIG_IMX_WATCHDOG
+#define CONFIG_WATCHDOG_TIMEOUT_MSECS 8000
+
 /*
  * Boot Linux
  */
-- 
2.18.0

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


Re: [U-Boot] [PATCH] exynos: imply SYS_THUMB_BUILD

2018-12-03 Thread Lukasz Majewski
Hi Guillaume,

> Hi,
> 
> not sure through which tree it should go and who should take care of
> it?

Please rebase on top of u-boot/master branch.

Then Minkyu will take the patch to his tree.

> 
> Guillaume
> 
> - Lukasz Majewski  a écrit :
> > Hi Guillaume,
> >   
> > > This patch allows smaller binaries.
> > > This is needed for and has been tested on Arndale board, as
> > > u-boot.bin is now bigger than the 512K load limit, with GCC8,
> > > without thumb mode.
> > >   
> > 
> > Acked-by: Lukasz Majewski 
> >   
> > > Signed-off-by: Guillaume GARDET 
> > > 
> > > Cc: Albert Aribaud 
> > > Cc: Minkyu Kang 
> > > Cc: Tom Rini 
> > > ---
> > >  arch/arm/Kconfig | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > > index f5d4d39683..1ccd53fd0b 100644
> > > --- a/arch/arm/Kconfig
> > > +++ b/arch/arm/Kconfig
> > > @@ -607,6 +607,7 @@ config ARCH_EXYNOS
> > >   select DM_SPI
> > >   select DM_SPI_FLASH
> > >   select SPI
> > > + imply SYS_THUMB_BUILD
> > >   imply CMD_DM
> > >   imply FAT_WRITE
> > >
> > 
> > 
> > 
> > 
> > Best regards,
> > 
> > Lukasz Majewski
> > 
> > --
> > 
> > DENX Software Engineering GmbH,  Managing Director: Wolfgang
> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
> > Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> > lu...@denx.de  
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lu...@denx.de


pgpEW8fJ71cJe.pgp
Description: OpenPGP digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 0/2] cmd: auto-complete args starting with a $

2018-12-03 Thread Boris Brezillon
Hello,

It's pretty common to pass arguments that start with a $ and are then
expanded by the shell, and I'm this kind of lazy guy that hits tab all
the time and expects the shell to suggest something appropriate. So
here is a patchset adding support for ${} auto-completion and using the
new helper from the mtd command.

Using it elsewhere should be pretty easy (I already patched env set to
use it too [1]).

Note that this patch series depends on [2].

Regards,

Boris

[1]https://github.com/bbrezillon/u-boot/commit/9f37c5b6471c7479aa043524d31531f06128771c
[2]https://patchwork.ozlabs.org/project/uboot/list/?series=79552

Boris Brezillon (2):
  common: command: Provide a dollar_complete() helper
  cmd: mtd: auto-complete args starting with a $ when appropriate

 cmd/mtd.c | 40 -
 common/command.c  | 22 ++---
 env/common.c  | 50 ---
 include/command.h |  2 ++
 include/common.h  |  3 ++-
 5 files changed, 105 insertions(+), 12 deletions(-)

-- 
2.17.1

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


[U-Boot] [PATCH 2/2] cmd: mtd: auto-complete args starting with a $ when appropriate

2018-12-03 Thread Boris Brezillon
It's quite usual to have RAM or flash address stored in env vars.
Use $ auto-completion for such arguments.

Signed-off-by: Boris Brezillon 
---
 cmd/mtd.c | 40 +++-
 1 file changed, 35 insertions(+), 5 deletions(-)

diff --git a/cmd/mtd.c b/cmd/mtd.c
index cda702d18b16..b13dbef3e888 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -517,6 +517,36 @@ static int mtd_name_complete(int argc, char * const 
argv[], char last_char,
 
return n_found;
 }
+
+static int subcmd_complete(int maxargs, int argc, char * const argv[],
+  char last_char, int maxv, char *cmdv[])
+{
+   if (argc > maxargs)
+   return 0;
+
+   if (argc <= 2)
+   return mtd_name_complete(argc, argv, last_char, maxv, cmdv);
+
+   return dollar_complete(argc, argv, last_char, maxv, cmdv);
+}
+
+static int four_args_complete(int argc, char * const argv[], char last_char,
+ int maxv, char *cmdv[])
+{
+   return subcmd_complete(5, argc, argv, last_char, maxv, cmdv);
+}
+
+static int three_args_complete(int argc, char * const argv[], char last_char,
+  int maxv, char *cmdv[])
+{
+   return subcmd_complete(4, argc, argv, last_char, maxv, cmdv);
+}
+
+static int one_arg_complete(int argc, char * const argv[], char last_char,
+   int maxv, char *cmdv[])
+{
+   return subcmd_complete(2, argc, argv, last_char, maxv, cmdv);
+}
 #endif /* CONFIG_AUTO_COMPLETE */
 
 static char mtd_help_text[] =
@@ -548,12 +578,12 @@ static char mtd_help_text[] =
 U_BOOT_CMD_WITH_SUBCMDS(mtd, "MTD utils", mtd_help_text,
U_BOOT_SUBCMD_MKENT(list, 1, 1, do_mtd_list),
U_BOOT_SUBCMD_MKENT_COMPLETE(read, 5, 0, do_mtd_io,
-mtd_name_complete),
+four_args_complete),
U_BOOT_SUBCMD_MKENT_COMPLETE(write, 5, 0, do_mtd_io,
-mtd_name_complete),
+four_args_complete),
U_BOOT_SUBCMD_MKENT_COMPLETE(dump, 4, 0, do_mtd_io,
-mtd_name_complete),
+three_args_complete),
U_BOOT_SUBCMD_MKENT_COMPLETE(erase, 4, 0, do_mtd_erase,
-mtd_name_complete),
+three_args_complete),
U_BOOT_SUBCMD_MKENT_COMPLETE(bad, 2, 1, do_mtd_bad,
-mtd_name_complete));
+one_arg_complete));
-- 
2.17.1

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


[U-Boot] [PATCH 1/2] common: command: Provide a dollar_complete() helper

2018-12-03 Thread Boris Brezillon
Add an helper to auto-complete arguments starting with a '$' with what's
available in the environment.

Signed-off-by: Boris Brezillon 
---
 common/command.c  | 22 ++---
 env/common.c  | 50 ---
 include/command.h |  2 ++
 include/common.h  |  3 ++-
 4 files changed, 70 insertions(+), 7 deletions(-)

diff --git a/common/command.c b/common/command.c
index 19f0534a76ea..754ab9bbc396 100644
--- a/common/command.c
+++ b/common/command.c
@@ -143,22 +143,38 @@ int cmd_usage(const cmd_tbl_t *cmdtp)
 
 #ifdef CONFIG_AUTO_COMPLETE
 
+static char env_complete_buf[512];
+
 int var_complete(int argc, char * const argv[], char last_char, int maxv, char 
*cmdv[])
 {
-   static char tmp_buf[512];
int space;
 
space = last_char == '\0' || isblank(last_char);
 
if (space && argc == 1)
-   return env_complete("", maxv, cmdv, sizeof(tmp_buf), tmp_buf);
+   return env_complete("", maxv, cmdv, sizeof(env_complete_buf),
+   env_complete_buf, false);
 
if (!space && argc == 2)
-   return env_complete(argv[1], maxv, cmdv, sizeof(tmp_buf), 
tmp_buf);
+   return env_complete(argv[1], maxv, cmdv,
+   sizeof(env_complete_buf),
+   env_complete_buf, false);
 
return 0;
 }
 
+int dollar_complete(int argc, char * const argv[], char last_char, int maxv,
+   char *cmdv[])
+{
+   /* Make sure the last argument starts with a $. */
+   if (argc < 1 || argv[argc - 1][0] != '$' ||
+   last_char == '\0' || isblank(last_char))
+   return 0;
+
+   return env_complete(argv[argc - 1], maxv, cmdv, 
sizeof(env_complete_buf),
+   env_complete_buf, true);
+}
+
 
/*/
 
 int complete_subcmdv(cmd_tbl_t *cmdtp, int count, int argc,
diff --git a/env/common.c b/env/common.c
index 3317cef35522..aa9a097bced0 100644
--- a/env/common.c
+++ b/env/common.c
@@ -241,31 +241,75 @@ void env_relocate(void)
 }
 
 #if defined(CONFIG_AUTO_COMPLETE) && !defined(CONFIG_SPL_BUILD)
-int env_complete(char *var, int maxv, char *cmdv[], int bufsz, char *buf)
+int env_complete(char *var, int maxv, char *cmdv[], int bufsz, char *buf,
+bool dollar_comp)
 {
ENTRY *match;
int found, idx;
 
+   if (dollar_comp) {
+   /*
+* When doing $ completion, the first character should
+* obviously be a '$'.
+*/
+   if (var[0] != '$')
+   return 0;
+
+   var++;
+
+   /*
+* The second one, if present, should be a '{', as some
+* configuration of the u-boot shell expand ${var} but not
+* $var.
+*/
+   if (var[0] == '{')
+   var++;
+   else if (var[0] != '\0')
+   return 0;
+   }
+
idx = 0;
found = 0;
cmdv[0] = NULL;
 
+
while ((idx = hmatch_r(var, idx, &match, &env_htab))) {
int vallen = strlen(match->key) + 1;
 
-   if (found >= maxv - 2 || bufsz < vallen)
+   if (found >= maxv - 2 ||
+   bufsz < vallen + (dollar_comp ? 3 : 0))
break;
 
cmdv[found++] = buf;
+
+   /* Add the '${' prefix to each var when doing $ completion. */
+   if (dollar_comp) {
+   strcpy(buf, "${");
+   buf += 2;
+   bufsz -= 3;
+   }
+
memcpy(buf, match->key, vallen);
buf += vallen;
bufsz -= vallen;
+
+   if (dollar_comp) {
+   /*
+* This one is a bit odd: vallen already contains the
+* '\0' character but we need to add the '}' suffix,
+* hence the buf - 1 here. strcpy() will add the '\0'
+* character just after '}'. buf is then incremented
+* to account for the extra '}' we just added.
+*/
+   strcpy(buf - 1, "}");
+   buf++;
+   }
}
 
qsort(cmdv, found, sizeof(cmdv[0]), strcmp_compar);
 
if (idx)
-   cmdv[found++] = "...";
+   cmdv[found++] = dollar_comp ? "${...}" : "...";
 
cmdv[found] = NULL;
return found;
diff --git a/include/command.h b/include/command.h
index 461b17447c0d..c512ec6854d0 100644
--- a/include/command.h
+++ b/include/command.h
@@ -84,6 +84,8 @@ static inline bool cmd_is_repeatable(cmd_tbl_t *cmdtp)
 
 #ifdef CONFIG_AUTO_COMPLETE
 extern int var_complete(int argc, char * cons

[U-Boot] [PATCH v4 6/6] cmd: adc: Use the sub-command infrastructure

2018-12-03 Thread Boris Brezillon
And you get sub-command auto-completion for free.

Signed-off-by: Boris Brezillon 
Reviewed-by: Tom Rini 
---
Changes in v4:
-None

Changes in v3:
- Add Tom's R-b

Changes in v2:
- New patch
---
 cmd/adc.c | 33 +
 1 file changed, 5 insertions(+), 28 deletions(-)

diff --git a/cmd/adc.c b/cmd/adc.c
index 2d635acbd950..381961cf51a4 100644
--- a/cmd/adc.c
+++ b/cmd/adc.c
@@ -146,37 +146,14 @@ static int do_adc_scan(cmd_tbl_t *cmdtp, int flag, int 
argc,
return CMD_RET_SUCCESS;
 }
 
-static cmd_tbl_t cmd_adc_sub[] = {
-   U_BOOT_CMD_MKENT(list, 1, 1, do_adc_list, "", ""),
-   U_BOOT_CMD_MKENT(info, 2, 1, do_adc_info, "", ""),
-   U_BOOT_CMD_MKENT(single, 3, 1, do_adc_single, "", ""),
-   U_BOOT_CMD_MKENT(scan, 3, 1, do_adc_scan, "", ""),
-};
-
-static int do_adc(cmd_tbl_t *cmdtp, int flag, int argc,
- char *const argv[])
-{
-   cmd_tbl_t *c;
-
-   if (argc < 2)
-   return CMD_RET_USAGE;
-
-   /* Strip off leading 'adc' command argument */
-   argc--;
-   argv++;
-
-   c = find_cmd_tbl(argv[0], &cmd_adc_sub[0], ARRAY_SIZE(cmd_adc_sub));
-
-   if (c)
-   return c->cmd(cmdtp, flag, argc, argv);
-   else
-   return CMD_RET_USAGE;
-}
-
 static char adc_help_text[] =
"list - list ADC devices\n"
"adc info  - Get ADC device info\n"
"adc single   - Get Single data of ADC device channel\n"
"adc scan  [channel mask] - Scan all [or masked] ADC channels";
 
-U_BOOT_CMD(adc, 4, 1, do_adc, "ADC sub-system", adc_help_text);
+U_BOOT_CMD_WITH_SUBCMDS(adc, "ADC sub-system", adc_help_text,
+   U_BOOT_SUBCMD_MKENT(list, 1, 1, do_adc_list),
+   U_BOOT_SUBCMD_MKENT(info, 2, 1, do_adc_info),
+   U_BOOT_SUBCMD_MKENT(single, 3, 1, do_adc_single),
+   U_BOOT_SUBCMD_MKENT(scan, 3, 1, do_adc_scan));
-- 
2.17.1

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


[U-Boot] [PATCH v4 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

2018-12-03 Thread Boris Brezillon
It's way simpler this way, and we also gain auto-completion support for
free (MTD name auto-completion has been added with mtd_name_complete())

Signed-off-by: Boris Brezillon 
Reviewed-by: Tom Rini 
---
Changes in v4:
- Fix maxargs in mtd bad sub-cmd
- s/do_mtd_name_complete()/mtd_name_complete()/

Changes in v3:
- Add Tom's R-b

Changes in v2:
- Adjust based on changes done in the sub-cmd infra
---
 cmd/mtd.c | 476 --
 1 file changed, 281 insertions(+), 195 deletions(-)

diff --git a/cmd/mtd.c b/cmd/mtd.c
index 614222398467..cda702d18b16 100644
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -15,6 +15,22 @@
 #include 
 #include 
 
+#include 
+
+static struct mtd_info *get_mtd_by_name(const char *name)
+{
+   struct mtd_info *mtd;
+
+   mtd_probe_devices();
+
+   mtd = get_mtd_device_nm(name);
+   if (IS_ERR_OR_NULL(mtd))
+   printf("MTD device %s not found, ret %ld\n", name,
+  PTR_ERR(mtd));
+
+   return mtd;
+}
+
 static uint mtd_len_to_pages(struct mtd_info *mtd, u64 len)
 {
do_div(len, mtd->writesize);
@@ -177,7 +193,8 @@ static bool mtd_oob_write_is_empty(struct mtd_oob_ops *op)
return true;
 }
 
-static int do_mtd_list(void)
+static int do_mtd_list(cmd_tbl_t *cmdtp, int flag, int argc,
+  char * const argv[])
 {
struct mtd_info *mtd;
int dev_nb = 0;
@@ -221,229 +238,287 @@ static int mtd_special_write_oob(struct mtd_info *mtd, 
u64 off,
return ret;
 }
 
-static int do_mtd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_mtd_io(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
+   bool dump, read, raw, woob, write_empty_pages, has_pages = false;
+   u64 start_off, off, len, remaining, default_len;
+   struct mtd_oob_ops io_op = {};
+   uint user_addr = 0, npages;
+   const char *cmd = argv[0];
struct mtd_info *mtd;
-   const char *cmd;
-   char *mtd_name;
+   u32 oob_len;
+   u8 *buf;
+   int ret;
 
-   /* All MTD commands need at least two arguments */
if (argc < 2)
return CMD_RET_USAGE;
 
-   /* Parse the command name and its optional suffixes */
-   cmd = argv[1];
-
-   /* List the MTD devices if that is what the user wants */
-   if (strcmp(cmd, "list") == 0)
-   return do_mtd_list();
-
-   /*
-* The remaining commands require also at least a device ID.
-* Check the selected device is valid. Ensure it is probed.
-*/
-   if (argc < 3)
-   return CMD_RET_USAGE;
-
-   mtd_name = argv[2];
-   mtd_probe_devices();
-   mtd = get_mtd_device_nm(mtd_name);
-   if (IS_ERR_OR_NULL(mtd)) {
-   printf("MTD device %s not found, ret %ld\n",
-  mtd_name, PTR_ERR(mtd));
+   mtd = get_mtd_by_name(argv[1]);
+   if (IS_ERR_OR_NULL(mtd))
return CMD_RET_FAILURE;
+
+   if (mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH)
+   has_pages = true;
+
+   dump = !strncmp(cmd, "dump", 4);
+   read = dump || !strncmp(cmd, "read", 4);
+   raw = strstr(cmd, ".raw");
+   woob = strstr(cmd, ".oob");
+   write_empty_pages = !has_pages || strstr(cmd, ".dontskipff");
+
+   argc -= 2;
+   argv += 2;
+
+   if (!dump) {
+   if (!argc) {
+   ret = CMD_RET_USAGE;
+   goto out_put_mtd;
+   }
+
+   user_addr = simple_strtoul(argv[0], NULL, 16);
+   argc--;
+   argv++;
}
-   put_mtd_device(mtd);
 
-   argc -= 3;
-   argv += 3;
+   start_off = argc > 0 ? simple_strtoul(argv[0], NULL, 16) : 0;
+   if (!mtd_is_aligned_with_min_io_size(mtd, start_off)) {
+   printf("Offset not aligned with a page (0x%x)\n",
+  mtd->writesize);
+   ret = CMD_RET_FAILURE;
+   goto out_put_mtd;
+   }
 
-   /* Do the parsing */
-   if (!strncmp(cmd, "read", 4) || !strncmp(cmd, "dump", 4) ||
-   !strncmp(cmd, "write", 5)) {
-   bool has_pages = mtd->type == MTD_NANDFLASH ||
-mtd->type == MTD_MLCNANDFLASH;
-   bool dump, read, raw, woob, write_empty_pages;
-   struct mtd_oob_ops io_op = {};
-   uint user_addr = 0, npages;
-   u64 start_off, off, len, remaining, default_len;
-   u32 oob_len;
-   u8 *buf;
-   int ret;
+   default_len = dump ? mtd->writesize : mtd->size;
+   len = argc > 1 ? simple_strtoul(argv[1], NULL, 16) : default_len;
+   if (!mtd_is_aligned_with_min_io_size(mtd, len)) {
+   len = round_up(len, mtd->writesize);
+   printf("Size not on a page boundary (0x%x), rounding to 
0x%llx\n",
+  mtd->writesize, len);
+  

[U-Boot] [PATCH v4 2/6] common: command: Expose a generic helper to auto-complete sub commands

2018-12-03 Thread Boris Brezillon
Some commands have a table of sub-commands. With minor adjustments,
complete_cmdv() is able to provide auto-completion for sub-commands
(it's just about passing the table of commands instead of taking the
global one).
We rename this function into complete_subcmd() and implement
complete_cmdv() as a wrapper around complete_subcmdv().

Signed-off-by: Boris Brezillon 
Reviewed-by: Tom Rini 
---
Changes in v4:
-None

Changes in v3:
- Add Tom's R-b

Changes in v2:
- None
---
 common/command.c  | 20 
 include/command.h |  3 +++
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/common/command.c b/common/command.c
index 435824356b50..e13cb47ac18b 100644
--- a/common/command.c
+++ b/common/command.c
@@ -161,11 +161,11 @@ int var_complete(int argc, char * const argv[], char 
last_char, int maxv, char *
 
 
/*/
 
-static int complete_cmdv(int argc, char * const argv[], char last_char, int 
maxv, char *cmdv[])
+int complete_subcmdv(cmd_tbl_t *cmdtp, int count, int argc,
+char * const argv[], char last_char,
+int maxv, char *cmdv[])
 {
 #ifdef CONFIG_CMDLINE
-   cmd_tbl_t *cmdtp = ll_entry_start(cmd_tbl_t, cmd);
-   const int count = ll_entry_count(cmd_tbl_t, cmd);
const cmd_tbl_t *cmdend = cmdtp + count;
const char *p;
int len, clen;
@@ -193,7 +193,7 @@ static int complete_cmdv(int argc, char * const argv[], 
char last_char, int maxv
 
/* more than one arg or one but the start of the next */
if (argc > 1 || last_char == '\0' || isblank(last_char)) {
-   cmdtp = find_cmd(argv[0]);
+   cmdtp = find_cmd_tbl(argv[0], cmdtp, count);
if (cmdtp == NULL || cmdtp->complete == NULL) {
cmdv[0] = NULL;
return 0;
@@ -238,6 +238,18 @@ static int complete_cmdv(int argc, char * const argv[], 
char last_char, int maxv
 #endif
 }
 
+static int complete_cmdv(int argc, char * const argv[], char last_char,
+int maxv, char *cmdv[])
+{
+#ifdef CONFIG_CMDLINE
+   return complete_subcmdv(ll_entry_start(cmd_tbl_t, cmd),
+   ll_entry_count(cmd_tbl_t, cmd), argc, argv,
+   last_char, maxv, cmdv);
+#else
+   return 0;
+#endif
+}
+
 static int make_argv(char *s, int argvsz, char *argv[])
 {
int argc = 0;
diff --git a/include/command.h b/include/command.h
index 200c7a5e9f4e..89efcecfa926 100644
--- a/include/command.h
+++ b/include/command.h
@@ -54,6 +54,9 @@ int _do_help (cmd_tbl_t *cmd_start, int cmd_items, cmd_tbl_t 
* cmdtp, int
  flag, int argc, char * const argv[]);
 cmd_tbl_t *find_cmd(const char *cmd);
 cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len);
+int complete_subcmdv(cmd_tbl_t *cmdtp, int count, int argc,
+char * const argv[], char last_char, int maxv,
+char *cmdv[]);
 
 extern int cmd_usage(const cmd_tbl_t *cmdtp);
 
-- 
2.17.1

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


[U-Boot] [PATCH v4 4/6] command: commands: Add macros to declare commands with subcmds

2018-12-03 Thread Boris Brezillon
Most cmd/xxx.c source files expose several commands through a single
entry point. Some of them are doing the sub-command parsing manually in
their do_() function, others are declaring a table of sub-commands
and then use find_cmd_tbl() to delegate the request to the sub command
handler.

In either case, the amount of code to do that is not negligible and
repetitive, not to mention that almost no commands are implementing
the auto-completion hook, which means most u-boot commands lack
auto-completion.

Provide several macros to easily define commands exposing sub-commands.

Signed-off-by: Boris Brezillon 
Reviewed-by: Tom Rini 
---
Changes in v4:
-None

Changes in v3:
- Add Tom's R-b
- Fix the commit message

Changes in v2:
- Adjust based on the changes done in the sub-command infra
---
 include/command.h | 78 +++
 1 file changed, 78 insertions(+)

diff --git a/include/command.h b/include/command.h
index bb93f022c514..461b17447c0d 100644
--- a/include/command.h
+++ b/include/command.h
@@ -209,6 +209,70 @@ int board_run_command(const char *cmdline);
 # define _CMD_HELP(x)
 #endif
 
+#ifdef CONFIG_NEEDS_MANUAL_RELOC
+#define U_BOOT_SUBCMDS_RELOC(_cmdname) \
+   static void _cmdname##_subcmds_reloc(void)  \
+   {   \
+   static int relocated;   \
+   \
+   if (relocated)  \
+   return; \
+   \
+   fixup_cmdtable(_cmdname##_subcmds,  \
+  ARRAY_SIZE(_cmdname##_subcmds)); \
+   relocated = 1;  \
+   }
+#else
+#define U_BOOT_SUBCMDS_RELOC(_cmdname) \
+   static void _cmdname##_subcmds_reloc(void) { }
+#endif
+
+#define U_BOOT_SUBCMDS_DO_CMD(_cmdname)
\
+   static int do_##_cmdname(cmd_tbl_t *cmdtp, int flag, int argc,  \
+char * const argv[], int *repeatable)  \
+   {   \
+   cmd_tbl_t *subcmd;  \
+   \
+   _cmdname##_subcmds_reloc(); \
+   \
+   /* We need at least the cmd and subcmd names. */\
+   if (argc < 2 || argc > CONFIG_SYS_MAXARGS)  \
+   return CMD_RET_USAGE;   \
+   \
+   subcmd = find_cmd_tbl(argv[1], _cmdname##_subcmds,  \
+ ARRAY_SIZE(_cmdname##_subcmds));  \
+   if (!subcmd || argc - 1 > subcmd->maxargs)  \
+   return CMD_RET_USAGE;   \
+   \
+   if (flag == CMD_FLAG_REPEAT &&  \
+   !cmd_is_repeatable(subcmd)) \
+   return CMD_RET_SUCCESS; \
+   \
+   return subcmd->cmd_rep(subcmd, flag, argc - 1,  \
+  argv + 1, repeatable);   \
+   }
+
+#ifdef CONFIG_AUTO_COMPLETE
+#define U_BOOT_SUBCMDS_COMPLETE(_cmdname)  \
+   static int complete_##_cmdname(int argc, char * const argv[],   \
+  char last_char, int maxv,\
+  char *cmdv[])\
+   {   \
+   return complete_subcmdv(_cmdname##_subcmds, \
+   ARRAY_SIZE(_cmdname##_subcmds), \
+   argc - 1, argv + 1, last_char,  \
+   maxv, cmdv);\
+   }
+#else
+#define U_BOOT_SUBCMDS_COMPLETE(_cmdname)
+#endif
+
+#define U_BOOT_SUBCMDS(_cmdname, ...)  \
+   static cmd_tbl_t _cmdname##_subcmds[] = { __VA_ARGS__ };\
+   U_BOOT_SUBCMDS_RELOC(_cmdname)  \
+   U_BOOT_SUBCMDS_DO_CMD(_cmdname) \
+   U_BOOT_SUBCMDS_COMPLETE(_cmdname)
+
 #ifdef CONFIG_CMDLINE
 #d

[U-Boot] [PATCH v4 3/6] common: command: Rework the 'cmd is repeatable' logic

2018-12-03 Thread Boris Brezillon
The repeatable property is currently attached to the main command and
sub-commands have no way to change the repeatable value (the
->repeatable field in sub-command entries is ignored).

Replace the ->repeatable field by an extended ->cmd() hook (called
->cmd_rep()) which takes a new int pointer to store the repeatable cap
of the command being executed.

With this trick, we can let sub-commands decide whether they are
repeatable or not.

We also patch mmc and dtimg who are testing the ->repeatable field
directly (they now use cmd_is_repeatable() instead), and fix the help
entry manually since it doesn't use the U_BOOT_CMD() macro.

Signed-off-by: Boris Brezillon 
Reviewed-by: Tom Rini 
---
Changes in v4:
-None

Changes in v3:
- Add Tom's R-b

Changes in v2:
- New patch
---
 cmd/dtimg.c   |  2 +-
 cmd/help.c|  2 +-
 cmd/mmc.c |  4 ++--
 common/command.c  | 36 
 include/command.h | 52 +++
 5 files changed, 84 insertions(+), 12 deletions(-)

diff --git a/cmd/dtimg.c b/cmd/dtimg.c
index 65c8d101b98e..ae7d82f26dd2 100644
--- a/cmd/dtimg.c
+++ b/cmd/dtimg.c
@@ -116,7 +116,7 @@ static int do_dtimg(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
 
if (!cp || argc > cp->maxargs)
return CMD_RET_USAGE;
-   if (flag == CMD_FLAG_REPEAT && !cp->repeatable)
+   if (flag == CMD_FLAG_REPEAT && !cmd_is_repeatable(cp))
return CMD_RET_SUCCESS;
 
return cp->cmd(cmdtp, flag, argc, argv);
diff --git a/cmd/help.c b/cmd/help.c
index 503fa632e74e..fa2010c67eb1 100644
--- a/cmd/help.c
+++ b/cmd/help.c
@@ -29,7 +29,7 @@ U_BOOT_CMD(
 
 /* This does not use the U_BOOT_CMD macro as ? can't be used in symbol names */
 ll_entry_declare(cmd_tbl_t, question_mark, cmd) = {
-   "?",CONFIG_SYS_MAXARGS, 1,  do_help,
+   "?",CONFIG_SYS_MAXARGS, cmd_always_repeatable,  do_help,
"alias for 'help'",
 #ifdef  CONFIG_SYS_LONGHELP
""
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 3920a1836a59..42e38900df12 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -247,7 +247,7 @@ static int do_mmcrpmb(cmd_tbl_t *cmdtp, int flag,
 
if (cp == NULL || argc > cp->maxargs)
return CMD_RET_USAGE;
-   if (flag == CMD_FLAG_REPEAT && !cp->repeatable)
+   if (flag == CMD_FLAG_REPEAT && !cmd_is_repeatable(cp))
return CMD_RET_SUCCESS;
 
mmc = init_mmc_device(curr_device, false);
@@ -907,7 +907,7 @@ static int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, 
char * const argv[])
 
if (cp == NULL || argc > cp->maxargs)
return CMD_RET_USAGE;
-   if (flag == CMD_FLAG_REPEAT && !cp->repeatable)
+   if (flag == CMD_FLAG_REPEAT && !cmd_is_repeatable(cp))
return CMD_RET_SUCCESS;
 
if (curr_device < 0) {
diff --git a/common/command.c b/common/command.c
index e13cb47ac18b..19f0534a76ea 100644
--- a/common/command.c
+++ b/common/command.c
@@ -501,6 +501,30 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
 }
 #endif
 
+int cmd_always_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[], int *repeatable)
+{
+   *repeatable = 1;
+
+   return cmdtp->cmd(cmdtp, flag, argc, argv);
+}
+
+int cmd_never_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
+char * const argv[], int *repeatable)
+{
+   *repeatable = 0;
+
+   return cmdtp->cmd(cmdtp, flag, argc, argv);
+}
+
+int cmd_discard_repeatable(cmd_tbl_t *cmdtp, int flag, int argc,
+  char * const argv[])
+{
+   int repeatable;
+
+   return cmdtp->cmd_rep(cmdtp, flag, argc, argv, &repeatable);
+}
+
 /**
  * Call a command function. This should be the only route in U-Boot to call
  * a command, so that we can track whether we are waiting for input or
@@ -510,13 +534,15 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size)
  * @param flag Some flags normally 0 (see CMD_FLAG_.. above)
  * @param argc Number of arguments (arg 0 must be the command text)
  * @param argv Arguments
+ * @param repeatable   Can the command be repeated
  * @return 0 if command succeeded, else non-zero (CMD_RET_...)
  */
-static int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[],
+   int *repeatable)
 {
int result;
 
-   result = (cmdtp->cmd)(cmdtp, flag, argc, argv);
+   result = cmdtp->cmd_rep(cmdtp, flag, argc, argv, repeatable);
if (result)
debug("Command failed, result=%d\n", result);
return result;
@@ -553,12 +579,14 @@ enum command_ret_t cmd_process(int flag, int argc, char * 
const argv[],
 
/* If OK so far, then do the command */
if (!rc) {
+   int newrep;
+
if (ticks)
*ticks = get_timer(0);
- 

[U-Boot] [PATCH v4 0/6] cmd: Simplify support for sub-commands

2018-12-03 Thread Boris Brezillon
Hello,

Here is the 4th version of the sub-cmd patchset fixing the maxargs def
of the mtd bad sub-cmd (I noticed the bug just after sending v3 :-/).

Regards,

Boris

Boris Brezillon (6):
  common: command: Fix command auto-completion
  common: command: Expose a generic helper to auto-complete sub commands
  common: command: Rework the 'cmd is repeatable' logic
  command: commands: Add macros to declare commands with subcmds
  cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands
  cmd: adc: Use the sub-command infrastructure

 cmd/adc.c |  33 +---
 cmd/dtimg.c   |   2 +-
 cmd/help.c|   2 +-
 cmd/mmc.c |   4 +-
 cmd/mtd.c | 476 +++---
 common/command.c  |  68 ++-
 include/command.h | 133 -
 7 files changed, 477 insertions(+), 241 deletions(-)

-- 
2.17.1

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


[U-Boot] [PATCH v4 1/6] common: command: Fix command auto-completion

2018-12-03 Thread Boris Brezillon
When auto-completing command arguments, the last argument is not
necessarily the one we need to auto-complete. When the last character is
a space, a tab or '\0' what we want instead is list all possible values,
or if there's only one possible value, place this value on the command
line instead of trying to suffix the last valid argument with missing
chars.

Signed-off-by: Boris Brezillon 
Reviewed-by: Tom Rini 
---
Changes in v4:
-None

Changes in v3:
- Add Tom's R-b

Changes in v2:
- None
---
 common/command.c | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/common/command.c b/common/command.c
index 2433a89e0a8e..435824356b50 100644
--- a/common/command.c
+++ b/common/command.c
@@ -362,13 +362,21 @@ int cmd_auto_complete(const char *const prompt, char 
*buf, int *np, int *colp)
sep = NULL;
seplen = 0;
if (i == 1) { /* one match; perfect */
-   k = strlen(argv[argc - 1]);
+   if (last_char != '\0' && !isblank(last_char))
+   k = strlen(argv[argc - 1]);
+   else
+   k = 0;
+
s = cmdv[0] + k;
len = strlen(s);
sep = " ";
seplen = 1;
} else if (i > 1 && (j = find_common_prefix(cmdv)) != 0) { /* more */
-   k = strlen(argv[argc - 1]);
+   if (last_char != '\0' && !isblank(last_char))
+   k = strlen(argv[argc - 1]);
+   else
+   k = 0;
+
j -= k;
if (j > 0) {
s = cmdv[0] + k;
-- 
2.17.1

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


Re: [U-Boot] [PATCH v3 0/6] cmd: Simplify support for sub-commands

2018-12-03 Thread Boris Brezillon
On Mon,  3 Dec 2018 22:14:52 +0100
Boris Brezillon  wrote:

> Hello,
> 
> Here is the 3nd version of the sub-cmd patchset. This version fixes a
> few typos in commit messages.


> 
> Regards,
> 
> Boris
> 
> Boris Brezillon (6):
>   common: command: Fix command auto-completion
>   common: command: Expose a generic helper to auto-complete sub commands
>   common: command: Rework the 'cmd is repeatable' logic
>   command: commands: Add macros to declare commands with subcmds
>   cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

I found a bug in this patch.

Please ignore this version, I'll send a new one.

>   cmd: adc: Use the sub-command infrastructure
> 
>  cmd/adc.c |  33 +---
>  cmd/dtimg.c   |   2 +-
>  cmd/help.c|   2 +-
>  cmd/mmc.c |   4 +-
>  cmd/mtd.c | 476 +++---
>  common/command.c  |  68 ++-
>  include/command.h | 133 -
>  7 files changed, 477 insertions(+), 241 deletions(-)
> 

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


Re: [U-Boot] [PATCH v3 5/6] cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands

2018-12-03 Thread Boris Brezillon
On Mon,  3 Dec 2018 22:14:57 +0100
Boris Brezillon  wrote:

> It's way simpler this way, and we also gain auto-completion support for
> free (MTD name auto-completion has been added with do_mtd_name_complete())
> 
> Signed-off-by: Boris Brezillon 
> Reviewed-by: Tom Rini 
> ---
> Changes in v3:
> - Add Tom's R-b
> 
> Changes in v2:
> - Adjust based on changes done in the sub-cmd infra
> ---
>  cmd/mtd.c | 476 --
>  1 file changed, 281 insertions(+), 195 deletions(-)
> 
> diff --git a/cmd/mtd.c b/cmd/mtd.c
> index 614222398467..5b415aaa1d86 100644
> --- a/cmd/mtd.c
> +++ b/cmd/mtd.c
> @@ -15,6 +15,22 @@
>  #include 
>  #include 
>  
> +#include 
> +
> +static struct mtd_info *get_mtd_by_name(const char *name)
> +{
> + struct mtd_info *mtd;
> +
> + mtd_probe_devices();
> +
> + mtd = get_mtd_device_nm(name);
> + if (IS_ERR_OR_NULL(mtd))
> + printf("MTD device %s not found, ret %ld\n", name,
> +PTR_ERR(mtd));
> +
> + return mtd;
> +}
> +
>  static uint mtd_len_to_pages(struct mtd_info *mtd, u64 len)
>  {
>   do_div(len, mtd->writesize);
> @@ -177,7 +193,8 @@ static bool mtd_oob_write_is_empty(struct mtd_oob_ops *op)
>   return true;
>  }
>  
> -static int do_mtd_list(void)
> +static int do_mtd_list(cmd_tbl_t *cmdtp, int flag, int argc,
> +char * const argv[])
>  {
>   struct mtd_info *mtd;
>   int dev_nb = 0;
> @@ -221,229 +238,287 @@ static int mtd_special_write_oob(struct mtd_info 
> *mtd, u64 off,
>   return ret;
>  }
>  
> -static int do_mtd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> +static int do_mtd_io(cmd_tbl_t *cmdtp, int flag, int argc, char * const 
> argv[])
>  {
> + bool dump, read, raw, woob, write_empty_pages, has_pages = false;
> + u64 start_off, off, len, remaining, default_len;
> + struct mtd_oob_ops io_op = {};
> + uint user_addr = 0, npages;
> + const char *cmd = argv[0];
>   struct mtd_info *mtd;
> - const char *cmd;
> - char *mtd_name;
> + u32 oob_len;
> + u8 *buf;
> + int ret;
>  
> - /* All MTD commands need at least two arguments */
>   if (argc < 2)
>   return CMD_RET_USAGE;
>  
> - /* Parse the command name and its optional suffixes */
> - cmd = argv[1];
> -
> - /* List the MTD devices if that is what the user wants */
> - if (strcmp(cmd, "list") == 0)
> - return do_mtd_list();
> -
> - /*
> -  * The remaining commands require also at least a device ID.
> -  * Check the selected device is valid. Ensure it is probed.
> -  */
> - if (argc < 3)
> - return CMD_RET_USAGE;
> -
> - mtd_name = argv[2];
> - mtd_probe_devices();
> - mtd = get_mtd_device_nm(mtd_name);
> - if (IS_ERR_OR_NULL(mtd)) {
> - printf("MTD device %s not found, ret %ld\n",
> -mtd_name, PTR_ERR(mtd));
> + mtd = get_mtd_by_name(argv[1]);
> + if (IS_ERR_OR_NULL(mtd))
>   return CMD_RET_FAILURE;
> +
> + if (mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH)
> + has_pages = true;
> +
> + dump = !strncmp(cmd, "dump", 4);
> + read = dump || !strncmp(cmd, "read", 4);
> + raw = strstr(cmd, ".raw");
> + woob = strstr(cmd, ".oob");
> + write_empty_pages = !has_pages || strstr(cmd, ".dontskipff");
> +
> + argc -= 2;
> + argv += 2;
> +
> + if (!dump) {
> + if (!argc) {
> + ret = CMD_RET_USAGE;
> + goto out_put_mtd;
> + }
> +
> + user_addr = simple_strtoul(argv[0], NULL, 16);
> + argc--;
> + argv++;
>   }
> - put_mtd_device(mtd);
>  
> - argc -= 3;
> - argv += 3;
> + start_off = argc > 0 ? simple_strtoul(argv[0], NULL, 16) : 0;
> + if (!mtd_is_aligned_with_min_io_size(mtd, start_off)) {
> + printf("Offset not aligned with a page (0x%x)\n",
> +mtd->writesize);
> + ret = CMD_RET_FAILURE;
> + goto out_put_mtd;
> + }
>  
> - /* Do the parsing */
> - if (!strncmp(cmd, "read", 4) || !strncmp(cmd, "dump", 4) ||
> - !strncmp(cmd, "write", 5)) {
> - bool has_pages = mtd->type == MTD_NANDFLASH ||
> -  mtd->type == MTD_MLCNANDFLASH;
> - bool dump, read, raw, woob, write_empty_pages;
> - struct mtd_oob_ops io_op = {};
> - uint user_addr = 0, npages;
> - u64 start_off, off, len, remaining, default_len;
> - u32 oob_len;
> - u8 *buf;
> - int ret;
> + default_len = dump ? mtd->writesize : mtd->size;
> + len = argc > 1 ? simple_strtoul(argv[1], NULL, 16) : default_len;
> + if (!mtd_is_aligned_with_min_io_size(mtd, len)) {
> + len = round_up(len, mtd->writesize);
> + printf("Size not on a page bo

[U-Boot] [PATCH 08/13] ARM: dts: rmobile: Extract SDHI extras on H3, M3W, M3N Salvator-X

2018-12-03 Thread Marek Vasut
The SDHI nodes are missing features supported in upstream U-Boot,
like mode support properties. Pull the extras into U-Boot specific
DT until it hits mainline Linux, to make syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a7795-salvator-x-u-boot.dts  | 28 +++
 arch/arm/dts/r8a7796-salvator-x-u-boot.dts  | 28 +++
 arch/arm/dts/r8a77965-salvator-x-u-boot.dts | 31 +
 arch/arm/dts/salvator-common.dtsi   | 17 ++-
 4 files changed, 90 insertions(+), 14 deletions(-)

diff --git a/arch/arm/dts/r8a7795-salvator-x-u-boot.dts 
b/arch/arm/dts/r8a7795-salvator-x-u-boot.dts
index 6b29aaaf90..8ad21ca4f9 100644
--- a/arch/arm/dts/r8a7795-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a7795-salvator-x-u-boot.dts
@@ -8,7 +8,35 @@
 #include "r8a7795-salvator-x.dts"
 #include "r8a7795-u-boot.dtsi"
 
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
 };
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
+
+&sdhi3 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
diff --git a/arch/arm/dts/r8a7796-salvator-x-u-boot.dts 
b/arch/arm/dts/r8a7796-salvator-x-u-boot.dts
index 00ec01299a..7614a810b6 100644
--- a/arch/arm/dts/r8a7796-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a7796-salvator-x-u-boot.dts
@@ -8,7 +8,35 @@
 #include "r8a7796-salvator-x.dts"
 #include "r8a7796-u-boot.dtsi"
 
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
 };
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
+
+&sdhi3 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
diff --git a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts 
b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
index 4245a88d53..bd32a25409 100644
--- a/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
+++ b/arch/arm/dts/r8a77965-salvator-x-u-boot.dts
@@ -8,7 +8,38 @@
 #include "r8a77965-salvator-x.dts"
 #include "r8a77965-u-boot.dtsi"
 
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
 };
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+   status = "okay";
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+   status = "okay";
+};
+
+&sdhi3 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+   status = "okay";
+};
diff --git a/arch/arm/dts/salvator-common.dtsi 
b/arch/arm/dts/salvator-common.dtsi
index b036a713ea..2a7f36abd2 100644
--- a/arch/arm/dts/salvator-common.dtsi
+++ b/arch/arm/dts/salvator-common.dtsi
@@ -480,13 +480,13 @@
};
 
sdhi2_pins: sd2 {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
-   power-source = <1800>;
+   power-source = <3300>;
};
 
sdhi2_pins_uhs: sd2_uhs {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
power-source = <1800>;
};
@@ -618,13 +618,8 @@
cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
bus-width = <4>;
-   sd-uhs-sdr12;
-   sd-uhs-sdr25;
sd-uhs-sdr50;
-   sd-uhs-sdr104;
status = "okay";
-
-   max-frequency = <20800>;
 };
 
 &sdhi2 {
@@ -637,11 +632,9 @@
vqmmc-supply = <®_1p8v>;
bus-width = <8>;
mmc-hs200-1_8v;
-   mmc-hs400-1_8v;
non-removable;
fixed-emmc-driver-type = <1>;
status = "okay";
-   max-frequency = <2>;
 };
 
 &sdhi3 {
@@ -654,12 +647,8 @@
cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
bus-width = <4>;
-   sd-uhs-sdr12;
-   sd-uhs-sdr25;
sd-uhs-sd

[U-Boot] [PATCH 09/13] ARM: dts: rmobile: Extract SDHI nodes on E3 Ebisu

2018-12-03 Thread Marek Vasut
The SDHI nodes are not in Linux 4.17 DTs in E3, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a77990-ebisu-u-boot.dts | 158 +
 arch/arm/dts/r8a77990-ebisu.dts|  36 --
 arch/arm/dts/r8a77990-u-boot.dtsi  |  24 
 arch/arm/dts/r8a77990.dtsi |  24 
 4 files changed, 182 insertions(+), 60 deletions(-)

diff --git a/arch/arm/dts/r8a77990-ebisu-u-boot.dts 
b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
index 56fe510204..c0fba1568c 100644
--- a/arch/arm/dts/r8a77990-ebisu-u-boot.dts
+++ b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
@@ -8,7 +8,165 @@
 #include "r8a77990-ebisu.dts"
 #include "r8a77990-u-boot.dtsi"
 
+/ {
+   reg_1p8v: regulator0 {
+   compatible = "regulator-fixed";
+   regulator-name = "fixed-1.8V";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   reg_3p3v: regulator1 {
+   compatible = "regulator-fixed";
+   regulator-name = "fixed-3.3V";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   regulator-boot-on;
+   regulator-always-on;
+   };
+
+   vcc_sdhi0: regulator-vcc-sdhi0 {
+   compatible = "regulator-fixed";
+
+   regulator-name = "SDHI0 Vcc";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+
+   gpio = <&gpio5 17 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   };
+
+   vccq_sdhi0: regulator-vccq-sdhi0 {
+   compatible = "regulator-gpio";
+
+   regulator-name = "SDHI0 VccQ";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+
+   gpios = <&gpio5 18 GPIO_ACTIVE_HIGH>;
+   gpios-states = <1>;
+   states = <330 1
+ 180 0>;
+   };
+
+   vcc_sdhi1: regulator-vcc-sdhi1 {
+   compatible = "regulator-fixed";
+
+   regulator-name = "SDHI1 Vcc";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+
+   gpio = <&gpio0 4 GPIO_ACTIVE_HIGH>;
+   enable-active-high;
+   };
+
+   vccq_sdhi1: regulator-vccq-sdhi1 {
+   compatible = "regulator-gpio";
+
+   regulator-name = "SDHI1 VccQ";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+
+   gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
+   gpios-states = <1>;
+   states = <330 1
+ 180 0>;
+   };
+};
+
+&pfc {
+   sdhi0_pins: sd0 {
+   groups = "sdhi0_data4", "sdhi0_ctrl";
+   function = "sdhi0";
+   power-source = <3300>;
+   };
+
+   sdhi0_pins_uhs: sd0_uhs {
+   groups = "sdhi0_data4", "sdhi0_ctrl";
+   function = "sdhi0";
+   power-source = <1800>;
+   };
+
+   sdhi1_pins: sd1 {
+   groups = "sdhi1_data4", "sdhi1_ctrl";
+   function = "sdhi1";
+   power-source = <3300>;
+   };
+
+   sdhi1_pins_uhs: sd1_uhs {
+   groups = "sdhi1_data4", "sdhi1_ctrl";
+   function = "sdhi1";
+   power-source = <1800>;
+   };
+
+   sdhi3_pins: sd2 {
+   groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
+   function = "sdhi3";
+   power-source = <1800>;
+   };
+
+   sdhi3_pins_uhs: sd2_uhs {
+   groups = "sdhi3_data8", "sdhi3_ctrl", "sdhi3_ds";
+   function = "sdhi3";
+   power-source = <1800>;
+   };
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
 };
+
+&sdhi0 {
+   /* full size SD */
+   pinctrl-0 = <&sdhi0_pins>;
+   pinctrl-1 = <&sdhi0_pins_uhs>;
+   pinctrl-names = "default", "state_uhs";
+
+   vmmc-supply = <&vcc_sdhi0>;
+   vqmmc-supply = <&vccq_sdhi0>;
+   cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
+   wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
+   bus-width = <4>;
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr50;
+   sd-uhs-sdr104;
+   status = "okay";
+   max-frequency = <20800>;
+};
+
+&sdhi1 {
+   /* microSD */
+   pinctrl-0 = <&sdhi1_pins>;
+   pinctrl-1 = <&sdhi1_pins_uhs>;
+   pinctrl-names = "default", "state_uhs";
+
+   vmmc-supply = <&vcc_sdhi1>;
+   vqmmc-supply = <&vccq_sdhi1>;
+   cd-gpios = <&gpio3 14 GPIO_ACTIVE_LOW>;
+   bus-width = <4>;
+   sd-uhs-sdr12;
+   sd

[U-Boot] [PATCH 05/13] ARM: dts: rmobile: Extract AVB node extras on V3M Eagle

2018-12-03 Thread Marek Vasut
The AVB node is not complete in Linux 4.17 DTs on V3M Eagle, pull the
AVB node extras into U-Boot specific DT until they hit mainline Linux,
to make syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a77970-eagle-u-boot.dts | 20 
 arch/arm/dts/r8a77970-eagle.dts| 11 ---
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/arch/arm/dts/r8a77970-eagle-u-boot.dts 
b/arch/arm/dts/r8a77970-eagle-u-boot.dts
index 0c716deb6f..5b17f1d1f0 100644
--- a/arch/arm/dts/r8a77970-eagle-u-boot.dts
+++ b/arch/arm/dts/r8a77970-eagle-u-boot.dts
@@ -7,6 +7,7 @@
 
 #include "r8a77970-eagle.dts"
 #include "r8a77970-u-boot.dtsi"
+#include 
 
 / {
aliases {
@@ -14,6 +15,25 @@
};
 };
 
+&avb {
+   pinctrl-0 = <&avb0_pins>;
+   pinctrl-names = "default";
+
+};
+
+&phy0 {
+   reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
+};
+
+&pfc {
+   avb0_pins: avb {
+   mux {
+   groups = "avb0_link", "avb0_mdio", "avb0_rgmii", 
"avb0_txcrefclk";
+   function = "avb0";
+   };
+   };
+};
+
 &rpc {
num-cs = <1>;
status = "okay";
diff --git a/arch/arm/dts/r8a77970-eagle.dts b/arch/arm/dts/r8a77970-eagle.dts
index 107ac5d393..7fee1aa1ac 100644
--- a/arch/arm/dts/r8a77970-eagle.dts
+++ b/arch/arm/dts/r8a77970-eagle.dts
@@ -8,7 +8,6 @@
 
 /dts-v1/;
 #include "r8a77970.dtsi"
-#include 
 
 / {
model = "Renesas Eagle board based on r8a77970";
@@ -32,8 +31,6 @@
 };
 
 &avb {
-   pinctrl-0 = <&avb0_pins>;
-   pinctrl-names = "default";
renesas,no-ether-link;
phy-handle = <&phy0>;
phy-mode = "rgmii-id";
@@ -44,7 +41,6 @@
reg = <0>;
interrupt-parent = <&gpio1>;
interrupts = <17 IRQ_TYPE_LEVEL_LOW>;
-   reset-gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
};
 };
 
@@ -72,13 +68,6 @@
 };
 
 &pfc {
-   avb0_pins: avb {
-   mux {
-   groups = "avb0_link", "avb0_mdio", "avb0_rgmii", 
"avb0_txcrefclk";
-   function = "avb0";
-   };
-   };
-
i2c0_pins: i2c0 {
groups = "i2c0";
function = "i2c0";
-- 
2.18.0

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


[U-Boot] [PATCH 07/13] ARM: dts: rmobile: Extract SDHI extras on H3 and M3W ULCB

2018-12-03 Thread Marek Vasut
The SDHI nodes are missing features supported in upstream U-Boot,
like mode support properties. Pull the extras into U-Boot specific
DT until it hits mainline Linux, to make syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a7795-h3ulcb-u-boot.dts | 21 +
 arch/arm/dts/r8a7796-m3ulcb-u-boot.dts | 21 +
 arch/arm/dts/ulcb.dtsi | 12 +++-
 3 files changed, 45 insertions(+), 9 deletions(-)

diff --git a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
index e8e73a95a4..4f5410f1e8 100644
--- a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
@@ -19,7 +19,28 @@
};
 };
 
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
 };
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
diff --git a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
index 5cfadef87d..843be4b67e 100644
--- a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
@@ -19,7 +19,28 @@
};
 };
 
+&sdhi2_pins {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   power-source = <1800>;
+};
+
+&sdhi2_pins_uhs {
+   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
 };
+
+&sdhi0 {
+   sd-uhs-sdr12;
+   sd-uhs-sdr25;
+   sd-uhs-sdr104;
+   max-frequency = <20800>;
+};
+
+&sdhi2 {
+   mmc-hs400-1_8v;
+   max-frequency = <2>;
+};
diff --git a/arch/arm/dts/ulcb.dtsi b/arch/arm/dts/ulcb.dtsi
index c805265343..6f814845f8 100644
--- a/arch/arm/dts/ulcb.dtsi
+++ b/arch/arm/dts/ulcb.dtsi
@@ -299,13 +299,13 @@
};
 
sdhi2_pins: sd2 {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
-   power-source = <1800>;
+   power-source = <3300>;
};
 
sdhi2_pins_uhs: sd2_uhs {
-   groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
+   groups = "sdhi2_data8", "sdhi2_ctrl";
function = "sdhi2";
power-source = <1800>;
};
@@ -387,12 +387,8 @@
vqmmc-supply = <&vccq_sdhi0>;
cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
bus-width = <4>;
-   sd-uhs-sdr12;
-   sd-uhs-sdr25;
sd-uhs-sdr50;
-   sd-uhs-sdr104;
status = "okay";
-   max-frequency = <20800>;
 };
 
 &sdhi2 {
@@ -405,10 +401,8 @@
vqmmc-supply = <®_1p8v>;
bus-width = <8>;
mmc-hs200-1_8v;
-   mmc-hs400-1_8v;
non-removable;
status = "okay";
-   max-frequency = <2>;
 };
 
 &ssi1 {
-- 
2.18.0

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


[U-Boot] [PATCH 12/13] ARM: dts: rmobile: Sync Gen2 DTs with Linux 4.19.6

2018-12-03 Thread Marek Vasut
Synchronize DTs with mainline Linux 4.19.6 ,
commit 96db90800c06d3fe3fa08eb6222fe201286bb778

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a7790-lager.dts   |   8 ++-
 arch/arm/dts/r8a7790.dtsi| 101 ---
 arch/arm/dts/r8a7791-koelsch.dts |  11 ++--
 arch/arm/dts/r8a7791-porter.dts  |  41 -
 arch/arm/dts/r8a7791.dtsi|  51 +++-
 arch/arm/dts/r8a7792-blanche.dts |   5 ++
 arch/arm/dts/r8a7792.dtsi|  19 +-
 arch/arm/dts/r8a7793-gose.dts|  11 ++--
 arch/arm/dts/r8a7793.dtsi|  52 +++-
 arch/arm/dts/r8a7794-alt.dts |  14 -
 arch/arm/dts/r8a7794-silk.dts|   8 ++-
 arch/arm/dts/r8a7794.dtsi|  28 -
 12 files changed, 309 insertions(+), 40 deletions(-)

diff --git a/arch/arm/dts/r8a7790-lager.dts b/arch/arm/dts/r8a7790-lager.dts
index dcda98c6ae..50312e752e 100644
--- a/arch/arm/dts/r8a7790-lager.dts
+++ b/arch/arm/dts/r8a7790-lager.dts
@@ -899,9 +899,6 @@
status = "okay";
 
port {
-   #address-cells = <1>;
-   #size-cells = <0>;
-
vin1ep0: endpoint {
remote-endpoint = <&adv7180>;
bus-width = <8>;
@@ -926,6 +923,11 @@
};
 };
 
+&rwdt {
+   timeout-sec = <60>;
+   status = "okay";
+};
+
 &ssi1 {
shared-pin;
 };
diff --git a/arch/arm/dts/r8a7790.dtsi b/arch/arm/dts/r8a7790.dtsi
index ed09e56c36..0925bdca43 100644
--- a/arch/arm/dts/r8a7790.dtsi
+++ b/arch/arm/dts/r8a7790.dtsi
@@ -76,12 +76,12 @@
compatible = "arm,cortex-a15";
reg = <0>;
clock-frequency = <13>;
-   voltage-tolerance = <1>; /* 1% */
clocks = <&cpg CPG_CORE R8A7790_CLK_Z>;
-   clock-latency = <30>; /* 300 us */
power-domains = <&sysc R8A7790_PD_CA15_CPU0>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
 
/* kHz - uV - OPPs unknown yet */
operating-points = <140 100>,
@@ -101,6 +101,16 @@
power-domains = <&sysc R8A7790_PD_CA15_CPU1>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
+
+   /* kHz - uV - OPPs unknown yet */
+   operating-points = <140 100>,
+  <1225000 100>,
+  <105 100>,
+  < 875000 100>,
+  < 70 100>,
+  < 35 100>;
};
 
cpu2: cpu@2 {
@@ -112,6 +122,16 @@
power-domains = <&sysc R8A7790_PD_CA15_CPU2>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
+
+   /* kHz - uV - OPPs unknown yet */
+   operating-points = <140 100>,
+  <1225000 100>,
+  <105 100>,
+  < 875000 100>,
+  < 70 100>,
+  < 35 100>;
};
 
cpu3: cpu@3 {
@@ -123,6 +143,16 @@
power-domains = <&sysc R8A7790_PD_CA15_CPU3>;
next-level-cache = <&L2_CA15>;
capacity-dmips-mhz = <1024>;
+   voltage-tolerance = <1>; /* 1% */
+   clock-latency = <30>; /* 300 us */
+
+   /* kHz - uV - OPPs unknown yet */
+   operating-points = <140 100>,
+  <1225000 100>,
+  <105 100>,
+  < 875000 100>,
+  < 70 100>,
+  < 35 100>;
};
 
cpu4: cpu@100 {
@@ -199,6 +229,24 @@
clock-frequency = <0>;
};
 
+   pmu-0 {
+   compatible = "arm,cortex-a15-pmu";
+   interrupts-extended = <&gic GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
+ 

[U-Boot] [PATCH 10/13] ARM: dts: rmobile: Extract SCIF2 node on E3 Ebisu

2018-12-03 Thread Marek Vasut
The SCIF2 node is not in Linux 4.17 DTs on E3, pull it into U-Boot
specific DT extras until it hits mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a77990-ebisu-u-boot.dts | 19 +++
 arch/arm/dts/r8a77990-ebisu.dts| 16 
 2 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/arch/arm/dts/r8a77990-ebisu-u-boot.dts 
b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
index c0fba1568c..8445a6f1c6 100644
--- a/arch/arm/dts/r8a77990-ebisu-u-boot.dts
+++ b/arch/arm/dts/r8a77990-ebisu-u-boot.dts
@@ -77,6 +77,19 @@
 };
 
 &pfc {
+   pinctrl-0 = <&scif_clk_pins>;
+   pinctrl-names = "default";
+
+   scif2_pins: scif2 {
+   groups = "scif2_data_a";
+   function = "scif2";
+   };
+
+   scif_clk_pins: scif_clk {
+   groups = "scif_clk_a";
+   function = "scif_clk";
+   };
+
sdhi0_pins: sd0 {
groups = "sdhi0_data4", "sdhi0_ctrl";
function = "sdhi0";
@@ -119,6 +132,12 @@
status = "okay";
 };
 
+&scif2 {
+   pinctrl-0 = <&scif2_pins>;
+   pinctrl-names = "default";
+   status = "okay";
+};
+
 &sdhi0 {
/* full size SD */
pinctrl-0 = <&sdhi0_pins>;
diff --git a/arch/arm/dts/r8a77990-ebisu.dts b/arch/arm/dts/r8a77990-ebisu.dts
index cea08d7488..e337c902cb 100644
--- a/arch/arm/dts/r8a77990-ebisu.dts
+++ b/arch/arm/dts/r8a77990-ebisu.dts
@@ -122,9 +122,6 @@
 };
 
 &pfc {
-   pinctrl-0 = <&scif_clk_pins>;
-   pinctrl-names = "default";
-
avb_pins: avb {
mux {
groups = "avb_link", "avb_mii";
@@ -132,16 +129,6 @@
};
};
 
-   scif2_pins: scif2 {
-   groups = "scif2_data_a";
-   function = "scif2";
-   };
-
-   scif_clk_pins: scif_clk {
-   groups = "scif_clk_a";
-   function = "scif_clk";
-   };
-
usb0_pins: usb0 {
groups = "usb0";
function = "usb0";
@@ -208,8 +195,5 @@
 };
 
 &scif2 {
-   pinctrl-0 = <&scif2_pins>;
-   pinctrl-names = "default";
-
status = "okay";
 };
-- 
2.18.0

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


[U-Boot] [PATCH 11/13] ARM: dts: rmobile: Extract i2c6 on M2W Porter

2018-12-03 Thread Marek Vasut
The i2c6 node is missing in mainline Linux thus far, pull it
into U-Boot specific DT until it hits mainline Linux, to make
syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a7791-porter-u-boot.dts | 5 +
 arch/arm/dts/r8a7791-porter.dts| 5 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/dts/r8a7791-porter-u-boot.dts 
b/arch/arm/dts/r8a7791-porter-u-boot.dts
index 797fa9d6e7..275f6b4375 100644
--- a/arch/arm/dts/r8a7791-porter-u-boot.dts
+++ b/arch/arm/dts/r8a7791-porter-u-boot.dts
@@ -11,3 +11,8 @@
 &scif0 {
u-boot,dm-pre-reloc;
 };
+
+&i2c6 {
+   status = "okay";
+   clock-frequency = <40>;
+};
diff --git a/arch/arm/dts/r8a7791-porter.dts b/arch/arm/dts/r8a7791-porter.dts
index fa9a57d770..f2d5723fbd 100644
--- a/arch/arm/dts/r8a7791-porter.dts
+++ b/arch/arm/dts/r8a7791-porter.dts
@@ -372,11 +372,6 @@
clock-frequency = <40>;
 };
 
-&i2c6 {
-   status = "okay";
-   clock-frequency = <40>;
-};
-
 &sata0 {
status = "okay";
 };
-- 
2.18.0

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


[U-Boot] [PATCH 06/13] ARM: dts: rmobile: Extract CPLD node on H3 and M3W ULCB

2018-12-03 Thread Marek Vasut
The CPLD node is missing in Linux 4.17 DTs on H3/M3W ULCB, pull the
node into U-Boot specific DT until it hits mainline Linux, to make
syncing of DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a7795-h3ulcb-u-boot.dts | 11 +++
 arch/arm/dts/r8a7796-m3ulcb-u-boot.dts | 11 +++
 arch/arm/dts/ulcb.dtsi |  9 -
 3 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
index 1355a26729..e8e73a95a4 100644
--- a/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7795-h3ulcb-u-boot.dts
@@ -8,6 +8,17 @@
 #include "r8a7795-h3ulcb.dts"
 #include "r8a7795-u-boot.dtsi"
 
+/ {
+   cpld {
+   compatible = "renesas,ulcb-cpld";
+   status = "okay";
+   gpio-sck = <&gpio6 8 0>;
+   gpio-mosi = <&gpio6 7 0>;
+   gpio-miso = <&gpio6 10 0>;
+   gpio-sstbz = <&gpio2 3 0>;
+   };
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
diff --git a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts 
b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
index 166bc47e50..5cfadef87d 100644
--- a/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
+++ b/arch/arm/dts/r8a7796-m3ulcb-u-boot.dts
@@ -8,6 +8,17 @@
 #include "r8a7796-m3ulcb.dts"
 #include "r8a7796-u-boot.dtsi"
 
+/ {
+   cpld {
+   compatible = "renesas,ulcb-cpld";
+   status = "okay";
+   gpio-sck = <&gpio6 8 0>;
+   gpio-mosi = <&gpio6 7 0>;
+   gpio-miso = <&gpio6 10 0>;
+   gpio-sstbz = <&gpio2 3 0>;
+   };
+};
+
 &rpc {
reg = <0 0xee20 0 0x100>, <0 0x0800 0 0x0400>;
status = "okay";
diff --git a/arch/arm/dts/ulcb.dtsi b/arch/arm/dts/ulcb.dtsi
index e16c7f245e..c805265343 100644
--- a/arch/arm/dts/ulcb.dtsi
+++ b/arch/arm/dts/ulcb.dtsi
@@ -24,15 +24,6 @@
stdout-path = "serial0:115200n8";
};
 
-   cpld {
-   compatible = "renesas,ulcb-cpld";
-   status = "okay";
-   gpio-sck = <&gpio6 8 0>;
-   gpio-mosi = <&gpio6 7 0>;
-   gpio-miso = <&gpio6 10 0>;
-   gpio-sstbz = <&gpio2 3 0>;
-   };
-
audio_clkout: audio-clkout {
/*
 * This is same as <&rcar_sound 0>
-- 
2.18.0

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


[U-Boot] [PATCH 03/13] ARM: dts: rmobile: Extract USB nodes on M3N

2018-12-03 Thread Marek Vasut
The USB nodes are not in Linux 4.17 DTs in M3N, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a77965-u-boot.dtsi | 55 +++
 arch/arm/dts/r8a77965.dtsi| 53 +
 2 files changed, 64 insertions(+), 44 deletions(-)

diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi 
b/arch/arm/dts/r8a77965-u-boot.dtsi
index ca80ef8f29..15d9467ec0 100644
--- a/arch/arm/dts/r8a77965-u-boot.dtsi
+++ b/arch/arm/dts/r8a77965-u-boot.dtsi
@@ -19,4 +19,59 @@
bank-width = <2>;
status = "disabled";
};
+
+   ehci0: usb@ee080100 {
+   compatible = "generic-ehci";
+   reg = <0 0xee080100 0 0x100>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 703>;
+   phys = <&usb2_phy0>;
+   phy-names = "usb";
+   companion= <&ohci0>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 703>;
+   };
+
+   usb2_phy0: usb-phy@ee080200 {
+   compatible = "renesas,usb2-phy-r8a77965",
+"renesas,rcar-gen3-usb2-phy";
+   reg = <0 0xee080200 0 0x700>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 703>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 703>;
+   #phy-cells = <0>;
+   };
+
+   ehci1: usb@ee0a0100 {
+   compatible = "generic-ehci";
+   reg = <0 0xee0a0100 0 0x100>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 702>;
+   phys = <&usb2_phy1>;
+   phy-names = "usb";
+   companion= <&ohci1>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 702>;
+   };
+
+   usb2_phy1: usb-phy@ee0a0200 {
+   compatible = "renesas,usb2-phy-r8a77965",
+"renesas,rcar-gen3-usb2-phy";
+   reg = <0 0xee0a0200 0 0x700>;
+   clocks = <&cpg CPG_MOD 702>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 702>;
+   #phy-cells = <0>;
+   };
+
+   xhci0: usb@ee00 {
+   compatible = "renesas,xhci-r8a77965",
+"renesas,rcar-gen3-xhci";
+   reg = <0 0xee00 0 0xc00>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 328>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 328>;
+   };
 };
diff --git a/arch/arm/dts/r8a77965.dtsi b/arch/arm/dts/r8a77965.dtsi
index 840512ecfa..a47f079c02 100644
--- a/arch/arm/dts/r8a77965.dtsi
+++ b/arch/arm/dts/r8a77965.dtsi
@@ -645,28 +645,18 @@
};
 
ehci0: usb@ee080100 {
-   compatible = "generic-ehci";
reg = <0 0xee080100 0 0x100>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 703>;
-   phys = <&usb2_phy0>;
-   phy-names = "usb";
-   companion= <&ohci0>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 703>;
-   status = "disabled";
+   /* placeholder */
};
 
usb2_phy0: usb-phy@ee080200 {
-   compatible = "renesas,usb2-phy-r8a77965",
-"renesas,rcar-gen3-usb2-phy";
reg = <0 0xee080200 0 0x700>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 703>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 703>;
-   #phy-cells = <0>;
-   status = "disabled";
+   /* placeholder */
+   };
+
+   usb2_phy1: usb-phy@ee0a0200 {
+   reg = <0 0xee0a0200 0 0x700>;
+   /* placeholder */
};
 
ohci1: usb@ee0a {
@@ -675,16 +665,8 @@
};
 
ehci1: usb@ee0a0100 {
-   compatible = "generic-ehci";
reg = <0 0xee0a0100 0 0x100>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 702>;
-   phys = <&usb2_phy1>;
-   phy-names = "usb";
-   companion= <&ohci1>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 702>;
-   status = "disabled";
+   /* placeholder */
};
 
i2c0: i2c@e650 {
@@ -852,17 +834,6 @@
};
};
 
-   usb2_phy1: usb-phy@ee0a0200 {
-   com

[U-Boot] [PATCH 04/13] ARM: dts: rmobile: Extract SDHI nodes on M3N

2018-12-03 Thread Marek Vasut
The SDHI nodes are not in Linux 4.17 DTs in M3N, pull them into U-Boot
specific DT extras until they hit mainline Linux, to make syncing of
DTs easier.

Signed-off-by: Marek Vasut 
Cc: Nobuhiro Iwamatsu 
---
 arch/arm/dts/r8a77965-u-boot.dtsi | 44 +++
 arch/arm/dts/r8a77965.dtsi| 32 +++---
 2 files changed, 48 insertions(+), 28 deletions(-)

diff --git a/arch/arm/dts/r8a77965-u-boot.dtsi 
b/arch/arm/dts/r8a77965-u-boot.dtsi
index 15d9467ec0..cbd29b3aed 100644
--- a/arch/arm/dts/r8a77965-u-boot.dtsi
+++ b/arch/arm/dts/r8a77965-u-boot.dtsi
@@ -20,6 +20,50 @@
status = "disabled";
};
 
+   sdhi0: sd@ee10 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee10 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 314>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 314>;
+   status = "disabled";
+   };
+
+   sdhi1: sd@ee12 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee12 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 313>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 313>;
+   status = "disabled";
+   };
+
+   sdhi2: sd@ee14 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee14 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 312>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 312>;
+   status = "disabled";
+   };
+
+   sdhi3: sd@ee16 {
+   compatible = "renesas,sdhi-r8a77965";
+   reg = <0 0xee16 0 0x2000>;
+   interrupts = ;
+   clocks = <&cpg CPG_MOD 311>;
+   max-frequency = <2>;
+   power-domains = <&sysc 32>;
+   resets = <&cpg 311>;
+   status = "disabled";
+   };
+
ehci0: usb@ee080100 {
compatible = "generic-ehci";
reg = <0 0xee080100 0 0x100>;
diff --git a/arch/arm/dts/r8a77965.dtsi b/arch/arm/dts/r8a77965.dtsi
index a47f079c02..84ecb4631f 100644
--- a/arch/arm/dts/r8a77965.dtsi
+++ b/arch/arm/dts/r8a77965.dtsi
@@ -835,47 +835,23 @@
};
 
sdhi0: sd@ee10 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee10 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 314>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 314>;
-   status = "disabled";
+   /* placeholder */
};
 
sdhi1: sd@ee12 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee12 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 313>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 313>;
-   status = "disabled";
+   /* placeholder */
};
 
sdhi2: sd@ee14 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee14 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 312>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 312>;
-   status = "disabled";
+   /* placeholder */
};
 
sdhi3: sd@ee16 {
-   compatible = "renesas,sdhi-r8a77965";
reg = <0 0xee16 0 0x2000>;
-   interrupts = ;
-   clocks = <&cpg CPG_MOD 311>;
-   max-frequency = <2>;
-   power-domains = <&sysc 32>;
-   resets = <&cpg 311>;
-   status = "disabled";
+   /* placeholder */
};
 
usb3_phy0: usb-phy@e65ee000 {
-- 
2.18.0

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


  1   2   3   >