All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Eugen.Hristev@microchip.com
Cc: hs@denx.de, u-boot@lists.denx.de
Subject: Re: [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c
Date: Wed, 05 Jan 2022 11:49:33 +0100	[thread overview]
Message-ID: <908a94ecb12c0177b2b2f903daf298b4@walle.cc> (raw)
In-Reply-To: <08d16a59-e1f5-6e1e-1392-31f5e0cafb80@microchip.com>

Am 2022-01-05 11:37, schrieb Eugen.Hristev@microchip.com:
> On 1/5/22 12:04 PM, Michael Walle wrote:
>> Hi,
>> 
>>> Add compatible and data platform struct for sama7g5 SoC.
>>> 
>>> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
>>> ---
>>>   drivers/i2c/at91_i2c.c | 6 ++++++
>>>   1 file changed, 6 insertions(+)
>>> 
>>> diff --git a/drivers/i2c/at91_i2c.c b/drivers/i2c/at91_i2c.c
>>> index 6b4c0e4804..400a3786ca 100644
>>> --- a/drivers/i2c/at91_i2c.c
>>> +++ b/drivers/i2c/at91_i2c.c
>>> @@ -305,6 +305,11 @@ static const struct at91_i2c_pdata 
>>> sama5d2_config = {
>>>        .clk_offset = 3,
>>>   };
>>> 
>>> +static const struct at91_i2c_pdata sama7g5_config = {
>>> +     .clk_max_div = 7,
>>> +     .clk_offset = 3,
>>> +};
>>> +
>>>   static const struct udevice_id at91_i2c_ids[] = {
>>>   { .compatible = "atmel,at91rm9200-i2c", .data = 
>>> (long)&at91rm9200_config },
>>>   { .compatible = "atmel,at91sam9260-i2c", .data = 
>>> (long)&at91sam9260_config },
>>> @@ -314,6 +319,7 @@ static const struct udevice_id at91_i2c_ids[] = {
>>>   { .compatible = "atmel,at91sam9x5-i2c", .data = 
>>> (long)&at91sam9x5_config },
>>>   { .compatible = "atmel,sama5d4-i2c", .data = (long)&sama5d4_config 
>>> },
>>>   { .compatible = "atmel,sama5d2-i2c", .data = (long)&sama5d2_config 
>>> },
>>> +{ .compatible = "microchip,sama7g5-i2c", .data = 
>>> (long)&sama7g5_config },
>> 
>> I see that this compatible string is is also used in the linux
>> device tree, but there is no dt binding for it in linux. Could you
>> add it, so the binding is approved by Rob?
> 
> I can, for sure, but the current binding format is txt. I am not sure 
> if
> we have to convert to yaml first, in which case it would be a little
> more difficult than just adding a new compatible string.
> The current DT node in Linux is also compatible with sam9x60, and this
> string is already in the Linux binding file.
> I could add the sam9x60 compatible instead, and it will still work, as
> 9x60 type of i2c is the same as in sama7g5.
> You think this option would be better for now ?

It's at least better than adding an undocumented string. But TBH,
this looks like "what can I do to avoid converting the dt binding
to yaml". Which eventually has to be done anyway, so now might be
a good opportunity for that :)

But looking at sama7g5_config above again, will that also be the
correct values for the generic sam9x60?

-michael

  reply	other threads:[~2022-01-05 10:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04 18:43 [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Eugen Hristev
2022-01-04 18:43 ` [PATCH 2/4] ARM: dts: at91: sama7g5: add flx8 and required nodes Eugen Hristev
2022-01-04 18:43 ` [PATCH 3/4] ARM: dts: at91: sama7g5ek: move eeproms to flexcom8 Eugen Hristev
2022-01-04 18:43 ` [PATCH 4/4] configs: at91: sama7g5ek: enable CONFIG_PHANDLE_CHECK_SEQ Eugen Hristev
2022-01-05 10:04 ` [PATCH 1/4] i2c: at91: add compatible with microchip,sama7g5-i2c Michael Walle
2022-01-05 10:37   ` Eugen.Hristev
2022-01-05 10:49     ` Michael Walle [this message]
2022-01-05 11:00       ` Eugen.Hristev
2022-01-17  9:20 ` Eugen.Hristev

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=908a94ecb12c0177b2b2f903daf298b4@walle.cc \
    --to=michael@walle.cc \
    --cc=Eugen.Hristev@microchip.com \
    --cc=hs@denx.de \
    --cc=u-boot@lists.denx.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.