* [U-Boot] [PATCH] Add support for KSZ8895 switch
@ 2013-08-12 14:48 Christian Gmeiner
2013-08-19 18:35 ` Christian Gmeiner
0 siblings, 1 reply; 3+ messages in thread
From: Christian Gmeiner @ 2013-08-12 14:48 UTC (permalink / raw)
To: u-boot
This patch adds a dump phy driver for the KSZ8895 switch from
Micrel. As the SoC MAC is directly connected to switch no
autonegotiation is needed as the link is always up.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
drivers/net/phy/micrel.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index aa9cbcf..76d6846 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -36,6 +36,36 @@ static struct phy_driver KSZ804_driver = {
.shutdown = &genphy_shutdown,
};
+/**
+ * KSZ8895
+ */
+
+int ksz8895_config(struct phy_device *phydev)
+{
+ /* we are connected directly to the switch without
+ * dedicated PHY. SCONF1 == 001 */
+ phydev->link = 1;
+ phydev->duplex = DUPLEX_FULL;
+ phydev->speed = SPEED_100;
+
+ return 0;
+}
+
+static int ksz8895_startup(struct phy_device *phydev)
+{
+ return 0;
+}
+
+static struct phy_driver ksz8895_driver = {
+ .name = "Micrel KSZ8895/KSZ8864",
+ .uid = 0x221450,
+ .mask = 0xffffe1,
+ .features = PHY_BASIC_FEATURES,
+ .config = &ksz8895_config,
+ .startup = &ksz8895_startup,
+ .shutdown = &genphy_shutdown,
+};
+
#ifndef CONFIG_PHY_MICREL_KSZ9021
/*
* I can't believe Micrel used the exact same part number
@@ -204,5 +234,6 @@ int phy_micrel_init(void)
phy_register(&KS8721_driver);
#endif
phy_register(&ksz9031_driver);
+ phy_register(&ksz8895_driver);
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] Add support for KSZ8895 switch
2013-08-12 14:48 [U-Boot] [PATCH] Add support for KSZ8895 switch Christian Gmeiner
@ 2013-08-19 18:35 ` Christian Gmeiner
2013-08-21 10:26 ` Christian Gmeiner
0 siblings, 1 reply; 3+ messages in thread
From: Christian Gmeiner @ 2013-08-19 18:35 UTC (permalink / raw)
To: u-boot
Am 12.08.2013 16:48 schrieb "Christian Gmeiner" <christian.gmeiner@gmail.com
>:
>
> This patch adds a dump phy driver for the KSZ8895 switch from
> Micrel. As the SoC MAC is directly connected to switch no
> autonegotiation is needed as the link is always up.
>
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> ---
> drivers/net/phy/micrel.c | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index aa9cbcf..76d6846 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -36,6 +36,36 @@ static struct phy_driver KSZ804_driver = {
> .shutdown = &genphy_shutdown,
> };
>
> +/**
> + * KSZ8895
> + */
> +
> +int ksz8895_config(struct phy_device *phydev)
> +{
> + /* we are connected directly to the switch without
> + * dedicated PHY. SCONF1 == 001 */
> + phydev->link = 1;
> + phydev->duplex = DUPLEX_FULL;
> + phydev->speed = SPEED_100;
> +
> + return 0;
> +}
> +
> +static int ksz8895_startup(struct phy_device *phydev)
> +{
> + return 0;
> +}
> +
> +static struct phy_driver ksz8895_driver = {
> + .name = "Micrel KSZ8895/KSZ8864",
> + .uid = 0x221450,
> + .mask = 0xffffe1,
> + .features = PHY_BASIC_FEATURES,
> + .config = &ksz8895_config,
> + .startup = &ksz8895_startup,
> + .shutdown = &genphy_shutdown,
> +};
> +
> #ifndef CONFIG_PHY_MICREL_KSZ9021
> /*
> * I can't believe Micrel used the exact same part number
> @@ -204,5 +234,6 @@ int phy_micrel_init(void)
> phy_register(&KS8721_driver);
> #endif
> phy_register(&ksz9031_driver);
> + phy_register(&ksz8895_driver);
> return 0;
> }
> --
> 1.7.10.4
>
Any comments?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] Add support for KSZ8895 switch
2013-08-19 18:35 ` Christian Gmeiner
@ 2013-08-21 10:26 ` Christian Gmeiner
0 siblings, 0 replies; 3+ messages in thread
From: Christian Gmeiner @ 2013-08-21 10:26 UTC (permalink / raw)
To: u-boot
>>
>> This patch adds a dump phy driver for the KSZ8895 switch from
>> Micrel. As the SoC MAC is directly connected to switch no
>> autonegotiation is needed as the link is always up.
>>
>> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
>> ---
>> drivers/net/phy/micrel.c | 31 +++++++++++++++++++++++++++++++
>> 1 file changed, 31 insertions(+)
>>
>> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
>> index aa9cbcf..76d6846 100644
>> --- a/drivers/net/phy/micrel.c
>> +++ b/drivers/net/phy/micrel.c
>> @@ -36,6 +36,36 @@ static struct phy_driver KSZ804_driver = {
>> .shutdown = &genphy_shutdown,
>> };
>>
>> +/**
>> + * KSZ8895
>> + */
>> +
>> +int ksz8895_config(struct phy_device *phydev)
>> +{
>> + /* we are connected directly to the switch without
>> + * dedicated PHY. SCONF1 == 001 */
>> + phydev->link = 1;
>> + phydev->duplex = DUPLEX_FULL;
>> + phydev->speed = SPEED_100;
>> +
>> + return 0;
>> +}
>> +
>> +static int ksz8895_startup(struct phy_device *phydev)
>> +{
>> + return 0;
>> +}
>> +
>> +static struct phy_driver ksz8895_driver = {
>> + .name = "Micrel KSZ8895/KSZ8864",
>> + .uid = 0x221450,
>> + .mask = 0xffffe1,
>> + .features = PHY_BASIC_FEATURES,
>> + .config = &ksz8895_config,
>> + .startup = &ksz8895_startup,
>> + .shutdown = &genphy_shutdown,
>> +};
>> +
>> #ifndef CONFIG_PHY_MICREL_KSZ9021
>> /*
>> * I can't believe Micrel used the exact same part number
>> @@ -204,5 +234,6 @@ int phy_micrel_init(void)
>> phy_register(&KS8721_driver);
>> #endif
>> phy_register(&ksz9031_driver);
>> + phy_register(&ksz8895_driver);
>> return 0;
>> }
>> --
>> 1.7.10.4
>>
>
> Any comments?
Maybe it would be better to add a generic fixed-link phy driver to u-boot.
--
Christian Gmeiner, MSc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-08-21 10:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-12 14:48 [U-Boot] [PATCH] Add support for KSZ8895 switch Christian Gmeiner
2013-08-19 18:35 ` Christian Gmeiner
2013-08-21 10:26 ` Christian Gmeiner
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.