Commit Graph

1072910 Commits

Author SHA1 Message Date
Jon Lin
bda58d2941 mtd: spi-nor: normem: Add code
Support NM25Q128EVB.

Change-Id: Id781d499407b1d4db448db1cfff71b43bf6e8e93
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-11-09 09:36:04 +08:00
Jon Lin
fdbfcf0f56 mtd: spi-nor: core: Add boya ids to manufacturers
Change-Id: I752c5a615982bea36ee7adf1ae66921242bc7bcf
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2022-11-09 09:36:04 +08:00
Tao Huang
94867bdff1 drm/bridge: sii902x: select VIDEOMODE_HELPERS
aarch64-none-linux-gnu-ld: drivers/gpu/drm/bridge/sii902x.o: in function `sii902x_set_embedded_sync':
drivers/gpu/drm/bridge/sii902x.c:473: undefined reference to `drm_display_mode_to_videomode'

Fixes: a14c198318 ("drm/bridge: sii902x: add YUV422 input support")
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I770ae0f4cf3d50a90b881eb3fe074ce57d2db3ac
2022-11-08 20:06:46 +08:00
Jianwei Fan
fe80765808 video: rockchip: vehicle: fix some include files
Change-Id: I4b9ad93f17329dd4168a71cc92344af7789266ab
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com>
2022-11-08 17:24:12 +08:00
Jianqun Xu
569ea4ebd4 Revert "Revert "video: rockchip: mpp: use dma-buf-cache func""
This reverts commit e8f7a297a7.

Change-Id: I3b9ab8391312ebcf7496def522cb742e2d7c4036
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-11-08 16:48:22 +08:00
Yandong Lin
f9114c28a3 video: rockchip: mpp: fix rkvenc-core1 cannot disable issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4884da641a2beba1bdbc2d734d9e969baf9026ad
2022-11-08 11:48:00 +08:00
Huang zhibao
66cc355d8f arm64: dts: rockchip: add rk3588-nvr-demo1-v21-android for nvr demo1 board
Signed-off-by: Huang zhibao <hzb@rock-chips.com>
Change-Id: I34996de4964e6be26d23a8fbd912231c27e06d13
2022-11-08 10:31:44 +08:00
Tao Huang
0de1c776b7 power: supply: rk818_battery: Fix compile warning
drivers/power/supply/rk818_battery.c: In function 'rk818_bat_calc_zero_linek':
drivers/power/supply/rk818_battery.c:1741:25: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
 1741 |                         else
      |                         ^~~~
drivers/power/supply/rk818_battery.c:45:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   45 |         do { \
      |         ^~
drivers/power/supply/rk818_battery.c:1743:33: note: in expansion of macro 'DBG'
 1743 |                                 DBG("ZERO-new: zero_linek adjust step6...\n");
      |                                 ^~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Iefecf6fe6b44ba84850a89a6e8cc12637f801ac0
2022-11-08 09:25:51 +08:00
Tao Huang
b7e087fff7 input: touchscreen: gslx680_pad: Fix compile warning
drivers/input/touchscreen/gslx680_pad.c:1045:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
 1045 |     if(ret)
      |     ^~
In file included from ./include/linux/device.h:15,
                 from drivers/input/touchscreen/gslx680_pad.c:15:
./include/linux/dev_printk.h:118:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  118 |         _dev_info(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~
drivers/input/touchscreen/gslx680_pad.c:1048:8: note: in expansion of macro 'dev_info'
 1048 |        dev_info(&ts->client->dev, "[tp-gsl] gsl_chip_id =[%d] \n",gsl_chip_id);
      |        ^~~~~~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: If4366c867ab6985e37708a4f89ed6d5460c74795
2022-11-08 09:21:23 +08:00
Tao Huang
938849237a video: rockchip: rve: Fix compile warning
drivers/video/rockchip/rve/rve_drv.c: In function 'rve_irq_thread':
drivers/video/rockchip/rve/rve_drv.c:583:17: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
  583 |                 if (DEBUGGER_EN(INT_FLAG))
      |                 ^~
drivers/video/rockchip/rve/rve_drv.c:585:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  585 |                         goto skip_job_done;
      |                         ^~~~

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib934fce7d8ba4240bc92dddde326887a05eb781a
2022-11-08 09:17:22 +08:00
Tao Huang
6f45b03c8e thermal: rockchip: Sync with upstream
Add some comments on rk_tsadcv7_initialize().

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I5fa77880a0fd47a6c18e8e6ed1606ff8e327f0ad
2022-11-07 19:05:08 +08:00
Caesar Wang
35ef129870 media: rockchip: cif: Fix building error with gcc
Tested it with the below:

    export CROSS_COMPILE=arm-linux-gnueabihf-
    make ARCH=arm rockchip_linux_defconfig
    make ARCH=arm rk3288-evb-rk808-linux.img -j1

Have the built error as follows.

  CC      drivers/media/platform/rockchip/cif/capture.o
drivers/media/platform/rockchip/cif/capture.c: In function 'rkcif_dvp_g_ch_id':
drivers/media/platform/rockchip/cif/capture.c:6850:17: warning: this 'if'
clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:capture.c:6850
 6850 |                 if ((frm_stat & DVP_CHANNEL2_FRM_READ) ==
      |                 ^~
drivers/media/platform/rockchip/cif/capture.c:6853:25: note: ...this statement,
but the latter is misleadingly indented as if it were guarded by the 'if'
 6853 |                         *intstat &= ~DVP_FRAME_END_ID2;
      |                         ^

Change-Id: I5339a6b6d3641dde71a17139b415852117e97574
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2022-11-07 18:18:21 +08:00
Caesar Wang
ece09991ef video: rockchip: rga3: Fix building error with gcc
Tested it with the below:

export CROSS_COMPILE=arm-linux-gnueabihf-
make ARCH=arm rockchip_linux_defconfig
make ARCH=arm rk3288-evb-rk808-linux.img -j1

Have the built error as follows.

  CC      drivers/video/rockchip/rga3/rga_policy.o
drivers/video/rockchip/rga3/rga_policy.c: In function 'rga_job_assign':
drivers/video/rockchip/rga3/rga_policy.c:243:25: warning: this 'if'
clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rga_policy.c:243
  243 |                         if (DEBUGGER_EN(MSG))
      |                         ^~
drivers/video/rockchip/rga3/rga_policy.c:245:33: note: ...this statement,
but the latter is misleadingly indented as if it were guarded by the 'if'
  245 |                                 continue;
      |                                 ^~~~~~~~

Change-Id: Ia39abe5fab5f857490b4709de516d97c5db567c0
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2022-11-07 18:18:01 +08:00
Elaine Zhang
87c43bed76 clk: rockchip: rk3288: fix up the clk register for hclk_vio
Change-Id: If07e27b1f88974fa0dcb2c8f719df6ba3c35dbcd
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2022-11-07 15:26:24 +08:00
Wyon Bi
88873a50fa clk/rockchip: rk3288: Add support for sclk_testout
Change-Id: Ibd521712a6517300984db4199ac0164a499dc0f7
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
2022-11-07 15:26:02 +08:00
Finley Xiao
485bbe0375 clk: rockchip: rk3288: Add TSP clock
Change-Id: I02185c5ab7a1072d271cd51161f6d4b05d327673
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-11-07 15:25:57 +08:00
Finley Xiao
4d1b83cce8 clk: rockchip: rk3288: Add id for i2s_src
Change-Id: I0d15dd656e96a3905012d42fef6640e152838888
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-11-07 15:25:53 +08:00
Finley Xiao
6ec73dd7b7 clk: rockchip: rk3288: Add ids for pclk_vip_in and pclk_vip
Change-Id: Id7c4b9a69ca22ae5eaee75929adb5ec0c1f0165c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-11-07 15:25:48 +08:00
Jacob Chen
4d78dbf449 clk: rockchip: associate SCLK_MAC_PLL on rk3288
see:
http://elixir.free-electrons.com/linux/v4.8/source/Documentation/devicetree/bindings/net/rockchip-dwmac.txt#L32

Change-Id: Ibf94d88219b13f5dd16cfdeb02d1b255e695399f
Signed-off-by: Jacob Chen <jacob-chen@iotwrt.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-11-07 15:25:42 +08:00
Finley Xiao
e9b2f6ce99 clk: rockchip: rk3288: add ddrc clock support
Add a ddrc clock into clk branches, so we can do ddr frequency
scaling on rk3288 platform in future.

Change-Id: Ia6c93e5ce82fa30475eddf051bc9ea2512b0cc07
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-11-07 15:25:36 +08:00
Frank Wang
2550716315 clk: rockchip: rk3288: add gate id of hclk_usb_peri for usb otg
Change-Id: Ib45f6d97ec81329ec9a4a19e9e836efa0ea61fe2
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2022-11-07 15:25:26 +08:00
Lin Jianhua
0f4a6a32c2 ARM: dts: rockchip: rk3128-evb-ddr3-v10-linux: remove pmic_sleep from rk805
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: Ib84d0d6ab5a740a7e672ea3f1cc51c2125b85164
2022-11-07 15:24:22 +08:00
Lin Jianhua
aec29a2f9d ARM: dts: rockchip: add rk3128-evb-ddr3-v10-linux.dts
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: Ica49fa12b90fbf731b3b3b95a297a83f67b76cb5
2022-11-07 15:19:46 +08:00
Jun Zeng
e11f71a131 ARM: dts: rockchip: Add rk3126c-evb-ddr3-v10-linux-slc
add: rk3126c-evb-ddr3-v10-linux-slc.dts
modify: Makefile add rk3126c-evb-ddr3-v10-linux-slc.dtb

Change-Id: I1cc79bb73ade9f69b30f1f00cdcb714053c1d12c
Signed-off-by: Jun Zeng <jun.zeng@rock-chips.com>
2022-11-07 15:19:40 +08:00
Lin Jianhua
06486f152f ARM: dts: rockchip: add rk3126c-evb-ddr3-v10-linux
Signed-off-by: Lin Jianhua <linjh@rock-chips.com>
Change-Id: Icacbe216c1095d9f92dfc7e29502d4911b628d34
2022-11-07 15:19:32 +08:00
Jianlong Wang
7097afabc8 ARM: dts: rockchip: rk312x: fix erroneous spi bus dtc warnings
Change-Id: I613a502c81805b46f5c147b1644fad6666fe9ed6
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2022-11-07 14:53:21 +08:00
Shiqin Chen
f2b9e1026b media: i2c: sc301iot fix for hdr error
Signed-off-by: Shiqin Chen <chensq@rock-chips.com>
Change-Id: I70b6317c9bc24bcb4fd2e61392e250a49e8bca5a
2022-11-07 12:01:31 +08:00
Cai YiWei
5235b51909 arm64: dts: rockchip: rk3588: fix fec reg config
fec aclk and core >= 3 * hclk
core min is 300M, and aclk 750M default, so set hclk to 100M

Change-Id: Ic218b3c692060d92a7b77e4e5933c6ed22e0c812
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2022-11-07 12:00:51 +08:00
Su Yuefu
f3a285069f media: i2c: add gc3003 sensor driver
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I5002cc0e12a202a2935e42bd9609f9e78ec0b2d8
2022-11-07 10:02:59 +08:00
shengfei Xu
42a083153f power: supply: sc8551: delete POWER_SUPPLY_PROP_ONLINE property
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ia0f6452a43fcd8dd60ec512d791a2fd3c91ac181
2022-11-07 09:56:55 +08:00
Jianlong Wang
9980fe5261 arm64: configs: px30_linux_defconfig: update for kernel5.10
1/ update rk3326_linux.config to kernel5.10 by follow steps:
    make ARCH=arm64 px30_linux_defconfig
    cp .config tmp.config
    make ARCH=arm64 px30_linux_defconfig rk3326_linux.config
    ./scripts/diffconfig -m tmp.config .config > \
        arch/arm64/configs/rk3326_linux.config

2/ no change in rk3358_linux.config for LTE_RM310 \
        doesn't support in kernel5.10

Change-Id: Ib365b412c9443a763e08ee24c68370901ba297f3
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2022-11-07 09:45:13 +08:00
shengfei Xu
fd6e755a70 power: supply: cw221x: update the battery profile
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I50f27d70c03fc81456485e1523ebd816de25775d
2022-11-04 12:41:22 +00:00
shengfei Xu
ab22095c19 power: supply: sgm41542: enable watchdog
If the watchdog timer expires (WATCHDOG_FAULT bit = 1), the
device returns to default mode and charger disable.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: Ieaa8287f6b1662e07446b9aecedb46b6770814b4
2022-11-04 19:03:09 +08:00
Su Yuefu
fd05cece13 media: i2c: sc3336 fix brightness change
1、Fixes brightness is increasing to a stable value when
   sensor’s exp reg is fixed value
2、Fixes cross stripe in the first 15 frame

this patch will delay 650us before frame start

Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I95dc0f1e5ca8d5493665aa3911e84d306b8b78dd
2022-11-04 17:04:59 +08:00
Su Yuefu
2079123a91 media: i2c: change sc3336 gain times from 1000 to 128
Signed-off-by: Su Yuefu <yuefu.su@rock-chips.com>
Change-Id: I1f184bf1128db98fd770a5922262374c89adaa8e
2022-11-04 17:04:57 +08:00
Liang Chen
4f53a57027 arm64: rockchip_linux_defconfig: enable CONFIG_ROCKCHIP_PERFORMANCE
Change performance level command:

    echo 1 > /sys/module/rockchip_performance/parameters/level

0 for low-performance.
1 for normal performance(default).
2 for high-performance.

Change-Id: I82be1e3dc030d1b2021cf982dadcb9d067d18ad5
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-11-04 15:00:48 +08:00
Liang Chen
dfa1ca37e6 arm64: rockchip_defconfig: enable CONFIG_ROCKCHIP_PERFORMANCE
Change performance level command:

    echo 1 > /sys/module/rockchip_performance/parameters/level

0 for low-performance.
1 for normal performance(default).
2 for high-performance.

Change-Id: I4a5447097af9ce73ddc3f7437efb7b5953ef3f53
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-11-04 15:00:48 +08:00
Liang Chen
bba1b62967 sched/fair: optimize find_energy_efficient_cpu() for EAS scheduler
When EAS can not find a best_energy_cpu, consider a idlest cpu as
a backup if it is a little power increased(<3.1%).

Test NenaMark2.apk on RK3588 EVB1 board:
without this patch: min-fps=57, avg-fps=59.4
with this patch:    min-fps=60, avg-fps=60

Change-Id: Ibc99282c21fa32cbed1d4f5dcc66c76a6b120b70
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-11-04 15:00:48 +08:00
Weixin Zhou
57dcba155e arm64: dts: rockchip: rk3588s-tablet-single: fix uboot deepsleep
vcc_1v8_s0: osc_1v8
vcc_3v3_s3: vcc3v3_FLASH

Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
Change-Id: I5653dc7e79e1478b0152527b52bb8aa00414b966
2022-11-04 14:47:45 +08:00
Finley Xiao
fdeae5cfbf arm64: dts: rockchip: Add opp table for rk3588j
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia9fe418f87fafb211c61869d58506bf272dbe0cd
2022-11-04 10:21:45 +08:00
David Wu
4ba7057cbf ethernet: stmmac: dwmac-rk-tool: Fix dma unmap for tx buffer
It is possible that there is no correct unmap for txbuffer, which may
cause some unknown problems.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: Ibbbe4d541c6bdd695c862a51a66b9ab511a74c0a
2022-11-04 09:58:22 +08:00
shengfei Xu
0ef32578d2 power: supply: rockchip-charger-manager: support battery temperature monitoring
the battery TS pin is connected to an NTC thermistor for
battery temperature monitoring and protection in charge
mode according to JEITA profile.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I4b07938438084a401db199ad6b660cb3335155df
2022-11-03 18:39:57 +08:00
Liang Chen
41297ecf6e soc: rockchip: rockchip_performance: correct cpub_mask for rk3588
The max frequency of A76 is 2.2GHz to 2.4GHz for rk3588, so make
sure all A76 is added to cpub_mask if the frequency is less than 2.4G.

Change-Id: I7d2e4a607acb127aafe385acc2840bdc6489d961
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-11-03 18:04:53 +08:00
Liang Chen
a2b1191434 arm64: dts: rockchip: adjust opp-table for rk3358
Change-Id: Ib4684438506e3397973a6c36f5ff0d1b11830eb8
Signed-off-by: Liang Chen <cl@rock-chips.com>
2022-11-03 16:33:56 +08:00
Nickey Yang
10b0c3e60b arm64: dts: rockchip: add rk3358m vehicle board support
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: Ic9afcd765b11dbad143d767f01fe4d7088eb954f
2022-11-03 16:33:56 +08:00
Caesar Wang
6295871c7e arm64: dts: rockchip: add rk3358 evb for linux
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Change-Id: I64fd77f17c4df93dc1ba14b19a054ec551500ba8
2022-11-03 16:33:56 +08:00
Jianlong Wang
79e86a7536 arm64: dts: rockchip: px30: add media-bus-format.h
Change-Id: If4dae6bdd393a3161ee115be2294b24830818e92
Signed-off-by: Jianlong Wang <jianlong.wang@rock-chips.com>
2022-11-03 16:33:56 +08:00
Yandong Lin
e60ac2564f video: rockchip: mpp: fix 64-bit division compile issue
err note:
undefined reference to `__aeabi_uldivmod''

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I2572d1a89edfbf3a6fb347318b7e031ff2bc48d1
2022-11-03 16:19:36 +08:00
Xing Zheng
36564e2a80 ASoC: rockchip: rk817-codec: enable ADC dither by default
For most scenarios, especially when a usb cable is connected,
enabling the ADC dither can get a better SNR.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iedc0c6bd6aa9139feea9feb5ffa91a67373964fc
2022-11-02 22:06:14 +08:00
Xing Zheng
40858982b6 ASoC: rockchip: rk817-codec: add checking APLL CFG0/4 with chip_ver during capture power up and reset
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Ibb3a6a3c3fb8f7c1b1715913a046f5a951c4fd78
2022-11-02 22:06:10 +08:00