From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.218.175.134 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794503356; b=hTDP61zxrYBywHr70UyWH8B0x1A+HJQsjcnUt7XfSUApi3AA9GCwBZj/na9bLDqECVDp OC8/0otqsM51Dmt2CeSYIxauCbqSLjMlmPJsdy3OR6Qld93faJRa2MupWuE/X103bRUPA 6cfG0UaIIuoYc2mY5YZL7n1hfb3qjJyMps2yZvQQYy0qnoymn8rEoc5JWg4kHPfjZ19b2 +LtOIR3fbFSqkvVmGl4uSEAkaKfb9y+G7q5PJlFtXZq8333BPHTrEsX8OpDAPLq15D/o+ P9vp4T/97nHAUsgZ7deGa3fmAb5I9Sm5nNbw3xZcE9l04B0eM5CXI7jTASGgUMShyvw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794503356; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; bh=pDkrQb08D5M8j1MP1dcWcJZplXdGWPMsv1pB47P3qyg=; b=R3kcB7/9eoNrwYXjk7tFNzUg3OuAsyyz+CmE7wn9/DV5dOeLL9ILn7pNShmBoFeiU9Lu OepLRVgC6DuuDNXxzhmFKJ/MN8qo0sVkvJWUEWAKPG1GEL1TZrjFKEIKgpl+hacOXqzYh N1UAAg29iFdo6SOEsJ6+VTMLnV+MVi19zDUTvyn8U4wNnSvAX6uGQD/M/yVikLULWlpJV FEoM1gepz4O58izPc7O+ZC1SFZGVxiqnGsYU4BEC0FZOaw1wleyJP3QKgDBahipiq7Nup Q2xeOwtV2TdDDbu2CGYarSX8i5nhVK2VBdG5orf+mTkyN2sD+hdCBQvWWJ10iB/OA4Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=packett.cool; spf=pass smtp.mailfrom=packett.cool; dkim=pass header.d=packett.cool header.i=@packett.cool header.a=rsa-sha256 header.s=key1 header.b=l0GZ8dvA; arc=none smtp.remote-ip=91.218.175.134 Received: from mta0.migadu.com (out-134.mta0.migadu.com [91.218.175.134]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FBB7606A331 for ; Thu, 12 Nov 2026 17:09:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0FBB7606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=packett.cool Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=packett.cool header.i=@packett.cool header.a=rsa-sha256 header.s=key1 header.b=l0GZ8dvA X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=AEUTIZyGb3mCSCpfGc5hg6pIGxMhxghjc7n8dp9pmKU=; c=simple/simple; d=packett.cool; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1794503353; v=1; x=1795108153; b=l0GZ8dvA/INoJIxMcEleWaeT2K3Ut8NTJJ4/le6/b6ZXOT08HyAfhGj493iR9A59RnS/jzWO Irw1iNb3N7TjjdrpkneMmEy6hblS0bws0HlT0bR8QoAIKZK+0tjjSB87xEEBMQoYb0BKo3Xrkhv OBVQfj4+XZjhJLBYkSygo9DNVSYSkxGePKyXmiX0D42CSgB2vUxpB/1GoVYMzeyu00UaLpp52b2 RJlqqTR3lXO5Q19AuHOsQMS4vArgP+YHqoKrko+1IuMfUCNCGw6RpukF1dB986vh9X3AyIysq9h YLGeC8Sk2sOTkP6eSe1Nd+G0sNtWH8c8s2IrUbuJQ3GoQ== X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id fd5fd19beb92ad4a; Thu, 12 Nov 2026 17:09:13 +0000 X-Mizu-Trace-ID: fd5fd19beb92ad4a X-Migadu-Flow: FLOW_OUT From: Val Packett To: Val Packett , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marc Lainez , Luca Weiss , =?UTF-8?q?Barnab=C3=A1s=20Cz=C3=A9m=C3=A1n?= , Danila Tikhonov , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, phone-devel@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] dt-bindings: power: supply: add Qualcomm QGauge fuel gauge Date: Thu, 12 Nov 2026 14:07:27 -0300 Message-ID: <20261112170841.2189322-2-val@packett.cool> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261112170841.2189322-1-val@packett.cool> References: <20261112170841.2189322-1-val@packett.cool> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Marc Lainez Document the QGauge fuel-gauge block handled by the qcom_qg driver, with compatibles for the PMI632 and PM6150 PMICs. Signed-off-by: Marc Lainez Signed-off-by: Val Packett --- .../bindings/power/supply/qcom,qg.yaml | 105 ++++++++++++++++++ MAINTAINERS | 6 + 2 files changed, 111 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/supply/qcom,qg.yaml diff --git a/Documentation/devicetree/bindings/power/supply/qcom,qg.yaml b/Documentation/devicetree/bindings/power/supply/qcom,qg.yaml new file mode 100644 index 000000000000..79dd18d87879 --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/qcom,qg.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/qcom,qg.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm QGauge Fuel Gauge + +maintainers: + - Val Packett + +description: + The QGauge (QG) block found in some Qualcomm PMICs (PM6150, PMI632) + provides battery fuel gauging through hardware voltage and current + FIFO sampling, open circuit voltage (OCV) measurement, and coulomb + counting. The hardware has a multi-state FSM (S1-S7) that automatically + transitions between active sampling and low-power sleep states. + +allOf: + - $ref: /schemas/power/supply/power-supply.yaml# + - $ref: /schemas/nvmem/nvmem-consumer.yaml# + +properties: + compatible: + enum: + - qcom,pm6150-qg + - qcom,pmi632-qg + + reg: + maxItems: 1 + + interrupts: + items: + - description: Battery missing interrupt + - description: Battery voltage low interrupt + - description: Battery voltage empty interrupt + - description: FIFO data update done interrupt + - description: Good OCV measured interrupt + - description: FSM state change interrupt + - description: QG event interrupt + + interrupt-names: + items: + - const: batt-missing + - const: vbat-low + - const: vbat-empty + - const: fifo-done + - const: good-ocv + - const: fsm-state-chg + - const: event + + io-channels: + items: + - description: ADC channel for battery thermistor temperature + + io-channel-names: + items: + - const: batt-therm + + monitored-battery: true + + nvmem: true + + power-supplies: true + +required: + - compatible + - reg + - interrupts + - interrupt-names + - monitored-battery + +additionalProperties: false + +examples: + - | + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + + fuel-gauge@4800 { + compatible = "qcom,pmi632-qg"; + reg = <0x4800>; + + interrupts = <0x2 0x48 0x0 IRQ_TYPE_EDGE_BOTH>, + <0x2 0x48 0x1 IRQ_TYPE_EDGE_BOTH>, + <0x2 0x48 0x2 IRQ_TYPE_EDGE_RISING>, + <0x2 0x48 0x3 IRQ_TYPE_EDGE_RISING>, + <0x2 0x48 0x4 IRQ_TYPE_EDGE_RISING>, + <0x2 0x48 0x5 IRQ_TYPE_EDGE_RISING>, + <0x2 0x48 0x6 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "batt-missing", + "vbat-low", + "vbat-empty", + "fifo-done", + "good-ocv", + "fsm-state-chg", + "event"; + + nvmem = <&pmi632_sdam_2>; + + monitored-battery = <&battery>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index b253b10dd436..7b76b07ed66f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23328,6 +23328,12 @@ F: drivers/firmware/qcom/qcom_pas.h F: drivers/firmware/qcom/qcom_pas_tee.c F: include/linux/firmware/qcom/qcom_pas.h +QUALCOMM QGAUGE FUEL GAUGE DRIVER +M: Val Packett +L: linux-arm-msm@vger.kernel.org +S: Maintained +F: Documentation/devicetree/bindings/power/supply/qcom,qg.yaml + QUALCOMM SMB CHARGER DRIVER M: Casey Connolly L: linux-arm-msm@vger.kernel.org -- 2.56.0