From patchwork Sat Nov 11 22:07:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nia Espera X-Patchwork-Id: 13453204 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 C61C21DDE4; Sat, 11 Nov 2023 22:08:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="plZEO0nu" Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D54E830CF; Sat, 11 Nov 2023 14:07:59 -0800 (PST) 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=0FnQWakSPg4nYy3Teh/drN7a+ELrDLt7yDP/ieSx0xk=; b=plZEO0nuv8guOgGV0ZDzoSczpD 5KsOw7NoQWSL8OS8bcfSq/TdSS901r3pUh/o4pO/YUMEb5CTjL3w9WtcA1x56ZWtzM8VxOMh8I1wB dpSmqJlgaM8XTxFmRQReDlCEViWoH927/fy4A5q3KnSmq77r/xCmly0cUjmTNJPOmhapJmuoqfNko I8PH1xEsDnSwjEuyf9DcS7tAWZnuw7J2gALhxhm20P6u9d/5n3rhvLqMVyHPp0PbMJwiJBQ+VyHAJ ulDnSopJTvUrbBGGJ8N/19vVDRyWK0peFtW9LPqLVmxacCDXCzc3E6hBQGu4sEWxORRlvmYa6d/7b fkQ2W93Q==; Received: from i73190.upc-i.chello.nl ([62.195.73.190] helo=[192.168.68.111]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1r1w8x-0029Vw-Fu; Sat, 11 Nov 2023 23:07:55 +0100 From: Nia Espera Date: Sat, 11 Nov 2023 23:07:39 +0100 Subject: [PATCH v4 1/6] dt-bindings: iio: adc: qcom: Add Qualcomm smb139x Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20231111-nia-sm8350-for-upstream-v4-1-3a638b02eea5@igalia.com> References: <20231111-nia-sm8350-for-upstream-v4-0-3a638b02eea5@igalia.com> In-Reply-To: <20231111-nia-sm8350-for-upstream-v4-0-3a638b02eea5@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 , 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.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2033; i=nespera@igalia.com; h=from:subject:message-id; bh=nMbq87CC7U3RIvZk08BBsAHFxYSfy0wnGy13+obJXzk=; b=owEB7QES/pANAwAIAfIkzsI3VuKtAcsmYgBlT/s4/HElzVppL8OUeyoZWnIDoEnJQ6uTMSlzR eorOUqPLJmJAbMEAAEIAB0WIQSBPDomug3slDJEnubyJM7CN1birQUCZU/7OAAKCRDyJM7CN1bi rbv0DACHQeCWkK6M5BGY3yc5GS9aVseGX0EqgqNPyK2Zf8dbZvRJXguCZizNC71vrEosNP2crJs jZZequ4I9iyFz1zXvL9QQUH8P8OatViBHigGy19rKEG7N75ISBVA4BxBUOOSGh0tM0yof5EuJnS I29G5OJz01aYXVsraJxkEJRGbFPVuQ4x9qQYt1LPvzfHV8cKwjynpwdxrvG8QAHNJESfYFqy0PO 182rT/qswtQO3iFR+5ptYtkg+ZgIjZQvrmN5EDNyL2r5PK99D/EnGwIEJzrA0bcYIHwJ2grb+PA +NEhQ5zb7M/hy2+z1NoKCrAHwb75ftPM/wfjCSmeuTQOhmBs/qCYutCCAksYT5uAT25ppbRfbrl K7P3mqJwf95oCIVTzn6rNdg2A+iL0RSR9fo0w6siTRGMFThBMuzjox8bC3SxF9livTtErIVr9Z4 pAG9m6/mNJ4xPRU1/mc0aqyP+fRF9Kyp51neUJSeFvMDGkQ3Y9xQobg4wGaPcDfA79tNQ= X-Developer-Key: i=nespera@igalia.com; a=openpgp; fpr=813C3A26BA0DEC9432449EE6F224CEC23756E2AD Bindings for a charger controller chip found on sm8350 Signed-off-by: Nia Espera Acked-by: Krzysztof Kozlowski Acked-by: Jonathan Cameron Acked-by: Jonathan Cameron --- 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