-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Open Alliance SPI support #2438
base: main
Are you sure you want to change the base?
Conversation
095c651
to
fa90171
Compare
The Open Alliance serial interface (OA TC6) is a protocol over an SPI bus, used for full duplex Ethernet frame transfer between a host processor and a 10BASE-T1L or 10BASE-T1S MAC. Implement a generic framework, which can be used to control any MAC which supports the OA SPI protocol. Protocol spec: https://opensig.org/wp-content/uploads/2023/12/OPEN_Alliance_10BASET1x_MAC-PHY_Serial_Interface_V1.1.pdf Signed-off-by: Ciprian Regus <[email protected]>
Add support for the Open Alliance SPI protocol, which can be used as an alternative to the current generic SPI. Signed-off-by: Ciprian Regus <[email protected]>
Add the option to use the Open Alliance SPI protocol for the ADIN1110. In order to enable it, the project has to be compiled with the CONFIG_SWIOT1L_OA_TC6_SPI=y make flag. Signed-off-by: Ciprian Regus <[email protected]>
The OA TC6 SPI files are required to compile the ADIN1110 driver. Add them to the projects which use the MAC-PHY. Signed-off-by: Ciprian Regus <[email protected]>
fa90171
to
d93a622
Compare
#define OA_HEADER_LEN 4 | ||
#define OA_FOOTER_LEN 4 | ||
|
||
#define OA_MMS_REG(m, r) (((m) << 16) | ((r) & NO_OS_GENMASK(15, 0))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh i like & 0xffff
better because it's shorter :D no need to change, just saying
@@ -38,6 +38,9 @@ | |||
#include "no_os_spi.h" | |||
#include "no_os_gpio.h" | |||
#include "no_os_util.h" | |||
#include "no_os_irq.h" | |||
|
|||
#include "oa_tc6.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll have to adjust more src.mk files in all affected projects
drivers/net/adin1110/adin1110.h:43:10: fatal error: oa_tc6.h: No such file or directory
@@ -38,6 +38,9 @@ | |||
#include "no_os_spi.h" | |||
#include "no_os_gpio.h" | |||
#include "no_os_util.h" | |||
#include "no_os_irq.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might also have an impact, i didn't check the CI, depending on whether existing projects include .h files one by one or using NO_OS_INC_DIRS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a left over from a previous implementation and is not needed anymore. I'll remove it.
Pull Request Description
Please replace this with a detailed description and motivation of the changes.
You can tick the checkboxes below with an 'x' between square brackets or just check them after publishing the PR.
If this PR contains a breaking change, list dependent PRs and try to push all related PRs at the same time.
PR Type
PR Checklist