Stap 2: Mettre nl plaats le DTO (apparaat boom Overlay)
Avant d'activer le Kaap il faut le créer nl declarant zoon apparaat boom overlay, cela équivaut à attribuer les pins au Kaap.
Nous activons ici le SPI0 (voir afbeelding pour la disposition des Pins)
Entez les commandes: $ nano BB-SPI0-01-00A0.dts
Dans le fichier coller le texte suivant:
/DTS-v1 /;
/plugin/;
/ {
compatibel = "ti, beaglebone", "ti, beaglebone-zwart";
/ * identificatie * /
onderdeelnummer = "spi0pinmux";
fragment {}
doelstelling = < & am33xx_pinmux >;
__overlay__ {}
spi0_pins_s0: {spi0_pins_s0}
pinctrl-single, pinnen = <
0x150 0x30 / * spi0_sclk, OUTPUT_PULLUP | MODE0 * /
0x154 0x30 / * spi0_d0, INPUT_PULLUP | MODE0 * /
0x158 0x10 / * spi0_d1, OUTPUT_PULLUP | MODE0 * /
0x15c 0x10 / * spi0_cs0, OUTPUT_PULLUP | MODE0 * /
>;
};
};
};
fragment {} spidev {}
doelstelling = < & spi0 >;
__overlay__ {}
#address-cellen = < 1 >;
#size-cellen = < 0 >;
status = "Oke";
pinctrl-names = "standaard";
pinctrl-0 = < & spi0_pins_s0 >;
SPI-max-frequentie = < 24000000 >;
reg = < 0 >;
compatibel = "linux, spidev";
};
};
};
};
Puis Ctrl-X, Y.
Compiler avec: $ dtc - O dtb -o BB-SPI0-01-00A0.dtbo - b 0-@ BB-SPI0-01-00A0.dts
Copier dans le répertoire: $ cp BB-SPI0-01-00A0.dtbo/lib/firmware /
In dans la liste des capes: $ echo BB-SPI0-01 > /sys/devices/bone_capemgr.*/slots
Vous obtenez:
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O--bot-LT-eMMC - 2 G, 00A0, Texas Instrument, BB-BONE-EMMC - 2 G
5: ff:P-O--bot-zwart-HDMI, 00A0, Texas Instrument, BB-BONELT-HDMI
6: ff:P-O--bot-zwart-HDMIN, 00A0, Texas Instrument, BB-BONELT-HDMIN
7: ff:P-O-L Override Board naam, 00A0, overschrijven Manuf, BB-SPI0-01