Re: [PATCH] ARM: dts: Switch i2c0 to 400kHz on rk3288-evb-rk808

2014-09-11 Thread Addy
dts/rk3288-evb-rk808.dts > index 36db177..ff522f8 100644 > --- a/arch/arm/boot/dts/rk3288-evb-rk808.dts > +++ b/arch/arm/boot/dts/rk3288-evb-rk808.dts > @@ -18,6 +18,7 @@ > }; > > &i2c0 { > + clock-frequency = <40>; > status = "okay";

Re: [PATCH] ARM: dts: Add mmc0 and mmc1 aliases for rk3288

2014-08-13 Thread Addy
> It's convenient (and less confusing to people reading logs) if the > eMMC port on rk3288 is consistenly marked with mmc0 and the sdmmc port > on rk3288 is consistently marked with mmc1. Add the appropriate > aliases. > > These aliases only actually do something if a patch like > (https://patchw

Re: [PATCH] mmc: dw_mmc: try pick the exact same voltage as vmmc for vqmmc

2014-11-24 Thread Addy
, dw_mci_switch_voltage will not be called, That can't be right. mmc_power_up() should trigger dw_mci_switch_voltage() to be invoked. Hmmm, I think you're right. Addy: can you double check if it's only the 2nd card for you? I was thinking that if a regulator is currently 3.3V and you request

Re: [PATCH] mmc: dw_mmc: add quirk for data over interrupt timeout

2014-11-24 Thread Addy
Hi, Jaehoon On 2014/11/20 18:01, Jaehoon Chung wrote: Hi, Addy. On 11/20/2014 06:33 PM, addy ke wrote: Hi, Jaehoon On 2014/11/19 13:56, addy ke wrote: Hi Jaehoon On 2014/11/19 09:22, Jaehoon Chung Wrote: Hi, Addy. On 11/18/2014 09:32 AM, Addy wrote: On 2014年11月14日 21:18, Jaehoon Chung

Re: [PATCH] mmc: dw_mmc: add quirk for data over interrupt timeout

2014-11-17 Thread Addy
On 2014年11月14日 21:18, Jaehoon Chung wrote: Hi, Addy. Did you use the DW_MCI_QUIRK_IDMAC_DTO? I'm not sure, but i wonder if you get what result when you use above quirk. DW_MCI_QUIRK_IDMAC_DTO is only for version2.0 or below. /* * DTO fix - version 2.10a and below, and

Re: [PATCH] mmc: dw_mmc: fix bug that cause 'Timeout sending command'

2015-02-08 Thread Addy
On 2015.02.09 12:51, Ulf Hansson wrote: On 5 February 2015 at 12:13, Addy Ke wrote: Because of some uncertain factors, such as worse card or worse hardware, DAT[3:0](the data lines) may be pulled down by card, and mmc controller will be in busy state. This should not happend when mmc

Re: [PATCH v2 1/2] mmc: dw_mmc: fix bug that cause 'Timeout sending command'

2015-02-10 Thread Addy
On 2015/02/10 23:22, Alim Akhtar wrote: Hi Addy, On Mon, Feb 9, 2015 at 12:55 PM, Addy Ke wrote: Because of some uncertain factors, such as worse card or worse hardware, DAT[3:0](the data lines) may be pulled down by card, and mmc controller will be in busy state. This should not happend

Re: [PATCH] mmc: dw_mmc: fix bug that cause mmc_test failture

2015-02-10 Thread Addy
On 2015/02月10日 17:34, Olof Johansson wrote: Hi Addy, On Mon, Jan 26, 2015 at 4:04 AM, Addy Ke wrote: The STOP command can terminate a data transfer between a memory card and mmc controller. As show in Synopsys DesignWare Cores Mobile Stroage Host Databook: Data timeout and Data end-bit

Re: [PATCH v2 1/2] mmc: dw_mmc: fix bug that cause 'Timeout sending command'

2015-02-10 Thread Addy
On 2015/02/09 18:01, Jaehoon Chung wrote: Hi, Addy. On 02/09/2015 04:25 PM, Addy Ke wrote: Because of some uncertain factors, such as worse card or worse hardware, DAT[3:0](the data lines) may be pulled down by card, and mmc controller will be in busy state. This should not happend when mmc

[PATCH v4] i2c: rk3x: fix bug that cause measured high_ns doesn't meet I2C specification

2014-12-10 Thread Addy Ke
. see: https://chromium-review.googlesource.com/#/c/232774/ Signed-off-by: Addy Ke --- Changes in v2: - merged the patch that Doug submitted to chromium project Changes in v3: - merged the patch that Doug submitted to chromium to projectchange bindins see: https://chromium-review.googlesource.com

[PATCH v5] i2c: rk3x: fix bug that cause measured high_ns doesn't meet I2C specification

2014-12-11 Thread Addy Ke
-review.googlesource.com/#/c/232774/ Signed-off-by: Addy Ke --- Changes in v2: - merged the patch that Doug submitted to chromium project Changes in v3: - merged the patch that Doug submitted to chromium to projectchange bindins see: https://chromium-review.googlesource.com/#/c/232774/ Changes in

[PATCH v5] mmc: dw_mmc: add quirk for broken data transfer over scheme

2015-01-05 Thread Addy Ke
. We don't know why we have this problem, but we need it to fix this problem now. And I will post a follow up change when we find the root cause. Signed-off-by: Addy Ke --- Changes in v2: - fix some typo. - remove extra timeout value (250ms). - remove dw_mci_dto_start_monitor func. - use "

[PATCH v3] i2c: rk3x: fix bug that cause measured high_ns doesn't meet I2C spec

2014-12-07 Thread Addy Ke
for signals from the device tree. This allows us to more accurately calculate timings. see: https://chromium-review.googlesource.com/#/c/232774/ Signed-off-by: Addy Ke --- Changes in v2: - merged the patch that Doug submitted to chromium Changes in v3: - merged the patch that Doug submitted to

Re: [PATCH v3] i2c: rk3x: fix bug that cause measured high_ns doesn't meet I2C spec

2014-12-07 Thread addy ke
On 2014/12/8 10:59, Addy Ke wrote: > high_ns calculated from the low division of CLKDIV register is the sum > of actual measured high_ns and rise_ns. The rise time which related to > external pull-up resistor can be up to the maximum rise time in I2C spec. > > In my test, if e

[PATCH] dmaengine: pl330: fix bug that cause start the same descs in cyclic

2014-12-08 Thread Addy Ke
mmit dfac17: idx = active = thrd->req_runnig = 0 --> descdone = thrd->req[0] = NULL --> list_add_tail(&descdone->rqd, &pl330->req_done); --> got NULL pointer!!! Signed-off-by: Addy Ke --- drivers/dma/pl330.c | 6 ++ 1 file changed, 6 insertions(+)

[PATCH v4] mmc: dw_mmc: add quirk for broken data transfer over scheme

2014-12-26 Thread Addy Ke
. We don't know why we have this problem, but we need it to fix this problem now. And I will post a follow up change when we find the root cause. Signed-off-by: Addy Ke --- Changes in v2: - fix some typo. - remove extra timeout value (250ms). - remove dw_mci_dto_start_monitor func. - use "

[PATCH 0/2] fix bug that cause tuning failure

2015-01-26 Thread Addy Ke
Addy Ke (2): mmc: core: use card pointer as the first parameter of execute_tuning() mmc: dw_mmc: wait until card ready if tuning fails drivers/mmc/core/core.c | 2 +- drivers/mmc/core/mmc_ops.h| 1 - drivers/mmc/host/dw_mmc.c | 51

[PATCH 1/2] mmc: core: use card pointer as the first parameter of execute_tuning()

2015-01-26 Thread Addy Ke
We need to take the card pointer in execute_tuning() for mmc_send_status(), but mmc->card is NULL in tuning state. So we need change the first parameter of execute_tuning() to card pointer(struct mmc_card * card). Signed-off-by: Addy Ke --- drivers/mmc/core/core.c | 2 +- drivers/

[PATCH 2/2] mmc: dw_mmc: wait until card ready if tuning fails

2015-01-26 Thread Addy Ke
This patch based on Alex's patch: https://patchwork.kernel.org/patch/5516411/ Signed-off-by: Addy Ke --- drivers/mmc/core/mmc_ops.h | 1 - drivers/mmc/host/dw_mmc.c | 48 -- include/linux/mmc/card.h | 2 ++ 3 files changed, 44 insertions(

[PATCH] mmc: dw_mmc: fix bug that cause mmc_test failture

2015-01-26 Thread Addy Ke
a data transfer again if we got DRTO and EBE interrupt. After this patch, all mmc_test cases can pass on RK3288-Pink2 board. Signed-off-by: Addy Ke --- drivers/mmc/host/dw_mmc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc

[PATCH] mmc: dw_mmc: add support for RK3288

2014-07-30 Thread Addy Ke
This patch focuses on clock setting for RK3288 mmc controller. In RK3288 mmc controller, CLKDIV register can only be set 0 or 1, and if DDR 8bit mode, CLKDIV register must be set 1. Reported-by Doug Anderson Suggested-by: Jaehoon Chung Suggested-by: Doug Anderson Signed-off-by: Addy Ke

Re: About RK3288 i2c scl duty cycle

2014-09-17 Thread addy ke
Add public list On 2014/9/17 23:17, Doug Anderson wrote: > Addy, > > On Tue, Sep 16, 2014 at 6:30 PM, addy...@rock-chips.com > wrote: >> hi, all > > Any reason why you didn't add some public lists? It seems like this > is a perfect discussion for linux-i2

[PATCH] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-09-23 Thread Addy Ke
estion about division formula. Signed-off-by: Addy Ke --- drivers/i2c/busses/i2c-rk3x.c | 79 +++ 1 file changed, 72 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index 93cfc83..49d67b7 100644 --- a/d

Re: [PATCH] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-09-24 Thread addy ke
On 2014/9/24 12:10, Doug Anderson wrote: > Addy, > > On Tue, Sep 23, 2014 at 6:55 PM, Addy Ke wrote: >> As show in I2C specification: >> - Standard-mode: >> the minimum HIGH period of the scl clock is 4.0us >> the minimum LOW period of the scl clock

Re: [PATCH] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-09-24 Thread addy ke
Hi, Doug On 2014/9/25 1:13, Doug Anderson wrote: > Addy, > > On Wed, Sep 24, 2014 at 1:23 AM, addy ke wrote: >> >> >> On 2014/9/24 12:10, Doug Anderson wrote: >>> Addy, >>> >>> On Tue, Sep 23, 2014 at 6:55 PM, Addy Ke wrote: >>>&

[PATCH] spi/rockchip: fix bug that cause the failture to read data in DMA mode

2014-09-25 Thread Addy Ke
In my test on RK3288-pinky board, if spi is enabled, it will begin to read data from slave regardless of whether the DMA is ready. So we need prepare DMA before spi is enable. Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 15 +++ 1 file changed, 7 insertions(+), 8

Re: [PATCH] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-09-25 Thread addy ke
Hi, Doug On 2014/9/26 5:52, Doug Anderson wrote: > Addy, > > On Wed, Sep 24, 2014 at 9:36 PM, Doug Anderson wrote: >> Addy, >> >> On Wed, Sep 24, 2014 at 6:56 PM, addy ke wrote: >>> In my measurement,all paramter but "Data hold time" are match the

Re: [PATCH] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-09-25 Thread addy ke
On 2014/9/26 10:08, Doug Anderson wrote: > Addy, > > On Thu, Sep 25, 2014 at 6:40 PM, addy ke wrote: >> Hi, Doug >> >> On 2014/9/26 5:52, Doug Anderson wrote: >>> Addy, >>> >>> On Wed, Sep 24, 2014 at 9:36 PM, Doug Anderson >>&

[PATCH v2] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-09-27 Thread Addy Ke
From: Addy As show in I2C specification: - Standard-mode: the minimum HIGH period of the scl clock is 4.0us the minimum LOW period of the scl clock is 4.7us - Fast-mode: the minimum HIGH period of the scl clock is 0.6us the minimum LOW period of the scl clock is

Re: [PATCH v2] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-09-29 Thread addy ke
Hi Doug On 2014/9/29 12:39, Doug Anderson wrote: > Addy, > > On Sat, Sep 27, 2014 at 12:11 AM, Addy Ke wrote: >> From: Addy >> >> As show in I2C specification: >> - Standard-mode: the minimum HIGH period of the scl clock is 4.0us >> the

[PATCH v2 1/2] documentation: add rockchip spi documentation

2014-06-30 Thread addy ke
Signed-off-by: addy ke --- changes since v1: - fix binding document according to comments from Mark Rutland - fix address according to comments from Mark Brown - combine all properties into "Required Properties" suggested by Heiko Stübner - remove "Board Specific Portion"

[PATCH v2 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI

2014-06-30 Thread addy ke
>tmode << CR0_XFM_OFFSET); cr0 |= (rs->type << CR0_FRF_OFFSET); For more information, see RK3288 chip manual. - Wait for idle: Must ensure that the FIFO data has been sent out before the next transfer. Signed-off-by: addy ke --- changes since v1: - more specific about t

[PATCH v2] mmc: dw_mmc: add support for RK3288

2014-07-09 Thread Addy Ke
This patch focuses on clock setting for RK3288 mmc controller. In RK3288 mmc controller, CLKDIV register can only be set 0 or 1, and if DDR 8bit mode, CLKDIV register must be set 1. Signed-off-by: Addy Ke --- changes since v1: - dw_mci_rk3288_setup_clock: do not call clk_get_rate(), just use

[PATCH 0/4] patches for rockchip spi driver

2014-07-10 Thread Addy Ke
From: Addy Ke These patches based on: - git: kernel/git/broonie/spi.git - branch: topic/rockchip - commit: c15369087ae5c7db7f3e3604822eac6ab87429bd Addy Ke (4): spi/rockchip: cleanup some coding issues and uncessary output spi/rockchip: call wait_for_idle() for the transfer to complete

[PATCH 2/4] spi/rockchip: call wait_for_idle() for the transfer to complete

2014-07-10 Thread Addy Ke
From: Addy Ke Suggested-by: Mark Brown Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 24 +++- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 8c24708..09c690c 100644 --- a/drivers/spi

[PATCH 1/4] spi/rockchip: cleanup some coding issues and uncessary output

2014-07-10 Thread Addy Ke
From: Addy Ke Suggested-by: Mark Brown Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 72fb287..8c24708 100644

[PATCH 3/4] spi/rockchip: master->mode_bits: remove SPI_CS_HIGH bit

2014-07-10 Thread Addy Ke
From: Addy Ke Suggested-by: Jonas Gorski Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 09c690c..a8866c9 100644 --- a/drivers/spi/spi-rockchip.c +++ b

[PATCH 4/4] spi/rockchip: add compatible strings for RK3188 and RK3288

2014-07-10 Thread Addy Ke
From: Addy Ke Suggested-by: Mark Brown Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index a8866c9..cb8fd6f 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi

[PATCH] mmc: dw_mmc: add support for RK3288.

2014-07-05 Thread addy ke
This patch focuses on clock setting for RK3288 mmc controller. In RK3288 mmc controller, CLKDIV register can only be set 0 or 1, and if DDR 8bit mode, CLKDIV register must be set 1. Signed-off-by: addy ke --- .../devicetree/bindings/mmc/rockchip-dw-mshc.txt | 4 +- drivers/mmc/host/dw_mmc

Re: [PATCH v2 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI

2014-07-06 Thread addy ke
> On Tue, Jul 01, 2014 at 09:03:59AM +0800, addy ke wrote: >> In order to facilitate understanding, rockchip SPI controller IP design >> looks similar in its registers to designware. But IC implementation >> is different from designware, So we need a dedicated driver for Ro

Re: [PATCH] mmc: dw_mmc: add support for RK3288.

2014-07-06 Thread addy ke
> Hi, Addy, > > On 07/05/2014 09:59 PM, addy ke wrote: >> This patch focuses on clock setting for RK3288 mmc controller. >> >> In RK3288 mmc controller, CLKDIV register can only be set 0 or 1, >> and if DDR 8bit mode, CLKDIV register must be se

[PATCH v3 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI

2014-07-07 Thread Addy Ke
:0]bit[3:0] For more information, see RK3288 chip manual. - Wait for idle: Must ensure that the FIFO data has been sent out before the next transfer. Signed-off-by: Addy Ke --- changes since v1: - more specific about the differences according to comments from Mark Brown - not to cast

[PATCH 1/2] documentation: add rockchip spi documentation

2014-06-23 Thread addy ke
Signed-off-by: addy ke --- .../devicetree/bindings/spi/spi-rockchip.txt | 51 ++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-rockchip.txt diff --git a/Documentation/devicetree/bindings/spi/spi-rockchip.txt b

[PATCH 0/2] add rockchip spi drive

2014-06-23 Thread addy ke
Patch 1 add rockchip spi documentation Patch 2 add driver for Rockchip RK3XXX SoCs integrated SPI. Tested on rk3288 sdk board with polling mode and DMA mode. addy ke (2): documentation: add rockchip spi documentation spi: add driver for Rockchip RK3xxx SoCs integrated SPI .../devicetree

[PATCH 2/2] spi: add driver for Rockchip RK3xxx SoCs integrated SPI

2014-06-23 Thread addy ke
SoCs integrated SPI. Signed-off-by: addy ke --- drivers/spi/Kconfig| 11 + drivers/spi/Makefile | 1 + drivers/spi/spi-rockchip.c | 894 + 3 files changed, 906 insertions(+) create mode 100644 drivers/spi/spi-rockchip.c diff --git a

[PATCH] i2c: rk3x: fix bug that cause transfer fails in master receive mode

2014-08-21 Thread Addy Ke
In rk3x SOC, the I2C controller can receive/transmit up to 32 bytes data in one transaction, so the size of data to be write/read to/from TXDATAx/RXDATAx must be less than or equal 32 bytes at a time. Test on pinky board, elan receive 158 bytes data. Signed-off-by: Addy Ke --- drivers/i2c

[PATCH v2] i2c: rk3x: fix bug that cause transfer fails in maste receive mode

2014-08-21 Thread Addy Ke
In rk3x SOC, the I2C controller can receive/transmit up to 32 bytes data in one chunk, so the size of data to be write/read to/from TXDATAx/RXDATAx must be less than or equal 32 bytes at a time. Tested on rk3288-pinky board, elan receive 158 bytes data. Acked-by: Max Schwarz Signed-off-by: Addy

[PATCH v3] i2c: rk3x: fix bug that cause transfer fails in master receive mode

2014-08-21 Thread Addy Ke
In rk3x SOC, the I2C controller can receive/transmit up to 32 bytes data in one chunk, so the size of data to be write/read to/from TXDATAx/RXDATAx must be less than or equal 32 bytes at a time. Tested on rk3288-pinky board, elan receive 158 bytes data. Acked-by: Max Schwarz Signed-off-by: Addy

[PATCH v4] i2c: rk3x: fix bug that cause transfer fails in master receive mode

2014-08-22 Thread Addy Ke
-by: Addy Ke Acked-by: Max Schwarz --- Changes in v2: - Use cleaner syntax as suggested by Sergei. - Update commit message as suggested by Wolfram. Changes in v3: - fix typo: maste --> master and double spaces after 'len' drivers/i2c/busses/i2c-rk3x.c | 4 Changes in v4: - re

Re: [PATCH v4] i2c: rk3x: fix bug that cause transfer fails in master receive mode

2014-08-22 Thread addy ke
> Addy, > > On Fri, Aug 22, 2014 at 11:00 AM, Addy Ke wrote: >> In rk3x SOC, the I2C controller can receive/transmit up to 32 bytes data >> in one chunk, so the size of data to be write/read to/from TXDATAx/RXDATAx >> must be less than or equal 32 bytes at a time. &

[PATCH v2] i2c: rk3x: fix divisor calculation for SCL frequency

2014-09-07 Thread Addy Ke
) It will be updated to the latest version of chip manual. Signed-off-by: Addy Ke --- changes since v1: - make it more cleaner, suggested by Doug Anderson drivers/i2c/busses/i2c-rk3x.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-rk3x.c b

[PATCH v2] ARM: dts: Add sdio0 and sdio1 to the rk3288

2014-08-18 Thread Addy Ke
This patch requires that <https://patchwork.kernel.org/patch/4701721/> land in order to compile. Signed-off-by: Addy Ke --- Changes in v2: - repost patch to match what's in Heiko's "wip/v3.18-next/dts" tree for the other dwmmc controllers - add "cd" and &q

[PATCH v2] mmc: dw_mmc: move rockchip related code to a separate file

2014-08-18 Thread Addy Ke
To support HS200 and UHS-1, we need add a big hunk of code, as shown in the following patches. So a separate file for rockchip SOCs is suitable. Signed-off-by: Addy Ke --- Changes in v2: - Kconfig: depend on ARCH_ROCKCHIP, suggested by Bartlomiej Zolnierkiewicz - Kconfig: depend on OF, suggested

[PATCH v3] ARM: dts: Add sdio0 and sdio1 to the rk3288

2014-08-19 Thread Addy Ke
This patch requires that <https://patchwork.kernel.org/patch/4701721/> land in order to compile. Signed-off-by: Addy Ke --- Changes in v2: - repost patch to match what's in Heiko's "wip/v3.18-next/dts" tree for the other dwmmc controllers - add "cd" and &q

[PATCH v4] ARM: dts: Add sdio0 and sdio1 to the rk3288

2014-08-19 Thread Addy Ke
This patch requires that <https://patchwork.kernel.org/patch/4701721/> land in order to compile. Reviewed-by: Doug Anderson Signed-off-by: Addy Ke --- Changes in v2: - repost patch to match what's in Heiko's "wip/v3.18-next/dts" tree for the other dwmmc controllers

[PATCH] spi/rockchip: fixup incorrect dma direction setting

2014-08-19 Thread Addy Ke
Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index cb8fd6f..4ef3fd3 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -679,7 +679,7

[PATCH] i2c: rk3x: fix divisor calculation for SCL frequency

2014-09-04 Thread Addy Ke
) It will be updated to the latest version of chip manual. Signed-off-by: Addy Ke --- drivers/i2c/busses/i2c-rk3x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index e637c32..76b6604 100644 --- a/drivers/i2c

Re: [PATCH] i2c: rk3x: fix divisor calculation for SCL frequency

2014-09-05 Thread addy ke
> Addy, > > On Thu, Sep 4, 2014 at 7:32 PM, Addy Ke wrote: >> I2C_CLKDIV register descripted in the previous version of >> RK3x chip manual is incorrect. Plus 1 is required. >> >> The correct formula: >> - T(SCL_HIGH) = T(PCLK) * (CLKDIVH + 1) * 8 >&g

[PATCH] i2c: rk3x: fix interrupt handling issue

2014-08-08 Thread Addy Ke
If slave holds scl, I2C_IPD[7] will be set 1 by controller for debugging. Driver must ignore it. [5.752391] rk3x-i2c ff16.i2c: unexpected irq in WRITE: 0x80 [5.939027] rk3x-i2c ff16.i2c: timeout, ipd: 0x80, state: 4 Signed-off-by: Addy Ke --- drivers/i2c/busses/i2c-rk3x.c | 2

[PATCH] spi: rockchip: return 0 if tx_buf and rx_buf are NULL

2014-08-13 Thread Addy Ke
erson Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 72fb287..1e3bcfa 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -511,8 +

Re: [PATCH] ARM: dts: Add mmc0 and mmc1 aliases for rk3288

2014-08-13 Thread addy ke
> Addy, > > On Wed, Aug 13, 2014 at 6:57 PM, Addy wrote: > >> I think maybe it is suitable as follows: >> mmc0 = &sdmmc >> mmc1 = &sdio0 >> mmc2 = &sdio1 >> mmc3 = &emmc > > Right, except the only ones that have landed in Heiko

[PATCH] ARM: dts: Add sdio0 and sdio1 to the rk3288

2014-08-13 Thread Addy Ke
Signed-off-by: Addy Ke --- arch/arm/boot/dts/rk3288.dtsi | 76 +++ 1 file changed, 76 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 7a9173d..a440869 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm

[PATCH] mmc: dw_mmc: move rockchip related code to a separate file

2014-08-14 Thread Addy Ke
To support HS200 and UHS-1, we need add a big hunk of code, as shown in the following patches. So a separate file for rockchip SOCs is suitable. Signed-off-by: Addy Ke --- drivers/mmc/host/Kconfig | 9 +++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/dw_mmc-pltfm.c

[PATCH] i2c: rk3x: fix bug that cause measured high_ns doesn't meet I2C spec

2014-11-06 Thread Addy Ke
actual measured high_ns is about 3900ns, which is less than 4000ns (the minimum high_ns in I2C spec). Signed-off-by: Addy Ke --- drivers/i2c/busses/i2c-rk3x.c | 58 +++ 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/drivers/i2c/busses/i2c

[PATCH] mmc: dw_mmc: add a quirk for the defferent bit of sdio interrupt

2014-10-29 Thread Addy Ke
This patch add a quirk: DW_MCI_QUIRK_SDIO_INT_24BIT. The bit of sdio interrupt is 16 in designware implementation, but is 24 in RK3288. To support RK3288 mmc controller, we need add a quirk for it. Signed-off-by: Addy Ke --- drivers/mmc/host/dw_mmc.c | 32

Re: [PATCH] mmc: dw_mmc: add a quirk for the defferent bit of sdio interrupt

2014-10-29 Thread addy ke
Hi, Doug, On 2014/10/30 12:49, Doug Anderson wrote: > Addy, > > On Wed, Oct 29, 2014 at 9:41 PM, Doug Anderson wrote: >> You can avoid a lot of "if" tests if you just add a new "sdio->id" > > Whoops, I mean "slot->sdio_id" > To us

[PATCH] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-10-30 Thread Addy Ke
The bit of sdio interrupt is 16 in designware implementation, but it is 24 in RK3288. This patch add sdio_id0 for the number of slot0 in the SDIO interrupt registers, which can be set in platform DT table, such as: - rockchip,sdio-interrupt-slot0 = <8>; Signed-off-by: Addy Ke --- drive

Re: [PATCH] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-10-30 Thread addy ke
Hi, Jaehoon On 2014/10/30 19:02, Jaehoon Chung wrote: > Hi, Addy. > > This patch is conflicted..Could you rebase on latest Ulf's tree? I have not found ulf's tree in git.kernel.org. I can't 'git clone git://git.kernel.org/pub/scm/linux/kernel/git/ulf/xxx.git'. S

Re: [PATCH] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-10-30 Thread addy ke
On 2014/10/30 19:17, Jaehoon Chung wrote: > On 10/30/2014 08:11 PM, Ulf Hansson wrote: >> On 30 October 2014 11:50, Addy Ke wrote: >>> The bit of sdio interrupt is 16 in designware implementation, >>> but it is 24 in RK3288. This patch add sdio_id0 for the numb

[PATCH v2] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-10-30 Thread Addy Ke
The bit of sdio interrupt is 16 in designware implementation, but it is 24 in RK3288. This patch add sdio_id0 for the number of slot0 in the SDIO interrupt registers, which can be set in platform DT table, such as: - rockchip,sdio-interrupt-slot0 = <8>; Signed-off-by: Addy Ke --- Changes

[PATCH v5] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-12 Thread Addy Ke
Reviewed-by: Doug Anderson Tested-by: Doug Anderson Signed-off-by: Addy Ke --- Changes in v2: - remove Fast-mode plus and HS-mode - use new formulas suggested by Doug Changes in V3: - use new formulas (sep 30) suggested by Doug Changes in V4: - fix some wrong style - WARN_ONCE if min_low_div

[PATCH v6] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-13 Thread Addy Ke
Reviewed-by: Doug Anderson Tested-by: Doug Anderson Signed-off-by: Addy Ke --- Changes in v2: - remove Fast-mode plus and HS-mode - use new formulas suggested by Doug Changes in V3: - use new formulas (sep 30) suggested by Doug Changes in V4: - fix some wrong style - WARN_ONCE if min_low_div

[PATCH 0/2] spi: fix two bugs

2014-10-15 Thread Addy Ke
Patch 1: fix bug that case spi can't go as fast as slave request Patch 2: fix bug that cause spi transfer timed out in DMA duplex mode Tested on rk3288-pinky-version2 board. Addy Ke (2): spi/rockchip: fix bug that case spi can't go as fast as slave request spi/rockchip: fix bug

[PATCH 1/2] spi/rockchip: fix bug that case spi can't go as fast as slave request

2014-10-15 Thread Addy Ke
Because the minimum divisor in rk3x's spi controller is 2, if spi_clk is less than 2 * sclk_out, we can't get the right divisor. So we must set spi_clk again to match slave request. Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 12 1 file changed, 12 insertion

[PATCH 2/2] spi/rockchip: fix bug that cause spi transfer timed out in DMA duplex mode

2014-10-15 Thread Addy Ke
In rx mode, dma must be prepared before spi is enabled. But in tx and tr mode, spi must be enabled first. Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-rockchip.c b

Re: [PATCH 1/2] spi/rockchip: fix bug that case spi can't go as fast as slave request

2014-10-16 Thread addy ke
hi, Mark On 2014/10/15 21:04, Mark Brown wrote: > On Wed, Oct 15, 2014 at 07:25:49PM +0800, Addy Ke wrote: > >> +if (WARN_ON(rs->speed > MAX_SCLK_OUT)) >> +rs->speed = MAX_SCLK_OUT; >> + >> +/* the minimum divsor is 2 */ &

Re: [PATCH 2/2] spi/rockchip: fix bug that cause spi transfer timed out in DMA duplex mode

2014-10-16 Thread addy ke
_current_transfer(rs->master); + } spin_unlock_irqrestore(&rs->lock, flags); } Sorry for my mistake, I have not put these changes to this patch. Do I need send patch v2 or a new patch to fix this issure? On 2014/10/15 21:05, Mark Brown wrote: > On Wed, Oct 15, 2014 at 07:26:18PM +0800, Addy Ke wrote: &

[PATCH v3] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-07 Thread Addy Ke
measured i2c SCL waveforms in fast-mode by oscilloscope on rk3288-pinky board. the LOW period of the scl clock is 1.3us. It is so critical that we must adjust LOW division to increase the LOW period of the scl clock. Thanks Doug for the suggestion about division formulas. Signed-off-by: Addy Ke

Re: [PATCH v2] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-11-02 Thread addy ke
On 2014/10/31 18:43, Heiko Stübner wrote: > Am Freitag, 31. Oktober 2014, 11:50:09 schrieb Addy Ke: >> The bit of sdio interrupt is 16 in designware implementation, >> but it is 24 in RK3288. This patch add sdio_id0 for the number >> of slot0 in the SDIO interrupt registers

[PATCH v3] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-11-02 Thread Addy Ke
The bit of sdio interrupt is 16 in designware implementation, but it is 24 on Rockchip SoCs.This patch add sdio_id0 for the number of slot0 in the SDIO interrupt registers. Signed-off-by: Addy Ke --- Changes in v2: - rebase on http://git.linaro.org/git/people/ulf.hansson/mmc.git, next branch

Re: [PATCH v3] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-11-03 Thread addy ke
Hi, Jaehoo On 2014/11/3 16:59, Jaehoon Chung wrote: > Hi, Addy. > > On 11/03/2014 10:20 AM, Addy Ke wrote: >> The bit of sdio interrupt is 16 in designware implementation, >> but it is 24 on Rockchip SoCs.This patch add sdio_id0 for the >> number of slot0 in t

[PATCH v4] mmc: dw_mmc: add support for the other bit of sdio interrupt

2014-11-04 Thread Addy Ke
The bit of sdio interrupt is 16 in designware implementation, but it is 24 on Rockchip SoCs.This patch add sdio_id0 for the number of slot0 in the SDIO interrupt registers. Signed-off-by: Addy Ke --- Changes in v2: - rebase on http://git.linaro.org/git/people/ulf.hansson/mmc.git, next branch

Re: [PATCH] mmc: dw_mmc: add quirk for data over interrupt timeout

2014-11-18 Thread addy ke
Hi Jaehoon On 2014/11/19 09:22, Jaehoon Chung Wrote: > Hi, Addy. > > On 11/18/2014 09:32 AM, Addy wrote: >> >> On 2014年11月14日 21:18, Jaehoon Chung wrote: >>> Hi, Addy. >>> >>> Did you use the DW_MCI_QUIRK_IDMAC_DTO? >>> I'm not sure

Re: [PATCH] mmc: dw_mmc: add quirk for data over interrupt timeout

2014-11-20 Thread addy ke
Hi, Jaehoon On 2014/11/19 13:56, addy ke wrote: > Hi Jaehoon > > On 2014/11/19 09:22, Jaehoon Chung Wrote: >> Hi, Addy. >> >> On 11/18/2014 09:32 AM, Addy wrote: >>> >>> On 2014年11月14日 21:18, Jaehoon Chung wrote: >>>> Hi, Addy. >>&g

Re: [PATCH] mmc: dw_mmc: try pick the exact same voltage as vmmc for vqmmc

2014-11-12 Thread addy ke
On 2014/11/13 02:04, Doug Anderson wrote: > Ulf, > > On Tue, Nov 11, 2014 at 12:52 AM, Ulf Hansson wrote: >> On 11 November 2014 05:02, Addy Ke wrote: >>> SD2.0 cards need vqmmc and vmmc to be the same. >> >> No, that's not correct. >> >

[PATCH] mmc: dw_mmc: add quirk for data over interrupt timeout

2014-11-14 Thread Addy Ke
From: Addy This patch add a new quirk to notify the driver to teminate current transfer and report a data timeout to the core, if data over interrupt does NOT come within the given time. dw_mmc call mmc_request_done func to finish transfer depends on data over interrupt. If data over interrupt

Re: [PATCH v2] mmc: dw_mmc: add quirk for broken data transfer over scheme

2014-12-01 Thread addy ke
Hi, On 2014/11/27 06:46, Doug Anderson wrote: > Hi, > > On Tue, Nov 25, 2014 at 12:10 AM, Addy Ke wrote: >> This patch add a new quirk to add a s/w timer to notify the driver >> to terminate current transfer and report a data timeout to the core, >> if DTO interru

[PATCH] mmc: dw_mmc: try pick the exact same voltage as vmmc for vqmmc

2014-11-10 Thread Addy Ke
) Signed-off-by: Addy Ke --- drivers/mmc/host/dw_mmc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index b4c3044..a8b70b5 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1163,8

[PATCH v2] mmc: dw_mmc: add quirk for broken data transfer over scheme

2014-11-25 Thread Addy Ke
that host should get DRTO and DTO interrupt. But we really don't get any data-related interrupt in RK3X SoCs. And driver can't get data transfer state, it can do nothing but wait for. Signed-off-by: Addy Ke --- - fix some typo. - remove extra timeout value (250ms). - remove dw_mci_dt

[PATCH v2] i2c: rk3x: fix bug that cause measured high_ns doesn't meet I2C spec

2014-12-02 Thread Addy Ke
for signals from the device tree. This allows us to more accurately calculate timings. see: https://chromium-review.googlesource.com/#/c/232774/ Signed-off-by: Addy Ke --- Changes in v2: - merged the patch that Doug submitted to chromium Documentation/devicetree/bindings/i2c/i2c-rk3x.txt | 10

[PATCH v3] mmc: dw_mmc: add quirk for broken data transfer over scheme

2014-12-02 Thread Addy Ke
ollow up change when we find the root cause. Signed-off-by: Addy Ke --- Changes in v2: - fix some typo. - remove extra timeout value (250ms). - remove dw_mci_dto_start_monitor func. - use "broken-dto" for new quirk and change Subject for it. Changes in v3: - Remove dts for brok

[PATCH] ARM: dts: rockchip: set dw_mmc max-freq 150Mhz

2014-12-03 Thread Addy Ke
team was based on this freequency point. Signed-off-by: Addy Ke --- arch/arm/boot/dts/rk3288.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index acb6a2f..9c35a1d 100644 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arc

Re: [PATCH 1/2] spi/rockchip: fix bug that case spi can't go as fast as slave request

2014-10-16 Thread addy ke
On 2014/10/16 17:34, Mark Brown wrote: > On Thu, Oct 16, 2014 at 05:16:02PM +0800, addy ke wrote: >> On 2014/10/15 21:04, Mark Brown wrote: >>> On Wed, Oct 15, 2014 at 07:25:49PM +0800, Addy Ke wrote: > >>>> + if (WARN_ON(rs->speed > MAX_SCLK_OUT)) &

[PATCH] spi/rockchip: spi controller must be disabled in tx callback too

2014-10-16 Thread Addy Ke
Signed-off-by: Addy Ke --- drivers/spi/spi-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c index 153269b..87bc16f 100644 --- a/drivers/spi/spi-rockchip.c +++ b/drivers/spi/spi-rockchip.c @@ -418,8 +418,10

[PATCH v4] i2c: rk3x: adjust the LOW divison based on characteristics of SCL

2014-10-08 Thread Addy Ke
Tested-by: Doug Anderson Signed-off-by: Addy Ke --- Changes in v2: - remove Fast-mode plus and HS-mode - use new formulas suggested by Doug Changes in V3: - use new formulas (sep 30) suggested by Doug Changes in V3: - fix some wrong style - WARN_ONCE if min_low_div > max_low_div drivers/

[PATCH v2 0/2] about data busy

2015-02-08 Thread Addy Ke
Addy Ke (2): mmc: dw_mmc: fix bug that cause 'Timeout sending command' mmc: dw_mmc: Don't start command while data busy drivers/mmc/host/dw_mmc.c | 35 +++ 1 file changed, 35 insertions(+) -- Changes in v2: - add new patch to handle data

[PATCH v2 1/2] mmc: dw_mmc: fix bug that cause 'Timeout sending command'

2015-02-08 Thread Addy Ke
we will get 'Timeout sending command', and then system will be blocked. To avoid this, we need reset mmc controller. Signed-off-by: Addy Ke --- drivers/mmc/host/dw_mmc.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/mmc/host/dw_mmc.c b/driver

[PATCH v2 2/2] mmc: dw_mmc: Don't start command while data busy

2015-02-08 Thread Addy Ke
We should wait for data busy here in non-volt-switch state. This may happend when sdio sends CMD53. Signed-off-by: Addy Ke --- drivers/mmc/host/dw_mmc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index b0b57e3..b40080d 100644

Re: [PATCH] mmc: dw_mmc: fix bug that cause 'Timeout sending command'

2015-02-09 Thread addy ke
On 2015/2/9 15:04, Jaehoon Chung wrote: > On 02/09/2015 03:56 PM, Addy wrote: >> >> >> On 2015.02.09 12:51, Ulf Hansson wrote: >>> On 5 February 2015 at 12:13, Addy Ke wrote: >>>> Because of some uncertain factors, such as worse card or worse hard

[PATCH] mmc: core: add runtime-resume caps to support resume at runtime_resume

2015-02-05 Thread Addy Ke
Signed-off-by: Addy Ke --- Documentation/devicetree/bindings/mmc/mmc.txt | 11 +++ drivers/mmc/core/host.c | 2 ++ 2 files changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index

  1   2   >