Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- /plugin/;
- / {
- compatible = "ti,beaglebone", "ti,beaglebone-black";
- /* identification */
- part-number = "BB-420MA-01";
- 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.28", /* spi1_cs0 */
- "P9.29", /* spi1_d0 */
- "P9.30", /* spi1_d1 */
- "P9.31", /* spi1_sclk */
- "P9.42", /* spi1_cs1 */
- "P8.10", /* spi1_cs2 */
- /* the hardware ip uses */
- "spi0",
- "spi1";
- fragment@0 {
- target = <&am33xx_pinmux>;
- __overlay__ {
- /* avoid stupid warning */
- #address-cells = <1>;
- #size-cells = <1>;
- bb_spi0_pins: pinmux_bb_spi0_pins {
- pinctrl-single,pins = <
- 0x150 0x30 /* spi0_sclk.spi0_sclk, INPUT_PULLUP | MODE0 */
- 0x154 0x30 /* spi0_d0.spi0_d0, INPUT_PULLUP | MODE0 */
- 0x158 0x10 /* spi0_d1.spi0_d1, OUTPUT_PULLUP | MODE0 */
- 0x15c 0x10 /* spi0_cs0.spi0_cs0, OUTPUT_PULLUP | MODE0 */
- >;
- };
- bb_spi1_pins: pinmux_bb_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 */
- 0x164 0x12 /* eCAP0_in_PWM0_out.spi1_cs1 OUTPUT_PULLUP | MODE2 */
- 0x098 0x17 /* gpio2_4.spi1_cs2 OUTPUT_PULLUP | MODE7 */
- >;
- };
- };
- };
- /* https://www.kernel.org/doc/Documentation/devicetree/bindings/spi/spi-bus.txt */
- fragment@1 {
- target = <&spi0>; /* spi0 is numbered correctly */
- __overlay__ {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&bb_spi0_pins>;
- #address-cells = <1>;
- #size-cells = <0>;
- spi0_0{
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "spidev";
- reg = <0>;
- spi-max-frequency = <16000000>;
- spi-cpol;
- spi-cpha;
- };
- };
- };
- fragment@2 {
- target = <&spi1>; /* spi1 is numbered correctly */
- __overlay__ {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&bb_spi1_pins>;
- #address-cells = <1>;
- #size-cells = <0>;
- /*num-cs = <3>;*/ /* this makes no difference */
- cs-gpios = <0>, <1>, <&gpio3 4 0>;
- /* This method gives me /ocp/spi@481a0000: could not get #gpio-cells for /ocp/interrupt-controller@48200000 */
- spi1@0 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "spidev";
- reg = <0>;
- spi-max-frequency = <16000000>;
- spi-cpol;
- spi-cpha;
- };
- spi1@1 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "spidev";
- reg = <1>;
- spi-max-frequency = <16000000>;
- spi-cpol;
- spi-cpha;
- };
- /* cs2 >= max 2 is constantly thrown here */
- spi1@2 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "spidev";
- reg = <2>;
- spi-max-frequency = <16000000>;
- spi-cpol;
- spi-cpha;
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment