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

Add CAN driver support for Renesas RZ/G3S #83778

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions boards/renesas/rzg3s_smarc/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ and the following hardware features:
+-----------+------------+-------------------------------------+
| UART | on-chip | serial |
+-----------+------------+-------------------------------------+
| CANFD | on-chip | can |
+-----------+------------+-------------------------------------+

Other hardware features are currently not supported by the port.

Expand Down
14 changes: 14 additions & 0 deletions boards/renesas/rzg3s_smarc/rzg3s_smarc-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,18 @@
<RZG_PINMUX(PORT_15, 2, 6)>; /* TXD */
};
};

/omit-if-no-ref/ can0_pins: can0 {
can0-pinmux {
pinmux = <RZG_PINMUX(PORT_06, 1, 3)>, /* TX */
<RZG_PINMUX(PORT_06, 2, 3)>; /* RX */
};
};

/omit-if-no-ref/ can1_pins: can1 {
can1-pinmux {
pinmux = <RZG_PINMUX(PORT_17, 0, 3)>, /* TX */
<RZG_PINMUX(PORT_17, 1, 3)>; /* RX */
};
};
};
13 changes: 13 additions & 0 deletions boards/renesas/rzg3s_smarc/rzg3s_smarc_r9a08g045s33gbg_cm33.dts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,19 @@
reg = <0x80200000 DT_SIZE_K(256)>;
};

transceiver0: can-phy0 {
compatible = "can-transceiver-gpio";
standby-gpios = <&gpio13 0 GPIO_ACTIVE_HIGH>;
max-bitrate = <8000000>;
#phy-cells = <0>;
};

transceiver1: can-phy1 {
compatible = "can-transceiver-gpio";
standby-gpios = <&gpio13 1 GPIO_ACTIVE_HIGH>;
max-bitrate = <8000000>;
#phy-cells = <0>;
};
};

&scif1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ toolchain:
supported:
- uart
- gpio
- can
1 change: 1 addition & 0 deletions drivers/can/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ zephyr_library_sources_ifdef(CONFIG_CAN_NUMAKER can_numaker.c)
zephyr_library_sources_ifdef(CONFIG_CAN_NXP_S32_CANXL can_nxp_s32_canxl.c)
zephyr_library_sources_ifdef(CONFIG_CAN_RCAR can_rcar.c)
zephyr_library_sources_ifdef(CONFIG_CAN_RENESAS_RA_CANFD can_renesas_ra.c)
zephyr_library_sources_ifdef(CONFIG_CAN_RENESAS_RZ_CANFD can_renesas_rz_canfd.c)
zephyr_library_sources_ifdef(CONFIG_CAN_SAM can_sam.c)
zephyr_library_sources_ifdef(CONFIG_CAN_SAM0 can_sam0.c)
zephyr_library_sources_ifdef(CONFIG_CAN_SJA1000 can_sja1000.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/can/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ source "drivers/can/Kconfig.mcp251xfd"
source "drivers/can/Kconfig.xmc4xxx"
source "drivers/can/Kconfig.nrf"
source "drivers/can/Kconfig.renesas_ra"
source "drivers/can/Kconfig.renesas_rz"

source "drivers/can/transceiver/Kconfig"

Expand Down
10 changes: 10 additions & 0 deletions drivers/can/Kconfig.renesas_rz
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2024 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config CAN_RENESAS_RZ_CANFD
bool "Renesas RZ CANFD"
default y
depends on DT_HAS_RENESAS_RZ_CANFD_ENABLED
select USE_RZ_FSP_CANFD
help
Enable Renesas RZ CANFD driver
Loading
Loading