With CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC enabled, the arm64 kernel still
allocates the default SWIOTLB buffer (64MB) even if ZONE_DMA is disabled
or all the RAM fits into this zone. However, this potentially wastes a
non-negligible amount of memory on platforms with little RAM.
Reduce the SWIOTLB size to 1MB per 1GB of RAM if only needed for
kmalloc() buffer bouncing.
With CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC enabled, the arm64 kernel still
allocates the default SWIOTLB buffer (64MB) even if ZONE_DMA is disabled
or all the RAM fits into this zone. However, this potentially wastes a
non-negligible amount of memory on platforms with little RAM.
Reduce the SWIOTLB size to 1MB per 1GB of RAM if only needed for
kmalloc() buffer bouncing.
Signed-off-by: Patrick Yavitz <pyavitz@armbian.com>
BPI-CM4
No change in functionality. Fixup adjustments.
BPI-M2S
The fan on the unit is constantly running. So lets set thermal
trip points and add the ability to control when we want it to
kick on. By default it is set to power on at 60*C.
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
PWM controllable fan (G12A/B/SM1)
Commit provides two new overlays. One for the BananaPi CM4IO
Baseboard "GPIOH_5" and another for general use "GPIOX_5".
CM4IO HEADER PINS: 5V "4"; GND "6"; PWM "7"
On other units the location of the PWM HEADER PIN may vary,
so users will need to either review the wiki or schematic
of said unit.
Fan used in testing:
https://a.co/d/hasnLtj
Modifications: M2S/M5 RTL8822CS
Modded the overlays to be specific to the unit they were made
to be used on.
Tested-on: BananaPi BPI-CM4IO Baseboard with BPI-CM4 Module
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
Co-authored-by: Patrick Yavitz <pyavitz@xxxxx.com>
Set fan max speed to kick in at 65*C. This keeps the unit roughly
at 70*C or lower, when pusing all cores for an extended period of
time.
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
Co-authored-by: Patrick Yavitz <pyavitz@xxxxx.com>
https://www.waveshare.com/wiki/CM4-IO-BASE-B
Fan, RTC and USB support
RTC requires rtc pcf85063 driver
Fan requires hwmon emc2305 driver
Added wakeup-source to fanctrl node so emc2305 module loads at boot.
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
BPI-CM4 fan control
hwmon: emc2305: fixups for driver
The driver had a number of issues, checkpatch warnings/errors,
and other limitations, so fix these up to make it usable.
hwmon: emc2305: Change OF properties pwm-min & pwm-max to u8
hwmon: emc2305: Add calls to initialize cooling maps
233096b8a9/drivers/hwmon/emc2305.c
Tested-on: CM4-IO-BASE-B: https://www.waveshare.com/wiki/CM4-IO-BASE-B
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>
https://www.waveshare.com/wiki/CM4-IO-BASE-B
Fan, RTC and USB support
RTC requires rtc pcf85063 driver
Fan requires hwmon emc2305 driver
Signed-off-by: Patrick Yavitz <pyavitz@xxxxx.com>