Trying to enable i2c1

Discussion in 'UDOO QUAD' started by vudoo, Aug 4, 2017.

Tags:
  1. vudoo

    vudoo New Member

    Joined:
    Jun 14, 2017
    Messages:
    17
    Likes Received:
    1
    I am trying to enable i2c1 in udoo quad. The pins are 20 and 21 which translates to EIM_D21, EIM_D28.
    I edited imx6qdl-udoo.dtsi to enable i2c1.

    Code:
    &i2c1 { // sensors
      clock-frequency = <100000>;
      pinctrl-names = "default";
      pinctrl-0 = <&pinctrl_i2c1>;
      status = "okay";
      ...
    };
    Then I edited imx6qdl-udoo-externalpins.dtsi to disable exporting as GPIO. I commented out those lines
    Code:
    //MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x80000000 // {{external-gpio-20}}
    //MX6QDL_PAD_EIM_D21__GPIO3_IO21 0x80000000 // {{external-gpio-21}}
    
    //&i2c1 {
    //  clock-frequency = <100000>;
    //  pinctrl-names = "default";
    //  pinctrl-0 = <&pinctrl_i2c1>;
    //  status = "disabled";
    //};
    
    pinctrl_spdif: spdifgrp {
      fsl,pins = <
        MX6QDL_PAD_GPIO_19__SPDIF_OUT 0x1b0b0
    //    MX6QDL_PAD_EIM_D21__SPDIF_IN 0x1b0b0
      >;
    };
    Is this correct? Am I missing something?

    I get a lot of messages complaining about audio in logcat.

    Can you help?
     
  2. vudoo

    vudoo New Member

    Joined:
    Jun 14, 2017
    Messages:
    17
    Likes Received:
    1
    Ping. I guess I will give up on this forum. It seems that I am posting to myself.
     
  3. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  4. vudoo

    vudoo New Member

    Joined:
    Jun 14, 2017
    Messages:
    17
    Likes Received:
    1
    This is not easier. You cant have audio output enabled if you go this way.
     
  5. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    I am not completely sure, but you cannot have and SPDIF and I2C functionality on the same pin on the same time, you have to choose.
    Perhaps use the other I2C bus (SDA1, SDL1) on the Arduino side?
     
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  7. vudoo

    vudoo New Member

    Joined:
    Jun 14, 2017
    Messages:
    17
    Likes Received:
    1
    I think SDA1, SCL1 are not available for use on the i.MX6. The post you sent me is contains outdated information. The device tree/kernel has changed since then.

    Also I am running Android and the problem I noted before is related to Android. Maybe I got i2c1 working but Android is expecting there something that it can find, like spdif.
     
  8. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    The post I linked to is outdated but stll valid.
    What do you need? An I2C connection? Then you probably (I am not an expert on PinMuxing) have to switch of SPDIF in imx6qdl-udoo.dtsi and imx6qdl-udoo-externalpins.dtsi completely (not just outcomment 1 pin)
     

Share This Page