Skip to content
Release: orange-pi-5.18-20220615-1100

NEWS
====

See also:

- https://xnux.eu/log/
- https://xnux.eu/devices/pine64-pinephone.html
- https://xff.cz/kernels/

KNOWN ISSUES:
- You may experience p-boot display pipeline handover failures with the
  new HDMI HPD fix since (2021-10-26) if you have drivers compiled in such
  a way that parts of the sunxi DRM stack have to re-probe on boot.
  One way to workaround this is to compile everything needed for anx7688
  and display pipeline as built-in drivers.
- Pinephone/Pinebook Pro Alt-DP and USB-SS works only in one orientation.
- There are still bugs in fusb302 that need to be fixed, sometimes it stops
  detecting all activity on TypeC port, requireing reboot to fix.
- For whatever reason ppkb-i2c-inputd doesn't register POGO INT pin interrupts
  when pinephone-keyboard.disable_input is used.

2022-06-15:
- pull in v5.18.4
2022-06-09:
- pull in v5.18.3
- add IMX258 userspace register access helpers
2022-05-26:
- fix smaller sized IMX258 output formats and PLL/MIPI settings
2022-05-25:
- fix kconfig and build issue for Pinephone user facing camera
- update defconfigs for all devices
- improve imx258 camera support:
  - hook up flash and focus lens support
  - add mode that maxes out what isp1 supports
  - improve image quality using register values suggested by Sony
  - cleanup the driver and add support for 24MHz clock
  - don't flip the image
2022-05-22:
- rebase on v5.18
- added support for front and back camera for Pinephone Pro
- resolved clock frequency incompatibility between the sensor drivers
2022-05-21:
- rebase on v5.18-rc8
- stupid ass schematic for pinephone pro is completely confusing, which is one
  reason why world facing camera didn't work up to now. See for yourself:
  This https://megous.com/dl/tmp/39cbd011289c6818.png apparently means that
  IMX258 is connected to MIPI1_TX1/RX1 lol https://megous.com/dl/tmp/5f25b00ef0166252.png
  MIPI_RX0 is isp0 MIPI1_RX1 is isp1. Just by reading the camera sheet in the
  schematic, I happily assumed that naming signals MIPI_RX0, they actually really
  are MIPI_RX0, but alas. Anyway, I moved IMX258 sensor node in device tree
  to isp1, so that increases chances that users who have working connection
  to the sensor over I2C will have a working camera now. :) Please test and
  report back.
- some cleanup and patch re-ordering in ppp branches
- drop A64 idle states from DT (these should be auto-added by TF-A when supported;
  you need to build TF-A properly, though! check p-boot/fw for example)
- intergate latest patches from wireless-next for rtw88/89
2022-05-10:
- rebase on v5.18-rc6
- fix musb suspend issues: https://gitlab.com/postmarketOS/pmaports/-/issues/1478
- fix null pointer dereference in TCPM debug code
2022-04-10:
- rebase on v5.18-rc2
2022-04-09:
- rebase on linus/master
- replaced pinephone keyboard/charger drivers with their latest versions
- unified rk818-charger/battery power supplies into one
- small changes in preparation for pinephone keyboard power manager
- added many rtw88/89 changes from wireless-next
2022-03-23:
- Really fix Pinephone Pro support for docks with Alt-DP :)
  - Enable some more debugging output
2022-03-22:
- Fix Pinephone Pro support for docks with Alt-DP on Type-C receptacles (as
  opposed to captive cables) See: https://xnux.eu/log/#063
2022-03-20:
- rebase on 5.17
2022-03-16:
- rebase on 5.17-rc8+
2022-03-11:
- make touchscreen work again on pocketbook touch lux
- rebase on 5.17-rc7+
2022-03-07:
- rebase on 5.17-rc7
2022-02-22:
- add missing keyboard capacity reporting commits
2022-02-17:
- fix flash led support on PPP, enable the driver in defconfig
2022-02-16:
- add support for capacity reporting of pinephone keyboard battery
- integrate some patches from Mobian (Pinephone Pro):
  - sound card improvements (rename, HP plugin detection)
  - Flash LED support
- Add patches from Martijn Braam, that add support for SPI NOR
  flash, and forward port them to 5.17
- Integrated multi-consumer patches for Type-C mux/switch (v2)
- rebase on 5.17-rc4+
2022-02-10:
- implemented runtime power management for af8133j driver
2022-02-09:
- import af8133j patches from Icenowy
- add support for the new magnetometer in PP 1.2 beta and in Pinephone Pro
- fix for STK3311 interrupts (needs bootloader patch to turn GPIO4_D3 into input,
  because it's left as output by BROM)
- integrated Benjamin Schaaf's camera patches
2022-02-04:
- synced up with recent fixes for orange-pi-5.16
- rebase on 5.17-rc2+
2022-01-23:
- rebase on 5.17-rc1 and forward port everything
- so far this is tested on pinephone and pinephone pro
2022-01-22:
- added kernel drivers for kb151 and IP5209
  - if you want to run ppkb-i2c-inputd, just add kb151.disable_input to kernel
    boot arguments
  - ip5209 status is now visible in sysfs
  - default keymap removed from DT
- improve reporting of ppp battery charging status in the BSP battery driver
2022-01-20:
- pull in v5.16.2
- rtw88/89: backport changes from 5.17, add patches from linux-wireless mailing
  list that implement AP support in rtw89
2022-01-16:
- add support for POGO header on Pinephone Pro
- add "mmc: core: Wait for command setting 'Power Off Notification' bit to complete"
  patch that should fix SD card suspend failures on Pinephone
- pull in v5.16.1
2022-01-10:
- rebase on v5.16
2022-01-09:
- more properly disable ucam on ppp (unbreaks display initialization)
- use v4 of "mfd: rk808: add reboot support to rk808.c"
2022-01-04:
- rebase on v5.16-rc8
- fix quartz64-a ethernet (phy delays issue)
- disabled ucam on pinephone pro (it's not ov5640 as previously thought)
- fixed swapped reset gpios on pinephone pro cameras in DT
- fixed blued LED gpio reference
2021-11-30:
- rebase on v5.16-rc3
2021-11-24:
- basic audio support for Pinephone Pro (everything should work, except bluetooth)
2021-11-23:
- rebase on v5.16-rc2
- a bit more Pinephone Pro Type-C support tunning
- added support for powering up the modem via modem-power driver
2021-11-16:
- rebase on v5.16-rc1
- implemented support for all Type-C features of Pinephone Pro and Pinebook Pro
  (there are still some known issues https://xnux.eu/log/#054, and pinebook pro
  has a HW design issue, so be careful)
- fix some fusb302 bugs
- rk3399/pbp/ppp: improve display clock rate precision
- fix DRM panics and refcount issues with drm scheduler on panfrost/lima
- add chasis device tree properties to pinephone dts
2021-10-31:
- rebase on top of v5.15
- add tsadc reset patch for Quartz64 (fixes thermal zone temperature reporting)
2021-10-28:
- drop firmware suffix from bluetooth firmware on pinephone
- drop bluetooth h5 reset support patch
- disable debug logging in gc2145 driver
- revert hci_h5 runtime PM support that was added to 5.15-rc1 (it is broken,
  and causes constant re-probing of bluetooth device, see:
  https://lore.kernel.org/lkml/20211027222326.e55g26ezaxpk7kkm@core/T/#u)
2021-10-26:
- workadound broken HDMI HPD on Pinephone
  - this should make Alt-DP mode work on pinephones where it failed previously
    (reaching only DP state 0x03)
  - HPD is now signalled to HDMI PHY via a software route instead of in hardware
    (hardware is confirmed broken by the product design team, exactly as I discovered
    previously: https://xnux.eu/log/#045)
2021-10-25:
- pinephone pro:
  - improve battery current reporting from rk818 driver (DT had incorrect values)
2021-10-22:
- pinephone pro:
  - add DT definitions for both cameras
  - add support for reset/powerdown/supplies to IMX258 driver
  - SD card power supply fix
  - fix hang during boot on rk3399 (caused by debug nodes)
- fix display initialization/wrong clock setting on Pinebook Pro/Pinephone Pro
  - https://x-lore.kernel.org/linux-clk/20211016105022.303413-1-martin.blumenstingl@googlemail.com/
2021-10-20:
- fixed probe error handling in anx7688 (fix suggested by rsglobal)
- added axn7688 dependency on its I2C bus supply (avoids probe failure when
  anx7688 is probed before other devices using the bus and suspend/resume
  device ordering issues)
- updated to the latest rockchip/for-next branch
2021-10-18:
- fix various Pinephone Pro issues that prevented suspending to ram and broke
  PMIC and cause PMIC, touchscreen and fusb interrupt storms
- power down touchscreen in suspend to ram (Pinephone Pro, saves 200mW in suspend
  when touching the screen)
- add runtime suspend for eMMC (saves 200mW at runtime)
- fix rockchip DSI controller driver to not break the display on suspend/resume
- improve panel driver for pinephone pro
2021-10-17:
- rebase on v5.15-rc6
- add support for Pinephone Pro
2021-10-11:
- rebase on v5.15-rc5
2021-09-21:
- add various dts variants for quartz64-a
2021-09-20:
- use rockchip/for-next which was rebased on top of 5.15-rc1 recently
2021-09-16:
- basic quartz64 support (5.15-rc1 upstream + rockchip/for-next branch + some fixes
  from me for me for poweroff + some patches from pgwipeout split to q64-5.15 and
  q64dts-5.15 branches)
- rebase on v5.15-rc1+
2021-09-13:
- rebase on v5.15-rc1
- port 8723cs driver to 5.15
- fix some compile warnings
2021-08-30:
- rebase on v5.14
2021-08-19:
- rebase on v5.14-rc6+
2021-08-09:
- rebase on v5.14-rc5
2021-07-31:
- rebase on v5.14-rc4
2021-07-28:
- rebase on v5.14-rc3+
2021-07-20:
- update defconfigs
2021-07-19:
- rebase on v5.14-rc2
2021-07-12:
- rebase on v5.14-rc1
- port cam drivers to 5.14
2021-07-01:
- rebase on v5.14-pre-rc1
2021-06-29:
- rebase on v5.13
2021-06-20:
- rebase on linus/master (5.13-rc6+)
2021-06-16:
- rebase on linus/master (5.13-rc6+)
2021-06-05:
- rebase on linus/master (5.13-rc5)
- add support for runtime calibration of minimum duty cycle of PWM backlight
  (until now it was hardcoded in device tree)
  - minimum brightness calibration instructions (default for lth_brightness is 10%,
    meaning is 'PWM duty cycle at the lowest brightness setting'):

  echo 1 > /sys/class/backlight/backlight/brightness
  echo 1 > /sys/class/backlight/backlight/device/lth_brightness
  echo 2 > /sys/class/backlight/backlight/device/lth_brightness
  echo 3 > /sys/class/backlight/backlight/device/lth_brightness

  ... increase values until you like the minimum brightness

  ... then make sure to restore this value after each boot by writing it to
  /sys/class/backlight/backlight/device/lth_brightness

2021-06-05:
- rebase on linus/master (5.13-rc4+)
2021-05-31:
- rebase on linus/master (5.13-rc4)
- fix bluetooth initialization failure on TBS A711 and elsewhere by using
  CONFIG_SERIAL_8250_16550A_VARIANTS
  See: https://lkml.org/lkml/2021/5/30/107
2021-05-22:
- rebase on linus/master (5.13-rc2+)
- fix headset button handling and jack/mic plug in/plug out detection
  - should be much more reliable now
2021-05-21:
- rebase on linus/master (5.13-rc2+)
2021-05-20:
- rebase on linus/master (5.13-rc2+)
- fixed up booting with fw_devlink=on (see fixes-5.13)
- applied Samuel's time travel avoidance fix https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210515021439.55316-1-samuel@sholland.org/
  - this should fix occasional stalls and system hangs
- revert fine tuned OCV based capacity reporting, PMIC is not reporting OCV correctly
  so kernel has garbage input for the OCV -> capacity conversion and thus produces
  garbage output too (this stops large jumps in capacity when plugging in a charger
  and in general makes capacity reporting saner)
- fixed "NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!!"
- wifi driver no longer prevents dynticks from working
- improved (well..., added) suspend/resume code to anx7688 driver :)
  - fixes some issues caused by this driver ignoring the suspend/resume cycle
2021-05-09:
- rebase on linus/master (pre 5.13-rc1)
- replace old HDMI audio patches with the new HDMI sound card support from Jernej
- cleanup compilation warnings
2021-05-07:
- rebase on linus/master (pre 5.13-rc1)
2021-05-01:
- fixed suspend failure of light/proximity sensor
- raise the default minimum frequency for mbus devfreq governor
  (you can still lower it in sysfs for higher runtime power savings at the cost
  of some performance, see /sys/class/devfreq and tune it there for your distro)
2021-04-26:
- rebase on 5.12 final
- fixed behavior with dumb charger (DCP) being forced to 500mA on boot from anx7688
  driver
- disable lradc wakeup by default (lowers the power consumption in suspend)
2021-04-25:
- rebase on linus/master
- I've created a patch that disables touchscreen controller during system sleep
  reducing power consumption by about 40mW in sleep (and by 130mW when touching
  the screen in sleep)
  - before: https://megous.com/dl/tmp/0533207eed42258c.png
  - after: https://megous.com/dl/tmp/5d504d680415e2e3.png
  - those power spikes are touch controller checking if there's a finger touching
    the screen, and those dense spikes are when the finger is actually touching
    the screen
- Added Samuel's DRAM downclocking patches
2021-04-19:
- rebase on 5.12-rc8
2021-04-12:
- rebase on 5.12-rc7
2021-04-09:
- rebase on linus/master
2021-04-05:
- rebase on 5.12-rc6
2021-04-01:
- added patches from Samuel that implement cpuidle power savings on PinePhone
  (You also need to run the latest master of TF-A and crust firmware.)
- rebased on top of linus/master
2021-03-22:
- rebase on 5.12-rc4
2021-03-15:
- rebase on 5.12-rc3
- enable interrupt on battery capacity low (wakeup the phone and notify power
  supply change, for userspace to gracefully handle this condition)
2021-03-11:
- linus/master update
2021-03-09:
- linus/master update
2021-03-04:
- linus/master update (fixes FS corruption when using swapfiles)
2021-03-01:
- rebase on 5.12-rc1
2021-02-23:
- rebased on top of linus/master (5.12 cycle)
- cleaned up compile errors
2021-02-20:
- fix an7688 compilation on 32-bit ARM
2021-02-19:
- added support for wake over wireless LAN (WoWLAN) - howto is in the
2021-02-18:
- added USB_QUIRK_RESET for EG25G modem (https://gitlab.com/mobian1/devices/eg25-manager/-/merge_requests/5)
2021-02-15:
- rebased on v5.11 final
- fixed anx7688 fw flashing timeout
- added Samuel's patches:
  - allow to use RTC wakeup when powered off
  - NVMEM driver for RTC data registers
- pulled in some fixes from linux-next into fixes-5.11
- disable MMC runtime PM again (causes issues on H5/H6 https://megous.com/dl/tmp/1eec9b1c7f03ad93.png)
- used nvmem reboot driver (suggested by Samuel in RFC patch) for rebooting to FEL,
  eMMC bootloader, various p-boot boot configs on either eMMC or SD card's bootfs filesystems,
  boot menu, etc. via reboot() syscall with extra arg (see LINUX_REBOOT_CMD_RESTART2)
  (p-boot is also updated to support this mechanism, as of 2021-02-15)
2021-02-08:
- rebased on 5.11-rc7
2021-02-04:
- rebased on linus/master
2021-01-30:
- rebased on linus/master
2021-01-27:
- tested on all my boards
- make HDMI audio sound card initializa again on H3/H5
- fix rebase regression in stmmac driver that broke ethernet on PC 2
2021-01-25:
- rebased on top of v5.11-rc5
- fix 8723cs bluetooth DT to load pinephone BT config file correctly (add -pinephone postfix)
- fix a bunch of ASoC debugfs/bt-soc errors
- remove some noisy logging
- move mmc# aliases to SoC DT files to cover more boards
- added gc2145 BGGR bayer mode patch (makes this kernel work with megapixels)
- update Samuel's patches for irq-wakeup to v5
2021-01-12:
- rebased on top of v5.11-rc3+
- update Samuel's patches (stmmac, i2c-pm, irq-wakeup)
2021-01-02:
- rebased on top of v5.11-rc1+
2020-12-14:
- rebased on top of v5.10
- added patch to chnage Vbus hold voltage to 4.5V on Pinephone (this makes PD charging more stable)
2020-12-11:
- rebased on top of linus/master
2020-12-07:
- rebased on top of 5.10-rc7
2020-12-05:
- modem power driver: add more powerup modes and change interface for dumb and fastboot powerup
  - you can now write 2, 3 or 4 to .../powered sysfs file to select differnt powerup mode from
    the normal one (1)
  - this is useful for selecting alternate userspace configurations early in boot to allow
    tracing the userspace processes from early on for reverse engineering, and in the near
    future, it will be used to switch between original and fully-FOSS userspace code
    running on the modem's APPS CPU on powerup
    - see https://xnux.eu/log/#028
2020-12-02:
- fix WiFi blocking suspend
- improve modem power driver interaction with kernel's autosleep
- shorten resume times from 1.2s to 400ms (wifi driver optimization)
2020-11-30:
- I improved the anx7688 driver to actually respect PD capabilities of the source,
  and don't overload it. This should make it more likely to work with the USB-C
  docks when docks are powered.
- Pine64 dock can provide either 500mA when powered from regular USB-A charger
  (regardless of what kind of charger it is, it can't use more current from it)
- With my 3A PD charger, Pine64 dock will advertise 2600mA and Pinephone will
  now respect this limit.
- rebase on linus/master (5.10-rc6 atm)
- increase I2C clock for sensors and touchscreen/anx7688 from 100kHz to 400kHz
- added patch from https://patchwork.kernel.org/project/dri-devel/cover/20200222024210.18697-1-yuq825@gmail.com/#23237865
  for easier GPU debugging (suggested by bshah)
2020-11-28:
- rebased on linus/master
- replaced my 60FPS fix with a more mainlineable and better working solution from Roman Beranek
- disable 8723cs CONCURRENT_MODE, enable wifi 802.11z TDLS
2020-11-25:
- enable wifi power saving mode (saves 350mW in idle, and doesn't seem to break the wifi so far)
2020-11-25:
- added a new 2020-10 wifi driver and cleaned up to work with PinePhone
- see wifi-5.10 branch
- rebased on linus/master
2020-11-23:
- rebased, added modem power blocking mode (p-boot privacy support)
2020-11-17:
- drop ov5640 AF patch
2020-11-17:
- rebase on linux/master
- fix camera probe
2020-11-15:
- rebase on linux/master
- add "retain LED state in sleep" patch
2020-11-13:
- fix boot failure on pocketbook (see https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg46288.html)
2020-11-13:
- rebase on top of 5.10-rc3+
- update defconfigs
2020-11-10:
- rebase on top of 5.10-rc3
2020-11-01:
- added some musb suspend/resume fixes
- fixed regulator probe on a711
- fix mmc device numbering
- rebase on top of 5.10-rc2
2020-10-31:
- rebased on top of 5.10-rc1+
- added ov5640 autofocus support from Martijn Braam (you'll need /lib/firmware/ov5640_af.bin)
- added fix for DSI panel 36.6 FPS issue (myself)
- import upstreamed variant of audio patches from Samuel
2020-10-25:
- rebased on top of 5.10-rc1
2020-10-19:
- fix orange pi 3 ethernet
2020-10-12:
- fix issue with dsi clock described here: https://xnux.eu/log/#021
- rebase on v5.9 final
- integrate pinetab panel patches from (untested)
  https://gitlab.com/pine64-org/linux/-/commits/pine64-kernel-5.7.y-pinetabpanel/
2020-09-29:
- add a few more codec API fixes from Samuel
2020-09-28:
- rebase on top of 5.9-rc7
- integrated the newest audio patches from Samuel
2020-09-23:
- port battery thermal regulation fix from p-boot (completely untested, see https://xnux.eu/log/#018)
2020-09-18:
- cedrus panic fix
- rebase on linus/master
2020-09-17:
- further modem driver improvements (fix urc setting on old modem firmwares)
2020-09-13:
- rebase on top of 5.9-rc5
2020-09-12:
- rebase on top of 5.9-rc4+
2020-09-10:
- rebase on top of 5.9-rc4+
- further fixes for the modem driver poweron, support for fast poweroff feature
  present on new modem firmware
- added flash DT changes
- add mounting matrix and a kernel command line option to override it (ignore_mount_matrix)
- https://xff.cz/kernels also contains special kernel builds for my multi-dist image
  (see https://xnux.eu/log/)
- enabled opportunistic sleep
- enabled btrfs support
2020-09-01:
- rebase on top of 5.9-rc3
2020-08-19:
- rebase and port to 5.9-rc1
- fix various issues with 5.9-rc1
- fix sleeps in atomic context in anx7688 driver
- dropped panfrost dvfs patches for now (conflicts, stability issues)
- fix modem UART issues on powerup (sometimes not receiving RDY, etc.)
  - root cause was host UART locking up due to noise on RX, and the
    fix is to only open UART port when the modem is powered
2020-08-11:
- fix sun50i-codec-analog probe failure when built-in
2020-08-09:
- pull in codec changes from Samuel
- don't wait for RDY but poll with empty AT command for the modem's status
2020-08-06:
- added Samuel's patch for making recording from the codec work again
2020-08-05:
- modem driver fixes for BH
2020-08-03:
- fixed AC100 driver to make it work without mod clock
2020-08-02:
- integrated latest Samuel's audio patches + rebased my AC100 support on top
- finished the modem-power driver into a hopefully useable state
2020-07-25:
- rebased on top of 5.8-rc7+
- fixed modem driver issue with not shutting down the modem on poweroff/reset
  on PinePhone (introduced during modem driver rewrite around 5.8-rc5)
- worked around AXP reseting input current limit to 500mA regardless of
  BC detection being disabled (happened on boot with USB-C cable connected
  to USB-C PD charger) (and reverted again)
- improved modem driver
  - initialize the modem configuration for proper sleep
  - setup QDAI automatically from DTS
  - show modem firmware version in dmesg
  - added rfkill interface
  - handle URC caching during suspend
2020-07-16:
- added HP jack detection patches from A-wai
2020-07-14:
- added support for Pinebook Pro
- fix issue in my bl_pwm PinePhone patch that broke Pinebook Pro's backlight
2020-07-13:
- rebased on top of 5.8-rc5
- improved HW led trigger API
- more modem-power work (change to serdev, recv messages from the modem)
- support HDMI audio on PinePhone
- bump PD power requirement to 15W on PinePhone
2020-07-08:
- refactoring of the modem driver, moved to modem-5.8 branch (not finished
  yet, see TODO in the driver)
- update pinephone 1.0-1.2 dts to reflect the differences in modem setup
- enable orange pi 3 hdmi audio
2020-07-06:
- rebased on top of 5.8-rc4
2020-07-05:
- Added fixes for PinePhone panel initialization after resume from sleep
2020-07-04:
- Integrated Clément's HDMI audio series (20200704113902.336911-1-peron.clem@gmail.com)
- Integrated Clément's panfrost DVFS series (20200704102535.189647-1-peron.clem@gmail.com)

My kernel's main integration branch is 'orange-pi-$VER' (this one).
No other branch is supposed to work alone. My defconfigs are tested
and work on the boards I support. Read the README.md for more info.

Only my branches based on the current mainline kernel branch are
maintained (those are usually the -rc# kernels!). You can find the
current mainline version here https://www.kernel.org/ (mainline: ...)

My prebuilt kernels can be found at https://xff.cz/kernels/ You can
use them to test that your board works, or just run them without
bothering with building everything yourself. I run them on all my
boards.

My website is https://xnux.eu and may contain useful advice.

Good luck!

     ~megi