SPRADD1A August 2023 – September 2024 AM620-Q1 , AM623 , AM625 , AM625-Q1 , AM625SIP , AM62A1-Q1 , AM62A3 , AM62A3-Q1 , AM62A7 , AM62A7-Q1 , AM62P , AM62P-Q1
The custom board devicetrees provided in the U-Boot repository will need to be modified to function on a custom board. This section details changes that need to be made prior to attempting to boot the board.
The current pin configurations in the provided custom board devicetree are generated using TI's SysConfig Pinmux Tool for a TI EVM. This application generates pin configurations for TI SoCs, connecting internal peripheral pins to external balls on the SoC's package. As there are only so many options for these connections, there are only so many correct pin configurations. This tool understands these restrictions and will provide warnings and errors for invalid configurations. It should be used by the board designer to develop a valid configuration for the desired use case. Any changes to the configuration need to be made in the tool to make sure that a conflict is not created. Such a conflict would likely lead to a board issue that would need to be debugged and fixed, likely costing very valuable debug time. The tool creates files to import the configuration into software, so that the device can be configured properly at boot. These files need to be passed from the board designer to the software developers for efficient board bring-up.
The pin configuration provided in the example minimal configuration is for a TI board. If using a TI board to validate this process for the AM62x device family, the configurations should not need to be changed. To replace the pin configurations that are provided in the custom board devicetree with the custom pin configurations from the pinmux DTSI generated by the SysConfig Pinmux Tool for the custom board, remove the &main_pmx node in k3-am625-<boardname>.dts. Then, paste the contents of the pinmux DTSI into k3-am625-<boardname>.dts. An example of this is shown below.
/* Delete provided pin configuration nodes */
- &main_pmx {
- [... UART pin configuration ...]
- [... SD pin configuration ...]
- };
/* Paste new pin configuration nodes from pinmux DTSI */
+ &main_pmx {
+ [... New pin configurations ...]
+ };
The new pin configuration for a peripheral needs to be set in the peripheral's devicetree node as well. This is done by modifying the pinctrl property in the node in k3-am625-<boardname>.dts.
Suppose the new pin controller node contains the following configuration for UART0, labeled "uart0-custom_pins_default".
uart0-custom_pins_default: uart0-custom-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x01c8, PIN_INPUT, 0) /* (D14) UART0_RXD */
AM62X_IOPAD(0x01cc, PIN_OUTPUT, 0) /* (E14) UART0_TXD */
>;
};
In order for UART0 to access these pins, modify the pinctrl property in the UART0 node as seen below. Make sure to use the correct label following the "&" to avoid devicetree compilation problems.
&main_uart0 {
bootph-all;
status = "okay";
pinctrl-names = "default";
- pinctrl-0 = <&main_uart0_pins_default>;
+ pinctrl-0 = <&uart0-custom_pins_default>;
};
This modification needs to be made for all peripherals that are configured on a custom board.
The instance of the peripheral that is initially configured in the custom board devicetree may also need to be modified. The custom board devicetrees assume that UART0 is used for serial output and for UART boot. It also assumes that MMC1 is used as the SD card reader. If the instance of the peripheral on the custom board is different, the devicetree node needs to be modified.
In the example below, assume that the correct UART instance for console output is UART1. Modify k3-am625-<boardname>.dts as seen below configure UART1 to function as the console output.
- &main_uart0 {
+ &main_uart1 {
bootph-all;
status = "okay";
pinctrl-names = "default";
- pinctrl-0 = <&uart0-custom_pins_default>;
+ pinctrl-0 = <&uart1-custom_pins_default>;
};
If the instance of a peripheral is modified, the pin configuration will also need to changed to the correct pin node for that instance. In the example above, the pinctrl property is changed to the pin configuration for UART1.
If the UART instance for console output is changed, the aliases node in k3-am625-<boardname>.dts needs to modified. The example below shows this modification if the UART instance for console output is UART1 instead of UART0.
aliases {
- serial2 = &main_uart0;
+ serial2 = &main_uart1;
};
This ensures the Linux kernel uses the correct UART instance to output the kernel bootlog.
If the custom board does not have an SD card reader, remove or disable the corresponding node. This will prevent boot errors from occuring. The removal of this node is seen below.
- &sdhci1 {
- [... Properties ...]
- };
At the top of the device tree, the compatible and model property is set to "minimal" and "ti". Modify this string for the custom board as seen below.
- compatible = "ti,am625-minimal", "ti,am625";
- model = "Texas Instruments AM625 MINIMAL";
+ compatible = "<company>,am625-<boardname>", "<company>,am625";
+ model = "<company> AM625 <boardname>";