Commit Graph

1058857 Commits

Author SHA1 Message Date
Wenping Zhang
72f1af4839 arm64: dts: rockchip: change mmc aliases for rk356x in android platform.
Rechange the emmc aliase to mmc2 to be same as other rockchip's chips,
so the android application can process the emmc property of all chips
in a uniform manner.

Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Ia092ec08552e360e7fc5dc271dbb69edc08bd486
2021-07-06 19:23:37 +08:00
Jianqun Xu
3618cb49ea arm64: dts: rockchip: rk3568-android: reserved cma default at 256M
The usb driver will alloc from the cma default memory pool, when it's
limited to 32bit, the cma default memory should limit to dma32.

Change-Id: Ibd91f3158af6eae98d899018685e03e8f47e75a9
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-06 19:23:16 +08:00
Finley Xiao
091e8a1173 arm64: dts: rockchip: rk3568: Add vop-bw-dmc-freq property for dmc
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I20367d84fa3fee5b008ea8fbaba33ec296dd2721
2021-07-06 18:59:22 +08:00
Finley Xiao
b8b00f9d98 arm64: dts: rockchip: rk3568: Add devfreq property for display_subsystem
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3bb6e7d486d52c586b55ed70ca33b0f3c10f29bf
2021-07-06 18:59:22 +08:00
Sandy Huang
d6c8c148cc arm64: dts: rockchip: rk3568: add reserved memory for cubic lut
Change-Id: I68bc3fb2e3955383652fd1e583728becbfca744b
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-06 18:59:22 +08:00
Sandy Huang
0d224b9b80 arm64: dts: rockchip: rk3568: set display endpoint default as disabled
Change-Id: I3e8544ca6764aaa6c4327ad58e227a5e091e7dc9
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-06 18:59:22 +08:00
Sandy Huang
9f0302959f arm64: dts: rockchip: rk3568: VOP: export VP to other dts file
Change-Id: I4172f4af7818f0fb5e49d438600debbd4bce2a0a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2021-07-06 18:59:22 +08:00
Jianqun Xu
6f0148b892 arm64: dts: rockchip: rk3568-pinctrl fix node name to gpio-func
From gpio-consumer.yaml

properties:
  gpios:
    $ref: "/schemas/types.yaml#/definitions/phandle-array"
patternProperties:
  "(?<!,nr)-gpios?$":
    $ref: "/schemas/types.yaml#/definitions/phandle-array"

This patch try to avoid anything with gpio.

Change-Id: I0c32b585aaefcaa5d0e985b3ada1887019e006c7
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-06 18:59:22 +08:00
Jianqun Xu
ebcac36cc2 arm64: dts: rockchip: rk3568-pinctrl add blank lines
Change-Id: I98885cf5522073e1cd16ff0f24484f92077d4145
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-07-06 18:59:22 +08:00
Allon Huang
13e7ead4fc arm64: dts: rockchip: rk3568: mipi csi host add cru rst
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I0253d3b75b03ace77fdc16eb273fb193856c091f
2021-07-06 18:59:22 +08:00
XiaoDong Huang
1476165180 arm64: dts: rockchip: rk3568: tsadc: config "rockchip,hw-tshut-mode = <0>"
To use tsadc_shut_m0 function, tsadc must switch to cru_shut_mode,
because tsadc_shut signal have to go through the cru to get to tsadc_shut_m0 signal.
Refer to "10.10.10.81\技术文档\thermal\rk3568_tsadc_shut.png" for details.

Change-Id: I0528917efe2f5ea6f002ebf1608815eb01f552c0
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-07-06 18:59:22 +08:00
XiaoDong Huang
038b57022d Revert "arm64: dts: rockchip: rk3568: tsadc: use tsadcm0_shut function"
This reverts commit 0a01772bd5.

Change-Id: I12c9b8e28a54c2087929680c84a65d8c5b95bcae
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2021-07-06 18:59:22 +08:00
David Wu
5a1c441ec0 ARM: dts: rk322x: Add ethernet alias for uboot write MAC address
Now we use U-Boot to write the MAC address into DTB, to
solve the problem of getting the MAC address in the vendor
partition too late at the kernel level, so the Ethernet
alias is added for U-Boot to quickly find the gmac DTB node.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I603946b27ab4668ed5ff4dbb629f3ed9b8741b08
2021-07-06 18:46:50 +08:00
David Wu
7d2bd336aa ARM: dts: rk312x: Add ethernet alias for uboot write MAC address
Now we use U-Boot to write the MAC address into DTB, to
solve the problem of getting the MAC address in the vendor
partition too late at the kernel level, so the Ethernet
alias is added for U-Boot to quickly find the gmac DTB node.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ibeae8b4cc09bbf3cfb7b64e51f6f6aa35820bf0d
2021-07-06 18:46:49 +08:00
Longjian Lin
2c37ca0870 ARM: dts: rockchip: rk3126-bnd-d708: fix rtk bt uart issue
Donot pull up BT uart pin before rtl87xx power on.

Signed-off-by: Longjian Lin <llj@rock-chips.com>
Change-Id: I562e4c403f2a56f9253ff677d78d9056cd98a54d
2021-07-06 18:46:49 +08:00
Wenping Zhang
6fb84898b5 ARM: dts: rockchip: add mmc aliases for rk312x.
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Change-Id: Ide6179393b7dae5752ab4b9105d344cd371d6ad9
2021-07-06 18:46:49 +08:00
Johan Jonker
bf2e84d5ea UPSTREAM: arm64: dts: rockchip: assign a fixed index to mmc devices on px30 boards
Recently introduced async probe on mmc devices can shuffle block IDs.
Pin them to fixed values to ease booting in environments where UUIDs are
not practical. Use newly introduced aliases for mmcblk devices from [1].
The sort order is based on reg address.

[1] https://patchwork.kernel.org/patch/11747669/

Change-Id: I3a61c02162e975b1ba4f8635b36965f99f0b60d7
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20210118155242.7172-3-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 84b2c2c872)
2021-07-06 18:46:49 +08:00
Tao Huang
b3fccd83e3 arm64: rockchip_defconfig: Enable CONFIG_ROCKCHIP_SYSTEM_MONITOR
default y on 4.19.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic2343648f78b73fc78b569e786f85961c7d97ec1
2021-07-06 17:16:57 +08:00
Finley Xiao
7ee882d39e Revert "soc: rockchip: system_monitor: change cdev state according to temperature"
This reverts commit 72dc50cd92.

As the system monitor support changing thermal governor and managing
cooling devices, there's no need to export system monitor devices to
thermal framework.

Change-Id: I2ee0314d6f3b342f2c7f41f7fafbb0074555759d
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-06 17:16:48 +08:00
Finley Xiao
ff09846075 soc: rockchip_system_monitor: Add support to change thermal governor
Add support to change thermal governor to user_space, and the system
monitor will manage cooling devices.

Change-Id: I6b9a51a6ee4ff1f3414a133f157e3bd05d51fcda
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-06 17:16:48 +08:00
Finley Xiao
99290df06c soc: rockchip_system_monitor: Add support to check voltage
As dev_pm_opp_check_rate_volt() is implemented in file driver/opp/core.c
by rockchip, it is unsupported for gki.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I13b7b916b1b1310cf5f421e98417bdb4fc1a953a
2021-07-06 17:16:48 +08:00
Finley Xiao
0ce78e6aeb soc: rockchip: system_monitor: Use PM QoS to set frequency limits
The cpufreq core now takes the min/max frequency constraints via QoS
requests and the CPUFREQ_ADJUST notifier is removed.

The devfreq core now supports limiting the frequency range of a device
through PM QoS make use of it instead of disabling OPPs that should
not be used.

Change-Id: I3e909bd6a1ba77e565ebb0e4870f79f1e0724b46
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-06 17:16:48 +08:00
Guochun Huang
0f20a27adc arm64: dts: rockchip: rk3568: rename mipi_dphy to video_phy
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: Ie019c9d27e06328d45920d41c0a065f8bc47588f
2021-07-06 16:53:47 +08:00
Guochun Huang
a4bbfc35fd phy/rockchip: inno-dsidphy: add LVDS/TTL support
Change-Id: I9ae338ebd3afcd56a1dc4ed9e15347b48507c5e1
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-06 16:53:36 +08:00
Wyon Bi
022001e45d drm/panel: simple: support transmit DSI packet
Change-Id: I1a11ef4d914d161f354b783d833d5afb48bc3074
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-06 16:49:42 +08:00
Wyon Bi
12353d7243 drm/panel: simple: Add reset gpio
Change-Id: I12a4495a5897535b2a2fe8117a626ee7639dfef0
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-06 16:13:58 +08:00
Guochun Huang
d75f6df07e drm/rockchip: dsi: make rk356x series drive pixdata on posedge
fix the dclk polarity in the driver to avoid incorrect
configuration, even if we can configure through attribute
pixelclk-active in dts.

Change-Id: Ie3861206d2f6312ef252df87ecb49dd7d5f0ba9b
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-06 16:13:05 +08:00
Guochun Huang
a695fea288 drm/rockchip: dsi: lane_mbps should be the same rate as PLL can separate
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I4d2c9d31c3f0bf7f0fa1bf2830c551d89fc3d469
2021-07-06 16:12:54 +08:00
Guochun Huang
4d806060d6 arm64: rockchip_defconfig: Enable CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY
CONFIG_PHY_ROCKCHIP_INNO_VIDEO_COMBO_PHY is replaced by
CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY.

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I62fd3fd633b38bc7c9ff74b125743d22c1042284
2021-07-06 16:12:03 +08:00
Guochun Huang
45963f36a7 phy/rockchip: inno-dsidphy: add rk3568 dsi dphy support
Change-Id: Icc0be1ebbb4c41b1046c142f9fa70efa7519b526
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-06 16:10:09 +08:00
Wyon Bi
8c5e5dbba6 drm/rockchip: dsi: Add support for rk3568
This patch adds support for Synopsys Designware MIPI DSI host IP
used on RK3568 SoC.

Change-Id: Ie3bed6bf8cebf32d9fb3e26ad71eba393cbdffe8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2021-07-06 16:07:26 +08:00
Tao Huang
df1b255055 arm64: rockchip_defconfig: Enable CONFIG_BOOT_CONFIG
According to gki commit b4518aa55c ("ANDROID: GKI: Enable BOOT_CONFIG").

To enable androidboot.<name> and other parameters to be passed through
it, instead of abusing the kernel cmdline.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I0a6cb5c38d949b9bcaa7e70eccc6f191eecc3d91
2021-07-05 16:19:44 +08:00
Wyon Bi
94e5981901 drm/rockchip: analogix_dp: Add support for external bridge
The current output code only supports connection to drm panels.
Add code to support drm bridge, to support connections to
external connectors.

Change-Id: I775244b7183692f07b74123fa43c8bb958525087
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:28:26 +08:00
Wyon Bi
d177813589 drm/rockchip: analogix_dp: Accept drm_of_find_panel_or_bridge failure
Not having an endpoint bound in DT should not cause a failure here,
there are fallbacks. So explicitly accept a missing endpoint.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Iea7e2456de05b76cf6d94232ab9bb75425cfffc0
2021-07-05 15:28:20 +08:00
Wyon Bi
f963ba7784 drm/bridge: analogix_dp: Add optional LCD panel self test
Many TCON devices include an embedded LCD panel self-test mode.
This mode is designed to help system integrators identify
the root cause of abnormal display operation, without the use of
complicated debug tools.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I19770c7488d43e2486c5fde5cc0a5b345e5be0eb
2021-07-05 15:28:13 +08:00
Wyon Bi
5d2f3f959e drm/bridge: analogix_dp: Compliant with eDP receiver enhanced frame capability
On an eDP connection, the eDP sink must operate only in Enhanced Framing
Mode. The Source must send only Enhanced Framing on the main link, and
must only write a '0' to DPCD 00101h: LANE_COUNT_SET Bit 7:
ENHANCED_FRAME_EN bit.

Independent of method used, DP1.2-compliant eDP Receivers shall indicate
any eDP protocol differentiation method they support through the
Receiver Capability Field of DPCD (DPCD:0000Dh).

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I38e30426924bed531047a2d41b812d697d9f9838
2021-07-05 15:28:05 +08:00
Wyon Bi
9622f2d0f1 drm/bridge: analogix_dp: disable PSR feature by default
Panel Self Refresh (PSR), originally introduced in eDP v1.3, is an
optional feature for Source and Sink devices.

Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I39c357d7caefc087241407a7d6b452e47e16eb9a
2021-07-05 15:27:59 +08:00
Wyon Bi
0d0f8a70ae drm/rockchip: analogix_dp: Add audio support
Change-Id: Ib611037f497a0758bd2b6a312155562a719fe15f
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:27:53 +08:00
Wyon Bi
ada06fcdb5 drm/bridge: analogix_dp: Add bankwidth check
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ia2f2e53cd0b16ca6401e53f949b8746f3be15dfc
2021-07-05 15:27:47 +08:00
Wyon Bi
c7530c70e4 drm/bridge: analogix_dp: Fix enhanced framing capability in fast training
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: Ib192b52e2421d558c4c7fd5e6683bbaf99a43d5c
2021-07-05 15:27:42 +08:00
Wyon Bi
6f131cd6df drm/bridge: analogix_dp: Add support for panel EDID
Change-Id: I7caba18fb979ad2b8f419c58f989b27d3e756ebf
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:27:35 +08:00
Wyon Bi
8c15e0b8c5 drm/bridge: analogix_dp: Fix hpd handling for GPIO
Change-Id: I0d62201095ab82f5ed0ddcfd53abaef6089a2e9d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:27:29 +08:00
zain wang
ec64749b4e FROMLIST: drm/bridge: analogix_dp: Don't return -EBUSY when msg->size is 0 in aux transaction
The analogix_dp_transfer() will return -EBUSY if num_transferred is zero.
But sometimes we will send a bare address packet to start the transaction,
like drm_dp_i2c_xfer() show:
	......
	/* Send a bare address packet to start the transaction.
	 * Zero sized messages specify an address only (bare
	 * address) transaction.
	 */
	msg.buffer = NULL;
	msg.size = 0;
	err = drm_dp_i2c_do_msg(aux, &msg);
	......

In this case, the msg->size is zero, so the num_transferred will be zero too.
We can't return -EBUSY here, let's we return num_transferred if num_transferred
equals msg->size.

BUG=chrome-os-partner:57501
TEST="gooftool probe --comps display_panel"

Change-Id: Ie09f26b2c31e2406d21233afd8677337de5e77f2
Signed-off-by: zain wang <wzz@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9569045/)
Reviewed-on: https://chromium-review.googlesource.com/414674
Commit-Ready: Caesar Wang <wxt@rock-chips.com>
Tested-by: 征增 王 <wzz@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
2021-07-05 15:27:23 +08:00
Wyon Bi
0173eec295 drm/rockchip: analogix_dp: Add support for rk3568
This patch adds support for Analogix eDP TX IP used on RK3568 SoC.

Change-Id: Ieb89906cba5bc569ed8c476fecd00f6035a7f582
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:26:37 +08:00
Wyon Bi
6d45fa9b4d drm/bridge: analogix_dp: Move PLL lock check to analogix_dp_set_link_bandwidth()
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I7c094f84d7aeb2a9e8b8343c634bb8a01ab8e5dd
2021-07-05 15:05:18 +08:00
Wyon Bi
d9e410b03c drm/bridge: analogix_dp: Simplify analogix_dp_{set/get}_lane_link_training helpers
Change-Id: I53231fba491c7e10fbdfdbaf0c74c2ca57eaf76e
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:05:09 +08:00
Wyon Bi
5639c343b0 drm/bridge: analogix_dp: Don't handle adjust request if clock recovery is already ok
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I44aa6678285607c838cb8c27dc566349a17d59c5
2021-07-05 15:04:58 +08:00
Wyon Bi
e17b120e85 drm/bridge: analogix_dp: Add runtime PM callback to handle clock
Ensure the pclk is enabled when register access occurs.

Change-Id: Id108a04aed8424725dcc02dec9fe46bfc724c09b
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:04:47 +08:00
Wyon Bi
33f5d1439f drm/bridge: analogix_dp: Workaround async issue between pclk clock and 24m clock
Background:
- EDP software register bank is on the EDP 24m clock domain;
- CPU access EDP software register bank, need to go through EDP APB
  read/write bus and EDP internal read/write bus;
- EDP APB read/write bus is on the EDP pclk clock domain;
- EDP internal read/write bus is on the EDP 24m clock domain;
- Asynchronous logic circuit is added between APB read/write bus and
  Internal read/write bus;

Issue:
There is a bug on the Asynchronous logic circuit between APB read/write
bus and Internal read/write bus; This bug will be random to cause the
following wrong control/address signals sequence happen;
- For write, maybe wrong register address is wrote in;
- For read, maybe wrong register address is read out;

Workaround:
- For CPU write EDP register operation, write any register need
following three steps,
1): Read EDP_BASE+0x00 dummy register firstly, latch the dummy
register address on Reg_Address bus, to avoid next step write to
wrong register to cause function register overrun;
2): 1st time to write the EDP register you want to operate,
to latch the real write address on Reg_Address bus;
3): 2nd time to write the EDP register you want to operate,
to make sure the data is write on the real write address;
- For CPU read EDP register operation, read any register need following
two steps,
1): 1st time to read the EDP register you want to operate, to latch
the real read address on Reg_Address bus;
2): 2nd time to read the EDP register you want to operate, to make
sure the data is read out from the real read address;

Change-Id: I4a87d3883efe94d32ccf8809edb5b9d869670d2d
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 15:02:27 +08:00
Wyon Bi
a6e872aae1 drm/bridge: analogix_dp: set IRQ_NOAUTOEN to the irq flag
The interrupt is requested before the device is powered on and
it's value in some cases cannot be reliable. It happens on some
devices that an interrupt is generated as soon as requested
before having the chance to disable the irq.

Change-Id: I889c069239d005ab0a3fb4eb36123608ec81d9ab
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
2021-07-05 14:57:04 +08:00