platform/kernel/linux-starfive.git
8 months agoRISCV: config: tizen_visionfive2: Enable HID_MULTITOUCH 11/307411/1
Seung-Woo Kim [Thu, 7 Mar 2024 08:23:14 +0000 (17:23 +0900)]
RISCV: config: tizen_visionfive2: Enable HID_MULTITOUCH

To support usb touchscreen, enable CONFIG_HID_MULTITOUCH.

Change-Id: I341e1a7951e704b0d16a98caea881305137c56cd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
10 months agoRISCV: config: tizen_visionfive2: Enable USB_DUMMY_HCD as module for usb hcd tetst 23/304223/1 accepted/tizen_unified_riscv accepted/tizen/unified/riscv/20240116.075552
Seung-Woo Kim [Fri, 12 Jan 2024 06:36:32 +0000 (15:36 +0900)]
RISCV: config: tizen_visionfive2: Enable USB_DUMMY_HCD as module for usb hcd tetst

To support usb host hcd test, enable CONFIG_USB_DUMMY_HCD
as module.

Change-Id: I6811466c1be203e21ad469f99ba0e262ff740203
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
10 months agoRISCV: config: tizen_visionfive2: Disable unnecessary modules 22/304222/1
Seung-Woo Kim [Tue, 9 Jan 2024 08:42:06 +0000 (17:42 +0900)]
RISCV: config: tizen_visionfive2: Disable unnecessary modules

Disable unnecessary modules including DRM_I2C_*, BLK_DEV_NVME,
EFIVAR_FS.

Change-Id: I22daf65fa0f29e9896bed56e5326aff850557db5
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
10 months agosoc: sifivie: Kconfig: Fix the dependeny issue 16/303916/1
Jaehoon Chung [Mon, 8 Jan 2024 04:59:18 +0000 (13:59 +0900)]
soc: sifivie: Kconfig: Fix the dependeny issue

SIFIVE_FLUSH has a dependent with SIFIVE_CCACHE.
To use SIFIVE_FLUSH, SIFIVE_CCACHE has to be enabled.

Change-Id: I91402d7133dc5e8de36ad36f0fdaa8e2fc447ab6
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
10 months agoRISCV: dts: starfive: Fix typo about driver-strength 18/303718/1
Jaehoon Chung [Wed, 3 Jan 2024 23:53:28 +0000 (08:53 +0900)]
RISCV: dts: starfive: Fix typo about driver-strength

Fix typo about data-driver-strength.

s/data-deriver-strength/data-driver-strength

Change-Id: Ibaab1f1b015b58106f0c1c44a9443aa9f929f6c7
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
10 months agoRISCV: config: tizen_visionfive2: Enable TIZEN_INFORM_REBOOT 37/303637/1 accepted/tizen/unified/riscv/20240103.054716
Jaehoon Chung [Wed, 3 Jan 2024 01:06:59 +0000 (10:06 +0900)]
RISCV: config: tizen_visionfive2: Enable TIZEN_INFORM_REBOOT

Enable TIZEN_INFORM_REBOOT configuration to save a reboot paramemter.
It will be parsed by u-boot.

Change-Id: I40a102e9293b339036d2db83f63d98df249acf25
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
10 months agomisc: add Tizen reboot notifier for passing reboot parameter 39/303539/1
Jaehoon Chung [Tue, 2 Jan 2024 00:31:18 +0000 (09:31 +0900)]
misc: add Tizen reboot notifier for passing reboot parameter

To provide a reboot command with argument, add tien-inform-reboot.c file.
Its argument will be passed to U-boot, and u-boot will be parsing its argument.
Then it will be entering to a proper mode.

This patch is based on Tizen RPI4 kernel tree.

Change-Id: Icfcec0a26b1cf7a53c5c4352991463df9c67aed6
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
11 months agosound: soc: ac108: Remove unused function ac101_set_clock() 74/302474/1 accepted/tizen/unified/riscv/20231211.043621
Seung-Woo Kim [Thu, 7 Dec 2023 10:00:00 +0000 (19:00 +0900)]
sound: soc: ac108: Remove unused function ac101_set_clock()

Remove unused function ac101_set_clock() which causes following
build warning:

  sound/soc/codecs/ac101.c:1240:12: warning: 'ac101_set_clock' defined but not used [-Wunused-function]
   1240 | static int ac101_set_clock(int y_start_n_stop) {
        |            ^~~~~~~~~~~~~~~

Change-Id: Ic7adb2d90f59738f9f1acbec0c5db1606a0205b4
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
11 months agoRevert "RISCV: dts: starfive: Fix the property of memory" 25/301925/2 accepted/tizen/unified/riscv/20231130.214005
Jaehoon Chung [Mon, 27 Nov 2023 10:17:55 +0000 (19:17 +0900)]
Revert "RISCV: dts: starfive: Fix the property of memory"

This reverts commit e750d985a70a0ceab8166131c39a73b962f91fd6.
It's Workaround code until supporting eeprom.

Change-Id: I3e01ed8fe90ef936b2a0f71d21bfbdabcf3f499a
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
11 months agoRISCV: config: Enable hibernation and swap partition 86/301886/2
Hoegeun Kwon [Wed, 22 Nov 2023 07:53:23 +0000 (16:53 +0900)]
RISCV: config: Enable hibernation and swap partition

Enable the hibernation configuration and related
PM features for debuf purprose.

Change-Id: I635a1c783e0e4e2a4f3c518d90a45b32d10e9d2d
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
11 months agoclocksource/drivers/starfive: Fix shutdown ktime_get call problem 85/301885/2
Hoegeun Kwon [Wed, 22 Nov 2023 07:41:21 +0000 (16:41 +0900)]
clocksource/drivers/starfive: Fix shutdown ktime_get call problem

There is a problem where a warning occurs when ktime_get is called
while in suspend. There is no need to call ktime_get when entering
timer_shutdown. Fix starfive_timer_disable to be called.

[   58.338211] WARNING: CPU: 0 PID: 928 at kernel/time/timekeeping.c:843 ktime_get+0xf4/0x110
[   58.338211] Modules linked in: wave5 videobuf2_dma_contig v4l2_mem2mem starfive_mailbox starfive_mailbox_test
[   58.338211] CPU: 0 PID: 928 Comm: bash Not tainted 6.1.39-00014-g40bc52190beb-dirty #59
[   58.338211] Hardware name: StarFive VisionFive 2 v1.3B (DT)
[   58.338211] epc : ktime_get+0xf4/0x110
[   58.338211]  ra : starfive_timer_suspend+0x5c/0xc6
[   58.338211] epc : ffffffff80098a74 ra : ffffffff809bb316 sp : ffffffc8296e3bc0
[   58.338211]  gp : ffffffff81e6ff10 tp : ffffffd8d3f3de00 t0 : 20646e6570737573
[   58.338211]  t1 : ffffffff81c9b1f8 t2 : 7573205d36363831 s0 : ffffffc8296e3bf0
[   58.338211]  s1 : ffffffd8c3dce880 a0 : ffffffd8c3dce880 a1 : 0000000200000020
[   58.338211]  a2 : 000585b146000000 a3 : 0000000000000000 a4 : 0000000000000000
[   58.338211]  a5 : 0000000000000001 a6 : 0000000010395283 a7 : ffffffffffffffff
[   58.338211]  s2 : ffffffff81228678 s3 : ffffffff81c9b1f8 s4 : ffffffff81eb0ff0
[   58.338211]  s5 : ffffffff81e74040 s6 : 0000000000000000 s7 : 0000003fb94c0d50
[   58.338211]  s8 : 0000000000000001 s9 : 0000003fc2b7d6d0 s10: 000000000000002d
[   58.338211]  s11: 0000002ac45aeb3c t3 : ffffffff81c9b1f8 t4 : ffffffff81e947af
[   58.338211]  t5 : ffffffff81e94788 t6 : ffffffff81eaa8b0
[   58.338211] status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003
[   58.338211] [<ffffffff80098a74>] ktime_get+0xf4/0x110
[   58.338211] [<ffffffff809bb316>] starfive_timer_suspend+0x5c/0xc6
[   58.338211] [<ffffffff800a2222>] clockevents_suspend+0x30/0x46
[   58.338211] [<ffffffff80deb83e>] timekeeping_suspend+0x236/0x25c
[   58.338211] [<ffffffff8077346c>] syscore_suspend+0x5a/0x1e0
[   58.338211] [<ffffffff80064ea2>] hibernation_snapshot+0x1c8/0x50e
[   58.338211] [<ffffffff800658bc>] hibernate+0xf8/0x29c
[   58.338211] [<ffffffff80063130>] state_store+0xbe/0xc2
[   58.338211] [<ffffffff80dcb836>] kobj_attr_store+0xe/0x1a
[   58.338211] [<ffffffff802708e2>] sysfs_kf_write+0x2a/0x34
[   58.338211] [<ffffffff8026ff1e>] kernfs_fop_write_iter+0xe8/0x16c
[   58.338211] [<ffffffff801f518a>] vfs_write+0x188/0x328
[   58.338211] [<ffffffff801f5468>] ksys_write+0x58/0xd0
[   58.338211] [<ffffffff801f54ee>] sys_write+0xe/0x16
[   58.338211] [<ffffffff80003bee>] ret_from_syscall+0x0/0x2

Change-Id: I3e961637f1204a98b4ea0337dc5ce3a7fc02d191
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
11 months agousb: cdns: fix compile error and duplicate register pm notify 84/301884/2
Minda Chen [Mon, 12 Jun 2023 01:41:32 +0000 (09:41 +0800)]
usb: cdns: fix compile error and duplicate register pm notify

Find kernel 6.1 USB cdns3 two host controller (usb_hcd) call
plat_start function. It will cause register notification twice.
Fix this issue.

Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
[hoegeun.kwon: cherry-pick the commit b7aab6bc6c57 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Ia080aa84284fb6da4acd9357063272b50123b128

11 months agousb: cdns3: add hibernation pm notifier to set roothub wakeup 83/301883/2
minda.chen [Tue, 17 Oct 2023 06:29:59 +0000 (15:29 +0900)]
usb: cdns3: add hibernation pm notifier to set roothub wakeup

In hibernation resume case. usb devices maybe not emulated,
roothub is suspended, In this case, usb devices will be resume
fail. Set roothub active while hibernation resume.

Signed-off-by: minda.chen <minda.chen@starfivetech.com>
[hoegeun.kwon: cherry-pick the commit d86ba4820f59 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Idd244d8d3e50fd8e84cb72ff5fcdb50ff4399788

11 months agoriscv: Enable ARCH_SUSPEND_POSSIBLE for s2idle 82/301882/2
Song Shuai [Mon, 29 May 2023 10:15:24 +0000 (18:15 +0800)]
riscv: Enable ARCH_SUSPEND_POSSIBLE for s2idle

With this configuration opened, the basic platform-independent s2idle is
provided by the sole "s2idle" string in `/sys/power/mem_sleep`.

At the end of s2idle, harts will hit the `wfi` instruction or enter the
SUSPENDED state through the sbi_cpuidle driver. The interrupt of possible
wakeup devices will be kept to wake the system up.

And platform-specific sleep states can be provided by future ACPI and
SBI SUSP extension support.

Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Link: https://lore.kernel.org/r/20230529101524.322076-1-songshuaishuai@tinylab.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
[hoegeun.kwon: cherry-pick the commit c1f048a6bd7d from mainline]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I535adff9152e6f20b9ad825b03cadfec6ac39684

11 months agoriscv: hibernate: Add missing configuration and comment 81/301881/2
Hoegeun Kwon [Wed, 22 Nov 2023 07:43:30 +0000 (16:43 +0900)]
riscv: hibernate: Add missing configuration and comment

Add missing HIBERNATION configuration and fix missing comment by mainline.

Fixes : ae555bcd50e1 ("RISC-V: Add arch functions to support hibernation/suspend-to-disk")
[https://lore.kernel.org/all/20230330064321.1008373-1-jeeheng.sia@starfivetech.com/]

Change-Id: I505e3cd130ffe0ed2e79f137b8b40e5b046063db
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
11 months agoirqchip/irq-sifive-plic: Add syscore callbacks for hibernation 80/301880/2
Mason Huo [Tue, 4 Apr 2023 03:29:08 +0000 (11:29 +0800)]
irqchip/irq-sifive-plic: Add syscore callbacks for hibernation

The priority and enable registers of plic will be reset
during hibernation power cycle in poweroff mode,
add the syscore callbacks to save/restore those registers.

Signed-off-by: Mason Huo <mason.huo@starfivetech.com>
Reviewed-by: Ley Foon Tan <leyfoon.tan@starfivetech.com>
Reviewed-by: Sia Jee Heng <jeeheng.sia@starfivetech.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202302140709.CdkxgtPi-lkp@intel.com/
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230404032908.89638-1-mason.huo@starfivetech.com
[hoegeun.kwon: cherry-pick the commit e80f0b6a2cf30 from mainline]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Ic549e1d59da713ac7b2bc0d1d827c6332cbdc3c8

11 months agoRISCV: config: tizen_*: Enable ZRAM support 48/301648/2 accepted/tizen/unified/riscv/20231123.095159
Seung-Woo Kim [Tue, 21 Nov 2023 06:51:06 +0000 (15:51 +0900)]
RISCV: config: tizen_*: Enable ZRAM support

Enable CONFIG_ZRAM with ZSTD compression.

Change-Id: Ia21d71f8db87b4437d17183e9e82ad14898af76f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
11 months agoRISCV: config: tizen_qemu: Sync with savedefconfig 92/301692/1
Seung-Woo Kim [Wed, 22 Nov 2023 00:54:26 +0000 (09:54 +0900)]
RISCV: config: tizen_qemu: Sync with savedefconfig

Sync with auto generated defconfig by savedefconfig.

Change-Id: I6b1dacf375f8c44c167026388defddb86f193d13
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
12 months agoRISCV: config: Enable starfive mailbox 59/301259/1 accepted/tizen/unified/riscv/20231114.060509
Hoegeun Kwon [Fri, 10 Nov 2023 06:56:46 +0000 (15:56 +0900)]
RISCV: config: Enable starfive mailbox

Enable starfive mailbox driver.

Change-Id: If6f44164c2261bd7d18387e617a522c3251564fa
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
12 months agoRISCV: dts: starfive: jh7110: Add mailbox node 58/301258/1
shanlong.li [Fri, 10 Nov 2023 06:43:01 +0000 (15:43 +0900)]
RISCV: dts: starfive: jh7110: Add mailbox node

Add mailbox driver node.

Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
[hoegeun.kwon: cherry-pick the commit 802f9261f654 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I8a3cf94272404a94bdf2fef05ecfb399417914d1

12 months agodriver:mailbox: add mailbox driver 57/301257/1
shanlong.li [Thu, 8 Jun 2023 07:07:15 +0000 (00:07 -0700)]
driver:mailbox: add mailbox driver

add mailbox driver

Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
[hoegeun.kwon: cherry-pick the commit a070a8d2467d from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: Iedb770bbdc8ec148c1b7eebf48df3b0e273063f6

12 months agoRISCV: config: Enable eeprom at24 75/301075/3 accepted/tizen/unified/riscv/20231113.084537
Hoegeun Kwon [Wed, 8 Nov 2023 04:34:00 +0000 (13:34 +0900)]
RISCV: config: Enable eeprom at24

Enable eeprom at24 driver.

Change-Id: I3485a08f72ee1b20147a98c33440a27c4978bf02
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
12 months agoRISCV: dts: starfive: Add eeprom node 74/301074/3
Hoegeun Kwon [Wed, 8 Nov 2023 04:32:06 +0000 (13:32 +0900)]
RISCV: dts: starfive: Add eeprom node

Add atmel eeprom driver node.

Apply the eeprom node by referring to the Vendor branch.
[https://github.com/starfive-tech/linux/blob/22e0315434b13cdde93ded101b567d5d1c4d5a2e/arch/riscv/boot/dts/starfive/jh7110-visionfive-v2.dtsi#L504]

Change-Id: I830acf5a0b6a226a4822dd00a278aea6aee827d5
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
12 months agoRISCV: config: Enable spidev driver 73/301073/3
Hoegeun Kwon [Wed, 8 Nov 2023 04:22:52 +0000 (13:22 +0900)]
RISCV: config: Enable spidev driver

Enable SPIDEV driver.

Change-Id: Ie5a938b7cda311350cb8b0a8f19e46b3c6384863
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
12 months agoRISCV: dts: starfive: Add spidev node 72/301072/3
Hoegeun Kwon [Wed, 8 Nov 2023 04:20:41 +0000 (13:20 +0900)]
RISCV: dts: starfive: Add spidev node

Add spidev driver node.

This spi and spi_dev node was applied to the mainline.
Refer to the patch below and apply it only to the spi_dev node.
[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi?h=v6.6&id=74fb20c8f05df7a7ea5c98ca85a713758e0e59f6]

Change-Id: I05309739997f8bfbed61595e6fbc7e03e8944363
Signed-off-by: William Qiu <william.qiu@starfivetech.com>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
12 months agoRISCV: configs: enable FUSE_FS configuration 15/300315/3 accepted/tizen/unified/riscv/20231107.043102
Łukasz Stelmach [Fri, 20 Oct 2023 12:26:02 +0000 (14:26 +0200)]
RISCV: configs: enable FUSE_FS configuration

Enable CONFIG_FUSE_FS configs and other missed configs.

Change-Id: I83c54355c8e7ad2ea95aadcab9bd6adad988d7eb
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
12 months agoRISCV: config: Enable configurations relevant to F2FS 14/300314/3
Łukasz Stelmach [Fri, 20 Oct 2023 12:03:05 +0000 (14:03 +0200)]
RISCV: config: Enable configurations relevant to F2FS

Enable configurations relevant to F2FS.
Tizen is using F2FS filesystem on Headed image.

Change-Id: Ifb1eef43a774fd6f1424dc3eb14261d80cf850bb
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
13 months agomedia: chips-media: wave511: Fix null deference in wave5_vpu_dec_clr_disp_flag() 89/299689/1 accepted/tizen/unified/riscv/20231013.094029
Seung-Woo Kim [Fri, 6 Oct 2023 10:04:06 +0000 (19:04 +0900)]
media: chips-media: wave511: Fix null deference in wave5_vpu_dec_clr_disp_flag()

If wave5_vpu_dec_open() is not called before calling
wave5_vpu_dec_clr_disp_flag(), there is null deference. Fix the
null deference by checking codec_info.

Change-Id: I1a4d9a75681df293e1f67dd4338c6f770d789223
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
13 months agoclk: starfive: jh7110-sys: Set vdec_main and vdec_jpg as CLK_IGNORE_UNUSED 57/299657/1
Seung-Woo Kim [Fri, 6 Oct 2023 07:00:09 +0000 (16:00 +0900)]
clk: starfive: jh7110-sys: Set vdec_main and vdec_jpg as CLK_IGNORE_UNUSED

To support video codec, set vdec_main and vdec_jpg clocks as
CLK_IGNORE_UNUSED.

Change-Id: I7df722cc20956d4cff68f856d0c7bf8c73fa36e7
Ref: https://github.com/starfive-tech/linux/blob/JH7110_VisionFive2_6.1.y_devel/drivers/clk/starfive/clk-starfive-jh7110-sys.c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
13 months agoRISCV: config: enable wave511 video codec driver as module 07/299607/3
Seung-Woo Kim [Thu, 5 Oct 2023 07:25:42 +0000 (16:25 +0900)]
RISCV: config: enable wave511 video codec driver as module

Enable wave511 video codec driver as module and also enable all
depending configs.

Change-Id: I0aeb0dfc0a844a3cc17c5054df61454c3f88e5fb
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
13 months agoRISCV: dts: starfive: enable jpg, vpu_dec and vpu_enc nodes in visionfive-2 06/299606/3
Seung-Woo Kim [Thu, 5 Oct 2023 07:23:01 +0000 (16:23 +0900)]
RISCV: dts: starfive: enable jpg, vpu_dec and vpu_enc nodes in visionfive-2

To support video codec, wave vpu, enable related jpg, vpu_dec and
vpu_enc nodes in visionfive-2.

NOTE: Only wave511 vpu_dec is supported with wave video codec
driver because visionfive-2 vpu_enc wave420 is different from
currently supported wave521 by the driver.

Change-Id: Icdd828ce35c98eee9a90a82c69c13614e53bb970
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
13 months agoriscv: dts: starfive: jh7110: add dma-coherent for vpu/jpu 05/299605/3
Samin Guo [Wed, 23 Aug 2023 02:43:54 +0000 (10:43 +0800)]
riscv: dts: starfive: jh7110: add dma-coherent for vpu/jpu

Use DMA-Coherent to avoid DIRECT_REMAP when allocating DMA
buffers

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
[sw0312.kim: cherry-pick the commit dfb44f0122ba from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ia0d3955010e963c0fb635e10081c1a2ab31155d4

13 months agoriscv: dts: starfive: jh7110: Add vpu/jpu nodes 04/299604/3
Samin Guo [Thu, 8 Jun 2023 08:01:33 +0000 (16:01 +0800)]
riscv: dts: starfive: jh7110: Add vpu/jpu nodes

Add vpu/jpu nodes for jh7110 SOC

Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
[sw0312.kim: port the commit e2d1cdfe5ff5 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel
 - Port upstream jh7110 clk and sys-reset controller macro name]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Iae673d805d9549ba96f3c08ee93ea69148f68e1e

13 months agoMedis:wave5: Remove inexistent including 03/299603/2
Som Qin [Wed, 30 Aug 2023 06:10:50 +0000 (14:10 +0800)]
Medis:wave5: Remove inexistent including

File sifive_l2_cache.h is inexistent in sdk 6.1 version.

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit ed137a80cd88 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel
 - Change sifive cache flush function name properly]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Id9d63d72fab1ab0ddeecdb46aeaa19cb0045ed36

13 months agoMedia:Wave5: Allocate more linear buffer to avoid block in gst-play 02/299602/2
Som Qin [Wed, 30 Aug 2023 01:23:21 +0000 (09:23 +0800)]
Media:Wave5: Allocate more linear buffer to avoid block in gst-play

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit a95153b6cedf from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I526c47f67fa196e27d7e4ad5e685252e8a034989

13 months agoMedia:Wave5: Fix segment fault when finish buffer 01/299601/2
Som Qin [Tue, 29 Aug 2023 02:18:47 +0000 (10:18 +0800)]
Media:Wave5: Fix segment fault when finish buffer

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 9aea96f91ea6 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ic2bf17247ed6ec08582d5b98b4e0be24d6a07ce0

13 months agoMedia: Wave5: Fix plane size mismatch 00/299600/2
Som Qin [Fri, 25 Aug 2023 08:13:01 +0000 (16:13 +0800)]
Media: Wave5: Fix plane size mismatch

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit b4e474a223e8 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If69aaf750c83daf21b57c459f576ee2200f9c40e

13 months agoMedia:Wave5: Fix driver compile warning 99/299599/2
Som Qin [Mon, 7 Aug 2023 07:21:30 +0000 (15:21 +0800)]
Media:Wave5: Fix driver compile warning

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 5d74ac40d250 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: If42384286243423071abcd9ab2107c0507bdc4e8

13 months agoMedia:Wave5: Add contiguous planes format support (YUV420/NV12/NV21) 98/299598/2
Som Qin [Wed, 2 Aug 2023 03:38:51 +0000 (11:38 +0800)]
Media:Wave5: Add contiguous planes format support (YUV420/NV12/NV21)

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 80c6e7df80bd from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I4203a253b3c7577a5849ca2582099a2cf07985ea

13 months agoMedia:wave5: Driver get clks from DTS instead of hard coding. 97/299597/2
Som Qin [Tue, 1 Aug 2023 07:03:59 +0000 (15:03 +0800)]
Media:wave5: Driver get clks from DTS instead of hard coding.

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 167fdf2d4c34 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I31ecc8cb300d21ab95c231d14875dcac93e337a6

13 months agoMedia:wave5: Fix stride mismatching of decoding frame buffers 96/299596/2
Som Qin [Tue, 1 Aug 2023 06:09:12 +0000 (14:09 +0800)]
Media:wave5: Fix stride mismatching of decoding frame buffers

When bitstream format bitdepth > 8, stride of compressed frame map buffers shoule be recalculated.

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit a9830d5d01e9 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I58b550e525c8dde7175d09c2934f4f81e08df3fc

13 months agoMedia:wave5: wave5 v4l2 driver support gst/ffmpeg 95/299595/2
Som Qin [Thu, 9 Feb 2023 02:31:40 +0000 (10:31 +0800)]
Media:wave5: wave5 v4l2 driver support gst/ffmpeg

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 3f710b8fa137 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel
 - update sifive cache function name properly and add guard for its config option]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ib264712e893c737a28c42a566607b7a55d7f7117

13 months agoMedia:wave5: set default format for display_fmt 94/299594/2
Som Qin [Thu, 12 Jan 2023 01:16:41 +0000 (09:16 +0800)]
Media:wave5: set default format for display_fmt

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit 6d80c00e9258 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ic0f74bf12580e72ba3209c766e8d167c204702c5

13 months agomedia: add wave511 v4l2 support for starfive platfrom 93/299593/2
Som Qin [Thu, 22 Dec 2022 07:33:22 +0000 (15:33 +0800)]
media: add wave511 v4l2 support for starfive platfrom

Signed-off-by: Som Qin <som.qin@starfivetech.com>
[sw0312.kim: cherry-pick the commit a76c4f273c26 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I170dd61340d2da9155dda478e570828347c5bdaf

13 months agomedia: chips-media: wave5: Add wave5 driver to maintainers file 92/299592/2
Robert Beckett [Wed, 7 Dec 2022 12:13:50 +0000 (13:13 +0100)]
media: chips-media: wave5: Add wave5 driver to maintainers file

Add the Chips&Media wave5 encoder/decoder driver to the maintainers file

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
[sw0312.kim: cherry-pick the commit c6cf2b7965b0 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I4c08a4a6be0ea4f4b9900e58ad7522914f65246a

13 months agodt-bindings: media: wave5: add yaml devicetree bindings 91/299591/2
Robert Beckett [Wed, 7 Dec 2022 12:13:49 +0000 (13:13 +0100)]
dt-bindings: media: wave5: add yaml devicetree bindings

Add bindings for the wave5 chips&media codec driver

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
[sw0312.kim: cherry-pick the commit cd9148ef1b14 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I754cbc1e881b7ee8ff6a9c3da15cfc3f5900d1b0

13 months agomedia: chips-media: wave5: Add TODO file 90/299590/2
Nas Chung [Wed, 7 Dec 2022 12:13:48 +0000 (13:13 +0100)]
media: chips-media: wave5: Add TODO file

Add a TODO file with remaining elements to be improved/added.

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
[sw0312.kim: cherry-pick the commit b9ab65a219e6 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I5249e0f04859224e17b3a1d7702093eedaf000ca

13 months agomedia: chips-media: wave5: Add the v4l2 layer 89/299589/2
Nas Chung [Wed, 7 Dec 2022 12:13:47 +0000 (13:13 +0100)]
media: chips-media: wave5: Add the v4l2 layer

Add the decoder and encoder implementing the v4l2
API. This patch also adds the Makefile and the VIDEO_WAVE_VPU config

Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
[sw0312.kim: cherry-pick the commit 8f188e8db60e from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ia41bd9e4afd79fb415fd69722f3c488575ea6958

13 months agomedia: chips-media: wave5: Add vpuapi layer 88/299588/2
Nas Chung [Wed, 7 Dec 2022 12:13:46 +0000 (13:13 +0100)]
media: chips-media: wave5: Add vpuapi layer

Add the vpuapi layer of the wave5 codec driver.
This layer is used to configure the hardware according
to the parameters.

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Nas Chung <nas.chung@chipsnmedia.com>
[sw0312.kim: cherry-pick the commit 20c1678a8e65 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I7e95e00738cc2176138c494c9929dcf5f1250eae

13 months agomedia: platform: chips-media: Move Coda to separate folder 87/299587/2
Sebastian Fricke [Wed, 7 Dec 2022 12:13:45 +0000 (13:13 +0100)]
media: platform: chips-media: Move Coda to separate folder

Prepare the folder structure for a second Chips&Media driver.
Move the Coda driver to a sub-directory.

Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
[sw0312.kim: cherry-pick the commit b98dc9cf7754 from https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_6.1.y_devel]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I27c82d2154c69aae68c423cc2d2a152ca6efa8b6

14 months agoRISCV: config: Build NBD into the kernel 98/298098/1 accepted/tizen/unified/riscv/20230919.144752
Łukasz Stelmach [Thu, 31 Aug 2023 11:30:45 +0000 (13:30 +0200)]
RISCV: config: Build NBD into the kernel

NBD may be used to mount root file system. To avoid problems with
delivering nbd.ko module to ramdisk, build the driver into the kernel.

Change-Id: I28002a736a8b9ecd06ed6d5ea964899d173bd30d
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
14 months agoRISCV: config: Disable legacy PTY device nodes 51/298051/1 accepted/tizen/unified/riscv/20230903.234425
Łukasz Stelmach [Wed, 30 Aug 2023 19:19:33 +0000 (21:19 +0200)]
RISCV: config: Disable legacy PTY device nodes

Don't create ttyXX and ptyXX device nodes. Modern software uses /dev/ptmx
and /dev/pts/* nodes.

Change-Id: Ie0303e41ef4262642c59510027d134004385474b
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
14 months agoRISCV: config: tizen_visionfive2: Enable MT7601U as module 76/297976/1 accepted/tizen/unified/riscv/20230831.014911
Seung-Woo Kim [Tue, 29 Aug 2023 10:06:16 +0000 (19:06 +0900)]
RISCV: config: tizen_visionfive2: Enable MT7601U as module

Enable CONFIG_MT7601U to support mediatek 7601 wireless dongle,
This driver requires the firmware, mt7601u.bin.

Change-Id: If1b07960f03afaad952af6efae8637b61e5cecd6
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
14 months agoWORKAROUND: usb: cdns3: Restore onchip memory reservation 88/297788/1 accepted/tizen/unified/riscv/20230828.003411
Seung-Woo Kim [Thu, 24 Aug 2023 08:02:26 +0000 (17:02 +0900)]
WORKAROUND: usb: cdns3: Restore onchip memory reservation

Restore onchip meory reservation of disable in_ep when hw
configuration is not done as a workaround.
Without restoring, disabling and re-enabling eps causes
check failure of onchip memory reseration size.

This fixes usb communication failure of ffs_func_set_alt()
calling usb_ep_disable() and usb_ep_enable() for all ep.

Note: for non workaround, it should calculate exact reservation
size from ep type and usb speed and should restore out_ep memory
reservation when there is no more enabled out_ep.

Change-Id: Ifca0052f96fd777036e01b9ddb7ae6af54bba911
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
14 months agoRISCV: config: tizen_visionfive2: Enable basic nls codepages 71/297671/1 accepted/tizen/unified/riscv/20230823.111001
Seung-Woo Kim [Tue, 22 Aug 2023 11:14:47 +0000 (20:14 +0900)]
RISCV: config: tizen_visionfive2: Enable basic nls codepages

To support mount fat partition without module, enable basic nls
codepages including iso8859-1, ascii, utf8.

Change-Id: Ib9c1318068c2d6d445ee592f1dc5cc3be70136cd
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
14 months agousb: gadget: f_fs: Limit the maximum length of data transferring 07/297607/1 accepted/tizen/unified/riscv/20230822.054229
Dongwoo Lee [Mon, 21 Aug 2023 11:25:43 +0000 (20:25 +0900)]
usb: gadget: f_fs: Limit the maximum length of data transferring

When the ffs daemons request transfer with large size buffer, the usb
subsystems below cannot filled the buffer at once and then the request
is stalled in f_fs_epfile_io function. In order to prevent this
situation, this limits maximum length of data as PAGE_SIZE.

Change-Id: Ib84b3493a56b21f33a07cf0533f8df71580b7540
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
14 months agoRISCV: config: tizen_visionfive2: Enable USB_CDNS3_STARFIVE_EXTCON 51/297451/1 accepted/tizen/unified/riscv/20230821.094308
Seung-Woo Kim [Fri, 18 Aug 2023 09:58:29 +0000 (18:58 +0900)]
RISCV: config: tizen_visionfive2: Enable USB_CDNS3_STARFIVE_EXTCON

Enable CONFIG_USB_CDNS3_STARFIVE_EXTCON to suuport usb gadget
functionality from Tizen.

Change-Id: I2b0cd4e6c34ec6a30d9d41100876ab27d5733de2
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
14 months agousb: cdns3-starfive: Add extcon usb gadget state with always connected 36/297436/2
Seung-Woo Kim [Fri, 18 Aug 2023 06:34:10 +0000 (15:34 +0900)]
usb: cdns3-starfive: Add extcon usb gadget state with always connected

Add extcon usb gadget state and set usb gadget state as connected.

The cdns3-starfive usb c port in visionfive2 board only has usb
d-/d+ lines and vbus and ground lines are used for power supply.
Because of the H/W limitation, it is not possible to detect usb
c port connected state.

In Tizen, deviced configures usb gadget functions only with the
usb connected state, so, to support usb gadget functionality,
the usb state should be set.

Change-Id: I3e3a25a726c7205b3d9a5fd96d8557562bfda81f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
14 months agoRISCV: configs: Change a default cpufreq governor to SCHEDUTIL 22/297422/1 accepted/tizen/unified/riscv/20230818.105219
Jaehoon Chung [Fri, 18 Aug 2023 04:31:42 +0000 (13:31 +0900)]
RISCV: configs: Change a default cpufreq governor to SCHEDUTIL

Change a default cpufreq governor from ondemand to schedutil.

Change-Id: I4d681ddbb0926e40fee8433f5f2924478c56fd0e
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
14 months agoclk: starfive: jh7110-sys: Set PLL0 rate to 1.5GHz 21/297421/1
Jaehoon Chung [Fri, 18 Aug 2023 04:19:55 +0000 (13:19 +0900)]
clk: starfive: jh7110-sys: Set PLL0 rate to 1.5GHz

Set PLL0 rate to 1.5GHz. Change the parent of cpu_root clock
and the divider of cpu_core before setting.

This patch is taken from patch that was posted on mailing.

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
Change-Id: Ib418a6321555c045effcb0580e0c91d80a7a2043
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRISCV: dts: starfive: Increase CMA range from 512MB to 768MB 14/297014/2 accepted/tizen/unified/riscv/20230809.081413
Hoegeun Kwon [Wed, 9 Aug 2023 02:17:00 +0000 (11:17 +0900)]
RISCV: dts: starfive: Increase CMA range from 512MB to 768MB

In UHD resolution, there are many cases where alloc fail due to lack
of CMA capacity. Increase CMA range to prevent cma_alloc failed.

Change-Id: I6b0c355b773b08d09381e738329b986113982768
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agoRISCV: dts: starfive: Fix the property of memory 79/296979/1 accepted/tizen/unified/riscv/20230809.013305
Jaehoon Chung [Tue, 8 Aug 2023 05:18:43 +0000 (14:18 +0900)]
RISCV: dts: starfive: Fix the property of memory

Current is getting the memory size from devicetree node.
Until supporting eeprom, it needs to use the memory node.

After applied this patch, Visionfive2 is showing 8GiB.

Change-Id: Ic96c2a7d373b9fccee830f3e34bbd9a2d6a3d6c3
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRISCV: config: Enable MEDIA_SUPPORT_FILTER and enable only usb camera configs 99/296699/1 accepted/tizen/unified/riscv/20230804.122129
Seung-Woo Kim [Thu, 3 Aug 2023 02:00:55 +0000 (11:00 +0900)]
RISCV: config: Enable MEDIA_SUPPORT_FILTER and enable only usb camera configs

Enable MEDIA_SUPPORT_FILTER to filter out unnecessary media
configs and enable only usb camera configs including gspca module.

Change-Id: Idcd217d10821467562a53a57c3783897b4363d5f
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
15 months agoRISCV: config: Enable RAM and NBD block devices 91/296591/1 accepted/tizen/unified/riscv/20230803.004140
Łukasz Stelmach [Tue, 1 Aug 2023 13:03:49 +0000 (15:03 +0200)]
RISCV: config: Enable RAM and NBD block devices

Devices are supported on VisionFive2. Enable them on QEMU to use the
same boot procedures on both targets.

Change-Id: I210141b471d718fec4286a7bb516751226756f96
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
15 months agodrm/verisilicon: vs_dc: Fix to disable interrupt on probe 54/296554/1 accepted/tizen/unified/riscv/20230802.014257
Hoegeun Kwon [Tue, 1 Aug 2023 02:30:40 +0000 (11:30 +0900)]
drm/verisilicon: vs_dc: Fix to disable interrupt on probe

There is a case where interrupt enable is set in decon req before
decon probe is completed. There is a problem that a kernel panic
occurs if an interrupt is executed before the decon is bound. Disable
interrupts before registering interrupts. Also, irq generated when the
interrupt state is disabled is ignored.

Change-Id: I8b3571b006031c28349e1647f2d9a5c508ca6235
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agosoc: sifive: ccache: Add delay after flush 82/296382/1 accepted/tizen/unified/riscv/20230730.231938
Hoegeun Kwon [Wed, 26 Jul 2023 11:32:55 +0000 (20:32 +0900)]
soc: sifive: ccache: Add delay after flush

Problems with cache flush at resolutions exceeding FUD and with inno
hdmi driver. It runs a cache flush and requires a delay. So add delay
after cache flush.

Change-Id: Id8b1398dcce04851577912e6c1dfd4a2b580a043
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agogpu: drm: verisilicon: Fix potential Null pointer dereference 42/296342/2
Jaehoon Chung [Wed, 26 Jul 2023 01:50:50 +0000 (10:50 +0900)]
gpu: drm: verisilicon: Fix potential Null pointer dereference

It can be the poential NULL pointer dereference.

[    3.749753] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008
[    3.750873] starfive display-subsystem: bound 29400000.dc8200 (ops 0xffffffff812c3bc8)
[    3.758534] Oops [#1]
[    3.758538] Modules linked in:
[    3.758547] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.1.39-riscv-visionfive2 #1
[    3.758555] Hardware name: StarFive VisionFive 2 v1.3B (DT)
[    3.758560] epc : dc_isr+0x22/0x60
[    3.766483] innohdmi-starfive 29590000.hdmi: inno hdmi bind begin
[    3.768725]  ra : dc_isr+0x22/0x60
[    3.768734] epc : ffffffff806db7ee ra : ffffffff806db7ee sp : ffffffff81a03bf0
[    3.768741]  gp : ffffffff81c6a158 tp : ffffffff81a17900 t0 : 0000000000046000
[    3.771834] innohdmi-starfive 29590000.hdmi: supply hdmi_1p8 not found, using dummy regulator

Change-Id: I4a7c1f656f1d45c2fc183f2c2976a11e0b2816c1
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRevert "riscv: fix riscv64 unrecognized opcode build error" 30/296330/1
Jaehoon Chung [Tue, 25 Jul 2023 21:32:45 +0000 (06:32 +0900)]
Revert "riscv: fix riscv64 unrecognized opcode build error"

Since using gcc13 to build Tizen RISCV, this patch doesn't need anymore.
This reverts commit e6c19c8fe08eb4375c7f5da1d7004ae4c533d615.

Change-Id: Iea9421a0c53ac3f9a9d9a8942dbf5a1521b91665

15 months agopackaging: Update stable version to 6.1.39 accepted/tizen/unified/riscv/20230725.071352
Jaehoon Chung [Mon, 26 Jun 2023 04:15:12 +0000 (13:15 +0900)]
packaging: Update stable version to 6.1.39

Update stable version to 6.1.39.

Change-Id: I0092fc745e6e968afa777d0fb409fc1f20d5e840
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agobuild: Change module image size from 32M to 20M
Jaehoon Chung [Tue, 18 Jul 2023 21:58:59 +0000 (06:58 +0900)]
build: Change module image size from 32M to 20M

Change module image size from 32M to 20M.
In ks file, partitions size is using to 20M. If created to 30M, it will
be failed on build system.

So to check correct size, change module image size to 20M.

Change-Id: I89cb828269e15f2162febacaf2f22386849b0f22
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/verisilicon: Add cache flush feature when dmabuf sync
Hoegeun Kwon [Mon, 17 Jul 2023 07:38:34 +0000 (16:38 +0900)]
drm/verisilicon: Add cache flush feature when dmabuf sync

Add cache flush for gem memory. Cache flushing is done when the
dmabuf sync ioctl is called.

Change-Id: I8663a391b18bb10f69007bd631fec492c0e347b2
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agogpu: drm: img: Fix to check fence list instead of fence count
Hoegeun Kwon [Mon, 17 Jul 2023 09:06:27 +0000 (18:06 +0900)]
gpu: drm: img: Fix to check fence list instead of fence count

In order to generate a reserve fences, we check to see if there is a
fence list instead of fence count.

Change-Id: Ibd45c154610221dd7bcd4de96570fc00066457c8
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agoRISCV: config: Enable img gpu config
Hoegeun Kwon [Thu, 13 Jul 2023 09:49:56 +0000 (18:49 +0900)]
RISCV: config: Enable img gpu config

Enable Imagination PoerVR GPU driver defconfig.

Change-Id: If8e8b51fe59a367a0981f65b5cc7b3f44f9a8782
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agogpu: drm: img: Fix to use iterator instead of list
Hoegeun Kwon [Fri, 7 Jul 2023 02:16:18 +0000 (11:16 +0900)]
gpu: drm: img: Fix to use iterator instead of list

Change the dma fence management method from list to iterator method.
Also the fences have to added individually on each other driver. So
dma_resv_add_fence does not add a fence, but dma_resv_reserve_fences
is used to add it.

Change-Id: I4c87608b9878e218fe0ae5cc5acb564c1f9d5db9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agogpu: drm: img: Fix to use jh71xx_pmu header
Hoegeun Kwon [Fri, 7 Jul 2023 04:13:14 +0000 (13:13 +0900)]
gpu: drm: img: Fix to use jh71xx_pmu header

Fix to use jh71xx_pmu header and sifive_flush64_range.

Change-Id: I9ad7d5f3de347be0f26ceb4633b0125d2a6480ef
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agosoc: starfive: Add feature for hw event masks
Hoegeun Kwon [Fri, 7 Jul 2023 04:11:35 +0000 (13:11 +0900)]
soc: starfive: Add feature for hw event masks

Add hw event masks off feature for use with other drives.

Change-Id: I5b8862cd50b35f0b8ceed770d95a5c17bde8b12c
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Signed-off-by: Walker Chen <walker.chen@linux.starfivetech.com>
15 months agogpu: drm: img: Fix PVRSRV device initialization time
Hoegeun Kwon [Tue, 4 Jul 2023 08:38:52 +0000 (17:38 +0900)]
gpu: drm: img: Fix PVRSRV device initialization time

If the initialization time is a probe, the problem of not loading the
firmware occurs. Fix the initialization time to open time.

Change-Id: I1372230fdbe754845146eacd7bbb7b4e248c2c4f
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/GPU: Add support Imagination PowerVR GPU driver v1.17
shanlong.li [Wed, 5 Jul 2023 02:25:22 +0000 (11:25 +0900)]
drm/GPU: Add support Imagination PowerVR GPU driver v1.17

Add support Imagination PowerVR GPU driver with starfive JH7110. This
driver is from [1], and the imported patch list[2]. We modified
driver compatible and clock in the device-tree to fix kernel v6.1.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
  b9049f928d30 gpu: drm: img: disable PDUMP
  092482e4811e driver:GPU: adjust interface sequence 1. add axi disable interface 2. adjust the interface order between clk and
  b320e5501342 gpu:driver: fix up hibernation resume problem
  0dea95655224 driver:gpu: add gpu runtime pm
  0381e221bc0d driver:gpu: gpu driver change to release
  6ccc2d8209d9 driver:GPU:set the gpu frequency to 594Mhz
  d81e5fcbcccc driver:gpu: gpu driver upgrade to 1.17
  18a68c90c061 Add Wayland with GPU support.
  e4d3672cccbe driver:GPU: use pm runtime interface
  4c34123a3d81 driver:GPU: Using the GPU driver release version
  1ed4d6d30d92 driver:GPU: Disable apm to resolve pvrdebug -dd suspension  error
  13e336d5b5ae driver:GPU: adjust ClockSpeed to 409.6MHz
  c2a828350549 driver:GPU: fix compile warnings
  2ba6ee6d00df driver:GPU: add gpu driver

Signed-off-by: shanlong.li <shanlong.li@starfivetech.com>
Change-Id: I8ac4ba0038e8ba48c48d615f8700c49c7ff706b9
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agoRISCV: dts: starfive: Change wr/rd_osr_lmt value from 4 to 0xf
Jaehoon Chung [Wed, 12 Jul 2023 02:08:29 +0000 (11:08 +0900)]
RISCV: dts: starfive: Change wr/rd_osr_lmt value from 4 to 0xf

Change wr/rd_osr_lmt value from 4 to 0xf.
When value is using to 4, ethernet Rx Performance is decreasing.

Vendor kernel(v5.15) is using its value as 0xf.

The below is iperf result.
- Using to 4   - Rx is 45MBits/sec, Tx is 980MBits/sec
- Using to 0xf - Rx is 750MBits/sec, Tx is 930Mbits/sec

Change-Id: Ie6763a00ec2795e43bdbae2f224638732c789490
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoRISCV: dts: starfive: Add driver-strength relevant to motorcomm
Jaehoon Chung [Tue, 11 Jul 2023 07:08:42 +0000 (16:08 +0900)]
RISCV: dts: starfive: Add driver-strength relevant to motorcomm

Add driver-strength relevant to motrcomm phy driver.

This patch is based on the below commit.
https://github.com/SaminGuo/linux/commit/ebd75b0007b235a4a9dc9163d08820b4b9fdfc9f

Change-Id: I0bcbea398019671ef550c053171826bb4978849d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agonet: phy: motorcomm: Add pad drive strength cfg support
Samin Guo [Tue, 25 Apr 2023 10:43:29 +0000 (18:43 +0800)]
net: phy: motorcomm: Add pad drive strength cfg support

The motorcomm phy (YT8531) supports the ability to adjust the drive
strength of the rx_clk/rx_data, and the default strength may not be
suitable for all boards. So add configurable options to better match
the boards.(e.g. StarFive VisionFive 2)

Original commit: https://github.com/SaminGuo/linux/commit/3732faf2239b77478022246b9ac62902ec30c2c6

Change-Id: Ic805273b769f3ee47eab4aec1c16c6633d466ac8
Signed-off-by: Samin Guo <samin.guo@starfivetech.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agosoc: sifive: ccache: Fix to use soc starfive jh7110 addr
Hoegeun Kwon [Tue, 11 Jul 2023 06:51:37 +0000 (15:51 +0900)]
soc: sifive: ccache: Fix to use soc starfive jh7110 addr

Fix to use jh7110 address when using jh110 soc.

Change-Id: Id282ec6f67b73336f89118f4e3446e953a27f270
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agosound: soc: ac108: Remove unused function and fix fallthrough warning
Jaehoon Chung [Thu, 6 Jul 2023 06:24:59 +0000 (15:24 +0900)]
sound: soc: ac108: Remove unused function and fix fallthrough warning

Fix the unused-function and implicit-fallthrough warning.

Change-Id: I84b7203c3ca864ecb89c562058037dd0630e5c25
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoBluetooth: Fix build warning
Hoegeun Kwon [Tue, 4 Jul 2023 08:34:52 +0000 (17:34 +0900)]
Bluetooth: Fix build warning

Occur build warning for unused variable, Fix warning

  net/bluetooth/hci_event.c: In function ‘process_adv_report’:
  net/bluetooth/hci_event.c:6470:7: warning: unused variable ‘match’ [-Wunused-variable]
    bool match;
         ^~~~~
  net/bluetooth/hci_event.c:6469:26: warning: unused variable ‘d’ [-Wunused-variable]
    struct discovery_state *d = &hdev->discovery;

Change-Id: I5c6778aea827e6d138009541991409834ea9cc07
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agopackaging: Update build required openssl version from 1.1 to 3
Jaehoon Chung [Mon, 3 Jul 2023 05:32:15 +0000 (14:32 +0900)]
packaging: Update build required openssl version from 1.1 to 3

Openssl 1.1.1 is supported until September 2023, so Tizen 8.0 upgrades
Openssl 3.0.x. To meet this, change build required openssl version. Also
required with pkgconfig.

Change-Id: Ia66aa62a7ddb6517b83d89d4b87fe6cebb452e46
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoperf cpumap: Make counter as unsigned ints
Khem Raj [Mon, 23 Jan 2023 21:04:10 +0000 (13:04 -0800)]
perf cpumap: Make counter as unsigned ints

These are loop counters which is inherently unsigned. Therefore make
them unsigned. Moreover it also fixes alloc-size-larger-than
error with gcc-13, where malloc can be called with (-1) due to tmp_len
being an int type.

Fixes
| cpumap.c:366:20: error: argument 1 range [1844674406511961702418446744073709551612] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=]
|   366 |         tmp_cpus = malloc(tmp_len * sizeof(struct perf_cpu));
|       |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Upstream-Status: Submitted [https://lore.kernel.org/linux-perf-users/20230123211310.127532-1-raj.khem@gmail.com/T/#u]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Change-Id: I7ecc661339efd49179dd4c1823f4969cee0b0515
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agopwm: pwm-starfive-ptc: Fix imcompatible poiter type
Jaehoon Chung [Mon, 26 Jun 2023 03:48:44 +0000 (12:48 +0900)]
pwm: pwm-starfive-ptc: Fix imcompatible poiter type

The get_state of pwm_ops is 'int' type, but starfive_pwm_ptc_get_state
function is 'void' type.
It needs to fix correct pointer type.

Change-Id: I8560bb1c0d9571fc0d4e66aa593d257e474f033f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agodrm/verisilicon: Add Innosilicon HDMI driver
Keith Zhao [Wed, 21 Jun 2023 08:23:10 +0000 (17:23 +0900)]
drm/verisilicon: Add Innosilicon HDMI driver

Add support Innosilicon HDMI driver of starfive JH7110. This driver is
from [1]. We modified to select and use stable inno_hdmi driver or
mainline posted hdmi driver.

[1] https://github.com/starfive-tech/linux

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
Change-Id: I5c72e2d9fe7cc9f231926f624f459547d73e0f1e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/verisilicon: hdmi: Add feature to check cea mode
Hoegeun Kwon [Wed, 21 Jun 2023 05:59:01 +0000 (14:59 +0900)]
drm/verisilicon: hdmi: Add feature to check cea mode

There is a problem with output for modes that are not supported, and
due to this, the hdmi sound is not played. Add feature to check cea
mode.

Change-Id: I55e3daa4e6e98f6df26bf91de84c099077e7f339
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agoASoC: SOC: Fix fmt with dai naming
Hoegeun Kwon [Tue, 20 Jun 2023 10:10:44 +0000 (19:10 +0900)]
ASoC: SOC: Fix fmt with dai naming

Kernel v6.y does not support the legacy_dai_naming format, so there is
a problem that i2s does not work due to dai_name. Fix that issue.

Change-Id: I9aae5c683b4b5d803c12959ca2994e8cc3e6c577
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agoRISCV: dts: starfive: Add hdmi audio snd card
Hoegeun Kwon [Tue, 20 Jun 2023 07:54:22 +0000 (16:54 +0900)]
RISCV: dts: starfive: Add hdmi audio snd card

Add HDMI audio snd-card, The snd-card1 is use i2s and hdmi.

Change-Id: I64102445ffad0a072d5d8f62a886bbc9945fd1f1
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/verisilicon: hdmi: Add audio_init feature
Hoegeun Kwon [Wed, 21 Jun 2023 06:47:35 +0000 (15:47 +0900)]
drm/verisilicon: hdmi: Add audio_init feature

Add hdmi_audio_init to use audio in hdmi driver.

Change-Id: If878ee4ee4a1665d91a34ef4f5c5f6d2ab60840e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/verisilicon: hdmi: Add support audio hdmi driver
Xingyu Wu [Mon, 19 Jun 2023 08:57:37 +0000 (17:57 +0900)]
drm/verisilicon: hdmi: Add support audio hdmi driver

Add support hdmi audio driver of starfive JH7110. This driver is from
[1], and the imported patch list[2]. We modified to use struct
starfive_hmdi instead of struct inno_hdmi also added to use
legacy_dai_naming.

[1] https://github.com/starfive-tech/linux

[2] patch list from v5.15.y
  5bec3220a8be drm:verisilicon:hdmi-audio:Adjust when to configure registers
  5a302a7a25fe gpu:drm:Add audio function in inno hdmi

Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
Change-Id: Iae0ec57f2cf588c7ca177f7e284968ca9e68c674
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/verisilicon: hdmi: Fix to timming for hdmi_setup
Hoegeun Kwon [Wed, 14 Jun 2023 08:06:14 +0000 (17:06 +0900)]
drm/verisilicon: hdmi: Fix to timming for hdmi_setup

When changing the mode, a problem occurs because we try to write a
value to reg in a state that is not resumed after suspend. Move the
timing of writing values to reg to enable.

Change-Id: I49db485e947c164129b1412cdff2a16d6306895e
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agoRISCV: config: Enable sifive flush config
Hoegeun Kwon [Tue, 13 Jun 2023 10:40:25 +0000 (19:40 +0900)]
RISCV: config: Enable sifive flush config

Enable SIFIVE_CCACHE and SIFIVE_FLUSH configuration.

Change-Id: I008c302e89896a0ea14f065365526e4b490b5af2
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/verisilicon: Add starfive_flush_dcache
Hoegeun Kwon [Tue, 13 Jun 2023 10:39:30 +0000 (19:39 +0900)]
drm/verisilicon: Add starfive_flush_dcache

There is a problem that the garbage cache value comes out when the
screen is displayed. Flush the cache by adding the flush feature.
The feature referred to v5.15 kernel.

Change-Id: I183eb0c1640c17b5ac27dcb1ce82555a5c651571
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agosoc: sifive: ccache: Add flush feature
Hoegeun Kwon [Thu, 8 Jun 2023 11:26:29 +0000 (20:26 +0900)]
soc: sifive: ccache: Add flush feature

Add the ccache flush feature applied to kernel v5.15.
This feature flushes the garbage cache when output the screen.

Change-Id: I855fd37416f028f6d7c9b9e1459462e4da7e1740
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agoRISCV: config: Enable starfive drm and hdmi config
Hoegeun Kwon [Tue, 13 Jun 2023 07:41:20 +0000 (16:41 +0900)]
RISCV: config: Enable starfive drm and hdmi config

Enable DRM_VERISILICON and STARFIVE_HDMI configuration.

Change-Id: If26c6c98b84d3e9cddbc6b696e8332882b9f3b31
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/verisilicon: Fix to build error for drm hdmi
Hoegeun Kwon [Tue, 13 Jun 2023 07:38:32 +0000 (16:38 +0900)]
drm/verisilicon: Fix to build error for drm hdmi

Modify for the 6.1 kernel interface.

Change-Id: I24b652c2c1ab102649586c3cdb6eca63256dc3ce
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
15 months agodrm/verisilicon: Add starfive hdmi driver
Keith Zhao [Tue, 13 Jun 2023 06:19:56 +0000 (15:19 +0900)]
drm/verisilicon: Add starfive hdmi driver

Add HDMI dirver for StarFive SoC JH7110.

Signed-off-by: Keith Zhao <keith.zhao@starfivetech.com>
[cherry-pick : https://patchwork.kernel.org/project/linux-riscv/cover/20230602074043.33872-1-keith.zhao@starfivetech.com/]
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Change-Id: I328dcf0c0adf7bc2817675278034d6a2520a536b