From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 94E6F4657C0 for ; Wed, 3 Jun 2026 18:49:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780512571; cv=none; b=WeuTgBAXi2pHHDPliY/cZhPP9KYS5UAC4Q0Wl+n4ACWM3j3gLr9qQ+X0c17hQlIJE590Qr0UaFVSNKJ3FL8MDP1Wxv41JsVQcz8vQBg96lMjpVZ3blYmaiczgC5LZNc8nesk5rbQXRCqT3kFn4SftR5xMfyvduPuD2I38YHfeTQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780512571; c=relaxed/simple; bh=40M2sV1ViupapFAfo9CoPrRZTe8sv4vv6buoDystY7k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WBWaIhBt1d9cFHKkXYOp0BIuqqgaVKMfqmtlf+s8kNnu1MLDE7ZA91OuC7oRcd58LVh/+mLLUttvM2QGHbButf5GwuriPyWhE54bvKWBUSlwNRo/q6QMZMFZ/G/BdxR48wKW77kifGdQ87Vm2gszh7ym2CdvUZx3K7EufI9zCgM= 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=N32nZj4P; arc=none smtp.client-ip=209.85.214.173 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="N32nZj4P" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2c0aa420401so33152095ad.3 for ; Wed, 03 Jun 2026 11:49:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780512570; x=1781117370; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n6ML9c7gULfSe+6SlEf0Y7kEnMjS6nVo8dQzv+8WvZE=; b=N32nZj4PgsJB/OXiijJtRx7Amw03+WqvYCBEmYTk9bSLmEItvMtOuN5OSUsL/e2CL2 y6dkHOcsVRcXsFTvHKZ/R4rs42/nSxDaZYKV5PAJoM3Utr8+PKiAJM+SmnK5jdYaANIB +hhHG/r61ny0fx79CL95oyl68t6+vgD3Qh5jQ4QuSd0E3ty7ajMIQhtqW3hEmgEew5nd nH6Xkui9lRf/OWX3v+In5e4CMsPup6YxXHnu+jVJcCIOMF/YVrzpe+ZJVTfhdSfJeoXs HOfsNAGcydzAGEJNLCh9Gco5kM1AWy9n3TZsF62WFqdkpbzu7+Mhd94YSzDDAMfsg1AU UjmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780512570; x=1781117370; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=n6ML9c7gULfSe+6SlEf0Y7kEnMjS6nVo8dQzv+8WvZE=; b=UfIdKUEXf1niwdjY/+t99QsfKwt81oalJX/teOyVJtSV/4aBoE0qrCJC6rZeV63SyN tBaIooeg4dXc57SfSdhKT1FOlL4ppNVHgTwv0wY44CwV3zjBLXlUot5jrDiHIG1D88zz c/yEPfbX1Ql5mrl40ogACypieYToCVulDEGAoiauQIJQKdPiH1Nz57VT3zAF/D01gcua M7EoGLyz8zQmoF29OQvQarKYqlcTNvxUHyqf5vEg/d6LAreOS4W8WLJOsUhNtsQHaN9z 9CdK88wKGTPm4Pa65a38bIjDeNuAHgqkyFws1FCRHY11T7L1nFMkbSsFs1F2ohAwViRs bqUw== X-Forwarded-Encrypted: i=1; AFNElJ8yk7v7y3lsHUrSCOskQZWNeMKIB5PMxzD8Fza+xOFtxDLwgngQk5uIurUDUDoSCX+RRCQWbxEzIo0K3Rk=@vger.kernel.org X-Gm-Message-State: AOJu0Yx0hzrj2QuFvXk8b7GE5r4xTIozpCPsBBLQJHIZ2q5S6GfvnOXy 2PH/yxrTvsUaGWlGW6ZKXHUxUKZlbnbjjguUoNLXUbMQtgge5nkot4IZ X-Gm-Gg: Acq92OFJKpjukaCyV/0Us+spZ9yahaCxQ53CvhlR+gGMSY3MtI1d9ZGnoJO+iK+b9vE SrQ15w99mjWnROJnkXdVojrYkDM1wgRJQBeoYo0XWb9/V47ztaB1cy/f/8A4jnXGb5y3teG0LrM ZbhZDmDcCXHRXgX7bcP+l5HPtKXwYOxwXQL7+KgDatwvzmBAv2Hx0L6d32aD4Vk/taCKGAJg/pS qmd3mhX3aeV4pF1PeM8W0iclo6DAt976wrYTww8TVvq+y1PNqdjq3flSsFO33DbVBDkCPrIg1d/ Vy57oQTJhbuVXxZCzAoI3WiI9Y2Hntj8RrbvaEKazNjAdXUBVITnJsBHY0i3m+3DeMFGp/xisNE k/RP/Yr+h2wUNiBNsd3XO3nIdV15cNveggzXMdDSblAcdlfIpuQvYf+AZTOZQ9O6p1FECM939l4 +7hhF/p9NrfQWM/YtFEVshF2l2W/SqXkpfWWeKyxyLArO8BUZOmF9ZT8QXZp+Ms8RQFjJ3OUfm6 wKc0Qlov4tfxELk0v39wY0+lcYOhr4o+uPMI+1Cr/vyE19qpx3plw== X-Received: by 2002:a17:902:e54f:b0:2c0:d097:51ba with SMTP id d9443c01a7336-2c163fadb2cmr48915475ad.26.1780512569723; Wed, 03 Jun 2026 11:49:29 -0700 (PDT) Received: from lord-daniel-VivoBook-ASUSLaptop-K3502ZA-S3502ZA.. ([2409:40c1:4015:6e6f:ee79:7998:9a6f:65e3]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c164f6d59csm32139675ad.4.2026.06.03.11.49.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2026 11:49:29 -0700 (PDT) From: Piyush Patle To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: jic23@kernel.org, ak@it-klinger.de, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andy@kernel.org, nuno.sa@analog.com, dlechner@baylibre.com Subject: [PATCH v11 04/11] dt-bindings: iio: adc: hx711: add HX710B support Date: Thu, 4 Jun 2026 00:18:52 +0530 Message-ID: <20260603184859.89693-5-piyushpatle228@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260603184859.89693-1-piyushpatle228@gmail.com> References: <20260603184859.89693-1-piyushpatle228@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add the avia,hx710b compatible and document the HX710B VREF supply. Add constraints that forbid HX711-only properties on HX710B nodes and require vref-supply and dvdd-supply for HX710B, then add a separate HX710B example. Signed-off-by: Piyush Patle Reviewed-by: Andy Shevchenko Acked-by: Conor Dooley --- .../bindings/iio/adc/avia-hx711.yaml | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml b/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml index 099235b5fd54..13a3a8b007e2 100644 --- a/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml +++ b/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/iio/adc/avia-hx711.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: AVIA HX711 ADC chip for weight cells +title: AVIA HX711 and HX710B ADCs maintainers: - Andreas Klinger @@ -14,9 +14,14 @@ description: | differential input channels. Channel A supports gain 64 and 128; channel B supports gain 32. + The HX710B is a 24-bit ADC with fixed gain of 128. One input measures + the differential voltage between the two input pins; a second measures + the DVDD-AVDD supply voltage difference for battery level detection. + properties: compatible: enum: + - avia,hx710b - avia,hx711 sck-gpios: @@ -53,6 +58,10 @@ properties: RATE pin state is determined by the board wiring. maxItems: 1 + vref-supply: + description: + Reference voltage input (VREF). + clock-frequency: description: Controls the SCK bit-bang timing. The value is used to derive the @@ -62,6 +71,23 @@ properties: maximum: 2500000 default: 400000 +allOf: + - if: + properties: + compatible: + contains: + const: avia,hx710b + then: + properties: + vsup-supply: false + rate-gpios: false + required: + - vref-supply + - dvdd-supply + else: + properties: + vref-supply: false + required: - compatible - sck-gpios @@ -81,3 +107,13 @@ examples: avdd-supply = <&avdd>; clock-frequency = <100000>; }; + - | + #include + weight { + compatible = "avia,hx710b"; + sck-gpios = <&gpio3 10 GPIO_ACTIVE_HIGH>; + dout-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; + avdd-supply = <&avdd>; + dvdd-supply = <&dvdd>; + vref-supply = <&vref>; + }; -- 2.43.0