lkml.org 
[lkml]   [2011]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] netdev/of/phy: Add MDIO bus multiplexer support.
On 09/28/2011 10:32 AM, Michał Mirosław wrote:
> W dniu 28 września 2011 18:51 użytkownik David Daney
> <david.daney@cavium.com> napisał:
>> On 09/28/2011 12:25 AM, Michał Mirosław wrote:
>>>
>>> 2011/9/28 David Daney<david.daney@cavium.com>:
>>> [...]
>>>>
>>>> +Example :
>>>> +
>>>> + /* The parent MDIO bus. */
>>>> + smi1: mdio@1180000001900 {
>>>> + compatible = "cavium,octeon-3860-mdio";
>>>> + #address-cells =<1>;
>>>> + #size-cells =<0>;
>>>> + reg =<0x11800 0x00001900 0x0 0x40>;
>>>> + };
>>>> +
>>>> + /*
>>>> + An NXP sn74cbtlv3253 dual 1-of-4 switch controlled by a
>>>> + pair of GPIO lines. Child busses 2 and 3 populated with 4
>>>> + PHYs each.
>>>> + */
>>>> + mdio-mux {
>>>> + compatible = "cavium,mdio-mux-sn74cbtlv3253",
>>>> "cavium,mdio-mux";
>>>> + gpios =<&gpio1 3 0>,<&gpio1 4 0>;
>>>> + mdio-parent-bus =<&smi1>;
>>>> + #address-cells =<1>;
>>>> + #size-cells =<0>;
>>>
>>> This should probably have 'compatible = "nxp,sn74cbtlv3253";' here.
>>>
>>
>> No, the sn74cbtlv3253 is a general purpose part that could be used to
>> multiplex anything (I2C, SPI, random analog signals, etc.). Only when it is
>> in the "cavium,mdio-mux-sn74cbtlv3253" configuration is it an MDIO bus
>> multiplexer.
>
> This should use some generic name then. 'mdio-mux-gpio' or something.
> There's no point in introducing chip's model for a gate-like discrete
> device.

That could be. We could define an "mdio-mux-gpio" as something that
selects the child bus based on the binary encoded value presented on the
GPIO lines.

I will regenerate the patch set with this in mind. Note that the only
part of this patch that will change is this mdio-mux.txt file, no actual
code is affected. In patch 3/3 I will add "mdio-mux-gpio" to the
.of_match_table.

Thanks,
David Daney
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-09-28 19:45    [W:0.035 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site