[PATCH] dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size

2020-11-13 Thread Sugar Zhang
79 iops 734873 KB/s (0) After this patch and increase dma clk to 400MHz: dmatest: dma0chan0-copy0: summary 8 tests, 0 failures 259 iops 1062929 KB/s (0) Signed-off-by: Sugar Zhang --- drivers/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/dri

[PATCH] ASoC: rockchip: spdif: Handle clk by pm runtime

2020-07-13 Thread Sugar Zhang
This patch handle the clk by pm runtime mechanism to simplify the clk management. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_spdif.c | 59 +++-- 1 file changed, 17 insertions(+), 42 deletions(-) diff --git a/sound/soc/rockchip/rockchip_spdif.c

Re: [PATCH v2 01/13] dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP'

2020-06-28 Thread sugar zhang
On 2020/6/24 15:54, Vinod Koul wrote: On 09-06-20, 09:14, Sugar Zhang wrote: There is no reason to limit the performance on the 'NO-FLUSHP' SoCs, cuz these platforms are just that the 'FLUSHP' instruction is broken. Lets not use terms like cuz... 'because' is perfect term :) It can

Re: [PATCH v2 0/13] Patches to improve transfer efficiency for Rockchip SoCs.

2020-06-12 Thread sugar zhang
. Unfortunately it doesn't fix the rk3328 gmac controller. Tested-by: Peter Geis On Mon, Jun 8, 2020 at 9:15 PM Sugar Zhang wrote: Changes in v2: - fix FATAL ERROR: Unable to parse input tree Sugar Zhang (13): dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP' dmaengine

[PATCH v2 03/13] dt-bindings: dma: pl330: Document the quirk 'arm,pl330-periph-burst'

2020-06-08 Thread Sugar Zhang
This patch Adds the quirk 'arm,pl330-periph-burst' for pl330. Signed-off-by: Sugar Zhang --- Changes in v2: None Documentation/devicetree/bindings/dma/arm-pl330.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation

[PATCH v2 02/13] dmaengine: pl330: Add quirk 'arm,pl330-periph-burst'

2020-06-08 Thread Sugar Zhang
. Finaly, we add the quirk to specify pl330 to use burst transfers only. Signed-off-by: Sugar Zhang --- Changes in v2: None drivers/dma/pl330.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index ff0a91f..1941ec6 100644

[PATCH v2 01/13] dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP'

2020-06-08 Thread Sugar Zhang
There is no reason to limit the performance on the 'NO-FLUSHP' SoCs, cuz these platforms are just that the 'FLUSHP' instruction is broken. so, remove the limit to improve the efficiency. Signed-off-by: Sugar Zhang --- Changes in v2: None drivers/dma/pl330.c | 34

[PATCH v2 0/13] Patches to improve transfer efficiency for Rockchip SoCs.

2020-06-08 Thread Sugar Zhang
Changes in v2: - fix FATAL ERROR: Unable to parse input tree Sugar Zhang (13): dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP' dmaengine: pl330: Add quirk 'arm,pl330-periph-burst' dt-bindings: dma: pl330: Document the quirk 'arm,pl330-periph-burst' ARM: dts: rk3036: Add

[PATCH v2 04/13] ARM: dts: rk3036: Add 'arm,pl330-periph-burst' for dmac

2020-06-08 Thread Sugar Zhang
This patch Add the quirk to specify to use burst transfer for better compatible and higher performance. Signed-off-by: Sugar Zhang --- Changes in v2: - fix FATAL ERROR: Unable to parse input tree arch/arm/boot/dts/rk3036.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot

[PATCH v1 03/13] dt-bindings: dma: pl330: Document the quirk 'arm,pl330-periph-burst'

2020-06-08 Thread Sugar Zhang
This patch Adds the quirk 'arm,pl330-periph-burst' for pl330. Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/dma/arm-pl330.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/dma/arm-pl330.txt b/Documentation/devicetree/bindings/dma/arm

[PATCH v1 02/13] dmaengine: pl330: Add quirk 'arm,pl330-periph-burst'

2020-06-08 Thread Sugar Zhang
. Finaly, we add the quirk to specify pl330 to use burst transfers only. Signed-off-by: Sugar Zhang --- drivers/dma/pl330.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index ff0a91f..1941ec6 100644 --- a/drivers/dma

[PATCH v1 01/13] dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP'

2020-06-08 Thread Sugar Zhang
There is no reason to limit the performance on the 'NO-FLUSHP' SoCs, cuz these platforms are just that the 'FLUSHP' instruction is broken. so, remove the limit to improve the efficiency. Signed-off-by: Sugar Zhang --- drivers/dma/pl330.c | 34 ++ 1 file changed

[PATCH v1 0/13] Patches to improve dma transfer efficiency for Rockchip SoCs.

2020-06-08 Thread Sugar Zhang
Sugar Zhang (13): dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP' dmaengine: pl330: Add quirk 'arm,pl330-periph-burst' dt-bindings: dma: pl330: Document the quirk 'arm,pl330-periph-burst' ARM: dts: rk3036: Add 'arm,pl330-periph-burst' for dmac ARM: dts: rk322x: Add

[PATCH v1 04/13] ARM: dts: rk3036: Add 'arm,pl330-periph-burst' for dmac

2020-06-08 Thread Sugar Zhang
This patch Add the quirk to specify to use burst transfer for better compatible and higher performance. Signed-off-by: Sugar Zhang --- arch/arm/boot/dts/rk3036.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/rk3036.dtsi b/arch/arm/boot/dts/rk3036.dtsi index d9a0c9a2

[PATCH v1] dmaengine: pl330: Make sure the debug is idle before doing DMAGO

2020-06-03 Thread Sugar Zhang
to the DBGINST1 Register 6. Write zero to the DBGCMD Register so, we should make sure the debug is idle before step 4/5/6, not only step 6. if not, there maybe a risk that fail to write DBGINST0/1. Signed-off-by: Sugar Zhang --- drivers/dma/pl330.c | 12 ++-- 1 file changed, 6 insertions

[PATCH v1 12/12] ASoC: rockchip: pdm: Correct PDM_CTRL0 reg value

2019-04-03 Thread Sugar Zhang
This patch fix the wrong reg value for rk322x/rk322xh, cuz there is no STORE JUSTIFIED MODE on it. on rk322x/rk322xh, the same bit means PDM_MODE/RESERVED, if the bit is set to RESERVED, the controller will not work. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 7

[PATCH v1 11/12] ASoC: rockchip: pdm: Mark RXFIFO_DATA as volatile and precious

2019-04-03 Thread Sugar Zhang
This patch marks RXFIFO_DATA as precious to avoid being read outside a call from the driver, such as regmap debugfs Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 13 + 1 file changed, 13 insertions(+) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc

[PATCH v1 10/12] ASoC: rockchip: pdm: adjust waterlevel in frame unit

2019-04-03 Thread Sugar Zhang
This patch make the waterlevel more reasonable, because the pdm controller share the single FIFO(128 entries) with each channel. adjust waterlevel in frame to meet the vad or dma frames request. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 3 ++- 1 file changed, 2

[PATCH v1 09/12] dt-bindings: sound: add compatible for rk1808

2019-04-03 Thread Sugar Zhang
This patch adds bindings for rk1808 soc. Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt b/Documentation/devicetree/bindings/sound/rockchip

[PATCH v1 08/12] ASoC: rockchip: pdm: add compatible for rk1808

2019-04-03 Thread Sugar Zhang
This patch adds support for rk1808, the pdm controller is the same as rk3308. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 4f93a74..3e1c5fd

[PATCH v1 07/12] dt-bindings: sound: rockchip: add compatible for rk3308/px30

2019-04-03 Thread Sugar Zhang
This patch adds bindings for rk3308/px30. Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt b/Documentation/devicetree/bindings/sound/rockchip

[PATCH v1 06/12] ASoC: rockchip: pdm: fixup pdm fractional div

2019-04-03 Thread Sugar Zhang
This patch adds support fractional div for rk3308. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 172 -- sound/soc/rockchip/rockchip_pdm.h | 9 ++ 2 files changed, 139 insertions(+), 42 deletions(-) diff --git a/sound/soc/rockchip

[PATCH v1 05/12] ASoC: rockchip: pdm: change dma burst to 8

2019-04-03 Thread Sugar Zhang
This patch decreases the transfer bursts to avoid the fifo overrun. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index abbb6d7..c50494b

[PATCH v1 02/12] ASoC: rockchip: pdm: using left justified store mode

2019-04-03 Thread Sugar Zhang
This patch set left justified store mode default. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 1 + sound/soc/rockchip/rockchip_pdm.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index

[PATCH v1 03/12] ASoC: rockchip: pdm: add default regs

2019-04-03 Thread Sugar Zhang
This patch add default regs value for controller. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 8 1 file changed, 8 insertions(+) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index 360ebf2..8c1be59 100644 --- a/sound/soc

[PATCH v1 04/12] ASoC: rockchip: pdm: optimize clear logic

2019-04-03 Thread Sugar Zhang
There is no need to reset controller every time, do this once in pdm_probe. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c index

[PATCH v1 01/12] ASoC: rockchip: pdm: fix regmap_ops hang issue

2019-04-03 Thread Sugar Zhang
This is because set_fmt ops maybe called when PD is off, and in such case, regmap_ops will lead system hang. enale PD before doing regmap_ops. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_pdm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/rockchip

[PATCH v1 0/12] Patches to update pdm for rockchip socs

2019-04-03 Thread Sugar Zhang
These patches to add support pdm for rk322x/rk1808/rk3308/px30 socs and fix some issues. Sugar Zhang (12): ASoC: rockchip: pdm: fix regmap_ops hang issue ASoC: rockchip: pdm: using left justified store mode ASoC: rockchip: pdm: add default regs ASoC: rockchip: pdm: optimize clear logic

[PATCH] dmaengine: pl330: _stop: clear interrupt status

2019-04-03 Thread Sugar Zhang
| | | clear INTCLR | mask INTEN | | | spin_unlock_irqrestore Signed-off-by: Sugar Zhang

[PATCH v2 1/2] arm64: dts: rockchip: add rk3328 pdm node

2017-08-21 Thread Sugar Zhang
This patch add pdm controller device node for rk3328. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Changes in v2: - separate pinctrl pins remove unused fsync clk, it's debug pins arch/arm64/boot/dts/rockchip/rk3328.dtsi | 77 1 file c

[PATCH v2 2/2] ASoC: rockchip: separate pinctrl pins from each other

2017-08-21 Thread Sugar Zhang
pdm sdi0~3 pins are optional, for example, if 4ch required, only sdi0~1 need to be enabled. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Changes in v2: None Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 7 +-- 1 file changed, 5 insertions(+), 2 del

[PATCH v2 1/2] arm64: dts: rockchip: add rk3328 pdm node

2017-08-21 Thread Sugar Zhang
This patch add pdm controller device node for rk3328. Signed-off-by: Sugar Zhang --- Changes in v2: - separate pinctrl pins remove unused fsync clk, it's debug pins arch/arm64/boot/dts/rockchip/rk3328.dtsi | 77 1 file changed, 77 insertions(+) diff --git

[PATCH v2 2/2] ASoC: rockchip: separate pinctrl pins from each other

2017-08-21 Thread Sugar Zhang
pdm sdi0~3 pins are optional, for example, if 4ch required, only sdi0~1 need to be enabled. Signed-off-by: Sugar Zhang --- Changes in v2: None Documentation/devicetree/bindings/sound/rockchip,pdm.txt | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Documentation

[PATCH v2 0/2] Patches to add support pdm controller for rk3328

2017-08-21 Thread Sugar Zhang
These patches to add support pdm for rk3328 socs. Changes in v2: - separate pinctrl pins remove unused fsync clk, it's debug pins Sugar Zhang (2): arm64: dts: rockchip: add rk3328 pdm node ASoC: rockchip: separate pinctrl pins from each other .../devicetree/bindings/sound/rockchip

[PATCH v2 0/2] Patches to add support pdm controller for rk3328

2017-08-21 Thread Sugar Zhang
These patches to add support pdm for rk3328 socs. Changes in v2: - separate pinctrl pins remove unused fsync clk, it's debug pins Sugar Zhang (2): arm64: dts: rockchip: add rk3328 pdm node ASoC: rockchip: separate pinctrl pins from each other .../devicetree/bindings/sound/rockchip

[PATCH] ASoC: rockchip: add bindings for i2s

2017-07-30 Thread Sugar Zhang
This patch add bindings for rk3036/rk3228/rk3328/rk3366 i2s. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Documentation/devicetree/bindings/sound/rockchip-i2s.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.

[PATCH] ASoC: rockchip: add bindings for i2s

2017-07-30 Thread Sugar Zhang
This patch add bindings for rk3036/rk3228/rk3328/rk3366 i2s. Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/sound/rockchip-i2s.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt b/Documentation/devicetree

[PATCH v1 0/2] Patches to add i2s, spdif node for rk3328

2017-07-27 Thread Sugar Zhang
These patches to add i2s, spdif dt nodes for rk3328 soc. Sugar Zhang (2): arm64: dts: rockchip: add rk3328 i2s nodes arm64: dts: rockchip: add rk3328 spdif node arch/arm64/boot/dts/rockchip/rk3328.dtsi | 46 1 file changed, 46 insertions(+) -- 2.7.4

[PATCH v1 0/2] Patches to add i2s, spdif node for rk3328

2017-07-27 Thread Sugar Zhang
These patches to add i2s, spdif dt nodes for rk3328 soc. Sugar Zhang (2): arm64: dts: rockchip: add rk3328 i2s nodes arm64: dts: rockchip: add rk3328 spdif node arch/arm64/boot/dts/rockchip/rk3328.dtsi | 46 1 file changed, 46 insertions(+) -- 2.7.4

[PATCH v1 2/2] arm64: dts: rockchip: add rk3328 spdif node

2017-07-27 Thread Sugar Zhang
This patch add the spdif dt node for rk3328. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/

[PATCH v1 1/2] arm64: dts: rockchip: add rk3328 i2s nodes

2017-07-27 Thread Sugar Zhang
This patch add the i2s dt nodes for rk3328. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 33 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/bo

[PATCH v1 2/2] arm64: dts: rockchip: add rk3328 spdif node

2017-07-27 Thread Sugar Zhang
This patch add the spdif dt node for rk3328. Signed-off-by: Sugar Zhang --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index f1a284b..d278670

[PATCH v1 1/2] arm64: dts: rockchip: add rk3328 i2s nodes

2017-07-27 Thread Sugar Zhang
This patch add the i2s dt nodes for rk3328. Signed-off-by: Sugar Zhang --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 33 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi index

[PATCH] arm64: dts: rockchip: add rk3368 spdif node

2017-07-27 Thread Sugar Zhang
This patch add the spdif dt node for rk3368 soc. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/ro

[PATCH] arm64: dts: rockchip: add rk3368 spdif node

2017-07-27 Thread Sugar Zhang
This patch add the spdif dt node for rk3368 soc. Signed-off-by: Sugar Zhang --- arch/arm64/boot/dts/rockchip/rk3368.dtsi | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3368.dtsi b/arch/arm64/boot/dts/rockchip/rk3368.dtsi index 6d5dc05

[PATCH] ARM: dts: rockchip: add spdif for rk322x SoCs

2017-07-27 Thread Sugar Zhang
This patch add the spdif dt node for rk322x SoCs. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- arch/arm/boot/dts/rk322x.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index f

[PATCH] ARM: dts: rockchip: add spdif for rk322x SoCs

2017-07-27 Thread Sugar Zhang
This patch add the spdif dt node for rk322x SoCs. Signed-off-by: Sugar Zhang --- arch/arm/boot/dts/rk322x.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index f3e4ffd..b3b80e1 100644 --- a/arch/arm

[PATCH v1 0/2] Patches to add support pdm controller for rk3328

2017-06-13 Thread Sugar Zhang
These patches to add support pdm for rk3328 socs. Sugar Zhang (2): ASoC: rockchip: add support for pdm controller arm64: dts: rk3328: add pdm node .../devicetree/bindings/sound/rockchip,pdm.txt | 39 ++ arch/arm64/boot/dts/rockchip/rk3328.dtsi | 55 +++ sound/soc/rockchip

[PATCH v1 0/2] Patches to add support pdm controller for rk3328

2017-06-13 Thread Sugar Zhang
These patches to add support pdm for rk3328 socs. Sugar Zhang (2): ASoC: rockchip: add support for pdm controller arm64: dts: rk3328: add pdm node .../devicetree/bindings/sound/rockchip,pdm.txt | 39 ++ arch/arm64/boot/dts/rockchip/rk3328.dtsi | 55 +++ sound/soc/rockchip

[PATCH v1 1/2] ASoC: rockchip: add support for pdm controller

2017-06-13 Thread Sugar Zhang
The Pulse Density Modulation Interface Controller (PDMC) is a PDM interface controller and decoder that support PDM format. It integrates a clock generator driving the PDM microphone and embeds filters which decimate the incoming bit stream to obtain most common audio rates. Signed-off-by: Sugar

[PATCH v1 2/2] arm64: dts: rk3328: add pdm node

2017-06-13 Thread Sugar Zhang
This patch add pdm controller device node for rk3328. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 55 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi

[PATCH v1 1/2] ASoC: rockchip: add support for pdm controller

2017-06-13 Thread Sugar Zhang
The Pulse Density Modulation Interface Controller (PDMC) is a PDM interface controller and decoder that support PDM format. It integrates a clock generator driving the PDM microphone and embeds filters which decimate the incoming bit stream to obtain most common audio rates. Signed-off-by: Sugar

[PATCH v1 2/2] arm64: dts: rk3328: add pdm node

2017-06-13 Thread Sugar Zhang
This patch add pdm controller device node for rk3328. Signed-off-by: Sugar Zhang --- arch/arm64/boot/dts/rockchip/rk3328.dtsi | 55 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328

[PATCH] ARM: dts: rk322x: fix i2s1 pinctrl error

2017-06-09 Thread Sugar Zhang
Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- arch/arm/boot/dts/rk322x.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index 48a0c1c..cc6a27d 100644 --- a/arch/arm/boot/dts/rk322

[PATCH] ARM: dts: rk322x: fix i2s1 pinctrl error

2017-06-09 Thread Sugar Zhang
Signed-off-by: Sugar Zhang --- arch/arm/boot/dts/rk322x.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index 48a0c1c..cc6a27d 100644 --- a/arch/arm/boot/dts/rk322x.dtsi +++ b/arch/arm/boot/dts

[PATCH v1 2/4] ASoC: rockchip: i2s: add support for i2s bclk fs configuration

2017-06-09 Thread Sugar Zhang
this patch add support for i2s bclk fs configuration, we can configure bclk_fs by devicetree as required. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Documentation/devicetree/bindings/sound/rockchip-i2s.txt | 2 ++ sound/soc/rockchip/rockchip_i2s.c

[PATCH v1 2/4] ASoC: rockchip: i2s: add support for i2s bclk fs configuration

2017-06-09 Thread Sugar Zhang
this patch add support for i2s bclk fs configuration, we can configure bclk_fs by devicetree as required. Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/sound/rockchip-i2s.txt | 2 ++ sound/soc/rockchip/rockchip_i2s.c| 9 - 2 files changed, 10

[PATCH v1 4/4] ASoC: rockchip: i2s: fixup clk div

2017-06-09 Thread Sugar Zhang
we found mclk maybe not precise as required because of PLL, but it still can be used and no side effect. for example, if we require mclk 11289600, but get 11289598, it doesn't matter. so using DIV_ROUND_CLOSEST to fix it. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- sou

[PATCH v1 4/4] ASoC: rockchip: i2s: fixup clk div

2017-06-09 Thread Sugar Zhang
we found mclk maybe not precise as required because of PLL, but it still can be used and no side effect. for example, if we require mclk 11289600, but get 11289598, it doesn't matter. so using DIV_ROUND_CLOSEST to fix it. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_i2s.c | 4

[PATCH v1 0/4] Patches to fix some problem for rockchip i2s

2017-06-09 Thread Sugar Zhang
These patches to fix some problem for rockchip i2s. Sugar Zhang (3): ASoC: rockchip: i2s: add a delay before i2s clear ASoC: rockchip: i2s: add support for i2s bclk fs configuration ASoC: rockchip: i2s: fixup clk div zhangjun (1): ASoC: rockchip: i2s: add other configurable formats

[PATCH v1 0/4] Patches to fix some problem for rockchip i2s

2017-06-09 Thread Sugar Zhang
These patches to fix some problem for rockchip i2s. Sugar Zhang (3): ASoC: rockchip: i2s: add a delay before i2s clear ASoC: rockchip: i2s: add support for i2s bclk fs configuration ASoC: rockchip: i2s: fixup clk div zhangjun (1): ASoC: rockchip: i2s: add other configurable formats

[PATCH v1 1/4] ASoC: rockchip: i2s: add a delay before i2s clear

2017-06-09 Thread Sugar Zhang
in order to guarantee i2s lrck signal integrity, when i2s stop, need at least one lrck cycle to ensure signal integrity. the max delay time is when lrck is 8khz, the delay time is 125us(1/8khz), using udelay(150) with a 25us margin. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.

[PATCH v1 1/4] ASoC: rockchip: i2s: add a delay before i2s clear

2017-06-09 Thread Sugar Zhang
in order to guarantee i2s lrck signal integrity, when i2s stop, need at least one lrck cycle to ensure signal integrity. the max delay time is when lrck is 8khz, the delay time is 125us(1/8khz), using udelay(150) with a 25us margin. Signed-off-by: Sugar Zhang --- sound/soc/rockchip

[PATCH v1 3/4] ASoC: rockchip: i2s: add other configurable formats

2017-06-09 Thread Sugar Zhang
From: zhangjun <zhang...@rock-chips.com> simple-audio-card,bitclock-inversion = <1> : bclk falling edge taken simple-audio-card,format = "dsp_a" : pcm no delay mode simple-audio-card,format = "dsp_b" : pcm late 1 mode Signed-off-by: zhangjun <zhang...@rock-ch

[PATCH v1 3/4] ASoC: rockchip: i2s: add other configurable formats

2017-06-09 Thread Sugar Zhang
From: zhangjun simple-audio-card,bitclock-inversion = <1> : bclk falling edge taken simple-audio-card,format = "dsp_a" : pcm no delay mode simple-audio-card,format = "dsp_b" : pcm late 1 mode Signed-off-by: zhangjun Signed-off-by: Sugar Zhang --- sound/soc/ro

[PATCH v1 1/2] ASoC: rockchip: add bindings for spdif controller

2017-06-09 Thread Sugar Zhang
this patch add compatible for rk3228/rk3328 spdif, Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 2 ++ sound/soc/rockchip/rockchip_spdif.c| 4 2 files changed, 6 insertions(+) diff

[PATCH v1 1/2] ASoC: rockchip: add bindings for spdif controller

2017-06-09 Thread Sugar Zhang
this patch add compatible for rk3228/rk3328 spdif, Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 2 ++ sound/soc/rockchip/rockchip_spdif.c| 4 2 files changed, 6 insertions(+) diff --git a/Documentation/devicetree

[PATCH v1 0/2] Patches to add support spdif for rk322x

2017-06-09 Thread Sugar Zhang
These patches to add support spdif for rk322x socs. Sugar Zhang (2): ASoC: rockchip: add bindings for spdif controller ARM: dts: rk322x: add spdif node .../devicetree/bindings/sound/rockchip-spdif.txt | 2 ++ arch/arm/boot/dts/rk322x.dtsi| 20

[PATCH v1 0/2] Patches to add support spdif for rk322x

2017-06-09 Thread Sugar Zhang
These patches to add support spdif for rk322x socs. Sugar Zhang (2): ASoC: rockchip: add bindings for spdif controller ARM: dts: rk322x: add spdif node .../devicetree/bindings/sound/rockchip-spdif.txt | 2 ++ arch/arm/boot/dts/rk322x.dtsi| 20

[PATCH v1 2/2] ARM: dts: rk322x: add spdif node

2017-06-09 Thread Sugar Zhang
This patch add spdif node for rk322x. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- arch/arm/boot/dts/rk322x.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index 48a0c1c..56f0842

[PATCH v1 2/2] ARM: dts: rk322x: add spdif node

2017-06-09 Thread Sugar Zhang
This patch add spdif node for rk322x. Signed-off-by: Sugar Zhang --- arch/arm/boot/dts/rk322x.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/rk322x.dtsi b/arch/arm/boot/dts/rk322x.dtsi index 48a0c1c..56f0842 100644 --- a/arch/arm/boot/dts

Re: [PATCH 0/2] Free running cyclic transfer implementation for pl330

2017-04-17 Thread sugar
Hi Alexander, I have tested this series on rk3399 evb board and works well. Tested-by: Sugar Zhang <sugar.zh...@rock-chips.com> 在 4/14/2017 22:35, Alexander Kochetkov 写道: Hello! This series contain free running cyclic transfer implementation for pl330. It affect ALL chips using

Re: [PATCH 0/2] Free running cyclic transfer implementation for pl330

2017-04-17 Thread sugar
Hi Alexander, I have tested this series on rk3399 evb board and works well. Tested-by: Sugar Zhang 在 4/14/2017 22:35, Alexander Kochetkov 写道: Hello! This series contain free running cyclic transfer implementation for pl330. It affect ALL chips using pl330 (not only rockchip) and allow

[PATCH v3] ASoC: rockchip: spdif: restore register during runtime_suspend/resume cycle

2016-09-07 Thread Sugar Zhang
when step into runtime_suspend, spdif pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Changes in v3: - remove unneeded initialization Changes in v2: - remove system suspend/resume and r

[PATCH v3] ASoC: rockchip: spdif: restore register during runtime_suspend/resume cycle

2016-09-07 Thread Sugar Zhang
when step into runtime_suspend, spdif pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang --- Changes in v3: - remove unneeded initialization Changes in v2: - remove system suspend/resume and restore register in runtime_suspend

[PATCH v3] ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle

2016-09-07 Thread Sugar Zhang
when step into runtime_suspend, i2s pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Changes in v3: - remove unneeded initialization Changes in v2: - remove system suspend/resume and r

[PATCH v3] ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle

2016-09-07 Thread Sugar Zhang
when step into runtime_suspend, i2s pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang --- Changes in v3: - remove unneeded initialization Changes in v2: - remove system suspend/resume and restore register in runtime_suspend

[PATCH v2] ASoC: rockchip: spdif: restore register during runtime_suspend/resume cycle

2016-09-05 Thread Sugar Zhang
when step into runtime_suspend, spdif pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Changes in v2: - remove system suspend/resume and restore register in runtime_suspend/resume pe

[PATCH v2] ASoC: rockchip: spdif: restore register during runtime_suspend/resume cycle

2016-09-05 Thread Sugar Zhang
when step into runtime_suspend, spdif pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang --- Changes in v2: - remove system suspend/resume and restore register in runtime_suspend/resume per Doug Anderson's suggestion sound/soc

[PATCH v2] ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle

2016-09-05 Thread Sugar Zhang
when step into runtime_suspend, i2s pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Changes in v2: - remove system suspend/resume and restore register in runtime_suspend/resume per Doug Ande

[PATCH v2] ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle

2016-09-05 Thread Sugar Zhang
when step into runtime_suspend, i2s pd will be disabled and loss state. so need to restore register when runtime_resume. Signed-off-by: Sugar Zhang --- Changes in v2: - remove system suspend/resume and restore register in runtime_suspend/resume per Doug Anderson's suggestion sound/soc

[PATCH] ASoC: rockchip: implement system suspend/resume for spdif

2016-07-04 Thread Sugar Zhang
restore hw registers after power loss during a suspend/resume cycle. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- sound/soc/rockchip/rockchip_spdif.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sou

[PATCH] ASoC: rockchip: implement system suspend/resume for spdif

2016-07-04 Thread Sugar Zhang
restore hw registers after power loss during a suspend/resume cycle. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_spdif.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/sound/soc/rockchip/rockchip_spdif.c b/sound/soc/rockchip/rockchip_spdif.c

[PATCH] ASoC: rockchip: implement system suspend/resume for i2s

2016-07-04 Thread Sugar Zhang
restore hw registers after power loss during a suspend/resume cycle. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- sound/soc/rockchip/rockchip_i2s.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sou

[PATCH] ASoC: rockchip: implement system suspend/resume for i2s

2016-07-04 Thread Sugar Zhang
restore hw registers after power loss during a suspend/resume cycle. Signed-off-by: Sugar Zhang --- sound/soc/rockchip/rockchip_i2s.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c index

Re: [PATCH 1/2] ASoC: rockchip: i2s: separate capture and playback

2016-05-02 Thread sugar
Hi John, On 4/30/2016 15:00, John Keeping Wrote: Hi Enric, On Fri, Apr 29, 2016 at 04:59:27PM +0200, Enric Balletbo Serra wrote: 2015-12-09 11:32 GMT+01:00 John Keeping : If we only clear the tx/rx state when both are disabled it is not possible to start/stop one multiple

Re: [PATCH 1/2] ASoC: rockchip: i2s: separate capture and playback

2016-05-02 Thread sugar
Hi John, On 4/30/2016 15:00, John Keeping Wrote: Hi Enric, On Fri, Apr 29, 2016 at 04:59:27PM +0200, Enric Balletbo Serra wrote: 2015-12-09 11:32 GMT+01:00 John Keeping : If we only clear the tx/rx state when both are disabled it is not possible to start/stop one multiple times while the

[PATCH v2] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-11 Thread Sugar Zhang
There are 3 i2s sdio pins, which iomux mode is as follows: - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need to configure these pins' iomux mode via the GRF register when use multi channel playback/capture. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Changes in v2: - fix

[PATCH v2] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-11 Thread Sugar Zhang
There are 3 i2s sdio pins, which iomux mode is as follows: - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need to configure these pins' iomux mode via the GRF register when use multi channel playback/capture. Signed-off-by: Sugar Zhang --- Changes in v2: - fix a typo error. as suggested by Heiko

Re: [PATCH] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-10 Thread sugar
Hi Heiko, Got it, thanks for your advice, these will be done in next version. On 4/9/2016 01:14, Heiko Stuebner Wrote: Hi, Am Mittwoch, 6. April 2016, 16:38:22 schrieb Sugar Zhang: There are 3 i2s sdio pins, which iomux mode is as follows: - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need

Re: [PATCH] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-10 Thread sugar
Hi Heiko, Got it, thanks for your advice, these will be done in next version. On 4/9/2016 01:14, Heiko Stuebner Wrote: Hi, Am Mittwoch, 6. April 2016, 16:38:22 schrieb Sugar Zhang: There are 3 i2s sdio pins, which iomux mode is as follows: - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need

Re: [PATCH] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-08 Thread sugar
Hi Rob, On 4/8/2016 01:58, Rob Herring Wrote: On Wed, Apr 06, 2016 at 04:38:22PM +0800, Sugar Zhang wrote: There are 3 i2s sdio pins, which iomux mode is as follows: s/i2s sdio/I2S\/SDIO muxed/ - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need to configure these pins' iomux mode via

Re: [PATCH] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-08 Thread sugar
Hi Rob, On 4/8/2016 01:58, Rob Herring Wrote: On Wed, Apr 06, 2016 at 04:38:22PM +0800, Sugar Zhang wrote: There are 3 i2s sdio pins, which iomux mode is as follows: s/i2s sdio/I2S\/SDIO muxed/ - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need to configure these pins' iomux mode via

[PATCH] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-06 Thread Sugar Zhang
There are 3 i2s sdio pins, which iomux mode is as follows: - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need to configure these pins' iomux mode via the GRF register when use multi channel playback/capture. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- .../devicetree/bindings

[PATCH] ASoC: rockchip: i2s: configure the sdio pins' iomux mode

2016-04-06 Thread Sugar Zhang
There are 3 i2s sdio pins, which iomux mode is as follows: - sdi3_sdo1 - sdi2_sdo2 - sdi1_sdo3 we need to configure these pins' iomux mode via the GRF register when use multi channel playback/capture. Signed-off-by: Sugar Zhang --- .../devicetree/bindings/sound/rockchip-i2s.txt | 5

[PATCH] ASoC: rt5640: Correct the digital interface data select

2016-03-19 Thread Sugar Zhang
this patch corrects the interface adc/dac control register definition according to datasheet. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- sound/soc/codecs/rt5640.c | 2 +- sound/soc/codecs/rt5640.h | 36 ++-- 2 files changed, 19 insertions(

[PATCH] ASoC: rt5640: Correct the digital interface data select

2016-03-19 Thread Sugar Zhang
this patch corrects the interface adc/dac control register definition according to datasheet. Signed-off-by: Sugar Zhang --- sound/soc/codecs/rt5640.c | 2 +- sound/soc/codecs/rt5640.h | 36 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git

[PATCH] ASoC: rockchip: add bindings for spdif controller

2016-03-04 Thread Sugar Zhang
this patch add compatible for rk3366/rk3368/rk3399 spdif, these three spdifs share the same type. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 8 ++-- sound/soc/rockchip/rockchip_spdif.c

[PATCH] ASoC: rockchip: add bindings for spdif controller

2016-03-04 Thread Sugar Zhang
this patch add compatible for rk3366/rk3368/rk3399 spdif, these three spdifs share the same type. Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/sound/rockchip-spdif.txt | 8 ++-- sound/soc/rockchip/rockchip_spdif.c| 13 ++--- 2 files

[PATCH] ASoC: rt5640: add master clock handling for rt5640

2016-02-22 Thread Sugar Zhang
enable/disable master clock when codec is active or not. Signed-off-by: Sugar Zhang <sugar.zh...@rock-chips.com> --- Documentation/devicetree/bindings/sound/rt5640.txt | 3 +++ sound/soc/codecs/rt5640.c | 31 ++ sound/soc/codecs/rt

  1   2   >