From nobody Fri Nov 29 00:36:47 2024 Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (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 6221A158205; Thu, 26 Sep 2024 14:22:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727360554; cv=none; b=HBWFcR8OG15vP4V0jO2ngMJ60THFuIkwxag2VJzLzTuaImlbXQ/PqA6CiSFTkXxcE7kPElUp0rn3bvQLyOgWEvkPLcjl+hCW0FI4oF9ZnfJIMN8Z7q8y+rvnSwYULamkTdSdJ+IJ388LaLR2h/HWTClNVOAgfS4Yz399JVcU1eI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727360554; c=relaxed/simple; bh=LBuvyZ2Sa1b0qO6et3xaAY8J3SZbm4P6xa33HuSbK7k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jFlyjmzMCB5GPDAsgu5KOcvM3AJ1+Np4BhgmpA0dcRXMEaM7fbsuInzEWK+Vr59y/OdV9UHkPO0uD0wrK8EO8gYHt7Nn/aIjpk4mGEoXcj2dSOqCtRxRYt61DE0521PsVozVNp8apKnPr8JOGyTr/P0MEDMByzmO5LlerDXoOCU= 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=NXHEpFX9; arc=none smtp.client-ip=209.85.208.175 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="NXHEpFX9" Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2f763e9e759so12571081fa.3; Thu, 26 Sep 2024 07:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727360549; x=1727965349; 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=zJrP9CEo0oFtx6B2uv41R/vJvZqOqIZSWKIn4ncOsuo=; b=NXHEpFX9EUW9qh17c/3vqVeQeo0gsvL47rKnQuf00dY0dEdWsDJdi8jkzL0jzbOsao p2duL+kfcNH5piR0OMXpVbxMKaNs2jC65eQGRuokN5egy9+ikvhGkSjbdWlxIK/2oala VEy9NlZJvrI/x0autPse2BUnwqmicCIZPn0GDXMKJNGdjbIwQdZJ+mrXmcM4urVygGtN kIE5qWAH6JDfLEkmTl/HCnlACKULERFjNBKOSetIq7LXub6E3pzSsTr2HJolNMlwLxPJ HIBKRxnRN7i8cJ9kRHzsgdx+CnFMn950tIEnBU5UjLh3JWcE/XNL0HqZS3s1TEl32asG ZHOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727360549; x=1727965349; 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=zJrP9CEo0oFtx6B2uv41R/vJvZqOqIZSWKIn4ncOsuo=; b=C36/tVbYwNoyqgAeRxxZvYP70T1ZnhQNEt/nJe365oAoZfqP81kDLB1poPyDOcLngn On1BKMcrvgzuKhePVVkRcH4OTKAnK9LnaGgdpyxKL/KrjFdlRaAcmH3Un5K3zAmiTf29 c4F+ejF6EnRJmVMAhiT9vh2J59mWzlM/nIXQcyZjXIFrdX57XyRrzQ9yncqtpOL5hMKl z5INB0YyKgiNId9lnsTfk1avadXb+hfsEbHj+1+QTiLqOrE5L9OztOUPvpLByTa7zLH9 OuI2QRTqqjDCnbVhzZ4Nq8ULCynatkc9MEvjfG04+pYXBQ59VoUUtHZxy8A6R0vU9z08 qXag== X-Forwarded-Encrypted: i=1; AJvYcCVHPE+h4AudPBtr5rHVGz+Ln2VKzSwgDrjmW1UPilJvPAUSQpWO974HlqvwnTArQCmttWeGZPr8bNoB@vger.kernel.org, AJvYcCXtiRRdpjuBf6zKED6QTgF9RkXyTACsNxgE8bro1YVGOHnkxb1Ck/rj7xG+Io5i7RZIy4+LIc1+9W0U/z3U@vger.kernel.org X-Gm-Message-State: AOJu0YzhryKVhQyXoV7Fz/PwS7u+Y6tFNF69c+A1B8ri/F53eTb1fJhx NlwqG6rA66HhLfp9UiZQybTZ2w37AmCAoamfENxMuibecGndB+mA X-Google-Smtp-Source: AGHT+IEqCkeZr2UbIXa9vba+b3DMTmgtLrc+Swh3B7BkjtRSmzeF+gRXLlcVNWJxBxcEqlrfYHi9YA== X-Received: by 2002:a05:6512:640e:b0:538:9e40:94a with SMTP id 2adb3069b0e04-5389e400b94mr216789e87.20.1727360549328; Thu, 26 Sep 2024 07:22:29 -0700 (PDT) Received: from [127.0.1.1] (mm-20-1-84-93.mgts.dynamic.pppoe.byfly.by. [93.84.1.20]) by smtp.googlemail.com with ESMTPSA id 2adb3069b0e04-537a864db1bsm815803e87.267.2024.09.26.07.22.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 07:22:29 -0700 (PDT) From: Dzmitry Sankouski Date: Thu, 26 Sep 2024 17:22:07 +0300 Subject: [PATCH v5 07/12] arm64: dts: qcom: 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: <20240926-starqltechn_integration_upstream-v5-7-d2084672ff2f@gmail.com> References: <20240926-starqltechn_integration_upstream-v5-0-d2084672ff2f@gmail.com> In-Reply-To: <20240926-starqltechn_integration_upstream-v5-0-d2084672ff2f@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=1727360533; l=3668; i=dsankouski@gmail.com; s=20240619; h=from:subject:message-id; bh=LBuvyZ2Sa1b0qO6et3xaAY8J3SZbm4P6xa33HuSbK7k=; b=M7VA0EwNXUUBGkQVy8ES1lWhy7ZR359ulj1ip+Gqr5KyedutPUAMSPcDkxcgeqoqs6JTo1oSU eY2TaVS0GfOA168ZjEH4R5qvIpPLHgxsJDp6sh/6UMepPn9PgM3+wvx 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 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..ebe19c941d75 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>; @@ -485,4 +572,20 @@ sd_card_det_n_state: sd-card-det-n-state { function =3D "gpio"; bias-pull-up; }; + + 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; + }; }; --=20 2.39.2