Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,92 @@
i2c5_sda_default: i2c5_sda_default {
pin = <PIN_SDA5 FUNC_SDA5>;
};

can0_rx_default: can0_rx_default {
pin = <PIN_CAN0RX_INTP0 FUNC_CAN0RX_INTP0>;
};

can0_tx_default: can0_tx_default {
pin = <PIN_CAN0TX FUNC_CAN0TX>;
};

can1_rx_default: can1_rx_default {
pin = <PIN_CAN1RX_INTP1 FUNC_CAN1RX_INTP1>;
};

can1_tx_default: can1_tx_default {
pin = <PIN_CAN1TX FUNC_CAN1TX>;
};

can2_rx_default: can2_rx_default {
pin = <PIN_CAN2RX_INTP2 FUNC_CAN2RX_INTP2>;
};

can2_tx_default: can2_tx_default {
pin = <PIN_CAN2TX FUNC_CAN2TX>;
};

can3_rx_default: can3_rx_default {
pin = <PIN_CAN3RX_INTP3 FUNC_CAN3RX_INTP3>;
};

can3_tx_default: can3_tx_default {
pin = <PIN_CAN3TX FUNC_CAN3TX>;
};

can4_rx_default: can4_rx_default {
pin = <PIN_CAN4RX_INTP4 FUNC_CAN4RX_INTP4>;
};

can4_tx_default: can4_tx_default {
pin = <PIN_CAN4TX FUNC_CAN4TX>;
};

can5_rx_default: can5_rx_default {
pin = <PIN_CAN5RX_INTP5 FUNC_CAN5RX_INTP5>;
};

can5_tx_default: can5_tx_default {
pin = <PIN_CAN5TX FUNC_CAN5TX>;
};

can6_rx_default: can6_rx_default {
pin = <PIN_CAN6RX_INTP6 FUNC_CAN6RX_INTP6>;
};

can6_tx_default: can6_tx_default {
pin = <PIN_CAN6TX FUNC_CAN6TX>;
};

can12_rx_default: can12_rx_default {
pin = <PIN_CAN12RX_INTP12 FUNC_CAN12RX_INTP12_B>;
};

can12_tx_default: can12_tx_default {
pin = <PIN_CAN12TX FUNC_CAN12TX_B>;
};

can13_rx_default: can13_rx_default {
pin = <PIN_CAN13RX_INTP13 FUNC_CAN13RX_INTP13_B>;
};

can13_tx_default: can13_tx_default {
pin = <PIN_CAN13TX FUNC_CAN13TX_B>;
};

can14_rx_default: can14_rx_default {
pin = <PIN_CAN14RX_INTP14 FUNC_CAN14RX_INTP14_B>;
};

can14_tx_default: can14_tx_default {
pin = <PIN_CAN14TX FUNC_CAN14TX_B>;
};

can15_rx_default: can15_rx_default {
pin = <PIN_CAN15RX_INTP15 FUNC_CAN15RX_INTP15_B>;
};

can15_tx_default: can15_tx_default {
pin = <PIN_CAN15TX FUNC_CAN15TX_B>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
zephyr,sram = &sram0;
zephyr,console = &hscif1;
zephyr,shell-uart = &hscif1;
zephyr,canbus = &can0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You need to add can to boards/renesas/rcar_ironhide_x5h/rcar_ironhide_x5h_r8a78000_r52.yaml as well for this board to be picked up by twister for any CAN tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for spotting this, it's now fixed.

};

aliases {
Expand Down Expand Up @@ -106,3 +107,88 @@
clock-frequency = <I2C_BITRATE_FAST>;
status = "okay";
};

&can0_global {
status = "okay";
};

&can1_global {
status = "okay";
};

&can0 {
pinctrl-0 = <&can0_rx_default
&can0_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can1 {
pinctrl-0 = <&can1_rx_default
&can1_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can2 {
pinctrl-0 = <&can2_rx_default
&can2_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can3 {
pinctrl-0 = <&can3_rx_default
&can3_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can4 {
pinctrl-0 = <&can4_rx_default
&can4_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can5 {
pinctrl-0 = <&can5_rx_default
&can5_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can6 {
pinctrl-0 = <&can6_rx_default
&can6_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can12 {
pinctrl-0 = <&can12_rx_default
&can12_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can13 {
pinctrl-0 = <&can13_rx_default
&can13_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can14 {
pinctrl-0 = <&can14_rx_default
&can14_tx_default>;
pinctrl-names = "default";
status = "okay";
};

&can15 {
pinctrl-0 = <&can15_rx_default
&can15_tx_default>;
pinctrl-names = "default";
status = "okay";
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ toolchain:
- zephyr
- gnuarmemb
supported:
- can
- clock_control
- gpio
- uart
- i2c
- uart
1 change: 1 addition & 0 deletions drivers/can/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ zephyr_library_sources_ifdef(CONFIG_CAN_NUMAKER can_numaker.c)
zephyr_library_sources_ifdef(CONFIG_CAN_NXP_LPC_MCAN can_nxp_lpc_mcan.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_RCAR_RSCANFD can_rcar_rscanfd.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)
Expand Down
18 changes: 18 additions & 0 deletions drivers/can/Kconfig.rcar
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,21 @@ config CAN_RCAR_MAX_FILTERS
help
Defines the array size of the callback/msgq pointers.
Must be at least the size of concurrent reads.

config CAN_RCAR_RSCANFD
bool "Renesas R-Car RS-CANFD Driver"
default y
depends on DT_HAS_RENESAS_RCAR_RSCANFD_GLOBAL_ENABLED
select PINCTRL
help
Enable Renesas R-Car CAN Driver for the RS-CANFD controller,
found in Gen 4 and more recent platforms.

config CAN_RCAR_RSCANFD_MAX_FILTERS
int "Maximum number of concurrent active reception filters"
depends on CAN_RCAR_RSCANFD
default 16
range 1 32
help
Defines the array size of the callback/msgq pointers.
Must be at least the size of concurrent reads.
Loading
Loading