* [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note
@ 2023-12-21 23:02 Martin Jücker
2023-12-21 23:02 ` [PATCH 2/2] ARM: defconfig: enable STMicroelectronics accelerometer and gyro Martin Jücker
2024-01-22 11:15 ` [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note Krzysztof Kozlowski
0 siblings, 2 replies; 3+ messages in thread
From: Martin Jücker @ 2023-12-21 23:02 UTC (permalink / raw)
To: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: robh+dt, conor+dt, alim.akhtar, martin.juecker, linux,
krzysztof.kozlowski
Add entries for LSM330DLC accelerometer and gyro to the p4note.
Signed-off-by: Martin Jücker <martin.juecker@gmail.com>
---
.../boot/dts/samsung/exynos4412-p4note.dtsi | 51 +++++++++++++++++++
1 file changed, 51 insertions(+)
diff --git a/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi b/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi
index 0b89d5682f857..39a3d1cbe4c3b 100644
--- a/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi
+++ b/arch/arm/boot/dts/samsung/exynos4412-p4note.dtsi
@@ -362,6 +362,39 @@ &hsotg {
status = "okay";
};
+&i2c_1 {
+ samsung,i2c-sda-delay = <100>;
+ samsung,i2c-slave-addr = <0x10>;
+ samsung,i2c-max-bus-freq = <400000>;
+ pinctrl-0 = <&i2c1_bus>;
+ pinctrl-names = "default";
+ status = "okay";
+
+ accelerometer@19 {
+ compatible = "st,lsm330dlc-accel";
+ reg = <0x19>;
+ interrupt-parent = <&gpx0>;
+ interrupts = <0 IRQ_TYPE_EDGE_RISING>;
+ pinctrl-0 = <&accelerometer_irq>;
+ pinctrl-names = "default";
+ mount-matrix = "1", "0", "0",
+ "0", "-1", "0",
+ "0", "0", "-1";
+ };
+
+ gyro@6b {
+ compatible = "st,lsm330dlc-gyro";
+ reg = <0x6b>;
+ interrupt-parent = <&gpx0>;
+ interrupts = <6 IRQ_TYPE_EDGE_RISING>;
+ pinctrl-0 = <&gyro_data_enable &gyro_irq>;
+ pinctrl-names = "default";
+ mount-matrix = "1", "0", "0",
+ "0", "-1", "0",
+ "0", "0", "-1";
+ };
+};
+
&i2c_3 {
samsung,i2c-sda-delay = <100>;
samsung,i2c-slave-addr = <0x10>;
@@ -844,6 +877,12 @@ bt_shutdown: bt-shutdown-pins {
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
};
+ gyro_data_enable: gyro-data-enable-pins {
+ samsung,pins = "gpl2-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
+ };
+
uart_sel: uart-sel-pins {
samsung,pins = "gpl2-7";
samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
@@ -894,12 +933,24 @@ ak8975_irq: ak8975-irq-pins {
samsung,pin-pud = <EXYNOS_PIN_PULL_DOWN>;
};
+ accelerometer_irq: accelerometer-irq-pins {
+ samsung,pins = "gpx0-0";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
stmpe_adc_irq: stmpe-adc-irq-pins {
samsung,pins = "gpx0-1";
samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
};
+ gyro_irq: gyro-irq-pins {
+ samsung,pins = "gpx0-6";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_INPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
+
max77686_irq: max77686-irq-pins {
samsung,pins = "gpx0-7";
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] ARM: defconfig: enable STMicroelectronics accelerometer and gyro
2023-12-21 23:02 [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note Martin Jücker
@ 2023-12-21 23:02 ` Martin Jücker
2024-01-22 11:15 ` [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Martin Jücker @ 2023-12-21 23:02 UTC (permalink / raw)
To: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: robh+dt, conor+dt, alim.akhtar, martin.juecker, linux,
krzysztof.kozlowski
Enable STMicroelectronics accelerometer and gyro drivers for the p4note
device family in exynos and multi_v7 defconfigs.
Signed-off-by: Martin Jücker <martin.juecker@gmail.com>
---
arch/arm/configs/exynos_defconfig | 3 +++
arch/arm/configs/multi_v7_defconfig | 3 +++
2 files changed, 6 insertions(+)
diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index 7483d7be23a66..0b64ce9be9aca 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -320,8 +320,11 @@ CONFIG_EXTCON_MAX77693=y
CONFIG_EXTCON_MAX8997=y
CONFIG_EXYNOS5422_DMC=y
CONFIG_IIO=y
+CONFIG_IIO_ST_ACCEL_3AXIS=m
+# CONFIG_IIO_ST_ACCEL_SPI_3AXIS is not set
CONFIG_EXYNOS_ADC=y
CONFIG_STMPE_ADC=y
+CONFIG_IIO_ST_GYRO_3AXIS=m
CONFIG_CM36651=y
CONFIG_AK8975=y
CONFIG_SENSORS_ISL29018=y
diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index a4260c9e600d4..2e4a732420a21 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -1146,6 +1146,8 @@ CONFIG_STM32_FMC2_EBI=y
CONFIG_EXYNOS5422_DMC=m
CONFIG_IIO=y
CONFIG_IIO_SW_TRIGGER=y
+CONFIG_IIO_ST_ACCEL_3AXIS=m
+# CONFIG_IIO_ST_ACCEL_SPI_3AXIS is not set
CONFIG_ASPEED_ADC=m
CONFIG_AT91_ADC=m
CONFIG_AT91_SAMA5D2_ADC=m
@@ -1165,6 +1167,7 @@ CONFIG_IIO_CROS_EC_SENSORS_CORE=m
CONFIG_IIO_CROS_EC_SENSORS=m
CONFIG_STM32_DAC=m
CONFIG_MPU3050_I2C=y
+CONFIG_IIO_ST_GYRO_3AXIS=m
CONFIG_CM36651=m
CONFIG_IIO_CROS_EC_LIGHT_PROX=m
CONFIG_SENSORS_ISL29018=y
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note
2023-12-21 23:02 [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note Martin Jücker
2023-12-21 23:02 ` [PATCH 2/2] ARM: defconfig: enable STMicroelectronics accelerometer and gyro Martin Jücker
@ 2024-01-22 11:15 ` Krzysztof Kozlowski
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-22 11:15 UTC (permalink / raw)
To: devicetree, linux-arm-kernel, linux-samsung-soc, linux-kernel,
Martin Jücker
Cc: robh+dt, conor+dt, alim.akhtar, linux
On Fri, 22 Dec 2023 00:02:57 +0100, Martin Jücker wrote:
> Add entries for LSM330DLC accelerometer and gyro to the p4note.
>
>
Applied, thanks!
[1/2] ARM: dts: exynos: add accelerometer and gyro to p4note
https://git.kernel.org/krzk/linux/c/497b447cf89b87c8fb0d0b27994258ed18ac355e
[2/2] ARM: defconfig: enable STMicroelectronics accelerometer and gyro
https://git.kernel.org/krzk/linux/c/213b755e42e2e7127777f74d2174bb4843a9b03a
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-22 11:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-21 23:02 [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note Martin Jücker
2023-12-21 23:02 ` [PATCH 2/2] ARM: defconfig: enable STMicroelectronics accelerometer and gyro Martin Jücker
2024-01-22 11:15 ` [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).