Skip to content

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

Closed
wants to merge 0 commits into from
Closed

Add Cameo board based on Innovium chip #3639

wants to merge 0 commits into from

Conversation

Hanly-Cameo
Copy link

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)

{ .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,
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove commented code.

Copy link

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);
Copy link
Collaborator

Choose a reason for hiding this comment

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

use optoe driver.

Copy link

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.

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.

Copy link
Collaborator

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

as comments

@Hanly-Cameo
Copy link
Author

Hanly-Cameo commented Nov 6, 2019

as comments
@lguohan
Hi lguohan,
we already update driver to use 'optoe' ,and test with the following commands.
sfputil show presence
show interfaces transceiver eeprom
sensors
show platform psustatus

Please verify.
thanks.

@@ -0,0 +1,429 @@
/*
* mcp3422.c - driver for the Microchip mcp3421/2/3/4/5/6/7/8 chip family
Copy link
Collaborator

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?

Copy link
Author

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.

Copy link
Author

Choose a reason for hiding this comment

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

@lguohan any advice?

Copy link
Collaborator

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?

@Hanly-Cameo
Copy link
Author

Hi lguohan,
I got a information from our hardware team: the mcp3425 is a standard I2C device, but our I2C controller driver is intel "I801" .It is SMbus only.
So, we changed the mcp3422.c to mcp3425_smbus.c. It is only for our platform.
What I did

  1. we remove I2C function check.
  2. using 'i2c_smbus_read_i2c_block_data" instead of "i2c_master_recv"
    How to verify it:
    "cat in_voltage0_raw" and check the value.

@maxliu37
Copy link

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.

@lguohan
Copy link
Collaborator

lguohan commented Mar 23, 2020

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
Copy link
Collaborator

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?

Copy link
Author

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;

Copy link
Author

@Hanly-Cameo Hanly-Cameo Mar 24, 2020

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).

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]>");
Copy link
Collaborator

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?

Copy link

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
Copy link
Collaborator

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.

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?

@lgtm-com
Copy link

lgtm-com bot commented May 13, 2020

This pull request introduces 12 alerts when merging 7b00d0a403329b95be52c44c6d098df84d67204b into f52e59a - view on LGTM.com

new alerts:

  • 11 for Unused import
  • 1 for Unused local variable

@lgtm-com
Copy link

lgtm-com bot commented Jun 30, 2020

This pull request introduces 894 alerts when merging d059f250951da5502fa3437ca4d498d571600c8c into d04ad41 - view on LGTM.com

new alerts:

  • 308 for Unused local variable
  • 215 for Testing equality to None
  • 94 for Unreachable code
  • 67 for Use of 'global' at module level
  • 48 for Variable defined multiple times
  • 47 for Unnecessary 'else' clause in loop
  • 27 for Except block handles 'BaseException'
  • 19 for Unused import
  • 12 for Suspicious unused loop iteration variable
  • 8 for Redundant comparison
  • 8 for Unhashable object hashed
  • 8 for Nested loops with same variable
  • 7 for Duplicate key in dict literal
  • 7 for Redundant assignment
  • 6 for Unnecessary pass
  • 4 for Wrong number of arguments in a call
  • 3 for Module is imported more than once
  • 2 for Use of the return value of a procedure
  • 2 for Duplication in regular expression character class
  • 2 for Modification of parameter with default

@lguohan
Copy link
Collaborator

lguohan commented Jul 21, 2020

there seems to be too many lgtm alerts, can you fix all of the lgtm alerts?

@maxliu37
Copy link

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.
For the x86_64-cameo_esc601_32q-r0 platform, we think it is almost to the end. Please help speeding up the review for us. Thanks.

@lguohan
Copy link
Collaborator

lguohan commented Jul 22, 2020

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.

@maxliu37
Copy link

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.

@ghost ghost deleted a comment from msftclas Jul 24, 2020
mssonicbld added a commit that referenced this pull request Jun 6, 2025
…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
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.

4 participants