From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (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 5D820346A19 for ; Sun, 3 May 2026 12:10:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777810228; cv=none; b=k5GtzR4edBR/PGCskCqInjIM4V/hEKru65WvYT8xzLj7/tYdGZrbuPOo+QD6AVxMexPMy/ZooF+m6RqmzwboASGImGd08tB3jGVS9siQw1NBv6KvLvZvN/oEAcOl9skiE8WZgJpyU6EaehtsBsMKnxu3UdMm7h/6C6BdnIf57kY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777810228; c=relaxed/simple; bh=W7FJ/zbVP+//+ufafVTu0ETiLzypoHQU29K7UG+1ll8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D4I/AoB/v1AMwKikFN7Qj+Orbg86LAUohFUeNphV1RoAhUGUYMubKRrjq9qqxmxzAaY+nH71/pBGWTnhHjbAbg6nlQBc0HssDpi4xVTzKu9zL+8hErVf84JVxy5jwB3mtZ6RIEBzYJK4/lVFPuB44ie1n/vytMok0mT5jw5ar9g= 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=Oz/GGA5e; arc=none smtp.client-ip=209.85.215.174 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="Oz/GGA5e" Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-c8173b2af32so108476a12.0 for ; Sun, 03 May 2026 05:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777810227; x=1778415027; 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=HC3omfUEQuc+0UzHsrBzp98xO7QT7jZEFHNrIReAJzA=; b=Oz/GGA5e+hxY0i6vIzpTxiPJahw1J7QKMVcclvydIheAxh5b3obRRc8G97z7ahmSm6 DkzoblfSBJVykU5/fh4yPmjjqkldaMeqYQnNncHatps/rjDFb13OvHtqMMC1L9mX0MRx bMJWzy4fO22qMrl33ZsPB3FqGml+Htjfw80yvICtW4uqFAxUWT3Gh1K96+AwX/Ba8sth pN6cSajd04ySwpaWvxMFXY6NGw94AFdWzLu42mVhWhi2H6QEuBlKoIv68B0803UeSReF I4glftUUHMWma6xB83obQPMXzjhuRVJUQ1Ent3uMWUJYdrR4TEKLrO5keOYjWqa819fY sX4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777810227; x=1778415027; 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=HC3omfUEQuc+0UzHsrBzp98xO7QT7jZEFHNrIReAJzA=; b=ncC9zoZ+Y0ZtjhXv/0kf8SB3oA97NpT4snfktiWk/PdtRIEq+YZZq+sCSPvZxQlSWr tSl0abgr7C1YrmtWzp+ywfm6sEZVV0gIie6delR/L7C/MhXZvWVi0AY124i4JRfMvRyf qobJZUNU3VZXGbEupc7KKyZC17VAA5eHaU8pBOI9oSS5mVXYy2tLeH4Q3r64fr8poFC7 fu0t7hHgtUuTlsI1BL+FaZebVCJsHexiF3Pq8MYwNw+rPt0v9roopclPptX9mnGpD5DN hzXLlXzA4vUIA8MYOC3ou9hr4LPy6I7rAfNSYfq/2fyrox3UYxhBqXrsHDbq+/o63EFZ wSPQ== X-Forwarded-Encrypted: i=1; AFNElJ/EGeogxiJNtb44f3NPoJDtMxCCX2/T0VahhL9icNeZ5zaSjiMEQN9g39La9UQgL238bwzVIuBDJnQBgak=@vger.kernel.org X-Gm-Message-State: AOJu0YyA5K+thrliQiif7Is8c8Rn/k8Ny3nIoUsT4hk2yC6R/meNAVRe uKlr0E368e30jl9jj3GiLCZQWhktO5aXKkrGRnpEBdQsvAiYQ2PZULWv X-Gm-Gg: AeBDieuMOMNxdHkFUpcK2Sh+kfTU7F+mQLSY+pCOz823hn5iyksBfEHDwvqGI7u+zvc e16icud9r0wwIkuRn3sAX5dWsT1prWecC/wIt+WBXdBqCZFg4K8nc9NsiPVnmdTetMXDz0QSLH6 8H89nWrxFAGxgfFKhClSj4pccCOYVbhhfQjNbtxFaWupdmAM3h30RSZbIMoA2jrMd0idz/R7SWc raQ5u6JXJgdkcc4OXMU36SsF/ZwYlnj3CyBEEPb7wrDjh6XWmQ72ibfzcBqCGm+OPtfwTiT0Ror WZmSthgtwic+i43wT81iOPyn9FsFSLsrbc60CIeO0PXvXoyHRghA5sWcnQV84ZXmSuOEQIfJhtG msdigmZtKU1RXnstG19aiJcoG2cWmzHsLGb0c9S8vNn11FVLiWk9mKfCTO9ztj2lIsyliwLNmQ8 7W/A+Ea4x2aFlvl98KiaGhv7WRgibm1VucMxa3UTEXzY5vnhe4UwCLb1MRhHlHqJAVsb7BKGSDf n33CbdoSXO5HOd3fsTiVOZW5rq7i3JRaDEIlA22uN0MIfIB2YA9feECl7+wGQSZ6WWVciU= X-Received: by 2002:a05:6a20:9147:b0:366:19e9:f43 with SMTP id adf61e73a8af0-3a7f1a7f72fmr5900257637.6.1777810226751; Sun, 03 May 2026 05:10:26 -0700 (PDT) Received: from lord-daniel-VivoBook-ASUSLaptop-K3502ZA-S3502ZA.www.tendawifi.com ([14.139.108.62]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8357c4f4530sm1474364b3a.9.2026.05.03.05.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 May 2026 05:10:25 -0700 (PDT) From: Piyush Patle To: Andreas Klinger , Jonathan Cameron Cc: David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 04/11] dt-bindings: iio: adc: hx711: add HX710B support Date: Sun, 3 May 2026 17:39:33 +0530 Message-ID: <20260503120949.80292-5-piyushpatle228@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260503120949.80292-1-piyushpatle228@gmail.com> References: <20260503120949.80292-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-specific DVDD and VREF supplies. Add constraints that forbid HX711-only properties on HX710B nodes and require vref-supply for HX710B, then add a separate HX710B example. Keep the existing HX711-only binding extensions in earlier patches so this change is limited to the new variant. Signed-off-by: Piyush Patle --- .../bindings/iio/adc/avia-hx711.yaml | 42 ++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml b/Documentation/devicetree/bindings/iio/adc/avia-hx711.yaml index 9134bbe41379..b2b5c7bdf05e 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: @@ -44,6 +49,17 @@ properties: RATE pin state is determined by the board wiring. maxItems: 1 + dvdd-supply: + description: + Digital supply voltage (DVDD). For the HX710B, DVDD must be + greater than or equal to AVDD. When DVDD is a battery rail and + AVDD is a regulated supply, one channel monitors the DVDD-AVDD + difference for battery level detection. + + vref-supply: + description: + Reference voltage input (VREF). + clock-frequency: description: Controls the SCK bit-bang timing. The value is used to derive the @@ -53,6 +69,21 @@ properties: maximum: 2500000 default: 400000 +allOf: + - if: + properties: + compatible: + const: avia,hx710b + then: + properties: + vsup-supply: false + rate-gpios: false + required: + - vref-supply + else: + properties: + vref-supply: false + required: - compatible - sck-gpios @@ -72,3 +103,12 @@ 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>; + vref-supply = <&vref>; + }; -- 2.43.0