Skip to content

Conversation

mchp-asif
Copy link
Contributor

This PR adds initial support for Microchip’s PIC32CX SG family of SoCs, along with board support for the PIC32CX SG61 Curiousity Ultra development kit (EV09H35A). It includes the basic SoC integration, devicetree files, and minimal configuration needed to bring up the board with a working blinky.

Copy link

Hello @mchp-asif, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

Copy link

github-actions bot commented Sep 19, 2025

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

Comment on lines 10 to 15
# List of Peripheral IPs available in SOC_FAMILY_MICROCHIP_PIC32CX_SG family
config PINCTRL_MCHP_PORT_U2210_2_2_0
bool
default y
help
Enable PORT pinctrl peripheral IP version 2.2.0 (U2210).
Copy link
Contributor

Choose a reason for hiding this comment

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

this does not belong in Kconfig.soc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#93450 (comment)

The symbol is added similar to the one in above link. It is used for specifying the peripheral ip which is present on the soc. It can be used in the kconfig file of respective driver if any conditional compilation is required in the common driver.

Copy link
Contributor

Choose a reason for hiding this comment

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

right I missed that seemingly, https://github.com/zephyrproject-rtos/zephyr/pull/93450/files#diff-c050e37ce12edcb8c94981ec35cd65f13a03f132924e4401f65ecd62a5c43b99R11 these need to go out of Kconfig.soc and put them in Kconfig

Copy link
Contributor Author

@mchp-asif mchp-asif Sep 23, 2025

Choose a reason for hiding this comment

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

  1. Just to be sure, you meant to put these symbols inside soc/microchip/pic32c/pic32cx_sg/Kconfig right? or do you mean to put them inside the driver specific kconfig file?
  2. Can you please tell me why it is to be moved to the kconfig?

Copy link
Contributor

Choose a reason for hiding this comment

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

Added a comment to another PR but what is this for? There is a Kconfig already which is auto generated for knowing if a device is present, why do you need another Kconfig for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay @nordicjm. I will explore this option. Meanwhile can you please tell me the reason behind this approach, it will help me better resolve the issue.

Copy link
Contributor

@nordicjm nordicjm Sep 23, 2025

Choose a reason for hiding this comment

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

DTS describes hardware, a v1 or v2 peripheral is hardware differences and is not software selectable, Kconfig is for software configuration. Also see linux kernel e.g. Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra234-nvdec.yaml and Documentation/devicetree/bindings/gpu/host1x/nvidia,tegra210-nvdec.yaml or ./Documentation/devicetree/bindings/interrupt-controller/arm,gic-v5.yaml and ./Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank You @nordicjm for the clarification. Currently the driver is not using this symbol, so for the time being I shall remove it.

Further, I will explore more into the options you shared for adding support for multiple peripheral versions inside the same driver.

Hope this approach is fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

Removing it is fine (it has not been removed)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nordicjm I have removed it now. Just was waiting for your confirmation.

# SPDX-License-Identifier: Apache-2.0

CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_ARM_MPU=y
Copy link
Contributor

Choose a reason for hiding this comment

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

UART missing?

Copy link
Member

Choose a reason for hiding this comment

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

There is no UART in the dtsi yet.
I think they will add later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. As @nandojve rightly said, it is not added now. It will be added later.

west.yml Outdated
- hal
- name: hal_microchip
revision: e5fe6469afc53d7aefcc74377dd99ce20428d42b
revision: 651b61316816271949620b6c7e8e666f271e15ca
Copy link
Member

Choose a reason for hiding this comment

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

I'll mark to DNM until we finish the review to avoid ping pong in the hash.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay @nandojve

# SPDX-License-Identifier: Apache-2.0

CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_ARM_MPU=y
Copy link
Member

Choose a reason for hiding this comment

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

There is no UART in the dtsi yet.
I think they will add later.

@nandojve nandojve added the DNM This PR should not be merged (Do Not Merge) label Sep 22, 2025
@nandojve nandojve added this to the v4.3.0 milestone Sep 22, 2025
@mchp-asif mchp-asif force-pushed the map_pic32cx_minimal_support branch 2 times, most recently from d69cb71 to e817f80 Compare September 22, 2025 18:27
@mchp-asif mchp-asif force-pushed the map_pic32cx_minimal_support branch 2 times, most recently from 8f04b78 to f33ff21 Compare September 25, 2025 03:58
@zephyrbot zephyrbot added platform: ADI Analog Devices, Inc. platform: Silabs Silicon Labs labels Sep 25, 2025
nordicjm
nordicjm previously approved these changes Sep 25, 2025
@nordicjm
Copy link
Contributor

think this might need a rebase

Adds common and SoC-specific .dtsi files for the Microchip
PIC32CX SG family. These files define core peripherals,
address maps, and interrupt controller structure shared
across the PIC32CX SG variants.

Signed-off-by: Muhammed Asif <[email protected]>
@mchp-asif
Copy link
Contributor Author

think this might need a rebase
@nordicjm
I have rebased with the latest. Could you please check and approve?

@mchp-asif mchp-asif requested a review from nordicjm September 25, 2025 07:08
@mchp-asif
Copy link
Contributor Author

@nandojve Could you please remove the DNM tag as I have removed the commit updating the west.yml from this PR?

Adds initial SoC-level support for the Microchip
PIC32CX SG series, including SoC definition files.

Signed-off-by: Muhammed Asif <[email protected]>
…pport

Add initial support for the Microchip PIC32CX SG61 Curiosity Pro board

Product page: https://www.microchip.com/en-us/development-tool/ev09h35a

Signed-off-by: Muhammed Asif <[email protected]>
@mchp-asif mchp-asif force-pushed the map_pic32cx_minimal_support branch from 8ce400e to e52d784 Compare September 25, 2025 11:14
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM This PR should not be merged (Do Not Merge) platform: ADI Analog Devices, Inc. platform: Microchip MEC Microchip MEC Platform platform: Microchip SAM Microchip SAM Platform (formerly Atmel SAM) platform: Silabs Silicon Labs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants