net: can: rockchip: add rk3562 can driver

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Ib65f067992701eb73608cc2964b4fc62d792d3f7
This commit is contained in:
Elaine Zhang
2022-10-28 16:06:07 +08:00
committed by Tao Huang
parent 72bf53173b
commit ee262b3382
4 changed files with 1112 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
Rockchip CANFD controller Device Tree Bindings
---------------------------------------------------------
Required properties:
- compatible : Should be:
- "rockchip,rk3562-can" for RK3562 CAN controllers 3.0
- "rockchip,rk3562-canfd" for RK3562 CANFD controllers 3.0
- reg : Physical base address and size of the controller
registers map.
- interrupts : Property with a value describing the interrupt
number.
- clock-names : List of input clock names
- "can_clk", "pclk",
(See clock bindings for details).
- clocks : Clock phandles (see clock bindings for details).
- resets : Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names : List of input reset names
- "can", "can-apb".
Example:
For Dts file:
can0: can0@ff600000 {
compatible = "rockchip,rk3562-can";
reg = <0x0 0xff600000 0x0 0x1000>;
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru CLK_CAN0>, <&cru PCLK_CAN0>;
clock-names = "baudclk", "apb_pclk";
resets = <&cru SRST_CAN0>, <&cru SRST_P_CAN0>;
reset-names = "can", "can-apb";
status = "okay";
};

View File

@@ -17,6 +17,15 @@ config CANFD_ROCKCHIP
To compile this driver as a module, choose M here: the module will
be called rockchip_canfd.
config CAN_RK3562
tristate "RK3562 CAN controller"
depends on ARCH_ROCKCHIP
help
Say Y here if you want to use CAN controller found on RK3562 SoCs.
To compile this driver as a module, choose M here: the module will
be called rk3562_can.
config CANFD_RK3576
tristate "RK3576 CANFD controller"
depends on ARCH_ROCKCHIP

View File

@@ -5,4 +5,5 @@
obj-$(CONFIG_CAN_ROCKCHIP) += rockchip_can.o
obj-$(CONFIG_CANFD_ROCKCHIP) += rockchip_canfd.o
obj-$(CONFIG_CAN_RK3562) += rk3562_can.o
obj-$(CONFIG_CANFD_RK3576) += rk3576_canfd.o

File diff suppressed because it is too large Load Diff