Skip to content

Commit 193b199

Browse files
Icenowywens
authored andcommitted
arm64: dts: sun50i-a64-pinephone: Add AF8133J to PinePhone
New batches of PinePhones switched the magnetometer to AF8133J from LIS3MDL because lack of ST components. Both chips use the same PB1 pin, but in different modes. LIS3MDL uses it as an gpio input to handle interrupt. AF8133J uses it as an gpio output as a reset signal. It wasn't possible at runtime to enable both device tree nodes and detect supported sensor at probe time, because both drivers try to acquire the same gpio in different modes. Device tree fixup will be done in firmware without introducing new board revision and new dts. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@gmail.com> Link: https://patchwork.ozlabs.org/project/uboot/patch/20240211092824.395155-1-andrej.skvortzov@gmail.com/ Link: https://patch.msgid.link/20240908214718.36316-2-andrej.skvortzov@gmail.com Signed-off-by: Chen-Yu Tsai <wens@csie.org>
1 parent 2ccfecb commit 193b199

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,18 @@
188188
&i2c1 {
189189
status = "okay";
190190

191+
/* Alternative magnetometer */
192+
af8133j: magnetometer@1c {
193+
compatible = "voltafield,af8133j";
194+
reg = <0x1c>;
195+
reset-gpios = <&pio 1 1 GPIO_ACTIVE_LOW>;
196+
avdd-supply = <&reg_dldo1>;
197+
dvdd-supply = <&reg_dldo1>;
198+
199+
/* status will be fixed up in firmware */
200+
status = "disabled";
201+
};
202+
191203
/* Magnetometer */
192204
lis3mdl: magnetometer@1e {
193205
compatible = "st,lis3mdl-magn";

0 commit comments

Comments
 (0)