When system shutdown, shutdown interface will be called.
Hdmi should be disabled when system shutdown.
Change-Id: I09ec1d7d3801bf8a8277c91072fa09bd1b430809
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
When system shutdown, shutdown interface will be called.
TVE should be disabled when system shutdown.
Change-Id: If9dd29605cc0bd67aa8e9c494a98f89e625e4c50
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
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.
Change-Id: I9bfc055e792d73a66f51c78c7c2ff5c4cba620ae
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch marks RXFIFO_DATA as precious to avoid being read
outside a call from the driver, such as regmap debugfs
Change-Id: Id94a3d6f4ea382fc09547241dabc6ab84ca74139
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch marks SPDIFRX_SMPDR as precious to avoid being read
outside a call from the driver, such as regmap debugfs.
Change-Id: Icc5398e0e192b86e191770b9ebd1251f97e6a048
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch marks SPDIF_SMPDR as volatile to make it resaonable,
which also requires marking it as readable, even though it isn't.
Change-Id: Ia59136a4d7a9a3984d4f4b2518f835ead7419aec
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch adds grf configs to fix the clk paths
when used in tx/rx only slave mode.
Change-Id: I704687d86f1e8c25181d1e87e00107560c9e36fe
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
When restoring registers during runtime resume, we must not write to
I2S_TXDR which is the transmit FIFO as this queues up a sample to be
output and pushes all of the output channels down by one.
This can be demonstrated with the speaker-test utility:
for i in a b c; do speaker-test -c 2 -s 1; done
which should play a test with through the left speaker three times but if
the I2S hardware starts runtime suspended the first sample will be played
through the right speaker.
Fix this by marking I2S_TXDR as volatile (which also requires marking it
as readable, even though it technically isn't). This seems to be the
most robust fix, the alternative of giving I2S_TXDR a default value is
more fragile since it does not prevent regcache writing to the register
in all circumstances.
While here, also fix the configuration of I2S_RXDR and I2S_FIFOLR; these
are not writable so they do not suffer from the same problem as I2S_TXDR
but reading from I2S_RXDR does suffer from a similar problem.
Change-Id: Id91d3f54f3fda0e9140c9da162b0dff2c3df067b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
When restoring registers during runtime resume, we must not write to
I2S_TXDR which is the transmit FIFO as this queues up a sample to be
output and pushes all of the output channels down by one.
This can be demonstrated with the speaker-test utility:
for i in a b c; do speaker-test -c 2 -s 1; done
which should play a test through the left speaker three times but if the
I2S hardware starts runtime suspended the first sample will be played
through the right speaker.
Fix this by marking I2S_TXDR as volatile (which also requires marking it
as readable, even though it technically isn't). This seems to be the
most robust fix, the alternative of giving I2S_TXDR a default value is
more fragile since it does not prevent regcache writing to the register
in all circumstances.
While here, also fix the configuration of I2S_RXDR and I2S_FIFOLR; these
are not writable so they do not suffer from the same problem as I2S_TXDR
but reading from I2S_RXDR does suffer from a similar problem.
Change-Id: I47e67b51f8251486bb5e937619fdec89fc055f14
Fixes: f0447f6cbb ("ASoC: rockchip: i2s: restore register during runtime_suspend/resume cycle", 2016-09-07)
Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
(cherry picked from commit c66234cfed)
This patch adds the reset property for reset mechanism.
Change-Id: Ia60cc1f140860613b35ec42d703094bff8b46893
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch brings i2s back to normal by resetting i2s m/h
logic if i2s' clear operation is failed.
Change-Id: I2fd47039b522ac89499b4a2912d5ffb7a469e75e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch brings i2s back to normal by resetting i2s tx/rx
relative logic if i2s' clear operation is failed.
Change-Id: I52e4713d26f781962278802bd1f9bbce3fe4b751
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
On RK3399/RK3399Pro platforms, We found that when USB 3.0
read/write at the same time in the following test case,
it may easily fail to transfer data with unknown problem.
Host transfer: 24B, 4MB, 4MB, 4MB
Device transfer : 24B, 4MB, 4MB, 4MB
Both Host and Device transfer "24B, 4MB, 4MB, 4M" Repeatedly
until transfer fail.
This patch adds 150us between the 24B and 4MB data to work
around the transfer issue. This patch may affect the USB 3.0
transmission performance, so we mark it as a HACK. We can
revert this patch if we find the root cause and fix this
issue with more reasonable patches.
Change-Id: Iff923ff895396a41a87e6a7df2bfa0072a13e2fc
Signed-off-by: William Wu <william.wu@rock-chips.com>
Some hardware need to translate scaling list table address to u32
address in register. The dma_addr_t on 64bit kernel will cause
overwriting to later register file.
Change-Id: Ib01d8e260b3e83dabafc13b3bfac02595faa6d63
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
GPIO0_C4 is used for lcd_en,not for backlight_en.
So fix it.
Change-Id: Id38ea83d65c91e2d7772d79caa6bad84a5d4398c
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This patch adds a new flag pullups_connected to avoid
set pullup twice. It can help to fix the issue that
usb disconnect and reconnect again if we set pullup on
twice when usb connect to PC.
Change-Id: I756448cee9d2377695681d0394fada51a0c208f4
Signed-off-by: William Wu <william.wu@rock-chips.com>
The rockchip IQ tool uses the data buf of the uvc_request_data
to send vendor specific uvc control data to uvc host, or receive
data from uvc host. The max data payload maybe 4096 bytes, so we
increase the data buf of uvc_request_data to 4096, and also change
the UVC_MAX_REQUEST_SIZE to 4100 correspondingly.
Change-Id: I9820a5f531a655eb53232096fad131ad7a05e349
Signed-off-by: William Wu <william.wu@rock-chips.com>
The rockchip IQ tool sends data via usb uvc. The data buf
of v4l2_event is used for IQ tool userspace on uvc device
side to receive vendor specific data from host, the max
length of data maybe 4096 bytes, so increase the data length
of v4l2_event to 4100.
I have already tested the usb host uvc function, it works
well with this patch.
Note:
The userspace need to update the data length of v4l2_event
to 4100 synchronously.
Change-Id: I1a4673d50137760e190a17c6981740952fac2ca7
Signed-off-by: William Wu <william.wu@rock-chips.com>
When building with the USB_CONFIGFS_F_UVC_ROCKCHIP, set the
default CONFIG_FRAME_WARN to 5120, since Rockchip UVC need
4096 bytes for UVC request data buffer, grow beyond 2048 bytes
stack size.
Change-Id: I2df8892b8e0c930053be0154609ccc1558318b33
Signed-off-by: William Wu <william.wu@rock-chips.com>
This patch adds support to use uvc for Rockchip ISP IQ tool
which needs large data buf of the uvc_request_data to send
vendor special uvc control data to uvc host.
Change-Id: I22b65c4f28d69b50f6bbb41124f3342b8c4c7c19
Signed-off-by: William Wu <william.wu@rock-chips.com>
The average value of dynamic-power-coefficient is about 74.
Change-Id: Id80521440e0cbdb677344bf5becf092e4311c499
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This reverts commit 4ef2449889.
The description for CRU_EMMC/SDMMC/SDIO_CON[0/1] is jumble on
chapters, make it clear that the correct shift is 1 that from
IC engineer.
Change-Id: I48dce293ec6ef82a5c78db38efc083227776ea99
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
use V4L2_CID_TEST_PATTERN to enable test mode of sensor
Change-Id: I8a27d4ae072baecf62efb39d782bdfee897cc7bf
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>