Interfacing

How to activate CAN, I2S, SPDIF in Device Tree File

2 218
Hello guys,

I've built a small add-on board for my BananaPRO which contains
-> DAC
-> CAN transceiver
-> SPDIF output

So, I'm using the mainlive kernel on my PRO, in this I have to active I2S, CAN and SPDIF in a DTS file.

How can I do this?

Thanks and kind regards,
Heinrich

Hello,

for CAN I've found this out:

1. Add this
  1.    can0_pins_a: can0@0 {
  2.        allwinner,pins = "PH20","PH21";
  3.        allwinner,function = "can";
  4.        allwinner,drive = <0>;
  5.        allwinner,pull = <0>;
  6.    };
Copy the Code
and this
  1.    can0: can@01c2bc00 {
  2.        compatible = "allwinner,sun4i-a10-can";
  3.        reg = <0x01c2bc00 0x400>;
  4.        interrupts = <0 26 4>;
  5.        clocks = <&apb1_gates 4>;
  6.        status = "disabled";
  7.    };
Copy the Code
to arch/arm/boot/dts/sun7i-a20.dtsi

2. Add this
  1.    &can0 {
  2.        pinctrl-names = "default";
  3.        pinctrl-0 = <&can0_pins_a>;
  4.        status = "okay";
  5.    };
Copy the Code
to arch/arm/boot/dts/sun7i-a20-bananapro.dts

And for SPDIF just add this
  1. &spdif {
  2.         pinctrl-names = "default";
  3.         pinctrl-0 = <&spdif_tx_pins_a>;
  4.         status = "okay";
  5. };
Copy the Code
to arch/arm/boot/dts/sun7i-a20-bananapro.dts

But what about I2S?

You have to log in before you can reply Login | Sign Up

Points Rules