From patchwork Thu Dec 21 23:02:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_J=C3=BCcker?= X-Patchwork-Id: 757756 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4072064A96; Thu, 21 Dec 2023 23:03:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FvGVIvhY" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-40c6ea99429so14196435e9.3; Thu, 21 Dec 2023 15:03:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703199783; x=1703804583; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hxAYtGGvpSNlN9I0Jtq9IFgVDPHMyNzoqUOzXLWoYh4=; b=FvGVIvhYh4+P8kUwkRN8k9LINMiYTi+isVVlXv8lwhoIcIW+hDhvMVcE1sFQ6C44aE R3bIV/9Wm1FPOiZ+9ZhGWTCvZp8C7+nRb0wWAzTnGgpUurjdhh2vWmC5Qa1/tYlWqxUy k2QrHBe2LGF/ebwVFy7gLyw9jRMCw9VFakAXhOo+fwaiK3aKzlrzEMi83IA1DLxmiyzl BeWIYQgr2PINxyHozoiX3Z9xMafyHEyXu+mWC7pIlvJCLP/A+GXBNJgSw2QRWQJfCA7K ojbyolkcAeikAFst/WVyFbCp9eOKzcr1mhCTDXNjaSKuXszah6mXg3729KvW4T9XtO+7 5UWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703199783; x=1703804583; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hxAYtGGvpSNlN9I0Jtq9IFgVDPHMyNzoqUOzXLWoYh4=; b=HNLBEzNHZvI+HbVIRk5lsVBss5n7blSijEEzFo1cOWk0lfPEKLisuoySSODSRaiO4L wfX97baBp7ormAJNqVx6vAC0Dcu4/QeAF1yeEdZ4H1FgLzl5t1tEJ4fEZed7lJJ3DW0v X/WikLdtgWHVBsfZtxWmtAuwxnQr620qzYxYgvOMOnaPAaY7U/jPQuAGEtV0tjUoiqWt ICZkQAQZWWoMgRxxm9Mhfthc7Zw9a5nrihB2jbYTpW8zv/J1bQUr//HbuJhsi/WELIGQ aBDMgS6YEzY6SN9/UiaOxRrqWEuXY6aQi+Ujbb6Eo7GFElk0aAR9er62rM+/1U1gc+hk tteA== X-Gm-Message-State: AOJu0Yy0O2OjkjfBUawU3TwLF3Qtrjo6KJi/CPEYT2yqasCbA9dWkEJg RcbCGvyrByzqoAu1BGDNnt4= X-Google-Smtp-Source: AGHT+IEOP+HDohFwrMXh60IH1fdkrPq33q53jmpjczjz+BTaITBx8sVji+NKynW/nHWrsJZy3bGjHA== X-Received: by 2002:a05:600c:a45:b0:40d:37d0:e66 with SMTP id c5-20020a05600c0a4500b0040d37d00e66mr169606wmq.258.1703199783028; Thu, 21 Dec 2023 15:03:03 -0800 (PST) Received: from adroid ([2a02:2c60:f18b:5f60:b2a3:31e6:bf5b:266a]) by smtp.gmail.com with ESMTPSA id o20-20020a05600c4fd400b004094d4292aesm4835221wmq.18.2023.12.21.15.03.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 15:03:02 -0800 (PST) From: =?utf-8?q?Martin_J=C3=BCcker?= To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: robh+dt@kernel.org, conor+dt@kernel.org, alim.akhtar@samsung.com, martin.juecker@gmail.com, linux@armlinux.org.uk, krzysztof.kozlowski@linaro.org Subject: [PATCH 1/2] ARM: dts: exynos: add accelerometer and gyro to p4note Date: Fri, 22 Dec 2023 00:02:57 +0100 Message-Id: <20231221230258.56272-1-martin.juecker@gmail.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add entries for LSM330DLC accelerometer and gyro to the p4note. Signed-off-by: Martin Jücker --- .../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 = ; }; + 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 @@ ak8975_irq: ak8975-irq-pins { 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 = ; From patchwork Thu Dec 21 23:02:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_J=C3=BCcker?= X-Patchwork-Id: 757392 Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C810D79490; Thu, 21 Dec 2023 23:03:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VGOnsMbc" Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40c236624edso13416485e9.1; Thu, 21 Dec 2023 15:03:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703199788; x=1703804588; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+QPd5UC5wjwrd312bUyvXjAszGjHn9J8dktI9Ob4QrE=; b=VGOnsMbcDamccZ014SijFm64qGtpTnWrKv1QcB1VlHj60iyDPfclwut3WyN//lFu6n kVHgjkIhRxbdoLLiWlcM2OpNfLHo3xA64yZe6/0LW6CNOkKqW88oirUmpoRYefhO8ye3 IifnsRPHxbnSWG58luPHIO+pWCbItppAdvbGmT9wgrS6ZCOnse9OOa3/fU2aFiuDIKxM zMMhlo9X66cey/Eckxekf//xQvwpY44H7Q1nb03+kvRFAB/sO3QLqDSoSnYd6CSGHtbX THRsOOUszdGaZZuk36ZCu3Oe4SLlJc6MPqikRvNQwA8y8gmTbo0hRHIXevofJrxOgI84 +57A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703199788; x=1703804588; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+QPd5UC5wjwrd312bUyvXjAszGjHn9J8dktI9Ob4QrE=; b=hZxBO+KKMrJFry0xY18DqtjCW1oXcVaA3eA0KQBmKt6IgJiLJcbXLyovTTnlFYH1c/ xBuDznHM6ngfOEAhet/SLgDYSnchXXbytidSf1DttmC4YKSU7FT+W2dJDp5D5hPmc0JD 4NnR0mSbjsM1twxx6uYVyPUnhSILfmwlnuD+kvTwy2XdCe+0KYQbPhyx5O0tgnzoEP4J i09g3WukaZed7W2TvyrvSBBSHtEiLcthZLP7aia78WzIqzMS8jCx++T2/Uy1r+XLau4T e7ko3gYR/jL/WzxHxLzqFQLYXXNa06SHYV4fWFAq94Hje7ePirx62mIvrGyIhsylPYg2 UNtw== X-Gm-Message-State: AOJu0YyqMSIacoFvK8+HyxL11MFzTn+eBD7iwQWLDsWA/2StUr6Tt6Ra GkZb26oK+akrXfrxPUhsV2Ip5UgAl2Y/sqbs X-Google-Smtp-Source: AGHT+IFEJC9uQWHqv2NZj0Zu29vtqGDT3x+e0WfrlNsFLjKBkJuxdZUVg1YePvWVLsWjPgd0BGGJJQ== X-Received: by 2002:a05:600c:198c:b0:40d:40e5:4b0c with SMTP id t12-20020a05600c198c00b0040d40e54b0cmr231448wmq.134.1703199787696; Thu, 21 Dec 2023 15:03:07 -0800 (PST) Received: from adroid ([2a02:2c60:f18b:5f60:b2a3:31e6:bf5b:266a]) by smtp.gmail.com with ESMTPSA id k4-20020a5d66c4000000b00336755f15b0sm2968647wrw.68.2023.12.21.15.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 15:03:07 -0800 (PST) From: =?utf-8?q?Martin_J=C3=BCcker?= To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: robh+dt@kernel.org, conor+dt@kernel.org, alim.akhtar@samsung.com, martin.juecker@gmail.com, linux@armlinux.org.uk, krzysztof.kozlowski@linaro.org Subject: [PATCH 2/2] ARM: defconfig: enable STMicroelectronics accelerometer and gyro Date: Fri, 22 Dec 2023 00:02:58 +0100 Message-Id: <20231221230258.56272-2-martin.juecker@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231221230258.56272-1-martin.juecker@gmail.com> References: <20231221230258.56272-1-martin.juecker@gmail.com> Precedence: bulk X-Mailing-List: linux-samsung-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Enable STMicroelectronics accelerometer and gyro drivers for the p4note device family in exynos and multi_v7 defconfigs. Signed-off-by: Martin Jücker --- 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