From patchwork Mon Feb 24 18:32:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matti Vaittinen X-Patchwork-Id: 13988735 X-Patchwork-Delegate: geert@linux-m68k.org Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 7B695264613; Mon, 24 Feb 2025 18:32:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740421960; cv=none; b=kIVqFqndaqYfpjL+2T1T8CuJAFxhA9o3ov8lx2ual6MRIUZ5M6QZEtPpiAiceVGMgRL+/fgYks0v6eaz2MQAki5C0FH1/2ciKskhQGZhf+k8A845zSk35C4VKMg6gU2pX0dfcsQ0rMIsY5DNxwvoV/cwgKDOd7Fj2Viygn7niyg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740421960; c=relaxed/simple; bh=98uB1rbdWm3A58E80bor3xFULFwAE6GtkDVd4uWUY2w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lJFROk+AX49BHKBFCAEtIUR/NZi5EqFpw6xp6G2FSL478arw8b10FtB3Fja2o/mvFbZusSlScQTbtjsjB/y09bHv4iP7vp7FzWpPllVCiZqY+wWix1h4lXYP0xU5Ftl3vea5Nyxvbd30MWIjksPW4tO6O7LB31D5y59rItMNeKQ= 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=eVdv70sQ; arc=none smtp.client-ip=209.85.167.43 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="eVdv70sQ" Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-54529e15643so5285935e87.1; Mon, 24 Feb 2025 10:32:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740421956; x=1741026756; 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=N39GuLsH/GHnLWfi6A3DaLvaYCvcqGiUvrrDOML07K8=; b=eVdv70sQCN1jkqLwXhLeGG4uLtshEdmrcIswwawv4e+/XZatwc3yxdabR2N59nLgKy hYJ6QlcBNYG5bM9uvEbsNVRo+b2BSWCx9Dk05dyXzP77fkYfz04+3Mqx6NoIFwnfKNXa lbQHIi6Oi5ZRvIeEowJuLxt6KcUyilHozpYbc57JuDK1jrvs2lISlZdFSBU+zl6CxtTW ZPUK/BWgc1JAY85OGfjdWgd9gPBHIInzbWuFIGAVpfboZxK0nHSCoZGHuZ/2gQfXnsId mTRz2Yfun1i1SyBJfgik7UEJ843WiIh6zN1gtwr0udEFNZ+4MYvWhBtpf6soyV22uyUo L+ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740421956; x=1741026756; 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=N39GuLsH/GHnLWfi6A3DaLvaYCvcqGiUvrrDOML07K8=; b=kteTx7xedyVdOS7RLGKVt4ghaVQTysl8ZFkOm8alvpX4G6mhG1we4uZUiUziGPqjSS 9YfvaEimIVM2fXI3UCFY1s/GMjqrCRs3+7UxPMEsWktLFMHHj13+UhsU2wIuxfsNikcV FhzdmlT1aEO3bMidBKDLnf8k/S9xhB6P5Fjw7NbTMi1/7plPgrNlSm0fKSjZkhLYJe6+ ruBPAJgESQ6ZdFEUzbBaIqSQhAG5HatA+3XSARpPXBJ2fM2zlbevuiodqlXPfjrp9Kq+ KvZs5PDQmpG9hCl+uOKzw3UGSYOaWJBiphu6qA7/Gj9ow03gWJgHCvcHBRKf+vKqF+1E kXKg== X-Forwarded-Encrypted: i=1; AJvYcCUpWq0560LEtLPAXovHUgEWZNmY/vvnzueZHW/VpbUM3LZg0HAL+zhVP7JGX/v+Cifv33MRVgFGgol7@vger.kernel.org, AJvYcCVDHL0E4mpQhXh1VSU5vcbH3gonZj/DoqNiUt+DlkxvgQe0FIMaRYQBXSirQ/ZqrRNSLN3bfnEo/bJz@vger.kernel.org, AJvYcCW4YsJZ9qthKJdGAl8aYXyBARfddAsg/GI854zv2uCvep4hr9dWkeOmFYqU6k6kEJbmjtsOm4YTlvlNfWm2@vger.kernel.org, AJvYcCWCT3AS2DA5ktoy/ZYeBvL9bQrRPu6+3B2B3vTSp4SRJAuDt5UgDU7vsXbg5hO1H3mi4/UrsSFoQEBaV8I+AWgCeWU=@vger.kernel.org, AJvYcCWcAuJraHyXtsboQWkrksh3hTEHkxTCQuCI1TTgk5D4F0vPB6FISSGAEiqANyN6i2rWd42YaZBSJyhuSw==@vger.kernel.org X-Gm-Message-State: AOJu0YzG8ToiI911YIKYIh/CeCJ+CoOhJKCAKDTPZL6Avifu9sjfcwUn V4RBOvmblhVNw034V3kvUOSpBfYzAy0S8RUwg6siJuB/Pp9yxaj1 X-Gm-Gg: ASbGnctZyiC0PYGZgVelGK3rt6Ngq0IHtibeVArAdBtTlAbJOzd9N8PtIJ6t7xsrdQT p2or8PBjzem1aE8yY25k/8mhUzu3z/DjBr8oMKWT6SVAo+5ONirXIZbK/6egavX5Zcffa7r+chw /pC0XQ8hdNry7qplYevUsxVjv8cYt+VkKy//ksIwNBua7TSRbOAZVsxZKPK6IfVk8VEsQo9X+jr Ui+GDUdTPctQ4GB1mBayxr+DZJsaBlkutGamErZ/kshijYA6ny2fCcgGG8F9I+yJOOKrraEuKjW qTkYKy+PO6wkzbUkq6AKCK+pOUYKmKSA X-Google-Smtp-Source: AGHT+IGuoaXIvmZgefmGuVB5f6nZE8zpUKpcTq1FcueeKygwj6PXc2F3VGYVqvK8LafWdWjrrE8P6g== X-Received: by 2002:a05:6512:159b:b0:545:fdd:9ef4 with SMTP id 2adb3069b0e04-54838c5e1bfmr4544720e87.8.1740421956169; Mon, 24 Feb 2025 10:32:36 -0800 (PST) Received: from mva-rohm ([2a10:a5c0:800d:dd00:8fdf:935a:2c85:d703]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54771f058casm1259809e87.188.2025.02.24.10.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2025 10:32:34 -0800 (PST) Date: Mon, 24 Feb 2025 20:32:29 +0200 From: Matti Vaittinen To: Matti Vaittinen , Matti Vaittinen Cc: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Matti Vaittinen , Lad Prabhakar , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Hugo Villeneuve , Nuno Sa , David Lechner , Javier Carrasco , Guillaume Stols , Olivier Moysan , Dumitru Ceclan , Trevor Gamblin , Matteo Martelli , Alisa-Dariana Roman , Ramona Alexandra Nechita , AngeloGioacchino Del Regno , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH v4 01/10] dt-bindings: ROHM BD79124 ADC/GPO Message-ID: <4d390ca96434a8ee35c0c850cfe4fd49e99db653.1740421248.git.mazziesaccount@gmail.com> References: Precedence: bulk X-Mailing-List: linux-renesas-soc@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: 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>; + }; + }; + };