Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <dt-bindings/interrupt-controller/irq.h>
- /dts-v1/;
- /plugin/;
- &{/chosen} {
- overlays {
- BBAI-MCP2515-SPI = __TIMESTAMP__;
- };
- };
- &{/} {
- mcp2515_clock: mcp2515-clock {
- #clock-cells = <0>;
- compatible = "fixed-clock";
- clock-frequency = <16000000>;
- };
- };
- &ocp {
- P9_23_pinmux { status = "disabled"; }; // cs
- P9_18_pinmux { status = "disabled"; }; // mosi
- P9_21_pinmux { status = "disabled"; }; // miso
- P9_22_pinmux { status = "disabled"; }; // clk
- P9_24_pinmux { status = "disabled"; }; // int
- };
- &bone_spi_0 {
- status = "okay";
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&P9_23_spi_cs_pin>, //cs
- <&P9_18_spi_pin>, //mosi
- <&P9_21_spi_pin>, //miso
- <&P9_22_spi_sclk_pin>; //clk
- can@0 {
- compatible = "microchip,mcp2515";
- reg = <1>;
- mode = <0>;
- spi-max-frequency = <10000000>;
- clocks = <&mcp2515_clock>;
- pinctrl-names = "default";
- pinctrl-0 = <&P9_24_gpio_pin>; // GPIO6_15 corresponds to P9_24 for interrupt signal
- interrupts-extended = <&gpio6 15 IRQ_TYPE_EDGE_FALLING>; // Using GPIO6_15 as the interrupt
- mcp251x,oscillator-frequency = <16000000>;
- mcp251x,irq-gpios = <&gpio4 21 0>;
- mcp251x,stay-awake = <1>;
- mcp251x,enable-clkout = <1>;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement