Commit Graph

607205 Commits

Author SHA1 Message Date
Tao Huang
ef3a197ba6 power: rk817: fix compile warning
drivers/power/rk817_battery.c:2129:4: warning: this if
clause does not guard... [-Wmisleading-indentation]

drivers/power/rk817_battery.c:2920
rk817_bat_pm_resume() error: uninitialized symbol 'time_step'.

Change-Id: I9af73c85192279cc0546a5844da65542806279d5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-28 10:44:28 +08:00
Xiao Yao
63c84030be arm64: dts: rockchip: fix clock name for sdmmc_ext for rk3328 chip
Change-Id: I915aed1122b41c3f766968ea8d74d98aa8bb22ed
Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
2018-02-28 10:34:50 +08:00
Zhou weixin
651cd90eaa arm64: dts: rockchip: disable virtual power for rk3326-863-lp3-v10
Change-Id: Ib558805bc8923f8485c36edf51535f17ea997573
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
2018-02-28 10:34:28 +08:00
Liang Chen
385761959c PM / devfreq: rockchip_dmc: protect video_info_list with mutex
When multiple videos are playback at the same time, video_info_list
may be damaged, so we need protect the list with a muxte_lock.

Change-Id: I7f9ab8d9a9cd29b69550b47d1b35b6645357b0b0
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-28 09:36:02 +08:00
shengfei Xu
c19ea2e315 power: rk817: smooth the display soc
Change-Id: I239df7d8812673a1ebc95cea012b18ab0ca3af9b
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2018-02-28 09:32:26 +08:00
Xinhuang Li
1000befc2d arm64: dts: rockchip: rk3328: add aclk&hclk for h265e_mmu
Change-Id: I46bd3817219f80fddd097ec37e10a3a29209e21f
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2018-02-28 09:32:25 +08:00
Liang Chen
1400bae5b6 arm64: dts: rockchip: add support of gpu opp 550M for rk3326
Change-Id: Ib8722d53bd37374d7ac7458ee861b3f2b154403b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-28 09:32:25 +08:00
Finley Xiao
090a42caf7 arm64: rockchip: px30: Remove the initial value of PLL_CPLL and BOOST
If show logo in uboot, can't change vop clocks.

Change-Id: I84fc1138b54b1c7b3c798f1bc4fb7d0f332e6895
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-27 18:02:53 +08:00
Shawn Lin
94d9c15c89 arm64: dts: rockchip: Add SD(IO) 3.0 support for rk3326-863-lp3-v10
Change-Id: I046c2dadfe20861c45c27b068b4c4dc427a36eee
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-27 11:31:31 +08:00
Shawn Lin
e61fd89e2f BACKPORT: FROMLIST: mmc: core: Don't try UHS-I mode if 4-bit mode isn't supported
Per SD specification physical layer v4.0, section 3.9.4, it
says "UHS-I supports only 4-bit mode. Host shall select 4-bit
mode by ACMD6. However mmc_sd_init_uhs_card() still go ahead
to initialize the cards anyway, whether card or host won't
support 4-bit mode.

This breaks the platforms which only support 1-bit mode but
with a UHS-I card inserted, as all the tuning process is broken
due to this. Alternatively, we should check the return value from
mmc_set_bus_width to see if host could finish the request to switch
the bus with on its side. But that needs more thing to do than this
patch that just bails out early to try to use high speed mode if 4-bit
mode isn't available for whatever reason. And this patch could also
fix the same problem for sdio since R4_18V_PRESENT won't be set for
ocr when mmc_sdio_init_card() finds mmc_host_uhs() is false.

Note that This patch doesn't keep the checking of card->scr.sda_spec3
and comparing card->scr.bus_widths with SD_SCR_BUS_WIDTH_4 within
mmc_sd_init_uhs_card since if the sd cards response with SD_ROCR_S18A,
it definitely support UHS-I mode, which implicitly means these checks
are always true.

Change-Id: I2e91418b3216d9efac672af604014d7095bf4a1a
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from https://patchwork.kernel.org/patch/10241773/)
2018-02-27 11:31:21 +08:00
Shawn Lin
fcb45dce59 BACKPORT: UPSTREAM: mmc: sdio: don't use rocr to check if the card could support UHS mode
Per SDIO Simplified Specification V3, section 3.1.2, A host that
supports UHS-I sets S18R to 1 in the argument of CMD5 to request a
change of the signal voltage to 1.8V. If the card supports UHS-I and
the current signal voltage is 3.3V, S18A is set to 1 in the R4 response.
If the signal voltage is already 1.8V, the card sets S18A to 0 so that
host maintains the current signal voltage. UHS-I is supported in SD mode
and S18A is always 0 in SPI mode.

For the current code, if the signalingvoltage is fixed 1.8v, so
the card will set S18A to 0 for rocr and thus we would clear the
R4_18V_PRESENT from ocr, which make core won't try to use uhs mode.

To fix it, we expect sdio_read_cccr would fail if the uhs mode won't
work at all. Note that it's interesting that some sdio cards still
response S18A even the voltage is fixed to 1.8v and the CMD11 will
also accepted and finish enabling UHS mode successfully.I guess this
is why folks didn't notice this problem. Anyway, fix it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Change-Id: I81305f076a663d04c3ff93e78492daf091bc6311
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 5fc3d80ef4)
2018-02-27 11:29:12 +08:00
Shawn Lin
2ff9b261ab BACKPORT: UPSTREAM: mmc: sdio: Factor out retry init card helper function
Add new helper function, mmc_sdio_resend_if_cond, to be
reused when trying to retry the init sequence.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Change-Id: I3eb7ffdc18ddb49f34e39198ac4a65cdb8cad586
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 0eb51a58ad)
2018-02-27 10:16:19 +08:00
Zhong Yichong
252aa7dac9 camera: rockchip: camsys_drv: Another solution of isp reset failure for rk3326.
Reset on too high isp_clk rate will result in bus dead, so we reduce the
isp_clk before reset and then restore after reset.

Change-Id: I9e426564f0eb9f900fd5012def1e105d7d697394
Signed-off-by: Zhong Yichong <zyc@rock-chips.com>
2018-02-27 09:24:13 +08:00
Finley Xiao
634f908468 nvmem: rockchip-otp: Fix section mismatch when compile
Change-Id: I571d63a6f3af2b0768b42ede3638d4b0ef2497cd
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-26 19:57:25 +08:00
Joseph Chen
2bea544836 UPSTREAM: pinctrl: Add pinctrl driver for the RK805 PMIC
RK805 is one of Rockchip PMICs family, it has 2 output only GPIOs.

This driver is also designed for other Rockchip PMICs to expend.
Different PMIC maybe have different pin features, for example,
RK816 has one pin which can be used for TS or GPIO(input/out).
The mainly difference between PMICs pins are pinmux, direction
and output value, that is 'struct rk805_pin_config'.

Change-Id: Ib1e0ada7e9c60565a720928f6e9f6948dc79194c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit ea479996c7)
2018-02-26 18:16:18 +08:00
Joseph Chen
4e21a59914 UPSTREAM: pinctrl: dt-bindings: Add bindings for Rockchip RK805 PMIC
Change-Id: Ib6f0edc31cb53bff9b297d1d4e919f9f1cd08070
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
(cherry picked from commit 5b0bb001d3)
2018-02-26 18:08:13 +08:00
Tao Huang
94cf234d60 mfd: remove unused rk808-irq
Change-Id: I27138971c78d2ed9dae87e887b8804cdf499a69c
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-26 17:30:52 +08:00
Tao Huang
3d73d4ef98 arm64: rockchip_defconfig: remove rkfb config
For new android, these configs is not needed anymore:

CONFIG_FB_ROCKCHIP
CONFIG_LCDC_RK3368
CONFIG_LCDC_RK322X
CONFIG_LCDC_LITE_RK3X
CONFIG_LCD_MIPI
CONFIG_RK_TRSM
CONFIG_RK32_DP
CONFIG_MIPI_DSI
CONFIG_RK32_MIPI_DSI
CONFIG_RK_HDMI
CONFIG_ROCKCHIP_DP
CONFIG_SND_SOC_DW_HDMI_AUDIO

Change-Id: I0023e0455712b00131a90a24837731e4b2cfeb43
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2018-02-26 17:30:38 +08:00
Algea Cao
262653c976 drm/rockchip: Fix cvbs display err when power off
DPMS status default value should be set according to
whether uboot logo is enabled. If uboot logo is enabled,
DPMS status default value should be set to ON.

Change-Id: I492d76c29687e583771824fcbc5a57455242ec0e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
2018-02-26 17:21:08 +08:00
Huicong Xu
fd1c248b92 arm: dts: rockchip: rk322x: fix uboot find hdmi connector node fail
Change-Id: Ic1747a8d760ff6efd2fa458464f6aab5157d0170
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
2018-02-26 17:20:50 +08:00
William Wu
2ba3b09d6b ARM64: dts: rockchip: use regulator for usb vbus on rk3328 boards
This patch uses otg-vbus and host-vbus fixed-regulators instead
of GPIO pins for usb2 and usb3 vbus power on rk3328-evb boards.

Change-Id: I82433752724be236a821c8629e882d930687d0f7
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-26 17:20:05 +08:00
William Wu
26c539146c ARM: dts: rockchip: use regulator for otg vbus on rk3229 boards
This patch uses a fixed-regulator instead of GPIO pin for
otg vbus power on rk3229 boards.

Change-Id: I9b4f37c78a8d112008c3db552150a77bbaeb23fc
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-26 17:19:37 +08:00
William Wu
56490c0e85 ARM: dts: rockchip: use regulator for otg vbus on rk3128-fireprime
This patch uses a fixed-regulator instead of GPIO pin for
otg vbus power on rk3128-fireprime board.

Change-Id: I5b1aa112ec8e1f07d9a6c2f7d0b349ab30331913
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-26 17:19:04 +08:00
William Wu
12efa9acad phy: rockchip-inno-usb3: use fixed-regulator for vbus power
This patch uses a fixed-regulator instead of GPIO pin for
usb vbus power. It doesn't fix any issue, but it makes more
sense to convert the GPIO code into a fixed-regulator.

Change-Id: I76fb8dc5c8cfdba24ccb3fc24f14850defb83b2e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-26 17:18:33 +08:00
William Wu
a1ca1be8f6 phy: rockchip-inno-usb2: use fixed-regulator for vbus power
This patch uses a fixed-regulator instead of GPIO pin for
usb vbus power. It doesn't fix any issue, but it makes more
sense to convert the GPIO code into a fixed-regulator.

Change-Id: I7196a9cd592dbb3fab3ef8b9e99babc613a42869
Signed-off-by: William Wu <william.wu@rock-chips.com>
2018-02-26 17:18:29 +08:00
Liang Chen
da8675c309 arm64: dts: rockchip: adjust cpu and gpu opp table for px30
Change-Id: I8951348731463a7614ac6f320af16222cd7fe212
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-26 17:14:26 +08:00
Shawn Lin
7d65765bf3 arm64: dts: rockchip: Enable SD/SDIO 3.0 for PX30/RK3326 boards
This patch enables SD(IO) 3.0 for all boards by adding correct
vccq and vcc power supplies, as well as properities required by
UHS-I mode.

Change-Id: Iec11e1d1abe7ef9fc17ba08eece3440d7dcaea0b
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-26 17:13:46 +08:00
Wyon Bi
c57523a0d6 arm64: dts: rockchip: rk3326-evb-lp3-v10: enable logo display
Change-Id: I89d777a8c11d94f8bdd79d67258bf54388bd9e9a
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2018-02-26 17:12:34 +08:00
Finley Xiao
882c5c7dc7 clk: rockchip: px30: Add support to set parent rate for vopb dclk
Change-Id: I3160abc500be473c6cf4893bd26fd22b3ec95a85
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-26 17:08:53 +08:00
Finley Xiao
9dd92a3120 arm64: dts: rockchip: px30: Add nvmem-cells property for cpu
Change-Id: I0f23f780fb6fc42b7599d38e1d1213e1ab116210
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-26 12:04:13 +08:00
Finley Xiao
faf7b4d7a9 arm64: dts: rockchip: px30: Add otp node
Change-Id: I5a1ed87e9fef7346e2f268fc9a2a33cd6d192c69
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-26 12:03:55 +08:00
Finley Xiao
52298dfe38 arm64: configs: rockchip_defconfig: Enable CONFIG_ROCKCHIP_OTP
Change-Id: Ia2510f2ec1bdfc875dfbab325a616eb1a45ef76b
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-26 12:03:02 +08:00
Finley Xiao
33e182dbf4 nvmem: rockchip-otp: Add Rockchip OTP driver
Add simple read only driver for the OTP (One Time Programmable)
memory found on Rockchip SoCs.

Change-Id: I01c63dcacaf471ed7d06e0e8263a14e29af7fb0e
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-26 12:02:36 +08:00
Finley Xiao
bb88c004d1 dt-bindings: add binding document for Rockchip otp
This patch documents the Rockchip otp device tree binding.

Change-Id: I90dc6110c386bd0fab3b9531d857514b300c81df
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2018-02-26 12:02:10 +08:00
Shawn Lin
ef6433360d soc: rockchip: grf: disable jtag switching for PX30 Soc
PX30_GRF_SOC_CON5 is intended for postponing the auto switch
of pinmux from SDMMC to JTAG after removing the SD cards.
However, the default value is too small to meet the actual
requirement. Increase this value to 5 seconds currently.

Change-Id: I18fafe07822b81d9cd448ab71c1f0e49a75db357
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-26 11:55:20 +08:00
Zhong Yichong
9a80d74064 camera: rockchip: camsys_drv: Fix the isp soft reset failure for rk3326.
Reset on too high aclk rate will result in bus dead, so we reduce the aclk
before reset and then recover it after reset.

Change-Id: I38b51c3b39329e2bc96b964e7575d06183d33fd0
Signed-off-by: Zhong Yichong <zyc@rock-chips.com>
2018-02-26 11:51:00 +08:00
Xiao Yao
69c33846bf arm64: dts: rockchip: add mmc-hs200-1_8v for all rk3328 boards
Change-Id: I74d04e9a047e7622870df42cc41d5c3c752f9207
Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
2018-02-26 11:49:11 +08:00
Xiao Yao
20cf029d0e arm64: dts: rockchip: rk3328: add sample/drv clock for hs200 mode
Change-Id: I8522515920b37cbfb9ec24ba7e65aee4f276e4a7
Signed-off-by: Xiao Yao <xiaoyao@rock-chips.com>
2018-02-26 11:48:30 +08:00
Shawn Lin
a123f47b6c clk: rockchip: px30: correct the parent of sdmmc/sdio/emmc sample and drv clks
Phase calculation should be based on the clock rate of these clk,
which inherits the clock rate from their parents. If the parent
goes wrong, it would be orphan node leading all the clk rate to
be zero. This breaks the normal tuning process whilist probing
the card. Fix them!

Change-Id: I7b64748e90684f8ca9710b63f10205d50d24f6d0
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2018-02-25 19:47:51 +08:00
Shunqing Chen
1cd280a4c4 ARM: dts: rk3229-at-som: add hw_id for cw201x
Change-Id: I9f3417c2ead1373851bfea2f0c9b37f720900c3c
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-02-25 19:36:01 +08:00
David Wu
526571a766 Revert "pinctrl: rockchip: Make the gpio base started from 1000"
This reverts commit 3b7424f332.

Change-Id: If7598862a116000b60d958918b3651c248b5aaf2
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-25 19:35:21 +08:00
David Wu
15840a4670 Revert "soc: rockchip: rockchip_pm_config: set the real pin number to ATF"
This reverts commit ef06da2890.

Change-Id: Ide586a9f1aa079b9d29568ed0c88235f58ccfe9a
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-25 19:34:52 +08:00
David Wu
3506ee9262 Revert "gpio: rockchip: Make the gpio base added at gpiolib"
This reverts commit 545abf2ec4.

Change-Id: Icb7a08f12e85a8757154356a6671b5bca88eb79a
Signed-off-by: David Wu <david.wu@rock-chips.com>
2018-02-25 19:34:31 +08:00
Shunqing Chen
c800d4456e power_supply: cw201x: add hw_id check for android things SOM
Change-Id: Ic51abf5ccf89d3106858d029812ba6450422f1f5
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-02-25 19:33:19 +08:00
Liang Chen
810497ff78 clk: rockchip: Add adaptive frequency scaling for pll_rk3036
Change-Id: Ifd035967afc1852df81daa2b15afea764c5b851d
Signed-off-by: Liang Chen <cl@rock-chips.com>
2018-02-25 19:28:56 +08:00
Caesar Wang
bea847eadf arm64: rockchip_linux_config: enable the dmc for rk3399
Change-Id: I25c1524949cae7d3fef9e178548abadcc676f138
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-25 19:27:40 +08:00
Caesar Wang
68c494b9ea arm64: rockchip_linux_config: enable camera sensors used by dts
As rk3399's sapphire board have used 5 camera sensors on
rk3399-sapphire-excavator-linux.dts, enable configure to support these.

Change-Id: I0afe26ad40aeeba889a556b4024a4798feeaf08e
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-25 19:27:17 +08:00
Caesar Wang
739d1ab1c9 arm64: dts: rockchip: enable the dmc for rk3399 sapphire excavator
The rk3399 had supported the dmc, the sapphire excavator board should
supported it too.

Change-Id: Id462ca1957b8c4960564d0ca24f71e7811aaabfd
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2018-02-25 19:26:52 +08:00
Shunqing Chen
9f2ddf5a0c power: add universal charger driver support
1.This driver only report charging status.
2.Support usb and dc charging.
3.Applicable to all charger IC that the
  charging current is determined by hardware.

Change-Id: I1c125580248cc1ba770b3c22f0b8dc3c21b980e0
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
2018-02-25 19:26:34 +08:00
Bin Yang
6181b2bd44 ARM: dts: add rk3229 3nod full function board
In the 3nod full function board, there are some pins is multiplexed
(such as: PWM0/2, SDMMC, IR and SPDIF). So we need create two DT files
rk3229-at-3nod.dts and rk3229-at-3nod-func.dts. In the rk3229-at-3nod,
these pins be iomux to gpio. In the rk3229-at-3nod-func, these pins be
iomux to function pins.

Change-Id: I369dabc4dceb25023ab97b74e12cfef058e522d1
Signed-off-by: Bin Yang <yangbin@rock-chips.com>
2018-02-25 19:25:58 +08:00