From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) (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 065972D8DB0 for ; Sun, 10 May 2026 19:51:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778442680; cv=none; b=QQOqd6W51xTO679HarT2YmX17plWb+2dCK1mL4frOfKWxapuG4cbOTfqLbjs4vqjXzdFDUKRJvs3FmM1tlOpmZNw6a8jSSWjc+COCvghLrhlCg4pHlmWY+c81jqdGU3rH78zTdPFh8dznieFjjmRF6camMBCfVWdm4SSS26ig5I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778442680; c=relaxed/simple; bh=GhI/YB24tQ0bd38mulPo1xH7tdW0RPfUcJg1RDC3ubM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JmgZoFb8XCXoNHrPI5fZobKFLl46a1gDssvEpuNn2ZjFNeSdfnmqlNBc44+gKNWwcFoSkgYu4kGg/P6L/ENbyqBWL4CC67UOt+aLRl0OiYn4pKObBqopsVfhp0Y1MtsJ7Sot8jUD+yEANifQ96+7Kpk+YuAf9lC+2tskXC2cGzQ= 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=T03ouMpL; arc=none smtp.client-ip=209.85.214.178 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="T03ouMpL" Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-2b9705613ddso21876405ad.1 for ; Sun, 10 May 2026 12:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778442675; x=1779047475; 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=xwuLsZ0O8eS47ZyHe5+r4pXTo9v5POUb/qJgxIJDhZc=; b=T03ouMpLE/AmQxMZDKyuRwzpwk+YIOQ34zTcAEEQRVyHsHwfneg2gXIE/u/1WMX5BB Z2OtBnq8v7X8PlITOUg367AVhKqfCsC5KOf5HOCjayKgrw9loqbB+PW1sfo8fqKOK1Q4 S/9tsgbDUHWv0NZk1r//xIYVmui40u4fE27gGJYSFaLW8dZH4ImRZbfQANqFtn6cq08r 69ZPGQuGtHIaIDZtvAI2KI5TfhjopCM+xaPDGz4V+3mWqg4d8Rfh0lzLOQvEF/Vlt3Bx tUPvgQKZP61mw17oU7ejJlS6/jhXtjskkkuBbFldlOhvMbAVtk+dj+otyf59nljvfTJf OeLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778442675; x=1779047475; 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=xwuLsZ0O8eS47ZyHe5+r4pXTo9v5POUb/qJgxIJDhZc=; b=CH+/SgG9t5JAsWvzlRYgIqUjGIzmXqcfJVoXPXCp/Lw7rmiEwEZtdL7PjsZC/oFLLv XqUOZnPtsjpUatFi5PFq5L+mVtrY+nKn/Qr08sS6v4WKUojQxpKyo8clfPFFRRwo22xG /08tyABDsAEsswFNaLo0OHw44iamkCk8/TlVF+n64E0b2U9QZ0LZPSbG0c7m34sWrWhA J3qvwFd79gNgGdXFu8FQDgL+ivrM+mjut53lsL/Q/sk4Hzk8me+P9V1MXTn0Z0atGVV7 neAzuKN/xlrQwn/teJxyQE8IGHnz6EgZYdUN92NYNoGFv9/0uZesK+HS4gnkF8befa7V OrlQ== X-Forwarded-Encrypted: i=1; AFNElJ8EtzFJwqCsZkUGb6bnBStKAClQlF8x05ObZBJ2h98gBRW6G+MlgGIIae5+fDfvUBvKSejQV1o9PgAf@vger.kernel.org X-Gm-Message-State: AOJu0Yx915YN7BY6UiNUqUfel9k3vS8PxoPPygk8DuXLH1MnH3ah71L7 avsU1go75pXRg6V2uEC/7DeDuoGG+9NJ+dOvZlBLndYT0g8gV8zrLQw/ X-Gm-Gg: Acq92OEjC5Hdtm7hvj0L6b33JbswY3x8iYWSC8ZPTlC74ajIC+r0zsbfw9Yl6uTE4TR EVa9yKOpN8+iuISudoPw7vI/YDhLPnl7eCU8YOsJ0w7WKnRizip1tMmJN4sgWKdYdgCdHLBHWSe 952v2xAnX2fxb2+3ARMWhIb1DHnFiXN5yAYwLJwivrEbVyrmYGpaa2AIncqN1KfmVS1/XHytbJi QVo6g042EhamcbbIxYkbqj0AhhHG+1iU8dNYhwuXr7kKb53ENEfA9Xb1gHrjx7nfo1Oo21y7NfK /+LyJOA7iLxW/g+FEIH9rLwmJN8Af5WZ8C+FeuSLRocxHf5kEs3cSFWTJLQDUv5RhOZO0JeLXt0 dAd4NawcmCpqXP4YaBOd9+7fu1wSWk0sVAvAVtfUwr2TnwXO8/SAKI+01f0rTVfBSrv/wlf7nao QgwqC0bAFTpakEdI23GmKRu+5+4qF09voEP3NbmwgBTLzv52rFjEVD36WxpcBYTDeYO4V5hdHQd JpHORDWmFr5PzEpkF9s27jYREaM5qcVfOrt/+wZuMimFNedqbZciVmd+Qc7 X-Received: by 2002:a17:903:4b0d:b0:2ba:3e50:e3f5 with SMTP id d9443c01a7336-2ba79ad0cd6mr231459655ad.30.1778442675319; Sun, 10 May 2026 12:51:15 -0700 (PDT) Received: from lord-daniel-VivoBook-ASUSLaptop-K3502ZA-S3502ZA.www.tendawifi.com ([14.139.108.62]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2baf1e358b2sm77065095ad.54.2026.05.10.12.51.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2026 12:51:14 -0700 (PDT) From: Piyush Patle To: ak@it-klinger.de, jic23@kernel.org Cc: andriy.shevchenko@intel.com, dlechner@baylibre.com, nuno.sa@analog.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 04/11] dt-bindings: iio: adc: hx711: add HX710B support Date: Mon, 11 May 2026 01:19:26 +0530 Message-ID: <20260510194947.31997-5-piyushpatle228@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260510194947.31997-1-piyushpatle228@gmail.com> References: <20260510194947.31997-1-piyushpatle228@gmail.com> Precedence: bulk X-Mailing-List: devicetree@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 Reviewed-by: Andy Shevchenko --- .../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