The spi_enable_chip function takes a boolean
argument. Change the type to reflect that.
Change-Id: I71f016d0cbbb6a77cda3e10e8bb7da45b227b1c9
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 30688e4e67)
Let the dma/non-dma code paths handle the spi enable
flag themselves. This removes some logic to determine
if the flag should be turned on before or after dma
and also don't leave the spi enabled if the dma path
fails.
Change-Id: I406fc1726fa6e6f5a2e82f05e3313f0ee4dc415c
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a3c174021c)
The dma direction for the tx and rx dma channels never
change, so just use the constants directly rather
than storing them in device data.
Change-Id: Ic6a45d38d076b6c73177dc6dde78e62b0de2ce42
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit d9071b7e9f)
The driver data has a u32 field use_dma which is
only ever used as a boolean, so change its type
to reflect that.
Change-Id: Icf9aa668cc86b9ea87e2eb6e2d7eef6fed530cda
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit f340b92051)
We no longer need the dma_caps since the dma driver
already clamps the burst length to the hardware limit,
so don't request and store dma_caps in device data.
Change-Id: I10782f7ffb700322929f819703c41e6c63ff8d78
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 058f7c509e)
This reverts commit 87ec170ff7 which is
commit d065f41a3f upstream.
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Change-Id: If48d08ec8e51829bb6bf8050d377c7060b75e140
This reverts commit 846019f5fa which is
commit 810923f3bf upstream.
Upstream add wait_for_completion_interruptible to hold SPI transfer
in SPI slave work, so it support SPI slave IRQ or DMA transfer.
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Change-Id: Ie0202b0d2d7b9ff7bfc462587c2fc643155549f1
This patch handle the clk by pm runtime mechanism to simplify
the clk management.
Change-Id: I38ddb6345599ab737b42d787209d01c2d3f82483
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Fixes: a109506620 ("drm/rocckhip: driver: add support dmc and use rockchip atomic_commit")
Change-Id: I5c16f4bc6887910e2f752ba29c618d0e583f616f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
The USB2.0 OTG PHY of RV1126/1109 which is designed for lower power
consumption provides only 8.8mA current source on DM. Multiplied
by 45 Ohm host termination resistance, voltage is about 400mV.
If the threshold voltage of host is greater than 400mV, the high
speed handshake will fail and SoC communicate at full speed. So
swing calibration is necessary.
We use gpio to control the 220 Ohm pull-up resistor to provide additional
current. Experiments show that the voltage of chirpK can be increases
to about 600mV.
Signed-off-by: Ren Jianing <jianing.ren@rock-chips.com>
Change-Id: Ibb0cba2b166f0370d2822ca5a3a7277ffacde8c1
There is no uboot in the thunder boot flow,
So disable logo for kernel display drivers fully initialized
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ib6d36fc606dd8a4170a0a12c0800768d4f2af64a
If the regulator is enabled, don't have to enable it again.
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I293b9002b6373f977313b410709b0e9ad916243d
When initcall_nr_threads=-1, the number of threads set to
num_online_cpus() * 2.
Save boot time about 16ms on rv1126-evb-ddr3-v12 board.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I907d03ac21f9e7a74a71ff06385543c0f0fc8c47
If 'rockchip_pm_add_one_domain' fails, then 'qos_is_need_init[0]'
should be freed, otherwise, there is a memory leak.
Fixes: 2047231d24 ("soc: rockchip: power-domain: support qos init")
Change-Id: Id2ec5c4b7cbc53a5491f348eeba1fd526018875d
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Instead of open coding the polling of the lock status, use the
handy regmap_read_poll_timeout for this. As the pll locking is
normally blazingly fast and we don't want to incur additional
delays, we're not doing any sleeps similar to for example the imx
clk-pllv4 and define a very safe but still short timeout of 1ms.
Link: https://lore.kernel.org/r/20200129163821.1547295-2-heiko@sntech.de
(cherry picked from commit 3507df1a46
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next)
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I39fe50d701580532f9a994266e088a909a98c985
Instead of open coding the polling of the lock status, use the handy
readl_relaxed_poll_timeout for this. As the pll locking is normally
blazingly fast and we don't want to incur additional delays, we're
not doing any sleeps similar to for example the imx clk-pllv4
and define a very safe but still short timeout of 1ms.
Link: https://lore.kernel.org/r/20200129163821.1547295-1-heiko@sntech.de
(cherry picked from commit bf4237a188
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next)
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I291bd7085e628a22bbe3877fd4961498c58c4d85
The rk3036 pll type exposes its lock status in both its pllcon registers
as well as the General Register Files. To remove one dependency convert
it to the "internal" lock status, similar to how rk3399 handles it.
Link: https://lore.kernel.org/r/20200129163821.1547295-3-heiko@sntech.de
(cherry picked from commit 7f6ffbb885
git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next)
Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I1e1d1c96dacf936b8f314ba246b4dd8bf4d8b8a9
add support following color space:
V4L2_COLORSPACE_SMPTE240M
V4L2_COLORSPACE_470_SYSTEM_M
V4L2_COLORSPACE_470_SYSTEM_BG
now can support following color space:
bt601 limit:
V4L2_COLORSPACE_SMPTE170M
V4L2_COLORSPACE_470_SYSTEM_M
V4L2_COLORSPACE_470_SYSTEM_BG
bt601 full:
V4L2_COLORSPACE_JPEG
bt709 limit:
V4L2_COLORSPACE_SMPTE240M
V4L2_COLORSPACE_REC709
V4L2_COLORSPACE_DEFAULT
bt2020:
V4L2_COLORSPACE_BT2020
Change-Id: Ia51b7aa9959f69efdd8bad3371395b2fceaccaaa
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This patch enable the logo function of DSI.
At the same time, when the panel is initialized in uboot,
We need set the power boot on to avoid black screen.
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I258b395ca676b8a3b41cd23e5db442c521256063