Commit Graph

1219669 Commits

Author SHA1 Message Date
Mauro (mdrjr) Ribeiro
f3419660bb ODROID-N2: overlay: add shutdown via GPIO 2024-02-22 15:52:09 -03:00
steve.jeong
98edfc1e67 ODROID-COMMON: spi/spidev: Add compatible name
Signed-off-by: steve.jeong <jkhpro1003@gmail.com>
Change-Id: I984b823a2df2c853fa317fda3a040903ca70eb6f
2024-02-15 12:12:27 -03:00
Mauro (mdrjr) Ribeiro
ba00990306 ODROID-G12: config: update defconfig to improove docker support
Thanks to Podycust at our forums for reporting
2024-02-08 10:26:29 -03:00
charles.park
3ea56c07db ODROID-XU4: Update hack avoiding the invalid temperature by TMU broken
Change-Id: I6092834427950a50746535458e99bf7089212044
2024-02-06 17:49:59 -03:00
Mauro (mdrjr) Ribeiro
354551f602 ODROID-G12: config: update to enable missing features 2024-02-06 12:57:18 -03:00
Mauro (mdrjr) Ribeiro
3e51a2045c pwm: gpio: update to support kernel 6.6 2024-02-06 12:54:40 -03:00
Mauro (mdrjr) Ribeiro
c52c1fc576 Revert "ODROID-G12: config: update defconfig to enable PWM Fan"
This reverts commit 2f8204d1ea.
2024-02-05 16:27:19 -03:00
Mauro (mdrjr) Ribeiro
2f8204d1ea ODROID-G12: config: update defconfig to enable PWM Fan 2024-02-05 12:58:15 -03:00
Kevin Kim
37f6eeee0d ODROID-COMMON: pwm: gpio: Add a generic gpio based PWM driver
From: Olliver Schinagl <oliver@schinagl.nl>

This patch adds a bit-banging gpio PWM driver. It makes use of hrtimers,
to allow nano-second resolution, though it obviously strongly depends on
the switching speed of the gpio pins, hrtimer and system load.

Each pwm node can have 1 or more "pwm-gpio" entries, which will be
treated as pwm's as part of a pwm chip.

Change-Id: Idd42bf6d79f8ce52275a15965b02af470f28da7c
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2024-02-05 12:57:17 -03:00
ckkim
aa4283677f arm64: dts: amlogic: odroid-go ultra: Improve sound output quality 2024-02-01 11:13:15 -03:00
Mauro (mdrjr) Ribeiro
5729cb0916 ODROID: Go-Ultra: add Battery and Charger nodes 2024-01-31 12:00:12 -03:00
Mauro (mdrjr) Ribeiro
415ade42ec power: supply: rk818-battery/charger: clear unused variables 2024-01-31 11:59:50 -03:00
Ondrej Jirman
68c40112a5 power: supply: rk817-charger: Propagate proper errors
Without propagating the correct error code, defered probe doesn't work.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:12:02 -03:00
Ondrej Jirman
f3374f20c1 power: supply: rk817-charger: Take input current limit from parent supply
This allows automatic input current limit setting based on USB PD.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:11:55 -03:00
Ondrej Jirman
f0cdf126ed power: supply: rk817-charger: Add input current limit setting
This is useful for proper USB input current limiting.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:11:46 -03:00
Alexander Warnecke
9072f9d428 supply: rk817: Fix battery capacity sanity check calculation
If the nvram variable is corrupted in a way that multiplying it by 1000 causes an integer overflow and wraps around to a number within or below the sanity check bounds, the check fails and capacity is reported incorrectly.
Change the sanity check calculation to not multiply the variable read from the rk817 nvram, preventing the overflow and resulting in all corrupt capacity values being detected.

Signed-off-by: Alexander Warnecke <awarnecke002@hotmail.com>
2024-01-31 11:11:39 -03:00
Ondrej Jirman
8a380517b4 power: supply: rk818-battery: Don't reset dsoc to 0 on rk818_vb_low_irq
The interrupt fires at 3.4V vbat which is not equivalent to 0% charge.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:11:31 -03:00
Ondrej Jirman
180ab56f3b power: supply: rk818-charger: Add support for POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN
Report total battery capacity.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:11:22 -03:00
Ondrej Jirman
dc398298a5 power: supply: rk818-battery: Don't auto-poweroff the PMIC on low battery
Just raise the interrupt. This avoids undervoltage shutdowns when
unplugging the USB PSU from USB keyboard. IP5209 stop supplying power
to VOUT during transition from pass-through mode until VOUT boost
is enabled. (about 30ms on the oscilloscope)

Somehow RK818 doesn't like this when EN_VABT_LOW_SHUT_DOWN is enabled
and PMIC shuts down. Emergency shutdown is implemented in keyboard
power manager driver.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:11:12 -03:00
Ondrej Jirman
ad624b548a power: supply: rk818-charger: Delay applying input current limit until first BC detection finishes
When the phone boots for the first time, we only want to react to
changes in charger power supply max current after the USB power supply
type detection finishes. This allows us to keep the limit set by
the bootloader, until we know better.

This is part of the workaround for Pinephone Pro boot loops on low battery.
The other part is bootloader raising the input current limit to 2A.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:10:52 -03:00
Ondrej Jirman
2fe4f7f800 power: supply: rk818-battery: Speed up battery current readout
PMIC does averaging, driver does averaging on top of that averaging,
and it's just too much averaging, and the speed suffers.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:10:46 -03:00
Ondrej Jirman
ae2c178b23 power: supply: rk818-charger: Unify rk818-charger and rk818-battery
The BSP driver is still used, but there is now a one device handling
the battery/charger properties, which should confuse the userspace
less. This also makes writing a power manager for the keyboard easier.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:10:40 -03:00
Ondrej Jirman
e26249894f power: supply: rk818-battery: Drop dependency on framebuffer
It was bizarre anyway. Framebuffer is barely used on Linux anyway,
so this is not a great way to check for system inactivity.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:10:33 -03:00
Ondřej Jirman
ecc87d71c7 power: supply: rk818-battery: Report charging status based on charging current
If the current is positive, battery is charging, if negative the battery
is discharging. Duh?!

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:10:24 -03:00
Ondřej Jirman
d85c17e1bc power: supply: rk818-charger: Change charger type to MAINS
To un-confuse userspace.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:10:14 -03:00
Ondřej Jirman
e4aa599ca9 power: supply: rk818-charger: Implement charger driver for RK818 PMIC
For now this driver is just meant to watch Type-C power supply
and apply current limits to RK818, to not overload the Type-C
partner.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:09:59 -03:00
Ondřej Jirman
1c68b4ebdb power: supply: rk818-battery: Use a more propper compatible string
Prefix with vendor name.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
2024-01-31 11:09:44 -03:00
Ondrej Jirman
87cff369a7 power: supply: rk818-battery: Add battery driver for RK818
This is forward ported driver from Rockchip BSP.

Signed-of-by: Kamil Trzciński <ayufan@ayufan.eu>
2024-01-31 11:09:27 -03:00
Mauro (mdrjr) Ribeiro
23a9f75564 ODROID: mali: t62x: adapt kernel driver to 6.6 2024-01-30 19:08:41 -03:00
Mauro (mdrjr) Ribeiro
a992441152 ODROID-XU4: config: add initial defconfig 2024-01-30 16:20:02 -03:00
Mauro (mdrjr) Ribeiro
fc30aa2e46 arm: dts: odroidxu3: modify fan levels to match downstream kernel 2024-01-30 16:06:37 -03:00
Mauro (mdrjr) Ribeiro
32ccbec682 ODROID-XU4: overlays: rename overlays 2024-01-30 16:05:15 -03:00
Mauro (mdrjr) Ribeiro
bdc4c603d5 ODROID-XU4: add overlay support 2024-01-30 16:03:53 -03:00
Mauro (mdrjr) Ribeiro
6fcc81606a drivers/hwmon: pwm-fan: support automatic and changing cooling levels via sysfs 2024-01-30 15:59:47 -03:00
Hyeonki Hong
6057caacef ODROID-XU4: backport D-WAV Multitouch driver 2024-01-30 15:49:33 -03:00
Yang Deokgyu
4f04a59a64 ODROID-XU4: drivers/fbtft: Add fb_hktft32 module for Hardkernel 3.2 inch TFT LCD
No longer use flexfb, fbtft_device that is deprecated since kernel 5.4.

Signed-off-by: Yang Deokgyu <secugyu@gmail.com>
Change-Id: Iebd014360f90eab5210722102d54c6169be5e28e
2024-01-30 13:50:17 -03:00
Yang Deokgyu
f0299b4320 ODROID-XU4: drivers/fbtft: Add fb_hktft35 module for Hardkernel 3.5 inch TFT LCD
No longer use flexfb, fbtft_device that is deprecated since kernel 5.4.

Signed-off-by: Yang Deokgyu <secugyu@gmail.com>
Change-Id: Iae252c64b91b2eabe97eb3aace12d7c4b98801c5
2024-01-30 13:50:11 -03:00
MastaG
18882db4a0 MEMEKA: fix ODROID-XU3 headphone-jack volume 2024-01-30 13:50:04 -03:00
Marian Mihailescu
b786242eb0 MEMEKA: media: s5p-mfc: stop streaming before releasing queues
If streaming is active when the MFC device is closed, it will generate an IOMMU page-fault.

Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
2024-01-30 13:49:57 -03:00
Marian Mihailescu
d4b16fca46 MEMEKA: media: s5p-mfc: copy timestamp and timecode in encoder output
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
2024-01-30 13:49:49 -03:00
Marian Mihailescu
21375aa2d9 MEMEKA: media: exynos-gsc: fix v4l2 SELECTION api
Signed-off-by: Marian Mihailescu <mihailescu2m@gmail.com>
2024-01-30 13:49:41 -03:00
Mauro (mdrjr) Ribeiro
fb1b8454c1 Revert "WIP: ARM/dma-mapping: implement ->alloc_noncontiguous"
This reverts commit 768d668ed0.
2024-01-30 13:49:32 -03:00
memeka
2e2e1f6f21 MEMEKA: ARM: dma-mapping: increase DMA coherent pool size to 2M 2024-01-30 13:49:24 -03:00
Pavel Golikov
9cd5a4c47d WIP: ARM/dma-mapping: implement ->alloc_noncontiguous
Implement support for allocating a non-contiguous DMA region. The
implementation is based on the ma-iommu driver.

Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
2024-01-30 13:49:17 -03:00
Christian Hewitt
76977620c7 WIP: media: s5p-mfc: use EAGAIN not EIO for MFCINST_ERROR
Patch from https://forum.odroid.com/viewtopic.php?p=319025&sid=1fbdb9d8f7ea0ebee30dc8824f76d308#p319025

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
2024-01-30 13:49:05 -03:00
Pavel Golikov
bfd383cd5f WIP: media: s5p-mfc: Allow cache hints for queues
Passing V4L2_MEMORY_FLAG_NON_COHERENT from userspace significantly
improves video rendering performance on Exynos 5422 (Odroid XU4).

Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
2024-01-30 13:48:57 -03:00
Christian Hewitt
6ee7f6c619 WIP: arm: dts: exynos5422: HC1/XU3/XU4 model name is ODROID not Odroid
Cosmetic change to model and audio card name for HC1/XU3/XU4 to
put ODROID in capitals (as per Hardkernel branding).

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
2024-01-30 13:48:46 -03:00
Pavel Golikov
0cd454a543 WIP: soc: samsung: pm_domains: Bring back old driver implementation
Using new implementation decreases Mali GPU performance significantly
(with both KBase and Panfrost drivers).

Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
2024-01-30 13:48:25 -03:00
Pavel Golikov
6ba8d4547e WIP: iommu/io-pgtable-arm: Fix coherency support for Mali LPAE
Mali T628r0p1 which may be found in Samsung Exynos 5422 SOC is
definitely not dma coherent, and it is not happy with PTE_SH_OS bit set
by default in commit 728da60da7 ("iommu/io-pgtable-arm: Support
coherency for Mali LPAE"). Use PTE_SH_IS by default for non dma
coherent Mali GPUs.

Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
2024-01-30 13:47:46 -03:00
Pavel Golikov
29c910ca35 WIP: media: videobuf2: always enable V4L2_MEMORY_FLAG_NON_COHERENT
Always enable V4L2_MEMORY_FLAG_NON_COHERENT for all V4L queues.

Signed-off-by: Pavel Golikov <Paullo612@ya.ru>
2024-01-30 13:47:36 -03:00