From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96416C5516E for ; Thu, 30 Jul 2026 20:07:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=eJyYuIzEP97cm89L88l359VJouC3QafW8DAfksKCUYw=; b=oh4C7vGpDzECkN94ogcGByk9xR Kyn3sm0YLyyw+CNBph+p8QFklwT3ktehy83VRTb1B09ipzSY+yReQ24M+tSNusnUxAlVW8ufznRg4 5yMKpZGQTj5ZKEmtZP5LngXQiPfI4KYIxqF4IeIXzkT5zGLIU9KevYtliuprNKLnHuevrY/IBOMRK YbdYMXJx/B4HD4DzmLI4S/JXAs0mRkJeBnzd0eNBdKmnqbTf80qxvHiu3TOdZTppq2wjc6melwDEQ wu6BvYuhEnJ4IUjF2YcjJZzbrlVmRf9iR23r91VEJvl97+FMULxcIZYwLn+ncvKq34+H5hKhrIa3J F/y5+jZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wpX2i-0000000BITE-0DTh; Thu, 30 Jul 2026 20:07:48 +0000 Received: from layka.disroot.org ([178.21.23.139]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wpX2e-0000000BIRf-1Uot for linux-arm-kernel@lists.infradead.org; Thu, 30 Jul 2026 20:07:45 +0000 Received: from mail01.layka.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id B8496847ED; Thu, 30 Jul 2026 22:07:36 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id u0mjYxvzsJvv; Thu, 30 Jul 2026 22:07:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1785442056; bh=HOw79g3ooG6NNzkyYSEvjfgfmCBbxswKnKtrHqLTX78=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=OemgoVf8adrS6a77JJ9FNOOVRbTBjyg0fweRZjt81OXYj7t6ODU8/BPklGyAZ2Uoj HkcqINc4eRDlKa+1d7MEPfgyWIXSHPUs/B8CQ6KHMsEVY/6QP+z0vKWiToTSieBZ2C SA43vXkgFw6v9iIQ8O11E39EQ6Cf0JcMVxUewul+7k51DfQJZTIDtjA2DUTCNl7hxE ZUC2OOZyZbkiydWfZvdW6cvYGxcv3CeReFemJvejF+h9ZEoYPbM3lZmNtrHLz3+jd+ o2zlPlpo4foCnZQm2BYiVxhMYtrXOwDvQS5nhRN6TrPD0ktPjijvUx4qArdMOUAnFg L9/YTjyzqzVlw== From: Kaustabh Chakraborty Date: Fri, 31 Jul 2026 01:37:02 +0530 Subject: [PATCH v3 3/3] arm64: dts: exynos7870-j6lte: add Sharp GP2AP070S proximity sensor MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260731-gp2ap070s-v3-3-d1f5cecf9fe7@disroot.org> References: <20260731-gp2ap070s-v3-0-d1f5cecf9fe7@disroot.org> In-Reply-To: <20260731-gp2ap070s-v3-0-d1f5cecf9fe7@disroot.org> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kaustabh Chakraborty , Peter Griffin , Alim Akhtar Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260730_130744_661612_26EB3E12 X-CRM114-Status: GOOD ( 12.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Sharp GP2AP070S is a proximity sensor, which is connected to a GPIO-driven I2C line. Define the devicetree node for the sensor. The sensor requires two voltage supplies, one of which is from the primary regulator bank of the device, while the other one is controlled by the GPIO. Add a regulator wrapping over the concerned GPIO so as to feed it to the sensor node. Signed-off-by: Kaustabh Chakraborty --- arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts | 55 ++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts b/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts index de30d0970336..dd493138fed6 100644 --- a/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts +++ b/arch/arm64/boot/dts/exynos/exynos7870-j6lte.dts @@ -73,6 +73,35 @@ key-volup { }; }; + i2c-proximity { + compatible = "i2c-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + pinctrl-names = "default"; + pinctrl-0 = <&i2c_proxm_bus>; + + sda-gpios = <&gpf4 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpf4 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + + i2c-gpio,delay-us = <2>; + + proximity@39 { + compatible = "sharp,gp2ap070s"; + reg = <0x39>; + interrupt-parent = <&gpa0>; + interrupts = <5 IRQ_TYPE_EDGE_BOTH>; + + pinctrl-names = "default"; + pinctrl-0 = <&proxm_irq>; + + vdd-supply = <&vdd_fixed_proxm>; + vled-supply = <&vdd_ldo33>; + + proximity-near-level = <500>; + }; + }; + memory@40000000 { device_type = "memory"; reg = <0x0 0x40000000 0x3d800000>, @@ -94,6 +123,16 @@ vdd_fixed_mmc2: regulator-fixed-mmc2 { enable-active-high; }; + /* proximity: vdd */ + vdd_fixed_proxm: regulator-fixed-proxm { + compatible = "regulator-fixed"; + regulator-name = "vdd_fixed_proxm"; + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + gpio = <&gpd2 3 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + reserved-memory { #address-cells = <2>; #size-cells = <1>; @@ -354,13 +393,12 @@ vdd_ldo32: ldo32 { regulator-ramp-delay = <12000>; }; + /* proximity: vled */ vdd_ldo33: ldo33 { regulator-name = "vdd_ldo33"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-ramp-delay = <12000>; - regulator-boot-on; - regulator-always-on; }; /* touchscreen: vdd */ @@ -556,6 +594,13 @@ pmic_irq: pmic-irq-pins { samsung,pin-drv = ; }; + proxm_irq: proxm-irq-pins { + samsung,pins = "gpa0-5"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + touch_irq: touch-irq-pins { samsung,pins = "gpa0-6"; samsung,pin-function = ; @@ -579,6 +624,12 @@ bt_enable: bt-enable-pins { samsung,pin-pud = ; }; + i2c_proxm_bus: i2c-proxm-bus-pins { + samsung,pins = "gpf4-3", "gpf4-2"; + samsung,pin-function = ; + samsung,pin-pud = ; + }; + wlan_enable: wlan-enable-pins { samsung,pins = "gpd3-6"; samsung,pin-function = ; -- 2.54.0