From nobody Wed Apr 1 22:37:36 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F1743AD538; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032129; cv=none; b=Egh2FkWdnAPp7J6NXqEFd3/tMIzkC8CYozjOzU5zlhSjKYeGLZirBexUgvvFI8pR9vIXAoC8XARx+6ineL15XubsPlWc5sydDa4m/hgs0wYG23ELbDyrrbhqCL6zDP1D9uAJjupUwbYtDd3VeTZlBJGShFUiPD2vX2zhjJn1yS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032129; c=relaxed/simple; bh=SiZxbBEOsyuCGsPP7EiYPMWvFe+geOEjDxFcviM+I78=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NW4wPPsVpFhyVnSL8WZAdoXlJHeAB1L/vF3i6Jo6dQpdogtqDwbVbwhGr8jdmf3+3E3E8SH3mqd48ylDZd34wwHynFoZVkIHeKcFJ12r1P8kUAgfBmGeH0yns+CgEEVBDtVKTuHAAlN5mIVIpJvaBhtmMUUsEuBGspXD7jmoefQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jfWnvE86; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jfWnvE86" Received: by smtp.kernel.org (Postfix) with ESMTPS id 4A75AC2BCB4; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775032129; bh=SiZxbBEOsyuCGsPP7EiYPMWvFe+geOEjDxFcviM+I78=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=jfWnvE869T0Pr5tsrshi62jYO8oXW1sJ9nFE53g1v+n9GfwjKcEIEihUHpQNT+BT/ kToMdh/u8Ip5ztvsfGIIhJ2so8EmiXY5x5HYS+95VYHvEx+uq6D4VR5RC3VNPU+0GA 3ScSIXGDSwbM5Xh6yJB+Hk0EmLzigXsyUrFm19uM/7vuU9QdtDxgOGNk8oX4pBoQoX dCB+CT4GA2WfB9QoXSWk42GE4rhLmVHtcNJoWuX5G5Gnz3Aws4EpJ7te7fr3GuD2Zh hWu16iaW3RtDVoj/KpFoXtycy9x87ugc6H18SY/BhuCh68BveWkCQzhEfzcCUTdFjU a/iiz13twhnTw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D84DD35157; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) From: Rudraksha Gupta via B4 Relay Date: Wed, 01 Apr 2026 01:28:48 -0700 Subject: [PATCH v2 1/3] ARM: dts: qcom: msm8960: expressatt: Sort node references and includes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260401-expressatt_fuel_guage-v2-1-947922834df1@gmail.com> References: <20260401-expressatt_fuel_guage-v2-0-947922834df1@gmail.com> In-Reply-To: <20260401-expressatt_fuel_guage-v2-0-947922834df1@gmail.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rudraksha Gupta X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775032128; l=11794; i=guptarud@gmail.com; s=20240916; h=from:subject:message-id; bh=Nw/R7tbD2R3cgIAnGsQB6z+2ikH8l/TaJNuRjCzGFB4=; b=zcgR3PVX0RMDhNPb0xo8rbaCliy1IzTzcrDmFDrQfIEaczlmBUEKx9TqGQmdwkwUFNYBCDGJ0 a8RGQ1ssmTRBvyqie+Glt+tqJbSLin03YH7G+BVnlD+AdezX2dW6Gpo X-Developer-Key: i=guptarud@gmail.com; a=ed25519; pk=ETrudRugWAtOpr0OhRiheQ1lXM4Kk4KGFnBySlKDi2I= X-Endpoint-Received: by B4 Relay for guptarud@gmail.com/20240916 with auth_id=211 X-Original-From: Rudraksha Gupta Reply-To: guptarud@gmail.com From: Rudraksha Gupta Reorganize the DTS file for consistency with other msm8960 board files. Assisted-by: Claude:claude-opus-4.6 Signed-off-by: Rudraksha Gupta --- .../dts/qcom/qcom-msm8960-samsung-expressatt.dts | 400 ++++++++++-------= ---- 1 file changed, 200 insertions(+), 200 deletions(-) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts b/a= rch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts index 35514fd53e3d..ed913ca5b825 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts +++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts @@ -1,13 +1,13 @@ // SPDX-License-Identifier: GPL-2.0 +#include +#include #include #include +#include #include =20 #include "qcom-msm8960.dtsi" #include "pm8921.dtsi" -#include -#include -#include =20 / { model =3D "Samsung Galaxy Express SGH-I437"; @@ -27,8 +27,8 @@ chosen { gpio-keys { compatible =3D "gpio-keys"; =20 - pinctrl-names =3D "default"; pinctrl-0 =3D <&gpio_keys_pin_a>; + pinctrl-names =3D "default"; =20 key-home { label =3D "Home"; @@ -54,48 +54,14 @@ key-volume-down { }; }; =20 - touchkey_enable: touchkey-enable { - compatible =3D "regulator-fixed"; - regulator-name =3D "touchkey_enable"; - gpio =3D <&tlmm 51 GPIO_ACTIVE_HIGH>; - enable-active-high; - regulator-boot-on; - }; - - vreg_flash: regulator-flash { - compatible =3D "regulator-fixed"; - regulator-name =3D "VREG_FLASH_3P3"; - regulator-min-microvolt =3D <3300000>; - regulator-max-microvolt =3D <3300000>; - gpio =3D <&pm8921_mpps 4 GPIO_ACTIVE_HIGH>; - enable-active-high; - pinctrl-0 =3D <&flash_led_unlock>; - pinctrl-names =3D "default"; - }; - - led-controller { - compatible =3D "richtek,rt8515"; - enf-gpios =3D <&tlmm 3 GPIO_ACTIVE_HIGH>; - vin-supply =3D <&vreg_flash>; - richtek,rfs-ohms =3D <16000>; - pinctrl-0 =3D <&cam_flash_en>; - pinctrl-names =3D "default"; - - led { - function =3D LED_FUNCTION_FLASH; - color =3D ; - flash-max-timeout-us =3D <250000>; - }; - }; - i2c-gpio-touchkey { compatible =3D "i2c-gpio"; #address-cells =3D <1>; #size-cells =3D <0>; sda-gpios =3D <&tlmm 71 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; scl-gpios =3D <&tlmm 72 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - pinctrl-names =3D "default"; pinctrl-0 =3D <&touchkey_i2c_pins>; + pinctrl-names =3D "default"; status =3D "okay"; i2c-gpio,delay-us =3D <2>; =20 @@ -104,8 +70,8 @@ touchkey@20 { reg =3D <0x20>; =20 interrupts-extended =3D <&tlmm 52 IRQ_TYPE_EDGE_FALLING>; - pinctrl-names =3D "default"; pinctrl-0 =3D <&touchkey_irq_pin>; + pinctrl-names =3D "default"; =20 vddio-supply =3D <&touchkey_enable>; vdd-supply =3D <&pm8921_l29>; @@ -114,6 +80,51 @@ touchkey@20 { linux,keycodes =3D ; }; }; + + led-controller { + compatible =3D "richtek,rt8515"; + enf-gpios =3D <&tlmm 3 GPIO_ACTIVE_HIGH>; + vin-supply =3D <&vreg_flash>; + richtek,rfs-ohms =3D <16000>; + pinctrl-0 =3D <&cam_flash_en>; + pinctrl-names =3D "default"; + + led { + function =3D LED_FUNCTION_FLASH; + color =3D ; + flash-max-timeout-us =3D <250000>; + }; + }; + + vreg_flash: regulator-flash { + compatible =3D "regulator-fixed"; + regulator-name =3D "VREG_FLASH_3P3"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + gpio =3D <&pm8921_mpps 4 GPIO_ACTIVE_HIGH>; + enable-active-high; + pinctrl-0 =3D <&flash_led_unlock>; + pinctrl-names =3D "default"; + }; + + touchkey_enable: touchkey-enable { + compatible =3D "regulator-fixed"; + regulator-name =3D "touchkey_enable"; + gpio =3D <&tlmm 51 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-boot-on; + }; +}; + +&gsbi1 { + qcom,mode =3D ; + pinctrl-0 =3D <&spi1_default>; + pinctrl-names =3D "default"; + status =3D "okay"; +}; + +&gsbi1_spi { + status =3D "okay"; }; =20 &gsbi2 { @@ -141,42 +152,6 @@ light-sensor@39 { }; }; =20 -&gsbi5 { - qcom,mode =3D ; - status =3D "okay"; -}; - -&gsbi5_serial { - status =3D "okay"; -}; - -&sdcc1 { - vmmc-supply =3D <&pm8921_l5>; - status =3D "okay"; -}; - -&sdcc3 { - vmmc-supply =3D <&pm8921_l6>; - vqmmc-supply =3D <&pm8921_l7>; - - pinctrl-0 =3D <&sdcc3_default_state>; - pinctrl-1 =3D <&sdcc3_sleep_state>; - pinctrl-names =3D "default", "sleep"; - - status =3D "okay"; -}; - -&gsbi1 { - qcom,mode =3D ; - pinctrl-0 =3D <&spi1_default>; - pinctrl-names =3D "default"; - status =3D "okay"; -}; - -&gsbi1_spi { - status =3D "okay"; -}; - &gsbi3 { qcom,mode =3D ; status =3D "okay"; @@ -193,93 +168,68 @@ touchscreen@4a { interrupts =3D <11 IRQ_TYPE_EDGE_FALLING>; vdda-supply =3D <&pm8921_lvs6>; vdd-supply =3D <&pm8921_l17>; - pinctrl-names =3D "default"; pinctrl-0 =3D <&touchscreen>; + pinctrl-names =3D "default"; }; }; =20 -&tlmm { - cam_flash_en: cam-flash-en-state { - pins =3D "gpio3"; - function =3D "gpio"; - drive-strength =3D <16>; - bias-pull-down; - }; +&gsbi5 { + qcom,mode =3D ; + status =3D "okay"; +}; =20 - spi1_default: spi1-default-state { - mosi-pins { - pins =3D "gpio6"; - function =3D "gsbi1"; - drive-strength =3D <12>; - bias-disable; - }; +&gsbi5_serial { + status =3D "okay"; +}; =20 - miso-pins { - pins =3D "gpio7"; - function =3D "gsbi1"; - drive-strength =3D <12>; - bias-disable; - }; +&gsbi7 { + qcom,mode =3D ; =20 - cs-pins { - pins =3D "gpio8"; - function =3D "gsbi1"; - drive-strength =3D <12>; - bias-disable; - output-low; - }; + status =3D "okay"; +}; =20 - clk-pins { - pins =3D "gpio9"; - function =3D "gsbi1"; - drive-strength =3D <12>; - bias-disable; - }; - }; +&gsbi7_i2c { + status =3D "okay"; =20 - gpio_keys_pin_a: gpio-keys-active-state { - pins =3D "gpio40", "gpio50", "gpio81"; - function =3D "gpio"; - drive-strength =3D <8>; - bias-disable; - }; + nfc@2b { + compatible =3D "nxp,pn544-i2c"; + reg =3D <0x2b>; + interrupts-extended =3D <&tlmm 106 IRQ_TYPE_EDGE_RISING>; + enable-gpios =3D <&pm8921_gpio 21 GPIO_ACTIVE_HIGH>; + firmware-gpios =3D <&tlmm 92 GPIO_ACTIVE_HIGH>; =20 - touchscreen: touchscreen-int-state { - pins =3D "gpio11"; - function =3D "gpio"; - output-enable; - bias-disable; - drive-strength =3D <2>; + pinctrl-0 =3D <&nfc_default &nfc_enable>; + pinctrl-names =3D "default"; }; +}; =20 - nfc_default: nfc-default-state { - irq-pins { - pins =3D "gpio106"; - function =3D "gpio"; - drive-strength =3D <2>; - bias-pull-down; - }; +&gsbi12 { + qcom,mode =3D ; =20 - firmware-pins { - pins =3D "gpio92"; - function =3D "gpio"; - drive-strength =3D <2>; - bias-disable; - }; - }; + status =3D "okay"; +}; =20 - touchkey_i2c_pins: touchkey-i2c-state { - pins =3D "gpio71", "gpio72"; - function =3D "gpio"; - drive-strength =3D <2>; - bias-disable; +&gsbi12_i2c { + status =3D "okay"; + + accelerometer@18 { + compatible =3D "bosch,bma254"; + reg =3D <0x18>; + vdd-supply =3D <&pm8921_l9>; + vddio-supply =3D <&pm8921_lvs4>; + + mount-matrix =3D "-1", "0", "0", + "0", "-1", "0", + "0", "0", "1"; }; =20 - touchkey_irq_pin: touchkey-irq-state { - pins =3D "gpio52"; - function =3D "gpio"; - drive-strength =3D <2>; - bias-disable; + magnetometer@2e { + compatible =3D "yamaha,yas532"; + reg =3D <0x2e>; + vdd-supply =3D <&pm8921_l9>; + iovdd-supply =3D <&pm8921_lvs4>; + + /* TODO: Figure out Mount Matrix */ }; }; =20 @@ -288,18 +238,27 @@ &pm8921 { }; =20 &pm8921_gpio { + nfc_enable: nfc-enable-state { + pins =3D "gpio21"; + function =3D "normal"; + bias-disable; + qcom,drive-strength =3D ; + power-source =3D ; + }; + prox_sensor_int: prox-sensor-int-state { pins =3D "gpio6"; function =3D "normal"; input-enable; bias-disable; }; +}; =20 - nfc_enable: nfc-enable-state { - pins =3D "gpio21"; - function =3D "normal"; - bias-disable; - qcom,drive-strength =3D ; +&pm8921_mpps { + flash_led_unlock: flash-led-unlock-state { + pins =3D "mpp4"; + function =3D "digital"; + output-low; power-source =3D ; }; }; @@ -546,72 +505,113 @@ pm8921_ncp: ncp { }; }; =20 -&usb_hs1_phy { - v3p3-supply =3D <&pm8921_l3>; - v1p8-supply =3D <&pm8921_l4>; -}; - -&usb1 { - dr_mode =3D "otg"; +&sdcc1 { + vmmc-supply =3D <&pm8921_l5>; status =3D "okay"; }; =20 -&gsbi7 { - qcom,mode =3D ; +&sdcc3 { + vmmc-supply =3D <&pm8921_l6>; + vqmmc-supply =3D <&pm8921_l7>; + + pinctrl-0 =3D <&sdcc3_default_state>; + pinctrl-1 =3D <&sdcc3_sleep_state>; + pinctrl-names =3D "default", "sleep"; =20 status =3D "okay"; }; =20 -&gsbi7_i2c { - status =3D "okay"; +&tlmm { + cam_flash_en: cam-flash-en-state { + pins =3D "gpio3"; + function =3D "gpio"; + drive-strength =3D <16>; + bias-pull-down; + }; =20 - nfc@2b { - compatible =3D "nxp,pn544-i2c"; - reg =3D <0x2b>; - interrupts-extended =3D <&tlmm 106 IRQ_TYPE_EDGE_RISING>; - enable-gpios =3D <&pm8921_gpio 21 GPIO_ACTIVE_HIGH>; - firmware-gpios =3D <&tlmm 92 GPIO_ACTIVE_HIGH>; + spi1_default: spi1-default-state { + mosi-pins { + pins =3D "gpio6"; + function =3D "gsbi1"; + drive-strength =3D <12>; + bias-disable; + }; =20 - pinctrl-0 =3D <&nfc_default &nfc_enable>; - pinctrl-names =3D "default"; - }; -}; + miso-pins { + pins =3D "gpio7"; + function =3D "gsbi1"; + drive-strength =3D <12>; + bias-disable; + }; =20 -&gsbi12 { - qcom,mode =3D ; + cs-pins { + pins =3D "gpio8"; + function =3D "gsbi1"; + drive-strength =3D <12>; + bias-disable; + output-low; + }; =20 - status =3D "okay"; -}; + clk-pins { + pins =3D "gpio9"; + function =3D "gsbi1"; + drive-strength =3D <12>; + bias-disable; + }; + }; =20 -&gsbi12_i2c { - status =3D "okay"; + touchscreen: touchscreen-int-state { + pins =3D "gpio11"; + function =3D "gpio"; + output-enable; + bias-disable; + drive-strength =3D <2>; + }; =20 - accelerometer@18 { - compatible =3D "bosch,bma254"; - reg =3D <0x18>; - vdd-supply =3D <&pm8921_l9>; - vddio-supply =3D <&pm8921_lvs4>; + gpio_keys_pin_a: gpio-keys-active-state { + pins =3D "gpio40", "gpio50", "gpio81"; + function =3D "gpio"; + drive-strength =3D <8>; + bias-disable; + }; =20 - mount-matrix =3D "-1", "0", "0", - "0", "-1", "0", - "0", "0", "1"; + touchkey_irq_pin: touchkey-irq-state { + pins =3D "gpio52"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; }; =20 - magnetometer@2e { - compatible =3D "yamaha,yas532"; - reg =3D <0x2e>; - vdd-supply =3D <&pm8921_l9>; - iovdd-supply =3D <&pm8921_lvs4>; + touchkey_i2c_pins: touchkey-i2c-state { + pins =3D "gpio71", "gpio72"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; =20 - /* TODO: Figure out Mount Matrix */ + nfc_default: nfc-default-state { + firmware-pins { + pins =3D "gpio92"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + + irq-pins { + pins =3D "gpio106"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-pull-down; + }; }; }; =20 -&pm8921_mpps { - flash_led_unlock: flash-led-unlock-state { - pins =3D "mpp4"; - function =3D "digital"; - output-low; - power-source =3D ; - }; +&usb_hs1_phy { + v3p3-supply =3D <&pm8921_l3>; + v1p8-supply =3D <&pm8921_l4>; +}; + +&usb1 { + dr_mode =3D "otg"; + status =3D "okay"; }; --=20 2.53.0 From nobody Wed Apr 1 22:37:36 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F2B93AE189; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032129; cv=none; b=mgkoH8QZFF3fppcSj4dapEUlIXoCz7VYOUyS36Q/qEk/EmHo8dCoNoOfz/9aVU8ZibUG102n1L1wAF17svi0lN+wF+eCVAALYsa1BBa+a+3wUPXFrSD/5C1X6ewqHIj63vI0DKyCo/aMPfUnfi3V6pIpkUaS1bBXt5pThL02u+c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032129; c=relaxed/simple; bh=Y+Bh9iIz3NKZ8LmK42uA8SUnD17OYdO0aVEElDG6KUw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cAdVAy/cvqFun/hHbGfxJpIp1/K3gWjdr+XblfEqj+MjASijAVoECdp/bDnTu+8TgngLlmnDwZcT9YKJ4opbQ6m0e4mgU2sPOT6tIaSZCDFZhB70bXFfuTIuh2BwJpa8F8OC8XdbezyOFoJcmQL5E3oHl1TDsMGnfFLbovtc4gg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h7cJzmga; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h7cJzmga" Received: by smtp.kernel.org (Postfix) with ESMTPS id 5CC75C2BCB7; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775032129; bh=Y+Bh9iIz3NKZ8LmK42uA8SUnD17OYdO0aVEElDG6KUw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=h7cJzmgaZ5S7ywvPoQH7IOMy9BvXUgVlFHEGiD7/ydOstsGfo28lyLjUcyxFx4H1P usXvoqZd53Y9LUrS7fw1iWE8PmaMThiXzkz0zZB578s5eUFkipA5eC6ByoXD5DDsqT yuItU2Rg8gQMbcvFD/mn6lb+DKu2MH00j/9x07hDA8DUEhPA9c8oqAWTuXCcAyvGiI +0C8/lVQuaNj+VobOJzWkyYYQxAmZEFGKZJ98uJ+peUBLo7iDd5O1d9EDwofThY/yC jgqhm8TFFH5yHqIwLRpKrwKOKyr33oi3ttS08/WtkPql+pp8/+2VBUzP3AYoDUYxYF DCIW4CshAbMvA== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 534BAD3515B; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) From: Rudraksha Gupta via B4 Relay Date: Wed, 01 Apr 2026 01:28:49 -0700 Subject: [PATCH v2 2/3] ARM: dts: qcom: msm8960: Add GSBI5 I2C controller Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260401-expressatt_fuel_guage-v2-2-947922834df1@gmail.com> References: <20260401-expressatt_fuel_guage-v2-0-947922834df1@gmail.com> In-Reply-To: <20260401-expressatt_fuel_guage-v2-0-947922834df1@gmail.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rudraksha Gupta X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775032128; l=1727; i=guptarud@gmail.com; s=20240916; h=from:subject:message-id; bh=8/RzBwh/fES/8HrOxicZH3ECPDErdir+yKEmOkH4FcM=; b=8RY/XE8pPT2II/im619+VCBP8uFt53wYimEnOrLUp4SSUXalABE3APqROdSjgCrWwzafpO9rR lKqURR7o3zlAYZl6faRq4dyyPRBMkOPt35uxWs+Vc6dHHIDZVVyBQJo X-Developer-Key: i=guptarud@gmail.com; a=ed25519; pk=ETrudRugWAtOpr0OhRiheQ1lXM4Kk4KGFnBySlKDi2I= X-Endpoint-Received: by B4 Relay for guptarud@gmail.com/20240916 with auth_id=211 X-Original-From: Rudraksha Gupta Reply-To: guptarud@gmail.com From: Rudraksha Gupta Add the I2C controller node for GSBI5 (gpio24/gpio25) alongside its pinctrl default and sleep states. Assisted-by: Claude:claude-opus-4.6 Signed-off-by: Rudraksha Gupta Reviewed-by: Konrad Dybcio --- arch/arm/boot/dts/qcom/qcom-msm8960.dtsi | 35 ++++++++++++++++++++++++++++= ++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi b/arch/arm/boot/dts/q= com/qcom-msm8960.dtsi index fd28401cebb5..2088baef6c30 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi +++ b/arch/arm/boot/dts/qcom/qcom-msm8960.dtsi @@ -185,6 +185,24 @@ i2c3-pins { }; }; =20 + i2c5_default_state: i2c5-default-state { + i2c5-pins { + pins =3D "gpio24", "gpio25"; + function =3D "gsbi5"; + drive-strength =3D <8>; + bias-disable; + }; + }; + + i2c5_sleep_state: i2c5-sleep-state { + i2c5-pins { + pins =3D "gpio24", "gpio25"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-bus-hold; + }; + }; + i2c7_default_state: i2c7-default-state { i2c7-pins { pins =3D "gpio32", "gpio33"; @@ -664,6 +682,23 @@ gsbi5_serial: serial@16440000 { =20 status =3D "disabled"; }; + + gsbi5_i2c: i2c@16480000 { + compatible =3D "qcom,i2c-qup-v1.1.1"; + reg =3D <0x16480000 0x1000>; + pinctrl-0 =3D <&i2c5_default_state>; + pinctrl-1 =3D <&i2c5_sleep_state>; + pinctrl-names =3D "default", "sleep"; + interrupts =3D ; + clocks =3D <&gcc GSBI5_QUP_CLK>, + <&gcc GSBI5_H_CLK>; + clock-names =3D "core", + "iface"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + status =3D "disabled"; + }; }; =20 gsbi7: gsbi@16600000 { --=20 2.53.0 From nobody Wed Apr 1 22:37:36 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D2403AE196; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032129; cv=none; b=F3gKlWDC4drO6vX9M1YL8vEQha521SAsWvK3UoJvBOlY/izxqViGSb+XtBmv9lHUL9BwZQzaYScTu2HH839v34Hou0c6vKLvk6x3xw0SYZiZqURo4pWDV/1ZgAr2BxwG/3e1o6RQBefd8IJWPip3pIE1KJFlsX+MUV0W/dXxkCk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775032129; c=relaxed/simple; bh=jCPQDtWRGtkhOAyxLgatH2I8yh8E1WzV1BBP/cT1gcg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c4R04b8nHEeYQ4wvoueTMZR/gqChn3yznfrMlkemSNmZOpdhG/KELgZ94y9EWRbawuNIDGZDFCJ2Zz/Pkbt9f3pt5jiDHt0Gn1PdqwE6vGEjSH9rCz5QDWmQdFFmglWd5dSzpOTrgAJ/XaRJn3KbIiuFnqQp5uL340fuKLAmhyI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oqSLgoca; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oqSLgoca" Received: by smtp.kernel.org (Postfix) with ESMTPS id 6B74DC2BCC4; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775032129; bh=jCPQDtWRGtkhOAyxLgatH2I8yh8E1WzV1BBP/cT1gcg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=oqSLgocaZg8ASo5YkjyhrFfQMExyha+vKjFtDsaB30o4HZKRX8/iWYHJdFUwaGhu3 y0awEOtDiqPYJzho0csgH0flkj10/KPJNAxqKeXNDd8IknOt40ffjcXr6uiYXxI9yF QeR057HAXoVYFGKx8zTcmu4srHmuFof1Sm+ChuR+tYDbLAl7hMFrWG0CSvt/TDh6MA r1xgYAW6yTJ4SCVysh0NQv+P22h2YMOl6sns17v+QXCN2SGofZUtOOwHc8kAR6VBtS YDVeFgGm/jtZZU2etNftNvbTH8eeLs+5BAni2SBQcrgxeFwQIUIc9nh56KGnobwNFo cdIVRbh6KVrYQ== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 644D1D3515A; Wed, 1 Apr 2026 08:28:49 +0000 (UTC) From: Rudraksha Gupta via B4 Relay Date: Wed, 01 Apr 2026 01:28:50 -0700 Subject: [PATCH v2 3/3] ARM: dts: qcom: msm8960: expressatt: Add MAX17048 fuel gauge Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260401-expressatt_fuel_guage-v2-3-947922834df1@gmail.com> References: <20260401-expressatt_fuel_guage-v2-0-947922834df1@gmail.com> In-Reply-To: <20260401-expressatt_fuel_guage-v2-0-947922834df1@gmail.com> To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rudraksha Gupta X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775032128; l=2637; i=guptarud@gmail.com; s=20240916; h=from:subject:message-id; bh=6C/QG+g2riU+HMSpgvYlES6lzgzGMbIcBfB0DCWzf4c=; b=5oyv6cK8ZpEN8a9DCnj85xYw2vgICQuDn6h7zqFSsnjRfnFdvOmz9NeBx32IIIbTTdDhSbWzK QFt71it4A3RAEFFHnY5yTafHckkyaTG2hbjafvWV7hEUFpDX787RL4L X-Developer-Key: i=guptarud@gmail.com; a=ed25519; pk=ETrudRugWAtOpr0OhRiheQ1lXM4Kk4KGFnBySlKDi2I= X-Endpoint-Received: by B4 Relay for guptarud@gmail.com/20240916 with auth_id=211 X-Original-From: Rudraksha Gupta Reply-To: guptarud@gmail.com From: Rudraksha Gupta Add MAX17048 fuel gauge support. Tested by comparing battery capacity readings between upstream (mainline max17040 driver) and downstream (Samsung max17048_fuelgauge driver) across a full discharge cycle. Upstream reads ~3% lower throughout. Both track the discharge curve correctly: Upstream: 95 92 88 87 86 87 83 82 80 68 60 55 50 45 40 35 30 20 16 10 1= 0 5 5 1 Downstream: 95 94 92 91 91 89 87 86 84 73 64 59 51 48 43 38 33 23 17 14 1= 2 8 6 3 Each pair of readings was collected by checking the upstream capacity first, then moving the battery to a second expressatt running downstream Android to check its capacity. The battery was then moved back to the upstream device for the next reading. This swap occasionally caused the upstream capacity to read slightly higher than the previous value (e.g. 86 -> 87). When this happened, the reading was retaken after the value settled. Link: https://github.com/LineageOS/android_kernel_samsung_d2/blob/stable/cm= -11.0-XNG3C/arch/arm/mach-msm/board-apexq-battery.c Link: https://github.com/LineageOS/android_kernel_samsung_d2/blob/stable/cm= -11.0-XNG3C/drivers/battery/Makefile#L5 Link: https://github.com/LineageOS/android_kernel_samsung_d2/blob/stable/cm= -11.0-XNG3C/arch/arm/mach-msm/Makefile#L308 Assisted-by: Claude:claude-opus-4.6 Signed-off-by: Rudraksha Gupta Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio --- .../dts/qcom/qcom-msm8960-samsung-expressatt.dts | 24 ++++++++++++++++++= ++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts b/a= rch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts index ed913ca5b825..bc976008ae45 100644 --- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts +++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts @@ -182,6 +182,23 @@ &gsbi5_serial { status =3D "okay"; }; =20 +&gsbi5_i2c { + status =3D "okay"; + + fuel-gauge@36 { + compatible =3D "maxim,max17048"; + reg =3D <0x36>; + maxim,double-soc; + maxim,rcomp =3D /bits/ 8 <0x62>; + maxim,alert-low-soc-level =3D <2>; + interrupt-parent =3D <&tlmm>; + interrupts =3D <67 IRQ_TYPE_EDGE_FALLING>; + pinctrl-0 =3D <&fuelgauge_alert_pin>; + pinctrl-names =3D "default"; + wakeup-source; + }; +}; + &gsbi7 { qcom,mode =3D ; =20 @@ -582,6 +599,13 @@ touchkey_irq_pin: touchkey-irq-state { bias-disable; }; =20 + fuelgauge_alert_pin: fuelgauge-alert-state { + pins =3D "gpio67"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + }; + touchkey_i2c_pins: touchkey-i2c-state { pins =3D "gpio71", "gpio72"; function =3D "gpio"; --=20 2.53.0