Commit Graph

609000 Commits

Author SHA1 Message Date
Xing Zheng
1f6bb2da54 ASoC: rockchip: i2s-tdm: set mclk tx/rx rate independently
By default the i2s-tdm supports asymmetric sample rate,
we just set mclk tx or rx during playback or capture.

Change-Id: I1a9786a64b956c68bb5ba8796d2742f5b142b124
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 18:20:49 +08:00
Xing Zheng
d343a4d86a ASoC: rockchip: multicodecs: using stream not clk_id
We need to using stream to know whether is playback
or capture in sys_clk.

Change-Id: If392c0bc6a6b7d9309ca8ee5b33945d42193792e
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 18:20:49 +08:00
Zorro Liu
d1fc73aa94 arm: configs: rockchip_defconfig: enable rk818 charger default
Change-Id: I77d10f15454111995bd27d7a9c40ef252a84ae71
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-05-17 17:00:17 +08:00
Zorro Liu
ca39545e9c arm: dts: rockchip: enable i2c3 for camera of rk3288-th804 board
Change-Id: I7f3a791d5c7f75c87a8c917309c7bbdddea19b80
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2018-05-17 17:00:17 +08:00
Xing Zheng
bad07cca63 ASoC: rockchip: add rockchip,card-name property for multicodecs
Change-Id: I5b38d8f425348947a165079f6863c2f059242d50
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 14:17:30 +08:00
Xing Zheng
4ead0bc4a5 ASoC: rockchip: multicodecs: add parse sound card name
Change-Id: I14e1d79ef248d1348a164aa5f9b2fd251cc1a0a6
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 14:17:14 +08:00
Xing Zheng
b49399f76e ASoC: rockchip: add rockchip,codec-hp-det for multicodecs
Change-Id: I0fdf27207762122a30edc7c0373595f2ef0b597d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 14:16:37 +08:00
Xing Zheng
bec79a02ce ASoC: rockchip: multicodecs: add codec_hp_det feature
This patch supports headphone jack for rockchip multi-
codec machine driver.

And we need to add CONFIG_SND_SOC_RK3308 macro to ensure
compile correct on other SoCs that are without rk3308
codec.

Change-Id: I80d2ca5e269aa62865bd6b9f2da9fc7736bce4c9
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 14:15:15 +08:00
Xing Zheng
1851402c8e ASoC: rk3308_codec: set hpdet_jack from machine driver
The hpdet_jack should be set from external machine
driver.

Change-Id: I5f7e154c084434fa730c2a9ff505bfaa4e404a5f
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 14:12:15 +08:00
Xing Zheng
6f1983d819 clk: rockchip: rk3308: Export clk id for i2s src clocks
Change-Id: I4ba557649a95513d6cfbdb2242a5abb3f3650a61
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-17 14:08:33 +08:00
William Wu
cd023726d7 phy: rockchip-inno-usb2: fix comparison warnings
This patches fixes comparison between signed and unsigned values.

Change-Id: Ie417fdb8092463890a67bce7efa11f3ef20d5871
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-05-17 12:28:06 +08:00
William Wu
59ed3e02eb phy: rockchip-inno-usb2: fix compile warning when !PM_SLEEP
When CONFIG_PM_SLEEP is disabled, we get a warning about
unused functions:

drivers/phy/rockchip/phy-rockchip-inno-usb2.c:1828:12: warning:
'rockchip_usb2phy_low_power_enable' defined but not used

Marking it as __maybe_unused avoids the warning without introducing
an ugly #ifdef.

Change-Id: I644b00eb2b30d9e4b63da46b7f387a7571b0f103
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-05-17 12:04:38 +08:00
Tao Huang
c95036feef PM / devfreq: rockchip_dmc: Fix deadlock between dmcfreq and vop on/off
When change vop status and ddr frequency at the same time,
the following deadlock will happen:

vop no/off                            dmcfreq
vop_crtc_disable                      update_devfreq
->mutex_lock(&vop->vop_lock);         ->mutex_lock(&pd->pmu->mutex);
->pm_runtime_put(vop->dev);           ->mutex_lock(&vop->vop_lock);
  ->mutex_lock(&pd->pmu->mutex);      ...

Use new dmcfreq rwsem to decouple vop and pd driver, and get better
parallelism.

Change-Id: I56a4ee944200826d2a09e3ae8d2f4837f6f769d6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-17 11:43:55 +08:00
Tao Huang
48b41d013e soc: rockchip: power-domain: Fix deadlock between dmcfreq and vop on/off
When change vop status and ddr frequency at the same time,
the following deadlock will happen:

vop no/off                            dmcfreq
vop_crtc_disable                      update_devfreq
->mutex_lock(&vop->vop_lock);         ->mutex_lock(&pd->pmu->mutex);
->pm_runtime_put(vop->dev);           ->mutex_lock(&vop->vop_lock);
  ->mutex_lock(&pd->pmu->mutex);      ...

By set dmc_nb.priority lower than vop to make sure pd notified after vop
to avoid deadlock.

Change-Id: I3ad147e7f5510f2b617efb600b97d8eb5849ee01
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-17 11:42:19 +08:00
Elaine Zhang
23e4b5d1f9 clk: rockchip: rk3288: add SCLK_CRYPTO ID for crypto
Change-Id: I1db324ca4aa6c85fb208a4fbeeef974c46076d5b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-05-17 10:07:11 +08:00
Elaine Zhang
46ae828be9 clk: rockchip: rk3288: mark the aclk_dmac1 as critical clk
crypto and dmac share the same noc clk,
so mark the aclk_dmac1 as critical clk.

Change-Id: I34a4a7cc532a385086679fafb961a47b0a6abc3b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-05-17 10:07:11 +08:00
Elaine Zhang
cfd153a8f5 clk: rockchip: rk3366: mark the aclk_dmac_bus as critical clk
crypto and dmac share the same noc clk,
so mark the aclk_dmac_bus as critical clk.

Change-Id: I02ccdbcb1ce50216daf2578538c8cfee9f6dd9d2
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-05-17 10:07:11 +08:00
Elaine Zhang
296e2a0fb5 clk: rockchip: rk3368: mark the aclk_dmac_bus as critical clk
crypto and dmac share the same noc clk,
so mark the aclk_dmac_bus as critical clk.

Change-Id: Ib0b70bbed3fdefeab7b6f2b5f88350a416e66787
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-05-17 10:07:11 +08:00
William Wu
38c609e302 BACKPORT: phy: rockchip-usb: Add vbus regulator support
On rockchip devices vbus is supplied by a separate power supply,
often through a regulator. Add support for describing the regulator
in device-tree following the same convention as several other usb phy's.

Change-Id: Ib13fa5d9c50cab3dd6711f2e7dd8489a4f06840b
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 9d685ed77b)
2018-05-17 09:59:13 +08:00
William Wu
f8fb8bcd21 BACKPORT: phy: rockchip-usb: add handler for usb-uart functionality
Most newer Rockchip SoCs provide the possibility to use a usb-phy
as passthrough for the debug uart (uart2), making it possible to
for example get console output without needing to open the device.

This patch adds an early_initcall to enable this functionality
conditionally via the commandline and also disables the corresponding
usb controller in the devicetree.

Currently only data for the rk3288 is provided, but at least the
rk3188 and arm64 rk3368 also provide this functionality and will be
enabled later.

On a spliced usb cable the signals are tx on white wire(D+) and
rx on green wire(D-).

The one caveat is that currently the reconfiguration of the phy
happens as early_initcall, as the code depends on the unflattened
devicetree being available. Everything is fine if only a regular
console is active as the console-replay will happen after the
reconfiguation. But with earlycon active output up to smp-init
currently will get lost.

The phy is an optional property for the connected dwc2 controller,
so we still provide the phy device but fail all phy-ops with -EBUSY
to make sure the dwc2 does not try to transmit anything on the
repurposed phy.

Change-Id: Ia9eed5b2b83d88fbeb7aabced689b21f4ea0ca69
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 605df8af33)
2018-05-17 09:59:13 +08:00
William Wu
44b30beec8 phy: rockchip-usb: delete unused functionality
Deleted phy operations for rk336x and rk3399, because they
use Inno USB2.0 PHY, and we have added a new phy driver for
them. This can make our phy driver to stay closer to upstream.

Change-Id: I3b70cd78564c6a9873be88fc19954a8c2f95dd98
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-05-17 09:59:13 +08:00
Tao Huang
e1bcb0e4eb PM / devfreq: rockchip_dmc: no lock dmcfreq->lock on rockchip_dmcfreq_target
It is not necessary to lock/unlock dmcfreq->lock on rockchip_dmcfreq_target.
update_devfreq call target callback with devfreq->lock.
So use rockchip_dmcfreq lock to serializes access to video_info_list only.

Change-Id: I9abd5fa1dfc37740d3fac9983775028dc14b64b5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-17 09:56:53 +08:00
David Wu
14456a86ef ARM:dts: rockchip: rk322x: Config the pwm2 pinctrl with pull up
The default state of pwm2 pin is a pull up, we need to keep it
for the second global reset issue, when pwm2 used for the regulator.

Change-Id: Ibe3487904196464114622dbc10ba270e3cf509d4
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 21:27:26 +08:00
Yu YongZhen
f6fd82d06e arm64: dts: rockchip: rk3308-evb-dmic-pdm: enable acodec
We need acodec to play sound

Change-Id: I3ee4a796447f3b2c36d2f1c867f7a13e135e7c84
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
2018-05-16 17:22:42 +08:00
Putin Lee
cc06fabbcd video/rockchip: rga2: remove flush cache
Change-Id: If00a369f8e945a2f3b73920e6f1ba3cf455b8dfd
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2018-05-16 17:21:37 +08:00
Sugar Zhang
9063d6fd10 ALSA: pcm_dmaengine: always get stream position from DMA driver
This patch fixup that the wrong position when dma desc status
is DONE. even if the desc status is DONE, it is still able to
get the position from the dma driver. so, just remove the judgement.

Change-Id: I40e92bae09a002f4f5f0b2fab8b0e99fd3ee269d
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-05-16 17:15:38 +08:00
Nickey Yang
04b4744396 ARM: dts: rk3288: enable ddr frequency scaling for linux evb
Enable dmc and dfi nodes to support ddr frequency
scaling on rk3288-evb-linux board.

Change-Id: I578b7dcace09a337abf9c7f640786db588ff9406
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-05-16 15:39:53 +08:00
Nickey Yang
f6d3e97ab5 ARM: configs: rockchip_linux: enable rockchip dmc
Change-Id: I7f078a8753b777c6e4a31dff426e97caf8319a5e
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-05-16 15:39:47 +08:00
Nickey Yang
7327c3fd72 arm: dts: rk3288: add dfi and dmc device nodes in linux
Add dfi and dmc nodes in the device tree for the ARM rk3288 SoC.
To support ddr frequency scaling function, we need enable dmc and
dfi nodes.

Change-Id: I2ec7c216647443ec4354d282fd8f321f9d399929
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-05-16 15:39:41 +08:00
Nickey Yang
b24a90bb35 arm: dts: rk3288: add needed nodes for trust in linux
This patch adds needed nodes for trust in rk3288-linux:

1.Add psci v1.0 support to call into secure world
  through psci APIs.

2.Use non-secure dmac instead of secure one.

3.Use new efuse compatible to match secure interface
  when kernel is in no-secure mode.

Change-Id: Id7fda3144388661979149cfa00822106b2872712
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-05-16 15:39:36 +08:00
Yu YongZhen
8f80fed8ed arm64: dts: rockchip: rk3308: fix mute key to micmute for evb
Change-Id: Ic539d0816b2ffb5767a598e14d34d92b85beaaa1
Signed-off-by: Yu YongZhen <yuyz@rock-chips.com>
2018-05-16 15:31:13 +08:00
Heiko Stuebner
9476cd4af4 UPSTREAM: pinctrl: rockchip: Add iomux-route switching support for rk3288
The rk3288 also has one function that can be routed to one of two pins,
the hdmi cec functionality can use either gpio7c0 or gpio7c7.
So add the route switching support for it.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: David Wu <david.wu@rock-chips.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 4e96fd3042)

Change-Id: Id9fa17392a299a5a4035db5157946c150a5ab55e
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 15:22:24 +08:00
David Wu
fc2d8382ea pinctrl: rockchip: Add rv1108 recalculated iomux support
The pins from GPIO1A0 to GPIO1B1 are special, need to recalculate
iomux. And the register offset is larger than the u8 range, so changed
to u32.

Change-Id: I4b759f1ae7bf959bfb1a3a7a0374ea3492b9af4c
Signed-off-by: David Wu <david.wu@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-05-16 15:22:02 +08:00
Andy Yan
2747bd6813 pinctrl: rockchip: add input schmitt support for rv1108
Some pins like i2c SCL/SDA need the schmitt input function
to avoid crosstalk problems.

Change-Id: I015220c75f8fa6ce684cb47153f16a4bf9ecf3f0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 15:21:42 +08:00
Andy Yan
0c9e8ab1db pinctrl: rockchip: rename RK1108 to RV1108
Rockchip finally named the SOC as RV1108, so change it.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
[adapted rk1108 dtsi to keep bisectability]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Change-Id: Id2c7584106424724a29f8de220f0961d86473fcb
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 15:21:21 +08:00
Andy Yan
5923d0f068 pinctrl: rockchip: add support for rk1108
This add pinctrl support for Rockchip RK1108 Soc.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>

Series-changes: 2
- add pull and drive-strength functionality

Series-changes: 3
- two minor CodingStyle fixes adviced by Heiko
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Change-Id: If1e886606b561bef251d5e75b0e8c289cf7c9db0
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 15:20:51 +08:00
Paul Gortmaker
aa4192c748 UPSTREAM: pinctrl: rockchip: make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/Kconfig:config PINCTRL_ROCKCHIP
drivers/pinctrl/Kconfig:        bool

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

Note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-gpio@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 2f4362040b)

Change-Id: Ib164be5843323add47f8b103b16dbf8275ed21cd
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 15:19:54 +08:00
Arnd Bergmann
c79693f380 UPSTREAM: pinctrl: fix incorrect inline keyword in multiple drivers
When building with 'make W=1', we get harmless warnings about
five drivers in drivers/pinctrl, which all contain a copy of
the same line:

drivers/pinctrl/freescale/pinctrl-imx1-core.c:160:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]

This replaces the somewhat nonstandard 'static const inline'
with 'static inline const', which has the same meaning but
does not cause this warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
(cherry picked from commit 56411f3c05)

Change-Id: I3f17511a23e5912af9a68c5a090a6f1e0b04d183
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 15:19:38 +08:00
David Wu
d2dbd60894 PM / AVS: rockchip-io: Define the px30-specific supply names
Also define the px30-specific supply names as can be seen in that
file for the other socs.

vccio-oscgpi ... aka with a "-" instead of "_".

Change-Id: I465e18123211b567f14d10e9705d9194fdfbd33b
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 15:18:25 +08:00
David Wu
5b78623c02 PM / AVS: rockchip-io: add io selectors and supplies for RV1108
This adds the necessary data for handling io voltage domains on the RV1108.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 9d913e4343)

Change-Id: I068e5b0b9515775726c0429f0be97413d573e7c7
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-05-16 12:02:14 +08:00
Tao Huang
3bf64cbe1e PM / devfreq: rockchip_dmc: build depends on CPU config
Also fixed minor CodingStyle errors.

Change-Id: I46b9638d095aca8df73a8390638b5ce6d801b5fa
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-05-15 18:19:31 +08:00
Sandy Huang
50613be3c7 drm/rockchip: vop: set frame start to field start for interlace mode
In interlace mode(480i60hz) the frame rate is 30hz, this is too low and
lead to CTS test failed, so we use field start interrupt instead of
frame start, and the vsync will update to 60hz.

Change-Id: If73fb2b04dbd6749cc7cf899234a9f1e2283519e
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-05-15 17:10:17 +08:00
Ziyuan Xu
ce310133c0 arm64: dts: rockchip: support rk3308 AI-VA demo board
Change-Id: Ieca68048c5b8bb41e3e9a8524a46e59f4e88bc40
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-05-15 14:32:27 +08:00
Ziyuan Xu
c53382d33d arm64: dts: rockchip: support rk3308-evb-v11 boards
Change-Id: I9784a44bd0ab33f4ab8fade9b769049bb3d17c6c
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-05-15 11:24:12 +08:00
Ziyuan Xu
aed95973ab leds: leds-is31fl32xx: add suspend & resume support
This patch could reduce the power consumption almost 2ma@5v on
rk3308-evb-v10 boards.

Change-Id: I4ee94524427eda72b0f5b61be46cd7a6d3f6a17d
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-05-15 10:57:46 +08:00
Xing Zheng
e7c2b203f6 ASoC: rockchip: i2s-tdm: remove symmetric_rates by default
There are independent LRCK_RX and LRCK_TX in rockchip i2s-tdm,
so that it supports the asymmetric LRCKs when the CKR[29:28]
is 2'b00.

Change-Id: Ib06d1b833e23d4266f8606d5f1f261cf1357238d
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-05-14 19:39:58 +08:00
William Wu
8c6207b121 FROMLIST: usb: dwc2: fix isoc split in transfer with no data
If isoc split in transfer with no data (the length of DATA0
packet is zero), we can't simply return immediately. Because
the DATA0 can be the first transaction or the second transaction
for the isoc split in transaction. If the DATA0 packet with no
data is in the first transaction, we can return immediately.
But if the DATA0 packet with no data is in the second transaction
of isoc split in transaction sequence, we need to increase the
qtd->isoc_frame_index and giveback urb to device driver if needed,
otherwise, the MDATA packet will be lost.

A typical test case is that connect the dwc2 controller with an
usb hs Hub (GL852G-12), and plug an usb fs audio device (Plantronics
headset) into the downstream port of Hub. Then use the usb mic
to record, we can find noise when playback.

In the case, the isoc split in transaction sequence like this:

- SSPLIT IN transaction
- CSPLIT IN transaction
  - MDATA packet (176 bytes)
- CSPLIT IN transaction
  - DATA0 packet (0 byte)

This patch use both the length of DATA0 and qtd->isoc_split_offset
to check if the DATA0 is in the second transaction.

Change-Id: Ie36cf25c4026f45db719c6eed036028159748b9f
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10393777/)
2018-05-14 19:38:11 +08:00
William Wu
4a52e0955b FROMLIST: usb: dwc2: alloc dma aligned buffer for isoc split in
The commit 3bc04e28a0 ("usb: dwc2: host: Get aligned DMA in
a more supported way") rips out a lot of code to simply the
allocation of aligned DMA. However, it also introduces a new
issue when use isoc split in transfer.

In my test case, I connect the dwc2 controller with an usb hs
Hub (GL852G-12), and plug an usb fs audio device (Plantronics
headset) into the downstream port of Hub. Then use the usb mic
to record, we can find noise when playback.

It's because that the usb Hub uses an MDATA for the first
transaction and a DATA0 for the second transaction for the isoc
split in transaction. An typical isoc split in transaction sequence
like this:

- SSPLIT IN transaction
- CSPLIT IN transaction
  - MDATA packet
- CSPLIT IN transaction
  - DATA0 packet

The DMA address of MDATA (urb->dma) is always DWORD-aligned, but
the DMA address of DATA0 (urb->dma + qtd->isoc_split_offset) may
not be DWORD-aligned, it depends on the qtd->isoc_split_offset (the
length of MDATA). In my test case, the length of MDATA is usually
unaligned, this cause DATA0 packet transmission error.

This patch use kmem_cache to allocate aligned DMA buf for isoc
split in transaction. Note that according to usb 2.0 spec, the
maximum data payload size is 1023 bytes for each fs isoc ep,
and the maximum allowable interrupt data payload size is 64 bytes
or less for fs interrupt ep. So we set the size of object to be
1024 bytes in the kmem cache.

Change-Id: If842ad1b6ff2d59e4b8e5bb444246a1e6a8a3a85
Signed-off-by: William Wu <william.wu@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
(am from https://patchwork.kernel.org/patch/10393775/)
2018-05-14 19:38:11 +08:00
Elaine Zhang
32c3a8cf9c clk: rockchip: rk3288: export PCLK_PD_PMU and PCLK_PD_ALIVE clock id
Change-Id: Ie0550d9528367fa070328562fad2e597a5d6d7f7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-05-14 16:21:11 +08:00
Elaine Zhang
6e06c1b833 clk: rockchip: rk3399: export CIF_OUT_SRC clock id for cif
Change-Id: I77423891821dae0412dda4414222ba64bd0a4a4a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-05-14 16:21:11 +08:00