* [RFC] OMAP DT i2c aliases
@ 2014-06-01 14:28 Ivaylo Dimitrov
2014-06-02 15:42 ` Nishanth Menon
0 siblings, 1 reply; 5+ messages in thread
From: Ivaylo Dimitrov @ 2014-06-01 14:28 UTC (permalink / raw)
To: Nishanth Menon
Cc: linux-omap@vger.kernel.org, Pali Rohár, Pavel Machek, sre
Hi,
patch https://lkml.org/lkml/2013/10/16/744 fixes DT i2c bus ids in case
of deferred probe and assigns id 0,1 and 2 for i2c buses 1,2 and 3.
Unfortunately, this breaks Maemo userspace on N900, where board code (in
case of legacy boot) assigns ids 1, 2 and 3, but with DT boot ids are
0,1 and 2. I've already send a patch https://lkml.org/lkml/2014/6/1/49
that will allow me to fix that from board .dts, but I was wondering if
it is the correct way, or ids should be changed in omap3.dtsi for all
omap devices.
Regards,
Ivo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] OMAP DT i2c aliases
2014-06-01 14:28 [RFC] OMAP DT i2c aliases Ivaylo Dimitrov
@ 2014-06-02 15:42 ` Nishanth Menon
2014-06-02 16:03 ` Ivaylo Dimitrov
0 siblings, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2014-06-02 15:42 UTC (permalink / raw)
To: Ivaylo Dimitrov
Cc: linux-omap@vger.kernel.org, Pali Rohár, Pavel Machek, sre
On 06/01/2014 09:28 AM, Ivaylo Dimitrov wrote:
> Hi,
>
> patch https://lkml.org/lkml/2013/10/16/744 fixes DT i2c bus ids in case
> of deferred probe and assigns id 0,1 and 2 for i2c buses 1,2 and 3.
> Unfortunately, this breaks Maemo userspace on N900, where board code (in
> case of legacy boot) assigns ids 1, 2 and 3, but with DT boot ids are
ughh.. missed that :(
> 0,1 and 2. I've already send a patch https://lkml.org/lkml/2014/6/1/49
> that will allow me to fix that from board .dts, but I was wondering if
> it is the correct way, or ids should be changed in omap3.dtsi for all
> omap devices.
Should'nt we retain 0,1,2 as indexing to make this consistent for all
SoCs?
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] OMAP DT i2c aliases
2014-06-02 15:42 ` Nishanth Menon
@ 2014-06-02 16:03 ` Ivaylo Dimitrov
2014-06-02 16:19 ` Nishanth Menon
0 siblings, 1 reply; 5+ messages in thread
From: Ivaylo Dimitrov @ 2014-06-02 16:03 UTC (permalink / raw)
To: Nishanth Menon
Cc: linux-omap@vger.kernel.org, Pali Rohár, Pavel Machek, sre
On 2.06.2014 18:42, Nishanth Menon wrote:
> On 06/01/2014 09:28 AM, Ivaylo Dimitrov wrote:
>> Hi,
>>
>> patch https://lkml.org/lkml/2013/10/16/744 fixes DT i2c bus ids in case
>> of deferred probe and assigns id 0,1 and 2 for i2c buses 1,2 and 3.
>> Unfortunately, this breaks Maemo userspace on N900, where board code (in
>> case of legacy boot) assigns ids 1, 2 and 3, but with DT boot ids are
>
> ughh.. missed that :(
>
>> 0,1 and 2. I've already send a patch https://lkml.org/lkml/2014/6/1/49
>> that will allow me to fix that from board .dts, but I was wondering if
>> it is the correct way, or ids should be changed in omap3.dtsi for all
>> omap devices.
>
> Should'nt we retain 0,1,2 as indexing to make this consistent for all
> SoCs?
>
>
I think this is the most sane thing, esp if the "alias replace" patch
gets accepted(thus allowing us to workaround the problems on N900 and
N9/50), however I wanted to hear from you on the matter. Esp that
indexing is different with legacy boot compared to DT boot.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] OMAP DT i2c aliases
2014-06-02 16:03 ` Ivaylo Dimitrov
@ 2014-06-02 16:19 ` Nishanth Menon
2014-06-02 16:44 ` Ivaylo Dimitrov
0 siblings, 1 reply; 5+ messages in thread
From: Nishanth Menon @ 2014-06-02 16:19 UTC (permalink / raw)
To: Ivaylo Dimitrov
Cc: linux-omap@vger.kernel.org, Pali Rohár, Pavel Machek, sre
On Mon 02 Jun 2014 11:03:24 AM CDT, Ivaylo Dimitrov wrote:
[...]
>>> 0,1 and 2. I've already send a patch https://lkml.org/lkml/2014/6/1/49
>>> that will allow me to fix that from board .dts, but I was wondering if
>>> it is the correct way, or ids should be changed in omap3.dtsi for all
>>> omap devices.
>>
>> Should'nt we retain 0,1,2 as indexing to make this consistent for all
>> SoCs?
>>
>>
>
> I think this is the most sane thing, esp if the "alias replace" patch
> gets accepted(thus allowing us to workaround the problems on N900 and
> N9/50), however I wanted to hear from you on the matter. Esp that
> indexing is different with legacy boot compared to DT boot.
I think that slipped my check list unfortunately. :( But then, if we
think that it is just n900 that is impacted, then I wonder if we can
override the alias? just wondering..
--
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC] OMAP DT i2c aliases
2014-06-02 16:19 ` Nishanth Menon
@ 2014-06-02 16:44 ` Ivaylo Dimitrov
0 siblings, 0 replies; 5+ messages in thread
From: Ivaylo Dimitrov @ 2014-06-02 16:44 UTC (permalink / raw)
To: Nishanth Menon
Cc: linux-omap@vger.kernel.org, Pali Rohár, Pavel Machek, sre
On 2.06.2014 19:19, Nishanth Menon wrote:
>
> I think that slipped my check list unfortunately. :( But then, if we
> think that it is just n900 that is impacted, then I wonder if we can
> override the alias? just wondering..
>
That https://lkml.org/lkml/2014/6/1/49 patch will allow such override, I
tested it on N900 with Fremantle and it works fine. Ofc I had to add
aliases {
i2c1 = &i2c1;
i2c2 = &i2c2;
i2c3 = &i2c3;
};
to omap3-n900.dts (while keeping omap3.dtsi intact) for it to work.
I checked in some Nemo N9/N950 adaptation kernel and it seems those will
be broken too(and I bet it is the same in stock Nokia N9/50 kernels):
static void __init rm680_i2c_init(void)
{
omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB,
TWL_COMMON_REGULATOR_VDAC |
TWL_COMMON_REGULATOR_VPLL2);
omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
omap_register_i2c_bus(2, 400, rm696_peripherals_i2c_board_info_2,
ARRAY_SIZE(rm696_peripherals_i2c_board_info_2));
omap_register_i2c_bus(3, 400, rm696_peripherals_i2c_board_info_3,
ARRAY_SIZE(rm696_peripherals_i2c_board_info_3));
}
Again 1,2 and 3 for bus indexes just like on N900.
Anyway, I am fine with the alias override. If the patch makes it to the
upstream :)
Regards,
Ivo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-06-02 16:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-01 14:28 [RFC] OMAP DT i2c aliases Ivaylo Dimitrov
2014-06-02 15:42 ` Nishanth Menon
2014-06-02 16:03 ` Ivaylo Dimitrov
2014-06-02 16:19 ` Nishanth Menon
2014-06-02 16:44 ` Ivaylo Dimitrov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).