7c40df9d11
this updates the interactions with gpio pins to use the newer gpio descriptor API in the kernel rather than the deprecated gpio-by-int interface this means that the gpio pins can be configured as part of the device tree rather than during compile time
64 lines
1.0 KiB
Plaintext
64 lines
1.0 KiB
Plaintext
/dts-v1/;
|
|
/plugin/;
|
|
|
|
/ {
|
|
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
|
|
|
|
fragment@0 {
|
|
target = <&spi0>;
|
|
__overlay__ {
|
|
status = "okay";
|
|
|
|
spidev@0{
|
|
status = "disabled";
|
|
};
|
|
|
|
spidev@1{
|
|
status = "disabled";
|
|
};
|
|
};
|
|
};
|
|
|
|
fragment@1 {
|
|
target = <&spi0_pins>;
|
|
__overlay__ {
|
|
brcm,pins = <0x0a 0x0b>; /* skipping bcm9 MISO */
|
|
};
|
|
};
|
|
|
|
fragment@2 {
|
|
target = <&gpio>;
|
|
__overlay__ {
|
|
sharp_pins: sharp_pins {
|
|
brcm,pins = <23 22>;
|
|
brcm,function = <1 1>; /* out */
|
|
};
|
|
};
|
|
};
|
|
|
|
fragment@3 {
|
|
target = <&spi0>;
|
|
__overlay__ {
|
|
/* needed to avoid dtc warning */
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
sharp: sharp@0{
|
|
compatible = "sharp";
|
|
reg = <0>;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&sharp_pins>;
|
|
|
|
vcom-gpios = <&gpio 23 0>;
|
|
disp-gpios = <&gpio 22 0>;
|
|
scs-gpios = <&gpio 8 0>;
|
|
|
|
spi-cs-high = <1>;
|
|
spi-max-frequency = <8000000>;
|
|
buswidth = <8>;
|
|
debug = <0>;
|
|
};
|
|
};
|
|
};
|
|
};
|