From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Biju Das <biju.das.jz@bp.renesas.com>,
Chris Brandt <Chris.Brandt@renesas.com>,
"andi.shyti@kernel.org" <andi.shyti@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"geert+renesas@glider.be" <geert+renesas@glider.be>,
"magnus.damm@gmail.com" <magnus.damm@gmail.com>,
"mturquette@baylibre.com" <mturquette@baylibre.com>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"wsa+renesas@sang-engineering.com"
<wsa+renesas@sang-engineering.com>
Cc: "linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 08/12] dt-bindings: i2c: renesas,riic: Document the R9A08G045 support
Date: Fri, 21 Jun 2024 17:59:21 +0300 [thread overview]
Message-ID: <86843e15-6791-4214-8eca-720142820973@tuxon.dev> (raw)
In-Reply-To: <TY3PR01MB113462C6C427DD4581086430D86C92@TY3PR01MB11346.jpnprd01.prod.outlook.com>
On 21.06.2024 17:37, Biju Das wrote:
>
>
>> -----Original Message-----
>> From: claudiu beznea <claudiu.beznea@tuxon.dev>
>> Sent: Friday, June 21, 2024 3:31 PM
>> To: Biju Das <biju.das.jz@bp.renesas.com>; Chris Brandt <Chris.Brandt@renesas.com>;
>> andi.shyti@kernel.org; robh@kernel.org; krzk+dt@kernel.org; conor+dt@kernel.org;
>> geert+renesas@glider.be; magnus.damm@gmail.com; mturquette@baylibre.com; sboyd@kernel.org;
>> p.zabel@pengutronix.de; wsa+renesas@sang-engineering.com
>> Cc: linux-renesas-soc@vger.kernel.org; linux-i2c@vger.kernel.org; devicetree@vger.kernel.org;
>> linux-kernel@vger.kernel.org; linux-clk@vger.kernel.org; Claudiu Beznea
>> <claudiu.beznea.uj@bp.renesas.com>
>> Subject: Re: [PATCH 08/12] dt-bindings: i2c: renesas,riic: Document the R9A08G045 support
>>
>>
>>
>> On 21.06.2024 17:06, Biju Das wrote:
>>> Hi Claudiu,
>>>
>>>> -----Original Message-----
>>>> From: claudiu beznea <claudiu.beznea@tuxon.dev>
>>>> Sent: Friday, June 21, 2024 2:30 PM
>>>> Subject: Re: [PATCH 08/12] dt-bindings: i2c: renesas,riic: Document
>>>> the R9A08G045 support
>>>>
>>>>
>>>>
>>>> On 21.06.2024 16:10, Biju Das wrote:
>>>>>
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: claudiu beznea <claudiu.beznea@tuxon.dev>
>>>>>> Sent: Friday, June 21, 2024 2:06 PM
>>>>> Subject: Re: [PATCH 08/12] dt-bindings: i2c: renesas,riic: Document
>>>>> the R9A08G045 support
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 21.06.2024 15:56, Biju Das wrote:
>>>>>>>
>>>>>>> Hi claudiu,
>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: claudiu beznea <claudiu.beznea@tuxon.dev>
>>>>>>>> Sent: Friday, June 21, 2024 1:55 PM
>>>>>>>> Subject: Re: [PATCH 08/12] dt-bindings: i2c: renesas,riic:
>>>>>>>> Document the R9A08G045 support
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 21.06.2024 15:34, Biju Das wrote:
>>>>>>>>> Hi Claudiu,
>>>>>>>>>
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: Claudiu <claudiu.beznea@tuxon.dev>
>>>>>>>>>> Sent: Friday, June 21, 2024 12:23 PM
>>>>>>>>>> Subject: [PATCH 08/12] dt-bindings: i2c: renesas,riic: Document
>>>>>>>>>> the
>>>>>>>>>> R9A08G045 support
>>>>>>>>>>
>>>>>>>>>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>>>>>>>>
>>>>>>>>>> Document the Renesas RZ/G3S (R9A08G045) RIIC IP. This is
>>>>>>>>>> compatible with the version available on Renesas RZ/V2H
>>>>>>>>>> (R9A09G075). Most of the IP variants that the RIIC driver is
>>>>>>>>>> working with supports fast mode
>>>> plus.
>>>>>>>>>> However, it happens that on the same SoC to have IP
>>>>>>>>>> instatiations that support fast mode plus as well as IP
>>>>>>>>>> instantiation that doesn't support it. For this, introduced the renesas,riic-no-fast-
>> mode-plus property.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Claudiu Beznea
>>>>>>>>>> <claudiu.beznea.uj@bp.renesas.com>
>>>>>>>>>> ---
>>>>>>>>>> Documentation/devicetree/bindings/i2c/renesas,riic.yaml | 8
>>>>>>>>>> ++++++++
>>>>>>>>>> 1 file changed, 8 insertions(+)
>>>>>>>>>>
>>>>>>>>>> diff --git
>>>>>>>>>> a/Documentation/devicetree/bindings/i2c/renesas,riic.yaml
>>>>>>>>>> b/Documentation/devicetree/bindings/i2c/renesas,riic.yaml
>>>>>>>>>> index 91ecf17b7a81..c0964edbca69 100644
>>>>>>>>>> --- a/Documentation/devicetree/bindings/i2c/renesas,riic.yaml
>>>>>>>>>> +++ b/Documentation/devicetree/bindings/i2c/renesas,riic.yaml
>>>>>>>>>> @@ -25,6 +25,10 @@ properties:
>>>>>>>>>> - renesas,riic-r9a07g054 # RZ/V2L
>>>>>>>>>> - const: renesas,riic-rz # RZ/A or RZ/G2L
>>>>>>>>>>
>>>>>>>>>> + - items:
>>>>>>>>>> + - const: renesas,riic-r9a08g045 # RZ/G3S
>>>>>>>>>> + - const: renesas,riic-r9a09g057
>>>>>>>>>> +
>>>>>>>>>> - const: renesas,riic-r9a09g057 # RZ/V2H(P)
>>>>>>>>>>
>>>>>>>>>> reg:
>>>>>>>>>> @@ -66,6 +70,10 @@ properties:
>>>>>>>>>> resets:
>>>>>>>>>> maxItems: 1
>>>>>>>>>>
>>>>>>>>>> + renesas,riic-no-fast-mode-plus:
>>>>>>>>>> + description: specifies if fast mode plus is not supported
>>>>>>>>>> + type: Boolean
>>>>>>>>>
>>>>>>>>> Can't this info, as part of device data?? Based on frequency and
>>>>>>>>> device data is enough to derive this info??
>>>>>>>>
>>>>>>>> We can't rely completely on device data because on RZ/G3S we have
>>>>>>>> 2 RIIC channels that support fast mode plus and 2 that doesn't support it.
>>>>>>>
>>>>>>> Can't array of bits for this channels won't help??
>>>>>>
>>>>>> Can you give an example? I'm not sure I understand how you would
>>>>>> prefer me to use the array of bits.
>>>>>
>>>>> struct riic_of_data {
>>>>> u8 regs[RIIC_REG_END];
>>>>> u16 fast_mode_info info; /* 1 means fast mode plus supported,
>>>>> starting with channel 0*/ };
>>>>>
>>>>> .info = 0x3, means channel 0 and 1 has fast mode plus supported
>>>>> .info = 0x0, none of the channel supported fast mode plus.
>>>>
>>>> If I understand the proposal correctly, a match b/w struct
>>>> riic_of_data::info bit + frequency and the nodes in device tree is
>>>> still needed, right? As the RZ/G3S RIIC channels are using the same compatible.
>>>> W/o a match how I cannot detect in the driver who is, e.g., channel 1
>>>> that supports FMP w/o hardcoding some RIIC channel data in the driver (e.g. RIIC channel
>> address)?
>>>
>>> bit array gives the capability info on various channels.
>>>
>>> If someone define fast_mode_plus frequency in DT node and channel is
>>> not fast_mode_plus(from the capability info) then you should return error.
>>>
>>> Here you need to use SoC specific compatible as each SoC has different capabilities.
>>
>> And I would add, as it is in this case: there are multiple instantiation of the RIIC in RZ/G3S SoC.
>> RIIC 0 and 1 supports FMP, RIIC 2 and 3 does not.
>>
>> For all RIICs (0, 1, 2, 3) we use the same compatible (as all are part of the same SoC). How to do
>> the match b/w DT RIIC channel and driver with the solution you propose w/o hardcoding some RIIC
>> channel data in the driver?
>
> .info =0x3, so you know from the capability, for this soc, bus 0 and 1 supports FMP.
I understand this part. What I don't understand is: when probing the driver
for, e.g., bus 0, how do I know I probe the driver for bus 0? compatible is
the same for all buses.
>
> Cheers,
> Biju
>
>
>>
>>>
>>> Cheers,
>>> Biju
>>>
>>>
>>>>
>>>> Also, for future SoCs that will suffer the same symptom but for
>>>> different channels (and channels with different addresses) the driver
>>>> will have to be adapted to match b/w the channel bit in struct riic_of_data::info and channel
>> node from DT.
>>>>
>>>>>
>>>>> Cheers,
>>>>> Biju
next prev parent reply other threads:[~2024-06-21 14:59 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 11:22 [PATCH 00/12] i2c: riic: Add support for Renesas RZ/G3S Claudiu
2024-06-21 11:22 ` [PATCH 01/12] clk: renesas: r9a08g045: Add clock, reset and power domain support for I2C Claudiu
2024-06-21 11:22 ` [PATCH 02/12] i2c: riic: Use temporary variable for struct device Claudiu
2024-06-21 11:22 ` [PATCH 03/12] i2c: riic: Call pm_runtime_get_sync() when need to access registers Claudiu
2024-06-21 11:22 ` [PATCH 04/12] i2c: riic: Use pm_runtime_resume_and_get() Claudiu
2024-06-21 12:24 ` Biju Das
2024-06-21 12:49 ` claudiu beznea
2024-06-21 11:22 ` [PATCH 05/12] i2c: riic: Enable runtime PM autosuspend support Claudiu
2024-06-21 11:22 ` [PATCH 06/12] i2c: riic: Add suspend/resume support Claudiu
2024-06-21 12:30 ` Biju Das
2024-06-21 12:51 ` claudiu beznea
2024-06-21 11:22 ` [PATCH 07/12] i2c: riic: Define individual arrays to describe the register offsets Claudiu
2024-06-21 11:22 ` [PATCH 08/12] dt-bindings: i2c: renesas,riic: Document the R9A08G045 support Claudiu
2024-06-21 12:34 ` Biju Das
2024-06-21 12:54 ` claudiu beznea
2024-06-21 12:56 ` Biju Das
2024-06-21 13:06 ` claudiu beznea
2024-06-21 13:10 ` Biju Das
2024-06-21 13:29 ` claudiu beznea
2024-06-21 14:06 ` Biju Das
2024-06-21 14:30 ` claudiu beznea
2024-06-21 14:37 ` Biju Das
2024-06-21 14:59 ` claudiu beznea [this message]
2024-06-21 15:04 ` Biju Das
2024-06-22 8:08 ` Biju Das
2024-06-21 14:15 ` Conor Dooley
2024-06-24 15:40 ` Geert Uytterhoeven
2024-06-25 5:07 ` claudiu beznea
2024-06-21 11:23 ` [PATCH 09/12] i2c: riic: Add support for fast mode plus Claudiu
2024-06-21 11:23 ` [PATCH 10/12] arm64: dts: renesas: r9a08g045: Add I2C nodes Claudiu
2024-06-21 11:23 ` [PATCH 11/12] arm64: dts: renesas: rzg3s-smarc: Enable i2c0 node Claudiu
2024-06-21 11:23 ` [PATCH 12/12] arm64: dts: renesas: rzg3s-smarc-som: Enable i2c1 node Claudiu
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=86843e15-6791-4214-8eca-720142820973@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=Chris.Brandt@renesas.com \
--cc=andi.shyti@kernel.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mturquette@baylibre.com \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox