Commit Graph

611237 Commits

Author SHA1 Message Date
Joseph Chen
4bb30cefbd arm: dts: rk3308-dot-rk816-v10-aarch32: update battery information
The board battery is attached, so update battery hardware info.

Change-Id: Ife9630c61c712d21ff4461cb53175833b3d4c779
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-09-07 10:40:40 +08:00
Joseph Chen
7083a3390f mfd: rk808: initial rk816 LDOs write mask bit 1.
RK816 ldo write mask bit is always 1 after setting finished, but
when system start, the write mask bit is 0 even enable bit is 1.

So that rk816 regulator driver '.is_enabled()' returns disabled state
even the ldo is power on when system start, we need to initial write
mask bit as 1.

Change-Id: I8b5b83f33d668e4bdd1f96d77208931d25b8f6d9
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-09-07 10:40:40 +08:00
Joseph Chen
849dfb0d85 power: rk816-battery: fix charge current value fixed issue
Without this patch, when sample resistor is 20mR, battery charge
current is fixed in 1000mA which is lower than user configure at
the most time.

Change-Id: Idc93f5becfefd55992ea791a65c565feb313b779
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-09-07 10:40:40 +08:00
Zhangbin Tong
161968cdf6 arm: dts: rk3128x: Change cpu opp-microvolt max voltage to 1.2v
The bootloader voltage is greater than the max voltage set by
opp-microvolt. This resulting in:

[    1.949575] cpu cpu0: scale_rate=1008000000
[    1.949822] vdd_arm: Restricting voltage, 1200000-1175000uV
[    1.949854] vdd_arm: Restricting voltage, 1200000-1175000uV
[    1.949874] cpu cpu0: _set_opp_voltage: failed to set voltage (1000000 1000000 1175000 mV): -22
[    1.949889] cpu cpu0: failed to set volt 1000000

Change-Id: Id9bd6f3c7f4bf8ad2bd8a1a798ea4f8eed6b18b2
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-09-06 16:35:32 +08:00
Zhangbin Tong
104311443d arm: dts: rk3128h-box: Add regulator-early-min-microvolt property to the vdd_arm node
Need to keep the vdd_arm voltage set by the bootloader until all consumer
complete the initialization of the frequency voltage constraint.

The previous kernel was using the property regulator-init-microvolt.
The commit 8726e76f58 ("Revert "regulator: of: Use regulator-init-microvolt as early minimum"")
change it to regulator-early-min-microvolt property.

Change-Id: If86994dd3f6a845efbde6cbadfbd73e3572a544b
Signed-off-by: Zhangbin Tong <zebulun.tong@rock-chips.com>
2018-09-06 16:34:37 +08:00
William Wu
cb771b55cf usb: gadget: f_uvc: add extension unit descriptor
Add extension unit descriptor for uvc. Support 3
controls in this extension unit. The rockchip IQ
tool use it to transfer vendor specific control
data.

Change-Id: I219e12616629bc75548b30ce63d46136aeac6561
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-09-06 10:06:31 +08:00
Lin Jinhan
f8b70b2e0e hwrng: rockchip - use HIWORD_UPDATE when write register
use HIWORD_UPDATE(val, 0xffff, 0) instead of val | CRYPTO_WRITE_MASK_ALL
to make code more clearly.

Change-Id: I9a27914911e09ae2395577ac51bacfa96a958ec8
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2018-09-06 09:55:19 +08:00
Lin Jinhan
a8f7a5a2d7 hwrng: rockchip - fix bug on system suspend and resume
This module should do nothing on system suspend and resume,
otherwise clk_bulk_disable is called when clk is not enabled,
and that will cause core dump.

Change-Id: Ib89b0dfd831c225ff852c35b8d25221453c5679d
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
2018-09-06 09:55:19 +08:00
Alex Zhao
57bdf0e890 net: wireless: rockchip_wlan: rtl8188eu:fix unable to connect iphoneX
Change-Id: I809bf2fe8b8710940f792c5705c7f56debd89030
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2018-09-06 09:49:40 +08:00
Jianqun Xu
0a6d21d746 arm64: dts: rockchip: enable io-domain for rk1808-evb
Change-Id: I1a12f7fab028ad017ada220b5caae7b6fd2beb2b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-09-06 09:37:43 +08:00
Jianqun Xu
092e14211a arm64: dts: rockchip: add io-domain for rk1808
Add support for rk1808 io domain and pmu io domain.

Change-Id: I1057f9193ca12a8e14a5dfa0b121395169470b0f
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-09-06 09:35:47 +08:00
Jianqun Xu
dd425b3e57 dt-bindings: rockchip-io: Add rk1808 io-domains support
Add support for rk1808 io domain and pmu io domain.

Change-Id: I119583bfed255363509c2980697a7b6df66e20ff
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-09-06 09:16:27 +08:00
Weiwen Chen
5df5bb12d7 dm: add check target device probe completely
Because some mmc execute tuning should take more time,
so if dm target device is not probe completely before dm verity,
will trigger:

[    0.834803] device-mapper: init: attempting early device configuration.
[    0.836226] device-mapper: init: adding target '0 1031864 verity 1 PARTUUID=cfc90ed7-b23f-459b-896f-8135b56567a1 PARTUUID=cfc90ed7-b23f-459b-896f-8135b56567a1 4096 4096 128983 128983 sha1 d0f6e81bf584217e524e88b023d0c70422fb2f19 e939f8142d39394fb14f0df917de9346cb045b78 10 restart_on_corruption ignore_zero_blocks use_fec_from_device PARTUUID=cfc90ed7-b23f-459b-896f-8135b56567a1 fec_roots 2 fec_blocks 130000 fec_start 130000'
[    0.836341] device-mapper: table: 253:0: verity: Data device lookup failed
[    0.836355] device-mapper: init: starting dm-0 (vroot) failed
[    0.836916] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[    0.843161] pgd = c0004000
[    0.843415] [00000000] *pgd=00000000
[    0.843810] Internal error: Oops: 80000005 [#1] PREEMPT SMP ARM
[    0.844345] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.4.77 #1
[    0.844870] Hardware name: Generic DT based system
[    0.845299] task: de4b0000 ti: de4b8000 task.ti: de4b8000
[    0.845782] PC is at 0x0
[    0.846018] LR is at generic_make_request+0xc8/0x220
[    0.846458] pc : [<00000000>]    lr : [<c03aae2c>]    psr: 60000013
[    0.846458] sp : de4b9b58  ip : 00000004  fp : de4b9d9c
[    0.847466] r10: 00000000  r9 : de7fb020  r8 : c100390c
[    0.847927] r7 : ffffffff  r6 : de4b9b5c  r5 : 00000000  r4 : dde71540
[    0.848508] r3 : 00000000  r2 : dc8ba64d  r1 : dde71540  r0 : de7fb020
[    0.849080] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    0.849714] Control: 10c5387d  Table: 6000406a  DAC: 00000051

Change-Id: Idf9a33fd15adab8aa5e13f74c92b3270c9877035
Signed-off-by: Weiwen Chen <cww@rock-chips.com>
2018-09-05 17:37:29 +08:00
Joseph Chen
2de215e4af arm: dts: rk3308-dot-rk816-v10-aarch32: add charge animation node
Change-Id: If65f87d7157106bd4314c973cbc6a8d550be9876
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2018-09-05 14:33:43 +08:00
Xing Zheng
0b71eecfc3 ASoC: rk3308_codec: clean up ALC AGC flows
Remove enable/disable ALC/AGC, and put their into
dapm controls.

Change-Id: I669347caab58470d9a6b6d017c70553fbb629426
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-09-05 14:32:51 +08:00
Xing Zheng
6d4910a82c ASoC: rk3308_codec: Clean up and using e->reg instead of e->shift_l
It may that there is many registers need to be operated,
For more flexibility, we can use e->reg to indicate ADC
grps.

Change-Id: I701a151102e499bd0b5c31014039268ff4e5bfda
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-09-05 14:32:51 +08:00
Zorro Liu
7ef7f719ac arm64: dts: rockchip: add dts file for rk1808-evb rev10
Add dts file to support rk1808 evb rev10, which powered by
rockchip pmic rk809.

Change-Id: Ifbec2b70c5c0cabae24fe47113a1b1c39472b457
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2018-09-04 17:21:43 +08:00
Cai YiWei
87496cc185 media: rockchip/cif: fix get subdev fmt null pointer
Change-Id: I19ff295566e374e5557b6c7407de853343e61286
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2018-09-04 11:37:10 +08:00
Xing Zheng
a0fdf9ce3e ASoC: rk3308_codec: remove the limit of the ADC digital reset
It looks like that we still keep the resetting ADC digital
and avoid the broken noise for loopback at starting.

And, remove adc_path_state which is not used now.

Change-Id: I514692b1bbb4bad1f0ce5413ca5891fd41083549
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-09-04 09:42:38 +08:00
David Wu
4fa7f41dfe pinctrl: rockchip: Add pinctrl support for rk3308b
The main description for rk3308b is as follows:
 - Old iomux multiplexing extension;
 - GRF_SOC_CON5 register add some bits;
 - Newly added GRF_SOC_CON13/15 register.

Change-Id: I94bfcae5387aceae14895f1cafa0bfea51bf8b63
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-09-04 09:23:22 +08:00
Sugar Zhang
924c406896 ALSA: pcm_dmaengine: preprocess vad data for the first round
This patch fixup the lost vad activity frames count in the
first round dma xfer.

Change-Id: I72c1e5a9aeefc4966741b1fbf9c9e4d551cacfab
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-09-04 09:20:32 +08:00
Sugar Zhang
128120abb0 ASoC: rockchip: vad: fixup 32bit software abs value
Change-Id: Ic520fcb7e3be18ad7eb36fc1cea208f35a95fd02
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-09-04 09:20:32 +08:00
Sugar Zhang
89f67d6d46 ASoC: rockchip: multi_dais_pcm: obtain the vad data
This patch recaculate the hw pointer to make the vad data
available and submit the residue dma buffer requests in
single xfer mode for the first round, and then cyclic xfer
mode for normal.

Change-Id: I27c1d6e32cfcac74ae53bb151da859cd4325517b
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-09-04 09:20:32 +08:00
Sugar Zhang
bb3a8f822e ASoC: rockchip: vad: memcpy: add support padding size
This patch add support for memcpy with padding size.
just like extend vad 6ch to 8ch buffer, so the padding
is needed.

Change-Id: Ie9777b2856d556d4934bce6e850dae9b27b078db
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-09-04 09:20:32 +08:00
Sugar Zhang
83623425bc dmaengine: pl330: add support for interlace single xfer
Change-Id: I953a3858c2cb3c252788bb65c27c99ee737744c9
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
2018-09-04 09:20:32 +08:00
William Wu
c24a103ab6 usb: quirks: add quirk for Kingston DataTraveler 3.0 with broken LPM
Kingston DataTraveler 3.0 sometime would be disconnected
or not be enumerated successfully by xHCI controller when
LPM was enabled.

This patch adds an USB_QUIRK_NO_LPM quirk for this device.

Change-Id: I8ffa8d46ee242ab9665ce70565df7718b20ca87c
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-09-04 09:17:38 +08:00
Wyon Bi
63fcb9a771 drm/panel: simple: fix loader protect
Change-Id: I5b9bb5e35cc74389b6500f85c48dfed911c21181
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2018-09-04 09:16:30 +08:00
Xing Zheng
37a6461623 arm64: dts: rockchip: enable 'rockchip,no-deep-low-power' for rk3308-evb
This patch can help us to fix pop after wake up via VAD,
and  enable 'rockchip,no-deep-low-power' on all of
rk3308-evb, not only amic boards.

Change-Id: I07f4674dd8c7fbd400b3c9b265fbaec6bfb5829e
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-09-04 09:16:13 +08:00
Sandy Huang
4e10742748 drm/rockchip: Fix coding style
Change-Id: I4ae825c374b518a501f986e3f63877216754f824
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2018-09-03 19:36:53 +08:00
Finley Xiao
592156489e arm64: dts: rockchip: rk3399: Add wide-temperature configure
Change-Id: I5e8cca3de8b671f04d9fdf07f6c566ebb8b7988a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-09-03 17:07:04 +08:00
Finley Xiao
0e582eb60f arm: dts: rockchip: rk3288: Change 400MHz to 420Mhz for gpu
It doesn't support 400MHz, but support 420MHz.

Change-Id: Ife31469307912f83919b02b532acde91cc0f19ce
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-09-03 17:03:00 +08:00
Finley Xiao
040687f1f9 arm: dts: rockchip: rk3288: Assign npll to 1250MHz
In order to support 420MHz for gpu and 125MHz, 50MHz for gmac.

Change-Id: I2b0e3edbf08850555c5bd4bc1d063c8923d54bda
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-09-03 17:03:00 +08:00
Wyon Bi
6b20b47257 drm/rockchip: vop: Don't create an instances of struct vop_win for dummy vop_win_data
Change-Id: I49d9d4f0f4dacb39042d9714f2a50af7462341ea
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-31 16:39:41 +08:00
Wyon Bi
1029816774 drm/rockchip: rgb: Remove duplicated code
Change-Id: I92349f76ca7359c359a1c23adc3b50bedc4d56b0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-08-31 15:58:54 +08:00
Elaine Zhang
a35459a711 ARM64: dts: rockchip: Add pmu\power-domain\qos dts node for rk1808
Change-Id: I8bd286384a8cdc0a7c6c2645afa4fa066a0cd22d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-31 15:27:41 +08:00
Jianqun Xu
3656c731d6 arm64: dts: rockchip: rk1808 add uart aliases
Change-Id: If058767cf6c50dccb1cd57b07e2ba33f0854f338
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2018-08-31 14:25:51 +08:00
Elaine Zhang
5ee5c49741 soc: rockchip: power-domain: add power domain support for rk1808
This driver is modified to support RK1808 SoC.

Change-Id: Id622e126936a242f3dfbab94b0e7c7818b41f9ae
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-31 14:24:44 +08:00
Elaine Zhang
c5a692d3ea dt-bindings: power: add power-domain header for RK1808 SoCs
According to a description from TRM, add all the power domains

Change-Id: Id8c4af687c877e206f8ce08416dcb4e41a78ce46
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-31 14:23:38 +08:00
Elaine Zhang
6971ac4276 dt-bindings: rockchip: add the power domains for rk1808 SoCs
Change-Id: I6da9acfddfae1ecfa66adb1deba46b6de448ef35
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-31 14:20:21 +08:00
Elaine Zhang
8c98270171 clk: rockchip: rk1808: add HCLK_NPU clk ID for npu
Change-Id: Idd409a818cd3e2b122ed30f01f8fdc495a8bc53f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-31 14:19:49 +08:00
William Wu
1c15193c9f phy: rockchip-inno-usb2: add phy configurations for rk1808
RK1808 SoC has an usb 2.0 comb phy with one otg-port and one
host-port. This patch adds port configurations for them.

Change-Id: Id4d117929ec0e327c8f2cc1a06d4caaa2d584f06
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-31 14:14:44 +08:00
William Wu
6870353515 arm64: dts: rockchip: add usb nodes for rk1808
Add usb 2.0 host controller nodes, usb 3.0 otg controller
node, and usb 2.0 phy nodes for rk1808 SoC.

Change-Id: Icb23e3d1b929091b62824bba6f41ffb4ab262f69
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-31 14:14:21 +08:00
William Wu
fbdea8dfb9 dt-bindings: phy: rockchip: add support of rk1808 usb
Support rockchip,rk1808-usb2phy-grf for rk1808 board.

Change-Id: I9f3cc8300bf2653689c07734b81bcf7ff9aac4eb
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-31 14:13:43 +08:00
William Wu
55ee1bc536 dt-bindings: usb: dwc3: add support of rk1808
Support rockchip,rk1808-dwc3 for rk1808 board.

Change-Id: I68d9233e8cdf4704b54eb1fe2f17baf43ab6caf5
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-08-31 14:13:30 +08:00
David Wu
b78e417d3f pinctrl: rockchip: Add mux range support while setting iomux
When the pin is set as an iomux value that is outside its range,
it should return a failure, otherwise it may be overwritten with
incorrect value.

Change-Id: I381d9f5bf6f4bfa7d0512350e6b051bebf513d3e
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-08-31 14:12:25 +08:00
David Wu
ab297f280f pinctrl: rockchip: Fix some style warnings
Change-Id: Ia4ff30113520030e3a1e611f4a74cec4431848ba
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-08-31 14:12:14 +08:00
Hu Kejun
514d0d19f8 media: i2c: gc2145: support switch between 30fps and 20fps preview mode
Change-Id: Iabc8107d814b02e14c665a03df923938208e9465
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2018-08-30 21:46:53 +08:00
Xing Zheng
304e48e978 ASoC: rk3308_codec: disable high pass filter by default
It looks better that handle the hight pass filter (HPF)
on the user space, therefore, disable it by codec.

By the way, add HPF dapm controls if someone need to
enable HPF cut-off.

Change-Id: Id8d5f4f84a8ad9909d6aa35c484e955ab92bffed
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2018-08-30 17:36:09 +08:00
William Wu
8898da3f4b phy: rockchip-inno-usb2: register 480MHz clk at the end of probe
We find an usb phy 480MHz clk prepare fail issue on PX30/RK3326
platforms with RK819 PMIC. On PX30/RK3326 platforms, we set the
usb480m clk to critical because GPU 480M is from usb480m and the
source clocks should be always on. And the usb phy 480MHz clk is
parent of usb480m clk, so the clk framework will prepare the usb
phy 480MHz clk when register it.

This logic works well if the usb phy probe only once. But if the
usb phy needs to probe twice or more because of some reasons (e.g.
fail to get vbus regulator from RK819), the usb phy 480MHz clk will
be unregistered and registered again, however, the clk framework
doesn't prepare the usb phy 480MHz clk except the first time register
operation. So we move the 480MHz clk register to the end of probe,
and make sure only register it once.

Change-Id: If69378b49035746a7c0107c6a363c4d91dfc15e5
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2018-08-30 14:50:36 +08:00
Elaine Zhang
22282d70ee clk: rockchip: rk1808: add HCLK_HOST_ARB and PCLK_USB3PHY_PIPE ID for usb
Change-Id: I5cc084d2fc21c5cf4972b5a38ab0ee1ab8b4e377
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2018-08-30 12:28:25 +08:00