Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- /plugin/;
- #include <dt-bindings/board/am335x-bbw-bbb-base.h>
- #include <dt-bindings/pinctrl/am33xx.h>
- / {
- compatible = "ti,beaglebone", "ti,beaglebone-black";
- /* identification */
- part-number = "BB-ADS7846";
- version = "00A0";
- /* state the resources this cape uses */
- exclusive-use =
- /* the pin header uses */
- "P9.17", /* SPI0_CS0 */
- "P9.18", /* SPI0_D1 */
- "P9.21", /* SPI0_D0 */
- "P9.22", /* SPI0_SCLK */
- "P9.25", /*pendown */
- /* the hardware it uses */
- "spi0";
- fragment@0 {
- target = <&am33xx_pinmux>;
- __overlay__ {
- ads7846:pinmux_ads7846_pins {
- pinctrl-single,pins = <
- BONE_P9_17 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_wait0.uart4_rxd_mux2 */
- BONE_P9_18 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
- BONE_P9_21 (PIN_INPUT_PULLUP | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
- BONE_P9_22 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
- BONE_P9_25 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* gpmc_wpn.uart4_txd_mux2 */
- >;
- linux,phandle = <0x1>;
- phandle = <0x1>;
- };
- };
- };
- fragment@1 {
- target = <&spi0>;
- __overlay__ {
- #address-cells = <0x1>;
- #size-cells = <0>;
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&ads7846>;
- ads7846@0 {
- compatible = "linux,spidev";
- spi-max-frequency = <2000000>;
- interrupts = <255 2>; /* high-to-low edge triggered */
- interrupt-parent = <&gpio3>;
- pendown-gpio = <&gpio3 255 0>;
- reg = <0>;
- /* driver defaults */
- ti,x-min = /bits/ 16 <0>;
- ti,y-min = /bits/ 16 <0>;
- ti,x-max = /bits/ 16 <0x0FFF>;
- ti,y-max = /bits/ 16 <0x0FFF>;
- ti,pressure-min = /bits/ 16 <0>;
- ti,pressure-max = /bits/ 16 <0xFFFF>;
- ti,x-plate-ohms = /bits/ 16 <400>;
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement