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.
Tool/software:
Hello TI team,
we are trying to enable /disable GPIO provided in main/mcu domain.
Could you please reverify steps which we have done till now and give correct sequnce or set of command to enable/disable GPIO.
GPIO0_38 pin of SK-AM62-LP board
We tried below command :
gpiochip2 start with the gpio base number 396,, so 396+38 = 434 for gpio0_38
1. gpiodetect
2.tail /sys/class/gpio/*/label
3.echo 434 >/sys/class/gpio/export
4.echo out >/sys/class/gpio/gpio434/direction
5. echo 1 >/sys/class/gpio/gpio434/value
At the end we are not able to see GPIO is high value on oscilloscope/ voltmeter.
Could you please guide w.r.t correct way for verification with linux command
Hello,
Can you share what Linux device tree changes you made?
You can follow this thread on making changes to the device tree: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1268671/sk-am62-using-the-gpios-in-the-40-pin-user-expansion-port/4804378
Thanks,
Anshu
also wanted to verify GPIO1_49 led functionality from dtsi file.
dtsi file will have below data,
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&usr_led_pins_default>;
led-0 {
label = "am62-sk:green:heartbeat";
gpios = <&main_gpio1 49 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
function = LED_FUNCTION_HEARTBEAT;
default-state = "off";
};
};
usr_led_pins_default: usr-led-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x244, PIN_OUTPUT, 7) /* (C17/B15) MMC1_SDWP.GPIO1_49 */
>;
};
but it will not working as expected when we execute below linux command,
2.tail /sys/class/gpio/*/label
3.echo 445 >/sys/class/gpio/export
4.echo out >/sys/class/gpio/gpio445/direction
5. echo 1 >/sys/class/gpio/gpio445/value
By executing above set of command not able to see changes on LED w.r.t. GPIO1_49
Hello,
As defined in the device tree that you provided, this is an LED GPIO which means it will be used like an LED: https://dev.ti.com/tirex/explore/node?node=A__Ad5D76snfMMQBOZyC-7i2g__AM62-ACADEMY__uiYMDcq__LATEST
Best Regards,
Anshu
Hi,
I am able to set GPIO1_49 pin high and low.
Can you share commands, dtsi file and code for below gpios?
MCU_GPIO0_16, GPIO0_38, GPIO0_39, GPIO1_22, GPIO1_24 and GPIO1_25.
Hi Kiran,
You can see some examples in this FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1260373/faq-transitioning-the-gpio-userspace-interface-from-sysfs-to-chardev
Thanks,
Anshu
Hello Anshu,
You have provided link w.r.t. GPIO command only but do we need to change in dtsi file to configure GPIO's?
Hello,
Yes, the device tree will allow Linux to recognize the hardware of the GPIO. The GPIO that will be used needs to be defined in the device tree. Once the device tree is compiled and used by Linux, you can use the userspace commands that was linked previously.
Thanks,
Anshu
Hello San,
Can you please provide detail file name and path name for required changes
we tried to make changes in K3-am62-sk-common.dtsi with below code snippet for main_gpio1_24
We done above chnages and tried to create .dtb file from .dtsi file but giving below errors
Please let me know how to resolve above error while creating .dtb file
Hello,
Please see the SDK Documentation for building the device tree blob: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_00_07_04/exports/docs/linux/Foundational_Components_Kernel_Users_Guide.html#compiling-the-device-tree-binaries
Thanks,
Anshu
where is that ti-linux directory?
can you specify path
We have referred below link for device tree build,
3.2.1. Users Guide — Processor SDK AM62x Documentation
there is nothing w.r.t linux folder inside ti folder
Hello,
I mean try in <SDK Install Path>/board-support/ti-linux-kernel-<version>/
There is a Makefile in that directory that will help you build a device tree.
You can also try the Top level makefile: https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/10_00_07_04/exports/docs/linux/Overview/Top_Level_Makefile.html
Here is an example: https://dev.ti.com/tirex/explore/node?node=A__Ac3qFz3DdLfHjKcAb5tE-w__AM62-ACADEMY__uiYMDcq__LATEST
Thanks,
Anshu
at top level I have executed make all command, generally how much time it will be taking to build entire sdk?
is it possible to build specific directory w.r.t. am62xx-lp-evm board, as 'make all' command taking so much time to build.
Hello,
Yes its possible. The Makefiles within different directories is for building individual components.
Building the entire SDK will a longer amount of time than just the components.
Thanks,
Anshu
Could you please share specific command for SK-AM62-LP board and in which folder need to execute it
Hello,
I've linked the SDK documentation for building Linux in previous post. Please follow those instructions.
Thanks,
Anshu
Hello Anshu
Thanks for response but could you provide specific answer.
Below provided link 1.1.4. SDK Build using Makefile — Processor SDK AM62x Documentation
we tried with "make PLATFORM=am2xx-lp-evm" but it is also executing all make command not specific to am2xx-lp-evm board which is time taking.
could you please provide guidance for command specific to am2xx-lp-evm board and in which directory we have execute that command.
Hello,
If you just trying to re-build the device tree, then you can go to <sdk install path>/board-support/ti-linux-<version>/.
After exporting the ARCH and CROSS_COMPILE & setting the defconfig, you can run 'make dtbs'.
This is all listed in the SDK Documentation: software-dl.ti.com/.../Foundational_Components_Kernel_Users_Guide.html
Thanks,
Anshu