Commit Graph

1073708 Commits

Author SHA1 Message Date
Sugar Zhang
645df41e1c arm64: dts: rockchip: rk3562: Use mclk{out,in}_saix for devices
e.g.

1. mclkout_sai0:

  &ext_codec {
      clocks = <&mclkout_sai0>;
      clock-names = "mclk";
      assigned-clocks = <&mclkout_sai0>;
      assigned-clock-rates = <12288000>;
      pinctrl-names = "default";
      pinctrl-0 = <&i2s0m0_mclk>;
  };

  clk_summary on sai0 work:

  cat /sys/kernel/debug/clk/clk_summary | egrep "pll|sai0"

  clk_sai0_src                1        1        0  1188000000          0     0  50000
    clk_sai0_frac             1        1        0    12288000          0     0  50000
      clk_sai0                1        1        0    12288000          0     0  50000
        mclk_sai0             1        1        0    12288000          0     0  50000
          mclk_sai0_out2io    1        1        0    12288000          0     0  50000
            mclk_sai0_to_io   1        1        0    12288000          0     0  50000

2. mclkin_sai0:

  &ext_codec {
      clocks = <&mclkin_sai0>;
      clock-names = "mclk";
      assigned-clocks = <&cru CLK_SAI0>;
      assigned-clock-parents = <&mclkin_sai0>;
      pinctrl-names = "default";
      pinctrl-0 = <&i2s0m0_mclk>;
  };

  clk_summary on sai0 work:

  cat /sys/kernel/debug/clk/clk_summary | egrep "pll|sai0"

  mclk_sai0_from_io          1        1        0    12288000          0     0  50000
    clk_sai0                 1        1        0    12288000          0     0  50000
      mclk_sai0              1        1        0    12288000          0     0  50000
        mclk_sai0_out2io     0        0        0    12288000          0     0  50000
          mclk_sai0_to_io    0        0        0    12288000          0     0  50000

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ib8441bfd0dbb69353a6492f2d406b29a26d1dba0
2023-02-21 09:50:13 +08:00
Sugar Zhang
afa07cbc46 arm64: dts: rockchip: rk3562: Add mclk{out,in}_saix device nodes
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iff3f55286d1e209929c9667871c0f06842a4d7d1
2023-02-21 09:50:13 +08:00
Sugar Zhang
b3cfac5e37 clk: rockchip: Add support for clk input / output switch
This patch add support switch for clk-bidirection which located
at GRF, such as SAIx_MCLK_{IN OUT} which share the same pin.
and these config maybe located in many pieces of GRF,
which hard to addressed in one single clk driver. so, we add
this simple helper driver to address this situation.

In order to simplify implement and usage, and also for safety
clk usage (avoid high freq glitch), we set all clk out as disabled
(which means Input default for clk-bidrection) in the pre-stage,
such boot-loader or init by HW default. And then set a safety freq
before enable clk-out, such as "assign-clock-rates" or clk_set_rate
in drivers.

e.g.

1. mclk{out,in}_sai0 define:

  mclkin_sai0: mclkin-sai0 {
      compatible = "fixed-clock";
      #clock-cells = <0>;
      clock-frequency = <12288000>;
      clock-output-names = "mclk_sai0_from_io";
  };

  mclkout_sai0: mclkout-sai0@ff040070 {
      compatible = "rockchip,clk-out";
      reg = <0 0xff040070 0 0x4>;
      clocks = <&cru MCLK_SAI0_OUT2IO>;
      #clock-cells = <0>;
      clock-output-names = "mclk_sai0_to_io";
      rockchip,bit-shift = <4>;
      //example with PD if reg access needed
      power-domains = <&power RK3562_PD_VO>;
  };

Note:

clock-output-names of mclkin_sai0 should equal to strings in drivers. such as:

drivers/clk/rockchip/clk-rk3562.c:
PNAME(clk_sai0_p) = { "clk_sai0_src", "clk_sai0_frac", "xin_osc0_half", "mclk_sai0_from_io" };

2. mclkout_sai0 usage:

  &ext_codec {
      clocks = <&mclkout_sai0>;
      clock-names = "mclk";
      assigned-clocks = <&mclkout_sai0>;
      assigned-clock-rates = <12288000>;
      pinctrl-names = "default";
      pinctrl-0 = <&i2s0m0_mclk>;
  };

  clk_summary on sai0 work:

  cat /sys/kernel/debug/clk/clk_summary | egrep "pll|sai0"

  clk_sai0_src                1        1        0  1188000000          0     0  50000
    clk_sai0_frac             1        1        0    12288000          0     0  50000
      clk_sai0                1        1        0    12288000          0     0  50000
        mclk_sai0             1        1        0    12288000          0     0  50000
          mclk_sai0_out2io    1        1        0    12288000          0     0  50000
            mclk_sai0_to_io   1        1        0    12288000          0     0  50000

  example with PD if reg access needed:

  * PD status when mclk_sai0_to_io on:

  cat /sys/kernel/debug/pm_genpd/pm_genpd_summary

  domain                          status          children
    /device                                                runtime status
  ----------------------------------------------------------------------
  ...

  vo                              on
    /devices/platform/clocks/ff040070.mclkout-sai0         active
  ...

  * PD status when mclk_sai0_to_io off:

  cat /sys/kernel/debug/pm_genpd/pm_genpd_summary

  domain                          status          children
    /device                                                runtime status
  ----------------------------------------------------------------------
  ...

  vo                              off-0
    /devices/platform/clocks/ff040070.mclkout-sai0         suspended
  ...

3. mclkin_sai0 usage:

  please override freq of mclkin as the real external clkin, such as:

  &mclkin_sai0 {
      clock-frequency = <24576000>;
  }

  &ext_codec {
      clocks = <&mclkin_sai0>;
      clock-names = "mclk";
      assigned-clocks = <&cru CLK_SAI0>;
      assigned-clock-parents = <&mclkin_sai0>;
      pinctrl-names = "default";
      pinctrl-0 = <&i2s0m0_mclk>;
  };

  clk_summary on sai0 work:

  cat /sys/kernel/debug/clk/clk_summary | egrep "pll|sai0"

  mclk_sai0_from_io          1        1        0    12288000          0     0  50000
    clk_sai0                 1        1        0    12288000          0     0  50000
      mclk_sai0              1        1        0    12288000          0     0  50000
        mclk_sai0_out2io     0        0        0    12288000          0     0  50000
          mclk_sai0_to_io    0        0        0    12288000          0     0  50000

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ibe8286bb98ea1fc3bc6421c30f6e46fc0b1b0d88
2023-02-21 09:50:13 +08:00
Sugar Zhang
35b202eb29 clk: rockchip: rk3562: Fix mclkin_saix clk name
Should be explicit direction for mclkin, such as "mclk_sai0_from_io"
instead of "mclk_sai0_io".

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I6a4a3ecad527c610cc1577faca169588545f0765
2023-02-21 09:50:13 +08:00
Jason Zhu
5394193532 ASoC: rockchip: pdm: fix channel disorder
Fix channel disorder caused by "ASoC: rockchip: pdm: Fix pop noise
in the beginning".

The PDM device need to delete some unused data since the pdm of
various manufacturers can not be stable quickly. This is done by
commit "ASoC: rockchip: pdm: Fix pop noise in the beginning".

But we do not know how many data we delete, this cause channel
disorder. For example, we record two channel 24-bit sound, then
delete some starting data. Because the deleted starting data is
uncertain, the next data may be left or right channel and cause
channel disorder.

Luckily, we can use the PDM_RX_CLR to fix this. Use the PDM_RX_CLR
to clear fifo written data and address, but can not clear the read
data and address. In initial state, the read data and address are
zero.

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: I248744c7982365adeb23aa516cf5bed346f4beaf
2023-02-20 20:21:51 +08:00
Guochun Huang
7cfd42e08c drm/rockchip: dsi2: fix mode valid func when work in dual channel dsi
Change-Id: Ib26202b9fdd908c9a3dd7d2f50f407a7c8f63c46
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-02-20 15:01:41 +08:00
Wangqiang Guo
0d285d7f91 arm64: dts: rockchip: rk3562-evb: support IR remote ctrl.
Change-Id: Iea742c38e0e4fd62ff8664cc479475f5939f08ef
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
2023-02-20 14:26:02 +08:00
Jon Lin
f67f48f039 phy: rockchip-naneng-combo: Support phy grf reset
1.Assert phy-reset via PIPEPHY GRF instead of asserting via CRU that
would be useless when PD_PHP is off.
2.RK3562 change to use phy grf reset

Change-Id: Id30e8bf28c0bb8d30bab27ad069201978ec74785
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-02-20 14:21:04 +08:00
XiaoTan Luo
5fb123e773 ARM: dts: rockchip: set 128 mclk-fs for spdiftx
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I9725660493739f080b0c5b3d7714ba9545fb975e
2023-02-20 10:32:44 +08:00
XiaoTan Luo
bc1ebbaed7 arm64: dts: rockchip: set 128 mclk-fs for spdiftx
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Change-Id: I170bb55c9e093693c642a8b750971362c2a7de3f
2023-02-20 10:32:23 +08:00
Steven Liu
9ecef75fd6 arm64: dts: rockchip: rk3562-amp: protect TIMER4 and UART7M1
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: I220e00435cbd3a771f4286cb97d8bbfa5427cd7f
2023-02-17 18:47:40 +08:00
Cai YiWei
91ef5c438c media: rockchip: isp: dvfs for multi dev on/off
Change-Id: I5ba04caebbaafd49d86bc615d1d69ea6ab2b9343
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-02-17 18:47:21 +08:00
XiaoDong Huang
ec0076dc3b soc: rockchip: pm-config: support sleep config for mem_lite/mem_ultra
sleep-mode-config-mem-lite = <...> is mode_config for mem_lite.
wakeup-config-mem-lite = <...> is wakeup_config for mem_lite.
sleep-mode-config-mem-ultra = <...> is mode_config for mem_ultra.
wakeup-config-mem-ultra = <...> is wakeup_config for mem_ultra.

Change-Id: If41ef73d8075c9e74b87a0ebf1634622e5625db3
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2023-02-17 18:43:41 +08:00
XiaoDong Huang
2ae2025cb0 soc: rockchip: pm-config: simplify parse_on_off_regulator
Change-Id: I47f92ed326a4c813a6be83a82761b427e2ca4065
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
2023-02-17 18:43:41 +08:00
Sandy Huang
0c94163666 drm/rockchip: vop3: rk3528: fix filter mode define error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: I0695947cf5389a473f586e100dc1ed30fb806537
2023-02-17 17:06:27 +08:00
Yifeng Zhao
494eee4070 mmc: sdhci-of-dwcmshc: Sync code with kernel 4.19
1. remove execute_tuning api
2. remove RK_RXCLK_NO_INVERTER for RK3528 and RK3562
3. set strbin tap to 3 for RK3528 and RK3562
4. fixed tap value by software
5. Disable output clock while config DLL

Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Icad745d09a0fad37ec58d2071ba780b9749d1c16
2023-02-17 14:22:21 +08:00
Jon Lin
0bd9d79eb9 arm64: dts: rockchip: rk3562: Assign spi0 sclk_in to SCLK_IN_PMU1_SPI0
Change-Id: I574752dc3509df2307322b934da6939d590c4fba
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2023-02-17 10:21:46 +08:00
Cai YiWei
ebb21b9936 media: rockchip: ispp: fec support in out diff size
Change-Id: I469876b24fb96a856703625a0bec23d2e0dbd3e5
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2023-02-16 18:45:29 +08:00
Zhen Chen
ccf3f0670c MALI: bifrost: from ARM: Remove references to PageMovable()
The original patch is attached in the mail of Zhigang.Yao@arm.com at 2023-02-08 09:00.

Commit message in the original patch:
{
From d1245d8578ba6ae4fb1b0f70417a97ea6afa920d Mon Sep 17 00:00:00 2001
From: Raffaele Aquilone <raffaele.aquilone@arm.com>
Date: Thu, 19 Jan 2023 15:26:12 +0000
Subject: [PATCH] GPUCORE-36657 Remove PageMovable() symbol

The PageMovable() function has been removed from the DDK because
it cannot be used in Android. The movable status of the page has
been duplicated into the status variable of the page metadata,
and it's kept up to date every time the movable property is set or
cleared, except in those cases where it's not necessary to keep
alive the information.

The unit test that attempts to migrate a firmware page has been
removed because now the driver has no way to detect that a page
without metadata is not movable; the driver has to trust that
the system doesn't try to isolate pages which are not movable.
...
}

Its base is not current g15.
I applied it manually on DDK g15.

Change-Id: I7e8a29f3ce79d991bc8b3a746690e9ef279e572a
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
2023-02-16 18:19:50 +08:00
Sugar Zhang
454734f2dc ASoC: rockchip: pdm: Explicit info for Multi-DAI
It's helpful for user to observe the DAI path by kmsg.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I4e4e0c784a70d19b2b3c05d7fa424022e79a94ba
2023-02-16 14:12:36 +08:00
Sugar Zhang
0648aa45ac ASoC: rockchip: i2s: Explicit info for Multi-DAI
It's helpful for user to observe the DAI path by kmsg.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iebf69a9ecbca5fe6a98ca1512ea549c67f18cdff
2023-02-16 14:12:36 +08:00
Sugar Zhang
9a673d9b48 ASoC: rockchip: i2s-tdm: Explicit info for Multi-DAI
It's helpful for user to observe the DAI path by kmsg.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I60baaf787551362994c2bcb58a1c2d7c21bd23d4
2023-02-16 14:12:36 +08:00
Sugar Zhang
1b6481bb65 ASoC: rockchip: multicodecs: Fix the jack assignment
Set jack for the first successful one to fix the disorder
codec assignment.

And of course, we suggest user to place the one which use
the jack in the first place in Device Tree.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I8dc5d95ba73c053a599d95c0448042fd04765c05
2023-02-16 14:12:36 +08:00
Sugar Zhang
b7494b0ea9 ASoc: rockchip: multicodecs: Set sysclk for all sub codecs
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I86c47651bb456a066c80d688afddd078ffe0389e
2023-02-16 14:12:36 +08:00
Sugar Zhang
53c5baa3cd ASoC: rk817: Fix wrong component assignment
Should use dai->component instead of the fixed rtd->codec[0],
because codec may be addressed in multi-codecs situation,
Obviously, it's wrong. the dais' one is always RIGHT.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I97cd09aa0886e2b89f2c2f257defb228168e93b0
2023-02-16 14:12:36 +08:00
Sugar Zhang
150af0ebb0 ASoC: rk312x: Fix wrong component assignment
Should use dai->component instead of the fixed rtd->codec[0],
because codec may be addressed in multi-codecs situation,
Obviously, it's wrong. the dais' one is always RIGHT.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I4d95b82e36a929e46f4992cbb198b6a060c5c939
2023-02-16 14:12:36 +08:00
Sandy Huang
146f0f25ff iommu/rockchip: Do not disable vop_mmu runtime PM when shutdown
iommu maybe enable failed at the following case:
rk_iommu_shutdown()  -> disable runtime PM
  --> rockchip_drm_lastclose()
    --> vop2_crtc_atomic_flush()
      --> rockchip_drm_dma_attach_device()
	--> rk_iommu_attach_device()
	   --> rk_iommu_detach_device()
	     --> pm_runtime_get_if_in_use() check failed but drm is unknown,
		 Do not disable vop_mmu runtime PM as a workaround

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Simon Xue <xxm@rock-chips.com>
Change-Id: Ic4102371534bbc3ece344401301a437711d69226
2023-02-16 14:11:36 +08:00
Andy Yan
4a7b2952e8 drm/rockchip: vop2: remove duplicate init of nr_pds
Fixes: aa3aee14d0ec("drm/rockchip: vop2: Add vop2 internal pd support
for rk3588")

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I7899bf5ab4ae3b4465e3f352133daef0e2e47e82
2023-02-16 10:15:20 +08:00
Guochun Huang
3d20aac646 arm64: dts: rockchip: rk3562-rk817-tablet-v10: enable display logo
Change-Id: I5df32ea65901ded3ebc7ae6ba9082a4be01de0f7
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2023-02-16 08:39:44 +08:00
Tao Huang
571548a656 input: touchscreen: gsl3673_800x1280: Fix build as module
drivers/input/touchscreen/gsl3673_800x1280.c:68:11: fatal error: 'gsl3680b_zm97f.h' file not found

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I4754dafc101df625c557a777829e32b42f9d768c
2023-02-15 19:59:40 +08:00
Tao Huang
a607f6bfd4 net: phy: rk630phy: Fix typo
drivers/net/phy/rk630phy.c:388:27: error: use of undeclared identifier 'rockchip_phy_tbl';
MODULE_DEVICE_TABLE(mdio, rockchip_phy_tbl);

Fixes: f5f864ab51 ("driver: rk630: Add RK630 MAC PHY support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I22a5805014cde850e77f493c4f56833a3d96bde5
2023-02-15 19:52:10 +08:00
Damon Ding
e5be89a49c pwm: rockchip: release clk if pinctrl check failed
Fixes: 718c02ce18 ("pwm: rockchip: Make pwm pinctrl setting after pwm enabled")
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
Change-Id: Ic67407ee416a24ba368c3cff21aefde0ddf63700
2023-02-15 18:42:57 +08:00
Liang Chen
1c4ec7310b arm64: dts: rockchip: rk3528: set otp-opp-info for cpu/gpu/dmc
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: Ie0bcaf096c423a942e91a057b98cefda5111a971
2023-02-15 18:40:44 +08:00
Liang Chen
c44ab0fa47 soc: rockchip: opp_select: adjust opp-table by otp
Signed-off-by: Liang Chen <cl@rock-chips.com>
Change-Id: I8d642bbcb4dafcfa62d85cf108623e92f6fd4572
2023-02-15 18:40:44 +08:00
Elaine Zhang
78cef6d343 regulator: fan53555: add tcs452x
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I7d9f02f637108e941e526e21bd0e24d6f99cd328
2023-02-15 18:39:49 +08:00
Joseph Chen
b19cb16194 arm64: dts: rockchip: Update tcs425x to tcs4525 or tcs4526
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ieb3e514877099f1073475cd24b6319ba7db8543d
2023-02-15 18:39:02 +08:00
shengfei Xu
5049740976 regulator: fan53555: support reboot
Fixes: 91c0d689ea ("Revert "regulator: fan53555: support reboot"")
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I143fc44f49c95f01248c72a8f48282bf984b826b
2023-02-15 18:38:37 +08:00
Rudi Heitbaum
c1700419cd UPSTREAM: regulator: fan53555: add tcs4526
For rk3399pro boards the tcs4526 regulator supports the vdd_gpu
regulator. The tcs4526 regulator has a chip id of <0>.
Add the compatibile tcs,tcs4526

without this patch, the dmesg output is:
  fan53555-regulator 0-0010: Chip ID 0 not supported!
  fan53555-regulator 0-0010: Failed to setup device!
  fan53555-regulator: probe of 0-0010 failed with error -22
with this patch, the dmesg output is:
  vdd_gpu: supplied by vcc5v0_sys

The regulators are described as:
- Dedicated power management IC TCS4525
- Lithium battery protection chip TCS4526

This has been tested with a Radxa Rock Pi N10.

Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Link: https://lore.kernel.org/r/20210602112943.GA119@5f9be87369f8
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 5eee5eced9)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9f4d649df82e6b052d74c890abef08dd08eb985e
2023-02-15 18:17:20 +08:00
Axel Lin
a0ccf3aabc UPSTREAM: regulator: fan53555: Fix missing slew_reg/mask/shift settings for FAN53526
The di->slew_reg/di->slew_mask/di->slew_shift was not set in current code,
fix it.

Fixes: f2a9eb975a ("regulator: fan53555: Add support for FAN53526")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210525124017.2550029-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 30b38b805b)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I45888035e0c7591d986803737f983185dee31964
2023-02-15 18:17:20 +08:00
Axel Lin
046932a8e0 UPSTREAM: regulator: fan53555: Cleanup unused define and redundant assignment
TCS_VSEL_NSEL_MASK is not used so remove it.
Also remove redundant assignment for di->slew_reg.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210517010318.1027949-2-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 79c7e1447c)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I9e2d2ec3113e8706053c49f2fe42e14e89d22eaa
2023-02-15 18:17:19 +08:00
Axel Lin
92d2f71eee UPSTREAM: regulator: fan53555: Fix slew_shift setting for tcs4525
Fix trivial copy-paste mistake.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20210517010318.1027949-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit a7f003147b)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I380536fe8ced404f045745301b538806d7b1f50d
2023-02-15 18:17:19 +08:00
Peter Geis
c998ab0bed UPSTREAM: regulator: fan53555: fix tcs4525 function names
The tcs4525 is based off the fan53526.
Rename the tcs4525 functions to align with this.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20210511211335.2935163-4-pgwipeout@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit b3cc8ec04f)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I553a8f6b28386d78edb9db36f72c0f4b93bc2b76
2023-02-15 18:17:19 +08:00
Peter Geis
73b5c3105e UPSTREAM: regulator: fan53555: only bind tcs4525 to correct chip id
The tcs4525 regulator has a chip id of <12>.
Only allow the driver to bind to the correct chip id for safety, in
accordance with the other supported devices.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20210511211335.2935163-3-pgwipeout@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit f9028dcdf5)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I68b8935e9e9d76620c54d132e7cb6921d817582e
2023-02-15 18:17:19 +08:00
Peter Geis
b895b708f7 UPSTREAM: regulator: fan53555: fix TCS4525 voltage calulation
The TCS4525 has 128 voltage steps. With the calculation set to 127 the
most significant bit is disregarded which leads to a miscalculation of
the voltage by about 200mv.

Fix the calculation to end deadlock on the rk3566-quartz64 which uses
this as the cpu regulator.

Fixes: 914df8faa7 ("regulator: fan53555: Add TCS4525 DCDC support")
Signed-off-by: Peter Geis <pgwipeout@gmail.com>
Link: https://lore.kernel.org/r/20210511211335.2935163-2-pgwipeout@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit d4db69eba2)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I26e61bbded2df512cbca0989e7df1217b677ca1b
2023-02-15 18:17:19 +08:00
Joseph Chen
9b5ca694ba UPSTREAM: regulator: fan53555: Add TCS4525 DCDC support
TCS4525 main features:

- 2.7V to 5.5V Input Voltage Range;
- 3MHz Constant Switching Frequency;
- 5A Available Load Current;
- Programmable Output Voltage: 0.6V to 1.4V in 6.25mV Steps;
- PFM/PWM Operation for Optimum Increased Efficiency;

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
[Ezequiel: Forward port]
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Link: https://lore.kernel.org/r/20210421210338.43819-3-ezequiel@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 914df8faa7)

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I8297b212781059721b37bce1bf15bb1c5804fdd6
2023-02-15 18:17:19 +08:00
Elaine Zhang
a7acf5eb23 Revert "regulator: fan53555: fix up the dcdc is disabled when reboot"
This reverts commit 14d85ea556.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I5c65709aa3d94e00157b8d73cdba6fb8ba006463
2023-02-15 18:17:19 +08:00
Elaine Zhang
1387f9a1c8 Revert "regulator: fan53555: add TCS4525 DCDC support"
This reverts commit 1ca735225a.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I220561a0e2876bb217309e14305e6e37e6ef51b2
2023-02-15 18:17:19 +08:00
Elaine Zhang
389d57ff48 Revert "regulator: fan53555: add support for Rockchip RK860X regulators"
This reverts commit dbeca9d00a.
RK860X please use rk860x-regulator.c

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I5dfb8a363cb5ea14397b5c183d931928792025b6
2023-02-15 18:17:19 +08:00
Elaine Zhang
91c0d689ea Revert "regulator: fan53555: support reboot"
This reverts commit 7d0153aa70.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I384b97e360d3954ea3798a127692d76c41433110
2023-02-15 18:17:19 +08:00
Yandong Lin
5df3a678bf vdieo: rockchip: mpp: fix av1d iommu compile warning
drivers/video/rockchip/mpp/mpp_iommu_av1d.c:911 av1_iommu_probe() warn:
missing unwind goto?

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ia3ae5df50fa9d5ca7df84547b9b31d3ecd229922
2023-02-15 17:52:24 +08:00