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

driver: hwinfo: npcx: Add hwinfo driver support in npcx family. #32602

Closed

Conversation

MulinChao
Copy link
Collaborator

Add hwinfo driver support in npcx family.

Signed-off-by: Mulin Chao [email protected]

drivers/hwinfo/hwinfo_npcx.c Outdated Show resolved Hide resolved
drivers/hwinfo/hwinfo_npcx.c Outdated Show resolved Hide resolved
drivers/hwinfo/hwinfo_npcx.c Outdated Show resolved Hide resolved
@MulinChao MulinChao force-pushed the driver_npcx_hwinfo branch 2 times, most recently from 009d17b to 656ba06 Compare February 24, 2021 10:14
@zephyrbot zephyrbot added area: HWINFO Hardware Information Driver platform: Nuvoton Nuvoton labels Feb 24, 2021
@alexanderwachter
Copy link
Member

@MulinChao Thanks for this addition. Do you have a datasheet of this SoC. Do those registers provide unique values? From the naming, it sounds like they identify the chip and are the same for each chip.
The device ID should be a unique ID.

@MulinChao
Copy link
Collaborator Author

MulinChao commented Feb 25, 2021

@MulinChao Thanks for this addition. Do you have a datasheet of this SoC. Do those registers provide unique values? From the naming, it sounds like they identify the chip and are the same for each chip.
The device ID should be a unique ID.

Ping our PM, @Michal-Sch, for further actions.
Hi @alexanderwachter, thanks for your comment. Regarding the datasheet, it is provided under NDA. Please refer to the discussion in PR27578

Related to the unique values of these registers, yes, they are unique that rely on the device's family, group, revision, and so on. They help identifying the chip's family, group, and revision.

Add hwinfo driver support in npcx family.

Signed-off-by: Mulin Chao <[email protected]>
@MulinChao MulinChao requested a review from ChiHuaL as a code owner February 25, 2021 02:23
@MulinChao MulinChao requested a review from nashif February 25, 2021 03:53
@alexanderwachter
Copy link
Member

So as I understand, the numbers are unique for each series.
The device id is meant to be unique for each piece. So if you take two pieces of the same type, they have to be different.
For me, as the maintainer of hwinfo, it is hard to give a +1 without having a look at the datasheet.

@MulinChao
Copy link
Collaborator Author

So as I understand, the numbers are unique for each series.
The device id is meant to be unique for each piece. So if you take two pieces of the same type, they have to be different.
For me, as the maintainer of hwinfo, it is hard to give a +1 without having a look at the datasheet.

Understood. Sorry for the inconvenience.

@alexanderwachter
Copy link
Member

Does your MCU support unique IDs?
If not, we should consider closing this PR

Copy link
Member

@alexanderwachter alexanderwachter left a comment

Choose a reason for hiding this comment

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

This driver does not implement a unique id, but an identifier for a series.

@MulinChao
Copy link
Collaborator Author

Does your MCU support unique IDs?
If not, we should consider closing this PR

If I understand correctly, the unique ID means each different chip in the same series should provide a unique number. If so, I misunderstood 'hwinfo' driver and npcx MCU doesn't support this feature.

@alexanderwachter
Copy link
Member

As a background:
We are using this API for USB to provide a unique ID. I think updatehub uses it to identify their nodes.

@MulinChao
Copy link
Collaborator Author

As a background:
We are using this API for USB to provide a unique ID. I think updatehub uses it to identify their nodes.

Got it. Thanks for sharing the background usage. I will close this PR.

@MulinChao
Copy link
Collaborator Author

MulinChao commented Feb 26, 2021

Hi All:
Since the interface of 'hwinfo' is for USB application. I will move this PR into the other repo and close it.

@MulinChao MulinChao closed this Feb 26, 2021
@MulinChao
Copy link
Collaborator Author

Hi All:
Since the interface of 'hwinfo' is for USB application. I will move it into the other repo and close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Boards area: HWINFO Hardware Information Driver platform: Nuvoton Nuvoton
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants