This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TDA4VM:如何在 I2C6下设置 exp5 GPIO

Guru**** 2330840 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1519794/tda4vm-how-to-set-the-exp5-gpio-under-the-i2c6

器件型号:TDA4VM
Thread 中讨论的其他器件:TCA6408

工具/软件:


我想将 i2c6下 GPIO 扩展器5的第0个引脚设置为在上电后输出高电平模式、以便为 max96712加电、但失败。

&main_i2c6{
状态="正常";
pinctrl-names ="default";
pinctrl-0 =<&MAIN_i2c6_pins_default>;
时钟频率=< 400000>;

exp5:GPIO@20{
compatible ="ti、tca6408";
REG =<0x20>;
GPIO 控制器;
#GPIO-cells =<2>;
};
};

&main_i2c6{
状态="正常";
#address-cells =<1>;
#size-cells =<0>;

Max96712:解串器@29{
compatible ="maxim、max96712";
REG =<0x29>;
Clocks =<&clk_ov5640_FIXE>;
时钟名称="XCLK";
POWERDOWN GPIO =<&exp5 0 GPIO_ACTIVE_HIGH>;

端口{
csi2_cam0:端点{
远程端点=<&csi2rx0_in_sensor>;
时钟通道=<0>;
数据通路=<1 2 3 4>;
};
};
};
};

board-support/ti-linux-kernel-6.6.32+git-ti/drivers/staging/media/max96712/max96712.c

探头功能

priv->gpiod_pwdn = devm_gpiod_get_optional(&client->dev、"powerback"、
GPIOD_OUT_HIGH);
if (is_ERR (priv->gpiod_pwdn))
   返回 PTR_ERR (priv->gpiod_pwdn);

gpiod_set_Consumer_name (priv->gpiod_pwdn、"max96712-pwdn");
gpiod_set_value_cansleep (priv->gpiod_pwdn、1);

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 TI 专家:

    我需要在驱动阶段为 max96712加电、并将 max96712的 pwd 连接到 TDA4的 I2C6下 GPIO 扩展器的 CSI2_EXP_RSTZ 引脚。

    设备树和 PROB 函数如上所示。 当前配置不起作用。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、

    文件: arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts

    代码:

    &main_i2c0 {
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&main_i2c0_pins_default>;
            clock-frequency = <400000>;
    
            exp1: gpio@20 {
                    compatible = "ti,tca6416";
                    reg = <0x20>;
                    gpio-controller;
                    #gpio-cells = <2>;
            };
    
            exp2: gpio@22 {
                    compatible = "ti,tca6424";
                    reg = <0x22>;
                    gpio-controller;
                    #gpio-cells = <2>;
    
                    p09-hog {
                            /* P11 - MCASP/TRACE_MUX_S0 */
                            gpio-hog;
                            gpios = <9 GPIO_ACTIVE_HIGH>;
                            output-low;
                            line-name = "MCASP/TRACE_MUX_S0";
                    };
    
                    p10-hog {
                            /* P12 - MCASP/TRACE_MUX_S1 */
                            gpio-hog;
                            gpios = <10 GPIO_ACTIVE_HIGH>;
                            output-high;
                            line-name = "MCASP/TRACE_MUX_S1";
                    };
            };
    

    您可以使用 gpio-hog 功能来控制线路的状态。 在以上示例中:

    * P11 - MCASP/TRACE_MUX_S0 */
    GPIO-HOG;
    GPIO=<9 GPIO_ACTIVE_HIGH>;

    GPIO 9设置为高电平状态。

    您应该尝试类似的方法。

    - Keerthy