soc: nxp: ke1xf: add CAN support
Add support for the FlexCAN controllers found in the NXP Kinetis KE1xF SoC series. Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
b5e3be9e8a
commit
52cfe30d5e
11 changed files with 92 additions and 0 deletions
|
@ -5,3 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nxp/nxp_ke1xf256vlx16.dtsi>
|
#include <nxp/nxp_ke1xf256vlx16.dtsi>
|
||||||
|
|
||||||
|
/delete-node/ &can0;
|
||||||
|
/delete-node/ &can1;
|
||||||
|
|
|
@ -5,3 +5,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nxp/nxp_ke1xf512vlx16.dtsi>
|
#include <nxp/nxp_ke1xf512vlx16.dtsi>
|
||||||
|
|
||||||
|
/delete-node/ &can0;
|
||||||
|
/delete-node/ &can1;
|
||||||
|
|
|
@ -5,3 +5,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nxp/nxp_ke1xf256vlx16.dtsi>
|
#include <nxp/nxp_ke1xf256vlx16.dtsi>
|
||||||
|
|
||||||
|
/delete-node/ &can1;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
can-0 = &can0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -5,3 +5,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nxp/nxp_ke1xf512vlx16.dtsi>
|
#include <nxp/nxp_ke1xf512vlx16.dtsi>
|
||||||
|
|
||||||
|
/delete-node/ &can1;
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
can-0 = &can0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -5,3 +5,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nxp/nxp_ke1xf256vlx16.dtsi>
|
#include <nxp/nxp_ke1xf256vlx16.dtsi>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
can-0 = &can0;
|
||||||
|
can-1 = &can1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -5,3 +5,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nxp/nxp_ke1xf512vlx16.dtsi>
|
#include <nxp/nxp_ke1xf512vlx16.dtsi>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
aliases {
|
||||||
|
can-0 = &can0;
|
||||||
|
can-1 = &can1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arm/armv7-m.dtsi>
|
#include <arm/armv7-m.dtsi>
|
||||||
|
#include <dt-bindings/clock/kinetis_scg.h>
|
||||||
#include <dt-bindings/gpio/gpio.h>
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
#include <dt-bindings/i2c/i2c.h>
|
#include <dt-bindings/i2c/i2c.h>
|
||||||
|
|
||||||
|
@ -170,6 +171,42 @@
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
can0: can@40024000 {
|
||||||
|
compatible = "nxp,kinetis-flexcan";
|
||||||
|
reg = <0x40024000 0x1000>;
|
||||||
|
interrupts = <78 0>, <79 0>, <80 0>, <81 0>;
|
||||||
|
interrupt-names = "warning", "error", "wake-up",
|
||||||
|
"mb-0-15";
|
||||||
|
clocks = <&scg KINETIS_SCG_BUS_CLK>;
|
||||||
|
clk-source = <1>;
|
||||||
|
label = "CAN_0";
|
||||||
|
sjw = <1>;
|
||||||
|
prop-seg = <1>;
|
||||||
|
phase-seg1 = <3>;
|
||||||
|
phase-seg2 = <2>;
|
||||||
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
can1: can@40025000 {
|
||||||
|
compatible = "nxp,kinetis-flexcan";
|
||||||
|
reg = <0x40025000 0x1000>;
|
||||||
|
interrupts = <85 0>, <86 0>, <87 0>, <88 0>;
|
||||||
|
interrupt-names = "warning", "error", "wake-up",
|
||||||
|
"mb-0-15";
|
||||||
|
clocks = <&scg KINETIS_SCG_BUS_CLK>;
|
||||||
|
clk-source = <1>;
|
||||||
|
label = "CAN_1";
|
||||||
|
sjw = <1>;
|
||||||
|
prop-seg = <1>;
|
||||||
|
phase-seg1 = <3>;
|
||||||
|
phase-seg2 = <2>;
|
||||||
|
status = "disabled";
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
pinmux_a: pinmux@40049000 {
|
pinmux_a: pinmux@40049000 {
|
||||||
compatible = "nxp,kinetis-pinmux";
|
compatible = "nxp,kinetis-pinmux";
|
||||||
reg = <0x40049000 0x1000>;
|
reg = <0x40049000 0x1000>;
|
||||||
|
|
|
@ -11,4 +11,11 @@ config SOC
|
||||||
string
|
string
|
||||||
default "mke16f16"
|
default "mke16f16"
|
||||||
|
|
||||||
|
if CAN
|
||||||
|
|
||||||
|
config CAN_MCUX_FLEXCAN
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # CAN
|
||||||
|
|
||||||
endif # SOC_MKE16F16
|
endif # SOC_MKE16F16
|
||||||
|
|
|
@ -11,4 +11,11 @@ config SOC
|
||||||
string
|
string
|
||||||
default "mke18f16"
|
default "mke18f16"
|
||||||
|
|
||||||
|
if CAN
|
||||||
|
|
||||||
|
config CAN_MCUX_FLEXCAN
|
||||||
|
default y
|
||||||
|
|
||||||
|
endif # CAN
|
||||||
|
|
||||||
endif # SOC_MKE18F16
|
endif # SOC_MKE18F16
|
||||||
|
|
|
@ -14,9 +14,11 @@ config SOC_MKE14F16
|
||||||
|
|
||||||
config SOC_MKE16F16
|
config SOC_MKE16F16
|
||||||
bool "MKE16F16"
|
bool "MKE16F16"
|
||||||
|
select HAS_MCUX_FLEXCAN
|
||||||
|
|
||||||
config SOC_MKE18F16
|
config SOC_MKE18F16
|
||||||
bool "MKE18F16"
|
bool "MKE18F16"
|
||||||
|
select HAS_MCUX_FLEXCAN
|
||||||
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
|
|
@ -93,3 +93,6 @@
|
||||||
#define DT_SPI_2_IRQ_PRI DT_NXP_IMX_LPSPI_4002D000_IRQ_0_PRIORITY
|
#define DT_SPI_2_IRQ_PRI DT_NXP_IMX_LPSPI_4002D000_IRQ_0_PRIORITY
|
||||||
#define DT_SPI_2_CLOCK_NAME DT_NXP_IMX_LPSPI_4002D000_CLOCK_CONTROLLER
|
#define DT_SPI_2_CLOCK_NAME DT_NXP_IMX_LPSPI_4002D000_CLOCK_CONTROLLER
|
||||||
#define DT_SPI_2_CLOCK_SUBSYS DT_NXP_IMX_LPSPI_4002D000_CLOCK_NAME
|
#define DT_SPI_2_CLOCK_SUBSYS DT_NXP_IMX_LPSPI_4002D000_CLOCK_NAME
|
||||||
|
|
||||||
|
#define DT_CAN_0_NAME DT_NXP_KINETIS_FLEXCAN_40024000_LABEL
|
||||||
|
#define DT_CAN_1_NAME DT_NXP_KINETIS_FLEXCAN_40025000_LABEL
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue