drivers: can: remove CAN_HAS_CANFD Kconfig helper

Remove the CAN_HAS_CANFD Kconfig helper symbol in order to allow enabling
CAN-FD support in the API regardless of driver support.

Change default to CAN-FD support being disabled and have samples and tests
that require CAN-FD support turn it on. This aligns the default
configuration across CAN controller drivers regardless of their
capabilities.

The rationale behind this is that we are starting to see MCUs with multiple
CAN controllers, some CAN-FD compatible, some not (e.g. NXP i.MX RT1060 and
FPGAs). Automatically enabling CAN-FD support based on the presence of a
CAN-FD capable CAN controller leads to different application default
settings based on the CAN controller(s) in use.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
diff --git a/drivers/can/Kconfig b/drivers/can/Kconfig
index 3c137fa..9875c3d 100644
--- a/drivers/can/Kconfig
+++ b/drivers/can/Kconfig
@@ -55,17 +55,10 @@
 	help
 	  Enable CAN controller device statistics.
 
-config CAN_HAS_CANFD
-	bool
-	help
-	  driver supports CAN-FD
-
 config CAN_FD_MODE
 	bool "CAN-FD"
-	default y
-	depends on CAN_HAS_CANFD
 	help
-	  Enable CAN-FD compatible API
+	  Enable CAN-FD support. Not all CAN controllers support CAN-FD.
 
 config CAN_RX_TIMESTAMP
 	bool "Receiving timestamps"
diff --git a/drivers/can/Kconfig.fake b/drivers/can/Kconfig.fake
index 21453bd..641bae2 100644
--- a/drivers/can/Kconfig.fake
+++ b/drivers/can/Kconfig.fake
@@ -7,6 +7,5 @@
 	bool "Fake CAN driver"
 	default y
 	depends on DT_HAS_ZEPHYR_FAKE_CAN_ENABLED
-	select CAN_HAS_CANFD
 	help
 	  Enable support for the FFF-based fake CAN driver.
diff --git a/drivers/can/Kconfig.loopback b/drivers/can/Kconfig.loopback
index 4a812b1..b618da1 100644
--- a/drivers/can/Kconfig.loopback
+++ b/drivers/can/Kconfig.loopback
@@ -7,7 +7,6 @@
 	bool "Emulated CAN loopback driver"
 	default y
 	depends on DT_HAS_ZEPHYR_CAN_LOOPBACK_ENABLED
-	select CAN_HAS_CANFD
 	help
 	  This is an emulated driver that can only loopback messages.
 
diff --git a/drivers/can/Kconfig.mcan b/drivers/can/Kconfig.mcan
index e5d9518..6b25df3 100644
--- a/drivers/can/Kconfig.mcan
+++ b/drivers/can/Kconfig.mcan
@@ -5,7 +5,6 @@
 
 config CAN_MCAN
 	bool
-	select CAN_HAS_CANFD
 	help
 	  Enable Bosch m_can driver.
 	  This driver supports the Bosch m_can IP. This IP is built into the
diff --git a/samples/drivers/can/babbling/Kconfig b/samples/drivers/can/babbling/Kconfig
index dd25528..c980476 100644
--- a/samples/drivers/can/babbling/Kconfig
+++ b/samples/drivers/can/babbling/Kconfig
@@ -23,7 +23,7 @@
 
 config SAMPLE_CAN_BABBLING_FD_MODE
 	bool "Send CAN-FD format frames"
-	depends on CAN_FD_MODE
+	select CAN_FD_MODE
 	help
 	  Babbling node sends CAN-FD format frames.
 
diff --git a/samples/modules/canopennode/prj.conf b/samples/modules/canopennode/prj.conf
index 43fa66b..887f3e4 100644
--- a/samples/modules/canopennode/prj.conf
+++ b/samples/modules/canopennode/prj.conf
@@ -4,7 +4,6 @@
 CONFIG_GPIO=y
 
 CONFIG_CAN=y
-CONFIG_CAN_FD_MODE=n
 CONFIG_CAN_MAX_FILTER=13
 
 CONFIG_FLASH=y
diff --git a/samples/modules/canopennode/prj_no_storage.conf b/samples/modules/canopennode/prj_no_storage.conf
index 1e136a9..2d0ec6b 100644
--- a/samples/modules/canopennode/prj_no_storage.conf
+++ b/samples/modules/canopennode/prj_no_storage.conf
@@ -4,7 +4,6 @@
 CONFIG_GPIO=y
 
 CONFIG_CAN=y
-CONFIG_CAN_FD_MODE=n
 CONFIG_CAN_MAX_FILTER=13
 
 CONFIG_CANOPEN=y
diff --git a/tests/drivers/can/api/prj.conf b/tests/drivers/can/api/prj.conf
index 2fb7716..c84ba71 100644
--- a/tests/drivers/can/api/prj.conf
+++ b/tests/drivers/can/api/prj.conf
@@ -1,5 +1,4 @@
 CONFIG_CAN=y
-CONFIG_CAN_FD_MODE=n
 CONFIG_CAN_AUTO_BUS_OFF_RECOVERY=n
 CONFIG_TEST_USERSPACE=y
 CONFIG_ZTEST=y
diff --git a/tests/drivers/can/timing/prj.conf b/tests/drivers/can/timing/prj.conf
index 2f72acd..52b5adf 100644
--- a/tests/drivers/can/timing/prj.conf
+++ b/tests/drivers/can/timing/prj.conf
@@ -1,4 +1,5 @@
 CONFIG_CAN=y
+CONFIG_CAN_FD_MODE=y
 CONFIG_TEST_USERSPACE=y
 CONFIG_ZTEST=y
 CONFIG_ZTEST_NEW_API=y