Other Parts Discussed in Thread: TCA6424
Tool/software:
HI TI
can't set TCA6424 CSI_GPIO0 to 1
device tree: include <dt-bindings/gpio/gpio.h> &{/} { clk_imx728_fixed: imx728-xclk { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <24000000>; }; }; &main_i2c2 { #address-cells = <1>; #size-cells = <0>; status = "okay"; i2c-switch@71 { compatible = "nxp,pca9543"; #address-cells = <1>; #size-cells = <0>; reg = <0x71>; /* CAM port */ i2c@1 { #address-cells = <1>; #size-cells = <0>; reg = <1>; imx728: camera@1d { compatible = "sony,imx728"; reg = <0x1d>; clocks = <&clk_imx728_fixed>; clock-names = "xclk"; reset-gpios = <&exp1 15 GPIO_ACTIVE_HIGH>; //CSI_GPIO0 port { csi2_cam0: endpoint { remote-endpoint = <&csi2rx0_in_sensor>; link-frequencies = /bits/ 64 <456000000>; clock-lanes = <0>; data-lanes = <1 2>; }; }; }; }; }; }; //driver code static int imx728_power_on(struct device *dev) { struct v4l2_subdev *sd = dev_get_drvdata(dev); struct imx728 *imx728 = to_imx728(sd); int ret; ret = regulator_bulk_enable(IMX728_NUM_SUPPLIES, imx728->supplies); if (ret) { dev_err(dev, "%s: failed to enable regulators\n", __func__); return ret; } ret = clk_prepare_enable(imx728->xclk); if (ret) { dev_err(dev, "%s: failed to enable clock\n", __func__); goto reg_off; } gpiod_set_value_cansleep(imx728->reset_gpio, 1); // set csi_gpio0 high usleep_range(IMX728_XCLR_MIN_DELAY_US, IMX728_XCLR_MIN_DELAY_US + IMX728_XCLR_DELAY_RANGE_US); return 0; reg_off: regulator_bulk_disable(IMX728_NUM_SUPPLIES, imx728->supplies); return ret; }