From 845701b515cc12663601eac0a89b27390f3a7736 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ishii Date: Tue, 12 Oct 2021 09:48:23 +0900 Subject: Enable buffered-mode for accel/gyro sensors During asm330lhh's driver initialization, there is a kernel message which indicates failure of mapping irq like following: irq: type mismatch, failed to map hwirq-39 for interrupt-controller@f1010000! This is because of wrong statement in agl-refhw-common.dtsi and results disabling buffered-mode of asm330lhh. With this change, the irq can be correctly mapped and buffered-mode is enabled, i.e. buffer directory comes up like following: /sys/devices/platform/soc/e66d0000.i2c/i2c-3/3-006a/iio:device/buffer * Updates from Scott Murray: - Changes merged into the main reference hardware patch as discussed in Gerrit. - st,drdy-int-pin declaration added to mark int1 pin as explicitly used, matching other users of the driver. - i2c3 bus speed increased to 400 KHz. The ASM330LHH is the only device on it and is 400 KHz capable, which testing bears out. If any of the higher ODRs will be used in buffered mode, this seems desirable. BUG-AGL: SPEC-4098 Signed-off-by: Hiroyuki Ishii Signed-off-by: Scott Murray Change-Id: I598b1195a20d9e4611d2e505779ebeebfcbd8757 --- .../recipes-kernel/linux/files/0001-add-agl-refhw.patch | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'meta-agl-refhw-gen3') diff --git a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch index 71c8277..f9c9726 100644 --- a/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch +++ b/meta-agl-refhw-gen3/recipes-kernel/linux/files/0001-add-agl-refhw.patch @@ -4,19 +4,21 @@ Upstream-Status: pending Signed-off-by: Scott Murray Signed-off-by: Raquel Medina +[asm330lhh interrupt fix] +Signed-off-by: Hiroyuki Ishii --- - arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi | 918 ++++++++++++++++++++++ + arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi | 919 ++++++++++++++++++++++ arch/arm64/boot/dts/renesas/r8a7795-agl-refhw.dts | 392 +++++++++ drivers/media/i2c/adv748x/adv748x-core.c | 24 +- - 3 files changed, 1333 insertions(+), 1 deletion(-) + 3 files changed, 1334 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi new file mode 100644 -index 000000000000..796ac4c078e0 +index 000000000000..7474ed578c21 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/agl-refhw-common.dtsi -@@ -0,0 +1,918 @@ +@@ -0,0 +1,919 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Device Tree Source for common parts of AGL Reference Hardware board variants @@ -447,15 +449,16 @@ index 000000000000..796ac4c078e0 + + status = "okay"; + -+ clock-frequency = <100000>; ++ clock-frequency = <400000>; + + asm330lhh@6a { + compatible = "st,asm330lhh"; + reg = <0x6a>; + + interrupt-names = "int1", "int2"; -+ interrupts = <&gpio6 23 IRQ_TYPE_EDGE_RISING>, -+ <&gpio2 6 IRQ_TYPE_EDGE_RISING>; ++ interrupts-extended = <&gpio6 23 IRQ_TYPE_EDGE_RISING>, ++ <&gpio2 6 IRQ_TYPE_EDGE_RISING>; ++ st,drdy-int-pin = <1>; + }; +}; + -- cgit 1.2.3-korg