pine64-pinephone: Use pinephone-1.2b device tree if appropriate
Describe your issue
Starting from orange-pi-6.1-20230118-1327
that linux-postmarketos-allwinner
currently uses, there is a sun50i-a64-pinephone-1.2b.dts
(note the b
) that defines the new af8133j magnetometer used in the latest edition PinePhones. Until 6.0, the new magnetometer was listed in in sun50-a64-pinephone.dtsi
and thus part of pinephone-1.2.dtb
- https://github.com/megous/linux/blob/orange-pi-6.0-20221111-0002/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi#L648-L658 . But megi moved it into a new .dts
in the 6.1 kernel - https://github.com/megous/linux/commit/452b240d50721e644d9a49f38ba8cb7e12f5a4be
Since v1.2b pinephones continue to use pinephone-1.2.dts
which defines the old lis3mdl magnetometer, they are unable to use the new magnetometer.
$ xxd /proc/device-tree/compatible
00000000: 7069 6e65 3634 2c70 696e 6570 686f 6e65 pine64,pinephone
00000010: 2d31 2e32 0070 696e 6536 342c 7069 6e65 -1.2.pine64,pine
00000020: 7068 6f6e 6500 616c 6c77 696e 6e65 722c phone.allwinner,
00000030: 7375 6e35 3069 2d61 3634 00 sun50i-a64.
$ xxd "$(find /proc/device-tree/ -name 'magnetometer*')/compatible"
00000000: 7374 2c6c 6973 336d 646c 2d6d 6167 6e00 st,lis3mdl-magn.
It would be nice to be able to use the new magnetometer again, either by using the new pinephone-1.2b.dts
, or by restoring the new magnetometer to -pinephone.dtsi
, or something else?
Also perhaps the magnetometer could be added to the kernel upgrade test table to catch this early in the future.
What device are you using?
pine64-pinephone
On what postmarketOS version did you encounter the issue?
-
edge ( master
branch) -
v22.06
(supported until 2023-01-18) -
v22.12