Commit Graph

1056252 Commits

Author SHA1 Message Date
Kieran Bingham
4b81d4e560 FROMLIST: drm: Extend color correction to support 3D-CLU
Extend the existing color management properties to support provision
of a 3D cubic look up table, allowing for color specific adjustments.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Co-developed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Change-Id: I0bda1203a10f0df978b767d29baf06b390c0867e
Link:
https: //lore.kernel.org/dri-devel/20201221015730.28333-4-laurent.pinchart+renesas@ideasonboard.com/
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-05-25 11:47:38 +08:00
Andy Yan
c8810126c8 drm/rockchip: Add vop output interface id
Before vop 2.0, the display sub system only
support one RGB/LVDS/eDP/HDMI/MIPI connector
for one vop, so we can find which output interface
should be enabled by output_type(DPI/LVDS/HDMI).

But for the VOP 2.0 display subsystem, we may
have two connector (LVDS/eDP/HDMI/MIPI) of the
same output_type(HDMI0,HDMI1) enabled at same time,
so the output_type is not enough to give the interface
information, we need to know HDMI0 or HDMI1, eDP0 or eDP1
should be enabled.

So we add output interface id here, every connector
driver should set it correctlly to tell vop driver
to enable the corresponding output interface.

Change-Id: Ic22863f0f18f160b0df7d8f4c3b71b17ef987ea9
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-05-25 11:45:29 +08:00
Andy Yan
e31c04ec78 drm/rockchip: vop2: Dump all connectors on crtc
Change-Id: I4fea3d14f50aa6bfbf9cc8e2d62e4cad12cc36e0
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
2021-05-25 11:45:29 +08:00
Elaine Zhang
988808a139 clk: rockchip: add clock controller for rk1808
Add the clock tree definition for the new rk1808 SoC.

Change-Id: I86e502b27e0695c77e9937dfd7cffa14b5711954
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-21 18:13:21 +08:00
Elaine Zhang
815c9a084e rtc: hym8563: set init time
remove the buf[0] & HYM8563_SEC_VL, it's unsuitable for some hym8563.
set rtc init time for first power on.

Change-Id: Iaa207d554d9df9ad8f138fc2f196c8a7a991b141
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-20 20:43:43 +08:00
Elaine Zhang
9ec5db66aa clk: add COMMON_CLK_PROCFS to support clk debug
Add /proc/clk/
summary: dump clk tree
rate: set clk rate by clk name
enable: enable/disable clk by clk name
parent: set clk parent

Change-Id: Iea0570e74a410a05b3bd29dcd2816dd1320d4ff5
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-20 20:43:22 +08:00
Finley Xiao
1624507bd6 thermal: rockchip: Support RK3568 SoCs in the thermal driver
The RK3568 SoCs have two Temperature Sensors, channel 0 is for CPU,
channel 1 is for GPU.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I0dde1dabfbc1bf44ca203cfdea896ca0c05dfadf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-20 18:41:43 +08:00
Elaine Zhang
086c9d2846 thermal: rockchip: add tsadc calibration for rv1126 soc
Get the calibration parameters for each chip by reading the OTP,
Calculate temperature using calibration parameters.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I05cfb65ae95dcefc7fc52ed91326c7da9d27de55
2021-05-20 18:40:10 +08:00
Elaine Zhang
766d87537b thermal: rockchip: Add new functions for RV1126
RV1126 tsadc bandgap chopper function should be configured,
add a new initialize function to handle this for RV1126 SoCs.
RV1126 tshut mode also need select the tshut type in GRF regs,
add a new set mode function to handle this for RV1126 SoCs.

Change-Id: I81106539362bc32e0d8aaeeb0398d1bcb33b6b60
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-20 18:37:36 +08:00
Elaine Zhang
0dd59e559a thermal: rockchip: Support the RV1126 SoC in thermal driver
RV1126 SOC has two independent Temperature Sensors for CPU and NPU.
RV1126 TSADC clock design has been updated, added the PHY clock,
using the group managed clocks.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I395daa3b591390980a11ea7eed827c0e297f6ebe
2021-05-20 18:35:49 +08:00
Elaine Zhang
0ddd45d54c thermal: rockchip: fix up the thermal panic block
Fixed the panic reloads when there are multiple thermal devices.

Change-Id: Ia08b0bfec940be089440b9246cc1abf9626c19a7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-20 18:34:53 +08:00
Elaine Zhang
f5bf680d2d dt-bindings: rockchip-thermal: Support the RV1126 SoC compatible
Add a new compatible for thermal founding on RV1126 SoC.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I84e7ca521f4edce9516575bd54709326e62fc85c
2021-05-20 18:33:25 +08:00
Elaine Zhang
7631249708 thermal: rockchip: add pinctrl control
Based on the TSADC Tshut mode to select pinctrl,
instead of setting pinctrl based on architecture
(Not depends on pinctrl setting by "init" or "default").
And it requires setting the tshut polarity before select pinctrl.

Change-Id: Iac9ca05073b0181ee13b0048d0c2a54204f82bca
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-20 18:32:43 +08:00
Elaine Zhang
c64efffd36 FROMLIST: clk: rockchip: fix rk3568 cpll clk gate bits
The cpll clk gate bits had an ordering issue. This led to the loss of
the boot sdmmc controller when the gmac was shut down with:
`ip link set eth0 down`
as the cpll_100m was shut off instead of the cpll_62p5.
cpll_62p5, cpll_50m, cpll_25m were all off by one with cpll_100m
misplaced.

Fixes: e9ac850b88 ("clk: rockchip: add clock controller for rk3568")

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://patchwork.kernel.org/project/linux-clk/patch/20210519174149.3691335-1-pgwipeout@gmail.com/
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I012bdbdc44c4e8de1b42a00c2a9bffb7bd66faef
2021-05-20 10:05:33 +08:00
Elaine Zhang
736782477e dt-bindings: thermal: rockchip-thermal: Support the RK1808 SoCs compatible
This patch set attempts to new compatible for thermal founding
on RK1808 SoCs.

Change-Id: I133218cd958e0aabf711a5d22fe5e5da2fbd59ce
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 17:25:05 +08:00
Elaine Zhang
52d92252ce thermal: rockchip: add pinctrl control
Based on the TSADC Tshut mode to select pinctrl,
instead of setting pinctrl based on architecture
(Not depends on pinctrl setting by "init" or "default").
And it requires setting the tshut polarity before select pinctrl.

Change-Id: Ieb181ec19dedbbfb7aef474b3558aac867e668eb
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 17:25:05 +08:00
Rocky Hao
b6d5f24ad5 thermal: rockchip: add shutdown callback function
Tsadc has a tshut pin which is designed to reset the pmic or soc,
when the temperature inside soc is too high. we should switch off
the tshut function and change the pin to gpio function in reboot
process, eg, software reset. If not, the tsadc module will WRONGLY
pull high the tshut pin during its reset process and then WRONGLY
reset the pmic or soc, which incurred a hardware reset. The hardware
reset will reset everything inside soc, even includes the power on
reason flag, which is set by software before reboot process.

we also change over-temperature protection mode to cru mode,
since the tshut pin have be changed to gpio function.

Change-Id: Iac3dacf55a4b5536fccd2eb05a6a9e6923a082c0
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 17:25:05 +08:00
Elaine Zhang
aa026b7cf8 thermal: rockchip: add tsadc support for rk1808
Change-Id: Icc0bb8a076a3fbd5f8ab70db8d7e032165528ae8
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 17:25:05 +08:00
Elaine Zhang
0e37cc4574 ARM: dts: rockchip: remove regulator-xxx-microvolt for SWITCH pmic node on rk3288-vyasa
Switch is just a function of switching. There is no voltage setting
function. Voltage getting is the supply voltage.

Fixes: aea6cb9970 ("regulator: resolve supply after creating
regulator")
Change-Id: I22ff04b59b9b051052348420f25999dae424d4ac
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:50:20 +08:00
Elaine Zhang
a3da190248 dt-bindings: power: add binding for rv1126 power domains
Add binding documentation for the power domains
found on Rockchip RV1126 SoCs.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Icf38d7a8fa44abf119e57a66ceddc1a01872facf
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:45:00 +08:00
Elaine Zhang
c060385630 dt-bindings: rockchip: add the power domains for rk1808 SoCs
Change-Id: I6da9acfddfae1ecfa66adb1deba46b6de448ef35
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:44:38 +08:00
Elaine Zhang
ba3959aef3 dt-bindings: regulator: Document Rockchip RK860X regulators
Document the regulator and add a rockchip vendor-prefix.

Change-Id: I3084f2083644e30145ccda2e13e2e81c6470797a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:42:38 +08:00
Elaine Zhang
8a55843716 clk: rockchip: rk3036: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ic60f491d549e030490c14ea78f4857a8cead596d
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:29:17 +08:00
Elaine Zhang
40a55dc2a4 clk: rockchip: rk3128: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I7f9bc78deef60b1fa48bada5b1a6203185ddce48
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:29:12 +08:00
Elaine Zhang
562e25f49e clk: rockchip: rv1108: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ic4efc985892cbcc5e561203fe8e00dba116439e7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:29:07 +08:00
Elaine Zhang
d6dd9a5f48 clk: rockchip: rk3228: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: Ide2c3e8add083934672f6d22d8182bcfde046783
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:29:02 +08:00
Elaine Zhang
080a0407fb clk: rockchip: rk3288: add cru regs dump for panic
Add cru regs dump when system panic.
It's just for debug.

Change-Id: I86ff4f12ed932431d131d22a307360418e2e9f40
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:28:56 +08:00
Elaine Zhang
e952ee0800 ARM: dts: rockchip: mark xin32k clk as fixed clk on rk3036-kylin
Change-Id: I5bf0a64502a7dd7b36545437b1675bb896c97bce
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:28:20 +08:00
Elaine Zhang
26e7afc9d3 arm64: dts: rockchip: mark xin32k clk as fixed clk on rk3328 boards
Change-Id: I25ab72ba7af64b7031fb02d30d0cb5cb6798d692
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-19 14:26:55 +08:00
Elaine Zhang
c325887a73 clk: rockchip: add support for pvtm clk
add pvtm 32K internal clock setting and select enable.

Change-Id: I60225d29e16c5b96f285623260bea475c78a026a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:37 +08:00
Elaine Zhang
560a4400a0 clk: rockchip: rk3036: fix up the sclk_sfc parent error
Change-Id: I0903161f34de8f309392bec6926348ffe37ba2f6
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:37 +08:00
Elaine Zhang
e328740e28 clk: rockchip: rk3308: Use MUXTBL to cover Mux selects priorities
Change-Id: I14d08f3b98b1dcaf1c9e4b9114ebd103e2dc51c9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:37 +08:00
Elaine Zhang
35e637b1a5 clk: rockchip: rk3128: add hclk_sfc
Change-Id: I20d0975156dc73bcdd02c09b7ecb815d5aca6bc6
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:37 +08:00
Elaine Zhang
4124fe9936 clk: rockchip: rk3128: fix up the hclk_vio clk description
set hclk_vio_niu as critical clock.

Change-Id: Ib9e182ac93038df34eadae502fc18df5c0854ef9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:37 +08:00
Elaine Zhang
987f984d07 clk: rockchip: rk3288: add the condition of the call register_syscore_ops
The pwm clk parent is GPLL,PWM clk not allowed to change freq,
so the GPLL not allowed change mode and freq  when pwm is used.
If have trust is need't rk3288_clk_suspend and rk3288_clk_resume.

Change-Id: I4845fda89d7ae7713e8c0e94747c3f4dfd140c6a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:37 +08:00
Elaine Zhang
b4f6be2aa3 clk: rockchip: rk3288: mark pclk_peri as critical clk
Avoid disable the parent clock after the child clock has disabled.

Change-Id: I1ea91afe0b6bbefd3a5d8e88641e4a3af5a368a4
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
6ef83c562e clk: rockchip: rk3288: fix up the 594M pll vco
Modify VCO within safe limits(600M-3200M).
mark refdiv = 1

Change-Id: I76b69091ee1ff9a0d88f17a1e4dabda6e267caad
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
acc21855ff clk: rockchip: rk3288: mark the aclk_dmac1 as critical clk
crypto and dmac share the same noc clk,
so mark the aclk_dmac1 as critical clk.

Change-Id: I34a4a7cc532a385086679fafb961a47b0a6abc3b
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
9322b4700a clk: rockchip: rk3288: export PCLK_PD_PMU and PCLK_PD_ALIVE clock id
Change-Id: Ie0550d9528367fa070328562fad2e597a5d6d7f7
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
9f6d1e6688 clk: rockchip: rk3328: Update the h264 and h265 clocks
fixed up the h264 and h265 clk tree change:
old:
aclk_rkvenc-->
        --> aclk_h265
        --> aclk_h264
        --> aclk_axisram
        --> hclk_rkvenc -->
       		 --> hclk_265
                 --> hclk_264
new:
sclk_venc_core-->
	--> aclk_h265
	--> aclk_h264
	--> aclk_axisram
	--> hclk_venc -->
		 --> hclk_265
		 --> hclk_264

Change-Id: I3d4b61fe545ecfc2353cb2993245fc813739084a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
81ec72e4a5 clk: rockchip: rk3328: add flag CLK_IGNORE_UNUSED for hclk_vop_niu
Change-Id: I770a83ad357f18d3258755b6c1d43ef82248951e
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
9804ea0266 clk: rockchip: rk3228: fix up the description error
Change-Id: I439314c590a7144fab6e33d1fb4f325530669842
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
43ee3bb5a0 clk: rockchip: rk3228: Perfect clock description
1 Add some necessary clk ID.
2 some clks add CLK_IGNORE_UNUSED flag
3 add some critical clk

Change-Id: If52699b4d5f430413b06084b7d21fb1afd4539dd
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
c86aa0a6b3 clk: rockchip: rk3368: use COMPOSITE_DCLK for dclk_vop
Change-Id: I45ce9a2e404acb7eae885fbca0b4703ec67176e9
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
2145f9dccb clk: rockchip: rk3368: mark the aclk_dmac_bus as critical clk
crypto and dmac share the same noc clk,
so mark the aclk_dmac_bus as critical clk.

Change-Id: Ib0b70bbed3fdefeab7b6f2b5f88350a416e66787
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
781056b84d clk: rockchip: rk3368: set clk parent npll to dummy_npll
npll is just for dclk_vop, others clk not allowed to set npll as parent.

Change-Id: I11e1770acab5486acaebafd56a0c57847f7f533c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
e2def67cb9 clk: rockchip: rk3368: fix NPLL with NB parameter types RK3066_PLL_RATE_NB
with the NB parameter,can adjust the jitter of the output PLL.
make the npll jitter is better,make it more suitable for DCLK display.

Change-Id: I9d819bdc2b520205a7d63ee8ed83643601ccc821
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
b1d64bdb31 clk: rockchip: rk3368: add aclk_cci_pre ID
Change-Id: I855e79023a9e244c2db37af88a075a4ef4c36aec
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
e7ebb13742 clk: rockchip: rk3368: add CLK_SET_RATE_PARENT flag for dclk_vop
dclk_vop only allowed on NPLL.

Change-Id: I5325a530d3052de1e8685c39b90357291f0f4fb3
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:36 +08:00
Elaine Zhang
a3ddb728c4 clk: rockchip: rk3368: add CLK_IGNORE_UNUSED flag for mcu clk
Change-Id: I27856c9523ac3bffd4b509f016a659a1e3094b41
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2021-05-18 20:33:35 +08:00