Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: guptarud@gmail.com, Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor
Date: Thu, 20 Nov 2025 10:10:48 +0100	[thread overview]
Message-ID: <742601dc-32d8-41ff-8e2b-a960f6fe77ab@oss.qualcomm.com> (raw)
In-Reply-To: <20251119-expressatt_nfc_accel_magn_light-v1-1-636f16f05cf4@gmail.com>

On 11/20/25 8:14 AM, Rudraksha Gupta via B4 Relay wrote:
> From: Rudraksha Gupta <guptarud@gmail.com>
> 
> Currently the Proximity Sensor doesn't work, but light sensor does.
> Left the proximity sensor as a TODO for later.
> 
> Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
> ---
>  .../dts/qcom/qcom-msm8960-samsung-expressatt.dts   | 36 ++++++++++++++++++++++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
> index 5ee919dce75b..1e331a046e7b 100644
> --- a/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
> +++ b/arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
> @@ -52,6 +52,31 @@ key-volume-down {
>  			linux,code = <KEY_VOLUMEDOWN>;
>  		};
>  	};
> +
> +	i2c-gpio-sensors {
> +		compatible = "i2c-gpio";


Are you using gpio-i2c for any specific reason? Would GSBI2 not be
connected to this pair? (I am not sure FWIW)

> +		sda-gpios = <&tlmm 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		scl-gpios = <&tlmm 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
> +		i2c-gpio,delay-us = <5>;
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		light-sensor@39 {
> +			compatible = "amstaos,tmd2772";
> +			reg = <0x39>;
> +			interrupt-parent = <&pm8921_gpio>;
> +			interrupts = <6 IRQ_TYPE_EDGE_FALLING>;
> +			vdd-supply = <&pm8921_l9>;
> +			vddio-supply = <&pm8921_lvs4>;
> +
> +			// TODO: Proximity doesn't work

C-style comments ( /* foo */ ) are preferred

> +			amstaos,proximity-diodes = <0>;

Try comparing the values the upstream and downstream drivers write
to the device, maybe you're missing something

> +			led-max-microamp = <100000>;
> +
> +			pinctrl-names = "default";
> +			pinctrl-0 = <&prox_sensor_int>;

property-n
property-names

is the preferred order

> +		};
> +	};
>  };
>  
>  &gsbi5 {
> @@ -163,6 +188,15 @@ &pm8921 {
>  	interrupts-extended = <&tlmm 104 IRQ_TYPE_LEVEL_LOW>;
>  };
>  
> +&pm8921_gpio {
> +	prox_sensor_int: prox-sensor-int-state {
> +		pins = "gpio6";
> +		function = "normal";
> +		input-enable;
> +		bias-disable;
> +	};
> +};
> +
>  &rpm {
>  	regulators {
>  		compatible = "qcom,rpm-pm8921-regulators";
> @@ -280,6 +314,7 @@ pm8921_l9: l9 {
>  			regulator-min-microvolt = <2850000>;
>  			regulator-max-microvolt = <2850000>;
>  			bias-pull-down;
> +			regulator-always-on;
>  		};
>  
>  		pm8921_l10: l10 {
> @@ -377,6 +412,7 @@ pm8921_lvs3: lvs3 {
>  
>  		pm8921_lvs4: lvs4 {
>  			bias-pull-down;
> +			regulator-always-on;

Does it stop working if you remove these regulator-always-on additions?

Konrad

  reply	other threads:[~2025-11-20  9:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20  7:14 [PATCH 0/4] ARM: dts: qcom: msm8960: expressatt: Add more peripherals Rudraksha Gupta via B4 Relay
2025-11-20  7:14 ` [PATCH 1/4] ARM: dts: qcom: msm8960: expressatt: Add Light/Proximity Sensor Rudraksha Gupta via B4 Relay
2025-11-20  9:10   ` Konrad Dybcio [this message]
2025-11-21 11:27     ` Rudraksha Gupta
2025-11-20  7:14 ` [PATCH 2/4] ARM: dts: qcom: msm8960: expressatt: Add NFC Rudraksha Gupta via B4 Relay
2025-11-20  9:14   ` Konrad Dybcio
2025-11-20  7:14 ` [PATCH 3/4] ARM: dts: qcom: msm8960: expressatt: Add Magnetometer Rudraksha Gupta via B4 Relay
2025-11-20  9:14   ` Konrad Dybcio
2025-11-21 11:35     ` Rudraksha Gupta
2025-11-21 12:54       ` Konrad Dybcio
2025-11-21 13:11         ` Dmitry Baryshkov
2025-11-20  7:14 ` [PATCH 4/4] ARM: dts: qcom: msm8960: expressatt: Add Accelerometer Rudraksha Gupta via B4 Relay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=742601dc-32d8-41ff-8e2b-a960f6fe77ab@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guptarud@gmail.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox