Re: [U-Boot] [U-Boot, 7/7] Revert "mmc: dw_mmc: rockchip: select proper card clock"

2017-06-25 Thread Philipp Tomsich
> The origin patch get rockchip dwmmc by name 'ciu', which lead
> to the SPL not able to remove 'clock-names' node in dts.
> I'm not saying this is not correct, but I would prefer to handle
> this in dts or clock driver to save memory for SPL.
> For example the rk3288 SPL size has out of memory if not enable
> BACK_TO_BROM option, there are many other SoCs has less internal
> memory than rk3288.
> 
> This reverts commit 480a9b834c661fc88217f50bdf780192c3018d66.
> 
> Signed-off-by: Kever Yang 
> Reviewed-by: Simon Glass 
> ---
> 
>  drivers/mmc/rockchip_dw_mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,03/13] rockchip: rk3066: add sysreset driver

2017-06-25 Thread Philipp Tomsich
> Add support for system reset for rk3066 socs.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
>  drivers/sysreset/Makefile  |  1 +
>  drivers/sysreset/sysreset_rk3066.c | 62 
> ++
>  2 files changed, 63 insertions(+)
>  create mode 100644 drivers/sysreset/sysreset_rk3066.c
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 2/3] rockchip: video: mipi: Split mipi driver into common and specific parts

2017-06-25 Thread Philipp Tomsich
> To compatible with different rockchip soc, we split the mipi dirver into
> common and soc specific parts, and all the soc share the common
> functions from common driver part.
> 
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> ---
> 
> Changes in v2:
> -Use dev_read_addr to replace devfdt_get_addr.
> 
> Changes in v1:
> -Delete the unused variable.
> 
>  drivers/video/rockchip/rk3399_mipi.c | 183 
> +++
>  drivers/video/rockchip/rk_mipi.c | 170 ++--
>  drivers/video/rockchip/rk_mipi.h |  32 ++
>  3 files changed, 221 insertions(+), 164 deletions(-)
>  create mode 100644 drivers/video/rockchip/rk3399_mipi.c
>  create mode 100644 drivers/video/rockchip/rk_mipi.h
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/4] rockchip: evb-rk3328: set uart2 io routing to M1

2017-06-25 Thread Philipp Tomsich
> In rk3328, some function pin may have more than one choice, and muxed
> with more than one IO, for example, the UART2 controller IO,
> TX and RX, have 3 choice(setting in com_iomux):
> - M0 which mux with GPIO1A0/GPIO1A1
> - M1 which mux with GPIO2A0/GPIO2A1
> - usb2phy which mux with USB2.0 DP/DM pin.
> 
> This suppose to be set in SPL, but the U-Boot is also design to co-work
> with Rockchip SPL(miniloader) which may not setting this config, let's set
> this config to make sure the UART2 TX/RX working in U-Boot.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> ---
> 
> Changes in v2:
> - remove SDMMC io routing
> 
>  board/rockchip/evb_rk3328/evb-rk3328.c | 10 ++++++
>  1 file changed, 10 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 13/13] rockchip: rk3066: add sdram init code for tpl

2017-06-25 Thread Philipp Tomsich
> Add sdram initialisation code which will be ussed by tpl first boot stage.
> We need to implement sdram initialisation in tpl due to size issues on rk3066
> platform.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  arch/arm/include/asm/arch-rockchip/ddr_rk3188.h |   5 +
>  arch/arm/mach-rockchip/rk3066/sdram_init.c  | 995 
> 
>  2 files changed, 1000 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk3066/sdram_init.c
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] rockchip: video: mipi: Modify format type for debug message

2017-06-25 Thread Philipp Tomsich
> Modify format type for debug message.
> 
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> ---
> 
> Changes in v1:
> -Change the debug message format type because of the change the variable.
> 
>  drivers/video/rockchip/rk_mipi.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 8/8] rockchip: rv1108: disable CONFIG_RAM before we have driver

2017-06-25 Thread Philipp Tomsich
> The rv1108 do not have DRAM driver now, so disable it first,
> or else it will get conflict with the sdram common code.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  configs/evb-rv1108_defconfig | 1 -
>  1 file changed, 1 deletion(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,7/8] rockchip: correct the bank0 ram size

2017-06-25 Thread Philipp Tomsich
> The bank0 ram size should be the DRAM size minus reserved size,
> the DRAM size may be 1GB, 2GB, 4GB, we can not hard code it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - move the dram_init_banksize() from board file into soc file for we
>   have the same setting for different board in one SoC now.
> 
>  arch/arm/mach-rockchip/rk3328/rk3328.c| 11 +++
>  arch/arm/mach-rockchip/rk3368/rk3368.c| 11 +++
>  arch/arm/mach-rockchip/rk3399/rk3399.c| 11 +++
>  board/geekbuying/geekbox/geekbox.c|  8 
>  board/rockchip/evb_px5/evb-px5.c  |  9 -
>  board/rockchip/evb_rk3328/evb-rk3328.c|  9 -
>  board/rockchip/evb_rk3399/evb-rk3399.c|  9 -
>  board/rockchip/sheep_rk3368/sheep_rk3368.c|  8 
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c |  9 -
>  9 files changed, 33 insertions(+), 52 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,7/8] rockchip: correct the bank0 ram size

2017-06-25 Thread Philipp Tomsich
> The bank0 ram size should be the DRAM size minus reserved size,
> the DRAM size may be 1GB, 2GB, 4GB, we can not hard code it.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - move the dram_init_banksize() from board file into soc file for we
>   have the same setting for different board in one SoC now.
> 
>  arch/arm/mach-rockchip/rk3328/rk3328.c| 11 +++
>  arch/arm/mach-rockchip/rk3368/rk3368.c| 11 +++
>  arch/arm/mach-rockchip/rk3399/rk3399.c| 11 +++
>  board/geekbuying/geekbox/geekbox.c|  8 
>  board/rockchip/evb_px5/evb-px5.c  |  9 -
>  board/rockchip/evb_rk3328/evb-rk3328.c|  9 -
>  board/rockchip/evb_rk3399/evb-rk3399.c|  9 -
>  board/rockchip/sheep_rk3368/sheep_rk3368.c|  8 
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c |  9 -
>  9 files changed, 33 insertions(+), 52 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] rockchip: doc: update latest info to document

2017-06-25 Thread Philipp Tomsich
> - Add some rk3399 and rk3328 boards;
> - use rkdeveloptool;
> - add link to opensource.rock-chips.com instead of wikidot;
> - other update.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> ---
> 
> Changes in v2:
> - add rkflashtool info back
> 
>  doc/README.rockchip | 48 
>  1 file changed, 28 insertions(+), 20 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rockchip: rk3288: Add reset reason detection

2017-06-25 Thread Philipp Tomsich
> Sometimes it's helpful to know the reset reason caused in the SoC.
> Add reset reason detection for the RK3288 SoC.
> This will set an environemt variable which represents the reset reason.
> 
> Signed-off-by: Wadim Egorov <w.ego...@phytec.de>
> ---
>  arch/arm/mach-rockchip/rk3288-board.c | 28 
>  1 file changed, 28 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 2/8] usb: host: xhci-rockchip: use fixed regulator to control vbus

2017-06-25 Thread Philipp Tomsich
> Use fixed regulator to control the voltage of vbus. Enable vbus
> supply when usb start and disable vbus supply when usb stop.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> ---
> 
> Changes in v7: None
> Changes in v6:
> - Remove #ifdef DM_REGULATOR and DM_USB due to the addition in Kconfig
> 
> Changes in v5:
> - Propagate the return value of setting VBus and print error when failed
> 
> Changes in v4:
> - Splited from patch [Uboot,v3,04/10]
> - Define set vbus as empty function if the macros aren't set
> 
> Changes in v3: None
> Changes in v2:
> - Use fixed regulator to control vbus instead of gpio
> 
>  drivers/usb/host/xhci-rockchip.c | 36 ++--
>  1 file changed, 18 insertions(+), 18 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,6/8] rockchip: dts: rk3368: add dmc node

2017-06-25 Thread Philipp Tomsich
> Add dmc node to enable sdram driver.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/dts/rk3368.dtsi | 7 +++
>  1 file changed, 7 insertions(+)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 7/8] rockchip: dts: rk3328: support and enable dwc2

2017-06-25 Thread Philipp Tomsich
> Enable dwc2 controller and add fixed regulator for dwc2 controller to
> control vbus.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3:
> - add hnp-srp-disable property
> 
>  arch/arm/dts/rk3328-evb.dts | 14 ++
>  arch/arm/dts/rk3328.dtsi| 10 ++++++
>  2 files changed, 24 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,5/8] rockchip: dts: rk3328: add dmc node

2017-06-25 Thread Philipp Tomsich
> Add a dmc node for sdram driver.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/dts/rk3328.dtsi | 7 +++
>  1 file changed, 7 insertions(+)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,6/8] rockchip: dts: rk3368: add dmc node

2017-06-25 Thread Philipp Tomsich
> Add dmc node to enable sdram driver.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/dts/rk3368.dtsi | 7 +++
>  1 file changed, 7 insertions(+)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,7/7] rockchip: add evb_rk3229 board

2017-06-25 Thread Philipp Tomsich
> evb_rk3229 is a RK3229 based board, with:
> - 8GB eMMC;
> - 1GB DDR SDRAM;
> - 2 USB2.0 HOST port;
> - 1 MAC port;
> - 1 HDMI port;
> - IR;
> - WiFi;
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/mach-rockchip/Kconfig |  1 +
>  board/rockchip/evb_rk3229/Kconfig  | 15 +
>  board/rockchip/evb_rk3229/MAINTAINERS  |  6 
>  board/rockchip/evb_rk3229/Makefile |  7 
>  board/rockchip/evb_rk3229/evb_rk3229.c | 12 +++
>  configs/evb-rk3229_defconfig   | 44 +
>  include/configs/evb_rk3229.h   | 60 
> ++
>  7 files changed, 145 insertions(+)
>  create mode 100644 board/rockchip/evb_rk3229/Kconfig
>  create mode 100644 board/rockchip/evb_rk3229/MAINTAINERS
>  create mode 100644 board/rockchip/evb_rk3229/Makefile
>  create mode 100644 board/rockchip/evb_rk3229/evb_rk3229.c
>  create mode 100644 configs/evb-rk3229_defconfig
>  create mode 100644 include/configs/evb_rk3229.h
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v4, 4/4] doc: rockchip: Add phyCORE-RK3288 RDK to board list

2017-06-25 Thread Philipp Tomsich
> Signed-off-by: Wadim Egorov <w.ego...@phytec.de>
> Acked-by: Simon Glass <s...@chromium.org>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> Changes in v4:
> - Added Reviewed-by: Simon Glass <s...@chromium.org>
> 
>  doc/README.rockchip | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,2/8] rockchip: use common sdram function

2017-06-25 Thread Philipp Tomsich
> Replace the sdram_init() in board init and rockchip_sdram_size() in
> sdram driver for all the Rockchip SoCs which enable CONFIG_RAM.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - add evb-px5 and geekbox board
> - use CONFIG_SYS_SDRAM_BASE for ram_base
> 
>  arch/arm/include/asm/arch-rockchip/ddr_rk3288.h   | 48 
>  arch/arm/mach-rockchip/rk3188-board.c | 22 --
>  arch/arm/mach-rockchip/rk3188/sdram_rk3188.c  | 62 +++
>  arch/arm/mach-rockchip/rk3288-board.c | 22 --
>  arch/arm/mach-rockchip/rk3288/sdram_rk3288.c  | 66 +++-
>  arch/arm/mach-rockchip/rk3399/sdram_rk3399.c  | 94 
> +--
>  board/geekbuying/geekbox/geekbox.c|  6 --
>  board/rockchip/evb_px5/evb-px5.c  |  7 --
>  board/rockchip/evb_rk3328/evb-rk3328.c|  6 --
>  board/rockchip/evb_rk3399/evb-rk3399.c| 22 --
>  board/rockchip/sheep_rk3368/sheep_rk3368.c|  7 --
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c | 22 --
>  12 files changed, 26 insertions(+), 358 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 8/8] rockchip: rv1108: disable CONFIG_RAM before we have driver

2017-06-25 Thread Philipp Tomsich
> The rv1108 do not have DRAM driver now, so disable it first,
> or else it will get conflict with the sdram common code.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  configs/evb-rv1108_defconfig | 1 -
>  1 file changed, 1 deletion(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/8] rockchip: rk3328: add sdram driver in U-Boot

2017-06-25 Thread Philipp Tomsich
> Add sdram driver in U-Boot for get the correct sdram size from
> sys_reg, so that U-Boot can co-work with Rockchip loader or SPL
> to get different dram capability and then tell the kernel.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/mach-rockchip/rk3328/Makefile   |  1 +
>  arch/arm/mach-rockchip/rk3328/sdram_rk3328.c | 60 
> 
>  2 files changed, 61 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk3328/sdram_rk3328.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v4] rockchip: video: mipi: Modify variable type for arm32 compatibility

2017-06-25 Thread Philipp Tomsich
> Some address relevant varibable is defined originally as u64. To
> compatible with arm32, this patch change them to uintptr_t type.
> 
> Signed-off-by: Eric Gao 
> Reviewed-by: Simon Glass 
> ---
> 
> Changes in v3:
> -Cancel the force convert for devfdt_get_addr's return value type.
> -Change the addr tye from uintptr_t * to uintptr_t
> 
> Changes in v2:
> -Change the address base variable from "uintptr_t *" to "uintptr_t"
> 
> Changes in v1:
> -Change the address base variable to uintptr_t * type.
> 
>  drivers/video/rockchip/rk_mipi.c | 14 +++---
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] rockchip: rk3328: correct mem_region

2017-06-25 Thread Philipp Tomsich
> According to rk3328 TRM:
> 0~0xff00 is ddr space;
> 0xff00~0x is device space.
> 
> Signed-off-by: Kever Yang 
> Reviewed-by: Simon Glass 
> ---
> 
>  arch/arm/mach-rockchip/rk3328/rk3328.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,2/7] rockchip: rk322x: add clock driver

2017-06-25 Thread Philipp Tomsich
> Add clock driver init support for:
> - cpu, bus clock init;
> - emmc, sdmmc clock;
> - ddr clock;
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2:
> - update copyright
> - fix typo
> 
>  arch/arm/include/asm/arch-rockchip/cru_rk322x.h | 215 
>  drivers/clk/rockchip/Makefile   |   1 +
>  drivers/clk/rockchip/clk_rk322x.c   | 413 
> 
>  3 files changed, 629 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk322x.h
>  create mode 100644 drivers/clk/rockchip/clk_rk322x.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 7/7] rockchip: dm: convert fdt_get to dev_read

2017-06-25 Thread Philipp Tomsich
> With the new dev_read functions available, we can convert the rockchip
> architecture-specific drivers and common drivers used by these devices
> over to the dev_read family of calls.
> 
> This covers the DRAM controller initialisation for the RK3188, RK3288
> and RK3399... all of these read some of the tuning/setup/timing
> parameters from the device-tree.
> 
> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  arch/arm/mach-rockchip/rk3188/sdram_rk3188.c | 20 +---
>  arch/arm/mach-rockchip/rk3288/sdram_rk3288.c | 20 +---
>  arch/arm/mach-rockchip/rk3399/sdram_rk3399.c |  8 +++-
>  3 files changed, 21 insertions(+), 27 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 6/7] rockchip: ns16550: dm: convert fdt_get to dev_read

2017-06-25 Thread Philipp Tomsich
> With the new dev_read functions available, we can convert the rockchip
> architecture-specific drivers and common drivers used by these devices
> over to the dev_read family of calls.
> 
> This covers the serial driver (ns16550 and compatible) used for the
> Rockchip devices.
> 
> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  drivers/serial/ns16550.c | 11 ---
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/7] rockchip: mkimage: add support for rk322x soc

2017-06-25 Thread Philipp Tomsich
> Add support for rk322x package header in mkimage tool.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  tools/rkcommon.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 6/7] rockchip: ns16550: dm: convert fdt_get to dev_read

2017-06-25 Thread Philipp Tomsich
> With the new dev_read functions available, we can convert the rockchip
> architecture-specific drivers and common drivers used by these devices
> over to the dev_read family of calls.
> 
> This covers the serial driver (ns16550 and compatible) used for the
> Rockchip devices.
> 
> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  drivers/serial/ns16550.c | 11 ---
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 3/7] rockchip: xhci: dm: convert fdt_get to dev_read

2017-06-25 Thread Philipp Tomsich
> With the new dev_read functions available, we can convert the rockchip
> architecture-specific drivers and common drivers used by these devices
> over to the dev_read family of calls.
> 
> This change covers the USB3 (xhci) driver for the Rockchip devices.
> 
> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  drivers/usb/host/xhci-rockchip.c | 13 -
>  1 file changed, 4 insertions(+), 9 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/7] rockchip: mkimage: add support for rk322x soc

2017-06-25 Thread Philipp Tomsich
> Add support for rk322x package header in mkimage tool.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  tools/rkcommon.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 02/13] rockchip: rk3066: add rk3066 pinctrl driver

2017-06-25 Thread Philipp Tomsich
> Add driver supporting pin multiplexing on rk3066 platform.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  drivers/pinctrl/Kconfig   |   9 +
>  drivers/pinctrl/rockchip/Makefile |   1 +
>  drivers/pinctrl/rockchip/pinctrl_rk3066.c | 342 
> ++
>  3 files changed, 352 insertions(+)
>  create mode 100644 drivers/pinctrl/rockchip/pinctrl_rk3066.c
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 04/13] rockchip: rk3066: add clock driver for rk3066 soc

2017-06-25 Thread Philipp Tomsich
> Add clock driver for rk3066 platform.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  arch/arm/include/asm/arch-rockchip/cru_rk3066.h | 189 
>  drivers/clk/rockchip/Makefile   |   1 +
>  drivers/clk/rockchip/clk_rk3066.c   | 586 
> 
>  3 files changed, 776 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/cru_rk3066.h
>  create mode 100644 drivers/clk/rockchip/clk_rk3066.c
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 5/8] usb: dwc2: use dev_read_bool() instead of fdt_getprop()

2017-06-25 Thread Philipp Tomsich
> Use dev_read_bool() instead of fdt_getprop() to get the property
> from DTS. And add a comment for "hnp-srp-disable" property to
> fully describe its effect.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> ---
> 
> Changes in v7:
> - Romove unused variable ‘prop’ in dwc2 driver
> 
> Changes in v6:
> - New patch
> - Use dev_read_bool() instead of fdt_getprop()
> - Add a comment for "hnp-srp-disable" feature
> 
>  drivers/usb/host/dwc2.c | 16 ++------
>  1 file changed, 6 insertions(+), 10 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v4] rockchip: video: mipi: Modify variable type for arm32 compatibility

2017-06-25 Thread Philipp Tomsich
> Some address relevant varibable is defined originally as u64. To
> compatible with arm32, this patch change them to uintptr_t type.
> 
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v3:
> -Cancel the force convert for devfdt_get_addr's return value type.
> -Change the addr tye from uintptr_t * to uintptr_t
> 
> Changes in v2:
> -Change the address base variable from "uintptr_t *" to "uintptr_t"
> 
> Changes in v1:
> -Change the address base variable to uintptr_t * type.
> 
>  drivers/video/rockchip/rk_mipi.c | 14 +++---
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 2/4] rockchip: pinctrl: rk3328: use gpio instead of sdmmc-pwren

2017-06-25 Thread Philipp Tomsich
> SDMMC-PWREN is a pin to control voltage for SDMMC IO, it may
> be high active or low active, the dwmmc driver always assume
> the sdmmc-pwren as high active.
> 
> Kernel treat this pin as fixed regulator instead of a pin from
> controller, and then it can set in dts file upon board schematic,
> that's a good solution, we can also do this in u-boot.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Acked-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  drivers/pinctrl/rockchip/pinctrl_rk3328.c | 6 ++
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/8] rockchip: add sdram_common for common functions

2017-06-25 Thread Philipp Tomsich
> There are some functions like sdram_size_mb can be re-used for
> different rockchip SoCs, just put them into common file.
> Add board_get_usable_ram_top() for ram_top init base on
> SDRAM_MAX_SIZE.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - add board_get_usable_ram_top()
> 
>  arch/arm/include/asm/arch-rockchip/sdram_common.h | 58 
>  arch/arm/mach-rockchip/Makefile   |  3 +
>  arch/arm/mach-rockchip/sdram_common.c | 83 
> +++
>  include/configs/rk3188_common.h   |  1 +
>  include/configs/rk3288_common.h   |  1 +
>  include/configs/rk3328_common.h   |  2 +-
>  include/configs/rk3368_common.h   |  2 +
>  include/configs/rk3399_common.h   |  1 +
>  8 files changed, 150 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/sdram_common.h
>  create mode 100644 arch/arm/mach-rockchip/sdram_common.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,2/8] rockchip: use common sdram function

2017-06-25 Thread Philipp Tomsich
> Replace the sdram_init() in board init and rockchip_sdram_size() in
> sdram driver for all the Rockchip SoCs which enable CONFIG_RAM.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - add evb-px5 and geekbox board
> - use CONFIG_SYS_SDRAM_BASE for ram_base
> 
>  arch/arm/include/asm/arch-rockchip/ddr_rk3288.h   | 48 
>  arch/arm/mach-rockchip/rk3188-board.c | 22 --
>  arch/arm/mach-rockchip/rk3188/sdram_rk3188.c  | 62 +++
>  arch/arm/mach-rockchip/rk3288-board.c | 22 --
>  arch/arm/mach-rockchip/rk3288/sdram_rk3288.c  | 66 +++-
>  arch/arm/mach-rockchip/rk3399/sdram_rk3399.c  | 94 
> +--
>  board/geekbuying/geekbox/geekbox.c|  6 --
>  board/rockchip/evb_px5/evb-px5.c  |  7 --
>  board/rockchip/evb_rk3328/evb-rk3328.c|  6 --
>  board/rockchip/evb_rk3399/evb-rk3399.c| 22 --
>  board/rockchip/sheep_rk3368/sheep_rk3368.c|  7 --
>  board/theobroma-systems/puma_rk3399/puma-rk3399.c | 22 --
>  12 files changed, 26 insertions(+), 358 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,3/7] rockchip: rk322x: add pinctrl driver

2017-06-25 Thread Philipp Tomsich
> Add init pinctrl driver support for:
> - i2c;
> - spi;
> - uart;
> - pwm;
> - emmc/sdmmc;
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/include/asm/arch-rockchip/grf_rk322x.h | 519 
> 
>  drivers/pinctrl/Kconfig |  10 +
>  drivers/pinctrl/rockchip/Makefile   |   1 +
>  drivers/pinctrl/rockchip/pinctrl_rk322x.c   | 294 ++
>  4 files changed, 824 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rk322x.h
>  create mode 100644 drivers/pinctrl/rockchip/pinctrl_rk322x.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2] rockchip: video: mipi: Modify format type for debug message

2017-06-25 Thread Philipp Tomsich
> Modify format type for debug message.
> 
> Signed-off-by: Eric Gao 
> ---
> 
> Changes in v1:
> -Change the debug message format type because of the change the variable.
> 
>  drivers/video/rockchip/rk_mipi.c | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v4, 1/4] power: regulator: rk8xx: Build get_ldo_reg only for SPL

2017-06-25 Thread Philipp Tomsich
> Enabling CONFIG_SPL_POWER_SUPPORT will cause a compiler warning:
>   ‘get_ldo_reg’ defined but not used [-Wunused-function]
> 
> Let's wrap get_ldo_reg(), rk808_ldo and rk818_ldo with ENABLE_DRIVER
> which is only set for non SPL builds.
> 
> Signed-off-by: Wadim Egorov <w.ego...@phytec.de>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> Changes in v4:
> - Added Reviewed-by: Simon Glass <s...@chromium.org>
> 
>  drivers/power/regulator/rk8xx.c | 40 +---
>  1 file changed, 21 insertions(+), 19 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,4/7] rockchip: rk322x: add dts file

2017-06-25 Thread Philipp Tomsich
> The dts files are from kernel and with modify to adapt U-Boot.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/dts/rk3229-evb.dts|  77 
>  arch/arm/dts/rk322x.dtsi   | 710 
> +
>  include/dt-bindings/clock/rk3228-cru.h | 238 +++
>  3 files changed, 1025 insertions(+)
>  create mode 100644 arch/arm/dts/rk3229-evb.dts
>  create mode 100644 arch/arm/dts/rk322x.dtsi
>  create mode 100644 include/dt-bindings/clock/rk3228-cru.h
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 3/3] rockchip: video: defconfig: Add mipi dsi support for evb-rk3288

2017-06-25 Thread Philipp Tomsich
> Add support for rk3288 mipi dsi.
> 
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v2: None
> Changes in v1:
> -Make the subject more intelligible.
> 
>  configs/evb-rk3288_defconfig | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,4/7] rockchip: rk322x: add dts file

2017-06-25 Thread Philipp Tomsich
> The dts files are from kernel and with modify to adapt U-Boot.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/dts/rk3229-evb.dts|  77 
>  arch/arm/dts/rk322x.dtsi   | 710 
> +
>  include/dt-bindings/clock/rk3228-cru.h | 238 +++
>  3 files changed, 1025 insertions(+)
>  create mode 100644 arch/arm/dts/rk3229-evb.dts
>  create mode 100644 arch/arm/dts/rk322x.dtsi
>  create mode 100644 include/dt-bindings/clock/rk3228-cru.h
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 1/3] rockchip: video: mipi: Add rk3288 soc specific driver for mipi dsi

2017-06-25 Thread Philipp Tomsich
> Add rk3288 soc specific driver for mipi dsi.
> 
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v2:
> -Cancel the force convert for dev_read_addr return value type.
> -Change regs type from "void __iomem" to "uintptr_t".
> 
> Changes in v1:
> -Change function name from rk_display_enable to rk_mipi_enable.
> -Use IS_ERR to judge the return status.
> -Use dev_read_addr to replace devfdt_get_addr.
> 
>  drivers/video/rockchip/rk3288_mipi.c | 191 
> +++
>  drivers/video/rockchip/rk_mipi.h |   2 +-
>  2 files changed, 192 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/video/rockchip/rk3288_mipi.c
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/7] rockchip: spi: dm: convert fdt_get to dev_read

2017-06-25 Thread Philipp Tomsich
> With the new dev_read functions available, we can convert the rockchip
> architecture-specific drivers and common drivers used by these devices
> over to the dev_read family of calls.
> 
> This change covers the rk_spi.c (SPI driver) used in Rockchip devices.
> 
> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  drivers/spi/rk_spi.c | 15 +++
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 1/7] rockchip: pinctrl: dm: convert fdt_get to dev_read

2017-06-25 Thread Philipp Tomsich
> With the new dev_read functions available, we can convert the rockchip
> architecture-specific drivers and common drivers used by these devices
> over to the dev_read family of calls.
> 
> This change covers the pinctrl drivers for the Rockchip devices.
> 
> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  drivers/pinctrl/rockchip/pinctrl_rk3036.c | 3 +--
>  drivers/pinctrl/rockchip/pinctrl_rk3188.c | 3 +--
>  drivers/pinctrl/rockchip/pinctrl_rk3288.c | 3 +--
>  drivers/pinctrl/rockchip/pinctrl_rk3328.c | 3 +--
>  drivers/pinctrl/rockchip/pinctrl_rk3399.c | 3 +--
>  drivers/pinctrl/rockchip/pinctrl_rv1108.c | 3 +--
>  6 files changed, 6 insertions(+), 12 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,01/13] rockchip: rk3066: add grf header file

2017-06-25 Thread Philipp Tomsich
> grf is needed by various drivers for rk3066 soc.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  arch/arm/include/asm/arch-rockchip/grf_rk3066.h | 621 
> 
>  1 file changed, 621 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rk3066.h
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/8] rockchip: rk3328: add sdram driver in U-Boot

2017-06-25 Thread Philipp Tomsich
> Add sdram driver in U-Boot for get the correct sdram size from
> sys_reg, so that U-Boot can co-work with Rockchip loader or SPL
> to get different dram capability and then tell the kernel.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/mach-rockchip/rk3328/Makefile   |  1 +
>  arch/arm/mach-rockchip/rk3328/sdram_rk3328.c | 60 
> 
>  2 files changed, 61 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk3328/sdram_rk3328.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 09/13] rockchip: dts: set fifo mode as default for mmc

2017-06-25 Thread Philipp Tomsich
> rk3066 and rk3188 designware mmc ip doesn't support internal dma
> transfer mode. So set fifo mode as default.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> Acked-by: Simon Glass <s...@chromium.org>
> ---
>  arch/arm/dts/rk3xxx.dtsi | 3 +++
>  1 file changed, 3 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 5/7] rockchip: rk322x: add basic soc support

2017-06-25 Thread Philipp Tomsich
> Enable soc support for SPL and U-boot skeleton.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2:
> - some update for sdram common code
> 
>  arch/arm/include/asm/arch-rockchip/clock.h|   1 +
>  arch/arm/mach-rockchip/Kconfig|  13 +++
>  arch/arm/mach-rockchip/Makefile   |   3 +
>  arch/arm/mach-rockchip/rk322x-board-spl.c |  77 +++
>  arch/arm/mach-rockchip/rk322x-board.c | 136 
> ++
>  arch/arm/mach-rockchip/rk322x/Kconfig |  18 
>  arch/arm/mach-rockchip/rk322x/Makefile|   9 ++
>  arch/arm/mach-rockchip/rk322x/clk_rk322x.c|  32 ++
>  arch/arm/mach-rockchip/rk322x/syscon_rk322x.c |  22 +
>  include/configs/rk322x_common.h   |  93 ++
>  10 files changed, 404 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk322x-board-spl.c
>  create mode 100644 arch/arm/mach-rockchip/rk322x-board.c
>  create mode 100644 arch/arm/mach-rockchip/rk322x/Kconfig
>  create mode 100644 arch/arm/mach-rockchip/rk322x/Makefile
>  create mode 100644 arch/arm/mach-rockchip/rk322x/clk_rk322x.c
>  create mode 100644 arch/arm/mach-rockchip/rk322x/syscon_rk322x.c
>  create mode 100644 include/configs/rk322x_common.h
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 12/13] armv7: support rk3066 early back to bootrom in start.S

2017-06-25 Thread Philipp Tomsich
> Rockchip bootrom first reads 1KB data from nand at offset 0x10080C00 and
> executes it. Then waits for back to bootrom and loads another 32KB to sram
> which also executes. Sdram initialisation code needs to be in one of these two
> steps. Then bootloader loads another ~200KB of data at offset 0x6000
> and jumps to it.
> 
> 32KB of data is a little low for tpl + spl part and ~200KB data is to low for
> u-boot part(for example to boot from mmc you need to disable usb support.
> 
> My solution to size problem is to move sdram initialisation code to tpl stage,
> move spl part to third stage(reading 200KB data) and add support for loading
> u-boot by spl from ext2/4, fat partitions.
> 
> But moving sdram initialisation code to tpl increases size of tpl above 1KB
> (first boot stage). Solution to this is to add code which will be below 1KB
> offset in tpl binary and do back to bootrom at very beginning of the tpl
> execution.
> 
> Adding this few lines of code here meets these conditions.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  arch/arm/cpu/armv7/start.S | 13 +
>  1 file changed, 13 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v4, 3/4] rockchip: Add basic support for phyCORE-RK3288 SoM based carrier board

2017-06-25 Thread Philipp Tomsich
> The phyCORE-RK3288 is a SoM (System on Module) containing a RK3288 SoC.
> The module can be connected to different carrier boards.
> It can be also equipped with different RAM, SPI flash and eMMC variants.
> The Rapid Development Kit option is using the following setup:
> 
>   - 1 GB DDR3 RAM (2 Banks)
>   - 1x 4 KB EEPROM
>   - DP83867 Gigabit Ethernet PHY
>   - 16 MB SPI Flash
>   - 4 GB eMMC Flash
> 
> Add basic support for the PCM-947 carrier board, a RK3288 based development
> board made by PHYTEC. This board works in a combination with
> the phyCORE-RK3288 System on Module.
> 
> Signed-off-by: Wadim Egorov <w.ego...@phytec.de>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> Changes in v4:
> - Use of_machine_is_compatible()
> - Wrap phycore_init()/of_machine_is_compatible() with CONFIG_SPL_OF_PLATDATA
>   and CONFIG_SPL_POWER_SUPPORT. Needed because of_machine_is_compatible() and
>   rk818_spl_configure_*() is not available with all rk3288 board configs.
> - Added Reviewed-by: Simon Glass <s...@chromium.org>
> 
>  arch/arm/dts/Makefile|   1 +
>  arch/arm/dts/rk3288-phycore-rdk.dts  | 294 
>  arch/arm/dts/rk3288-phycore-som.dtsi | 506 
> +++
>  arch/arm/mach-rockchip/rk3288-board-spl.c|  40 +++
>  arch/arm/mach-rockchip/rk3288/Kconfig|  10 +
>  board/phytec/phycore_rk3288/Kconfig  |  15 +
>  board/phytec/phycore_rk3288/MAINTAINERS  |   6 +
>  board/phytec/phycore_rk3288/Makefile |   8 +
>  board/phytec/phycore_rk3288/phycore-rk3288.c |   8 +
>  configs/phycore-rk3288_defconfig |  70 
>  include/configs/phycore_rk3288.h |  23 ++
>  11 files changed, 981 insertions(+)
>  create mode 100644 arch/arm/dts/rk3288-phycore-rdk.dts
>  create mode 100644 arch/arm/dts/rk3288-phycore-som.dtsi
>  create mode 100644 board/phytec/phycore_rk3288/Kconfig
>  create mode 100644 board/phytec/phycore_rk3288/MAINTAINERS
>  create mode 100644 board/phytec/phycore_rk3288/Makefile
>  create mode 100644 board/phytec/phycore_rk3288/phycore-rk3288.c
>  create mode 100644 configs/phycore-rk3288_defconfig
>  create mode 100644 include/configs/phycore_rk3288.h
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 4/8] rockchip: rk3368: add sdram driver for U-Boot

2017-06-25 Thread Philipp Tomsich
> Add sdram driver in U-Boot for get the correct sdram size from
> sys_reg, so that U-Boot can co-work with Rockchip loader or SPL
> to get different dram capability and then tell the kernel.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/include/asm/arch-rockchip/grf_rk3368.h |  4 +-
>  arch/arm/mach-rockchip/rk3368/Makefile  |  1 +
>  arch/arm/mach-rockchip/rk3368/sdram_rk3368.c| 60 
> +
>  3 files changed, 64 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/mach-rockchip/rk3368/sdram_rk3368.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 8/8] rockchip: dts: rk3399: control vbus of typec by fixed regulator

2017-06-25 Thread Philipp Tomsich
> Add fixed regulator for the port of typec0 and typec1 to control vbus
> instead of gpio.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> 
>  arch/arm/dts/rk3399-evb.dts | 16 ++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v4, 2/4] power: regulator: rk8xx: Allow input current/charger shutdown configuration

2017-06-25 Thread Philipp Tomsich
> The RK818 PMIC contains a charger. Add very basic charger functionality
> to be able to regulate the USB input current and charger shutdown limits.
> 
> Signed-off-by: Wadim Egorov <w.ego...@phytec.de>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> Changes in v4:
> - Added Reviewed-by: Simon Glass <s...@chromium.org>
> 
>  drivers/power/regulator/rk8xx.c | 34 ++
>  include/power/rk8xx_pmic.h  |  2 ++
>  2 files changed, 36 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 1/8] usb: Kconfig: config USB_XHCI_ROCKCHIP depends on DM_REGULATOR and DM_USB

2017-06-25 Thread Philipp Tomsich
> The xhci-rockchip driver depends on DM_REGULATOR and DM_USB.
> So add dependent features for xhci-rockchip driver in Kconfig.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> ---
> 
> Changes in v7: None
> Changes in v6:
> - New patch, add depends on features for xhci-rockchip in Kconfig
> 
>  drivers/usb/host/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 2/3] rockchip: video: Makefile: Add soc specific driver for rk3288 mipi dsi

2017-06-25 Thread Philipp Tomsich
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> ---
> 
> Changes in v2: None
> Changes in v1: None
> 
>  drivers/video/rockchip/Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/7] rockchip: spi: dm: convert fdt_get to dev_read

2017-06-25 Thread Philipp Tomsich
> With the new dev_read functions available, we can convert the rockchip
> architecture-specific drivers and common drivers used by these devices
> over to the dev_read family of calls.
> 
> This change covers the rk_spi.c (SPI driver) used in Rockchip devices.
> 
> Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  drivers/spi/rk_spi.c | 15 +++
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 4/7] rockchip: dwmmc: use max-frequency when OF_PLATDATA enabled

2017-06-25 Thread Philipp Tomsich
> Since the 'clock-freq-min-max' is deprecated, we use max-frequency for
> all rockchip SoC dwmmc controller.
> 
> Signed-off-by: Kever Yang 
> Reviewed-by: Simon Glass 
> ---
> 
>  drivers/mmc/rockchip_dw_mmc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 3/7] rockchip: rk3328: dtsi use max-frequency for mmc node

2017-06-25 Thread Philipp Tomsich
> Since the 'clock-freq-min-max' is deprecated, we use max-frequency.
> 
> Signed-off-by: Kever Yang 
> Reviewed-by: Simon Glass 
> ---
> 
>  arch/arm/dts/rk3328.dtsi | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/7] rockchip: rk3288: dtsi use max-frequency for mmc node

2017-06-25 Thread Philipp Tomsich
> Since the 'clock-freq-min-max' is deprecated, we use max-frequency.
> 
> Signed-off-by: Kever Yang 
> Reviewed-by: Simon Glass 
> ---
> 
>  arch/arm/dts/rk3288.dtsi | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 6/7] rockchip: firefly-rk3399: enable dwmmc driver for the board

2017-06-25 Thread Philipp Tomsich
> Enable mmc_dw_rockchip driver, disable CONFIG_SPL_OF_PLATDATA
> first for some dependence patches still not merged.
> 
> Signed-off-by: Kever Yang 
> Tested-by: Vagrant Cascadian 
> Reviewed-by: Simon Glass 
> ---
> 
>  configs/firefly-rk3399_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,08/13] rockchip: mmc: support rk3066 mmc

2017-06-25 Thread Philipp Tomsich
> rk3066 and rk3288 mmc designware ip's are very similiar. They differ in
> internal dma support and max driver frequency.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  drivers/mmc/rockchip_dw_mmc.c | 31 +--
>  1 file changed, 29 insertions(+), 2 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 1/8] rockchip: add sdram_common for common functions

2017-06-25 Thread Philipp Tomsich
> There are some functions like sdram_size_mb can be re-used for
> different rockchip SoCs, just put them into common file.
> Add board_get_usable_ram_top() for ram_top init base on
> SDRAM_MAX_SIZE.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2:
> - add board_get_usable_ram_top()
> 
>  arch/arm/include/asm/arch-rockchip/sdram_common.h | 58 
>  arch/arm/mach-rockchip/Makefile   |  3 +
>  arch/arm/mach-rockchip/sdram_common.c | 83 
> +++
>  include/configs/rk3188_common.h   |  1 +
>  include/configs/rk3288_common.h   |  1 +
>  include/configs/rk3328_common.h   |  2 +-
>  include/configs/rk3368_common.h   |  2 +
>  include/configs/rk3399_common.h   |  1 +
>  8 files changed, 150 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/sdram_common.h
>  create mode 100644 arch/arm/mach-rockchip/sdram_common.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 6/8] rockchip: rk3328: board: add support of dwc2 gadget

2017-06-25 Thread Philipp Tomsich
> Probe dwc2 udc in the function of board_usb_start to enable
> usb gadget function.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v7: None
> Changes in v6: None
> Chagnes in v5: None
> Changes in v4: None
> Changes in v3: None
> 
>  board/rockchip/evb_rk3328/evb-rk3328.c | 42 
> ++
>  1 file changed, 42 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 07/13] rockchip: rk3066: add mk808 board files

2017-06-25 Thread Philipp Tomsich
> mk808 is a tv stick with two usb ports, micro sd card slot, hdmi and
> nand onboard.
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> Acked-by: Simon Glass <s...@chromium.org>
> ---
>  arch/arm/dts/Makefile   |   1 +
>  arch/arm/dts/rk3066a-mk808.dts  | 172 
> 
>  board/rikomagic/mk808_rk3066/Kconfig|  15 +++
>  board/rikomagic/mk808_rk3066/MAINTAINERS|   6 +
>  board/rikomagic/mk808_rk3066/Makefile   |   7 ++
>  board/rikomagic/mk808_rk3066/mk808_rk3066.c |  10 ++
>  configs/mk808-rk3066_defconfig  |  54 +
>  include/configs/mk808_rk3066.h  |  15 +++
>  8 files changed, 280 insertions(+)
>  create mode 100644 arch/arm/dts/rk3066a-mk808.dts
>  create mode 100644 board/rikomagic/mk808_rk3066/Kconfig
>  create mode 100644 board/rikomagic/mk808_rk3066/MAINTAINERS
>  create mode 100644 board/rikomagic/mk808_rk3066/Makefile
>  create mode 100644 board/rikomagic/mk808_rk3066/mk808_rk3066.c
>  create mode 100644 configs/mk808-rk3066_defconfig
>  create mode 100644 include/configs/mk808_rk3066.h
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,06/13] rockchip: rk3066: add core support

2017-06-25 Thread Philipp Tomsich
> Add core skeleton for rk3066
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  arch/arm/mach-rockchip/Kconfig|  16 +++
>  arch/arm/mach-rockchip/Makefile   |   4 +
>  arch/arm/mach-rockchip/rk3066-board-spl.c | 173 +
>  arch/arm/mach-rockchip/rk3066-board-tpl.c |  46 +++
>  arch/arm/mach-rockchip/rk3066-board.c | 180 
> ++
>  arch/arm/mach-rockchip/rk3066/Kconfig |  34 +
>  arch/arm/mach-rockchip/rk3066/Makefile|  12 ++
>  arch/arm/mach-rockchip/rk3066/clk_rk3066.c|  33 +
>  arch/arm/mach-rockchip/rk3066/syscon_rk3066.c |  54 
>  include/configs/rk3066_common.h   | 125 ++
>  10 files changed, 677 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk3066-board-spl.c
>  create mode 100644 arch/arm/mach-rockchip/rk3066-board-tpl.c
>  create mode 100644 arch/arm/mach-rockchip/rk3066-board.c
>  create mode 100644 arch/arm/mach-rockchip/rk3066/Kconfig
>  create mode 100644 arch/arm/mach-rockchip/rk3066/Makefile
>  create mode 100644 arch/arm/mach-rockchip/rk3066/clk_rk3066.c
>  create mode 100644 arch/arm/mach-rockchip/rk3066/syscon_rk3066.c
>  create mode 100644 include/configs/rk3066_common.h
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,10/13] rockchip: rk3066: add sdram driver

2017-06-25 Thread Philipp Tomsich
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> Acked-by: Simon Glass <s...@chromium.org>
> ---
>  arch/arm/mach-rockchip/rk3066/Makefile   |   1 +
>  arch/arm/mach-rockchip/rk3066/sdram_rk3066.c | 111 
> +++
>  2 files changed, 112 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk3066/sdram_rk3066.c
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,6/7] rockchip: rk322x: add sysreset driver

2017-06-25 Thread Philipp Tomsich
> Rockchip rk322x sysreset is much like rk3036 and other Rockchip SoCs,
> only difference is that the target register address is different.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  drivers/sysreset/sysreset_rk322x.c | 45 
> ++
>  1 file changed, 45 insertions(+)
>  create mode 100644 drivers/sysreset/sysreset_rk322x.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 1/3] rockchip: defconfig: Increase max video resolution for mipi panel

2017-06-25 Thread Philipp Tomsich
> The mipi panel used on evb-rk3399 has a 1920x1200 resolution. But now
> the max resolution is 1920x1080. So increase it.
> 
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> ---
> 
> Changes in v2: None
> Changes in v1:
> -Add title.
> 
>  configs/evb-rk3399_defconfig | 8 +++-
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 2/2] rockchip: rk3036: sync os_reg2 define with other soc

2017-06-25 Thread Philipp Tomsich
> Rockchip using the same bit definition for dram info and write
> to os_reg, the col and bw info is not correct and let's fix it.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  arch/arm/mach-rockchip/rk3036/sdram_rk3036.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v1] rockchip: pwm: fix: pwm dosen't work on rk3288

2017-06-25 Thread Philipp Tomsich
> According to rk3288 spec, the pwm register order is:
> PWM_PWM0_CNT,
> PWM_PWM0_PERIOD_HPR,
> PWM_PWM0_DUTY_LPR,
> PWM_PWM0_CTRL
> 
> but the source code's order is:
> struct rk3288_pwm {
> u32 cnt;
> u32 duty_lpr;
> u32 period_hpr;
> u32 ctrl;
> };
> 
> So, correct it here. It is the same as RK3399
> 
> Signed-off-by: Eric Gao 
> ---
> 
>  arch/arm/include/asm/arch-rockchip/pwm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 3/8] rockchip: dts: rk3328: add fixed regulator node for xhci

2017-06-25 Thread Philipp Tomsich
> The driver changes gpio to fixed regulator to control vbus, so add
> fixed regulator node in DTS for xhci driver.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> ---
> 
> Changes in v7: None
> Changes in v6:
> - New patch, splited from [PATCH,v5,06/11]
> 
>  arch/arm/dts/rk3328-evb.dts | 11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 5/7] rockchip: rk322x: add basic soc support

2017-06-25 Thread Philipp Tomsich
> Enable soc support for SPL and U-boot skeleton.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2:
> - some update for sdram common code
> 
>  arch/arm/include/asm/arch-rockchip/clock.h|   1 +
>  arch/arm/mach-rockchip/Kconfig|  13 +++
>  arch/arm/mach-rockchip/Makefile   |   3 +
>  arch/arm/mach-rockchip/rk322x-board-spl.c |  77 +++
>  arch/arm/mach-rockchip/rk322x-board.c | 136 
> ++
>  arch/arm/mach-rockchip/rk322x/Kconfig |  18 
>  arch/arm/mach-rockchip/rk322x/Makefile|   9 ++
>  arch/arm/mach-rockchip/rk322x/clk_rk322x.c|  32 ++
>  arch/arm/mach-rockchip/rk322x/syscon_rk322x.c |  22 +
>  include/configs/rk322x_common.h   |  93 ++
>  10 files changed, 404 insertions(+)
>  create mode 100644 arch/arm/mach-rockchip/rk322x-board-spl.c
>  create mode 100644 arch/arm/mach-rockchip/rk322x-board.c
>  create mode 100644 arch/arm/mach-rockchip/rk322x/Kconfig
>  create mode 100644 arch/arm/mach-rockchip/rk322x/Makefile
>  create mode 100644 arch/arm/mach-rockchip/rk322x/clk_rk322x.c
>  create mode 100644 arch/arm/mach-rockchip/rk322x/syscon_rk322x.c
>  create mode 100644 include/configs/rk322x_common.h
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 05/13] rockchip: rk3066: add rk3066 platform devicetree file

2017-06-25 Thread Philipp Tomsich
> rk3066 peripherials include usb, i2c, pwm, gpio, sdio, sdmmc, emmc, spi,
> watchdog and uart
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
>  arch/arm/dts/rk3066a.dtsi | 699 
> ++
>  1 file changed, 699 insertions(+)
>  create mode 100644 arch/arm/dts/rk3066a.dtsi
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 4/8] rockchip: rk3368: add sdram driver for U-Boot

2017-06-25 Thread Philipp Tomsich
> Add sdram driver in U-Boot for get the correct sdram size from
> sys_reg, so that U-Boot can co-work with Rockchip loader or SPL
> to get different dram capability and then tell the kernel.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/include/asm/arch-rockchip/grf_rk3368.h |  4 +-
>  arch/arm/mach-rockchip/rk3368/Makefile  |  1 +
>  arch/arm/mach-rockchip/rk3368/sdram_rk3368.c| 60 
> +
>  3 files changed, 64 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/mach-rockchip/rk3368/sdram_rk3368.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 1/2] rockchip: rk3036 remove CONFIG_RAM from defconfig

2017-06-25 Thread Philipp Tomsich
> rk3036 sdram driver does not use DM, remove CONFIG_RAM first.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
>  configs/evb-rk3036_defconfig   | 1 -
>  configs/kylin-rk3036_defconfig | 1 -
>  2 files changed, 2 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,7/7] rockchip: add evb_rk3229 board

2017-06-25 Thread Philipp Tomsich
> evb_rk3229 is a RK3229 based board, with:
> - 8GB eMMC;
> - 1GB DDR SDRAM;
> - 2 USB2.0 HOST port;
> - 1 MAC port;
> - 1 HDMI port;
> - IR;
> - WiFi;
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/mach-rockchip/Kconfig |  1 +
>  board/rockchip/evb_rk3229/Kconfig  | 15 +
>  board/rockchip/evb_rk3229/MAINTAINERS  |  6 
>  board/rockchip/evb_rk3229/Makefile |  7 
>  board/rockchip/evb_rk3229/evb_rk3229.c | 12 +++
>  configs/evb-rk3229_defconfig   | 44 +
>  include/configs/evb_rk3229.h   | 60 
> ++
>  7 files changed, 145 insertions(+)
>  create mode 100644 board/rockchip/evb_rk3229/Kconfig
>  create mode 100644 board/rockchip/evb_rk3229/MAINTAINERS
>  create mode 100644 board/rockchip/evb_rk3229/Makefile
>  create mode 100644 board/rockchip/evb_rk3229/evb_rk3229.c
>  create mode 100644 configs/evb-rk3229_defconfig
>  create mode 100644 include/configs/evb_rk3229.h
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,3/7] rockchip: rk322x: add pinctrl driver

2017-06-25 Thread Philipp Tomsich
> Add init pinctrl driver support for:
> - i2c;
> - spi;
> - uart;
> - pwm;
> - emmc/sdmmc;
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/include/asm/arch-rockchip/grf_rk322x.h | 519 
> 
>  drivers/pinctrl/Kconfig |  10 +
>  drivers/pinctrl/rockchip/Makefile   |   1 +
>  drivers/pinctrl/rockchip/pinctrl_rk322x.c   | 294 ++
>  4 files changed, 824 insertions(+)
>  create mode 100644 arch/arm/include/asm/arch-rockchip/grf_rk322x.h
>  create mode 100644 drivers/pinctrl/rockchip/pinctrl_rk322x.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,6/7] rockchip: rk322x: add sysreset driver

2017-06-25 Thread Philipp Tomsich
> Rockchip rk322x sysreset is much like rk3036 and other Rockchip SoCs,
> only difference is that the target register address is different.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Reviewed-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
> ---
> 
> Changes in v2: None
> 
>  drivers/sysreset/sysreset_rk322x.c | 45 
> ++
>  1 file changed, 45 insertions(+)
>  create mode 100644 drivers/sysreset/sysreset_rk322x.c
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v7, 4/8] rockchip: configs: rk3328: enable dwc2 driver and config fastboot

2017-06-25 Thread Philipp Tomsich
> Config dwc2 driver support host and gadget function. Add support
> of fastboot function.
> 
> Signed-off-by: Meng Dongyang <daniel.m...@rock-chips.com>
> Reviewed-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v7: None
> Changes in v6: None
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
> 
>  configs/evb-rk3328_defconfig| 19 +--
>  include/configs/rk3328_common.h |  3 +++
>  2 files changed, 20 insertions(+), 2 deletions(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot,v2,5/8] rockchip: dts: rk3328: add dmc node

2017-06-25 Thread Philipp Tomsich
> Add a dmc node for sdram driver.
> 
> Signed-off-by: Kever Yang 
> ---
> 
> Changes in v2: None
> 
>  arch/arm/dts/rk3328.dtsi | 7 +++
>  1 file changed, 7 insertions(+)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 3/4] rockchip: evb-rk3328: enable boot on regulator

2017-06-25 Thread Philipp Tomsich
> Enable all the boot-on regulator in default.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Acked-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  board/rockchip/evb_rk3328/evb-rk3328.c | 8 +++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v2, 4/4] rockchip: dts: rk3328-evb: add sdmmc-pwren regulator

2017-06-25 Thread Philipp Tomsich
> Use fixed regulator for sdmmc-pwren for sdmmc power.
> 
> Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
> Acked-by: Simon Glass <s...@chromium.org>
> ---
> 
> Changes in v2: None
> 
>  arch/arm/dts/rk3328-evb.dts | 8 
>  1 file changed, 8 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, 11/13] rockchip: serial: support rockchip rk3066

2017-06-25 Thread Philipp Tomsich
> update driver to support rk3066 serial
> 
> Signed-off-by: Paweł Jarosz <paweljarosz3...@gmail.com>
> ---
>  drivers/serial/serial_rockchip.c | 19 ++-
>  1 file changed, 18 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v3, 3/3] rockchop: video: mipi: Makefile: Add soc specfic driver for rk3399 mipi dsi

2017-06-25 Thread Philipp Tomsich
> Add Makefile item for soc specific driver for rk3399 mipi dsi.
> 
> Signed-off-by: Eric Gao <eric@rock-chips.com>
> ---
> 
> Changes in v2: None
> Changes in v1: None
> 
>  drivers/video/rockchip/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, v1] rockchip: pwm: fix: pwm dosen't work on rk3288

2017-06-25 Thread Philipp Tomsich
> According to rk3288 spec, the pwm register order is:
> PWM_PWM0_CNT,
> PWM_PWM0_PERIOD_HPR,
> PWM_PWM0_DUTY_LPR,
> PWM_PWM0_CTRL
> 
> but the source code's order is:
> struct rk3288_pwm {
> u32 cnt;
> u32 duty_lpr;
> u32 period_hpr;
> u32 ctrl;
> };
> 
> So, correct it here. It is the same as RK3399
> 
> Signed-off-by: Eric Gao 
> ---
> 
>  arch/arm/include/asm/arch-rockchip/pwm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Applied to u-boot-rockchip/next, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH v3 1/3] rockchip: mkimage: add support for verify_header/print_header

2017-05-30 Thread Philipp Tomsich
The rockchip image generation was previously missing the ability to
verify the generated header (and dump the image-type) without having
to resort to hexdump or od. Experience in our testing has showed it
to be very easy to get the rkspi and rksd images mixed up and the
lab... so we add the necessary support to have dumpimage tell us
what image type we're dealing with.

This change set adds the verify_header and print_header capability
to the rksd/rkspi image drivers (through shared code in rkcommon).

As of now, we only support images fully that are not RC4-encoded for
the SPL payload (i.e. header1 and payload). For RC4-encoded payloads,
the outer header (header0) is checked, but no detection of whether
this is a SD/MMC or SPI formatted payload takes place.

The output of dumpsys now prints the image type (spl_hdr), whether it
is a SD/MMC or SPI image, and the (padded) size of the image:
  $ ./tools/dumpimage -l ./spl.img
  Image Type:   Rockchip RK33 (SD/MMC) boot image
   ^^ SD/MMC vs. SPI indication
  spl_hdr indicated by the image
  Data Size:79872 bytes

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
Acked-by: Simon Glass <s...@chromium.org>

---

Changes in v3: None
Changes in v2:
- (in rkcommon_verify_header): changed to use a standard error
  (i.e. from errno.h) to convey 'header0 signature does not match'
  [squash of: "rockchip: mkimage: don't mix standard errors and FDT"]

 tools/rkcommon.c | 119 ++-
 tools/rkcommon.h |  19 +
 tools/rksd.c |  29 +++---
 tools/rkspi.c|  21 ++
 4 files changed, 146 insertions(+), 42 deletions(-)

diff --git a/tools/rkcommon.c b/tools/rkcommon.c
index f0bf0d4..f9d9421 100644
--- a/tools/rkcommon.c
+++ b/tools/rkcommon.c
@@ -2,6 +2,8 @@
  * (C) Copyright 2015 Google,  Inc
  * Written by Simon Glass <s...@chromium.org>
  *
+ * (C) 2017 Theobroma Systems Design und Consulting GmbH
+ *
  * SPDX-License-Identifier:GPL-2.0+
  *
  * Helper functions for Rockchip images
@@ -201,7 +203,7 @@ int rkcommon_set_header(void *buf, uint file_size,
 
rkcommon_set_header0(buf, file_size, params);
 
-   /* Set up the SPL name */
+   /* Set up the SPL name (i.e. copy spl_hdr over) */
memcpy(>magic, rkcommon_get_spl_hdr(params), RK_SPL_HDR_SIZE);
 
if (rkcommon_need_rc4_spl(params))
@@ -211,6 +213,121 @@ int rkcommon_set_header(void *buf, uint file_size,
return 0;
 }
 
+static inline unsigned rkcommon_offset_to_spi(unsigned offset)
+{
+   /*
+* While SD/MMC images use a flat addressing, SPI images are padded
+* to use the first 2K of every 4K sector only.
+*/
+   return ((offset & ~0x7ff) << 1) + (offset & 0x7ff);
+}
+
+static inline unsigned rkcommon_spi_to_offset(unsigned offset)
+{
+   return ((offset & ~0x7ff) >> 1) + (offset & 0x7ff);
+}
+
+static int rkcommon_parse_header(const void *buf, struct header0_info *header0,
+struct spl_info **spl_info)
+{
+   unsigned hdr1_offset;
+   struct header1_info *hdr1_sdmmc, *hdr1_spi;
+   int i;
+
+   if (spl_info)
+   *spl_info = NULL;
+
+   /*
+* The first header (hdr0) is always RC4 encoded, so try to decrypt
+* with the well-known key.
+*/
+   memcpy((void *)header0, buf, sizeof(struct header0_info));
+   rc4_encode((void *)header0, sizeof(struct header0_info), rc4_key);
+
+   if (header0->signature != RK_SIGNATURE)
+   return -EPROTO;
+
+   /* We don't support RC4 encoded image payloads here, yet... */
+   if (header0->disable_rc4 == 0)
+   return -ENOSYS;
+
+   hdr1_offset = header0->init_offset * RK_BLK_SIZE;
+   hdr1_sdmmc = (struct header1_info *)(buf + hdr1_offset);
+   hdr1_spi = (struct header1_info *)(buf +
+  rkcommon_offset_to_spi(hdr1_offset));
+
+   for (i = 0; i < ARRAY_SIZE(spl_infos); i++) {
+   if (!memcmp(_sdmmc->magic, spl_infos[i].spl_hdr, 4)) {
+   if (spl_info)
+   *spl_info = _infos[i];
+   return IH_TYPE_RKSD;
+   } else if (!memcmp(_spi->magic, spl_infos[i].spl_hdr, 4)) {
+   if (spl_info)
+   *spl_info = _infos[i];
+   return IH_TYPE_RKSPI;
+   }
+   }
+
+   return -1;
+}
+
+int rkcommon_verify_header(unsigned char *buf, int size,
+  struct image_tool_params *params)
+{
+   struct header0_info header0;
+   struct spl_info *img_spl_info, *spl_info;
+   int ret;
+
+   ret = rkcommon_parse_header(buf, , _spl_info);
+
+   /* If this is the (unimplemented) RC4 case, then rewrite the resu

[U-Boot] [PATCH v3 3/3] rockchip: mkimage: set init_boot_size to avoid confusing the boot ROM

2017-05-30 Thread Philipp Tomsich
This change restores the earlier setting of init_boot_size to include
the maximum area covered by the the boot ROM of each chip for resolve
issues with back-to-bootrom functionality reported by Kever and Heiko.

To ensure that we don't run into the same issue again in the future,
I have updated the comments accordingly and added a reference to the
mailing list archive (there's some very helpful info from Andy Yan
that provides background on the BootROM requirements regarding these
fields).

See https://lists.denx.de/pipermail/u-boot/2017-May/293267.html for
some background (by Andy Yan) of how the BootROM processes this field.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

---

Changes in v3:
- added in v3

Changes in v2: None

 tools/rkcommon.c | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/rkcommon.c b/tools/rkcommon.c
index f9d9421..014cceb 100644
--- a/tools/rkcommon.c
+++ b/tools/rkcommon.c
@@ -184,11 +184,14 @@ static void rkcommon_set_header0(void *buf, uint 
file_size,
 */
hdr->init_size = ROUND(hdr->init_size, 4);
/*
-* The images we create do not contain the stage following the SPL as
-* part of the SPL image, so the init_boot_size (which might have been
-* read by Rockchip's miniloder) should be the same as the init_size.
+* init_boot_size needs to be set, as it is read by the BootROM
+* to determine the size of the next-stage bootloader (e.g. U-Boot
+* proper), when used with the back-to-bootrom functionality.
+*
+* see https://lists.denx.de/pipermail/u-boot/2017-May/293267.html
+* for a more detailed explanation by Andy Yan
 */
-   hdr->init_boot_size = hdr->init_size;
+   hdr->init_boot_size = hdr->init_size + RK_MAX_BOOT_SIZE / RK_BLK_SIZE;
 
rc4_encode(buf, RK_BLK_SIZE, rc4_key);
 }
-- 
1.9.1

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


[U-Boot] [PATCH v3 0/3] rockchip: mkimage: refactor rksd/rkspi padding calculation and add dumpimage support

2017-05-30 Thread Philipp Tomsich

We support booting both from SD/MMC images and SPI images on the
RK3399-Q7 for different use-cases (e.g. external boot in development
from the SD card, internal boot from MMC or SPI depending on whether
the SPI flash is populated on any given configuration option).

In getting the SPI image support ready for production, we found a
few areas that warranted improvements:
- we had broken SPI bootstrap earlier in the changes introducting
  boot0-style images for the RK3399 (this needed fixing)
- in fixing the broken SPI padding calculation, it became apparent
  that it's best to refactor and document things before we make
  the same mistake again in the future
- with both SD/MMC and SPI images being used for various purposes
  by various people, the wrong image style was inadvertendly used
  in some tests... so we support for 'dumpimage' (i.e. verify_header
  and print_header) had to be added to quickly check the image
  type being handled

With v3, we pad the images to 2KB again, as this is required by the
BootROM (see https://lists.denx.de/pipermail/u-boot/2017-May/293268.html).

Changes in v3:
- (added patch) forces the alignment/padding to 2KB for SD images, as
  this would otherwise break the back-to-bootrom functionality
- added in v3

Changes in v2:
- (in rkcommon_verify_header): changed to use a standard error
  (i.e. from errno.h) to convey 'header0 signature does not match'
  [squash of: "rockchip: mkimage: don't mix standard errors and FDT"]

Philipp Tomsich (3):
  rockchip: mkimage: add support for verify_header/print_header
  rockchip: mkimage: force 2KB alignment for init_size
  rockchip: mkimage: set init_boot_size to avoid confusing the boot ROM

 tools/rkcommon.c | 130 ---
 tools/rkcommon.h |  20 +
 tools/rksd.c |  35 ---
 tools/rkspi.c|  23 ++
 4 files changed, 158 insertions(+), 50 deletions(-)

-- 
1.9.1

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


[U-Boot] [PATCH v3 2/3] rockchip: mkimage: force 2KB alignment for init_size

2017-05-30 Thread Philipp Tomsich
The Rockchip BootROM relies on init_size being aligned to 2KB
(see https://lists.denx.de/pipermail/u-boot/2017-May/293268.html).

This pads the image to 2KB both for SD card images and SPI images
and uses a common symbolic constant for the alignment.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

---

Changes in v3:
- (added patch) forces the alignment/padding to 2KB for SD images, as
  this would otherwise break the back-to-bootrom functionality

Changes in v2: None

 tools/rkcommon.h | 1 +
 tools/rksd.c | 6 +++---
 tools/rkspi.c| 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/rkcommon.h b/tools/rkcommon.h
index 75a4ed6..8790f1c 100644
--- a/tools/rkcommon.h
+++ b/tools/rkcommon.h
@@ -10,6 +10,7 @@
 
 enum {
RK_BLK_SIZE = 512,
+   RK_INIT_SIZE_ALIGN  = 2048,
RK_INIT_OFFSET  = 4,
RK_MAX_BOOT_SIZE= 512 << 10,
RK_SPL_HDR_START= RK_INIT_OFFSET * RK_BLK_SIZE,
diff --git a/tools/rksd.c b/tools/rksd.c
index a880a26..c56153d 100644
--- a/tools/rksd.c
+++ b/tools/rksd.c
@@ -46,10 +46,10 @@ static int rksd_vrec_header(struct image_tool_params 
*params,
struct image_type_params *tparams)
 {
/*
-* Pad to the RK_BLK_SIZE (512 bytes) to be consistent with init_size
-* being encoded in RK_BLK_SIZE units in header0 (see rkcommon.c).
+* Pad to a 2KB alignment, as required for init_size by the ROM
+* (see https://lists.denx.de/pipermail/u-boot/2017-May/293268.html)
 */
-   return rkcommon_vrec_header(params, tparams, RK_BLK_SIZE);
+   return rkcommon_vrec_header(params, tparams, RK_INIT_SIZE_ALIGN);
 }
 
 /*
diff --git a/tools/rkspi.c b/tools/rkspi.c
index f8a565d..4332ce1 100644
--- a/tools/rkspi.c
+++ b/tools/rkspi.c
@@ -63,7 +63,7 @@ static int rkspi_check_image_type(uint8_t type)
 static int rkspi_vrec_header(struct image_tool_params *params,
 struct image_type_params *tparams)
 {
-   int padding = rkcommon_vrec_header(params, tparams, 2048);
+   int padding = rkcommon_vrec_header(params, tparams, RK_INIT_SIZE_ALIGN);
/*
 * The file size has not been adjusted at this point (our caller will
 * eventually add the header/padding to the file_size), so we need to
-- 
1.9.1

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


[U-Boot] [PATCH v4 6/9] rockchip: video: split RK3228-specific part off from rk_hdmi

2017-05-31 Thread Philipp Tomsich
To prepare for the addition of RK3399 HDMI support, the HDMI driver is
refactored and broken into a chip-specific and a generic part.  This
change adds the internal interfaces, makes common/reusable functions
externally visible and splits the RK3228 driver into a separate file.

For the probing of regulators, we reuse the infrastructure created
during the VOP refactoring... i.e. we simply call into the helper
function defined for the VOP.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

Version-changes: 4
- add this path (as part of breaking up the large HDMI change for the RK3399)

---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 drivers/video/rockchip/Makefile  |   3 +-
 drivers/video/rockchip/rk3288_hdmi.c | 116 +++
 drivers/video/rockchip/rk_hdmi.c | 105 +--
 drivers/video/rockchip/rk_hdmi.h |  32 ++
 4 files changed, 166 insertions(+), 90 deletions(-)
 create mode 100644 drivers/video/rockchip/rk3288_hdmi.c
 create mode 100644 drivers/video/rockchip/rk_hdmi.h

diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile
index 495d5f7..65d0ed6 100644
--- a/drivers/video/rockchip/Makefile
+++ b/drivers/video/rockchip/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288_vop.o
 obj-$(CONFIG_ROCKCHIP_RK3399) += rk3399_vop.o
 obj-$(CONFIG_DISPLAY_ROCKCHIP_EDP) += rk_edp.o
 obj-$(CONFIG_DISPLAY_ROCKCHIP_LVDS) += rk_lvds.o
-obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o
+obj-hdmi-$(CONFIG_ROCKCHIP_RK3288) += rk3288_hdmi.o
+obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o $(obj-hdmi-y)
 obj-$(CONFIG_DISPLAY_ROCKCHIP_MIPI) += rk_mipi.o
 endif
diff --git a/drivers/video/rockchip/rk3288_hdmi.c 
b/drivers/video/rockchip/rk3288_hdmi.c
new file mode 100644
index 000..eae0dd2
--- /dev/null
+++ b/drivers/video/rockchip/rk3288_hdmi.c
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
+ *
+ * SPDX-License-Identifier:GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "rk_hdmi.h"
+
+static int rk3288_hdmi_enable(struct udevice *dev, int panel_bpp,
+ const struct display_timing *edid)
+{
+   struct rk_hdmi_priv *priv = dev_get_priv(dev);
+   struct display_plat *uc_plat = dev_get_uclass_platdata(dev);
+   int vop_id = uc_plat->source_id;
+   struct rk3288_grf *grf = priv->grf;
+
+   /* hdmi source select hdmi controller */
+   rk_setreg(>soc_con6, 1 << 15);
+
+   /* hdmi data from vop id */
+   rk_clrsetreg(>soc_con6, 1 << 4, (vop_id == 1) ? (1 << 4) : 0);
+
+   return 0;
+}
+
+static int rk3288_hdmi_ofdata_to_platdata(struct udevice *dev)
+{
+   struct rk_hdmi_priv *priv = dev_get_priv(dev);
+   struct dw_hdmi *hdmi = >hdmi;
+
+   hdmi->i2c_clk_high = 0x7a;
+   hdmi->i2c_clk_low = 0x8d;
+
+   /*
+* TODO(s...@chromium.org): The above values don't work - these
+* ones work better, but generate lots of errors in the data.
+*/
+   hdmi->i2c_clk_high = 0x0d;
+   hdmi->i2c_clk_low = 0x0d;
+
+   return rk_hdmi_ofdata_to_platdata(dev);
+}
+
+static int rk3288_clk_config(struct udevice *dev)
+{
+   struct display_plat *uc_plat = dev_get_uclass_platdata(dev);
+   struct clk clk;
+   int ret;
+
+   /*
+* Configure the maximum clock to permit whatever resolution the
+* monitor wants
+*/
+   ret = clk_get_by_index(uc_plat->src_dev, 0, );
+   if (ret >= 0) {
+   ret = clk_set_rate(, 38400);
+   clk_free();
+   }
+   if (ret < 0) {
+   debug("%s: Failed to set clock in source device '%s': ret=%d\n",
+ __func__, uc_plat->src_dev->name, ret);
+   return ret;
+   }
+
+   return 0;
+}
+
+static const char * const rk3288_regulator_names[] = {
+   "vcc50_hdmi"
+};
+
+static int rk3288_hdmi_probe(struct udevice *dev)
+{
+   /* Enable VOP clock for RK3288 */
+   rk3288_clk_config(dev);
+
+   /* Enable regulators required for HDMI */
+   rk_hdmi_probe_regulators(dev, rk3288_regulator_names,
+ARRAY_SIZE(rk3288_regulator_names));
+
+   return rk_hdmi_probe(dev);
+}
+
+static const struct dm_display_ops rk3288_hdmi_ops = {
+   .read_edid = rk_hdmi_read_edid,
+   .enable = rk3288_hdmi_enable,
+};
+
+static const struct udevice_id rk3288_hdmi_ids[] = {
+   { .compatible = "rockchip,rk3288-dw-hdmi" },
+   { }
+};
+
+U_BOOT_DRIVER(rk3288_hdmi_rockchip) = {
+   .name = "rk3288_hdmi_rockchip",
+   .id = UCLASS_DISPLAY,
+   .of_match = rk3288_hdmi_ids,
+ 

[U-Boot] [PATCH v4 5/9] rockchip: video: add mpixelclock settings from Linux driver

2017-05-31 Thread Philipp Tomsich
The Linux driver now supports higher mpixelclock settings.
Add these to rockchip_phy_config[] and rockchip_mpll_cfg[].

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

---

Changes in v4:
- new patch (split off from the earlier RK3399 HDMI encoder change)

Changes in v3: None
Changes in v2: None

 drivers/video/rockchip/rk_hdmi.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/rockchip/rk_hdmi.c b/drivers/video/rockchip/rk_hdmi.c
index db07588..2af4995 100644
--- a/drivers/video/rockchip/rk_hdmi.c
+++ b/drivers/video/rockchip/rk_hdmi.c
@@ -35,6 +35,9 @@ static const struct hdmi_phy_config rockchip_phy_config[] = {
.mpixelclock = 29700,
.sym_ctr = 0x8039, .term = 0x0005, .vlev_ctr = 0x028d,
}, {
+   .mpixelclock = 58400,
+   .sym_ctr = 0x8039, .term = 0x, .vlev_ctr = 0x019d,
+   }, {
.mpixelclock = ~0ul,
.sym_ctr = 0x, .term = 0x, .vlev_ctr = 0x,
}
@@ -60,6 +63,12 @@ static const struct hdmi_mpll_config rockchip_mpll_cfg[] = {
.mpixelclock = 14850,
.cpce = 0x0051, .gmp = 0x0003, .curr = 0x,
}, {
+   .mpixelclock = 27200,
+   .cpce = 0x0040, .gmp = 0x0003, .curr = 0x,
+   }, {
+   .mpixelclock = 34000,
+   .cpce = 0x0040, .gmp = 0x0003, .curr = 0x,
+   }, {
.mpixelclock = ~0ul,
.cpce = 0x0051, .gmp = 0x0003, .curr = 0x,
}
-- 
1.9.1

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


[U-Boot] [PATCH 3/4] rockchip: dts: rk3399-puma: Add DDR3-1866 timings

2017-05-31 Thread Philipp Tomsich
With the validation done for DDR3-1866 (i.e. 933 MHz bus clock), we
can now add the timings (rk3399-sdram-ddr3-1866.dtsi) for boards built
with the DDR3-1866 option.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
---

 arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi | 1537 ++
 1 file changed, 1537 insertions(+)
 create mode 100644 arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi

diff --git a/arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi 
b/arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi
new file mode 100644
index 000..80e946e
--- /dev/null
+++ b/arch/arm/dts/rk3399-sdram-ddr3-1866.dtsi
@@ -0,0 +1,1537 @@
+/*
+ * (C) 2017 Theobroma Systems Design und Consulting GmbH
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+ {
+rockchip,sdram-params = <
+   0x1
+   0xa
+   0x3
+   0x2
+   0x1
+   0x0
+   0xf
+   0xf
+   1
+   0x80181219
+   0x17050a03
+   0x0002
+   0x6456
+   0x004c
+   0x
+   0x1
+   0xa
+   0x3
+   0x2
+   0x1
+   0x0
+   0xf
+   0xf
+   1
+   0x80181219
+   0x17050a03
+   0x0002
+   0x6456
+   0x004c
+   0x
+   933
+   3
+   2
+   9
+   1
+   0x0600
+   0x
+   0x
+   0x
+   0x
+   0x000a
+   0x
+   0x
+   0x
+   0x000a
+   0x
+   0x
+   0x
+   0x000a
+   0x
+   0x
+   0x0100
+   0x
+   0x0101
+   0x00020100
+   0x0002d976
+   0x00071fa6
+   0x02000200
+   0x091a0200
+   0x00091a00
+   0x0400091a
+   0x2c060004
+   0x210c0820
+   0x202c0600
+   0x00210c08
+   0x08202c06
+   0x0800210c
+   0x0f04
+   0x0501000a
+   0x0f040805
+   0x0501000a
+   0x0f040805
+   0x0501000a
+   0x02030005
+   0x0c0f0c00
+   0x000f0c0f
+   0x14000a0a
+   0x0a0a
+   0x0001
+   0x031c1c1c
+   0x000c0c0c
+   0x
+   0x0301
+   0x1c6a0147
+   0x1c6a0147
+   0x1c6a0147
+   0x
+   0x00060006
+   0x00170006
+   0x00170017
+   0x
+   0x
+   0x
+   0x
+   0x0200
+   0x02000151
+   0x02000151
+   0x0151
+   0x
+   0x
+   0x
+   0x
+   0x
+   0x
+   0x0301
+   0x0001
+   0x
+   0x
+   0x0100
+   0x80104002
+   0x00040003
+   0x00040005
+   0x0003
+   0x00050004
+   0x0004
+   0x00040003
+   0x00040005
+   0x71a8
+   0x38d4
+   0x38d471a8
+   0x71a8
+   0x38d4
+   0x
+   0x
+   0x
+   0x
+   0x
+   0x0a0a0a00
+   0x000a0a0a
+   0x00030200
+   0x00040700
+   0x0302
+   0x02000407
+   0x0003
+   0x00030f04
+   0x00070004
+   0x
+   0x
+   0x
+   0x
+   0x
+   0x
+   0x0001
+   0x0001
+   0x20040020
+   0x00200400
+   0x01000400
+   0x0b80
+   0x
+   0x0001
+   0x0002
+   0x000e
+   0x
+   0x
+   0x
+   0x
+   0x
+   0x00bb
+   0x00ea005e
+   0x00ea
+   0x005e00bb
+   0

[U-Boot] [PATCH 3/4] rockchip: dts: rk3399-puma: set spl-payload-offset

2017-05-31 Thread Philipp Tomsich
From: Klaus Goger <klaus.go...@theobroma-systems.com>

defines the spl-payload to 256k (0x4)

Signed-off-by: Klaus Goger <klaus.go...@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
---

 arch/arm/dts/rk3399-puma.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/rk3399-puma.dts b/arch/arm/dts/rk3399-puma.dts
index 7009fde..c04a853 100644
--- a/arch/arm/dts/rk3399-puma.dts
+++ b/arch/arm/dts/rk3399-puma.dts
@@ -14,7 +14,8 @@
compatible = "tsd,puma", "rockchip,rk3399";
 
config {
-   u-boot,spl-payload-offset = <204800>;
+   u-boot,spl-payload-offset = <0x4>; // 256kbyte
+   u-boot,boot-led = "puma:orange:power";
};
 
chosen {
-- 
1.9.1

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


[U-Boot] [PATCH 4/4] rockchip: dts: rk3399-puma: sync DTS with Linux tree

2017-05-31 Thread Philipp Tomsich
The Linux DTS for the RK3399-Q7 has moved with the times... resync
against it to ensure a consistent configuration.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
---

 arch/arm/dts/rk3399-puma.dts | 540 +++
 1 file changed, 495 insertions(+), 45 deletions(-)

diff --git a/arch/arm/dts/rk3399-puma.dts b/arch/arm/dts/rk3399-puma.dts
index c04a853..fca14d3 100644
--- a/arch/arm/dts/rk3399-puma.dts
+++ b/arch/arm/dts/rk3399-puma.dts
@@ -5,17 +5,18 @@
  */
 
 /dts-v1/;
+
 #include 
 #include "rk3399.dtsi"
 #include "rk3399-sdram-ddr3-1600.dtsi"
 
 / {
model = "Theobroma Systems RK3399-Q7 SoM";
-   compatible = "tsd,puma", "rockchip,rk3399";
+   compatible = "tsd,rk3399-q7", "tsd,puma", "rockchip,rk3399";
 
config {
-   u-boot,spl-payload-offset = <0x4>; // 256kbyte
-   u-boot,boot-led = "puma:orange:power";
+   u-boot,spl-payload-offset = <0x4>; /* 256kbyte */
+   u-boot,boot-led = "module_led";
};
 
chosen {
@@ -28,16 +29,74 @@
spi1 = 
};
 
-   vdd_center: vdd-center {
-   compatible = "pwm-regulator";
-   pwms = < 0 25000 0>;
-   regulator-name = "vdd_center";
-   regulator-min-microvolt = <80>;
-   regulator-max-microvolt = <140>;
-   regulator-init-microvolt = <95>;
+   leds {
+   compatible = "gpio-leds";
+   pinctrl-names = "default";
+   pinctrl-0 = <_pins_puma>;
+
+   module_led {
+   label = "module_led";
+   gpios = < 25 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "heartbeat";
+   };
+
+   sd_card_led {
+   label = "sd_card_led";
+   gpios = < 2 GPIO_ACTIVE_HIGH>;
+   linux,default-trigger = "mmc0";
+   };
+   };
+
+   clkin_gmac: external-gmac-clock {
+   compatible = "fixed-clock";
+   clock-frequency = <12500>;
+   clock-output-names = "clkin_gmac";
+   #clock-cells = <0>;
+   };
+
+   dw_hdmi_audio: dw-hdmi-audio {
+   status = "enabled";
+   compatible = "rockchip,dw-hdmi-audio";
+   #sound-dai-cells = <0>;
+   };
+
+   hdmi_codec: hdmi-codec {
+   compatible = "simple-audio-card";
+   simple-audio-card,format = "i2s";
+   simple-audio-card,mclk-fs = <256>;
+   simple-audio-card,name = "HDMI-CODEC";
+
+   simple-audio-card,cpu {
+   sound-dai = <>;
+   };
+
+   simple-audio-card,codec {
+   sound-dai = <>;
+   };
+   };
+
+   hdmi_sound: hdmi-sound {
+   status = "disabled";
+   compatible = "simple-audio-card";
+   simple-audio-card,format = "i2s";
+   simple-audio-card,mclk-fs = <256>;
+   simple-audio-card,name = "rockchip,hdmi";
+
+   simple-audio-card,cpu {
+   sound-dai = <>;
+   };
+   simple-audio-card,codec {
+   sound-dai = <>;
+   };
+   };
+
+   vccadc_ref: vccadc-ref {
+   compatible = "regulator-fixed";
+   regulator-name = "vcc1v8_sys";
regulator-always-on;
regulator-boot-on;
-   status = "okay";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
};
 
vcc3v3_sys: vcc3v3-sys {
@@ -49,24 +108,33 @@
regulator-max-microvolt = <330>;
};
 
-   vcc_phy: vcc-phy-regulator {
+   vcc5v0_otg: vcc5v0-otg-regulator {
compatible = "regulator-fixed";
-   regulator-name = "vcc_phy";
+   enable-active-high;
+   gpio = < 2 GPIO_ACTIVE_HIGH>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_vbus_drv>;
+   regulator-name = "vcc5v0_otg";
regulator-always-on;
-   regulator-boot-on;
};
 
-   vcc5v0_host: vcc5v0-host-en {
+   vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed";
+   

[U-Boot] [PATCH 2/4] rockchip: dts: rk3399-puma: release reset of on-module USB3 hub via vbus-gpio

2017-05-31 Thread Philipp Tomsich
On the RK3399-Q7, the on-module USB3 hub is held in reset at boot-up
to save power and needs to be woken up using GPIO4A3.

Note that this is not a negated reset-signal (due to a level shifter
being needed for this signal anyway), but a negated enable-signal:
to enable, we need to output LOW (i.e. 0)... so we mark this as an
ACTIVE_LOW signal.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>
---

 arch/arm/dts/rk3399-puma.dts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/rk3399-puma.dts b/arch/arm/dts/rk3399-puma.dts
index 5d9dfb5..7009fde 100644
--- a/arch/arm/dts/rk3399-puma.dts
+++ b/arch/arm/dts/rk3399-puma.dts
@@ -124,7 +124,7 @@
 };
 
 _typec0 {
-   status = "okay";
+   status = "disabled";
 };
 
 _host1_ehci {
@@ -136,6 +136,7 @@
 };
 
 _typec1 {
+   rockchip,vbus-gpio = < 3 GPIO_ACTIVE_LOW>;
status = "okay";
 };
 
@@ -182,7 +183,7 @@
 
compatible = "spi-flash";
reg = <0>;
-   spi-max-frequency = <500>;
+   spi-max-frequency = <4950>;
spi-cpol;
spi-cpha;
};
-- 
1.9.1

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


[U-Boot] [PATCH v4 3/9] rockchip: video: refactor rk_vop and split RK3328-specific code off

2017-05-31 Thread Philipp Tomsich
To prepare for adding the RK3399 VOP driver (which shares most of its
registers and config logic with the RK3228 VOP), this change refactors
the driver and splits the RK3288-specific driver off.

The changes in detail are:
- introduces a data-structure for chip-specific drivers to register
  features/callbacks with the common driver: at this time, this is
  limited to a callback for setting the pin polarities (between the
  VOP and the encoder modules) and a flag to signal 10bit RGB
  capability
- refactors the probing of regulators into a helper function that
  can take a list of regulator names to probe and autoset
- moves the priv data-structure into a (common) header file to be
  used by the chip-specific drivers to provide base addresses to
  the common driver
- uses a callback into the chip-specific driver to set pin polarities
  (replacing the direct register accesses previously used)
- splits enabling the output (towards an encoder) into a separate
  help function withint the common driver

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

---

Changes in v4:
- added to break down into smaller changes

Changes in v3: None
Changes in v2: None

 arch/arm/include/asm/arch-rockchip/vop_rk3288.h |   1 +
 drivers/video/rockchip/Makefile |   1 +
 drivers/video/rockchip/rk3288_vop.c |  95 +
 drivers/video/rockchip/rk_vop.c | 182 
 drivers/video/rockchip/rk_vop.h |  32 +
 5 files changed, 217 insertions(+), 94 deletions(-)
 create mode 100644 drivers/video/rockchip/rk3288_vop.c
 create mode 100644 drivers/video/rockchip/rk_vop.h

diff --git a/arch/arm/include/asm/arch-rockchip/vop_rk3288.h 
b/arch/arm/include/asm/arch-rockchip/vop_rk3288.h
index d5599ec..049f192 100644
--- a/arch/arm/include/asm/arch-rockchip/vop_rk3288.h
+++ b/arch/arm/include/asm/arch-rockchip/vop_rk3288.h
@@ -197,6 +197,7 @@ enum vop_modes {
 #define V_DSP_DEN_POL(x)   (((x) & 1) << 6)
 #define V_DSP_VSYNC_POL(x) (((x) & 1) << 5)
 #define V_DSP_HSYNC_POL(x) (((x) & 1) << 4)
+#define V_DSP_PIN_POL(x)   (((x) & 0xf) << 4)
 #define V_DSP_OUT_MODE(x)  ((x) & 0xf)
 
 /* VOP_DSP_CTRL1 */
diff --git a/drivers/video/rockchip/Makefile b/drivers/video/rockchip/Makefile
index cd54b12..9477ad0 100644
--- a/drivers/video/rockchip/Makefile
+++ b/drivers/video/rockchip/Makefile
@@ -7,6 +7,7 @@
 
 ifdef CONFIG_VIDEO_ROCKCHIP
 obj-y += rk_vop.o
+obj-$(CONFIG_ROCKCHIP_RK3288) += rk3288_vop.o
 obj-$(CONFIG_DISPLAY_ROCKCHIP_EDP) += rk_edp.o
 obj-$(CONFIG_DISPLAY_ROCKCHIP_LVDS) += rk_lvds.o
 obj-$(CONFIG_DISPLAY_ROCKCHIP_HDMI) += rk_hdmi.o
diff --git a/drivers/video/rockchip/rk3288_vop.c 
b/drivers/video/rockchip/rk3288_vop.c
new file mode 100644
index 000..e3e1ec7
--- /dev/null
+++ b/drivers/video/rockchip/rk3288_vop.c
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2017 Theobroma Systems Design und Consulting GmbH
+ * Copyright (c) 2015 Google, Inc
+ * Copyright 2014 Rockchip Inc.
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "rk_vop.h"
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static void rk3288_set_pin_polarity(struct udevice *dev,
+   enum vop_modes mode, u32 polarity)
+{
+   struct rk_vop_priv *priv = dev_get_priv(dev);
+   struct rk3288_vop *regs = priv->regs;
+
+   /* The RK3328 VOP (v3.1) has its polarity configuration in ctrl0 */
+   clrsetbits_le32(>dsp_ctrl0,
+   M_DSP_DCLK_POL | M_DSP_DEN_POL |
+   M_DSP_VSYNC_POL | M_DSP_HSYNC_POL,
+   V_DSP_PIN_POL(polarity));
+}
+
+static void rk3288_set_io_vsel(struct udevice *dev)
+{
+   struct rk3288_grf *grf = syscon_get_first_range(ROCKCHIP_SYSCON_GRF);
+
+   /* lcdc(vop) iodomain select 1.8V */
+   rk_setreg(>io_vsel, 1 << 0);
+}
+
+/*
+ * Try some common regulators. We should really get these from the
+ * device tree somehow.
+ */
+static const char * const rk3288_regulator_names[] = {
+   "vcc18_lcd",
+   "VCC18_LCD",
+   "vdd10_lcd_pwren_h",
+   "vdd10_lcd",
+   "VDD10_LCD",
+   "vcc33_lcd"
+};
+
+static int rk3288_vop_probe(struct udevice *dev)
+{
+   /* Before relocation we don't need to do anything */
+   if (!(gd->flags & GD_FLG_RELOC))
+   return 0;
+
+   /* Set the LCDC(vop) iodomain to 1.8V */
+   rk3288_set_io_vsel(dev);
+
+   /* Probe regulators required for the RK3288 VOP */
+   rk_vop_probe_regulators(dev, rk3288_regulator_names,
+   ARRAY_SIZE(rk3288_regulator_names));
+
+   return rk_vop_probe(dev);
+}
+
+struct rkvop_driverdata rk3288_driverdat

[U-Boot] [PATCH v4 1/9] rockchip: video: Kconfig: reformat help for VIDEO_ROCKCHIP

2017-05-31 Thread Philipp Tomsich
For consistency sake (and as we are about to add new options to this
file), reformat the help for VIDEO_ROCKCHIP.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

---

Changes in v4:
- added to break down into smaller changes

Changes in v3: None
Changes in v2: None

 drivers/video/rockchip/Kconfig | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/video/rockchip/Kconfig b/drivers/video/rockchip/Kconfig
index 80e399f..4ad2da5 100644
--- a/drivers/video/rockchip/Kconfig
+++ b/drivers/video/rockchip/Kconfig
@@ -12,11 +12,12 @@ menuconfig VIDEO_ROCKCHIP
bool "Enable Rockchip Video Support"
depends on DM_VIDEO
help
-   Rockchip SoCs provide video output capabilities for 
High-Definition
-   Multimedia Interface (HDMI), Low-voltage Differential Signalling
-   (LVDS), embedded DisplayPort (eDP) and Display Serial Interface
-   (DSI). This driver supports the on-chip video output device, and
-   targets the Rockchip RK3288 and RK3399.
+ Rockchip SoCs provide video output capabilities for High-Definition
+ Multimedia Interface (HDMI), Low-voltage Differential Signalling
+ (LVDS), embedded DisplayPort (eDP) and Display Serial Interface (DSI).
+
+ This driver supports the on-chip video output device, and targets the
+ Rockchip RK3288 and RK3399.
 
 if VIDEO_ROCKCHIP
 
-- 
1.9.1

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


[U-Boot] [PATCH v4 9/9] rockchip: board: puma_rk3399: enable BMP_16BPP, BMP_24BPP and BMP_32BPP

2017-05-31 Thread Philipp Tomsich
With video output support for the RK3399-Q7 (Puma) available, we want
CMD_BMP enabled and the support for 16bit, 24bit and 32bit BMPs
defined.

Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

Version-changes: 2
- enable SYS_WHITE_ON_BLACK via defconfig

---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 include/configs/puma_rk3399.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/include/configs/puma_rk3399.h b/include/configs/puma_rk3399.h
index ece8bba..af1dae8 100644
--- a/include/configs/puma_rk3399.h
+++ b/include/configs/puma_rk3399.h
@@ -26,4 +26,8 @@
 #define CONFIG_SERIAL_TAG
 #define CONFIG_ENV_OVERWRITE
 
+#define CONFIG_BMP_16BPP
+#define CONFIG_BMP_24BPP
+#define CONFIG_BMP_32BPP
+
 #endif
-- 
1.9.1

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


<    5   6   7   8   9   10   11   12   13   14   >