Commit Graph

865106 Commits

Author SHA1 Message Date
Zhihuan He
0eb6c247c3 PM / devfreq: rockchip_dmcdbg: add px30 support
Change-Id: I9da8f3229b8a9c44ea1c1237bb36aa4b8762e545
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:57:54 +08:00
Zhihuan He
ac365f86b9 PM / devfreq: rockchip_dmcdbg: add dramid info
Change-Id: Ibf4aca3e6c37cd3acc1348af578dde6df279ff62
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:42:50 +08:00
Zhihuan He
1115cdab28 PM / devfreq: rockchip_dmcdbg: updata rv1126 version to 0x102
Change-Id: I44f489dbe383feb58436acf61defa21e9e48dc0d
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:12:47 +08:00
Zhihuan He
1fe4802396 PM / devfreq: rockchip_dmcdbg: refactor rv1126_dmcdbg_init()
Change-Id: I47c2e3712aeacefa22ec4c589309ab13ce9ec7b1
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
2021-06-23 11:12:38 +08:00
Herman Chen
41284f5dd3 video: rockchip: mpp: Fix mpp_free_task crash
Due to hardware timeout the session may be released before the remaining
task is alll finished. So mpp_free_task could run after mpp_dev_release.
Then the session used in mpp_free_task could be invalid and crash the
thread.

So we attach session to the mpp_taskqueue and let the work thread to
destroy and release session later.

NOTE: the session is created in mpp_dev_open and attached to
corresponding taskqueue on client init. So when we release the session in
mpp_dev_release if the session is not attached to certain taskqueue just
release it immediately.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I9d4b2358154522e6bcde6e688592c0058781529a
2021-06-22 16:13:41 +08:00
shengfei Xu
0d79e76e79 arm64: dts: rockchip: enable the suspend default config for rk3568-linux
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I6fefa1d37cf7e1d7bade038f2b909a62417ec254
2021-06-22 14:14:48 +08:00
shengfei Xu
b4b17e1401 arm64: dts: rockchip: enable the suspend default config for rk3568-android
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I9581ce931162012ecf508c6d14990b98e8466361
2021-06-22 14:13:54 +08:00
Andy Yan
6ffe953d26 drm/rockchip: vop2: No register mirror win when only one vp used
when only one vp(crtc) is registered to drm, all the
plane->possible_crtc will be force set to this crtc.
this make current hwc think that all these planes can be
assigned to this crtc, but the mirror plane(rk3566 feature)
cant't be activated on the same crtc with source plane.

So if some boards only use one vp(crtc), don't register
mirror plane.

Change-Id: Ib25246cf44a0fc4caf98e7c6d21ebba18f1a6c88
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-21 18:38:34 +08:00
Sandy Huang
754bb09b98 drm/rockchip: vop2: close cluster sub win when main win is closed
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ifad854f2e70fe3487731f6cd1d3c41f2a512087e
2021-06-21 18:38:24 +08:00
Andy Yan
05c93d1db1 drm/rockchip: vop: Set output mode to P888 before send mcu cmd
VOP will do a dither logic transform when output is not P888,
this will make send wrong cmd.

Change-Id: Id289d90f029be457269d039d68f43a7cf1867eb2
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-21 17:21:01 +08:00
ZhiZhan Chen
96ec871718 arm64: dts: rockchip: use cluster for cursor on rk3568-evb1-ddr4-v10-linux.dts
Signed-off-by: ZhiZhan Chen <zhizhan.chen@rock-chips.com>
Change-Id: Icf667a4598a93b672777587775673539018bf4bc
2021-06-18 17:28:51 +08:00
Caesar Wang
141645215d Revert "arm64: dts: rockchip: disable afbc by default on rk3568-linux.dtsi"
This reverts commit bcd00049f4

Fixed by commit bba5e44c03
("drm/rockchip: vop2: Move Primary window to head and Cluster to tail")

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: Id7f0ce15fcbc7cf0edb9c74ee5ca7f6ee2f2d20a
2021-06-18 17:27:27 +08:00
Herman Chen
7b9018beed video: rockchip: mpp: Use kthread to process task
The kthread has less context switch overhead comparing to workqueue.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I509d8cd86c0966a2bfee8cb8459753368050b2b3
2021-06-18 14:57:00 +08:00
Andy Yan
bc3c93ff07 drm/rockchip: vop2: wait port_mux cfg done before configure new plane
We need two vsync cycle when move a window from
on vp to another: the port_mux take effect in
first vsync, than enable the window at second
vsync.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I87c1ac0803081ecb201d9218d40fdea89424fbd8
2021-06-18 14:15:27 +08:00
Andy Yan
bba5e44c03 drm/rockchip: vop2: Move Primary window to head and Cluster to tail
This make primary win register first to get the lower zpos.

Also hide the cluster win to the tail, give it a lower chance to
be found by some tradional display sorftware(etc X11).

Change-Id: I20e4885c6b18d7eec6ecc32fbf1ac5620fbb8a30
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Andy Yan
7c867f0214 drm/rockchip: vop2: Only register used vp to drm
A registered vp(crtc) need a primary plane, some
linux style display software(X11/weston) want more
overlay plane, so we don't register unused vp to
same some plane for overlay.

Change-Id: I66846af7364d1a20f38f35d65ed3fe34b7f280ab
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Andy Yan
89ee594a71 drm/rockchip: vop2: Support disable Cluster sub win
Change-Id: Ia2f764992ce51ca61f6ba269083fa643509f58e1
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Andy Yan
fb5b2cfea8 drm/rockchip: vop2: Support set cursor win from dts
for example:

Use CLuster0 as cursor win for vp0.

&vp0 {
	cursor-win-id = <ROCKCHIP_VOP2_CLUSTER0>;
};

Change-Id: I10f7921928fbf7ff803c55a95cbce62df658fbed
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-06-18 14:15:27 +08:00
Zorro Liu
87a35c65f8 drm/rockchip: ebc_dev: release version v2.02
1.adjust panel power on/off sequence
2.remove EPD_OVERLAY_WHITE mode
3.use another way to draw white Lines

Signed-off-by: Zorro Liu <lyx@rock-chips.com>
Change-Id: I4787b0cd4a1f0f0f8cac310afa06d3d1db6dae9b
2021-06-18 14:11:52 +08:00
Wu Liangqing
ae4c563bea scripts: io-domain.sh: fix parse error caused by io_domain duplicate definitions
Change-Id: Ie8aaa817985643cc48ce8020a7eac38a35029c46
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
2021-06-18 14:11:18 +08:00
Fenrir Lin
8a735d4ec1 media: i2c: os04c10: fix the gain error problem
Signed-off-by: Fenrir Lin <fenrir.lin@rock-chips.com>
Change-Id: I20bbf598d4bcc9f3029112f6d729286d40bf338d
2021-06-18 10:51:52 +08:00
Sudeep Holla
febcd380ef UPSTREAM: firmware: arm_scmi: Move scmi protocols registration into the driver
In preparation to enable building SCMI as a single module, let us move
the SCMI protocol registration call into the driver. This enables us
to also add unregistration of the SCMI protocols.

The main reason for this is to keep it simple instead of maintaining
it as separate modules and dealing with all possible initcall races
and deferred probe handling. We can move it as separate modules if
needed in future.

Link: https://lore.kernel.org/r/20200907195046.56615-4-sudeep.holla@arm.com
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
(cherry picked from commit 1eaf18e35a)

Conflicts:
	drivers/firmware/arm_scmi/driver.c
	drivers/firmware/arm_scmi/system.c

Fixes: 5730f8b50f ("UPSTREAM: firmware: arm_scmi: Move scmi protocols registration into the driver")
Change-Id: I0509be2a8614d3f98bad8d19e57d75e6371008a4
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-17 19:17:38 +08:00
Sudeep Holla
950a4fde3c UPSTREAM: firmware: arm_scmi: Add names to scmi devices created
Now that scmi bus provides option to create named scmi device, let us
create the default devices with names. This will help to add names for
matching to respective drivers and eventually to add multiple devices
and drivers per protocol.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
(cherry picked from commit 9c5c463f2a)

Conflicts:
	drivers/firmware/arm_scmi/driver.c

Add missing reset devname.

Fixes: b430ea6fd1 ("UPSTREAM: firmware: arm_scmi: Add names to scmi devices created")
Change-Id: I2ba7edb8b3e6483e2a8d6ce3a33dce41d432c7b5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2021-06-17 19:11:34 +08:00
Sudeep Holla
9f10a3c532 UPSTREAM: reset: reset-scmi: Match scmi device by both name and protocol id
The scmi bus now has support to match the driver with devices not only
based on their protocol id but also based on their device name if one is
available. This was added to cater the need to support multiple devices
and drivers for the same protocol.

Let us add the name "reset" to scmi_device_id table in the driver so
that in matches only with device with the same name and protocol id
SCMI_PROTOCOL_RESET.

Change-Id: Iccebdc2ed032db23d5b4e86462ce33534a23924c
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit 34ce3c5e69)
2021-06-17 19:02:15 +08:00
Sudeep Holla
70379c59db UPSTREAM: reset: reset-scmi: add missing handle initialisation
scmi_reset_data->handle needs to be initialised at probe, so that it
can be later used to access scmi reset protocol APIs using the same.

Since it was tested with a module that obtained handle elsewhere,
it was missed easily. Add the missing scmi_reset_data->handle
initialisation to fix the issue.

Change-Id: Id4a398dc0bede531e384301067a71327f1d78821
Fixes: c8ae9c2da1 ("reset: Add support for resets provided by SCMI")
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Reported-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit 61423712db)
2021-06-17 19:00:34 +08:00
Sudeep Holla
64ffa834bf UPSTREAM: reset: Add support for resets provided by SCMI
On some ARM based systems, a separate Cortex-M based System Control
Processor(SCP) provides the overall power, clock, reset and system
control. System Control and Management Interface(SCMI) Message Protocol
is defined for the communication between the Application Cores(AP)
and the SCP.

Adds support for the resets provided using SCMI protocol for performing
reset management of various devices present on the SoC. Various reset
functionalities are achieved by the means of different ARM SCMI device
operations provided by the ARM SCMI framework.

Change-Id: I7cadc2be170ed8029e3db92aeda8249bbb7c4e88
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit c8ae9c2da1)
2021-06-17 18:59:42 +08:00
Etienne Carriere
c256ed3a52 UPSTREAM: firmware: arm_scmi: Fix ARCH_COLD_RESET
The defination for ARCH_COLD_RESET is wrong. Let us fix it according to
the SCMI specification.

Change-Id: Ied2b8d55e21583a9dec2d131155ec5cbd86636ba
Link: https://lore.kernel.org/r/20201008143722.21888-5-etienne.carriere@linaro.org
Fixes: 95a15d80aa ("firmware: arm_scmi: Add RESET protocol in SCMI v2.0")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit 45b9e04d5b)
2021-06-17 18:58:23 +08:00
Sudeep Holla
a7763786b1 UPSTREAM: firmware: arm_scmi: Stash version in protocol init functions
In order to avoid querying the individual protocol versions multiple
time with more that one device created for each protocol, we can simple
store the copy in the protocol specific private data and use them whenever
required.

Change-Id: I80e3b6177ffe99deb74c2e6dccf705b73f2163a8
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit b55b06b794)
2021-06-17 18:57:51 +08:00
Sudeep Holla
57d62a13d8 UPSTREAM: firmware: arm_scmi: reset: fix reset_state assignment in scmi_domain_reset
Fix the copy paste typo that incorrectly assigns domain_id with the
passed 'state' parameter instead of reset_state.

Change-Id: If645ba6372f616638d50c5023aa7a8b1404f424a
Fixes: 95a15d80aa ("firmware: arm_scmi: Add RESET protocol in SCMI v2.0")
Reported-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit 11ed5cf064)
2021-06-17 18:56:21 +08:00
Sudeep Holla
7d7b363271 UPSTREAM: firmware: arm_scmi: Add RESET protocol in SCMI v2.0
SCMIv2.0 adds a new Reset Management Protocol to manage various reset
states a given device or domain can enter. Device(s) that can be
collectively reset through a common reset signal constitute a reset
domain for the firmware.

A reset domain can be reset autonomously or explicitly through assertion
and de-assertion of the signal. When autonomous reset is chosen, the
firmware is responsible for taking the necessary steps to reset the
domain and to subsequently bring it out of reset. When explicit reset is
chosen, the caller has to specifically assert and then de-assert the
reset signal by issuing two separate RESET commands.

Add the basic SCMI reset infrastructure that can be used by Linux
reset controller driver.

Change-Id: I78f79b81852d31dc3026ba06ca66f36a2aa60df2
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
(cherry picked from commit 95a15d80aa)
2021-06-17 18:54:45 +08:00
Sudeep Holla
28bafe15f8 UPSTREAM: firmware: arm_scmi: Use {get,put}_unaligned_le{32,64} accessors
Instead of type-casting the {tx,rx}.buf all over the place while
accessing them to read/write __le{32,64} from/to the firmware, let's
use the existing {get,put}_unaligned_le{32,64} accessors to hide all
the type cast ugliness.

Change-Id: I5cbb01ad87d985fc759cdd5d33a63beb8c790c4c
Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit aa90ac45bc)
2021-06-17 18:42:39 +08:00
Sudeep Holla
77037bcf25 UPSTREAM: firmware: arm_scmi: Use asynchronous CLOCK_RATE_SET when possible
CLOCK_PROTOCOL_ATTRIBUTES provides attributes to indicate the maximum
number of pending asynchronous clock rate changes supported by the
platform. If it's non-zero, then we should be able to use asynchronous
clock rate set for any clocks until the maximum limit is reached.

Tracking the current count of pending asynchronous clock set rate
requests, we can decide if the incoming/new request for clock set rate
can be handled asynchronously or not until the maximum limit is
reached.

Change-Id: I958da7f1990ef773e26f182b59af26c5717ebd61
Cc: linux-clk@vger.kernel.org
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 2bc06ffa06)
2021-06-17 18:42:24 +08:00
Sudeep Holla
09523b99d7 UPSTREAM: firmware: arm_scmi: Drop config flag in clk_ops->rate_set
CLOCK_PROTOCOL_ATTRIBUTES provides attributes to indicate the maximum
number of pending asynchronous clock rate changes supported by the
platform. If it's non-zero, then we should be able to use asynchronous
clock rate set for any clocks until the maximum limit is reached.

In order to add that support, let's drop the config flag passed to
clk_ops->rate_set and handle the asynchronous requests dynamically.

Change-Id: I1f6b5947638f3dad041d163bfb44936a3c484da9
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Acked-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit d0aba11614)
2021-06-17 18:41:50 +08:00
Sudeep Holla
96048edcc7 UPSTREAM: firmware: arm_scmi: Add asynchronous sensor read if it supports
SENSOR_DESCRIPTION_GET provides attributes to indicate if the sensor
supports asynchronous read. We can read that flag and use asynchronous
reads for any sensors with that attribute set.

Let's use the new scmi_do_xfer_with_response to support asynchronous
sensor reads.

Change-Id: I8066cecb9565d5f40c42accbebc8ced2747d5dba
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit d09aac0eb1)
2021-06-17 18:41:21 +08:00
Sudeep Holla
c32cceb6bb UPSTREAM: firmware: arm_scmi: Drop async flag in sensor_ops->reading_get
SENSOR_DESCRIPTION_GET provides attributes to indicate if the sensor
supports asynchronous read. Ideally we should be able to read that flag
and use asynchronous reads for any sensors with that attribute set.

In order to add that support, let's drop the async flag passed to
sensor_ops->reading_get and dynamically switch between sync and async
flags based on the attributes as provided by the firmware.

Change-Id: I000cae002b0fc85dcf09a3d35bd273685d6960b7
Cc: linux-hwmon@vger.kernel.org
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 6a55331c87)
2021-06-17 18:41:08 +08:00
Sudeep Holla
075a3702aa UPSTREAM: firmware: arm_scmi: Align few names in sensors protocol with SCMI specification
Looks like more code developed during the draft versions of the
specification slipped through and they don't match the final
released version. This seem to have happened only with sensor
protocol.

Renaming few command and function names here to match exactly with
the released version of SCMI specification for ease of maintenance.

Change-Id: Idbaaa32e46e4d515c0fcb57f376f5f5b581e311b
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 9eefa43a1a)
2021-06-17 18:40:57 +08:00
Florian Fainelli
1a05c25ce5 UPSTREAM: hwmon: scmi: Scale values to target desired HWMON units
If the SCMI firmware implementation is reporting values in a scale that
is different from the HWMON units, we need to scale up or down the value
according to how far apart they are.

Change-Id: I2e4819d00262d2c17cde293cbd27786d82a3b9df
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
[sudeep.holla: added check of scale = 0 for early exit in scmi_hwmon_scale]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ac778e6263)
2021-06-17 18:40:57 +08:00
Florian Fainelli
c82a11363c UPSTREAM: firmware: arm_scmi: fetch and store sensor scale
In preparation for dealing with scales within the SCMI HWMON driver,
fetch and store the sensor unit scale into the scmi_sensor_info
structure. In order to simplify computations for upper layer, take care
of sign extending the scale to a full 8-bit signed value.

Change-Id: If1a3907268e7fd5b511c313d429d2d801a52996a
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
[sudeep.holla: update bitfield values as per specification]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 0b673b6486)
2021-06-17 18:24:23 +08:00
Michał Mirosław
b98301661c UPSTREAM: regulator: use consumer->supply_name in debugfs/regulator_summary
Make it easier to identify regulator consumers when consumer device
uses more than one supply.

Before:

  regulator                      ena use open bypass voltage current min     max
 -----------------------------------------------------------------------------------
  regulator-dummy                  1   0    2      0     0mV     0mA 0mV     0mV
     1-0010                                                          0mV     0mV
     1-0010                                                          0mV     0mV

After:

  regulator                      ena use open bypass voltage current min     max
 -----------------------------------------------------------------------------------
  regulator-dummy                  1   0    2      0     0mV     0mA 0mV     0mV
     1-0010-vccio                                                    0mV     0mV
     1-0010-vcc33                                                    0mV     0mV

Change-Id: I69aea6bf17fb8665a1a2ae9434ddc74c61a1a6b6
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Link: https://lore.kernel.org/r/731a4b299c6ae0ee9d8995157600a3477f21a36c.1585959068.git.mirq-linux@rere.qmqm.pl
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
(cherry picked from commit 6b576eb035)
2021-06-17 14:25:38 +08:00
Jianqun Xu
73b6a3102b Revert "regulator: fix regulator_summary name show issue"
This reverts commit 0ec895a5ac.

Change-Id: I1d3a332669efb19ff61c6ebeab7b97261c2e1ab4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:25:38 +08:00
Jianqun Xu
7a77852f87 arm64: dts: rockchip: rk3568-evb: add enable pin for vcc_lcdc
Reference from hardware design, the vcc_lcdc0_n and vcc_lcdc1_n
regulators are controlled by GPIO.

Add enable pin for vcc_lcdc regulators, also add min and max voltage
make the regulators have voltage values.

Change-Id: Id3bdaa7f5612c28c1a82d22ef8ceb1c72f0fb405
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:21:31 +08:00
Jianqun Xu
d4d1745bef arm64: dts: rockchip: rk3568-evb fix vcc5v0_usb nodes
Add min/max voltage for usb regulators, also add vin-supply for them.

From rk3568-evb1 hardware design, the power tree about usb is
DC12V
  ->  VCC5V0_USB(controlled by EXT_EN from PMIC)
        ->  VCC5V0_HOST(controlled by GPIO0_A6)
	->  VCC5V0_OTG(controlled by GPIO0_A5)

The EXT_EN from PMIC RK809 is designed for device power off to cut off
the usb 5.0v power, during system on, it keeps always on.

Change-Id: I21e431b4b41022b101b6db92b0769d096679b67c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:21:31 +08:00
Jianqun Xu
6de4caa7df arm64: dts: rockchip: rk356x-evb: fix pcie supply to regulator-fixed
The pcie supply design is (rk3566 evb2 example)
DC12V
  -> VCC12V_PCIE(controlled by GPIO0_C2_H)
  -> VCC3V3_PCIE(controlled by GPIO0_C2_H)
  -> VCC5V0_SYS
       -> VCC3V3_PI6C(controlled by GPIO0_C2_H)

The pci phy driver only want to enable or disable the VCC3V3_PCIE power.

Suggested from pcie owner to ignore the VCC12V_PCIE and VCC3V3_PI6C, so
the dts only need to add regulator node for VCC3V3_PCIE.

Most of time we keep the regulator name same as the hardware design, so
the dts node is
    vcc3v3_pcie: gpio-regulator {
        compatible = "regulator-fixed";
        regulator-name = "vcc3v3_pcie";
        regulator-min-microvolt = <3300000>;
        regulator-max-microvolt = <3300000>;
        enable-active-high;
        gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
        vin-supply = <&dc_12v>;
    };

The regulator type is "regulator-fixed" since its voltage always be
3.3v, min and max should be 3300000 make the regulator has a voltage
value.

The regulator can be enabled or disabled by regulator_enable or
regulator_disable function, so make the GPIO0_B7 as "ena_pin" for the
regulator.

The regulator is supplied by DCIN_12V, so add the vin-supply.

Change-Id: Iaf70abe9c9e06504af067dc0e3d60b775557c026
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:21:31 +08:00
Jianqun Xu
9218fe5ace pci: dwc: rockchip: fix pci power enable/disable
Change-Id: I4337746b7db995b3c6de29b50b9edc7a6bc10a81
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-17 14:21:31 +08:00
Mark Huang
7e1053d00b usb: gadget: uvc: support nv12 format
Change-Id: Iafa6bdb1540ef9f3ac766bf25e917a76069f942b
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
2021-06-16 16:27:29 +08:00
Mark Huang
61892fa501 usb: gadget: f_uvc: add device name for mult uvc
Change-Id: Ib19bb07a70019e474f5268475cadbb194fc4288d
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
2021-06-16 09:25:37 +08:00
Cai YiWei
975c26b7d1 media: rockchip: isp: fix same frame id
cur frame end and next frame start irq will
togeter if v-blank is short. to handle sof
event later if this happens.

Change-Id: If45300c8f640a6516624c4952e4f124afd7a9952
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-15 22:29:52 +08:00
Elaine Zhang
2ced9f1e5a regulator: gpio: support input supply
Add input supply, to create power tree.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: If67d2d545453b6b8e7d4e276ca5367bc8fb69dd1
2021-06-15 17:16:39 +08:00
Elaine Zhang
a91414049b regulator: gpio: add vin-supply for DT
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ia06eb1548040e8c0a1dbe079d791a8bd95f06efa
2021-06-15 17:14:34 +08:00
Cai YiWei
2e5bb20f4e media: rockchip: isp: hdr direct for isp21
Change-Id: Ia5befcdf241c22fe29ca3a2c0298547c8b4d664f
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2021-06-15 17:07:23 +08:00