Re: [PATCH] DSA support for Micrel KSZ8895

2017-09-06 Thread Andrew Lunn
> The patches are under review internally and will need to be updated > and approved by Woojung before formal submission. Problem is > although KSZ8795 and KSZ8895 drivers are new code and will be > submitted as RFC, they depend on the change of KSZ9477 driver > currently in the kernel, which

RE: [PATCH] DSA support for Micrel KSZ8895

2017-09-06 Thread Tristram.Ha
l.org; Andrew Lunn > Subject: Re: [PATCH] DSA support for Micrel KSZ8895 > > 2017-08-31 0:32 GMT+03:00 <tristram...@microchip.com>: > >> On Mon 2017-08-28 16:09:27, Andrew Lunn wrote: > >> > > I may be confused here, but AFAICT: > >> &

Re: [PATCH] DSA support for Micrel KSZ8895

2017-09-06 Thread Maxim Uvarov
2017-08-31 0:32 GMT+03:00 : >> On Mon 2017-08-28 16:09:27, Andrew Lunn wrote: >> > > I may be confused here, but AFAICT: >> > > >> > > 1) Yes, it has standard layout when accessed over MDIO. >> > >> > >> > Section 4.8 of the datasheet says: >> > >> > All the

Re: [PATCH] DSA support for Micrel KSZ8895

2017-09-02 Thread Pavel Machek
Hi! > Section 4.8 of the datasheet says: > > All the registers defined in this section can be also accessed > via the SPI interface. > > Meaning all PHY registers can be access via the SPI interface. So you > should be able to make a standard Linux MDIO bus

Re: [PATCH] DSA support for Micrel KSZ8895

2017-09-01 Thread Florian Fainelli
On 09/01/2017 05:15 AM, Pavel Machek wrote: > Hi! > > On Wed 2017-08-30 21:32:07, tristram...@microchip.com wrote: >>> On Mon 2017-08-28 16:09:27, Andrew Lunn wrote: > I may be confused here, but AFAICT: > > 1) Yes, it has standard layout when accessed over MDIO.

Re: [PATCH] DSA support for Micrel KSZ8895

2017-09-01 Thread Pavel Machek
Hi! On Wed 2017-08-30 21:32:07, tristram...@microchip.com wrote: > > On Mon 2017-08-28 16:09:27, Andrew Lunn wrote: > > > > I may be confused here, but AFAICT: > > > > > > > > 1) Yes, it has standard layout when accessed over MDIO. > > > > > > > > > Section 4.8 of the datasheet says: > > > > > >

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-30 Thread Andrew Lunn
> The KSZ8795 driver will be submitted after Labor Day (9/4) if > testing reveals no problem. The KSZ8895 driver will be submitted > right after that. You should have no problem using the driver right > away. Hi Tristram Release early, release often. It stops people wasting time Also, we

RE: [PATCH] DSA support for Micrel KSZ8895

2017-08-30 Thread Tristram.Ha
> On Mon 2017-08-28 16:09:27, Andrew Lunn wrote: > > > I may be confused here, but AFAICT: > > > > > > 1) Yes, it has standard layout when accessed over MDIO. > > > > > > Section 4.8 of the datasheet says: > > > > All the registers defined in this section can be also accessed > > via the

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-30 Thread Maxim Uvarov
2017-08-30 0:23 GMT+03:00 Florian Fainelli : > On 08/29/2017 02:15 PM, Pavel Machek wrote: >> On Tue 2017-08-29 14:26:04, Andrew Lunn wrote: But the MDIO emaulation code is from their driver, after lots of deletions. >>> >>> Is this driver supposed to run on lots of

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-29 Thread Florian Fainelli
On 08/29/2017 02:15 PM, Pavel Machek wrote: > On Tue 2017-08-29 14:26:04, Andrew Lunn wrote: >>> But the MDIO emaulation code is from their driver, after lots of >>> deletions. >> >> Is this driver supposed to run on lots of different OSs? That would >> explain why they ignored the Linux MDIO and

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-29 Thread Pavel Machek
On Tue 2017-08-29 14:26:04, Andrew Lunn wrote: > > But the MDIO emaulation code is from their driver, after lots of > > deletions. > > Is this driver supposed to run on lots of different OSs? That would > explain why they ignored the Linux MDIO and PHY layers. It did not look particulary

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-29 Thread kbuild test robot
Hi Pavel, [auto build test ERROR on net-next/master] [also build test ERROR on v4.13-rc7 next-20170829] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-29 Thread Andrew Lunn
> But the MDIO emaulation code is from their driver, after lots of > deletions. Is this driver supposed to run on lots of different OSs? That would explain why they ignored the Linux MDIO and PHY layers. If possible, please make use of the Linux infrastructure. Andrew

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-29 Thread Pavel Machek
On Mon 2017-08-28 16:09:27, Andrew Lunn wrote: > > I may be confused here, but AFAICT: > > > > 1) Yes, it has standard layout when accessed over MDIO. > > > Section 4.8 of the datasheet says: > > All the registers defined in this section can be also accessed > via the SPI

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-29 Thread Pavel Machek
Hi! > Micrel has some drivers on their web site to support some chips. For > that chips they do virtual mdio over spi. > And driver is available on download page: > http://www.microchip.com/wwwproducts/en/KSZ8895 > > Documentation->Software library. > > Both driver and DSA driver. Driver has to

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-28 Thread Maxim Uvarov
Micrel has some drivers on their web site to support some chips. For that chips they do virtual mdio over spi. And driver is available on download page: http://www.microchip.com/wwwproducts/en/KSZ8895 Documentation->Software library. Both driver and DSA driver. Driver has to work with some minor

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-28 Thread Andrew Lunn
> I may be confused here, but AFAICT: > > 1) Yes, it has standard layout when accessed over MDIO. Section 4.8 of the datasheet says: All the registers defined in this section can be also accessed via the SPI interface. Meaning all PHY registers can be access via the SPI

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-28 Thread Pavel Machek
Hi! Thanks for review. > > + case PHY_REG_STATUS: > > + ksz_pread8(sw, p, P_LINK_STATUS, ); > > + ksz_pread8(sw, p, P_SPEED_STATUS, ); > > + data = PHY_100BTX_FD_CAPABLE | > > + PHY_100BTX_CAPABLE | > > + PHY_10BT_FD_CAPABLE | >

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-28 Thread Pavel Machek
Hi! > >No, tag_ksz part probably is not acceptable. Do you see solution > >better than just copying it into tag_ksz1 file? > > You could have all Micrel tag implementations live under net/dsa/tag_ksz.c > and have e.g: DSA_TAG_PROTO_KSZ for the current (newer) switches and >

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-28 Thread Pavel Machek
Hi! > > No, tag_ksz part probably is not acceptable. Do you see solution > > better than just copying it into tag_ksz1 file? > > How about something like this, which needs further work to actually > compile, but should give you the idea. If that's acceptable, yes, I can do something similar. I

RE: [PATCH] DSA support for Micrel KSZ8895

2017-08-27 Thread Woojung.Huh
Pavel, Thanks for update and sorry about email format (due to web-access version) I'll do review when getting back to office later this week. - Woojung From: Pavel Machek [pa...@denx.de] Sent: Sunday, August 27, 2017 8:36 AM To: Woojung Huh - C21699;

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-27 Thread Florian Fainelli
On August 27, 2017 5:36:58 AM PDT, Pavel Machek wrote: >Hi! > >So I fought with the driver a bit more, and now I have something that >kind-of-works. > >"great great hack" belows worries me. > >Yeah, disabled code needs to be removed before merge. > >No, tag_ksz part probably is not

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-27 Thread Andrew Lunn
> No, tag_ksz part probably is not acceptable. Do you see solution > better than just copying it into tag_ksz1 file? How about something like this, which needs further work to actually compile, but should give you the idea. Andrew index 99e38af85fc5..843e77b7c270 100644 ---

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-27 Thread Andrew Lunn
> +/** > + * sw_r_phy - read data from PHY register > + * @sw: The switch instance. > + * @phy: PHY address to read. > + * @reg: PHY register to read. > + * @val: Buffer to store the read data. > + * > + * This routine reads data from the PHY register. > + */ > +static

Re: [PATCH] DSA support for Micrel KSZ8895

2017-08-27 Thread Andrew Lunn
On Sun, Aug 27, 2017 at 02:36:58PM +0200, Pavel Machek wrote: > Hi! > > So I fought with the driver a bit more, and now I have something that > kind-of-works. Thanks for keeping on working on this. > "great great hack" belows worries me. > > Yeah, disabled code needs to be removed before