Skip to content

Conversation

@duynguyenxa
Copy link
Member

This PR introduce the support of Ethernet driver on RA8x2 devices base on eswm, rmac and rmac phy HWIP
This PR also add a new phy driver support for GPY111 chip

Nhat Ta added 8 commits December 14, 2025 07:26
Change hal_renesas revision to support ethernet for ra8x2

Signed-off-by: Nhat Ta <[email protected]>
This commit add entropy support for ra8x2.

Signed-off-by: Nhat Ta <[email protected]>
This commit add ethernet driver support for ra8x2.

Signed-off-by: Nhat Ta <[email protected]>
This commit put ethernet buffers and descriptors to nocache .

Signed-off-by: Nhat Ta <[email protected]>
This commit add mdio driver support for ra8x2.

Signed-off-by: Nhat Ta <[email protected]>
This commit define eswm module for ra8x2 that includes ethernet
and mdio nodes.

Signed-off-by: Nhat Ta <[email protected]>
This commit add phy driver support for Maxlinear GPY111. This driver
implements vendor specific behaviour rgmii delay time setup, which is
not present in the generic MII driver.

Signed-off-by: Nhat Ta <[email protected]>
This commit add ethernet support for ek_ra8p1, ek_ra8m2,
ek_ra8d2, mck_ra8t2.

Signed-off-by: Nhat Ta <[email protected]>
@duynguyenxa duynguyenxa changed the title Ra8x2 ethernet driver support RA8x2 ethernet driver support Dec 14, 2025
@github-actions
Copy link

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

Name Old Revision New Revision Diff
hal_renesas zephyrproject-rtos/hal_renesas@d010390 zephyrproject-rtos/hal_renesas#178 zephyrproject-rtos/hal_renesas#178/files

DNM label due to: 1 project with PR revision

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

@github-actions github-actions bot added manifest manifest-hal_renesas DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Dec 14, 2025
@sonarqubecloud
Copy link

Copy link
Member

@jukkar jukkar left a comment

Choose a reason for hiding this comment

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

Is the driver compile tested by the CI? If not, then I suggest you add the tests so that the code does not bit rot easily.

struct eth_renesas_ra_data *data = dev->data;
fsp_err_t fsp_err = FSP_SUCCESS;

if (state->is_up) {
Copy link
Member

Choose a reason for hiding this comment

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

I suggest following changes to avoid this "if() else" construct and extra indentation

if (!state->is_up) {
	if (data->phy_link_up == 1) {
		/* phy state change from up to down */
		r_rmac_disable_reception(data->fsp_ctrl);
		data->fsp_ctrl->link_establish_status = ETHER_LINK_ESTABLISH_STATUS_DOWN;
		data->phy_link_up = 0;
		LOG_DBG("link down");
		net_eth_carrier_off(data->iface);
	}

	return;
}

data->fsp_ctrl->link_establish_status = ETHER_LINK_ESTABLISH_STATUS_UP;
data->phy_link_up = 1;
...

#if defined(CONFIG_ETH_RENESAS_RA_USE_HW_WRITEBACK)
struct k_sem tx_sem;
#endif
uint8_t phy_link_up;
Copy link
Member

@jukkar jukkar Dec 14, 2025

Choose a reason for hiding this comment

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

This looks to be used as a boolean in the code, so why not have bool type?

/* read again for remaining data */
k_sem_give(&data->rx_sem);

pkt = net_pkt_rx_alloc_with_buffer(data->iface, (size_t)len, AF_UNSPEC, 0, K_MSEC(100));
Copy link
Member

Choose a reason for hiding this comment

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

Please use NET_AF_UNSPEC here

@thenguyenyf thenguyenyf added platform: Renesas RA Renesas Electronics Corporation, RA area: Ethernet labels Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Ethernet DNM (manifest) This PR should not be merged (controlled by action-manifest) manifest manifest-hal_renesas platform: Renesas RA Renesas Electronics Corporation, RA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants