Re: [U-Boot] [PATCH] rockchip: enable SPL_OF_PLATDATA for rk3288 board

2016-10-08 Thread
In patch "rk3288: config change for enable dram capacity auto-detect",
Kever have use CONFIG_ROCKCHIP_SPL_BACK_TO_BROM to reduce spl size, so
this patch is no longer needed.

2016-09-28 23:46 GMT+08:00 Simon Glass :
> On 28 September 2016 at 00:35, Jacob Chen  wrote:
>> It seems ddr auto detect make SPL image to large.
>> So we have to use SPL_OF_PLATDATA to reduce size.
>>
>> Signed-off-by: Jacob Chen 
>> ---
>>
>>  configs/evb-rk3288_defconfig | 4 
>>  configs/fennec-rk3288_defconfig  | 3 +++
>>  configs/miniarm-rk3288_defconfig | 3 +++
>>  3 files changed, 10 insertions(+)
>
> Acked-by: Simon Glass 
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/3] rockchip: add usb mass storage feature support for rk3036

2016-09-08 Thread
Hi,


2016-09-06 9:03 GMT+08:00 Simon Glass :
> On 29 August 2016 at 11:26, Jacob Chen  wrote:
>> From: "jacob2.chen" 
>>
>> Enable ums feature for rk3036 boards, so that we can mount the mmc
>> device to PC.
>>
>> Signed-off-by: jacob2.chen 
>> ---
>>
>>  include/configs/rk3036_common.h | 4 
>>  1 file changed, 4 insertions(+)
>
> Acked-by: Simon Glass 

This patch has no relations with other patchs.
Can we merge it alone?


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


Re: [U-Boot] [PATCH 1/3] mmc: dw_mmc: change the read/write order under fifo mode

2016-08-30 Thread
Hi  Ziyuan,

It was rk3036-kylin board.
This bug will make distro_boot failed.

2016-08-30 22:11 GMT+08:00 Ziyuan Xu <xzy...@rock-chips.com>:
>
>
> On 2016年08月30日 21:56, 陈豪 wrote:
>>
>> Hi jaehoon,
>>
>>
>> 2016-08-30 17:54 GMT+08:00 Jaehoon Chung <jh80.ch...@samsung.com>:
>>>
>>> Hi Jacob,
>>>
>>> On 08/30/2016 02:26 AM, Jacob Chen wrote:
>>>>
>>>> From: "jacob2.chen" <jacob2.c...@rock-chips.com>
>>>>
>>>> The former implement have a bug.
>>>> It will cause wrong data reading sometimes.
>>>
>>> Could you explain what bug is there?
>>
>> This bug affects data reading and make board fail to boot.
>> There will be some errors like,
>> "Warning - bad CRC, using the default environmen"
>
>
> It's not cause by mmc device, U-Boot will read env from media device, and do
> CRC checking.
>
>> "ERROR: Can 't read GPT header"
>
>
> Which board do you use? RK3288 use DMA-mode for dw_mmc, not pio. I'm
> interest in it, show me more information.
>
>
>>
>> Actually I am not very familiar with the MMC hardware and i don't know
>> why former implemen will cause this bug.
>> I just rewrite it according to the driver in kernel.
>>
>>>>
>>>> Signed-off-by: jacob2.chen <jacob2.c...@rock-chips.com>
>>>
>>> Could you change from jacob2.chen to your name?
>>>
>>>> ---
>>>>
>>>>   drivers/mmc/dw_mmc.c | 32 +---
>>>>   1 file changed, 17 insertions(+), 15 deletions(-)
>>>>
>>>> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
>>>> index afc674d..f072739 100644
>>>> --- a/drivers/mmc/dw_mmc.c
>>>> +++ b/drivers/mmc/dw_mmc.c
>>>> @@ -120,35 +120,37 @@ static int dwmci_data_transfer(struct dwmci_host
>>>> *host, struct mmc_data *data)
>>>>
>>>>if (host->fifo_mode && size) {
>>>>len = 0;
>>>> - if (data->flags == MMC_DATA_READ) {
>>>> - if ((dwmci_readl(host, DWMCI_RINTSTS) &
>>>> -  DWMCI_INTMSK_RXDR)) {
>>>> + if (data->flags == MMC_DATA_READ &&
>>>> + (mask & DWMCI_INTMSK_RXDR)) {
>>>> + while (size) {
>>>>len = dwmci_readl(host,
>>>> DWMCI_STATUS);
>>>>len = (len >> DWMCI_FIFO_SHIFT) &
>>>> - DWMCI_FIFO_MASK;
>>>> + DWMCI_FIFO_MASK;
>>>
>>> this changing is related with bug?
>>>
>>>>len = min(size, len);
>>>>for (i = 0; i < len; i++)
>>>>*buf++ =
>>>> - dwmci_readl(host,
>>>> DWMCI_DATA);
>>>> - dwmci_writel(host, DWMCI_RINTSTS,
>>>> -  DWMCI_INTMSK_RXDR);
>>>> + dwmci_readl(host,
>>>> +
>>>> DWMCI_DATA);
>>>> + size = size > len ? (size - len) :
>>>> 0;
>>>>}
>>>> - } else {
>>>> - if ((dwmci_readl(host, DWMCI_RINTSTS) &
>>>> -  DWMCI_INTMSK_TXDR)) {
>>>> + dwmci_writel(host, DWMCI_RINTSTS,
>>>> +  DWMCI_INTMSK_RXDR);
>>>> + } else if (data->flags == MMC_DATA_WRITE &&
>>>> +(mask & DWMCI_INTMSK_TXDR)) {
>>>
>>> data->flags == MMC_DATA_WRITE doesn't need..flags are only two..
>>> one is MMC_DATA_READ, otherwise it's MMC_DATA_WRITE.
>>
>> The reason why i write it so strange is that it warning "Too many
>> leading tabs"
>>
>>>> + while (size) {
>>

Re: [U-Boot] [PATCH 1/3] mmc: dw_mmc: change the read/write order under fifo mode

2016-08-30 Thread
Hi jaehoon,


2016-08-30 17:54 GMT+08:00 Jaehoon Chung :
> Hi Jacob,
>
> On 08/30/2016 02:26 AM, Jacob Chen wrote:
>> From: "jacob2.chen" 
>>
>> The former implement have a bug.
>> It will cause wrong data reading sometimes.
>
> Could you explain what bug is there?

This bug affects data reading and make board fail to boot.
There will be some errors like,
"Warning - bad CRC, using the default environmen"
"ERROR: Can 't read GPT header"

Actually I am not very familiar with the MMC hardware and i don't know
why former implemen will cause this bug.
I just rewrite it according to the driver in kernel.

>>
>>
>> Signed-off-by: jacob2.chen 
>
> Could you change from jacob2.chen to your name?
>
>> ---
>>
>>  drivers/mmc/dw_mmc.c | 32 +---
>>  1 file changed, 17 insertions(+), 15 deletions(-)
>>
>> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
>> index afc674d..f072739 100644
>> --- a/drivers/mmc/dw_mmc.c
>> +++ b/drivers/mmc/dw_mmc.c
>> @@ -120,35 +120,37 @@ static int dwmci_data_transfer(struct dwmci_host 
>> *host, struct mmc_data *data)
>>
>>   if (host->fifo_mode && size) {
>>   len = 0;
>> - if (data->flags == MMC_DATA_READ) {
>> - if ((dwmci_readl(host, DWMCI_RINTSTS) &
>> -  DWMCI_INTMSK_RXDR)) {
>> + if (data->flags == MMC_DATA_READ &&
>> + (mask & DWMCI_INTMSK_RXDR)) {
>> + while (size) {
>>   len = dwmci_readl(host, DWMCI_STATUS);
>>   len = (len >> DWMCI_FIFO_SHIFT) &
>> - DWMCI_FIFO_MASK;
>> + DWMCI_FIFO_MASK;
>
> this changing is related with bug?
>
>>   len = min(size, len);
>>   for (i = 0; i < len; i++)
>>   *buf++ =
>> - dwmci_readl(host, DWMCI_DATA);
>> - dwmci_writel(host, DWMCI_RINTSTS,
>> -  DWMCI_INTMSK_RXDR);
>> + dwmci_readl(host,
>> + DWMCI_DATA);
>> + size = size > len ? (size - len) : 0;
>>   }
>> - } else {
>> - if ((dwmci_readl(host, DWMCI_RINTSTS) &
>> -  DWMCI_INTMSK_TXDR)) {
>> + dwmci_writel(host, DWMCI_RINTSTS,
>> +  DWMCI_INTMSK_RXDR);
>> + } else if (data->flags == MMC_DATA_WRITE &&
>> +(mask & DWMCI_INTMSK_TXDR)) {
>
> data->flags == MMC_DATA_WRITE doesn't need..flags are only two..
> one is MMC_DATA_READ, otherwise it's MMC_DATA_WRITE.

The reason why i write it so strange is that it warning "Too many
leading tabs"

>
>> + while (size) {
>>   len = dwmci_readl(host, DWMCI_STATUS);
>>   len = fifo_depth - ((len >>
>> -DWMCI_FIFO_SHIFT) &
>> -DWMCI_FIFO_MASK);
>> +  DWMCI_FIFO_SHIFT) 
>> &
>> + DWMCI_FIFO_MASK);
>
> ditto.
>
> Best Regards,
> Jaehoon Chung
>
>>   len = min(size, len);
>>   for (i = 0; i < len; i++)
>>   dwmci_writel(host, DWMCI_DATA,
>>*buf++);
>> - dwmci_writel(host, DWMCI_RINTSTS,
>> -  DWMCI_INTMSK_TXDR);
>> + size = size > len ? (size - len) : 0;
>>   }
>> + dwmci_writel(host, DWMCI_RINTSTS,
>> +  DWMCI_INTMSK_TXDR);
>>   }
>> - size = size > len ? (size - len) : 0;
>>   }
>>
>>   /* Data arrived correctly. */
>>
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] rockchip: rk3288-firefly: enable boot from eMMC

2016-08-29 Thread
Hi,

You probably did not short the clock of eMMC.
If we don't press maskrom buttons(short the clock of eMMC), SPL will
detect eMMC and try to load image from eMMC. if the eMMC is blank, it
hangs.
So if we specifies board_boot_order and want to boot from SD in
FireFly, we have to short the clock of eMMC.

The current code(spl_boot_device)  will force to boot from SD rather
than boot from whatever media it started
with,.So we have to specifies board_boot_order if we want to boot from eMMC.

Of course, It might be inconvenie to short the clock of eMMC in
FireFly. Do you have any better idea?

2016-08-30 0:17 GMT+08:00 陈豪 <jacobchen...@gmail.com>:
> Hi,
>
> I just copied thos code from the other boards.
>
> On the other boards, I didn't meet this situation.It will load u-boot
> from sd if it didn't detect u-boot in eMMC.
>
> I'll check why it's different in firefly.
>
> 2016-08-28 0:06 GMT+08:00, Simon Glass <s...@chromium.org>:
>> Hi,
>>
>> On 12 August 2016 at 11:20, Simon Glass <s...@chromium.org> wrote:
>>> On 9 August 2016 at 19:56, Jacob Chen <jacob2.c...@rock-chips.com> wrote:
>>>> Add eMMC dt node and define fallback boot devices.
>>>>
>>>> Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com>
>>>> ---
>>>>
>>>>  arch/arm/dts/rk3288-firefly.dts   | 5 +
>>>>  board/firefly/firefly-rk3288/firefly-rk3288.c | 8 
>>>>  2 files changed, 13 insertions(+)
>>>
>>> Acked-by: Simon Glass <s...@chromium.org>
>>
>> Unfortunately I cannot apply this. It appears to actually force
>> booting from eMMC. So if the eMMC is blank, it hangs at 'Trying to
>> boot from MMC2'.
>>
>> I think it should continue to boot from whatever media it started
>> with. So if it booted SPL from SD then it should load U-Boot from SD.
>>
>> Regards,
>> Simon
>> ___
>> U-Boot mailing list
>> U-Boot@lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
>>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] rockchip: rk3288-firefly: enable boot from eMMC

2016-08-29 Thread
Hi,

I just copied thos code from the other boards.

On the other boards, I didn't meet this situation.It will load u-boot
from sd if it didn't detect u-boot in eMMC.

I'll check why it's different in firefly.

2016-08-28 0:06 GMT+08:00, Simon Glass :
> Hi,
>
> On 12 August 2016 at 11:20, Simon Glass  wrote:
>> On 9 August 2016 at 19:56, Jacob Chen  wrote:
>>> Add eMMC dt node and define fallback boot devices.
>>>
>>> Signed-off-by: Jacob Chen 
>>> ---
>>>
>>>  arch/arm/dts/rk3288-firefly.dts   | 5 +
>>>  board/firefly/firefly-rk3288/firefly-rk3288.c | 8 
>>>  2 files changed, 13 insertions(+)
>>
>> Acked-by: Simon Glass 
>
> Unfortunately I cannot apply this. It appears to actually force
> booting from eMMC. So if the eMMC is blank, it hangs at 'Trying to
> boot from MMC2'.
>
> I think it should continue to boot from whatever media it started
> with. So if it booted SPL from SD then it should load U-Boot from SD.
>
> Regards,
> Simon
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 1/3] Add a bingding file for rockchip video

2016-03-13 Thread
O Oh..wrong title...

2016-03-14 1:45 GMT+08:00 Jacob Chen :
> and include it in rk3288 device tree
>
> Signed-off-by: Jacob Chen 
> ---
>
>  arch/arm/dts/rk3288.dtsi   |  1 +
>  include/dt-bindings/video/rk3288.h | 11 +++
>  2 files changed, 12 insertions(+)
>  create mode 100644 include/dt-bindings/video/rk3288.h
>
> diff --git a/arch/arm/dts/rk3288.dtsi b/arch/arm/dts/rk3288.dtsi
> index ba29b38..3dab0fc 100644
> --- a/arch/arm/dts/rk3288.dtsi
> +++ b/arch/arm/dts/rk3288.dtsi
> @@ -9,6 +9,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include "skeleton.dtsi"
>
>  / {
> diff --git a/include/dt-bindings/video/rk3288.h 
> b/include/dt-bindings/video/rk3288.h
> new file mode 100644
> index 000..7bfd247
> --- /dev/null
> +++ b/include/dt-bindings/video/rk3288.h
> @@ -0,0 +1,11 @@
> +#ifndef __DT_BINDINGS_VIDEO_RK3288_H__
> +#define __DT_BINDINGS_VIDEO_RK3288_H__
> +
> +#define LVDS_OUTPUT_RGB 0
> +#define LVDS_OUTPUT_SINGLE  1
> +#define LVDS_OUTPUT_DUAL2
> +
> +#define LVDS_FORMAT_VESA0
> +#define LVDS_FORMAT_JEIDA   1
> +
> +#endif
> --
> 2.3.5
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot