Commit Graph

615072 Commits

Author SHA1 Message Date
XiaoDong Huang
7be8a2eb28 arm64: dts: rockchip: rk3368: change default sleep mode to RKPM_SLP_ARMOFF
The power consumption is no visible difference between RKPM_SLP_ARMOFF_LOGPD
mode and RKPM_SLP_ARMOFF mode. But RKPM_SLP_ARMOFF_LOGPD mode will cost
more time in suspend/resume flow. So we'd better use RKPM_SLP_ARMOFF in
most products. Here, we change RKPM_SLP_ARMOFF_LOGPD to RKPM_SLP_ARMOFF
in dtsi, that's a good way to make most products to use RKPM_SLP_ARMOFF.

Change-Id: Iec541a6831022ded2dad4298fc470bec7bd978f6
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2018-12-29 14:17:59 +08:00
Weixin Zhou
a731f1a3c4 arm64: dts: rockchip: correct gmac phy_reset pin for 3399pro v10/v11 evb
Change-Id: Ibf63f5d5236ed3a196342f58370e4112fe5c0117
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-12-29 14:14:47 +08:00
Tony
085cd974b7 arm64: dts: rockchip: Fix typo and remove deprecated property for rk3328
clock-freq-min-max is deprecated, replacing with max-frequency.
changing "ciu-drv" to "ciu-drive", appears to be a typo.

Change-Id: I40218e6ea800aa983f22007e23e04e6364635dbe
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-29 14:12:33 +08:00
Elaine Zhang
35ae31482a thermal: rockchip: add pinctrl control
Based on the TSADC Tshut mode to select pinctrl,
instead of setting pinctrl based on architecture
(Not depends on pinctrl setting by "init" or "default").
And it requires setting the tshut polarity before select pinctrl.

Change-Id: Iac9ca05073b0181ee13b0048d0c2a54204f82bca
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-29 10:18:46 +08:00
Leo Wen
75b880e190 arm64: rk3326_linux_defconfig: add pvtm support
Change-Id: I5ff420df671342d3ef01323a0377c5f57aed106a
Signed-off-by: Leo Wen <leo.wen@rock-chips.com>
2018-12-29 09:29:31 +08:00
Shunqing Chen
e06f7bb5fb drm/bridge: synopsys: dw-hdmi: set hdcp keepout active
Change-Id: Ie5718479bb267238c5461f3ed203ae43d75c46de
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-12-29 09:28:01 +08:00
Weixin Zhou
f13970e138 arm64: dts: rockchip: set sdmmc power off in suspend for rk3399pro evb
The vccio_sd keepon in suspend will causes 10ma power consumption to
increase if there is no serial cable connection.

Set vccio_sd and vcc_sd power off in suspend for rk3399pro evb v10/v11.

Change-Id: I935de4028bea5d03a0397b81bd63c99757155b4d
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-12-28 20:20:25 +08:00
Leo Wen
fb93d19476 ASoC: rockchip: rk817-codec: Add support S32_LE
Change-Id: I850fb7a2745320ff4e325905cdf2cab625419977
Signed-off-by: Leo Wen <leo.wen@rock-chips.com>
2018-12-28 20:20:25 +08:00
Kever Yang
c1cf9c6b8d rockchip: sip: add static inline for sip_smc_lastlog_request()
Add static inline for sip_smc_lastlog_request() when
CONFIG_ROCKCHIP_SIP is not enabled.

Change-Id: I8fe46c36b115b4aa8a71a4101a7829e64aa08103
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-28 20:20:25 +08:00
shengfei Xu
ef95127303 power: rk817-battery: support rk809
A “battery fuel gauge” is integrated in the RK809. Using
the proprietary algorithms and the sensed battery current
and voltage, the gauge can accurately calculate the battery
capacity based on the charging/discharging characteristics
of the battery preloaded in the system. The gauge then sends
the battery capacity information to the processor through
the I2C interface.

Change-Id: I0be1f9ef48285c17d599753d65161e79b0a4c95a
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
2018-12-28 17:08:47 +08:00
Algea Cao
249a6b8d19 drm/bridge: synopsys: dw-hdmi: Remove hpd_state judgment of atomic_begin and atomic_flush
There is no need to judge hpd status in atomic_begin and atomic_flush.
And this judgment may cause display error if TV make hpd status change
frequently.

Change-Id: I2ed87ef42b78a8faadc4bcc5b6b16d9390644903
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-12-28 15:15:31 +08:00
Lin Jianhua
04ad899534 arm64: dts: rockchip: rk3308: modify default pinctrl of tsadc from tsadc_otp_out to tsadc_otp_gpio
Some HW connect to peripheral reset circuit,
but uboot first select set pinctrl mode to default,
it result system reboot.

Change-Id: I79453dd4839e846138130e6488aca9c0f419fb38
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
2018-12-27 12:07:09 +08:00
Ziyuan Xu
6df92b2b23 iio: adc: support GPIO-controlled Multiplexers ADC
The rockchip saradc controller is too scanty for some products that is
requires at least x10 channels ADC. Generally, we can use a CMOS analog
switch to extend a multi-channel ADC, eg.sgm3699. It's a quad,
bidirectional, single-pole/double-throw (SPDT) CMOS analog siwtch.

This patch implements a multiplexer ADC controller using a number of
gpio pins and parent ADC channel. It's compatible with most of CMOS
analog switch. And it provides a direct mode to get a raw data of each
muxadc channel.

/sys/bus/iio/devices/iio:device1/
|-- in_voltage_adc_brush_raw
|-- in_voltage_adc_mid_brush_raw
|-- in_voltage_adc_move_l_raw
|-- in_voltage_adc_move_r_raw
|-- in_voltage_qyxs_raw
|-- in_voltage_qzxs_raw
|-- in_voltage_yxs_raw
|-- in_voltage_zxs_raw

Change-Id: If71636d45543430e616299e6a6b91084f4f315e6
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-12-27 12:03:53 +08:00
Finley Xiao
94cb450ab0 arm64: dts: rockchip: Add cpu opp table for rk3399k
Change-Id: Ie26d7ed67ca5f64b35d473421bed18ac7508d403
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-12-27 09:46:01 +08:00
Finley Xiao
b401d94803 arm64: dts: rockchip: rk3399: Add specification serial number for cpu
Change-Id: Ie48b09944ae3b294e3c7666bd9aa68706bdd4ba5
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-12-27 09:46:01 +08:00
Finley Xiao
cd0ae453a5 cpufreq: rockchip: Implement get_soc_info() for rk3399 SoCs
Change-Id: I73519f717e79a1cc4e713e31ba8ee6c78567353f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-12-27 09:46:01 +08:00
Shunqing Chen
f3d13938d8 drm/rockchip: rk618: set HDMI valid modes
Change-Id: I120f08cb3bb7340d1cdde6f50a275eed34e54f4a
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-12-27 09:17:29 +08:00
Cai YiWei
40ce742d63 media: rockchip: isp1: fix isp don't work if default sensor fmt greater than isp max size
Change-Id: I3c757c71ea2ea05b3b0330aa7f8e6eea8295be3a
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-12-27 09:16:30 +08:00
Cai YiWei
3826d6b7e7 media: rockchip: isp1: isp V12 use csi2host
Change-Id: I55e83eb0b5674a968bef99227eacf1c388085844
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-12-27 09:16:30 +08:00
Cai YiWei
cf8f0f9b61 media: rockchip: isp1: update sensor info during streaming
Change-Id: I4813be92f62f258ff97facb9f7658c23fb1f4138
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-12-27 09:16:30 +08:00
Shunqing Chen
a6e9b4bc3f drm/rockchip: rk618: HDMI: add switch dev for audio
Change-Id: If54f7f989bda0130963f307f3781db393225a1be
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-12-27 09:15:47 +08:00
Wyon Bi
d919ba5349 drm/rockchip/rk618: scaler: Fix invalid dsp_frame_hst in calc_dsp_frm_hst_vst()
Change-Id: I58f3193ec910cb8954f7890eac8b5594a2a4ae39
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-12-27 09:08:45 +08:00
zack.zeng
f71d1437a7 media: i2c: add mono sensor sc031gs
Change-Id: I690ba934964fea8c1052ffdf10438016094baac6
Signed-off-by: Yiqing Zeng <zack.zeng@rock-chips.com>
2018-12-26 19:44:04 +08:00
Shunqian Zheng
f091b1ce05 arm64: dts: rockchip: remove regulator-always-on for px30 linux evb
DVP powers are controlled by sensor itself, removing always-on
propertity.

Meanwhile, the vcc_sd is boot-on according to schematic.

Change-Id: I5dbd1eb7a90c589434198d152cc2b9883c8acd24
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-12-26 18:39:41 +08:00
Shunqian Zheng
4144cce74b arm64: dts: rockchip: remove regulator-always-on for rk3326 linux evb
DVP powers are controlled by sensor itself, removing always-on
propertity.

Meanwhile, the vcc_sd is boot-on according to schematic.

Change-Id: I74809672b9ec7ae250243e47e7e700236d5b0839
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2018-12-26 18:39:23 +08:00
Chen Lei
6aacd99ecf clk: rockchip: rk322x: fix wrong mmc phase shift for rk3228
mmc sample shift should be 1 for rk3228, or it will fail
if we enable mmc tuning for rk3228.

Change-Id: I301c2a7d33de8d519d7c288aef03a82531016373
Signed-off-by: Chen Lei <lei.chen@rock-chips.com>
2018-12-26 18:38:02 +08:00
Wenlong Zhuang
a1ed5f4f10 arm64: dts: rockchip: rk1808-evb-x4: enable virtual camera, cif and mipi-dphy-rx
Init resolution 3840x720 and bus format MEDIA_BUS_FMT_SBGGR8_1X8
for virtual camera.

Change-Id: Id45f7deb3896ca230cfd3fc44238c0d62d79416a
Signed-off-by: Wenlong Zhuang <daisen.zhuang@rock-chips.com>
2018-12-26 18:35:22 +08:00
Wenlong Zhuang
652f8e51be arm64: rk1808_linux_defconfig: enable VIDEO_VIRT_CAMERA
Change-Id: Idff2d10c0851bb60288ba1ddd0830855b1b29770
Signed-off-by: Wenlong Zhuang <daisen.zhuang@rock-chips.com>
2018-12-26 18:34:27 +08:00
Wenlong Zhuang
4eea0e08c1 media: i2c: add support for virtual camera
This patch adds a virtual camera to simulate a actual sensor,
in order to power up CIF and MIPI CSI DPHY without connecting
a actual sensor.
The virtual camera include following feature:
- Format: SBGGR8_1X8,SGBRG8_1X8,SGRBG8_1X8,SRGGB8_1X8,
	  SBGGR10_1X10,SGBRG10_1X10,SGRBG10_1X10,SRGGB10_1X10,
	  RGB888_1X24
- Resolution: 1280x720,1920x1080,3840x720,3840x2160,5120x2880
- Link-frequency: 100000000,150000000,200000000,250000000,
		  300000000,350000000,400000000,500000000,
		  600000000,700000000,800000000,900000000,
		  1000000000

Change-Id: I81c9a1ba0271800e38a8f51c9a08e8076ef94d0d
Signed-off-by: Wenlong Zhuang <daisen.zhuang@rock-chips.com>
2018-12-26 18:34:27 +08:00
Wenlong Zhuang
60c62dc23c dt-bindings: media: add bindings for Rockchip virtual camera.
Change-Id: I0933fdb858d7f6fef344279093af8d6f4d41b7e8
Signed-off-by: Wenlong Zhuang <daisen.zhuang@rock-chips.com>
2018-12-26 18:34:27 +08:00
Shunqing Chen
b4a8810527 power: rk81x: fix suspend time error
the time get from do_gettimeofday and rtc_read_time
is different, and more than 80000 seconds.
so after resume the battery level jump down a lot.

Change-Id: Ica616240ce03dff73a65e6f724c28910e1786c81
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-12-26 18:02:11 +08:00
William Wu
9c66895461 phy: rockchip-inno-combphy: fix error codes in rockchip_combphy_xlate
Return ERR_PTR(-ENODEV) if rockchip_combphy_xlate fails to
set phy type. This fixes the usb dwc3 controller probe fail
if the phy type has been set to PCIe. With this patch, the
rk1808 can support PCIe and USB 2.0 at the same time.

Change-Id: I1cd58f720cb361e606f5e2ac761b9ca71ddaa67e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-12-26 15:22:53 +08:00
Nickey Yang
a894b97af8 ARM: dts: rockchip: rk3288-evb-rk808-linux: add cec pinctrl
tested on rk3288-evb-rk808-linux.

The resistance R1036 maybe NC on RK_EVB_RK3288_LPDDR3_V1x
Please check it if you want use the hdmi cec function.

Change-Id: I2533351ea5741b501b25c4c0485dc9246adf11bb
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-26 15:21:21 +08:00
Nickey Yang
99721fd7b5 ARM: dts: rk3288: add clock and pinctl for hdmi cec.
Change-Id: I6de8283516f01093213ea16f0792bcd10fb1af2b
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-26 15:20:49 +08:00
Nickey Yang
7d4444f71c arm64: dts: rockchip: rk3399: don't enable edp_hpd pin by default on soc dtsi
Not all the rk3399 boards use gpio4_c7 pin for edp_hpd.
So this pin should be specified in the board dts.
Without this patch we see below pin conflict when hdmi-cec and edp enabled.

[    0.969331] rockchip-pinctrl pinctrl: pin gpio4-23 already requested by
ff940000.hdmi; cannot claim for ff970000.edp
[    0.969350] rockchip-pinctrl pinctrl: pin-151 (ff970000.edp) status -22
[    0.969361] rockchip-pinctrl pinctrl: could not request pin 151 (gpio4-23)
from group edp-hpd on device rockchip-pinctrl

Change-Id: I324f28ea9f995ee4b84869ac369ab63e0c141cfa
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-26 15:10:36 +08:00
Nickey Yang
7cebf964db arm64: dts: rockchip: rk3399-sapphire-excavator-linux: add cec pinctrl
GPIO4_C7 is used for hdmi-cec since rk3399-sapphire-excavator-v12.

Change-Id: I8c26debdcb1827e067b7a95acf6151160b61e03d
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-26 15:10:31 +08:00
Nickey Yang
117b31c362 BACKPORT: media: cec: move compat_ioctl handling to cec-api.c
All the CEC ioctls are compatible, and they are only implemented
in one driver, so we can simply let this driver handle them
natively.

Change-Id: I04136c171777d5ab23760e20162f0a6197090ca8
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
(cherry picked from commit e6c8320648)
2018-12-26 15:00:12 +08:00
Nickey Yang
6db570b2f5 arm64: config: rockchip_linux: add dw-hdmi cec support.
tested on rk3399-sapphire-excavator-v13.

Change-Id: Ia447dab6941a623a8b6348e25bed3e10a7900fb5
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-26 14:53:49 +08:00
Nickey Yang
0a4bc46c34 ARM: config: rockchip_linux: add dw-hdmi cec support.
this enables dw-hdmi cec support.

tested on rk3288-debian.
  apt-get install v4l-utils
  cec-ctl --playback -o Rockchip -V 0xaabbcc -M -T --cec-version-1.4

Change-Id: I2fb991410c96fe6f9a0d8a9739d89cc3084c23e8
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
2018-12-26 14:45:44 +08:00
Lin Huang
93508a73d5 arm64: config: add rk1808_x4_linux_defconfig
Change-Id: I64f839fa95ab8a4fac77f1b6a9b0527971b60403
Signed-off-by: Lin Huang <hl@rock-chips.com>
2018-12-26 14:42:33 +08:00
Shunqing Chen
55488fb85a power: cw201x: add POWER_SUPPLY_PROP_CHARGE_FULL for CTS
Change-Id: I6697fdc5615705a32a4eeb411fc92b737be73d9e
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-12-26 09:44:11 +08:00
Leo Wen
024f04a5d7 drivers: Remove excess 'rk_nand' config in Makefile
Change-Id: Ifee81d59fd39e6467fc841f12f5a87c81db829d3
Signed-off-by: Leo Wen <leo.wen@rock-chips.com>
2018-12-26 09:41:48 +08:00
David.Wu
b94ecddd31 pinctrl: rockchip: Add gpio3b4 io function recalculated select for RK3308B
Accroding to the datasheet, the pin of gpio3b4 needs to be
recalculated for iomux selecting.

Change-Id: I62cc16cae96fe2f9624d9c5940f9c34b304eaed7
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-12-25 17:59:10 +08:00
Finley Xiao
d772326b50 arm64: dts: rockchip: rk3308: Add PID constant for rk3308k
Change-Id: I073579a65a877b95e99daf00ce1815c04e11081a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-12-25 17:58:26 +08:00
Finley Xiao
f6ec026aa9 thermal: power_allocator: Add support to get PID constant from dt
Change-Id: Ibabdad4ba2df6df26d75483dd35b6c51572befe8
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-12-25 17:58:26 +08:00
Elaine Zhang
d2f238a541 clk: rockchip: rk322x: fix up the gate con description error
Change-Id: I439314c590a7144fab6e33d1fb4f325530669842
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-12-25 15:00:41 +08:00
Fei Zeng
557cbe628d arm64: dts: rockchip: enabled rga for rk1808-evb-x4
Change-Id: Id5c90b5ebcc0c4ae989488846ff7682c81bf1901
Signed-off-by: Fei Zeng <felix.zeng@rock-chips.com>
2018-12-25 11:26:42 +08:00
Simon Xue
832fad953d arm64: dts: rockchip: rk1808: add power-domains reference for PCIe
RK1808 PCIe share pd with others, add pd reference in case being
turned off by others

Change-Id: I899eb7524ae9aaada3cc161a63434113a3a1768e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
2018-12-24 17:54:00 +08:00
Hu Kejun
1036bc2ca7 media: rockchip: isp1: fix demosaic is not bypass for grey sensor
Change-Id: I4c3200720cd0c2c54c56e298b55367404eca2f58
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-12-24 17:41:03 +08:00
Jianqun Xu
3bc4a9286e phy: rockchip: mipi-rx: include io.h for writel function
Change-Id: I2f401cbab9b3a407987745afd5c253a5b4960f25
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-12-24 17:39:58 +08:00