From: Rob Herring <robh@kernel.org>
To: Arun Iyengar <aiyengar1990@gmail.com>
Cc: "Andi Shyti" <andi.shyti@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Björn Ardö" <bjorn.ardo@axis.com>,
linux-i2c@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: i2c: Add the slave EEPROM backend
Date: Tue, 1 Dec 2026 14:38:08 -0600 [thread overview]
Message-ID: <20261201203808.GA3762312-robh@kernel.org> (raw)
In-Reply-To: <20261120-i2c-slave-eeprom-of-match-v2-1-0444790a0b76@gmail.com>
On Fri, Nov 20, 2026 at 04:32:17AM +0000, Arun Iyengar wrote:
> A node with one of the i2c-slave-eeprom names as compatible and
> I2C_OWN_SLAVE_ADDRESS in reg already binds to the backend, because the
> I2C core names the client after the compatible and matches the I2C id.
> The driver also reads firmware-name. None of this is documented.
>
> Document the names without a vendor prefix, as the driver and
> Documentation/i2c spell them (ipmb-dev and mctp-i2c-controller are
> unprefixed too).
>
> Signed-off-by: Arun Iyengar <aiyengar1990@gmail.com>
> ---
> .../devicetree/bindings/i2c/slave-eeprom.yaml | 59 ++++++++++++++++++++++
> 1 file changed, 59 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/i2c/slave-eeprom.yaml b/Documentation/devicetree/bindings/i2c/slave-eeprom.yaml
> new file mode 100644
> index 000000000000..b7a6e6653a64
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/slave-eeprom.yaml
> @@ -0,0 +1,59 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/slave-eeprom.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: I2C target EEPROM backend
> +
> +maintainers:
> + - Arun Iyengar <aiyengar1990@gmail.com>
> +
> +description:
> + The I2C controller answers on its own address as a target and behaves
> + like a 24Cxx EEPROM towards the other controllers on the bus. The
> + compatible selects the EEPROM type that is simulated. The "ro" variants
> + ignore writes from the bus.
> +
> +properties:
> + compatible:
> + enum:
> + - slave-24c02
> + - slave-24c02ro
> + - slave-24c32
> + - slave-24c32ro
> + - slave-24c64
> + - slave-24c64ro
> + - slave-24c512
> + - slave-24c512ro
Please avoid further uses of 'slave'.
For the actual devices, we have 'read-only' property IIRC. Perhaps a
separate property is better here.
> +
> + reg:
> + maxItems: 1
> + description:
> + Own address of the controller on the bus. The I2C_OWN_SLAVE_ADDRESS
> + flag must be set.
The flag can be expressed with constraints on entry.
> +
> + firmware-name:
> + maxItems: 1
> + description:
> + File with the initial content. Without it all bytes start as 0xff.
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/i2c/i2c.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + eeprom@64 {
> + compatible = "slave-24c02";
> + reg = <(0x64 | I2C_OWN_SLAVE_ADDRESS)>;
> + };
> + };
>
> --
> 2.55.0
>
next prev parent reply other threads:[~2026-12-01 20:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 4:32 [PATCH v2 0/2] i2c: slave-eeprom: DT binding and OF match table for module autoload Arun Iyengar via B4 Relay
2026-11-20 4:32 ` Arun Iyengar
2026-11-20 4:32 ` [PATCH v2 1/2] dt-bindings: i2c: Add the slave EEPROM backend Arun Iyengar via B4 Relay
2026-11-20 4:32 ` Arun Iyengar
2026-12-01 20:38 ` Rob Herring [this message]
2026-11-20 4:32 ` [PATCH v2 2/2] i2c: slave-eeprom: Add an OF match table for module autoload Arun Iyengar via B4 Relay
2026-11-20 4:32 ` Arun Iyengar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261201203808.GA3762312-robh@kernel.org \
--to=robh@kernel.org \
--cc=aiyengar1990@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=bjorn.ardo@axis.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=u.kleine-koenig@baylibre.com \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.