Commit Graph

593816 Commits

Author SHA1 Message Date
Douglas Anderson
b67caebc94 ARM64: dts: rk3399: add trackpad for gru/kevin boards
The trackpad bits in the DTS needed some love.  This adds some basic
infrastructure support in the main gru dts file and then adds the
specific trackpad used on kevin-r0 and kevin-r1.  For now just duplicate
between kevin-r0 and kevin-r1 and we'll decide if we want to share
later (perhaps we want an "atmel" snippet?).

Note that gpio-keymap here makes the driver appear as a trackpad rather
than a touchscreen (driver assumes that anything with buttons is a
trackpad).  Input entry corresponding to the button on the trackpad was
found by experimentation as suggested in the device tree bindings.

BUG=chrome-os-partner:52637
TEST=With series, trackpad works in browser; button works.

Change-Id: Ia62cff90449625778fd99054b914e22a55c13550
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256510
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 18:51:57 +08:00
Douglas Anderson
cdcdef3122 ARM64: rockchip_cros_defconfig: Turn on atmel touchscreen driver
The touchscreen driver is used for both atmel trackpads (AKA touchpads)
and touchscreens.  Turn it on so we can use it.

BUG=chrome-os-partner:52637
TEST=With series, trackpad works in browser; button works.

Change-Id: I316a8411c35ab7b48182cbe704c9f80114a5afcf
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256511
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 18:51:17 +08:00
Lin Huang
8bbd91e964 ARM64: dts: rockchip: kevin: enable HS400 mode on kevin board
enable HS400 mode on kevin, if found it is not stable, just
remove "mmc-hs400-1_8v" property, it will use HS200 mode instead.

Change-Id: I7c5d162de1f15bcc069134ffa228d833be2b8a02
Signed-off-by: Lin Huang <hl@rock-chips.com>
2016-04-26 17:50:53 +08:00
Lin Huang
66db99992e ARM64: dts: rockchip: kevin: add configure for emmc phy
assign freq-sel, dr-sel, opdelay value to meet the hardware
requirement of kevin.

Change-Id: Ibb410c607e69c966a9f2949846ef95ec34e15e79
Signed-off-by: Lin Huang <hl@rock-chips.com>
2016-04-26 17:50:09 +08:00
xxx
64f456e3c7 ARM64: dts: rk3399: support arm64 cpuidle-dt
Change-Id: I5506a6647985f44de352f097cf809b31f1917e6a
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2016-04-26 14:05:26 +08:00
Caesar Wang
8d152d0d9b ARM64: dts: rk3399: change for thermal zone
Let's control the power more be effective.We should make the big clusters
cpu throttle firstly.

Change-Id: I8f055f5856ce0239f9bf8bb5b5f2705b3151ba03
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:37:00 +08:00
Caesar Wang
3666820804 thermal: rockchip: fixes the period time for tsadc
we should increase the period cycles to save power since the rk3399 has
the high frequency for tsadc clock.

Change-Id: Ia9481515cac6dd6026d3312ac930329a3e906436
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:36:25 +08:00
Caesar Wang
cb5fcd3937 thermal: rockchip: add the set_trips function
Whenever the current temperature is updated, the trip points immediately
below and above the current temperature are found. A sensor driver
callback `set_trips' is then called with the temperatures.
Lastly, The sensor will trigger the hardware high temperature interrupts
to increase the sampleing rate and throttle frequency to limit the temperature
rising When performing passive cooling.

Change-Id: I16b2ab4f8fb85425aab5cd3777ca600bd4cace20
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:36:17 +08:00
Sascha Hauer
dcdaad1858 thermal: bang-bang governor: act on lower trip boundary
With interrupt driven thermal zones we pass the lower and upper temperature
on which shall be acted, so in the governor we have to act on the exact lower
temperature to be consistent. Otherwise an interrupt may be generated on the
exact lower temperature, but the bang bang governor does not react.

Change-Id: Ic9dd855b0767d34b15505c1ff12ea99b76cdcea7
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:36:08 +08:00
Sascha Hauer
2aaa7c7097 thermal: streamline get_trend callbacks
The .get_trend callback in struct thermal_zone_device_ops has the prototype:
        int (*get_trend) (struct thermal_zone_device *, int,
                          enum thermal_trend *);
whereas the .get_trend callback in struct thermal_zone_of_device_ops has:

        int (*get_trend)(void *, long *);

Streamline both prototypes and add the trip argument to the OF callback
aswell and use enum thermal_trend * instead of an integer pointer.

While the OF prototype may be the better one, this should be decided at
framework level and not on OF level.

Change-Id: I39c5a38a22c7a2177a35338bc63c8ba36983a7b0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:35:59 +08:00
Sascha Hauer
d464660f05 thermal: of: implement .set_trips for device tree thermal zones
Change-Id: I566c468165c35e54a17663888539817246d0f0ed
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:35:50 +08:00
Sascha Hauer
606113604b thermal: Add support for hardware-tracked trip points
This adds support for hardware-tracked trip points to the device tree
thermal sensor framework.

The framework supports an arbitrary number of trip points. Whenever
the current temperature is updated, the trip points immediately
below and above the current temperature are found. A .set_trips
callback is then called with the temperatures. If there is no trip
point above or below the current temperature, the passed trip
temperature will be -INT_MAX or INT_MAX respectively. In this callback,
the driver should program the hardware such that it is notified
when either of these trip points are triggered. When a trip point
is triggered, the driver should call `thermal_zone_device_update'
for the respective thermal zone. This will cause the trip points
to be updated again.

If .set_trips is not implemented, the framework behaves as before.

This patch is based on an earlier version from Mikko Perttunen
<mikko.perttunen@kapsi.fi>

Change-Id: I8c33f9859909704583ba8b6632b91ffd58a9628e
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:35:41 +08:00
Caesar Wang
db6c7c9251 Revert "CHROMIUM: thermal: of: Add support for hardware-tracked trip points"
This reverts commit 2f8e5324ef.
Since there are the perfect patches in fromlist to instead of it.

Change-Id: I9f15478d0b0b94805d1bb9539a1cbea42a7af6a1
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:35:30 +08:00
Caesar Wang
898b271f45 Revert "thermal: rockchip: add the set_trips function"
This reverts commit ec24f1ae50.

Change-Id: I1fa579309691ac20d22bebf9f9cea1cd2243440f
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-26 10:35:18 +08:00
Xing Zheng
03ad390fa7 clk: rockchip: rk3399: keep the pclk_vio is CLK_IGNORE_UNUSED and critical
When we use the MIPI screen, the driver will unprepare and disable
the phy_cfg, it will diable its parent pclk_vio:
dw_mipi_dsi_phy_init
  --> clk_disable_unprepare
    --> clk_disable
      --> clk_core_disable(core->parent)

The pclk_vio supply power for pclk_vio_grf, hence, disable pclk_vio_grf will
cause other drivers failed to operate GRF.

Change-Id: I6d5bd27b9478da09209130f1fd5a62c0d4bb1785
Reported-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-25 20:35:26 +08:00
Shawn Lin
276292803f ARM64: dts: rk3399-evb: enable HS400 mode for emmc
We now enable HS400 mode for rk3399-evb for rk folks
to do more test for hs400. If any problem, please remove
mmc-hs400-1_8v from rk3399-evb.dtsi and any reports are
welcomed.

Change-Id: If7d9d291351a075fbb258bd04fce2a2f9cb81be3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 20:34:26 +08:00
Shawn Lin
cf1667564b ARM64: dts: rk3399-evb: add some configure for emmc phy
This patch assign freq-sel, dr-sel, opdelay to meet the
hw requirement of rk3399-evb.

Change-Id: I1ef98645b5414bcffa0b5711bc9eb63f077a5dc3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 20:33:59 +08:00
Shawn Lin
c19b56710d ARM64: dts: rk3399-evb: remove freq limit for sdhci
Change-Id: Ib5916869b79016f6dd4f99389bf723d82355bca3
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 20:28:00 +08:00
Shawn Lin
511074f3dc ARM64: dts: rk3399: assign clk parent and rate for SCLK_EMMC
Let's assign clk parent and rate for SCLK_EMMC to meet the
requiremen.

Change-Id: I3730a2124494da51717b1756f488f9df5bcd6423
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 20:27:32 +08:00
Shawn Lin
68eac41717 mmc: sdhci-of-arasan: refactor set_clock callback
commit 61b914eb81 ("mmc: sdhci-of-arasan: add phy support for
sdhci-of-arasan") introduce phy support for arasan. According to
the vendor's databook, we should make sure the phy is in poweroff
stat before we configure the clk stuff. Otherwise it may cause
some IO sample timing issue from the test. But we don't need this
extra operation while running in non HS200/HS400 mode since phy
doesn't trigger sampling block.

Change-Id: I5506f99e5a3b4d9a4356ad485ceac900c6d754aa
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 18:30:39 +08:00
Shawn Lin
9faaf821a7 phy: rockchip-emmc: fix dllrdy timeout issue
According to the databook, 10.2us is the max time for
dll to be ready to work. However from the test, some chips
need 20us for dll to ready. So this patch add some extra
margin for dllrdy to be ready to meet the reality.

Change-Id: Ie5362b4403309d260ac621b8b20a0f5b579d3153
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 17:58:04 +08:00
Shawn Lin
413ec720f5 Documentation: bindings: add more configuration for rockchip emmc phy
This patch add some optional configuration for dt. freq-sel can be used
to decide the phy sample clk in order to match the real freq of emmc
controller. dr-sel can be configured to match the requirement of different
drive strength of phy IO. opdelay should be used to adjust the output
delay for clk IO and data IO, which is useful for sloving timing issue.

Change-Id: I0b4da111581c76fbb96b15cd6be653aaa4843c33
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 17:57:31 +08:00
Shawn Lin
d1613edc35 phy: rockchip-emmc: add some setup configuration
Let's expose the freq-sel, dr-sel, opdalay to dt for user
to decide how to configure their phy.

Change-Id: Ib9ef40b263d3fd669c7bbda666d28c0c55ff6d8e
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2016-04-25 17:56:45 +08:00
Douglas Anderson
6c4113f686 ARM64: dts: rockchip: Tiny comment cleanups for kevin-r0
I was having a hard time figuring out where to put new things in
kevin-r0.  Add some comments to explain the sort order.

BUG=None
TEST=Build and boot

Change-Id: I9fb8c200f934542ebed984566bab039d4ec3fd13
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256509
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-25 16:02:41 +08:00
Douglas Anderson
8d3a4374ee ARM64: dts: rockchip: Remove 'veyron' in kevin/gru compatible
Veyron was an rk3288 board.  Having it in the compatible doesn't make a
ton of sense.  We'll stick 'gru' in the kevin name, though, since that
sorta makes sense.  Not that we ever really fall back to this stuff.

BUG=None
TEST=Build and boot

Change-Id: Ia4b6e02bd9b160c0b20e5459ca441047add2c0bd
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256508
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-25 16:02:14 +08:00
Douglas Anderson
a26d116168 ARM64: dts: rockchip: Fixup revisions for kevin
Turns out that we got mixed up.  Old stuff should just be rev 0.  New
stuff should be rev 1+.  Fix all that.

BUG=None
TEST=Boot rev 0.

Change-Id: I41b38893f1e4224df4e3646cd268179307b3476b
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256507
Commit-Ready: Doug Anderson <dianders@google.com>
Tested-by: Doug Anderson <dianders@google.com>
Reviewed-by: Brian Norris <briannorris@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-25 14:41:08 +08:00
Stephen Barber
eb8a871c2c arm64: dts: add kevin r1 and r2
Some pinctrl stuff has moved around and will be identical between gru
and kevin going forward, so kevin r1-specific things will be stored
in the kevin-r1 dts file.

BUG=none
TEST=kernel still boots on kevin-r1

Change-Id: If3e88a57acc40367afca34b5310a59efd70287f6
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256345
Commit-Ready: Stephen Barber <smbarber@google.com>
Tested-by: Stephen Barber <smbarber@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-25 14:39:35 +08:00
Brian Norris
8fedd9d578 FROMLIST: mfd: cros_ec: Allow building for ARM64
There are platforms using the ChromeOS embeded controller on ARM64 now,
so let's allow using this driver (without having to use COMPILE_TEST).

Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

BUG=none
TEST=make sure we can enable cros_ec for ARM64

Change-Id: I828fec4a2022ea50f10c269ee88ae92c30f48337
Reviewed-on: https://chromium-review.googlesource.com/339540
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Guenter Roeck <groeck@google.com>
Reviewed-on: https://chrome-internal-review.googlesource.com/256311
Commit-Ready: Brian Norris <briannorris@google.com>
Tested-by: Brian Norris <briannorris@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-25 14:38:27 +08:00
Guenter Roeck
56ad960082 FROMLIST: platform/chrome: cros_ec_dev - Populate compat_ioctl
compat_ioctl has to be populated for 32 bit userspace applications to work
with 64 bit kernels.

BUG=chrome-os-partner:52276
TEST=Build and test with ectool on kevin

Change-Id: I3955d4cf869e4ad4b9f48cdc3b5901cf49dbbe83
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
(am from https://patchwork.kernel.org/patch/8844321/)
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/256310
Commit-Ready: Brian Norris <briannorris@google.com>
Tested-by: Brian Norris <briannorris@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-25 14:38:00 +08:00
Stephen Barber
7229de675c ARM64: dts: gru: fix pwm regulator supplies
The vin-supply binding is valid only for fixed regulators. pwm-supply
should be used for PWM regulators.

Change-Id: I6b65eac6ddc424bb97ba9133b0d67286252b8568
Signed-off-by: Stephen Barber <smbarber@chromium.org>
Reviewed-on: https://chrome-internal-review.googlesource.com/255731
Tested-by: Stephen Barber <smbarber@google.com>
Reviewed-by: Doug Anderson <dianders@google.com>
2016-04-25 13:43:16 +08:00
Yakir Yang
62b22bf6a9 Revert "ARM64: dts: rk3399: gru: Let VOP Big first to select connector device"
We must not to adjust the port order, cause the port id is mapping
to VOP type. Current driver just hardcode that VOP Lit is ID 0, and
VOP Big is ID 1.

        ret = rockchip_drm_encoder_get_mux_id(dp->dev->of_node, encoder);
        if (ret)
                val = dp->data->lcdsel_lit | dp->data->lcdsel_mask;
        else
                val = dp->data->lcdsel_big | dp->data->lcdsel_mask;

Besides eDP could work well with VOP Lit, so we need to revert this
hack. Just revert commit 602f4f79c8.

Change-Id: I69badf2860c83c8211ea23b9f490fd4837dcf22e
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-25 11:23:14 +08:00
chenzhen
731680726b ARM64: dts: rk3399: gpu: add subnode for mali-simple-power-model
Change-Id: I0bd03634631ed30556cc45455582b075692cceba
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-04-22 19:21:17 +08:00
Yakir Yang
30462103cc drm/rockchip: analogix_dp: Hack the vop out mode for RK3399 chip
For RK3999 chip, VOP Big/Lit must configure different display out
mode for eDP controller.
  - VOP Lit should output RGB888
  - Vop Big should output RGB10

Change-Id: I85bac6c25a990404682483c62a731681d19eca29
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-22 17:58:54 +08:00
Yakir Yang
d7b965329c drm/rockchip: analogix_dp: distinguish chip type for each chips
Driver could check the chip type to do some special things.

Change-Id: I2a33da466db0aa5133868c200a122df675f4c925
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-22 17:58:53 +08:00
Yakir Yang
3fa3bcc35c drm/rockchip: analogix_dp: rename analogix_dp_data to rockchip_dp_chip_data
Make the data structure name more exactly.

Change-Id: I3d7826ef86d2059cd1557bf4d31b7281377e9fae
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-22 17:58:52 +08:00
Yakir Yang
5ddac1b583 drm/rockchip: analogix_dp: remove the devtype check in .mode_valid function
The device type would always be ROCKCHIP_DP, so no need to add the
unused devtype check.

Change-Id: I7668a4bdb29700c5397583b9539446f19ae49c3b
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-22 17:58:52 +08:00
Yakir Yang
c5f989fbcd drm: bridge: analogix_dp: rename RK3288_DP to ROCKCHIP_DP
Change-Id: I05adaad81ea1beabee1fa674bc00f4e044a58913
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-22 17:58:51 +08:00
chenzhen
4c1a95df70 MALI: rockchip: update mali-midgard binding doc
Change-Id: Iffb05ab0032bf0be33652803d4931018e06e0631
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-04-22 16:10:26 +08:00
chenzhen
c2ce740bf6 MALI: rockchip: adjust code about thermal for kernel 4.4
Change-Id: Ic5f3947b032deaaa800ee316636a8cc61259ba5d
Signed-off-by: chenzhen <chenzhen@rock-chips.com>
2016-04-22 15:50:06 +08:00
Elaine Zhang
e6b6ba524b ARM64: rockchip_defconfig: enable pwm regulator
Change-Id: Id46711f5fd2de5b85e380c146ed77682aaae5376
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2016-04-22 15:48:00 +08:00
Adam Thomson
4b0140a236 UPSTREAM: ASoC: da7219: Disallow unsupported 32KHz clock setting in set_dai_sysclk()
The PLL function was updated to disallow 32KHz in
commit 501f72e9c5 ("ASoC: da7219: Remove support for 32KHz PLL mode"),
but set_dai_sysclk() was missed and still permits it. This patch resolves
that discrepancy.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from git.kernel.org kernel/git/broonie/sound.git
topic/da7219 commit fb137ba64a)

Change-Id: I1cf8242745f39ac5ae3cb1aa30989bf4ab8f7f93
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-22 12:03:11 +08:00
Adam Thomson
f4fa97090e UPSTREAM: ASoC: da7219: Update PLL ranges and dividers to improve locking
The expected MCLK frequency ranges and the associated dividers
are updated to improve PLL locking in a corner scenario, with low
MCLK frequency near an input divider change boundary.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from git.kernel.org kernel/git/broonie/sound.git
topic/da7219 commit 63a450aa4d)

Change-Id: I7b830ef2ea1e25600365872802924f617b6e0274
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
2016-04-22 12:02:31 +08:00
Yakir Yang
a34e12b9f0 ARM64: dts: rk3399: evb1-cros: disabled eDP device node
There is a pull up resistor connected to eDP HPD pin on EVB1
hardware, and then eDP controller would always reported that
eDP panel is connected, even if no panel connected.

That would cause driver keep failed on eDP AUX communication,
and lots of annoying error messages would be printed out.

Beside actually the primary panel on EVB1 board is MIPI panel,
few people would have the eDP panel. So let's just disabled
the eDP device on EVB1 board.

Change-Id: Ic2f8b94360821f91e3607c2bfde7d8399fd0080f
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-22 12:00:30 +08:00
Yakir Yang
c1c93565ff input: touchscreen: fix kernel crash in fb_notifier_callback function
fb_event would only carry the data number in some special notify action,
other actions wouldn't carry an valid data number, and in this case
kernel would crash, logs like:

[    4.129846] Unable to handle kernel paging request at virtual address 200000000000
......
[    4.164618] Hardware name: Rockchip RK3399 Evaluation Board v1 (Chrome OS) (DT)
[    4.184624] PC is at fb_notifier_callback+0x28/0xac
[    4.189497] LR is at notifier_call_chain+0x74/0xb4
[    4.194279] pc : [<ffffffc0005e1468>] lr : [<ffffffc0000b5ba4>] pstate: 20000045
......
[    5.703780] [<ffffffc0005e1468>] fb_notifier_callback+0x28/0xac
[    5.709690] [<ffffffc0000b5ba4>] notifier_call_chain+0x74/0xb4
[    5.715504] [<ffffffc0000b5e70>] __blocking_notifier_call_chain+0x48/0x64
[    5.722280] [<ffffffc0000b5ea0>] blocking_notifier_call_chain+0x14/0x1c
[    5.728885] [<ffffffc00036fd98>] fb_notifier_call_chain+0x20/0x28
[    5.734969] [<ffffffc0003726c0>] register_framebuffer+0x218/0x250
[    5.741054] [<ffffffc0003b7598>] drm_fb_helper_initial_config+0x2f8/0x374
[    5.747832] [<ffffffc0003e056c>] rockchip_drm_fbdev_init+0xa8/0xe8
[    5.754002] [<ffffffc0003dba24>] rockchip_drm_load+0x1e4/0x25c

Change-Id: I3314315a31bbab43489fca85dabc4c6511fc9dee
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
2016-04-22 12:00:03 +08:00
Elaine Zhang
f40bf059ea UPSTREAM: soc: rockchip: power-domain: support qos save and restore
support qos save and restore when power domain on/off.

Change-Id: I5cecf9755467290bc153eeeb75dfd009e7736820
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-armsoc/drivers
 commit 074c6a422d)
2016-04-22 10:52:17 +08:00
Elaine Zhang
47138e271d UPSTREAM: dt-bindings: modify document of Rockchip power domains
Rockchip Socs contain quality of service (qos) blocks managing priority,
bandwidth, etc of the connection of each domain to the interconnect.
These blocks loose state when their domain gets disabled and therefore
need to be saved when disabling and restored when enabling a power-domain.

These qos blocks also are similar over all currently available Rockchip
SoCs.

Change-Id: I03c80e01ae0fd1a66a67db15f24869047862f13f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-armsoc/drivers
 commit 71daabca34)
2016-04-22 10:52:17 +08:00
Shawn Lin
aa7c7be40e UPSTREAM: soc: rockchip: power-domain: check the existing of regmap
Check return value of syscon_node_to_regmap for
rockchip_pm_domain_probe. If err value is returned, probe
procedure should abort.

Change-Id: I8b6f2a62d383c5cae5b69e030a8a8e2ad9cc18c1
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
(cherry picked from git.kernel.org mmind/linux-rockchip.git v4.7-armsoc/drivers
 commit 4506697d9f)
2016-04-22 10:52:16 +08:00
Finley Xiao
4600240316 ARM64: dts: rockchip: rk3366: assign parent for gpu and wifi.
Gpu's 480MHz need to select usbphy_480m as parent.
The jitter will be lower, if sclk_wifidsp is supplied by pll_wifi.

Change-Id: I13e5077d55ab80e5224bac36b469e39d556bd347
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-04-21 19:56:37 +08:00
Finley Xiao
4a4215ae12 clk: rockchip: rk3366: modify the parent's name of usbphy480m
Change-Id: I6a628a96acba4e73405ffc58fbd9a8f6e4544e4f
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2016-04-21 19:54:53 +08:00
Finley Xiao
5aeb54a9be UPSTREAM: clk: Add clk_composite_set_rate_and_parent
When changing the clock-rate, currently a new parent is set first and a
divider adapted thereafter. This may result in the clock-rate overflowing
its target rate for a short time if the new parent has a higher rate than
the old parent.

While this often doesn't produce negative effects, it can affect components
in a voltage-scaling environment, like the GPU on the rk3399 socs, where
the voltage than simply is to low for the temporarily to high clock rate.

For general clock hirarchies this may need more extensive adaptions to
the common clock-framework, but at least for composite clocks having
both parent and rate settings it is easy to create a short-term solution to
make sure the clock-rate does not overflow the target.

Change-Id: Iceb40b24ef13db6947be3d797ea90b3e1055b9df
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from git.kernel.org clk/linux.git clk-next
 commit 9e52cec04f)
2016-04-21 15:20:50 +08:00