I mean that if things are in the way, then even the .dts or .dtsi file(s) will not provide the correct support.
If you have a peripheral in use, I am sure you understand, then the other peripheral may not be available for use. For instance…
config-pin p9.22 uart
- This command allows the uart to be muxed
- If you try to use a gpio pin while p9.22 is muxed to uart, then it is faulty
So, what I mean is that if you have extra modules and peripherals being used by the am335x, not all of what is available is actually available b/c of only being able to use a type
at a time.
I am not sure if this is your case or not. I just wanted to let you know. Another example…
/*
* Copyright (C) 2020 Deepak Khatri <deepaklorkhatri7@gmail.com>
* https://lorforlinux.github.io/GSoC2020_BeagleBoard.org/
*
* See Cape Interface Spec page for more info on Bone Buses
* https://elinux.org/Beagleboard:BeagleBone_cape_interface_spec
*
* BBBAI Overlay for 4D Systems GEN4-4DCAPE-43CT-CLB Cape and similar Displays
*
* Based on older BB-BONE-4D4C-01-00A1.dts from TI for kernel < 4.14
* Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
&{/chosen} {
overlays {
BBAI-4D4C-00A1 = __TIMESTAMP__;
};
};
/*
* Update the default pinmux of the pins.
* See these files for the phandles (&P9_* & &P8_*)
* BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am335x-bone-common-univ.dtsi
* BeagleBoard-DeviceTrees/v4.19.x-ti-overlays/src/arm/am572x-bone-common-univ.dtsi
*/
&ocp {
P8_45_pinmux { pinctrl-0 = <&P8_45_lcd_pin>;}; /* lcd: lcd_data0 */
P8_46_pinmux { pinctrl-0 = <&P8_46_lcd_pin>;}; /* lcd: lcd_data1 */
P8_43_pinmux { pinctrl-0 = <&P8_43_lcd_pin>;}; /* lcd: lcd_data2 */
P8_44_pinmux { pinctrl-0 = <&P8_44_lcd_pin>;}; /* lcd: lcd_data3 */
P8_41_pinmux { pinctrl-0 = <&P8_41_lcd_pin>;}; /* lcd: lcd_data4 */
P8_42_pinmux { pinctrl-0 = <&P8_42_lcd_pin>;}; /* lcd: lcd_data5 */
P8_39_pinmux { pinctrl-0 = <&P8_39_lcd_pin>;}; /* lcd: lcd_data6 */
P8_40_pinmux { pinctrl-0 = <&P8_40_lcd_pin>;}; /* lcd: lcd_data7 */
P8_37_pinmux { pinctrl-0 = <&P8_37_lcd_pin>;}; /* lcd: lcd_data8 */
P8_38_pinmux { pinctrl-0 = <&P8_38_lcd_pin>;}; /* lcd: lcd_data9 */
P8_36_pinmux { pinctrl-0 = <&P8_36_lcd_pin>;}; /* lcd: lcd_data10 */
P8_34_pinmux { pinctrl-0 = <&P8_34_lcd_pin>;}; /* lcd: lcd_data11 */
P8_35_pinmux { pinctrl-0 = <&P8_35_lcd_pin>;}; /* lcd: lcd_data12 */
P8_33_pinmux { pinctrl-0 = <&P8_33_lcd_pin>;}; /* lcd: lcd_data13 */
P8_31_pinmux { pinctrl-0 = <&P8_31_lcd_pin>;}; /* lcd: lcd_data14 */
P8_32_pinmux { pinctrl-0 = <&P8_32_lcd_pin>;}; /* lcd: lcd_data15 */
P8_27_pinmux { pinctrl-0 = <&P8_27_lcd_pin>;}; /* lcd: lcd_vsync */
P8_29_pinmux { pinctrl-0 = <&P8_29_lcd_pin>;}; /* lcd: lcd_hsync */
P8_28_pinmux { pinctrl-0 = <&P8_28_lcd_pin>;}; /* lcd: lcd_pclk */
P8_30_pinmux { pinctrl-0 = <&P8_30_lcd_pin>;}; /* lcd: lcd_ac_bias_en */
P9_27_pinmux { pinctrl-0 = <&P9_27_gpio_pin>;}; /* lcd: gpio4_15 DISPEN */
P9_14_pinmux { pinctrl-0 = <&P9_14_pwm_pin>;}; /* pwm: ehrpwm1a PWM_BL */
P9_18_pinmux { pinctrl-0 = <&P9_18_i2c_pin>;}; /* i2c1_sda */
P9_17_pinmux { pinctrl-0 = <&P9_17_i2c_pin>;}; /* i2c1_scl */
P9_26_pinmux { pinctrl-0 = <&P9_26_gpio_pin>;}; /* touch interrupt on gpio6_14 */
};
If I wanted to use p9.26 as a gpio or the exact interrupt to the gpio, I would not declare it in the .dts unless I was sure I wanted to use it in the .dtbo if this is what was going to get published for use.
Seth
P.S. Now, there are more files, .dtsi files in question that the above script/.dts file uses. So, I think reading over the files in question would be very beneficial. I can run and answer when prompted but if the correct questions are not asked, I am inclined to not just help forthright. So, ask away and I will get back to you. Or…
if you no longer want my assistance, that is okay too. I can bow out and not get upset.
I just know that these files are fickle. They do not necessarily work unless perfect. So, if you have for instance a tab
instead of eight spaces
in two separate .dtsi files, then your .dts needs to be tabbed
and not spaced
.