From nobody Wed Nov 27 18:43:46 2024 Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) (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 5FF341E1C2C; Tue, 8 Oct 2024 16:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728406333; cv=none; b=DszyPqdRT6iVCDx6iTVffc28jCkdgWaU/DlV4oLMj7ZOO0zyjjF8v6sTI7QoC/vZmyPIEyIH3Yr2AVm/fWVPdVfvGw3lpUwOg5jBkyRchLv0I3RVh4gSk9A9erNckUMyhzmgX0HzTVwMp62ESGBLcdaxSchu9KKsg3ZE7Q1SJFU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728406333; c=relaxed/simple; bh=NqCQWLggrQIjnF5xOmH7+34dA1dVfMw9uR64fLM6aMM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=llw3PjP+mJnAv8NcbD5J3ZFb4Ibph/+hvINdSc4LfCtexUYgIuUlyltLf5+gRUEwWfruYTpKU+0KK7GDb4cWo710xhR8yzEz+KOQVj39SCG0F9AaoxtQLSAIu6D8vT+rk0gOB1JjJi+4x6gj45JJJTrztBgSWd+8KjPGx0DjHXw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FqAFsXWx; arc=none smtp.client-ip=209.85.167.48 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="FqAFsXWx" Received: by mail-lf1-f48.google.com with SMTP id 2adb3069b0e04-5389e24a4d1so7252508e87.3; Tue, 08 Oct 2024 09:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728406329; x=1729011129; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AKESfSYrQ7Ve/4e2rVvyOg4YJptWBqaLBaB6huUwNz8=; b=FqAFsXWx3OYiVTH93giB6MchA5MxpVdhDoXUg3UST2m4KPkFsHEN3uTEtdR6xxHo8c vk06x252pghBe1J/Dce72wQpOW8T224fGWn2wav1410yl5qk7KO8R6A1sUMx5WKA7UWB 3obEMp+hNKU3qg2pkKxg9MX720g9wrKqQLCu26+tZT5Z8FcLdnIUrhqELhQe17kHACMh KNNc/CIFn8IJv7P3cUfVPkUbb1XUoncbXyoD68ihwtbElMRk5h2D/2LLtzMxAHlqbgcB xOQlfvqPNOAQ4TkxdTElpBAPkQn09Kp0qLZ0FsbAIWG2Ttwk7aEB4USQtJws1HyfCbyx LAww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728406329; x=1729011129; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AKESfSYrQ7Ve/4e2rVvyOg4YJptWBqaLBaB6huUwNz8=; b=nUWzY1e5cPV5+4EfHhkomFaBNC1kuR2prL9IpnwAgqQgcp2Uh148vhF+RwtQteJILH kTn4P/ntFiW9NZez5N6fSj88frupZVwnmpyBjN+ccMWUjKKNkjB8aF/MrRjDuDhWYS1d C02hzET2Nnz1h2T1/RKAhUYkXOgkAUT6HPqTtJbLBDsy3Urqe0q1DxRE/pdJNOHVqBtT YAMsg1KIuV3b3aoMCLnUGhUEJlQMcI+HKrW39X5deDa1QXscNH/sd4ozSQ5RPK/CmpME yhp3Br5ybYY6JZjkffCpWfkhkUOcHZ3Nl7CYMK0fLjk+m+b4VtnrEHc6/kgoS6kBgUFs sgWQ== X-Forwarded-Encrypted: i=1; AJvYcCUGPV89w2XwdnQVcLE+ejc6xmoMSThGU9CnQaIhuef55RxwbwqW30rsHQoRikLoiaX8yph4MhIfO2r6@vger.kernel.org, AJvYcCUV/aU9R5zY6FMu15VTLEpN+7LhUQ7me9Cg0NJbDqLXXniX4E3fvqx/XQuNQybsOKm/ZitqIRLLYnMn1ryo@vger.kernel.org X-Gm-Message-State: AOJu0YypbWlY5F5kKRKLMeC/Hqt0SJeSY9AXgInykNzItKiTY8hNyLp3 gyK778db50ZnafrE0IWk52lnH+aY1rXLBWYAQuuw/nX7joufx2BZ X-Google-Smtp-Source: AGHT+IHzHuCKrE/GYG+/n1LZNg5C1sg99PXkpAVYsU0V5JQE5eXOKAKz8Y+VFTzmaub4bdPYS3lFhA== X-Received: by 2002:a05:6512:3b1e:b0:533:47b5:c023 with SMTP id 2adb3069b0e04-539ab8577a5mr8436746e87.13.1728406329085; Tue, 08 Oct 2024 09:52:09 -0700 (PDT) Received: from [127.0.1.1] (nat6-minsk-pool-46-53-210-75.telecom.by. [46.53.210.75]) by smtp.googlemail.com with ESMTPSA id 2adb3069b0e04-539aff23e5fsm1260736e87.235.2024.10.08.09.52.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 09:52:08 -0700 (PDT) From: Dzmitry Sankouski Date: Tue, 08 Oct 2024 19:51:44 +0300 Subject: [PATCH v6 07/12] arm64: dts: qcom: sdm845-starqltechn: add max77705 PMIC 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: <20241008-starqltechn_integration_upstream-v6-7-5445365d3052@gmail.com> References: <20241008-starqltechn_integration_upstream-v6-0-5445365d3052@gmail.com> In-Reply-To: <20241008-starqltechn_integration_upstream-v6-0-5445365d3052@gmail.com> To: cros-qcom-dts-watchers@chromium.org, 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, Dzmitry Sankouski X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1728406308; l=3954; i=dsankouski@gmail.com; s=20240619; h=from:subject:message-id; bh=NqCQWLggrQIjnF5xOmH7+34dA1dVfMw9uR64fLM6aMM=; b=NgoMpvP2GeGALJHFuf0oQPmlCBGqhkV3vMDQcA6GpN6IBnPLSHDpbj6QLsea8KNxGUeidhgJT bzmPxwjCkkXCveMKlkvpAOIkxtLE5iwOsVCfTYJ05utfckUj77XeqBP X-Developer-Key: i=dsankouski@gmail.com; a=ed25519; pk=YJcXFcN1EWrzBYuiE2yi5Mn6WLn6L1H71J+f7X8fMag= Add support for max77705 MFD device. Supported sub-devices: charger, fuelgauge, haptic, led Signed-off-by: Dzmitry Sankouski --- Changes in v6: - refactor: s/starqltechn/sdm845-starqltechn in subject - refactor: 'm' < 's', so putting motor tlmm nodes first Changes in v5: - fix according to binding changes - reorder vib_pwm node --- arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts | 103 ++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts b/arch= /arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts index a3bd5231569d..7d1d57f41024 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-samsung-starqltechn.dts @@ -18,6 +18,16 @@ / { model =3D "Samsung Galaxy S9 SM-G9600"; compatible =3D "samsung,starqltechn", "qcom,sdm845"; =20 + battery: battery { + compatible =3D "simple-battery"; + constant-charge-current-max-microamp =3D <2150000>; + charge-full-design-microamp-hours =3D <3000000>; + + over-voltage-threshold-microvolt =3D <4500000>; + voltage-min-design-microvolt =3D <3400000>; + voltage-max-design-microvolt =3D <4350000>; + }; + chosen { #address-cells =3D <2>; #size-cells =3D <2>; @@ -90,6 +100,27 @@ key-wink { debounce-interval =3D <15>; }; }; + + vib_regulator: gpio-regulator { + compatible =3D "regulator-fixed"; + regulator-name =3D "haptic"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-boot-on; + enable-active-high; + gpio =3D <&pm8998_gpios 18 GPIO_ACTIVE_HIGH>; + }; + + vib_pwm: pwm { + compatible =3D "clk-pwm"; + #pwm-cells =3D <2>; + assigned-clock-parents =3D <&rpmhcc RPMH_CXO_CLK>; + assigned-clocks =3D <&gcc GCC_GP1_CLK_SRC>; + clocks =3D <&gcc GCC_GP1_CLK>; + pinctrl-0 =3D <&motor_pwm_default_state>; + pinctrl-1 =3D <&motor_pwm_suspend_state>; + pinctrl-names =3D "default", "suspend"; + }; }; =20 =20 @@ -385,10 +416,66 @@ &qupv3_id_1 { status =3D "okay"; }; =20 +&gpi_dma1 { + status =3D "okay"; +}; + &uart9 { status =3D "okay"; }; =20 +&i2c14 { + status =3D "okay"; + + pmic@66 { + compatible =3D "maxim,max77705"; + reg =3D <0x66>; + interrupt-parent =3D <&pm8998_gpios>; + interrupts =3D <11 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 =3D <&chg_int_default>; + pinctrl-names =3D "default"; + + leds { + compatible =3D "maxim,max77705-led"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + led@1 { + reg =3D <1>; + label =3D "red:usr1"; + }; + + led@2 { + reg =3D <2>; + label =3D "green:usr2"; + }; + + led@3 { + reg =3D <3>; + label =3D "blue:usr3"; + }; + }; + + max77705_charger: charger { + compatible =3D "maxim,max77705-charger"; + monitored-battery =3D <&battery>; + }; + + fuel-gauge { + compatible =3D "maxim,max77705-fuel-gauge"; + monitored-battery =3D <&battery>; + power-supplies =3D <&max77705_charger>; + shunt-resistor-micro-ohms =3D <5000>; + }; + + haptic { + compatible =3D "maxim,max77705-haptic"; + haptic-supply =3D <&vib_regulator>; + pwms =3D <&vib_pwm 0 100000>; + }; + }; +}; + &ufs_mem_hc { reset-gpios =3D <&tlmm 150 GPIO_ACTIVE_LOW>; vcc-supply =3D <&vreg_l20a_2p95>; @@ -457,6 +544,22 @@ &tlmm { gpio-reserved-ranges =3D <27 4>, /* SPI (eSE - embedded Secure Element) */ <85 4>; /* SPI (fingerprint reader) */ =20 + motor_pwm_default_state: motor-pwm-active-state { + pins =3D "gpio57"; + function =3D "gcc_gp1"; + drive-strength =3D <2>; + bias-disable; + output-high; + }; + + motor_pwm_suspend_state: motor-pwm-suspend-state { + pins =3D "gpio57"; + function =3D "gpio"; + drive-strength =3D <2>; + bias-disable; + output-low; + }; + sdc2_clk_state: sdc2-clk-state { pins =3D "sdc2_clk"; bias-disable; --=20 2.39.2