This patch adds more generic PHY modes to the phy_mode enum, to
allow configuring generic PHYs to the MIPI/LVDS/TTL mode by
using the set_mode callback.
Change-Id: Ib6966828011aa52f1f133449f69df46c2001a57b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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>
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>