From patchwork Wed Oct 18 14:25:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nia Espera X-Patchwork-Id: 13427185 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3AD0C46CA1 for ; Wed, 18 Oct 2023 14:27:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345260AbjJRO12 (ORCPT ); Wed, 18 Oct 2023 10:27:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345658AbjJRO1S (ORCPT ); Wed, 18 Oct 2023 10:27:18 -0400 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E30945FCD; Wed, 18 Oct 2023 07:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ph2HNOFu6ShT/rsQc1S8mJc4ao2RB+pOWhhItYG94CA=; b=izcoy8tUBmg/QK99GwKWwCm4Qm YcHFLacurcJOQiVaUysS4yAfdrJaMMP1WUauMnerkKvA8PRrkFUuA2ItZ/wRqzk6DPYP2BpjjIM7x X5csqa05XfHgZCQNZ2QS+iIrKVEXM6DvlCuwhMD0Ukab1az3VMwihx3A/T6L5USSeSHUrZLwbVGku djpMhmc7P1/E6L7svpcQtocpwk936IC+wQJBpGZzD8O5DzIluuaHTfUo+2VhAzzj82rHfrHTWTI59 cMStre1l8HIvmtgyBRAiojWek/tBdJGi8Kez6ZhfcRmW9RWeOB/HqMLP1O1Lx+N4cyIqyMrH4YKuN 0AYmsBJQ==; Received: from [145.18.212.154] by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qt7Ug-001paE-5j; Wed, 18 Oct 2023 16:25:54 +0200 From: Nia Espera Date: Wed, 18 Oct 2023 16:25:12 +0200 Subject: [PATCH v2 1/6] iio: adc: add smb139x bindings MIME-Version: 1.0 Message-Id: <20231018-nia-sm8350-for-upstream-v2-1-7b243126cb77@igalia.com> References: <20231018-nia-sm8350-for-upstream-v2-0-7b243126cb77@igalia.com> In-Reply-To: <20231018-nia-sm8350-for-upstream-v2-0-7b243126cb77@igalia.com> To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Conor Dooley , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , Vinod Koul , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, Rob , Clayton Craft , Caleb Connolly , Luca Weiss , ~postmarketos/upstreaming@lists.sr.ht, Nia Espera X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1969; i=nespera@igalia.com; h=from:subject:message-id; bh=qG/+w4/iwYleK9lDCuoPvHI0i6EeZNXt2CWHfVYC5c0=; b=owEB7QES/pANAwAIAfIkzsI3VuKtAcsmYgBlL+rqJuSbDKfiY/R6SZflVGRIoe+Z+PqwbXbzQ WyCJiTPJTCJAbMEAAEIAB0WIQSBPDomug3slDJEnubyJM7CN1birQUCZS/q6gAKCRDyJM7CN1bi rQ9HDACRU1jabHMEKiuLMV8c4+bWhzgmD/X2smF3BFmviw4oDoyIJrjvKkXxQvMXYXdTIgSdQ/B E4PSh0yimlWIH4ZBRQEAVUfwROiWmxxmtPrx6sVxax/g8dedaNR2aJaIVccA/BuZK30pY7Olh0n 9BHC9oSPSASM0xxhBprci+FszxXVHXgb/qrWws2aAOIxPrZESoKBBdDc7jDEOo1lnAwm+nqmYOE i8s0grSc40NJ7kOdNgj/ajX0Y8eqEGEALXjm7/CbtUwoxPND+UA/8UHLNKBXQSpWXyQ0EzxzSlV JPG9SC0XXdacfOodwgj3NCMjCi5qcPl7Zl1eIKxRziTtemRYz6Pb2P7rt1Pp/z54ytdnvCW9+gI hGWYFeTK17nzqr27/dce/28IAOzI/PaBNUfgBblnjSGfEHZmQOY8jSU8OgA6n/HZQmKj1TyoYSz 6hJQacdvY0pzWKQBYrpK3eVVRjrqP9A/GZ8jxq6o7AlDVIuw0fvB8crxVBoZrC75v2g+Q= X-Developer-Key: i=nespera@igalia.com; a=openpgp; fpr=813C3A26BA0DEC9432449EE6F224CEC23756E2AD Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Bindings for a charger controller chip found on sm8350 Signed-off-by: Nia Espera --- include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h | 19 +++++++++++++++++++ include/dt-bindings/iio/qcom,spmi-vadc.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h new file mode 100644 index 000000000000..c0680d1285cf --- /dev/null +++ b/include/dt-bindings/iio/qcom,spmi-adc7-smb139x.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause */ +/* + * Copyright (c) 2020 The Linux Foundation. All rights reserved. + */ + +#ifndef _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H +#define _DT_BINDINGS_QCOM_SPMI_VADC_SMB139X_H + +#include + +#define SMB139x_1_ADC7_SMB_TEMP (SMB139x_1_SID << 8 | ADC7_SMB_TEMP) +#define SMB139x_1_ADC7_ICHG_SMB (SMB139x_1_SID << 8 | ADC7_ICHG_SMB) +#define SMB139x_1_ADC7_IIN_SMB (SMB139x_1_SID << 8 | ADC7_IIN_SMB) + +#define SMB139x_2_ADC7_SMB_TEMP (SMB139x_2_SID << 8 | ADC7_SMB_TEMP) +#define SMB139x_2_ADC7_ICHG_SMB (SMB139x_2_SID << 8 | ADC7_ICHG_SMB) +#define SMB139x_2_ADC7_IIN_SMB (SMB139x_2_SID << 8 | ADC7_IIN_SMB) + +#endif diff --git a/include/dt-bindings/iio/qcom,spmi-vadc.h b/include/dt-bindings/iio/qcom,spmi-vadc.h index 08adfe25964c..ef07ecd4d585 100644 --- a/include/dt-bindings/iio/qcom,spmi-vadc.h +++ b/include/dt-bindings/iio/qcom,spmi-vadc.h @@ -239,12 +239,15 @@ #define ADC7_GPIO3 0x0c #define ADC7_GPIO4 0x0d +#define ADC7_SMB_TEMP 0x06 #define ADC7_CHG_TEMP 0x10 #define ADC7_USB_IN_V_16 0x11 #define ADC7_VDC_16 0x12 #define ADC7_CC1_ID 0x13 #define ADC7_VREF_BAT_THERM 0x15 #define ADC7_IIN_FB 0x17 +#define ADC7_ICHG_SMB 0x18 +#define ADC7_IIN_SMB 0x19 /* 30k pull-up1 */ #define ADC7_AMUX_THM1_30K_PU 0x24