Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- /plugin/;
- #include <dt-bindings/pinctrl/am33xx.h>
- #include <dt-bindings/board/am335x-bbw-bbb-base.h>
- #include <dt-bindings/interrupt-controller/irq.h>
- &{/chosen} {
- overlays {
- // use name of this file (without .dts) as property name
- encx24j600 = __TIMESTAMP__;
- };
- };
- // disable cape-universal for pins used
- &ocp {
- P9_12_pinmux { status = "disabled"; }; // encx24j600 irq
- P9_17_pinmux { status = "disabled"; }; // spi0 cs0
- P9_18_pinmux { status = "disabled"; }; // spi0 d1
- P9_21_pinmux { status = "disabled"; }; // spi0 d0
- P9_22_pinmux { status = "disabled"; }; // spi0 sclk
- };
- &spi0 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&spi0_pins>;
- // use same node name as cape-universal does
- channel@0 {
- reg = <0>;
- compatible = "microchip,encx24j600";
- pinctrl-names = "default";
- pinctrl-0 = <&encx24j600_pins>;
- spi-max-frequency = <20000000>;
- interrupts-extended = <&gpio1 28 IRQ_TYPE_EDGE_FALLING>;
- };
- };
- &am33xx_pinmux {
- spi0_pins: spi0 {
- pinctrl-single,pins = <
- BONE_P9_17 ( PIN_OUTPUT_PULLUP | MUX_MODE0 ) // cs0
- BONE_P9_18 ( PIN_OUTPUT_PULLUP | MUX_MODE0 ) // d1 / mosi
- BONE_P9_21 ( PIN_INPUT_PULLUP | MUX_MODE0 ) // d0 / miso
- BONE_P9_22 ( PIN_INPUT_PULLUP | MUX_MODE0 ) // sclk
- >;
- };
- encx24j600_pins: encx24j600 {
- pinctrl-single,pins = <
- BONE_P9_12 ( PIN_INPUT_PULLUP | MUX_MODE7 ) // gpio 1.28 / irq
- >;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement