From patchwork Mon Mar 3 11:31:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 13998641 Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.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 4ED5E1EEA4A; Mon, 3 Mar 2025 11:31:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741001500; cv=none; b=paDOWnH9pu5BB3h4lxCMldtQJcd52jCgzpW7gCth5JwYyVc/7h0U/3Kpl7p09EbRQSgfPBwbByeOzIYYoUjVvWO8VzHcfIRIY0zIic2JFPJt09RTQFrlRm+rwhfyQCRobcb0oh2ObNlPYp3Z6KGNl4GnEATVXTb9iE0x3oKF6xI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741001500; c=relaxed/simple; bh=NlwgN07FrFSu84o+5T1gUSI8JW7OjvVqVFxpziiSosE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f1QiZ8NrnyPn0ispCWcu64ayAXoghtlFJMwW5yBB0YRr5w85PJ5D88J45+pEgJiY5wgLu8wCF0BwznjTVSR4aigmbRV2bUV4PSp+TjhHCzxCi/uhC063PUkbuVih3cZ6DWPeRAADPMMouzq9dh8x0P21mejBYF7xXmPLkjXZt80= 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=H4xnXHXM; arc=none smtp.client-ip=209.85.208.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="H4xnXHXM" Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-307bc125e2eso47108081fa.3; Mon, 03 Mar 2025 03:31:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741001496; x=1741606296; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=QRbeVD92omOXPkqtwMRC9gBsAE4nzJULOdvDKGHzwoM=; b=H4xnXHXMcaQ7Aehxj1dXfBt1RemeKGaG64p2ISkA/I0PoM63Ist2rxN7oiUB5gTp1Q YdaUOB1xrUGlG2pB5cvc7QoWn/cMkuF5xLa9cMyDunQOsDUXn532GChEkmmuoTrWWbMl KD4jMIzMH1mfU5b7TfOkAJByci+ltRSbMq2Ub6+joxa5/AX965HHastfVgBkY8j7EH07 7VQHcUeHFEA7//44bYgZIGyW0h+z2PSuDsEEVFLU5+a9gT0hr0VseCvOXg9gaBdKhtIV sff+724+CEM29G47djJA8MThE1VnSbfXbDGqbz1H2xignpUV/bftVbTJRNaqYqkyaAl/ /UcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741001496; x=1741606296; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QRbeVD92omOXPkqtwMRC9gBsAE4nzJULOdvDKGHzwoM=; b=mpvgioWBYCZxNCdc7nZPYaghX26Hbhv6SncdoJD7fncWzVjyrnxn5iew33bkGsBvQN cmqRPMVkP7nt4B87zBxBe3ObgA1BfNm9QSJ1GrYLd5gNH52xxrDan0bh3XsoAoRGD2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hT2IfOr3b0lcki4DbrDq45M/Fra3PCQLRg2e7d4pV7RiK//821RneoVg== X-Received: by 2002:a2e:a543:0:b0:30b:b0e5:7174 with SMTP id 38308e7fff4ca-30bb0e57614mr23002541fa.2.1741001496041; Mon, 03 Mar 2025 03:31:36 -0800 (PST) Received: from mva-rohm (mobile-access-2e8451-125.dhcp.inet.fi. [46.132.81.125]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30bc661888bsm736491fa.107.2025.03.03.03.31.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Mar 2025 03:31:33 -0800 (PST) Date: Mon, 3 Mar 2025 13:31:28 +0200 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matti Vaittinen , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 01/10] dt-bindings: ROHM BD79124 ADC/GPO Message-ID: <12f09edd6c036c78f803e530f3f8f0011527efdb.1740993491.git.mazziesaccount@gmail.com> References: Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Add binding document for the ROHM BD79124 ADC / GPO. ROHM BD79124 is a 8-channel, 12-bit ADC. The input pins can also be used as general purpose outputs. Signed-off-by: Matti Vaittinen Reviewed-by: Conor Dooley --- Revision history: v3 => - No changes v2 => v3: - Restrict channel numbers to 0-7 as suggested by Conor RFC v1 => v2: - drop MFD and represent directly as ADC - drop pinmux and treat all non ADC channel pins as GPOs --- .../bindings/iio/adc/rohm,bd79124.yaml | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/rohm,bd79124.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/rohm,bd79124.yaml b/Documentation/devicetree/bindings/iio/adc/rohm,bd79124.yaml new file mode 100644 index 000000000000..503285823376 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/rohm,bd79124.yaml @@ -0,0 +1,114 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/rohm,bd79124.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ROHM BD79124 ADC/GPO + +maintainers: + - Matti Vaittinen + +description: | + The ROHM BD79124 is a 12-bit, 8-channel, SAR ADC. The ADC supports + an automatic measurement mode, with an alarm interrupt for out-of-window + measurements. ADC input pins can be also configured as general purpose + outputs. + +properties: + compatible: + const: rohm,bd79124 + + reg: + description: + I2C slave address. + maxItems: 1 + + interrupts: + maxItems: 1 + + gpio-controller: true + + "#gpio-cells": + const: 1 + description: + The pin number. + + vdd-supply: true + + iovdd-supply: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^channel@[0-7]+$": + type: object + $ref: /schemas/iio/adc/adc.yaml# + description: Represents ADC channel. + + properties: + reg: + description: AIN pin number + minimum: 0 + maximum: 7 + + required: + - reg + + additionalProperties: false + +required: + - compatible + - reg + - iovdd-supply + - vdd-supply + +additionalProperties: false + +examples: + - | + #include + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + adc: adc@10 { + compatible = "rohm,bd79124"; + reg = <0x10>; + + interrupt-parent = <&gpio1>; + interrupts = <29 8>; + + vdd-supply = <&dummyreg>; + iovdd-supply = <&dummyreg>; + + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + }; + channel@1 { + reg = <1>; + }; + channel@2 { + reg = <2>; + }; + channel@3 { + reg = <3>; + }; + channel@4 { + reg = <4>; + }; + channel@5 { + reg = <5>; + }; + channel@6 { + reg = <6>; + }; + }; + };