Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for KSZ9477 managed ethernet switch for saluki-v3 #153

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

jlaitine
Copy link

@jlaitine jlaitine commented Aug 31, 2023

Summary

Adding code for saluki-v3 ethernet switch configuration.

Tested to be working on saluki-v3

@jlaitine jlaitine force-pushed the ksz9477_phy branch 5 times, most recently from 95bd1b9 to 6cf714f Compare September 4, 2023 08:32
@jlaitine jlaitine requested a review from pussuw September 4, 2023 08:36
@jlaitine jlaitine changed the title WIP: Ksz9477 phy Adding support for KSZ9477 managed ethernet switch for saluki-v3 Sep 4, 2023
drivers/net/Make.defs Outdated Show resolved Hide resolved
drivers/net/Kconfig Outdated Show resolved Hide resolved
drivers/net/Kconfig Outdated Show resolved Hide resolved
drivers/net/ksz9477_i2c.c Outdated Show resolved Hide resolved
drivers/net/ksz9477_i2c.c Outdated Show resolved Hide resolved
Copy link

@pussuw pussuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the comments are irrelevant, fix if you wish

****************************************************************************/

#include <nuttx/config.h>
#include <debug.h>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this header is needed here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, I'll remove it, thanks


/* Port registers */

#define KSZ9477_PORT_REG(port,x) ((((uint16_t)port) << 12) | (x))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(port) ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, definitely. I wil also change x -> reg for clarity

@jlaitine jlaitine force-pushed the ksz9477_phy branch 2 times, most recently from 772b16a to 3138394 Compare September 5, 2023 07:09
@jlaitine jlaitine force-pushed the ksz9477_phy branch 4 times, most recently from 0c9b09d to 5629997 Compare September 5, 2023 20:11
@jlaitine
Copy link
Author

jlaitine commented Sep 6, 2023

I'll try upstreaming before merging this in

This adds initialization of the ksz9477 switch when used instead of
a PHY, directly connected to SGMII

Signed-off-by: Jukka Laitinen <[email protected]>
@jlaitine
Copy link
Author

This change is now upstreamed, and this is direct cherry-pick from upstream. Merging->

@jlaitine jlaitine merged commit 537e3ff into master Sep 11, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants