From 497b447cf89b87c8fb0d0b27994258ed18ac355e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20J=C3=BCcker?= Date: Fri, 22 Dec 2023 00:02:57 +0100 Subject: [PATCH] ARM: dts: samsung: exynos4412-p4note: add accelerometer and gyro to p4note MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add entries for LSM330DLC accelerometer and gyro to the p4note. Signed-off-by: Martin Jücker Link: https://lore.kernel.org/r/20231221230258.56272-1-martin.juecker@gmail.com Signed-off-by: Krzysztof Kozlowski --- .../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 @@ 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 @@ samsung,pin-pud = ; }; + gyro_data_enable: gyro-data-enable-pins { + samsung,pins = "gpl2-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + }; + uart_sel: uart-sel-pins { samsung,pins = "gpl2-7"; samsung,pin-function = ; @@ -894,12 +933,24 @@ samsung,pin-pud = ; }; + accelerometer_irq: accelerometer-irq-pins { + samsung,pins = "gpx0-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + }; + stmpe_adc_irq: stmpe-adc-irq-pins { samsung,pins = "gpx0-1"; samsung,pin-function = ; samsung,pin-pud = ; }; + gyro_irq: gyro-irq-pins { + samsung,pins = "gpx0-6"; + samsung,pin-function = ; + samsung,pin-pud = ; + }; + max77686_irq: max77686-irq-pins { samsung,pins = "gpx0-7"; samsung,pin-pud = ; -- 2.30.2