* nested I2C muxes
@ 2017-01-19 18:03 Adrian Fiergolski
2017-01-19 18:34 ` Peter Rosin
0 siblings, 1 reply; 4+ messages in thread
From: Adrian Fiergolski @ 2017-01-19 18:03 UTC (permalink / raw)
To: linux-i2c
Hi,
I haven't found any information regarding support for nested i2c muxes.
Is the below device tree supported by the current driver ?
&i2c0 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c0_default>;
i2cswitch@74 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x74>;
i2c@0 {
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
si570: clock-generator@5d {
#clock-cells = <0>;
compatible = "silabs,si570";
temperature-stability = <50>;
reg = <0x5d>;
factory-fout = <156250000>;
clock-frequency = <148500000>;
};
};
i2c@2 {
#address-cells = <1>;
#size-cells = <0>;
reg = <5>;
i2cswitch_hpc@74 {
compatible = "nxp,pca9548";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x74>;
hpc_caribou_sources_enable@76 {
compatible= "nxp,pca9539";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x76>;
};
};
};
};
};
With such tree I am getting error
[2.173385] i2c i2c-2: of_i2c: invalid addr=0 on
/amba/i2c@e0004000/i2cswitch@74/i2c@2/i2cswitch_hpc@74
Regards,
Adrian Fiergolski
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: nested I2C muxes
2017-01-19 18:03 nested I2C muxes Adrian Fiergolski
@ 2017-01-19 18:34 ` Peter Rosin
2017-01-19 22:50 ` Peter Rosin
0 siblings, 1 reply; 4+ messages in thread
From: Peter Rosin @ 2017-01-19 18:34 UTC (permalink / raw)
To: Adrian Fiergolski, linux-i2c
On 2017-01-19 19:03, Adrian Fiergolski wrote:
> Hi,
>
> I haven't found any information regarding support for nested i2c muxes.
> Is the below device tree supported by the current driver ?
No, it is not since you cannot have two devices with address 0x74
visible at the same time. You would have to set a different address
on one of the muxes using its A0-A2 pins. Then it should work.
Look in Documentation/i2c/i2c-topology for more information.
Cheers,
peda
> &i2c0 {
> status = "okay";
> clock-frequency = <400000>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_i2c0_default>;
>
> i2cswitch@74 {
> compatible = "nxp,pca9548";
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <0x74>;
>
> i2c@0 {
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <0>;
> si570: clock-generator@5d {
> #clock-cells = <0>;
> compatible = "silabs,si570";
> temperature-stability = <50>;
> reg = <0x5d>;
> factory-fout = <156250000>;
> clock-frequency = <148500000>;
> };
> };
>
> i2c@2 {
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <5>;
> i2cswitch_hpc@74 {
> compatible = "nxp,pca9548";
> #address-cells = <1>;
> #size-cells = <0>;
> reg = <0x74>;
> hpc_caribou_sources_enable@76 {
>
> compatible= "nxp,pca9539";
>
> #address-cells = <1>;
>
> #size-cells = <0>;
>
> reg = <0x76>;
> };
> };
>
> };
>
> };
>
> };
>
> With such tree I am getting error
>
> [2.173385] i2c i2c-2: of_i2c: invalid addr=0 on
> /amba/i2c@e0004000/i2cswitch@74/i2c@2/i2cswitch_hpc@74
>
>
> Regards,
>
> Adrian Fiergolski
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: nested I2C muxes
2017-01-19 18:34 ` Peter Rosin
@ 2017-01-19 22:50 ` Peter Rosin
2017-01-20 8:50 ` Adrian Fiergolski
0 siblings, 1 reply; 4+ messages in thread
From: Peter Rosin @ 2017-01-19 22:50 UTC (permalink / raw)
To: Adrian Fiergolski, linux-i2c
On 2017-01-19 19:34, Peter Rosin wrote:
> On 2017-01-19 19:03, Adrian Fiergolski wrote:
>> Hi,
>>
>> I haven't found any information regarding support for nested i2c muxes.
>> Is the below device tree supported by the current driver ?
>
> No, it is not since you cannot have two devices with address 0x74
> visible at the same time. You would have to set a different address
> on one of the muxes using its A0-A2 pins. Then it should work.
>
> Look in Documentation/i2c/i2c-topology for more information.
>
> Cheers,
> peda
>
>> &i2c0 {
>> status = "okay";
>> clock-frequency = <400000>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_i2c0_default>;
>>
>> i2cswitch@74 {
>> compatible = "nxp,pca9548";
>> #address-cells = <1>;
>> #size-cells = <0>;
>> reg = <0x74>;
>>
>> i2c@0 {
>> #address-cells = <1>;
>> #size-cells = <0>;
>> reg = <0>;
>> si570: clock-generator@5d {
>> #clock-cells = <0>;
>> compatible = "silabs,si570";
>> temperature-stability = <50>;
>> reg = <0x5d>;
>> factory-fout = <156250000>;
>> clock-frequency = <148500000>;
>> };
>> };
>>
>> i2c@2 {
>> #address-cells = <1>;
>> #size-cells = <0>;
>> reg = <5>;
Also, this <5> is bogus. It should match the @2 a few lines up.
Cheers,
peda
>> i2cswitch_hpc@74 {
>> compatible = "nxp,pca9548";
>> #address-cells = <1>;
>> #size-cells = <0>;
>> reg = <0x74>;
>> hpc_caribou_sources_enable@76 {
>> compatible= "nxp,pca9539";
>> #address-cells = <1>;
>> #size-cells = <0>;
>> reg = <0x76>;
>> };
>> };
>>
>> };
>>
>> };
>>
>> };
>>
>> With such tree I am getting error
>>
>> [2.173385] i2c i2c-2: of_i2c: invalid addr=0 on
>> /amba/i2c@e0004000/i2cswitch@74/i2c@2/i2cswitch_hpc@74
>>
>>
>> Regards,
>>
>> Adrian Fiergolski
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: nested I2C muxes
2017-01-19 22:50 ` Peter Rosin
@ 2017-01-20 8:50 ` Adrian Fiergolski
0 siblings, 0 replies; 4+ messages in thread
From: Adrian Fiergolski @ 2017-01-20 8:50 UTC (permalink / raw)
To: Peter Rosin, linux-i2c
Hi Peter,
Thank you for your answers.
Yes, the typos you noticed (<5>, the same switch address) , are just
because I didn't prepare an example device tree carefully enough.
I will debug further from where my problem comes from.
Regards,
Adrian
On 19.01.2017 at 23:50, Peter Rosin wrote:
> On 2017-01-19 19:34, Peter Rosin wrote:
>> On 2017-01-19 19:03, Adrian Fiergolski wrote:
>>> Hi,
>>>
>>> I haven't found any information regarding support for nested i2c muxes.
>>> Is the below device tree supported by the current driver ?
>> No, it is not since you cannot have two devices with address 0x74
>> visible at the same time. You would have to set a different address
>> on one of the muxes using its A0-A2 pins. Then it should work.
>>
>> Look in Documentation/i2c/i2c-topology for more information.
>>
>> Cheers,
>> peda
>>
>>> &i2c0 {
>>> status = "okay";
>>> clock-frequency = <400000>;
>>> pinctrl-names = "default";
>>> pinctrl-0 = <&pinctrl_i2c0_default>;
>>>
>>> i2cswitch@74 {
>>> compatible = "nxp,pca9548";
>>> #address-cells = <1>;
>>> #size-cells = <0>;
>>> reg = <0x74>;
>>>
>>> i2c@0 {
>>> #address-cells = <1>;
>>> #size-cells = <0>;
>>> reg = <0>;
>>> si570: clock-generator@5d {
>>> #clock-cells = <0>;
>>> compatible = "silabs,si570";
>>> temperature-stability = <50>;
>>> reg = <0x5d>;
>>> factory-fout = <156250000>;
>>> clock-frequency = <148500000>;
>>> };
>>> };
>>>
>>> i2c@2 {
>>> #address-cells = <1>;
>>> #size-cells = <0>;
>>> reg = <5>;
> Also, this <5> is bogus. It should match the @2 a few lines up.
>
> Cheers,
> peda
>
>>> i2cswitch_hpc@74 {
>>> compatible = "nxp,pca9548";
>>> #address-cells = <1>;
>>> #size-cells = <0>;
>>> reg = <0x74>;
>>> hpc_caribou_sources_enable@76 {
>>> compatible= "nxp,pca9539";
>>> #address-cells = <1>;
>>> #size-cells = <0>;
>>> reg = <0x76>;
>>> };
>>> };
>>>
>>> };
>>>
>>> };
>>>
>>> };
>>>
>>> With such tree I am getting error
>>>
>>> [2.173385] i2c i2c-2: of_i2c: invalid addr=0 on
>>> /amba/i2c@e0004000/i2cswitch@74/i2c@2/i2cswitch_hpc@74
>>>
>>>
>>> Regards,
>>>
>>> Adrian Fiergolski
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-20 8:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-19 18:03 nested I2C muxes Adrian Fiergolski
2017-01-19 18:34 ` Peter Rosin
2017-01-19 22:50 ` Peter Rosin
2017-01-20 8:50 ` Adrian Fiergolski
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).