Michal Wilczynski [Thu, 12 Dec 2024 14:54:51 +0000 (15:54 +0100)]
RISCV: configs: Enable Three-wire H5 UART protocol
Support for this protocol in the kernel is requried for communication
with the RTL8723DS chip on LPI4A board. Enable it.
Change-Id: I1b54c5edf898de89ca388a002194bc57950957c2
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Tue, 10 Dec 2024 18:39:13 +0000 (19:39 +0100)]
riscv: dts: thead: Add edge-triggered option for wireless nodes
After extensive testing it seems like the wireless chips used on the
TH1520 SoC - aic8800 and rtk connected to PCA9557 I/O expander are
connected so in an unstable way. There is a need to flip GPIO values
0->1 with some delay in order for the chips to start predictably.
Change-Id: Ib2d11139f51dbb37edc0b0aed3a61f459eed8c43
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Tue, 10 Dec 2024 18:07:56 +0000 (19:07 +0100)]
dt-bindings: net: rfkill-gpio: Add edge-triggered option
Some wireless chips react only to the state change in the GPIO, instead
of the value itself. Support this mode operation in the rfkill-gpio.
Change-Id: If52a0f707eae8ab3d89918007dba83ce3e4e5060
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 6 Dec 2024 16:51:00 +0000 (17:51 +0100)]
net: rfkill: rfkill-gpio: Add workaround for faulty interconnect design
Vendor provided custom rfkill drivers seems to restrict operation of
rfkill to only enable the Wi-Fi/Bluetooth at the start. The flipping
on/off is restricted. Additionally they include a lot of delays when
accessing GPIO controller pcal6408ahk_c. This seems to indicate some
instability in the hardware.
So I spent some more time trying to analyze this, and here's what I
found:
1) The delays are not really needed. The GPIO controller and i2c bus
seems to work correctly as designed. So I don't think any
modifications in the GPIO/i2c drivers are appropriate.
2) The thing that is really needed is the state change on the GPIO line
connected to the wireless chip i.e the value on the GPIO is already 1
on the boot, but it needs to go from 0->1 for Wi-Fi chip to get up
properly.
In the new implementation work around this by introducing new option
'edge-triggered'. This allows for the the state change on GPIO 0->1,
which seems to be required by the wireless chip to start working
correctly.
There is still msleep() required between flipping GPIO values, it seems
like there is no way around this.
Nevertheless in the new implementation it should be possible to turn the
power on/off to Wi-Fi and Bluetooth programatically, through this
crashed the driver in my testing.
Change-Id: I1181edf61d036e91aad8d7bb9bd79684296384dd
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 6 Dec 2024 10:45:47 +0000 (11:45 +0100)]
net: rfkill: Remove unnecessary rfkill-wlan driver
Better way of enabling wireless chip already exists in the kernel in the
form of rfkill-gpio driver. Remove the obsolete rfkill-wlan.
Change-Id: I2e023b698bfa0787c3ba9c59f53971467fba08ef
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 6 Dec 2024 10:45:37 +0000 (11:45 +0100)]
riscv: dts: thead: Implement rfkill using generic driver
Currently the wireless chip is being enabled by the custom rfkill
driver. Use the generic upstream driver - rfkill-gpio. Also, since the
rtk chip requires separate GPIO to be enabled for Bluetooth add a
separate node with appropriate GPIO.
Change-Id: Id27e99d407e1370d3be2c9492f7b7791e7dea11f
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Seung-Woo Kim [Fri, 8 Nov 2024 00:42:19 +0000 (09:42 +0900)]
net: wireless: rtl8723ds: Remove misleading-indentation warnings
Adjust indent to fix misleading-indentation warnings.
Change-Id: I8c9c21858365890663079f187c28fc41175730af
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Fri, 8 Nov 2024 00:23:35 +0000 (09:23 +0900)]
net: wireless: rtl8723ds: Remove null check from rtw_mfree_stainfo()
Address of declared variable is always not null. Remove unnecessary
null check for the case in rtw_mfree_stainfo().
Change-Id: I561148225a42a802470ef3d39115c0120954c4ff
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Marek Szyprowski [Thu, 7 Nov 2024 12:21:14 +0000 (13:21 +0100)]
riscv: dts: thead: lichee-pi-4a: increase CMA size to 512M
Increase the default CMA area to 512M to avoid memory allocation failures
in the graphics stack when connected to 4K display.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I5beee928a43f112c21a0b6ca75bb430b91e77db6
Seung-Woo Kim [Thu, 7 Nov 2024 06:19:47 +0000 (15:19 +0900)]
net: wireless: rtl8723ds: Fix stringop-overread warnings
Copying to char[0] causes stringop-overread warnings, so replace
with char[].
Change-Id: If562668eac9d6a8b45d00c983da41ac2b523fc8b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 6 Nov 2024 12:14:38 +0000 (21:14 +0900)]
net: wireless: rtl8723ds:don't write directly to netdev->dev_addr
Instead of direct write to netdev->dev_addr, it should use
dev_addr_set().
Change-Id: I94557ed087bd35a109f88a065dcd2c26d134aefd
Ref:
48eab831ae8b ("net: create netdev->dev_addr assignment helpers")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 6 Nov 2024 09:05:06 +0000 (18:05 +0900)]
net: wireless: rtl8723ds: Fix wrong casting for function pointer
Instead of wrong function pointer casting, cast argument from
the callback function.
Change-Id: Ie3e2db6803a40fb61b1e4f7978c0a996952a2996
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 6 Nov 2024 08:52:43 +0000 (17:52 +0900)]
net: wireless: rtl8723ds: Remove unnecessary null checks
The null check for an array element is not required because
it is always not null. Remove unnecessary null checks.
Change-Id: I1617511e7ae5b54ace2f62e8c8e2d486e5824449
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 6 Nov 2024 02:59:14 +0000 (11:59 +0900)]
net: wireless: rtl8723ds: Fix implicit-fallthrough warnings
Fix implicit-fallthrough warnings with explicit fallthrough
statement.
Change-Id: Iebca5d6c71af8c3e1611e78539b12cf9a2911d57
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Wed, 6 Nov 2024 02:48:49 +0000 (11:48 +0900)]
soc: thead: Fix enum-conversion warning
Fix wrong enum type for light_event_msg_hdr_fill().
Change-Id: I3a3021f2862e31b0721f22f4f497025f1cb0765b
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Marek Szyprowski [Tue, 5 Nov 2024 09:42:06 +0000 (10:42 +0100)]
gpu: drm: img: Fix build warning
Fix the following build warning introduce after recent configuration
change:
drivers/gpu/drm/img-rogue/module_common.c:558:13: warning: 'wrap_pvr_sync_close' defined but not used [-Wunused-function]
558 | static void wrap_pvr_sync_close(void *connection_data)
| ^~~~~~~~~~~~~~~~~~~
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I505620cfd351bc5980d48d0916c342d015054430
Seung-Woo Kim [Tue, 9 Jan 2024 08:47:54 +0000 (17:47 +0900)]
gpu: drm: img: Replace system work flush with img dedicated workqueue
To remove deprecated flush_scheduled_work() after the commit
20bdedafd2f6 ("workqueue: Warn attempt to flush system-wide workqueues."),
add img dedicated unordered wq and queue/flush the wq instead of
system work.
Change-Id: I316b2858abf15e11d9ed40550a41f9494d421c87
Ref:
848a4e5c096d ("drm/i915: add a dedicated workqueue inside drm_i915_private")
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Marek Szyprowski [Mon, 4 Nov 2024 15:23:33 +0000 (16:23 +0100)]
gpu: drm: img: fix potential NULL pointer dereference
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I519c2289c9659deab1e348ef88ab05668eb9c8f7
Marek Szyprowski [Mon, 4 Nov 2024 11:34:46 +0000 (12:34 +0100)]
gpu: drm: img: load firmware on device open
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I58b3d3a68cfce9d19f864e3f9c8b943549285538
Marek Szyprowski [Mon, 4 Nov 2024 11:27:57 +0000 (12:27 +0100)]
gpu: drm: img: disable useless and unused 'nulldisp' drm driver
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I13abab4e51511974a00af3500fae90f5bc18f96d
Michal Wilczynski [Mon, 28 Oct 2024 09:21:17 +0000 (10:21 +0100)]
watchdog: light_wdt: Fix warnings
This fixes following warning:
In function 'light_wdt_update_timeout':
drivers/watchdog/light_wdt.c:116:51: warning: implicit
conversion from
'enum light_aon_wdg_func' to 'enum light_aon_misc_func'
[-Wenum-conversion]
light_wdt_msg_hdr_fill(&wdt_dev->msg.hdr,
LIGHT_AON_WDG_FUNC_TIMEOUTSET);
Also, add a 'static' to a static function to suppress other warning.
Change-Id: Ia8f4daa37c58beffc8d0bdb8bcef20108cb282ab
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 28 Oct 2024 08:58:37 +0000 (09:58 +0100)]
soc: thead: Fix wrong constant
SOC_THEAD constant is not used, instead ARCH_THEAD is a correct constant
used upstream. Fix it.
Change-Id: Iea3b4393ec6d63b079483c87f0aa1573df0c6014
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 28 Oct 2024 17:31:13 +0000 (18:31 +0100)]
RISCV: configs: tizen-lpi4a: Enable rtl8723ds driver
rtl8723ds chip is used on LicheePi4A boards interchangeably
with aic8800. Enable it as well, so Wi-Fi and Bluetooth works on
more boards.
Change-Id: I025dd5451b533fd728baa622f04ce41cf32d7ac6
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 28 Oct 2024 17:25:35 +0000 (18:25 +0100)]
net: wireless: rtl8723ds: Adapt driver to API changes in kernel 6.6
Driver copied from the kernel 5.10 doesn't compile on the kernel 6.6.
Adapt it by changing function calls that changed across the kernel
versions.
Change-Id: I0ecd55a7c7bd5b869d51bbaf0fef9b3e93d4055e
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 28 Oct 2024 13:06:13 +0000 (14:06 +0100)]
net: wireless: Add vanilla rtl8723ds driver
Copy the driver as is from [1]. This code won't compile, but it's better
to do the kernel 6.6 adjustments in the following commit.
[1] - https://github.com/revyos/thead-kernel.git
Change-Id: I91c17992a4d07b4ff42ea2e0ef1968a78806d738
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 14 Oct 2024 08:40:26 +0000 (10:40 +0200)]
RISCV: configs: tizen-lpi4a: Enable watchdog driver
The watchdog driver is necessary for the 'reboot' feature to work.
Enable it in the config.
Change-Id: I9c7e25baa6df0495fccc5e6e2e610273fda796df
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 14 Oct 2024 08:34:28 +0000 (10:34 +0200)]
riscv: dts: thead: Enable light_event and dependent nodes
Light event device tree node is required for the 'reboot' feature to
work, as the driver function gets called by the watchdog. Enable it in
the device tree to get the driver initialized properly. Add aon_iram
dependent node as well. Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: Id77c4901a2a77146d0f26e31769221a1cf5ca853
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 14 Oct 2024 08:28:34 +0000 (10:28 +0200)]
soc: thead: Introduce thead light_event driver
This driver is required for the 'reboot' feature to work. Watchdog
driver calls light_event_set_rebootmode() exported from this driver.
Port it from the vendor kernel [1].
[1] - https://gitee.com/thead-yocto/kernel.git
Change-Id: Ia25f95ed72669df348f72bcfcb0ca5eabb51dfc7
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 14 Oct 2024 08:21:06 +0000 (10:21 +0200)]
watchdog: light_wdt: Introduce thead watchdog driver
T-Head watchdog driver is required for 'reboot' feature to work.
Port it from the vendor kernel [1].
[1] - https://gitee.com/thead-yocto/kernel.git
Change-Id: If4d54fcdc65c77b6068b4cd989f3f869fec5428a
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Thu, 10 Oct 2024 13:44:48 +0000 (15:44 +0200)]
riscv: dts: thead: Enable uart4 for Bluetooth HCI
On LicheePi4A the HCI for Bluetooth is using UART. Enable uart4 so
the communication with the chip works.
Change-Id: If8c40574fe47dc20901b7142d664656ca5b418df
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Marek Szyprowski [Fri, 20 Sep 2024 07:40:43 +0000 (09:40 +0200)]
RISCV: configs: tizen-lpi4a: drop DM_BOW
dm-bow kernel module has been moved to external linux-tizen-modules
repository, so drop it from tizen_lpi4a_defconfig.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I877de7f16d007703b4cc3da3c0be33184dd571b1
Marek Szyprowski [Fri, 20 Sep 2024 07:38:34 +0000 (09:38 +0200)]
Revert "device-mapper: Add dm-bow"
The dm-bow kernel module (developed externally by Google team) has been
moved to linux-tizen-modules-source repository, so keeping a copy of it
in each kernel repository is not needed anymore.
This reverts commit
b5c5df065d73537ff80dcabae573e23a49ff02f9.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia30b192e5e825bd013c6b0f39b2ee0c614f3c09c
Michal Wilczynski [Fri, 4 Oct 2024 10:29:04 +0000 (12:29 +0200)]
RISCV: configs: tizen-lpi4a: Enable wireless drivers
Aic8800 drivers are written in a way that they can only work as modules,
and can't be compiled in the kernel. Enable them as modules so the Wi-Fi
works.
Change-Id: I15336469583726ba5a4bd898349809ab15421ca3
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 4 Oct 2024 10:14:20 +0000 (12:14 +0200)]
riscv: dts: thead: Add Wi-Fi rfkill node, and SDIO bus node
In order for Wi-Fi to work the SDIO bus needs to be enabled in the
device tree, as well as the node required to turn on the GPIO to power
on the device - wcn_wifi.
Port them from the vendor kernel [1].
[1] - https://gitee.com/thead-yocto/kernel.git
Change-Id: I4b673316100f5a75195105befb6895095a9cb690
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 4 Oct 2024 10:01:58 +0000 (12:01 +0200)]
riscv: dts: thead: Remove interfering regulator
Regulator soc_cam2_dvdd12_ir_reg seems to be using the same gpio
controller as the rfkill gpio. It was observed that when this regulator
is enabled the rfkill setting up it's GPIO doesn't actually have any
effect i.e the Wi-Fi card never actually shows up on the SDIO bus.
Remove this regulator for now, as it doesn't seem to be critical for any
other functionality on the SoC.
Change-Id: I5e54831e4084ab04bc5d3618cbde318d9775aa62
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 4 Oct 2024 09:40:21 +0000 (11:40 +0200)]
net: rfkill: Enable custom rfkill for LicheePi4A Wi-Fi
Enable the driver responsible for powering-on the Wi-Fi card on the
T-Head LicheePi4A SoC. One could argue that the net/rfkill might not be
the best place for it, however it was put there originally in the vendor
kernel. For now will keep it there.
It was observed that the driver doesn't really do much else, than set
the gpio specified in the device during the boot up of the system.
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I268f531f9e7860ee22d261268bc06acd51088e99
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 4 Oct 2024 09:15:49 +0000 (11:15 +0200)]
wireless: aic8800: Enable LicheePi 4A wireless driver
Ported from the vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: Ibd067b5ebf33e6206e57b9e45a2e8b1a1c88011f
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Thu, 3 Oct 2024 12:53:27 +0000 (14:53 +0200)]
mmc: sdhci: Prevent stale command and data interrupt handling
While working with the T-Head 1520 LicheePi4A SoC, certain conditions
arose that allowed me to reproduce a race issue in the sdhci code.
To reproduce the bug, you need to enable the sdio1 controller in the
device tree file
`arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi` as follows:
&sdio1 {
bus-width = <4>;
max-frequency = <
100000000>;
no-sd;
no-mmc;
broken-cd;
cap-sd-highspeed;
post-power-on-delay-ms = <50>;
status = "okay";
wakeup-source;
keep-power-in-suspend;
};
When resetting the SoC using the reset button, the following messages
appear in the dmesg log:
[ 8.164898] mmc2: Got command interrupt 0x00000001 even though no
command operation was in progress.
[ 8.174054] mmc2: sdhci: ============ SDHCI REGISTER DUMP ===========
[ 8.180503] mmc2: sdhci: Sys addr: 0x00000000 | Version: 0x00000005
[ 8.186950] mmc2: sdhci: Blk size: 0x00000000 | Blk cnt: 0x00000000
[ 8.193395] mmc2: sdhci: Argument: 0x00000000 | Trn mode: 0x00000000
[ 8.199841] mmc2: sdhci: Present: 0x03da0000 | Host ctl: 0x00000000
[ 8.206287] mmc2: sdhci: Power: 0x0000000f | Blk gap: 0x00000000
[ 8.212733] mmc2: sdhci: Wake-up: 0x00000000 | Clock: 0x0000decf
[ 8.219178] mmc2: sdhci: Timeout: 0x00000000 | Int stat: 0x00000000
[ 8.225622] mmc2: sdhci: Int enab: 0x00ff1003 | Sig enab: 0x00ff1003
[ 8.232068] mmc2: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
[ 8.238513] mmc2: sdhci: Caps: 0x3f69c881 | Caps_1: 0x08008177
[ 8.244959] mmc2: sdhci: Cmd: 0x00000502 | Max curr: 0x00191919
[ 8.254115] mmc2: sdhci: Resp[0]: 0x00001009 | Resp[1]: 0x00000000
[ 8.260561] mmc2: sdhci: Resp[2]: 0x00000000 | Resp[3]: 0x00000000
[ 8.267005] mmc2: sdhci: Host ctl2: 0x00001000
[ 8.271453] mmc2: sdhci: ADMA Err: 0x00000000 | ADMA Ptr:
0x0000000000000000
[ 8.278594] mmc2: sdhci: ============================================
I also enabled some traces to better understand the problem:
kworker/3:1-62 [003] ..... 8.163538: mmc_request_start:
mmc2: start struct mmc_request[
000000000d30cc0c]: cmd_opcode=5
cmd_arg=0x0 cmd_flags=0x2e1 cmd_retries=0 stop_opcode=0 stop_arg=0x0
stop_flags=0x0 stop_retries=0 sbc_opcode=0 sbc_arg=0x0 sbc_flags=0x0
sbc_retires=0 blocks=0 block_size=0 blk_addr=0 data_flags=0x0 tag=0
can_retune=0 doing_retune=0 retune_now=0 need_retune=0 hold_retune=1
retune_period=0
<idle>-0 [000] d.h2. 8.164816: sdhci_cmd_irq:
hw_name=
ffe70a0000.mmc quirks=0x2008008 quirks2=0x8 intmask=0x10000
intmask_p=0x18000
irq/24-mmc2-96 [000] ..... 8.164840: sdhci_thread_irq:
msg=
irq/24-mmc2-96 [000] d.h2. 8.164896: sdhci_cmd_irq:
hw_name=
ffe70a0000.mmc quirks=0x2008008 quirks2=0x8 intmask=0x1
intmask_p=0x1
irq/24-mmc2-96 [000] ..... 8.285142: mmc_request_done:
mmc2: end struct mmc_request[
000000000d30cc0c]: cmd_opcode=5
cmd_err=-110 cmd_resp=0x0 0x0 0x0 0x0 cmd_retries=0 stop_opcode=0
stop_err=0 stop_resp=0x0 0x0 0x0 0x0 stop_retries=0 sbc_opcode=0
sbc_err=0 sbc_resp=0x0 0x0 0x0 0x0 sbc_retries=0 bytes_xfered=0
data_err=0 tag=0 can_retune=0 doing_retune=0 retune_now=0 need_retune=0
hold_retune=1 retune_period=0
Here's what happens: the __mmc_start_request function is called with
opcode 5. Since the power to the Wi-Fi card, which resides on this SDIO
bus, is initially off after the reset, an interrupt SDHCI_INT_TIMEOUT is
triggered. Immediately after that, a second interrupt SDHCI_INT_RESPONSE
is triggered. Depending on the exact timing, these conditions can
trigger the following race problem:
1) The sdhci_cmd_irq top half handles the command as an error. It sets
host->cmd to NULL and host->pending_reset to true.
2) The sdhci_thread_irq bottom half is scheduled next and executes faster
than the second interrupt handler for SDHCI_INT_RESPONSE. It clears
host->pending_reset before the SDHCI_INT_RESPONSE handler runs.
3) The pending interrupt SDHCI_INT_RESPONSE handler gets called, triggering
a code path that prints: "mmc2: Got command interrupt 0x00000001 even
though no command operation was in progress."
To solve this issue, we need to clear pending interrupts when resetting
host->pending_reset. This ensures that after sdhci_threaded_irq restores
interrupts, there are no pending stale interrupts.
Change-Id: Idd6b1623cd842e00a30466074a225e7d847d1f98
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Marek Szyprowski [Thu, 29 Aug 2024 14:34:45 +0000 (16:34 +0200)]
RISCV: configs: tizen-lpi4a: enable drivers needed for host USB support
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I45392bbd63292da19e7a3bae0e86c5f7d48faaa3
Marek Szyprowski [Thu, 29 Aug 2024 14:30:50 +0000 (16:30 +0200)]
riscv: dts: thead: Add devicetree nodes for DWC3 (host USB) controller
Add DWC3 device controller and the needed glue nodes.
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3e023ec8d778c44204fa2e67b107431fff36f035
Marek Szyprowski [Thu, 29 Aug 2024 14:24:57 +0000 (16:24 +0200)]
usb: dwc3: add THEAD/LicheePi4A vendor driver
Taken from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I213452d619632addb75a23373542a962c21e6c9b
Seung-Woo Kim [Wed, 14 Aug 2024 01:02:13 +0000 (10:02 +0900)]
gpu: drm: img-rogue: Fix shrinker name
The empty character shrinker name causes build warning, so fix it
to NULL as like other git trees including img-rogue.
Change-Id: I4aca9e4309ad27bd9922af54f9a10de11b929d20
Ref: https://git.tizen.org/cgit/platform/kernel/linux-starfive/tree/drivers/gpu/drm/img/img-rogue/services/server/env/linux/physmem_osmem_linux.c?h=
7d2455338737#n615
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 13 Aug 2024 11:13:31 +0000 (20:13 +0900)]
firmware: thead: Remove unused-function warning
Remove unused function to resolve unused-function warning.
Change-Id: Idfb3f4c329616dd182078942a020a8c70d376eb1
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 13 Aug 2024 11:11:59 +0000 (20:11 +0900)]
firmware: thead: Fix format warning
Fix format warning with proper printing format.
Change-Id: Ie25c9d68846c78ea5f3b8c13791f932971ac36e9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 13 Aug 2024 11:04:01 +0000 (20:04 +0900)]
firmware: thead: Remove unused-variable warning
Remove unused-variable warning.
Change-Id: I80939412e9086d1b00542cfb733ccb11b86e565c
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 13 Aug 2024 11:02:36 +0000 (20:02 +0900)]
firmware: thead: Remove int-conversion waring in light_proc
In Tizen toolchain -Wint-conversion warning causes build error.
Remove the warning with proper casting.
Change-Id: Ibb7c0be7fc2d4176f91800986c4ba113b2ad1dad
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Michal Wilczynski [Fri, 9 Aug 2024 16:07:22 +0000 (18:07 +0200)]
RISCV: configs: tizen-lpi4a: Enable options required for GPU
GPU resides in it's own power island. Always-on drivers are required to
power on that island. Enable both GPU driver and dependent AON driver
config options.
Change-Id: I74e1563488f2ccf31ddce5f64d40378f2b26da82
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 9 Aug 2024 16:04:27 +0000 (18:04 +0200)]
riscv: dts: thead: Add GPU node and dependent nodes
GPU device tree node is dependent on always-on module working correctly.
Fix aon node by supplying it with correct reserved memory space. Add the
gpu node itself. Add an empty aon node in the beaglev-ahead dts, to
avoid breaking the compilation.
Change-Id: I9eafb0d576b1045089a640419ee7a0400ba90550
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 9 Aug 2024 15:58:12 +0000 (17:58 +0200)]
riscv: dts: thead: Enable thead fan
The drivers responsible for supporting thead fan are already in the
repo. Enable the fan in the device tree for better SoC usability.
Ported from [1].
[1] - https://github.com/revyos/thead-kernel.git
Change-Id: I8b7efb97ec4ceb0c0484dd49631aef9a4101ab3b
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 12 Aug 2024 08:18:47 +0000 (10:18 +0200)]
mailbox: Introduce thead mailbox driver
The always-on driver required for GPU to work is also dependent on the
mailbox. Enable the Thead mailbox driver. Ported from [1].
[1] - https://github.com/revyos/thead-kernel.git
Change-Id: Ic56a740e1f618f5ceaa51addc3ed9a66d6c10ab6
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 9 Aug 2024 15:38:16 +0000 (17:38 +0200)]
regulator: light-regulator-aon: Update aon regulator driver
Update the light-regulator-aon driver to the newest version from [1].
It is important that this regulator works correctly as the GPU driver
depends on the aon working correctly, since it's situated in it's own
power island.
Fix the formatting by using clang-format with kernel style config.
[1] - https://github.com/revyos/thead-kernel.git
Change-Id: I6be797fe8f2512bc3cd93baf62e3a9f92dd12287
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 9 Aug 2024 14:59:07 +0000 (16:59 +0200)]
firmware: thead: Update always-on module drivers
GPU resides in it's own power island. The always-on module is resposible
for powering the GPU on. Update the drivers to the newest available
from [1].
In new version the extra debug FW info was added. Sadly this new debug
module called light-proc-debug needs custom thead cache flushing
functions to work correctly. Port them as well.
[1] - https://github.com/revyos/thead-kernel.git
Change-Id: I98a3e4549cb7e3ae5d0d282af35953a04db82882
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 9 Aug 2024 14:29:55 +0000 (16:29 +0200)]
gpu: drm: img: Adjust the driver code for 6.6 kernel
Across 5.10 and 6.6 many of the interfaces changed e.g the vma_flags
can't be changed directly as it only should be changed using a provided
API. Adjust the driver code so it compiles on a new kernel.
Change-Id: Id1129caa0ab516568489b856b6dcc4b8112bf1c6
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 9 Aug 2024 12:38:40 +0000 (14:38 +0200)]
gpu: drm: img: Fix to use iterator instead of list
This commit is cherry-picked from starfive repo [1]
1691514834f8
("gpu: drm: img: Fix to use iterator instead of list").
[1] - git://git.tizen.org/platform/kernel/linux-starfive
Change-Id: I4146b481a31c722785fce84d86b1c41788908afd
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 21 Feb 2024 03:02:31 +0000 (11:02 +0800)]
riscv: mm: fix NOCACHE_THEAD does not set bit[61] correctly
Previous commit
dbfbda3bd6bf ("riscv: mm: update T-Head memory type
definitions") from patch [1] missed a `<` for bit shifting, result in
bit(61) does not set in _PAGE_NOCACHE_THEAD and leaves bit(0) set instead.
This patch get this fixed.
Link: https://lore.kernel.org/linux-riscv/20230912072510.2510-1-jszhang@kernel.org/
Fixes: dbfbda3bd6bf ("riscv: mm: update T-Head memory type definitions")
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/tencent_E19FA1A095768063102E654C6FC858A32F06@qq.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
[ need this commit for GPU to work as the GPU driver is manually setting
page properties ]
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Change-Id: I59b1d7d18be9e8f43606f494a0b8b5f834b30189
Michal Wilczynski [Tue, 12 Sep 2023 07:25:10 +0000 (15:25 +0800)]
riscv: mm: update T-Head memory type definitions
Update T-Head memory type definitions according to C910 doc [1]
For NC and IO, SH property isn't configurable, hardcoded as SH,
so set SH for NOCACHE and IO.
And also set bit[61](Bufferable) for NOCACHE according to the
table 6.1 in the doc [1].
Link: https://github.com/T-head-Semi/openc910
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Guo Ren <guoren@kernel.org>
Tested-by: Drew Fustini <dfustini@baylibre.com>
Link: https://lore.kernel.org/r/20230912072510.2510-1-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
[ need this commit for GPU to work as the GPU driver is manually setting
page properties ]
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Change-Id: I62a5af81620466024fdf5bf9c3f322aadddf6366
Michal Wilczynski [Mon, 12 Aug 2024 13:15:26 +0000 (15:15 +0200)]
gpu: drm: img-rogue: Initial port of img-rogue
This is an initial copy of the PVR GPU driver from [1]. Of course it
doesn't compile on the 6.6 kernel, but it's better to make separate
commits with the 6.6 adaptations.
[1] - https://github.com/revyos/thead-kernel.git
Change-Id: If3cadbc1f65a4a07604bf9ed9b2a26904c658336
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Seung-Woo Kim [Tue, 2 Jul 2024 09:46:07 +0000 (18:46 +0900)]
drm: bridge: synopsys: dw-hdmi: Resolve unused-function build warning
Resolve unused-function build warning for is_csc_needed().
Change-Id: Ib65bca5e8d4451f16d5f306eff5505c2106bd0a9
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Seung-Woo Kim [Tue, 2 Jul 2024 09:42:46 +0000 (18:42 +0900)]
drm: verisilicon: Resolve build warnings
Remove below build warnings:
drivers/gpu/drm/verisilicon/vs_dc.c: In function 'dc_resume':
drivers/gpu/drm/verisilicon/vs_dc.c:1355:9: warning: unused variable 'i' [-Wunused-variable]
1355 | int i, ret;
| ^
drivers/gpu/drm/verisilicon/vs_drv.c: In function 'vs_debugfs_planes_show':
drivers/gpu/drm/verisilicon/vs_drv.c:80:36: warning: format '%p' expects argument of type 'void *', but argument 3 has type 'u32' {aka 'unsigned int'} [-Wformat=]
80 | seq_printf(s, "\tformat = %p4cc\n", state->fb ?
| ~^ ~~~~~~~~~~~
| |
| void *
| %d
81 | state->fb->format->format : 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| u32 {aka unsigned int}
Change-Id: I5040d64d7a900c298307cd77ee04aa4fc74124f7
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Benjamin Gray [Tue, 12 Sep 2023 06:07:59 +0000 (16:07 +1000)]
perf tools: Address python 3.6 DeprecationWarning for string scapes
Python 3.6 introduced a DeprecationWarning for invalid escape sequences.
This is upgraded to a SyntaxWarning in Python 3.12, and will eventually
be a syntax error.
Fix these now to get ahead of it before it's an error.
Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kieran Bingham <kbingham@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mykola Lysenko <mykolal@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Todd E Brandt <todd.e.brandt@linux.intel.com>
Cc: Tom Rix <trix@redhat.com>
Cc: linux-doc@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: llvm@lists.linux.dev
Link: https://lore.kernel.org/r/20230912060801.95533-6-bgray@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
[sw0312.kim: cherry-pick the mainline commit
280b4e4a9e80 to resolve python 3.12 syntax warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I06385423db9dc27f2bd93adb0ed9f1db2c032e4c
Marek Szyprowski [Wed, 12 Jun 2024 16:56:29 +0000 (18:56 +0200)]
RISCV: configs: tizen-lpi4a: Enable DM_BOW feature
It's needed for system upgrade.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3aa3394ea0c0b5ee4b1d421892ec7b4d06c21c5e
Mateusz Moscicki [Thu, 8 Jul 2021 13:36:25 +0000 (15:36 +0200)]
device-mapper: Add dm-bow
dm-bow is a device mapper driver that allows to create a checkpoint on
the volume so that it is possible to restore the state if necessary.
This is needed to protect the ext4 partition during a system upgrade in
case of a power failure.
Originally-by: Paul Lawrence <paullawrence@google.com>
Origin: https://android.googlesource.com/kernel/common/+/refs/heads/android-mainline/drivers/md/dm-bow.c
Signed-off-by: Mateusz Moscicki <m.moscicki2@samsung.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
[mszyprow: this is a squashed set of the following patches
from platform/kernel/linux-rpi 'tizen' (
c4f85fdcd893) branch:
device-mapper: Add dm-bow
dm-bow: Fix 5.15 compatibility issue
ported and adapted to Linux v6.6 kernel base]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Id44a1fece8b1be096689a86bd9ea8356c25db5e0
Jaehoon Chung [Wed, 5 Jun 2024 06:09:45 +0000 (15:09 +0900)]
drm: verisilicon: vs_gem: Fix wrong return type with gcc14
The retrun value of vmap callback is using to check if there is an
error. If error is not existed, the checking iosys_map is null or not
with iosys_map_is_null().
[ 273s] drivers/gpu/drm/verisilicon/vs_gem.c: In function 'vs_gem_prime_vmap':
[ 273s] drivers/gpu/drm/verisilicon/vs_gem.c:388:53: error: returning 'void *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
[ 273s] 387 | return vs_obj->dma_attrs & DMA_ATTR_NO_KERNEL_MAPPING ?
[ 273s] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 273s] 388 | page_address(vs_obj->cookie) :
[ 273s] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
[ 273s] 389 | vs_obj->cookie;
[ 273s] | ~~~~~~~~~~~~~~
[ 273s] AR drivers/misc/lis3lv02d/built-in.a
Change-Id: I22dea91de15eb1e75d0591d26fe50df1d003e658
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 5 Jun 2024 06:07:11 +0000 (15:07 +0900)]
drm: verisilicon: vs_drv: Fix type mismatch with gcc14
Fix type mismatch with gcc14.
NULL pointer should be 0 as int type.
[ 272s] drivers/gpu/drm/verisilicon/vs_drv.c: In function 'vs_debugfs_planes_show':
[ 272s] drivers/gpu/drm/verisilicon/vs_drv.c:81:42: error: pointer/integer type mismatch in conditional expression [-Wint-conversion]
[ 272s] 81 | state->fb->format->format : "(null)");
[ 272s] | ^
[ 272s] CC lib/timerqueue.o
Change-Id: I00868d7f6ca94a9c9939d7a68b7fbf6b29f98330
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Dmitry Antipov [Thu, 21 Dec 2023 08:47:45 +0000 (11:47 +0300)]
btrfs: fix kvcalloc() arguments order in btrfs_ioctl_send()
When compiling with gcc version 14.0.0
20231220 (experimental)
and W=1, I've noticed the following warning:
fs/btrfs/send.c: In function 'btrfs_ioctl_send':
fs/btrfs/send.c:8208:44: warning: 'kvcalloc' sizes specified with 'sizeof'
in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
8208 | sctx->clone_roots = kvcalloc(sizeof(*sctx->clone_roots),
| ^
Since 'n' and 'size' arguments of 'kvcalloc()' are multiplied to
calculate the final size, their actual order doesn't affect the result
and so this is not a bug. But it's still worth to fix it.
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
(cherry picked from commit
6ff09b6b8c2fb6b3edda4ffaa173153a40653067)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I5308f4b8759c03ad1190bba8c3d7a0c6e2f97bf4
Sun Haiyong [Sat, 6 Jan 2024 09:41:29 +0000 (17:41 +0800)]
perf tools: Fix calloc() arguments to address error introduced in gcc-14
the definition of calloc is as follows:
void *calloc(size_t nmemb, size_t size);
number of members is in the first parameter and the size is in the
second parameter.
Fix error messages on gcc 14
20240102:
error: 'calloc' sizes specified with 'sizeof' in the earlier argument and
not in the later argument [-Werror=calloc-transposed-args]
Committer notes:
I noticed this on fedora 40 and rawhide.
cherry-picked from commit
7bbe8f0071dfa23fcc3b2864ec9f3b1aeb7ab2df
Change-Id: Ia96dbd404a3f9339e7e402465eaaa1b98c9d507c
Signed-off-by: Sun Haiyong <sunhaiyong@loongson.cn>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240106094129.3337057-1-siyanteng@loongson.cn
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Sun Haiyong [Mon, 4 Dec 2023 08:20:55 +0000 (16:20 +0800)]
perf top: Remove needless malloc(0) call that triggers -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which errors out
like:
builtin-top.c: In function ‘prompt_integer’:
builtin-top.c:360:21: error: allocation of insufficient size ‘0’ for
type ‘char’ with size ‘1’ [-Werror=alloc-size]
360 | char *buf = malloc(0), *p;
| ^~~~~~
Just set it to NULL, getline() will do the allocation.
cherry-picked from commit
79baac8acfc60a7a5114f6d60731e28c242ef8ce
Change-Id: I3065836e0e7c352eb7dd7a82b73d4392b8142221
Signed-off-by: Sun Haiyong <sunhaiyong@loongson.cn>
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20231204082055.91877-1-siyanteng@loongson.cn
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Michal Wilczynski [Wed, 22 May 2024 16:32:57 +0000 (18:32 +0200)]
RISCV: configs: tizen-lpi4a: enable options required for display
Support for display subsystem depends on multiple config options. Enable
them.
Change-Id: I3b2102d9a48d17854bbe096c04895f94ea168d77
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 16:08:28 +0000 (18:08 +0200)]
riscv: dts: thead: Add device tree for hdmi port and dependent nodes
Hdmi port device tree node requires a lot of extra dependencies.
hdmi_tx node depends on disp1_out, which depends on enc1_in.
Additionally the main node for display subsystem, called
display-subsystem depends on dpu_disp0 and dpu_disp1.
There are additional dependencies on dsi0 nodes for lcd0_backlight,
pcal6408ahk_d, soc_vdd18_lcd0_en_reg, soc_vdd33_lcd0_en_reg, which
in turn brings a lot of pinctrl and i2c nodes.
Add all the required nodes for the drm subsystem to load correctly.
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: Ib2f8daca209caaac175e12d7ea45326b7e3465f0
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 16:00:12 +0000 (18:00 +0200)]
riscv: dts: thead: Move pinctrl nodes to th1520-lichee-module-4a.dtsi
padctrl0 and padctrl1 should be defined for a family of 4a boards, as
they will cross-reference with aoc nodes defined in the next commit.
Move them to th1520-lichee-module-4a.dtsi.
Change-Id: Ief61183bde82c41c2f771da88c2d27135e3a3844
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 12:46:42 +0000 (14:46 +0200)]
riscv: dts: thead: Move osc_32k and rc_24m clocks under clock parent
Both osc_32k and rc_24m clocks are under soc parent, while they should
be under 'clocks' parent, per vendor kernel. Move them to appropriate
place.
Change-Id: I3f65c2697da4f6f0403482f70042daf99680a48b
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 12:39:30 +0000 (14:39 +0200)]
pwm: Enable LicheePi 4A pwm driver
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I8835dfbabc99d9c9286322bd30dc0ecf7eceec26
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 12:37:11 +0000 (14:37 +0200)]
phy: Enable LicheePi 4A phy drivers
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I947031a16cc46e9db670da96dd9d925fb43bb078
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 12:30:12 +0000 (14:30 +0200)]
regulator: Enable LicheePi 4A regulator driver
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I86b522985cdd2e2e61f9b885154f86b1485c4226
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 12:34:05 +0000 (14:34 +0200)]
firmware: Enable LicheePi 4A firmware drivers
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I6339a711e54502ac8c094d451c104ba31aa586e6
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Mon, 27 May 2024 13:04:59 +0000 (15:04 +0200)]
drm: bridge: synopsys: dw-hdmi: Enable LicheePi 4A dw-hdmi modifications
Unfortunately, besides adding it's own hdmi driver LicheePi4 also
need some modifications to generic dw-hdmi driver. Enable them.
Change-Id: I5c49d46fed5a8c1b57863404438ef0f1ff25d883
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Wed, 22 May 2024 11:52:30 +0000 (13:52 +0200)]
drm: verisilicon: Enable LicheePi4 drm drivers
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I66e5fc772a89f9bcccac678a0cd2652d3dee1357
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 10 May 2024 11:31:49 +0000 (13:31 +0200)]
RISCV: configs: tizen-lpi4a: enable options required for ethernet
Support for ethernet driver depends on multiple different drivers, like
clock, efuse. Enable them all, so the ethernet driver can work.
Change-Id: I8bd92822ec3afa074084fef2e660ed2aa3135031
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Seung-Woo Kim [Mon, 13 May 2024 02:15:19 +0000 (11:15 +0900)]
RISCV: configs: tizen-lpi4a: sync with savedefconfig
Sync with minimized defconfig made with the command,
"make savedefconfig".
Change-Id: Icc670f8b36655b2876335c4fc451e032133450b8
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Michal Wilczynski [Fri, 10 May 2024 11:21:26 +0000 (13:21 +0200)]
riscv: dts: thead: Add device tree for ethernet and dependent nodes
Ethernet support device tree nodes depends on multiple device tree
nodes: pinctrl, clocks, nvmem controller for efuse. Add them, so the
ethernet node dependencies are satisfied.
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: Ic44fb31705ec20940df2f4b01c234f2dbfba88be
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 10 May 2024 11:16:07 +0000 (13:16 +0200)]
net: stmmac: Enable LicheePi 4A ethernet drivers
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I81aa81094fa68fe5a206035040aac2ff3ed2fdbb
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 10 May 2024 11:13:28 +0000 (13:13 +0200)]
nvmem: Enable LicheePi 4A efuse drivers
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I3eef31098c19c4c5349126d0747d0335388c9e9e
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 10 May 2024 11:03:13 +0000 (13:03 +0200)]
pinctrl: thead: Enable LicheePi 4A pinctrl drivers
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I115151f8ef109ae41a37512760ed96c1dcd182f1
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Michal Wilczynski [Fri, 10 May 2024 11:00:13 +0000 (13:00 +0200)]
clk: thead: Enable LicheePi 4A clock drivers
Ported from vendor kernel [1].
[1] https://gitee.com/thead-yocto/kernel.git
Change-Id: I2151bedd0e7d3c18d6ad940cdbcec400234b9015
Signed-off-by: Michal Wilczynski <m.wilczynski@samsung.com>
Marek Szyprowski [Wed, 10 Apr 2024 08:44:54 +0000 (10:44 +0200)]
RISCV: configs: tizen-lpi4a: disable unused modules and drivers
This enables modules to fit into the limited modules partition.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I760ae3dff82d6d90ea6ca6a4df0de7f675234773
Marek Szyprowski [Tue, 26 Mar 2024 23:09:51 +0000 (00:09 +0100)]
Revert "tizen: Add extlinux.conf file to boot Tizen"
This reverts commit
e72a2f6fb82be2ff7252a172e66c1a153d409b2f. With
adapted u-boot installed on SD-card a standard Tizen's boot.scr.uimg
based booting is possible.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I336508b4ee08846d8079f3925817974383f9d865
Marek Szyprowski [Tue, 26 Mar 2024 13:14:08 +0000 (14:14 +0100)]
RISCV: configs: tizen-lpi4a: enable options needed to boot Tizen OS
Enable all options needed for Tizen OS and disable useless virtio based
drivers.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I270b20277e3e1d751e77df0732b8461fae9848ed
Jaehoon Chung [Thu, 14 Mar 2024 10:47:07 +0000 (19:47 +0900)]
tizen: Add extlinux.conf file to boot Tizen
Add extlinux.conf file to boot Tien OS.
It will be used to choose which OS can be booting.
Change-Id: I273b3949f7a0f75830a2f2599251be85669839dd
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 13 Mar 2024 07:46:10 +0000 (16:46 +0900)]
packaging: linux-lpi4a: Add the initial spec file
ADd the initial spec file.
Change-Id: I0ae20783340b8182e7f1517c4bb3275bf609ed87
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 13 Mar 2024 10:25:11 +0000 (19:25 +0900)]
RISCV: configs: tizen-lpi4a: Enable CONFIG_ARCH_THEAD
Enable CONFIG_ARCH_THEAD to use Licheepi 4A board.
Change-Id: I9d3e948c1064d5c6f8fffbce935475dca6db2a0d
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Tue, 12 Mar 2024 10:57:28 +0000 (19:57 +0900)]
perf: riscv_pmu_sbi: Set SYSCTL_LEGACY by default
This patch is workaround for LicheePi 4A.
During running ubrowser, SIGILL is occurred.
To prevent the SIGILL, sysctl_perf_user_acces is set SYSCTL_LEGACY by
default.
Change-Id: I0b33397bf7cc58c7390eccb5f6a5c7936eaec32c
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Jaehoon Chung [Wed, 13 Mar 2024 09:59:09 +0000 (18:59 +0900)]
RISCV: configs: tizen-lpi4a: Disable CONFIG_IKHEADERS
Disable CONFIG_IKHEADERS.
During buiding on gbs, the build failure is occurred like the below.
[ 527s] AR drivers/built-in.a
[ 543s] tar: unrecognized option `--sort=name'
[ 543s] Try `tar --help' or `tar --usage' for more information.
[ 543s] make[3]: *** [kernel/Makefile:158: kernel/kheaders_data.tar.xz] Error 64
[ 543s] make[2]: *** [scripts/Makefile.build:480: kernel] Error 2
[ 543s] make[1]: *** [/home/abuild/rpmbuild/BUILD/linux-kernel-6.6.20/Makefile:1913: .] Error 2
[ 543s] make: *** [Makefile:234: __sub-make] Error 2
[ 543s] error: Bad exit status from /var/tmp/rpm-tmp.EP1fRT (%build)
Change-Id: I1080415d1468f20ce8a744267cffaf9618c873d5
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Drew Fustini [Fri, 10 Nov 2023 05:41:13 +0000 (21:41 -0800)]
mmc: sdhci-of-dwcmshc: Add support for T-Head TH1520
Add support for the mmc controller in the T-Head TH1520 with the new
compatible "thead,th1520-dwcmshc". Implement custom sdhci_ops for
set_uhs_signaling, reset, voltage_switch, and platform_execute_tuning.
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Link: https://lore.kernel.org/r/20231109-th1520-mmc-v5-3-018bd039cf17@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit
43658a542ebf13f1bb80cfaa8ae58f061d0d71b0)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I01a0df403985333f3b9f5f9dd971af807c285be9
Drew Fustini [Fri, 10 Nov 2023 05:41:12 +0000 (21:41 -0800)]
mmc: sdhci: add __sdhci_execute_tuning() to header
Expose __sdhci_execute_tuning() so that it can be called from the
mmc host controller drivers.
In the sdhci-of-dwcmshc driver, sdhci_dwcmshc_th1520_ops sets
platform_execute_tuning to th1520_execute_tuning(). That function has
to manipulate phy registers before tuning can be performed. To avoid
copying the code verbatim from __sdhci_execute_tuning() into
th1520_execute_tuning(), make it possible for __sdhci_execute_tuning()
to be called from sdhci-of-dwcmshc.
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Link: https://lore.kernel.org/r/20231109-th1520-mmc-v5-2-018bd039cf17@baylibre.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit
9cc811a342be78270d20d1fff3832bc0b23ef364)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I09c16cb610ab20299155797e87484e814b126dbf
Drew Fustini [Wed, 6 Dec 2023 08:09:24 +0000 (00:09 -0800)]
riscv: dts: thead: Enable LicheePi 4A eMMC and microSD
Add emmc node properties for the eMMC device and add sdio0 node
properties for the microSD slot. Set the frequency for the sdhci
reference clock.
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
(cherry picked from commit
b6b5028473ceb3054f8a440f85e3d728a3fba1dc)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: Ic17b1ed949808ed9736540a08b7e93b5cd8d3524
Drew Fustini [Wed, 6 Dec 2023 08:09:23 +0000 (00:09 -0800)]
riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD
Add emmc node properties for the eMMC device and add sdio0 node
properties for the microSD slot. Set the frequency for the sdhci
reference clock.
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
(cherry picked from commit
18d92a03b319b10269a8aca478b31496a9701326)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I04bff256a2b998d6cbba740abb28458812cd8e46
Drew Fustini [Wed, 6 Dec 2023 08:09:22 +0000 (00:09 -0800)]
riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock
Add node for the fixed reference clock used for emmc and sdio nodes.
Add emmc node for the 1st dwcmshc instance which is typically connected
to an eMMC device. Add sdio0 node for the 2nd dwcmshc instance which is
typically connected to microSD slot. Add sdio1 node for the 3rd dwcmshc
instance which is typically connected to an SDIO WiFi module. The node
names are based on Table 1-2 C910/C906 memory map in the TH1520 System
User Manual.
Link: https://git.beagleboard.org/beaglev-ahead/beaglev-ahead/-/tree/main/docs
Signed-off-by: Drew Fustini <dfustini@baylibre.com>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Reviewed-by: Guo Ren <guoren@kernel.org>
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
(cherry picked from commit
a77f02e8489673cc80948a6f30ed262db1dee8d6)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I9f95a1c539b96c23297eec6b9fdb0f0980820f74
Conor Dooley [Sun, 22 Oct 2023 15:41:35 +0000 (23:41 +0800)]
riscv: dts: thead: convert isa detection to new properties
Convert the th1520 devicetrees to use the new properties
"riscv,isa-base" & "riscv,isa-extensions".
For compatibility with other projects, "riscv,isa" remains.
Reviewed-by: Jisheng Zhang <jszhang@kernel.org>
Acked-by: Guo Ren <guoren@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20231022154135.3746-1-jszhang@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
(cherry picked from commit
0804f3bec9e9a3e9f3b5431ac9a11417041bc4c2)
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Change-Id: I98e3bc7c2f3629ea986b5b3c731289994642f2d4
Jaehoon Chung [Fri, 8 Mar 2024 02:19:32 +0000 (11:19 +0900)]
RISCV: config: Add tizen-lpi4a_defconfig file
Add tizen-lpi4a_defconfig file as initial version.
Change-Id: Ic6bf265262796da496fa935a5840d38650d41cf4
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Greg Kroah-Hartman [Sat, 2 Mar 2024 17:23:09 +0000 (18:23 +0100)]
Linux 6.6.20
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>