Tool/software:
We are using AM62A SoC to control out dToF sensor, and the GPIO0_60 is used to reset our dToF sensor. Now I have two questions about the pin, would you please help to check and help me?
Q1: What is the default level for GPIO0_60, which document can I check for this? I tried to add the following line in k3-am62a7-sk.dts to set this pin to LOW after power-on, but our HW engineer said the pin will keep HIGH until after 12 seconds after power-on, is there any other method to setup this pin to LOW more earlier?
main_ads6311_pins_default: main-ads6311-pins-default { pinctrl-single,pins = < AM62AX_IOPAD(0x00f0, PIN_INPUT_PULLDOWN, 7) /* (Y21) VOUT0_DATA14.GPIO0_59 */ AM62AX_IOPAD(0x00f4, PIN_OUTPUT_PULLDOWN, 7) /* (Y22) VOUT0_DATA15.GPIO0_60 */ >; }; ads6311_spi@0 { status = "okay"; reg = <0>; compatible = "adaps,ads6311spi"; clocks = <&clk_ads6311_fixed>; clock-names = "xclk"; spi-max-frequency = <15000000>; pinctrl-names = "default"; pinctrl-0 = <&main_ads6311_pins_default>; interrupt-parent = <&main_gpio0>; interrupts = <59 IRQ_TYPE_LEVEL_HIGH>; reset-gpios = <&main_gpio0 60 GPIO_ACTIVE_LOW>; pwms = <&epwm1 1 100000 0>; port { ads6311_spi_out: endpoint { remote-endpoint = <&csi2rx0_in_sensor>; /* link-frequencies = /bits/ 64 <456000000>; */ clock-lanes = <0>; data-lanes = <1 2 3 4>; }; }; };
Q2: In my Linux driver code, I tried to call 'gpiod_set_value_cansleep(sensor->reset_gpio, 1);' and 'gpiod_set_value_cansleep(sensor->reset_gpio, 0);' to setup this pin to HIGH or LOW, then we use a multimeter to measure the voltage level of this GPIO pin, the results are matched with our expectation. But from the software point of the view, I tried to call val = gpiod_get_value(sensor->reset_gpio) to check the result, I always got the value 1 for both cases. Please help to check the root cause and provide a patch.
BTW, I'm using Linux SDK 9.1 (ti-processor-sdk-linux-edgeai-am62axx-evm-09_01_00_07-Linux-x86-Install.bin) now.
Thanks and Best Regards,
David