Skip to content

device/main/linux-postmarketos/allwinner: restore af8133j magnetometer to PinePhone DTSI

Arnav Singh requested to merge Arnavion/pmaports:fix-1945-revert into master

This reverts megi's change to move the af8133j definition into a new pinephone-1.2b.dts.

megi says he split the definition into a separate DTS because he observed that pre-1.2b phones became unable to use the lis3mdl magnetometer if both magnetometers were defined in the device tree, but it's not clear that this is actually true. In particular, Mobian still carries the original patch that defines the af8133j magnetometer for all pinephone boards, and its users have presumably not complained. pmOS users also did not complain for the period of time where the af8133j magnetometer was defined for all pinephone boards.

An alternative approach would be to modify u-boot / boot.scr to detect the presence of the af8133j magnetometer via I2C probe and switch to the 1.2b DTB. This approach has two problems:

  1. While I was able to configure pinephone_defconfig and boot.scr such that i2c bus can see all three buses, i2c probe nevertheless cannot see the magnetometer.

  2. Even if (1) were fixed, loading the 1.2b DTB will lead to some software not working, because the 1.2b DTB changes the compatible string to replace pine64,pinephone-1.2 with pine64,pinephone-1.2b. Software that relies on this string to load appropriate config files etc is thus broken because they do not have 1.2b-specific configs. At least eg25-manager is broken in this way.

Ref: #1945

Edited by Arnav Singh

Merge request reports