Tool/software: Linux
Hi,
I'm looking for any device tree structures that can help bring this up. Everything I've found on the internet doesn't seem to work for Beaglebone Black. I'm wondering my interrupt pins might not configure correctly. Please refer to the following.
Click Pin BBB Pin Signal Mode $PINS ADDR/OFFSET GPIO NO.
CS P9.28 SPI1_CS0 3 103 0x99c/19c 113
SCK P9.31 SPI1_SCLK 3 100 0x990/190 110
MISO P9.29 SPI1_D0 3 101 0x994/194 111
MOSI P9.30 SPI1_D1 3 102 0x998/198 112
INT P9.15 GPIO1_16 7 16 0x840/040 48
am33xx.dts
ocp: ocp {
...
spi1: spi@481a0000 {
compatible = "ti,omap4-mcspi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x481a0000 0x400>;
interrupts = <125>;
ti,spi-num-cs = <2>;
ti,hwmods = "spi1";
dmas = <&edma 42 0
&edma 43 0
&edma 44 0
&edma 45 0>;
dma-names = "tx0", "rx0", "tx1", "rx1";
status = "disabled";
};
am335x-bone-common.dtsi
&am33xx_pinmux {
...
spi1_pins: pinmux_spi1_pins {
pinctrl-single,pins = <
0x190 0x33 /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
0x194 0x33 /* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */
0x198 0x13 /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
0x19c 0x13 /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
>;
};
gpio_pins: pinmux_gpio_pins {
pinctrl-single,pins = <
0x040 0x17 /* gpmc_a0.gpio1_16, OUTPUT_PULLUP | MODE7 */
>;
};
};
...
&spi1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
#address-cells = <1>;
#size-cells = <0>;
/* add any spi devices connected here */
/* note that you can do direct SPI via spidev now */
spi1_0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "microchip,enc28j60";
reg = <0>;
spi-max-frequency = <20000000>;
interrupt-parent=<&gpio_pins>;
interrupts=<48 0x2>; /* falling edge */
spi-cpol;
spi-cpha;
};
};