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

HAL: mchp: Missing PCR ids to control PM for certain HW blocks #29059

Closed
albertofloyd opened this issue Oct 8, 2020 · 2 comments
Closed

HAL: mchp: Missing PCR ids to control PM for certain HW blocks #29059

albertofloyd opened this issue Oct 8, 2020 · 2 comments
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Microchip MEC Microchip MEC Platform priority: low Low impact/importance bug

Comments

@albertofloyd
Copy link
Collaborator

Describe the bug

While there is control power management for different each HW instance of certain technology inside HAL (pcr.h)
i.e.
PCR_PS2_0 = (384u + 5u),
PCR_PS2_1 = (384u + 6u),

PCR_PWM1 = (128u + 20u),
PCR_PWM2 = (128u + 21u),
PCR_PWM3 = (128u + 22u),
PCR_PWM4 = (128u + 23u),
PCR_PWM5 = (128u + 24u),
PCR_PWM6 = (128u + 25u),
PCR_PWM7 = (128u + 26u),
PCR_PWM8 = (128u + 27u),

I2C and SMB are only exposing 3 ids, need the location the missing 2 in each case.
PCR_I2C0 = (512u + 10u),
PCR_I2C1 = (512u + 11u),
PCR_I2C2 = (512u + 12u),

Also TACH there is only 1 PCR id.

@albertofloyd albertofloyd added bug The issue is a bug, or the PR is fixing a bug platform: Microchip MEC Microchip MEC Platform labels Oct 8, 2020
@scottwcpg
Copy link
Collaborator

MEC15xx has two groups of I2C controllers:
5 controllers named SMB0, SMB1, ..., SMB4 that include the network layer hardware on top of the base I2C.
3 controllers named I2C0, I2C1, ..., I2C2 that do not include the network layer hardware. These controller have most of the same register set except for registers related to the network layer hardware.
This is the reason for the different naming convention.
The pcr.h header has:
PCR_SMB0, PCR_SMB1, PCR_SMB2, PCR_SMB3, PCR_SMB4
PCR_I2C0, PCR_I2C1, and PCR_I2C
These defines encode the register PCR register offset and bit position.
The header also has:
MCHP_PCR1_SMB0_POS 10u
MCHP_PCR3_SMB1_POS 13u
MCHP_PCR3_SMB2_POS 14u
MCHP_PCR3_SMB3_POS 15u
MCHP_PCR3_SMB4_POS 20u
MCHP_PCR4_I2C0_POS 10u
MCHP_PCR4_I2C1_POS 11u
MCHP_PCR4_I2C3_POS 12u

MCHP_PCR1_TACH0_POS 2u
MCHP_PCR1_TACH1_POS 11u
MCHP_PCR1_TACH2_POS 12u
MCHP_PCR1_TACH3_POS 13u
PCR_TACH0 = (128u + 2u),
PCR_TACH1 = (128u + 11u),
PCR_TACH2 = (128u + 12u),
PCR_TACH3 = (128u + 13u),

Is this a request to update C code in the soc and board layer to program these bits?

@nashif nashif added the priority: medium Medium impact/importance bug label Oct 13, 2020
@ioannisg ioannisg added priority: low Low impact/importance bug and removed priority: medium Medium impact/importance bug labels Oct 13, 2020
@albertofloyd
Copy link
Collaborator Author

@scottwcpg clarification above is enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug platform: Microchip MEC Microchip MEC Platform priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

4 participants