Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
debian@beaglebone:/opt/source/bb.org-overlays/src/arm$ ls
ACME-revB.dts BB-I2C2-RTC-DS1338.dts cape-univ-emmc-00A0.dts
AM335X-20-00A0.dts BBIM-00A0.dts cape-universal-00A0.dts
AM335X-I2C1-400-00A0.dts bb-justboom-amp-00A0.dts cape-universala-00A0.dts
AM335X-I2C2-400-00A0.dts bb-justboom-dac-00A0.dts cape-universalh-00A0.dts
AM335X-PRU-RPROC-4-14-TI-00A0.dts bb-justboom-digi-00A0.dts cape-universaln-00A0.dts
AM335X-PRU-RPROC-4-14-TI-PRUCAPE-00A0.dts BB-LCD-ADAFRUIT-18-SPI1-00A0.dts cape-univ-hdmi-00A0.dts
AM335X-PRU-RPROC-4-19-TI-00A0.dts BB-mBC1-ETH-CLICK.dts dev-USB-PWR-CTL-00A1.dts
AM335X-PRU-RPROC-4-19-TI-PRUCAPE-00A0.dts BB-mBC1-ETH-WIZ-CLICK.dts DLPDLCR2000-00A0.dts
AM335X-PRU-RPROC-4-4-TI-00A0.dts BB-mBC1-RTC-5-CLICK.dts DVK530-LCD4-01-00A0.dts
AM335X-PRU-RPROC-4-4-TI-PRUCAPE-00A0.dts BB-mBC1-RTC-6-CLICK.dts GHI-DB-NH5C-00A0.dts
AM335X-PRU-RPROC-4-9-TI-00A0.dts BB-mBC2-ETH-CLICK.dts GHI-LCD-00A0.dts
AM335X-PRU-RPROC-4-9-TI-PRUCAPE-00A0.dts BB-mBC2-ETH-WIZ-CLICK.dts GHI-TH-NH43C-00A0.dts
AM335X-PRU-UIO-00A0.dts BB-mBC2-RTC-5-CLICK.dts GHI-TH-NH43R-00A0.dts
am33xx_pwm-00A0.dts BB-mBC2-RTC-6-CLICK.dts GHI-TH-NH7C-00A0.dts
BB-ADC-00A0.dts BB-mBC2-UART1-TESEO-LIV3F.dts M-BB-BBG-00A0.dts
BB-BBBMINI-00A0.dts BB-mBC3-ETH-CLICK.dts M-BB-OSD3358-SM-RED-00A0.dts
BB-BBBW-WL1835-00A0.dts BB-mBC3-ETH-WIZ-CLICK.dts MCP2515-SPI0.dts
BB-BBGW-WL1835-00A0.dts BB-mBC3-RTC-5-CLICK.dts NL-AB-BBBC-00D0.dts
BB-BBGW-WL1835-1BIT-00A0.dts BB-mBC3-RTC-6-CLICK.dts NL-AB-BBCL-00B0.dts
BB-BELA-B2.dts BB-mBC3-UART1-TESEO-LIV3F.dts OSD3358-00A0.dts
BB-BONE-4D4C-01-00A1.dts BB-mBC4-ETH-CLICK.dts PB-I2C1-MPU-9DOF-CLICK.dts
BB-BONE-4D4N-01-00A1.dts BB-mBC4-ETH-WIZ-CLICK.dts PB-I2C1-RTC-6-CLICK.dts
BB-BONE-4D4R-01-00A1.dts BB-mBC4-RTC-6-CLICK.dts PB-I2C1-RTC-CLICK.dts
BB-BONE-4D5C-01-00A1.dts BB-mBC4-UART4-TESEO-LIV3F.dts PB-I2C1-RTC-PCF8523.dts
BB-BONE-4D5N-01-00A1.dts BB-NHDMI-TDA998x-00A0.dts PB-I2C1-WEATHER-CLICK.dts
BB-BONE-4D5R-01-00A1.dts BBORG_DISPLAY70-00A2.dts PB-I2C2-ACCEL-TECHLAB-CAPE.dts
BB-BONE-4D7C-01-00A1.dts BBORG_GAMEPUP-00A2.dts PB-I2C2-MPU-9DOF-CLICK.dts
BB-BONE-4D7N-01-00A1.dts BBORG_MOTOR-00A2.dts PB-I2C2-RTC-6-CLICK.dts
BB-BONE-4D7R-01-00A1.dts BBORG_PROTO-00A2.dts PB-I2C2-RTC-CLICK.dts
BB-BONE-AUDI-02-00A0.dts BBORG_TECHLAB-00A2.dts PB-I2C2-RTC-PCF8523.dts
BB-BONE-BACONE-00A0.dts BB-PWM0-00A0.dts PB-I2C2-WEATHER-CLICK.dts
BB-BONE-CRYPTO-00A0.dts BB-PWM1-00A0.dts PB-MCP2515-SPI1.dts
BB-BONE-DVID-01-00A3.dts BB-PWM2-00A0.dts PB-PWM-RGB-TECHLAB-CAPE.dts
BB-BONE-eMMC1-01-00A0.dts BB-PWM-TIMER-P8.07.dts PB-SPI0-ETH-CLICK.dts
BB-BONE-LCD3-01-00A2.dts BB-PWM-TIMER-P8.08.dts PB-SPI0-ETH-WIZ-CLICK.dts
BB-BONE-LCD4-01-00A1.dts BB-PWM-TIMER-P8.09.dts PB-SPI0-MICROSD-CLICK.dts
BB-BONE-LCD5-01-00A1.dts BB-PWM-TIMER-P8.10.dts PB-SPI0-OLEDB-CLICK.dts
BB-BONE-LCD7-01-00A1.dts BB-RELAY-4PORT-00A0.dts PB-SPI0-OLEDC-CLICK.dts
BB-BONE-LCD7-01-00A2.dts BB-RTC-01-00A0.dts PB-SPI0-RTC-5-CLICK.dts
BB-BONE-LCD7-01-00A3.dts BB-SPI0-ADS8688-0A00.dts PB-SPI0-THUNDER-CLICK.dts
BB-BONE-NH7C-01-A0.dts BB-SPI0-MCP23S08-00A0.dts PB-SPI1-7SEG-TECHLAB-CAPE.dts
BB-BONE-REACH-00A0.dts BB-SPI0-MCP3008-00A0.dts PB-SPI1-ETH-CLICK.dts
BB-BONE-REACH-00B0.dts BB-SPIDEV0-00A0.dts PB-SPI1-ETH-WIZ-CLICK.dts
BB-BONE-REPLICAP-00A4.dts BB-SPIDEV1-00A0.dts PB-SPI1-MICROSD-CLICK.dts
BB-BONE-REPLICAP-00B1.dts BB-SPIDEV1A1-00A0.dts PB-SPI1-OLEDB-CLICK.dts
BB-BONE-REPLICAP-00B2.dts BB-UART1-00A0.dts PB-SPI1-OLEDC-CLICK.dts
BB-BONE-REPLICAP-00B3.dts BB-UART1-RTSCTS-00A0.dts PB-SPI1-RTC-5-CLICK.dts
BB-BONE-REPLICAP-0A4A.dts BB-UART2-00A0.dts PB-SPI1-THUNDER-CLICK.dts
BB-BONE-REPLICAP-0B3A.dts BB-UART2-RTSCTS-00A0.dts PB-UART4-GNSS-4-CLICK.dts
BB-BONE-SERL-03-00A1.dts BB-UART3-00A0.dts PB-UART4-GNSS-5-CLICK.dts
BB-BONE-WL1837-00A0.dts BB-UART4-00A0.dts PB-UART4-TESEO-LIV3F.dts
BB-BONE-WTHR-01-00B0.dts BB-UART4-RS485-00A0.dts RoboticsCape-00A0.dts
BB-CAN0-00A0.dts BB-UART4-RTSCTS-00A0.dts seeed-4mic-voicecard-00A0.dts
BB-CAN1-00A0.dts BB-UART5-00A0.dts uio_pruss_enable-00A0.dts
BB-CAPE-DISP-CT4-00A0.dts BB-UART5-RTSCTS-00A0.dts univ-all-00A0.dts
bb-cape-universal.dtsi BB-VIEW-LCD4-01-00A0.dts univ-bbb-EVA-00A0.dts
BB-CTAG-SW-16CH-00A0.dts BB-VIEW-LCD7-01-00A0.dts univ-bbb-EVx-00A0.dts
BB-CTAG-SW-8CH-00A0.dts BB-W1-P9.12-00A0.dts univ-bbb-Exx-00A0.dts
BB-GATEWAY-WL1837-00A0.dts BEAGLEBOY-0013.dts univ-bbb-xVA-00A0.dts
BB-GREEN-HDMI-00A0.dts beaglelogic-00A0.dts univ-bbb-xVx-00A0.dts
BB-HDMI-TDA998x-00A0.dts bone_eqep0-00A0.dts univ-bbb-xxx-00A0.dts
BB-I2C1-00A0.dts bone_eqep1-00A0.dts univ-bbgw-00A0.dts
BB-I2C1-FAST-00A0.dts bone_eqep2-00A0.dts univ-bbgw-EW-00A0.dts
BB-I2C1-MCP7940X-00A0.dts bone_eqep2b-00A0.dts univ-bbgw-Ex-00A0.dts
BB-I2C1-PCA9685-00A0.dts BW-ICE40Cape-00A0.dts univ-bbgw-xW-00A0.dts
BB-I2C1-RTC-PCF8563.dts BW-ICE40CapeV2-00A0.dts univ-bbgw-xx-00A0.dts
BB-I2C2-00A0.dts cape-bone-ibb-00A0.dts univ-emmc-00A0.dts
BB-I2C2-FAST-00A0.dts cape-bone-mrf24j40-00A0.dts univ-hdmi-00A0.dts
BB-I2C2-PCF8523-00A0.dts cape-CBB-Serial-r01.dts univ-nhdmi-00A0.dts
BB-I2C2-RTC-DS1307.dts cape-univ-audio-00A0.dts
debian@beaglebone:/opt/source/bb.org-overlays/src/arm$ cat PB-MCP2515-SPI1.dts
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
fragment@0 {
target = <&ocp>;
__overlay__ {
P2_25_pinmux { status = "disabled"; }; /* SPI1 MOSI - gpio1_9 */
P2_27_pinmux { status = "disabled"; }; /* SPI1 MISO - gpio1_8 */
P2_29_pinmux { status = "disabled"; }; /* SPI1 CLK - gpio0_7 */
P2_30_pinmux { status = "disabled"; }; /* SPI1 CS0 - gpio3_17 */
P2_31_pinmux { status = "disabled"; }; /* SPI1 CS1 - gpio0_19 */
P2_08_pinmux { status = "disabled"; }; /* SWC nINT */
P2_32_pinmux { status = "disabled"; }; /* SWC nRESET */
P2_06_pinmux { status = "disabled"; }; /* SWC M0 */
P2_18_pinmux { status = "disabled"; }; /* SWC M1 */
};
};
fragment@1 {
target = <&spi1>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
/* pinmux definitions used by pinctrl for these pins:
https://github.com/beagleboard/linux/blob/4.14/arch/arm/boot/dts/am335x-pocketbeagle.dts#L692
*/
pinctrl-0 = <
/* pull-up on P2_06 and P2_18 only yields 1.27V, so set high via /sys/class/gpio to get 3.3V for SWCAN normal mode */
&P2_06_gpio_pin /* SWC M0 */
&P2_18_gpio_pin /* SWC M1 */
&P2_32_gpio_pu_pin /* SWC nRESET: enable pullup */
&P2_08_default_pin /* SWC nINT: use mode 0x37 */
&P2_25_spi_pin /* SPI1 MOSI: uart0_rtsn.spi1_d1*/
&P2_27_spi_pin /* SPI1 MISO: uart0_ctsn.spi1_d0 */
&P2_29_spi_sclk_pin /* SPI1 CLK: eCAP0_in_PWM0_out.spi1_sclk */
&P2_30_spi_cs_pin /* SPI1 CS0: mcasp0_ahclkr.spi1_cs0 */
&P2_31_spi_cs_pin /* SPI1 CS1: xdma_event_intr0.spi1_cs1 */
>;
channel@0{ status = "disabled"; };
channel@1{ status = "disabled"; };
};
};
fragment@2 {
target = <&am33xx_pinmux>;
__overlay__ {
mcp2515_int: mcp2515_int {
pinctrl-single,pins = < 0x087 0x37 >;
};
};
};
fragment@3 {
target-path = "/";
__overlay__ {
mcp2515_clock: mcp2515_clock {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <8000000>;
};
};
};
fragment@4 {
target = <&spi1>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
can0: mcp2515@0 {
status = "okay";
/* use Chip Select 1. P2.31 pin is labelled
"SPI1 CS" on PB silk and is spi1_cs1 */
reg = <1>;
compatible = "microchip,mcp2515";
pinctrl-names = "default";
pinctrl-0 = <&mcp2515_int>;
spi-max-frequency = <10000000>;
interrupt-parent = <&gpio1>;
interrupts = <28 2>;
clocks = <&mcp2515_clock>;
mcp251x,oscillator-frequency = <8000000>;
mcp251x,irq-gpios = <&gpio1 28 0>;
mcp251x,stay-awake = <1>;
mcp251x,enable-clkout = <1>;
};
};
};
__overrides__ {
oscillator = <&mcp2515_clock>,"clock-frequency:0";
spimaxfrequency = <&can0>,"spi-max-frequency:0";
interrupt = <&mcp2515_int>,"pinctrl-single,pins:0",<&can0>,"interrupts:0";
};
};
debian@beaglebone:/opt/source/bb.org-overlays/src/arm$ ls -l PB-MCP2515-SPI1.dts
-rw-r--r-- 1 debian debian 4198 Apr 7 13:35 PB-MCP2515-SPI1.dts
debian@beaglebone:/opt/source/bb.org-overlays/src/arm$ sudo /opt/source/bb.org-overlays/install.sh
cp: cannot stat './tools/dtbo': No such file or directory
debian@beaglebone:/opt/source/bb.org-overlays/src/arm$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment