From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.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 6476639E16B for ; Mon, 18 May 2026 22:02:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779141775; cv=none; b=ifVN/knan6Co02NaNGDqCpOj8XA5xjmxPvU//uenWUTsDQ+gMhpF2O3jJMocbhhg3KBAC+MB0U5mhDc9T4AekDcKrFGu+l7WM22vwGdyDTZzTCj3BDg0rE18+RTVa/WlLZgaBUWyG5HM5Hbxtv3eHuxTLhOMgaE2lDBTrYNIqsc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779141775; c=relaxed/simple; bh=58hXK3+jjxdURzdM62kYNdhGnylmydkjDZ6DhB7yRAE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ceXodY5Kp3Sg+6yip6UqYoGfTk008AKzDGDkNyRI7RmdODc4kJ1D7b8h5EhqmAmEZlG18f1BCW+JmB1x5Jq6BJFnFurryu2W1ogXFhP6huS6E8bsiwEwKMq2fgM7cIbomc0CgaWH239FgR7A4zNrCWJYfjeU80b0kvBkTweyBzE= 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=sxX/gfG0; arc=none smtp.client-ip=209.85.210.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="sxX/gfG0" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-8353ca0f1f1so1221120b3a.1 for ; Mon, 18 May 2026 15:02:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779141774; x=1779746574; 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=MZ3L7gIVtDuWxh9a4b/o7Up/IHdND0VWYFyTOBzXy1Q=; b=sxX/gfG0UoxLsEk/xjAuUpaTiWBqzm/ajeS08EpqCK1mXtqtV45s2C8xd92M7TlEij HMErpGKYd5+YGfGCLU0fdbAJzCil9heEPubQqASmpZ18srp1H2HBJlMqbdAN+sa23eUX gZ8JG+hV5ve0nz63Mu3+lzYtorDd4rt2pDLe5WqyrQKEqgV7FIWkXzi1mviXgn+yxBRD 0nWTitswxb1/RDPycnsOevI4UBMlY9F15VW7pypya68OeglDcTl2DV0idxymhmnzYWgM MnDDS/fzPd+FGevLXGBs9waUP9VAPSPHfPIBMSNolGY39CHcSniijOdgVPctm9oeeWTf YIwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779141774; x=1779746574; 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=MZ3L7gIVtDuWxh9a4b/o7Up/IHdND0VWYFyTOBzXy1Q=; b=WznXxcgSLdo1JT4tz5SZnovaitb9M3Y8jMdu0wJWCKwzQGDXXIk8FAMmO770OZVB/Q e2zV2LoOxjD81vkqXKLVoaY2FNi8OcYwnHHJwqZFwB2J1SWlu9wfCqBIcN4u65aXpsFK mIaBlXd/Aqh/tidY9iGQmztdX4wmBNgpfBXTLRMPWDibcEvimnqzsBD+0t2hbap0TvzH ps4tzqN51JSlKza2G/dLFiEZhsBipwvvl2B0zcvhqzRHRUaVroD3K0V18GDE3rPEh+Yh Jp629Yx9yBTlccWGr/mTg7+C1eSvygK+6k0PytohRLfxKe9ia7El/YMFXdOu1FNk/ze5 SwDA== X-Forwarded-Encrypted: i=1; AFNElJ+j7TJpMw8m18Iekv0I4lDdMn65FEuig7EGJm1IAA1DdPDH/eIoEeGoAkEaMcd2pM/d8EKiEiTTEbW32QM=@vger.kernel.org X-Gm-Message-State: AOJu0YyLABxGjkxBPPsnqy8h5Fy+jVuP13lkSmEigSKu5/5Gx+ma7lT7 9aBakQmkLmK4/TwHdHDmeLG/5yq1Vk/g44kgFNqFLi1TkuLA3qNwPWEN X-Gm-Gg: Acq92OG3Rzic+0aPvc6yqW8y0hdO5EgZ5N+nATG9arVUy3vD9zxW2aDxwR/5hk0SrN7 pJPah78hfevIa3PEJ6CMKUNF5Q0v4EmaU7cVHFAjcUcIx/UOHByAN+obtE3UarD2B5wZPnUarKw 7OhCgDemUkVHK4fzXRhOnqJbs53BD45JOvLnoZQcU+D1sAPtPDNxAvFjz3xy1hO7Klts9kWgBjV xEPenWZ/dwycwFUoxSEHYExGCvUibe9pGxXPlrqKZGFpMLZxTtT75/7CNZNwt44ohnz/jQYtf+q UmqpaxjkKzKa1bWClyvuZ2LCjAuPTktP3Wu+0Wdz59OgQMF31yuMaEuVXUvH8GNQvcFxCTyYUMg esdkX8e7XkapTHA1QJBneJ64PJJhfvlf6aU5MXq2IuvXlnWiz52TzzYySZ7kOFuSA6uF9VIssV7 Jqj8fj4DfzocBqr8H9S8UuAEXum4sCPMwcusoEgYwXP4LQ7v49DdnqPETbFr3veOVnRVDQ1jASm BT+TQHopiTvpN/0q+i/t/wXUL1GMNNONe2z2vhdA63r8AKh6r7ozfirk6zI X-Received: by 2002:a05:6a00:14c4:b0:82a:146d:36a3 with SMTP id d2e1a72fcca58-83f33c9570fmr13371904b3a.21.1779141773709; Mon, 18 May 2026 15:02:53 -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-83f1977b128sm15772960b3a.22.2026.05.18.15.02.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 15:02:53 -0700 (PDT) From: Piyush Patle To: Jonathan Cameron Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Andreas Klinger , Andy Shevchenko , Conor Dooley , Krzysztof Kozlowski , Rob Herring Subject: [PATCH v9 04/11] dt-bindings: iio: adc: hx711: add HX710B support Date: Tue, 19 May 2026 03:32:20 +0530 Message-ID: <20260518220228.63322-5-piyushpatle228@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260518220228.63322-1-piyushpatle228@gmail.com> References: <20260518220228.63322-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. Signed-off-by: Piyush Patle Reviewed-by: Andy Shevchenko Acked-by: Conor Dooley --- Changes from v8: - Dropped the trailing sentence "Keep the existing HX711-only binding extensions in earlier patches so this change is limited to the new variant." from the commit message. The earlier patches in this series extend the shared top-level binding (VSUP, RATE GPIO, etc.) which are valid for both chips; there are no HX711-only binding extensions kept separate from this patch. .../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