From: Jonas Jelonek <jelonek.jonas@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, linux-i2c@vger.kernel.org
Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>,
Markus Stockhausen <markus.stockhausen@gmx.de>
Subject: Re: [PATCH 3/3] dt-bindings: i2c: realtek,rtl9301-i2c: extend for RTL9310 support
Date: Wed, 2 Jul 2025 09:34:59 +0200 [thread overview]
Message-ID: <3b357cd4-017e-43d9-a662-4f26fb9b8d68@gmail.com> (raw)
In-Reply-To: <8d671dcc-bcc2-4b1d-9063-f7d69d52d29d@kernel.org>
Hi Krzysztof,
thanks for taking the time to deal with this.
On 02.07.2025 08:11, Krzysztof Kozlowski wrote:
> On 01/07/2025 16:31, Jonas Jelonek wrote:
>> For the purpose:
>> RTL9310 changed the register layout compared to RTL9300. Activating
>> the SCL line is done by setting bit 12 for master 1 and bit 13 for master 2
>> in a global register which is located before the master-specific registers.
>> Thus, the driver needs to know which master (1 or 2) it is currently doing
>> something for. That is what this property is intended to be used, naming
>> to-be-discussed.
> There is no global register space here and no syscon, so I don't
> understand how can you access it, especially when they are located
> BEFORE your address space.
Probably this explanation is still missing some background and 'global'
was misleading here. The I2C controllers are part of Realtek switchcore.
This is defined as a syscon in DTS and the I2C controller has to be
defined as a child-node of it. (see
https://elixir.bootlin.com/linux/v6.15.1/source/arch/mips/boot/dts/realtek/rtl930x.dtsi#L45-L72)
The driver takes its regmap from this syscon node as the I2C registers
are within that switchcore address space.
Address layout in RTL9310 is (addresses relative to parent syscon node):
0x1004 - 0x100b I2C 'global' registers
0x100c - 0x1023 I2C master 1 registers
0x1024 - 0x103b I2C master 2 registers
The driver has to access both the registers for the master that it is
configuring AND the 'global' ones (for SCL + SDA activation).
For upstream RTL9300 it's similar with the difference of having SCL
selection in the master-specific registers and the register layout
having the order:
- I2C master 1 registers
- I2C 'global' register
- I2C master 2 registers
> Best regards,
> Krzysztof
Just an idea to discuss regarding the DT compatibles:
I was proposed out of this conversation to use something like
'i2c-otto-mango' ('otto' being the codename for their platform,
'mango' being the codename for the RTL9310 series). Based on, that
technically(!) it doesn't make sense to distinguish between the
variants of the series.
Has this any chance of acceptance, even when I do not mention
specific SoC variants anywhere in my patchset?
Best regards,
Jonas
next prev parent reply other threads:[~2025-07-02 7:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 9:17 [PATCH 0/3] i2c: rework and extend RTL9300 I2C driver Jonas Jelonek
2025-07-01 9:17 ` [PATCH 1/3] i2c: rework RTL9300 I2C controller driver Jonas Jelonek
2025-07-02 0:36 ` Chris Packham
2025-07-01 9:17 ` [PATCH 2/3] i2c: add RTL9310 support to " Jonas Jelonek
2025-07-01 20:14 ` AW: " markus.stockhausen
2025-07-01 9:17 ` [PATCH 3/3] dt-bindings: i2c: realtek,rtl9301-i2c: extend for RTL9310 support Jonas Jelonek
2025-07-01 11:33 ` Krzysztof Kozlowski
2025-07-01 12:34 ` Jonas Jelonek
2025-07-01 13:17 ` Krzysztof Kozlowski
2025-07-01 14:31 ` Jonas Jelonek
2025-07-02 6:11 ` Krzysztof Kozlowski
2025-07-02 7:34 ` Jonas Jelonek [this message]
2025-07-02 7:49 ` Krzysztof Kozlowski
2025-07-02 9:24 ` Jonas Jelonek
2025-07-01 11:35 ` Krzysztof Kozlowski
2025-07-01 12:34 ` Jonas Jelonek
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=3b357cd4-017e-43d9-a662-4f26fb9b8d68@gmail.com \
--to=jelonek.jonas@gmail.com \
--cc=chris.packham@alliedtelesis.co.nz \
--cc=krzk@kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=markus.stockhausen@gmx.de \
/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.