Skip to content

Commit

Permalink
Merge pull request #15 from Meik152/dev-mcan
Browse files Browse the repository at this point in the history
add m_can drivers, device tree node and can_utils
  • Loading branch information
nbosb authored Aug 2, 2024
2 parents e2463c0 + 4edb27a commit a4988b6
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 3 deletions.
4 changes: 2 additions & 2 deletions linux/files/avp64-linux-defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2910,7 +2910,7 @@ BR2_PACKAGE_Z3_ARCH_SUPPORTS=y
BR2_PACKAGE_BRIDGE_UTILS=y
# BR2_PACKAGE_BWM_NG is not set
# BR2_PACKAGE_C_ICAP is not set
# BR2_PACKAGE_CAN_UTILS is not set
BR2_PACKAGE_CAN_UTILS=y
# BR2_PACKAGE_CANNELLONI is not set
# BR2_PACKAGE_CASYNC is not set
# BR2_PACKAGE_CFM is not set
Expand Down Expand Up @@ -2983,7 +2983,7 @@ BR2_PACKAGE_IFUPDOWN_SCRIPTS=y
# BR2_PACKAGE_IPCALC is not set
# BR2_PACKAGE_IPERF is not set
# BR2_PACKAGE_IPERF3 is not set
# BR2_PACKAGE_IPROUTE2 is not set
BR2_PACKAGE_IPROUTE2=y
# BR2_PACKAGE_IPSET is not set
# BR2_PACKAGE_IPTABLES is not set
# BR2_PACKAGE_IPTRAF_NG is not set
Expand Down
37 changes: 36 additions & 1 deletion linux/files/avp64_linux_kernel.config
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,12 @@ CONFIG_NET_FLOW_LIMIT=y
# end of Networking options

# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
CONFIG_CAN=y
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
CONFIG_CAN_GW=m
# CONFIG_CAN_J1939 is not set
# CONFIG_CAN_ISOTP is not set
CONFIG_BT=m
CONFIG_BT_BREDR=y
# CONFIG_BT_RFCOMM is not set
Expand Down Expand Up @@ -1779,6 +1784,36 @@ CONFIG_FIXED_PHY=y
# CONFIG_XILINX_GMII2RGMII is not set
# CONFIG_MICREL_KS8995MA is not set
# CONFIG_PSE_CONTROLLER is not set
CONFIG_CAN_DEV=y
# CONFIG_CAN_VCAN is not set
# CONFIG_CAN_VXCAN is not set
CONFIG_CAN_NETLINK=y
CONFIG_CAN_CALC_BITTIMING=y
CONFIG_CAN_RX_OFFLOAD=y
# CONFIG_CAN_CAN327 is not set
# CONFIG_CAN_FLEXCAN is not set
# CONFIG_CAN_GRCAN is not set
# CONFIG_CAN_SLCAN is not set
# CONFIG_CAN_XILINXCAN is not set
# CONFIG_CAN_C_CAN is not set
# CONFIG_CAN_CC770 is not set
# CONFIG_CAN_CTUCANFD_PLATFORM is not set
# CONFIG_CAN_IFI_CANFD is not set
CONFIG_CAN_M_CAN=y
CONFIG_CAN_M_CAN_PLATFORM=y
# CONFIG_CAN_M_CAN_TCAN4X5X is not set
# CONFIG_CAN_SJA1000 is not set
# CONFIG_CAN_SOFTING is not set

#
# CAN SPI interfaces
#
# CONFIG_CAN_HI311X is not set
# CONFIG_CAN_MCP251X is not set
# CONFIG_CAN_MCP251XFD is not set
# end of CAN SPI interfaces

# CONFIG_CAN_DEBUG_DEVICES is not set
CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_BUS=y
CONFIG_FWNODE_MDIO=y
Expand Down
6 changes: 6 additions & 0 deletions linux/files/config/buildroot.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ system.addr_rtc = 0x1000e000..0x1000efff
system.addr_gpio = 0x1000f000..0x1000ffff
system.addr_lan0 = 0x10010000..0x1001ffff
system.addr_spi = 0x10020000..0x10020fff
system.addr_can = 0x10021000..0x10021fff
system.cpu.addr_gic_distif = 0x10140000..0x10140fff
system.cpu.addr_gic_cpuif = 0x10141000..0x10142fff
system.cpu.addr_gic_vifctrl = 0x10143000..0x10144fff
Expand All @@ -67,6 +68,8 @@ system.irq_uart3 = 8
system.irq_lan0 = 9
system.irq_sdhci = 10
system.irq_spi = 11
system.irq_can0 = 14
system.irq_can1 = 15
system.cpu.irq_gt_hyp = 10
system.cpu.irq_gt_virt = 11
system.cpu.irq_gt_ns = 14
Expand Down Expand Up @@ -94,3 +97,6 @@ system.term3.backends = tcp:52013 # term|file|tap|null
# ETHOC configuration
system.lan0.eeprom_mac = 3a:44:1d:55:11:5a
system.bridge.backends = slirp:0

# CAN configuration
system.canbridge.backends = file # socket:<vcan_socket>
22 changes: 22 additions & 0 deletions linux/files/dt/avp64.dts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,28 @@
};
};

m_can0: can@10021000 {
compatible = "bosch,m_can";
reg = <0x0 0x10021000 0x0 0x1000>, <0x0 0x10022000 0x0 0x4000>;
reg-names = "m_can", "message_ram";
interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
clocks = <&v2m_clk24mhz>,
<&v2m_clk24mhz>;
clock-names = "hclk", "cclk";
bosch,mram-cfg = <
0x0
0 // 11-bit Filter 0-128 elements / 0-128 words
0 // 29-bit Filter 0-64 elements / 0-128 words
32 // Rx FIFO 0 0-64 elements / 0-1152 words
0 // Rx FIFO 1 0-64 elements / 0-1152 words
0 // Rx Buffers 0-64 elements / 0-1152 words
2 // Tx Event FIFO 0-32 elements / 0-64 words
2 // Tx Buffers 0-32 elements / 0-576 words
>;
};

gpio0: gpio@1000f000 {
compatible = "brcm,bcm6345-gpio";
reg = <0x0 0x1000f000 0x0 0x4>;
Expand Down

0 comments on commit a4988b6

Please sign in to comment.