-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add Cameo board based on Innovium chip #3639
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
Conversation
{ .name="qsfp_eeprom_32", .portid=32, .i2c_switch1_val=0x80, .i2c_switch2_val=0x80 }, | ||
}; | ||
|
||
static ssize_t sfp_bin_read(struct file *filp, struct kobject *kobj, |
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.
should use optoe driver.
u8 status = -EPERM; | ||
u8 res = 0x1; | ||
int i; | ||
struct sensor_device_attribute *attr = to_sensor_dev_attr(da |
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.
remove commented code.
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.
remove commented code.
You mean remove all of the comment ?
static ssize_t low_power_set(struct device *dev, struct device_attribute *da, const char *buf, size_t count); | ||
static ssize_t qsfp_reset_set(struct device *dev, struct device_attribute *da, const char *buf, size_t count); | ||
static ssize_t qsfp_status_get(struct device *dev, struct device_attribute *da, char *buf); | ||
static ssize_t qsfp_temp_get(struct device *dev, struct device_attribute *da, char *buf); |
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.
use optoe driver.
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.
use optoe driver.
How to use optoe driver? Can you give an example? I have read about optoe driver source code,
but seem not fit our hardware arch.
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.
as comments
Already updated to use optoe driver for accessing qsfp module.
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.
as comments
Please verify. |
@@ -0,0 +1,429 @@ | |||
/* | |||
* mcp3422.c - driver for the Microchip mcp3421/2/3/4/5/6/7/8 chip family |
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.
can you use linux kernel driver?
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.
if so , I need to modify kenerl default config. "# CONFIG_MCP3422 is not set" is default value in current kernel config.
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.
@lguohan any advice?
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.
yes, can you submit pr to enable the kernel driver?
Hi lguohan,
|
Hi lguohan, We have modified the code as your request sometime back and not been reviewed/confirmed by you for several months. WIll you advise where is the problem blocking the pull request? Thanks. |
I do not understand why you need to rename the mcp3422 driver to a new name. why cannot reuse the driver from linux? |
@@ -0,0 +1,847 @@ | |||
/* | |||
* at24.c - handle most I2C EEPROMs |
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.
linux kernel has at24 driver. why not use the original one?
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.
Hi Iguohan,
we are using at24c16 on our board, 24c16 is 16bit address mode. In current driver at24.c.
it will check I2c Function bit with 16bit address mode. our cpu's I2c bus is SMBUS, but 24c16 need I2C. so we changed it.
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
//if (chip.flags & AT24_FLAG_ADDR16)
// return -EPFNOSUPPORT;
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.
for mcp3422 chip , it has the same i2c issue.(need I2C_FUNC_I2C).
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.
Our CPU is using SMBUS not pure I2C, therefore we have to marked out the functionality check. Otherwise it shows us init checking error. No other company with the same issue? I mean that some minor change required with native driver.
|
||
module_i2c_driver(tps53679_driver); | ||
|
||
MODULE_AUTHOR("Vadim Pasternak <[email protected]>"); |
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 looks like mellanox driver. is it already in linux kernel?
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.
As we know, the tps53679 driver is already in Linux kernel and we change to use it directly instead of another driver for tps53681.
void show_eeprom(u_int8_t *eeprom, char *buf,int tlv_len); | ||
#endif | ||
|
||
#ifdef QSFP_WANTED |
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.
what is this QSFP_WANTED. I think you need to remove them completely since you are using the optoe driver now.
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.
We are still using the driver(defined QSFP_WANTED) in ONL system for easy debugging and share the source code with that in SONiC system. That's why we keep the driver option here.
Is there any concern or possible impact with the compiler option?
This pull request introduces 12 alerts when merging 7b00d0a403329b95be52c44c6d098df84d67204b into f52e59a - view on LGTM.com new alerts:
|
This pull request introduces 894 alerts when merging d059f250951da5502fa3437ca4d498d571600c8c into d04ad41 - view on LGTM.com new alerts:
|
there seems to be too many lgtm alerts, can you fix all of the lgtm alerts? |
It may take time to fix the lgtm alerts, therefore we take away the platform 128Q request from #3639 and left it dedicated for x86_64-cameo_esc601_32q-r0 platform. Will issue another request for 128Q later. |
I just notice that this pr is raised against 201811 branch. We do not do such pr, please always raise against master branch first, we first merge the platform there and then do backport to release branch if neccessary. |
Do you mean to request for merging into master branch first? I thought the master is the up-to-date branch, which may be in between 201911 and 202006 for now. But we need to support 201811 which our customers are working on. |
…lly (#22790) #### Why I did it src/sonic-swss ``` * 5e07127a - (HEAD -> master, origin/master, origin/HEAD) [dashhaorch]: Fix error: stack protector not protecting local variables: variable length buffer (#3643) (4 hours ago) [Nazarii Hnydyn] * d589d8d9 - [swss]: IcmpOrch to support ICMP session offload to ASIC (#3535) (6 hours ago) [manamand2020] * f05e8e9e - [SRv6] add MySID counters support (#3601) (6 hours ago) [Yakiv Huryk] * a0bd39e5 - Skip "port doesn't exist" SWSS_LOG_INFO messages for local ports (#3553) (31 hours ago) [HP] * 74b2cc61 - [ci]: Skip publishing of asan vstest summary (#3669) (32 hours ago) [prabhataravind] * 398161b4 - [Dynamic Buffer][Mellanox] Fix an issue when handling 2-digit queue ID in the Lua plugin (#3588) (2 days ago) [Stephen Sun] * 7106cc0a - Fixing macsecmgrd memory corruption (#3611) (2 days ago) [sivanuka-arista] * e830a491 - [fpmsyncd]Fixing blackhole route to publish protocol field to APPL_DB (#3655) (2 days ago) [Sudharsan Dhamal Gopalarathnam] * de5b8e51 - Setting default nexthop weight to 1 in `fpmsyncd` (#3636) (3 days ago) [mramezani95] * 176bcea9 - Change Log Level for BFD Offload Capability Implementation (#3641) (3 days ago) [Sai Rama Mohan Reddy S] * f9f7ff0e - Fix NextHopGroupEntry class data member not initialized bug (#3644) (3 days ago) [Hua Liu] * c8c597cf - Install symlink to Python 3 to work around AzP diff coverage issue (#3670) (6 days ago) [Saikrishna Arcot] * 3a5efa38 - [tests]: Fix `test_MirrorDestMoveLag` test failure (#3639) (6 days ago) [Carmine Scarpitta] * 13d559d4 - Revert "Set Port UPDATE_DSCP attribute when TC_TO_DSCP map is attached (#3517)" (#3666) (6 days ago) [Kumaresh Perumal] * 1c601cb8 - Changes to unblock swss pipeline tests (#3664) (7 days ago) [prabhataravind] * b31500b2 - [build] Support optionally using other container registries instead of DockerHub (#3668) (7 days ago) [Saikrishna Arcot] ``` #### How I did it #### How to verify it #### Description for the changelog
Cameo New Project:
Platform: x86_64-cameo_esc601_32q-r0 (32x100G)
HwSKU: esc601-32q
ASIC: Innovium
- What I did
Add platform support for esc601-32q project
- How I did it
Add configuration and platform drivers for esc601-32q project
Update configuration and platform drivers for esc601-32q project
- How to verify it
sfputil show presence
show interfaces transceiver eeprom
show platform psustatus
show platform syseeprom
sfputil show lpmode
show interfaces status
show environment
show version
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)