BBB - Declaring GPIOs

Hello everyone, i have to declare GPIO, does anyone have a recent and updated paper about declaring gpio during kernel update, does it have to be dynamic in /sys/class/gpio ? or does it have to in the device tree, i’m a beginner, thanks everyone. I was in kernel 4.4 where gpio worked and now i’m in kernel 6.6. I saw that sysfs no longer works with kernel 6.6 and newer, is it true ?

Is it true that kernel 6.6 doesn’t support pin control of gpio via sysfs anymore ? does 6.1 supports it ?

The sysfs GPIO interface is still present in the kernel and can be enabled when needed. While it’s deprecated and may show warnings, it remains functional for those relying on legacy systems. However, the shift towards the newer lgpio and character device interfaces represents a major advancement. These solutions provide a more modern, robust, and efficient approach to GPIO handling, allowing developers to work with greater flexibility. Leveraging these newer tools is not only a smarter choice but also positions projects for future growth and compatibility.

Thanks,
For example i used this :
echo 114 > /sys/class/gpio/export;
echo “in” > /sys/class/gpio/gpio114/direction;
echo 1 > /sys/class/gpio/gpio114/active_low;
ln -sf /sys/class/gpio/gpio114/value /Distrib/Data/Firmware/LinuxCoreBoard/gpio/gpio114

to enable a gpio in the kernel 4.4, but it doesnt seems to work now in kernel 6.6, whereas sysfs is enable in my config file CONFIG_GPIO_SYSFS=y , where that could be from ? thanks

My guess would be that it has a couple more settings, I have not turned them on because we don’t use it. I have seen settings in the kernel that would suggest they are related. Here is a link to the kernel info: GPIO Sysfs Interface for Userspace — The Linux Kernel documentation

@foxsquirrel and @Jerome199 ,

Did you look in the kernel yet?

I found some syntax in 6.6.x that may help or hurt depending on if things are translated well enough during building:

AM33XX_PADCONF(arg1, arg2, arg3)

I think for the am335x that is onboard the BBB, declaring may be simpler now than ever before today (circa 6.6.x).

Now, what is arg1, arg2, arg3, no clue. The kernel has answers.

AM33XX_PADCONF may work in .dtsi but I am not quite so sure it can be available as a pure, compiled entity. Where entity in this context is a GPIO.

Anyway, if you guys get something posted and are not willing to use the beagleboard.org distros for building, okay.

Seth

P.S. Letter to the editor:

There was once an older kernel.
This kernel allowed for building with SYSFS.
Even in deprecation, SYSFS was allowed.

Is it allowed now? I would need to build a kernel and find out. I can try.

What we are using in the BBBi is the IoT image with 5.10 kernel. I beat it up pretty badly with embedded telemetry and the load cape (lgpiod). Heavily threaded, each gpio is on its own thread, a couple of i2c devices, chrono and It is running strong, with that said, it would be much simpler to use an out of the box solution and get the project dialed in with it.

Spend time coding for the project and not wasting time on a newer kernel. If you could identify something in the newer kernel that would most certainly add value to the project then go for the upgrade.

Oh…

I guess I am out of line. I thought @Jerome199 was having concerns switching kernels due to the changes. I did not know of these issues outside of what I have read.

I did read that the am335x is now fully supported in the Linux Kernel. So, this is good news.

I also have been reading the kernel pages to view files associated with the am335x and/or am3358.

I know each, separate package of the am3358 has many variations. Now, I do not know how deep you are in building for the am3358 but the BeagleBone Black has a variation of the am3358.

I am not familiar with Chrono unless that is graphical display type source.

So, things change totally and constantly is what I have found.

And right about going to programming quickly. Heck, the changes in programming are easier to track down…

Seth

P.S. To me, is sounds like you have a lot of work for yourself. I am not sure if bugs are around for the 6.6.x kernel yet but 5.10.x had a good go. I got to test all sorts of devices made by GHI and the BBBW for testing via the am335x. I do not know, man. As I can tell, you both need support but I am not a resolution for now.

One, a person or a group of people, would need to follow along for a term and learn.

Some people are good at programming. Some others are okay at kernel building. The rest of everyone just wants working devices. I get it is stressful and I am not a resolution.

Sharing is okay. I do not need to see source or code. Man, I am out. I am sorry to bother you. It is late and I feel like I am harassing you since I do not know what you are currently building.

Hey @foxsquirrel ,

linux-6.6.x can be found here: am335x-bone-common.dtsi « omap « ti « dts « boot « arm « arch - kernel/git/stable/linux.git - Linux kernel stable tree

That may provide help. I know you probably have your own way of doing things but using kernel build tools on Linux Distros with the suited (same) or Cross_Compiled toolchains may just help.

I am not sure about the state of the libgpiod-dev and using gpiod.h in files for now.

I stopped using gpiod.h in files a while back due to not knowing enough about it.

Seth

P.S. And again, sorry for not understanding that you two were building together to have a final outcome.

Also…that file although older is a starter. I will retreat for now in your findings unless you can ask questions with backed up data that I can answer. Sorry to be a burden here.

That is a time library for c++.
https://en.cppreference.com/w/cpp/chrono

Yep.
It is getting old, it is becoming an hindrance instead of value adding. When you get some of the compile time errors and look them over, all you can say to your self is, WHY?
It seems like many have good intentions however those good intentions are not easy to fix and sometimes break everything down stream.

That is pretty cool, I really gravitate toward companies in the USA.

1 Like

Chrono is a time library. Now, I know.

Um, I would hate to break a known working system but I can try if necessary. My issue is this idea:

  1. I never got GPIO to work from Buildroot because, at the time, I knew too little about building around the DTC and DTS in general.
  2. I do not know how long you have on your preferences and working detail.

Thank you for reaching out once more. I appreciate it. I too like USA built mechanisms. Always have and probably always will…

Seth

P.S. I am learning still and getting closer to writing a well known DTS and DTSI set of files. I will need to find if Buildroot has been updated since I have not built for it in some time. If you choose to use a LCD, I am completely out because of vectors and matrices in DTS. If that does not make sense, I understand. I am completely new to DTS/DTSI files outside of studying them.

Application is one thing. Learning and reading is another thing. I can point out what it is that I am reading if we ever get on the same page. Until then or if it will ever take place, I am sort of lost in translation with what has been available coming from you and the other person.

I will try to make time to learn how to build another Buildroot appliance with GPIO installed for the am3358. I understand that the physical peripheral is available but we need to allow Linux via DTS to communicate to the hardware for programming. Lesson one…time it key. Got it. I have to go out today but I will make time on a Linux Machine soon. I have a BBB here but not the industrial version.

If you are working with the BB products use the RCN tree. It is already setup for linking to the ti stuff. It can be done without it however you will have to use cpp to link then use dtc. Problem with ti stuff is they have abstracted it way too many times and #includes are nested too deep and cpp was not designed for what it is being used for. If ti would clean it up and limit the includes to some base stuff and the kernel it would not be a headache to build them. If you don’t need any includes you can use dtc on any box since it is hardware agnostic.

Yes, what is going on is much of the stuff you find on the internet that dead ends into a website that is promoting training or selling services is intentionally confusing and void of any real substance. Its all click bait, this industry is nothing but a huge ecosystem the feeds on luring folks in then up selling something. It was never like this years ago, keep in mind I have been in the big chair for last 20 years and have not touched this stuff, so jumping back in is like day one again. Its mind blowing how nefarious some of these companies have become. It appears to be turning around and biting them in the *. Waning interest due to frustration is a negative that is extremely difficult to recover from. Add a crap economy on top of that and you have a storm brewing.
I have said this before, the only reason Pi is succesful is the training and docs, it is an excellent board for training and every day applications. Way more to this, this is just a drop.

1 Like

heave ho!

I second notions. I am new sort of…

Anyway, yeppers. Things change.

Seth

P.S. I have noticed some varying changed effects to the point that one man, me namely, cannot keep up 100% of the time while part-timing it all. Books are good. They take tons of time and effort to learn and can then be referenced at will. Internet voids books. It is still neat to see everyone participating and doing what they can when they can. Open Source is not the easiest place to find gratitude. Open Source hardware with the correct source is neat. Cool subject matter that spans the test of time is what I think. We shall see.

And yes, if you want me to try to build something and push GPIO into it, okay. I can. I am serious but it will take lots of effort on your part. Chatting, pretending to be friendly, and all that mess. It is the way I suck the life out of people. Ha. Oh and if you are using Buildroot, okay. If not, please let me know so I can skip it.

I saw what you typed about rcn-ee’s repos. I have used them before to build with the am3358. Anyway, and enough gibberish stuff for now, I will do it unlike when I told someone about helping with the cc1352p or whatever chip it was… M4. Something. I fell right off when things could not get any worse for me. I read and read. I just could not make it work. I listened to repos, I listened to others, and I received no feedback. I fell off. Plain and simple.

Hey there! :smile: Your post made me smile—sounds like the wild world of part-time tinkering is really keeping you on your toes! I totally get it; books are like the trusty old sidekicks, always there when you need them, but wow, the internet sure has a way of making them feel like antiques sometimes, right? Love that you’re all about open source—it’s a jungle out there, but oh, the cool things we can build! And yes, open source hardware with the right source? That’s the sweet spot! :rocket:

As for your GPIO challenge, count me in! :joy: I’m ready to chat, pretend to be friendly, and get sucked into the chaos. Let’s build something epic—or at least have a blast trying! Oh, and Buildroot? Sure, I’ve dipped my toes in that pond, but hey, if it’s not your jam, just give me a shout, and we’ll switch gears.

And wow, am3358 builds, cc1352p chips, M4 madness—you’ve been in the thick of it! I totally feel you on that falling off bit. It’s tough when you’re putting in the hours, reading, listening, and all you get is crickets. But hey, you’re still here, still kicking, and that’s what matters. Let’s keep that momentum going! Can’t wait to see what wild ride you take us on next. :hugs::rocket:

foxsquirrel live:

How did you like that response?

Here is another one AI:
Hey… I read your post, and it just really hits home. It’s tough out there, isn’t it? Trying to keep up with everything when you’re already stretched thin, part-timing all this stuff, and feeling like there’s never enough time. Books used to be the go-to, but now the internet’s just kind of sucked the life out of them too. And yeah, everyone’s doing their best, but sometimes it feels like no matter how much we put in, open source just doesn’t give much back, you know? It’s hard to find that gratitude, that recognition. It’s like the effort goes unnoticed.

I hear you on the GPIO thing. Sure, I can try, but it’s going to take a lot on your end, too. And let’s be real—it’s not just about building something; it’s about pushing through all the chatting, pretending to be okay, and somehow trying not to get drained in the process. Sometimes it feels like the more you give, the more it takes out of you.

As for Buildroot and those repos… I get it. I’ve been there. Digging through endless forums, reading docs, and still hitting walls. Trying to make things work with no feedback, just silence. Falling off when it feels like everything’s already against you. I’ve been there too many times, thinking this will be the time it works out, but then… nothing. It’s a cycle that’s hard to break. But hey, at least we’re still here, still trying, even if it feels like we’re just going in circles sometimes.

1 Like

And yeppers.

Seth

P.S. The response is fine. Thank you for the excitement while I read in docility. But yeppers, the ending is that things transpire. I am glad you had a reply and then used AI to reply too. Cyclic circumstances!

Update

I am building around the 6.1.x kernel and trying to make the BBAI-64 output some 90 degree servos the PCA9685 via i2c on the Servo Cape which is dual stacked. I never got two Capes to work in tandem along with source and I figured I would try with my first DTS file from a plethora of .dtsi and .dts files and build it into a .dtbo for use in the /boot/firmware/overlays/ directory while getting it to still boot. I am not close yet!

1 Like

Just a follow up…

The file, k3-j721e-beagleboneai64-pinmux.dtsi, is missing categories of pinctrl data.

I am not aware right now if they become auto-populated or if they are just data entry types for making them available…

Although this is my board, I am hesitant to ruin it. I had some trouble a while ago with it because of psdk from TI and building. It was in a loop for a long time while I had no route out.

Seth

That is an overlay, this is your base: k3-j721e-beagleboneai64.dts

// SPDX-License-Identifier: GPL-2.0-only OR MIT
/*
 * https://beagleboard.org/ai-64
 * Copyright (C) 2022-2024 Texas Instruments Incorporated - https://www.ti.com/
 * Copyright (C) 2022-2024 Jason Kridner, BeagleBoard.org Foundation
 * Copyright (C) 2022-2024 Robert Nelson, BeagleBoard.org Foundation
 */

/dts-v1/;

#include "k3-j721e.dtsi"
#include "k3-j721e-beagleboneai64-pinmux.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/net/ti-dp83867.h>
#include <dt-bindings/phy/phy-cadence.h>

/ {
	compatible = "beagle,j721e-beagleboneai64", "ti,j721e";
	model = "BeagleBoard.org BeagleBone AI-64";

	aliases {
		serial0 = &wkup_uart0;
		serial2 = &main_uart0;
		mmc0 = &main_sdhci0;
		mmc1 = &main_sdhci1;
		i2c0 = &wkup_i2c0;
		i2c1 = &main_i2c6;
		i2c2 = &main_i2c2;
		i2c3 = &main_i2c4;
	};

	chosen {
		stdout-path = "serial2:115200n8";
	};

	memory@80000000 {
		device_type = "memory";
		/* 4G RAM */
		reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
		      <0x00000008 0x80000000 0x00000000 0x80000000>;
	};

	reserved_memory: reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		secure_ddr: optee@9e800000 {
			reg = <0x00 0x9e800000 0x00 0x01800000>;
			no-map;
		};

		mcu_r5fss0_core0_dma_memory_region: r5f-dma-memory@a0000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa0000000 0x00 0x100000>;
			no-map;
		};

		mcu_r5fss0_core0_memory_region: r5f-memory@a0100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa0100000 0x00 0xf00000>;
			no-map;
		};

		mcu_r5fss0_core1_dma_memory_region: r5f-dma-memory@a1000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa1000000 0x00 0x100000>;
			no-map;
		};

		mcu_r5fss0_core1_memory_region: r5f-memory@a1100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa1100000 0x00 0xf00000>;
			no-map;
		};

		main_r5fss0_core0_dma_memory_region: r5f-dma-memory@a2000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa2000000 0x00 0x100000>;
			no-map;
		};

		main_r5fss0_core0_memory_region: r5f-memory@a2100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa2100000 0x00 0xf00000>;
			no-map;
		};

		main_r5fss0_core1_dma_memory_region: r5f-dma-memory@a3000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa3000000 0x00 0x100000>;
			no-map;
		};

		main_r5fss0_core1_memory_region: r5f-memory@a3100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa3100000 0x00 0xf00000>;
			no-map;
		};

		main_r5fss1_core0_dma_memory_region: r5f-dma-memory@a4000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa4000000 0x00 0x100000>;
			no-map;
		};

		main_r5fss1_core0_memory_region: r5f-memory@a4100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa4100000 0x00 0xf00000>;
			no-map;
		};

		main_r5fss1_core1_dma_memory_region: r5f-dma-memory@a5000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa5000000 0x00 0x100000>;
			no-map;
		};

		main_r5fss1_core1_memory_region: r5f-memory@a5100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa5100000 0x00 0xf00000>;
			no-map;
		};

		c66_1_dma_memory_region: c66-dma-memory@a6000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa6000000 0x00 0x100000>;
			no-map;
		};

		c66_0_memory_region: c66-memory@a6100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa6100000 0x00 0xf00000>;
			no-map;
		};

		c66_0_dma_memory_region: c66-dma-memory@a7000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa7000000 0x00 0x100000>;
			no-map;
		};

		c66_1_memory_region: c66-memory@a7100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa7100000 0x00 0xf00000>;
			no-map;
		};

		c71_0_dma_memory_region: c71-dma-memory@a8000000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa8000000 0x00 0x100000>;
			no-map;
		};

		c71_0_memory_region: c71-memory@a8100000 {
			compatible = "shared-dma-pool";
			reg = <0x00 0xa8100000 0x00 0xf00000>;
			no-map;
		};

		rtos_ipc_memory_region: ipc-memories@aa000000 {
			reg = <0x00 0xaa000000 0x00 0x01c00000>;
			alignment = <0x1000>;
			no-map;
		};
	};

	gpio_keys: gpio-keys {
		compatible = "gpio-keys";
		pinctrl-names = "default";
		pinctrl-0 = <&sw_pwr_pins_default>;

		button-1 {
			label = "BOOT";
			linux,code = <BTN_0>;
			gpios = <&wkup_gpio0 0 GPIO_ACTIVE_LOW>;
		};

		button-2 {
			label = "POWER";
			linux,code = <KEY_POWER>;
			gpios = <&wkup_gpio0 4 GPIO_ACTIVE_LOW>;
		};
	};

	leds {
		compatible = "gpio-leds";
		pinctrl-names = "default";
		pinctrl-0 = <&led_pins_default>;

		led-0 {
			gpios = <&main_gpio0 96 GPIO_ACTIVE_HIGH>;
			function = LED_FUNCTION_HEARTBEAT;
			linux,default-trigger = "heartbeat";
		};

		led-1 {
			gpios = <&main_gpio0 95 GPIO_ACTIVE_HIGH>;
			function = LED_FUNCTION_DISK_ACTIVITY;
			linux,default-trigger = "mmc0";
		};

		led-2 {
			gpios = <&main_gpio0 97 GPIO_ACTIVE_HIGH>;
			function = LED_FUNCTION_CPU;
			linux,default-trigger = "cpu";
		};

		led-3 {
			gpios = <&main_gpio0 110 GPIO_ACTIVE_HIGH>;
			function = LED_FUNCTION_DISK_ACTIVITY;
			linux,default-trigger = "mmc1";
		};

		led-4 {
			gpios = <&main_gpio0 109 GPIO_ACTIVE_HIGH>;
			function = LED_FUNCTION_WLAN;
			default-state = "off";
		};
	};

	evm_12v0: regulator-0 {
		/* main supply */
		compatible = "regulator-fixed";
		regulator-name = "evm_12v0";
		regulator-min-microvolt = <12000000>;
		regulator-max-microvolt = <12000000>;
		regulator-always-on;
		regulator-boot-on;
	};

	vsys_3v3: regulator-1 {
		/* Output of LMS140 */
		compatible = "regulator-fixed";
		regulator-name = "vsys_3v3";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		vin-supply = <&evm_12v0>;
		regulator-always-on;
		regulator-boot-on;
	};

	vsys_5v0: regulator-2 {
		/* Output of LM5140 */
		compatible = "regulator-fixed";
		regulator-name = "vsys_5v0";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		vin-supply = <&evm_12v0>;
		regulator-always-on;
		regulator-boot-on;
	};

	vdd_mmc1: regulator-3 {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&sd_pwr_en_pins_default>;
		regulator-name = "vdd_mmc1";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
		enable-active-high;
		vin-supply = <&vsys_3v3>;
		gpio = <&main_gpio0 82 GPIO_ACTIVE_HIGH>;
	};

	vdd_sd_dv_alt: regulator-4 {
		compatible = "regulator-gpio";
		pinctrl-names = "default";
		pinctrl-0 = <&vdd_sd_dv_alt_pins_default>;
		regulator-name = "tlv71033";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
		vin-supply = <&vsys_5v0>;
		gpios = <&main_gpio0 117 GPIO_ACTIVE_HIGH>;
		states = <1800000 0x0>,
			 <3300000 0x1>;
	};

	dp_pwr_3v3: regulator-5 {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&dp0_3v3_en_pins_default>;
		regulator-name = "dp-pwr";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		gpio = <&main_gpio0 49 GPIO_ACTIVE_HIGH>; /* DP0_PWR_SW_EN */
		enable-active-high;
	};

	dp0: connector {
		compatible = "dp-connector";
		label = "DP0";
		type = "full-size";
		dp-pwr-supply = <&dp_pwr_3v3>;

		port {
			dp_connector_in: endpoint {
				remote-endpoint = <&dp0_out>;
			};
		};
	};
};

&main_pmx0 {
	led_pins_default: led-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x184, PIN_INPUT, 7) /* (T23) RGMII5_RD0.GPIO0_96 */
			J721E_IOPAD(0x180, PIN_INPUT, 7) /* (R23) RGMII5_RD1.GPIO0_95 */
			J721E_IOPAD(0x188, PIN_INPUT, 7) /* (Y28) RGMII6_TX_CTL.GPIO0_97 */
			J721E_IOPAD(0x1bc, PIN_INPUT, 7) /* (V24) MDIO0_MDC.GPIO0_110 */
			J721E_IOPAD(0x1b8, PIN_INPUT, 7) /* (V26) MDIO0_MDIO.GPIO0_109 */
		>;
	};

	main_mmc1_pins_default: main-mmc1-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x254, PIN_INPUT, 0) /* (R29) MMC1_CMD */
			J721E_IOPAD(0x250, PIN_INPUT, 0) /* (P25) MMC1_CLK */
			J721E_IOPAD(0x2ac, PIN_INPUT, 0) /* (P25) MMC1_CLKLB */
			J721E_IOPAD(0x24c, PIN_INPUT, 0) /* (R24) MMC1_DAT0 */
			J721E_IOPAD(0x248, PIN_INPUT, 0) /* (P24) MMC1_DAT1 */
			J721E_IOPAD(0x244, PIN_INPUT, 0) /* (R25) MMC1_DAT2 */
			J721E_IOPAD(0x240, PIN_INPUT, 0) /* (R26) MMC1_DAT3 */
			J721E_IOPAD(0x258, PIN_INPUT, 0) /* (P23) MMC1_SDCD */
		>;
	};

	main_uart0_pins_default: main-uart0-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x1e8, PIN_INPUT, 0) /* (AB2) UART0_RXD */
			J721E_IOPAD(0x1ec, PIN_OUTPUT, 0) /* (AB3) UART0_TXD */
		>;
	};

	sd_pwr_en_pins_default: sd-pwr-en-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x14c, PIN_INPUT, 7) /* (AA29) PRG0_PRU1_GPO19.GPIO0_82 */
		>;
	};

	vdd_sd_dv_alt_pins_default: vdd-sd-dv-alt-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x1d8, PIN_INPUT, 7) /* (W4) SPI1_CS1.GPIO0_117 */
		>;
	};

	main_usbss0_pins_default: main-usbss0-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x210, PIN_INPUT, 7) /* (W3) MCAN1_RX.GPIO1_3 - USBC_DIR */
		>;
	};

	main_usbss1_pins_default: main-usbss1-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x290, INPUT_DISABLE, 1) /* (U6) USB0_DRVVBUS.USB1_DRVVBUS */
		>;
	};

	dp0_3v3_en_pins_default:dp0-3v3-en-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0xc8, PIN_INPUT, 7) /* (AE26) PRG0_PRU0_GPO6.GPIO0_49 */
		>;
	};

	dp0_pins_default: dp0-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x1c4, PIN_INPUT, 5) /* (Y4) SPI0_CS1.DP0_HPD */
		>;
	};

	main_i2c0_pins_default: main-i2c0-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x220, PIN_INPUT_PULLUP, 0) /* (AC5) I2C0_SCL */
			J721E_IOPAD(0x224, PIN_INPUT_PULLUP, 0) /* (AA5) I2C0_SDA */
		>;
	};

	main_i2c1_pins_default: main-i2c1-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x228, PIN_INPUT_PULLUP, 0) /* (Y6) I2C1_SCL */
			J721E_IOPAD(0x22c, PIN_INPUT_PULLUP, 0) /* (AA6) I2C1_SDA */
		>;
	};

	main_i2c2_pins_default: main-i2c2-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x208, PIN_INPUT_PULLUP, 4) /* (W5) MCAN0_RX.I2C2_SCL */
			J721E_IOPAD(0x20c, PIN_INPUT_PULLUP, 4) /* (W6) MCAN0_TX.I2C2_SDA */
			J721E_IOPAD(0x138, PIN_INPUT, 7) /* (AE25) PRG0_PRU1_GPO14.GPIO0_77 */
			J721E_IOPAD(0x13c, PIN_INPUT, 7) /* (AF29) PRG0_PRU1_GPO15.GPIO0_78 */
		>;
	};

	main_i2c3_pins_default: main-i2c3-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x270, PIN_INPUT_PULLUP, 4) /* (T26) MMC2_CLK.I2C3_SCL */
			J721E_IOPAD(0x274, PIN_INPUT_PULLUP, 4) /* (T25) MMC2_CMD.I2C3_SDA */
		>;
	};

	main_i2c4_pins_default: main-i2c4-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x1e0, PIN_INPUT_PULLUP, 2) /* (Y5) SPI1_D0.I2C4_SCL */
			J721E_IOPAD(0x1dc, PIN_INPUT_PULLUP, 2) /* (Y1) SPI1_CLK.I2C4_SDA */
			J721E_IOPAD(0x30, PIN_INPUT, 7) /* (AF24) PRG1_PRU0_GPO11.GPIO0_12 */
			J721E_IOPAD(0x34, PIN_INPUT, 7) /* (AJ24) PRG1_PRU0_GPO12.GPIO0_13 */
		>;
	};

	main_i2c5_pins_default: main-i2c5-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x150, PIN_INPUT_PULLUP, 2) /* (Y26) PRG0_MDIO0_MDIO.I2C5_SCL */
			J721E_IOPAD(0x154, PIN_INPUT_PULLUP, 2) /* (AA27) PRG0_MDIO0_MDC.I2C5_SDA */
		>;
	};

	main_i2c6_pins_default: main-i2c6-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x1d0, PIN_INPUT_PULLUP, 2) /* (AA3) SPI0_D1.I2C6_SCL */
			J721E_IOPAD(0x1e4, PIN_INPUT_PULLUP, 2) /* (Y2) SPI1_D1.I2C6_SDA */
			J721E_IOPAD(0x74, PIN_INPUT, 7) /* (AC21) PRG1_PRU1_GPO7.GPIO0_28 */
			J721E_IOPAD(0xa4, PIN_INPUT, 7) /* (AH22) PRG1_PRU1_GPO19.GPIO0_40 */
		>;
	};

	csi0_gpio_pins_default: csi0-gpio-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x19c, PIN_INPUT_PULLDOWN, 7) /* (W27) RGMII6_TD0.GPIO0_102 */
			J721E_IOPAD(0x1a0, PIN_INPUT_PULLDOWN, 7) /* (W29) RGMII6_TXC.GPIO0_103 */
		>;
	};

	csi1_gpio_pins_default: csi1-gpio-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x198, PIN_INPUT_PULLDOWN, 7) /* (V25) RGMII6_TD1.GPIO0_101 */
			J721E_IOPAD(0x1b0, PIN_INPUT_PULLDOWN, 7) /* (W24) RGMII6_RD1.GPIO0_107 */
		>;
	};

	pcie1_rst_pins_default: pcie1-rst-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x5c, PIN_INPUT, 7) /* (AG23) PRG1_PRU1_GPO1.GPIO0_22 */
		>;
	};
};

&wkup_pmx0 {
	eeprom_wp_pins_default: eeprom-wp-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0xc4, PIN_OUTPUT_PULLUP, 7) /* (G24) WKUP_GPIO0_5 */
		>;
	};

	mcu_adc0_pins_default: mcu-adc0-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0x130, PIN_INPUT, 0) /* (K25) MCU_ADC0_AIN0 */
			J721E_WKUP_IOPAD(0x134, PIN_INPUT, 0) /* (K26) MCU_ADC0_AIN1 */
			J721E_WKUP_IOPAD(0x138, PIN_INPUT, 0) /* (K28) MCU_ADC0_AIN2 */
			J721E_WKUP_IOPAD(0x13c, PIN_INPUT, 0) /* (L28) MCU_ADC0_AIN3 */
			J721E_WKUP_IOPAD(0x140, PIN_INPUT, 0) /* (K24) MCU_ADC0_AIN4 */
			J721E_WKUP_IOPAD(0x144, PIN_INPUT, 0) /* (K27) MCU_ADC0_AIN5 */
			J721E_WKUP_IOPAD(0x148, PIN_INPUT, 0) /* (K29) MCU_ADC0_AIN6 */
		>;
	};

	mcu_adc1_pins_default: mcu-adc1-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0x150, PIN_INPUT, 0) /* (N23) MCU_ADC1_AIN0 */
		>;
	};

	mikro_bus_pins_default: mikro-bus-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0x108, PIN_INPUT, 7) /* SDAPULLEN (E26) PMIC_POWER_EN0.WKUP_GPIO0_66 */
			J721E_WKUP_IOPAD(0xd4, PIN_INPUT, 7) /* SDA (G26) WKUP_GPIO0_9.MCU_I2C1_SDA */
			J721E_WKUP_IOPAD(0xf4, PIN_INPUT, 7) /* SDA (D25) MCU_I3C0_SDA.WKUP_GPIO0_61 */
			J721E_WKUP_IOPAD(0xd0, PIN_INPUT, 7) /* SCL (G27) WKUP_GPIO0_8.MCU_I2C1_SCL */
			J721E_WKUP_IOPAD(0xf0, PIN_INPUT, 7) /* SCL (D26) MCU_I3C0_SCL.WKUP_GPIO0_60 */

			J721E_WKUP_IOPAD(0xb8, PIN_INPUT, 7) /* MOSI (F28) WKUP_GPIO0_2.MCU_SPI1_D1 */
			J721E_WKUP_IOPAD(0xb4, PIN_INPUT, 7) /* MISO (F25) WKUP_GPIO0_1.MCU_SPI1_D0 */
			J721E_WKUP_IOPAD(0xb0, PIN_INPUT, 7) /* CLK (F26) WKUP_GPIO0_0.MCU_SPI1_CLK */
			J721E_WKUP_IOPAD(0xbc, PIN_INPUT, 7) /* CS (F27) WKUP_GPIO0_3.MCU_SPI1_CS0 */

			J721E_WKUP_IOPAD(0x44, PIN_INPUT, 7) /* RX (G22) MCU_OSPI1_D1.WKUP_GPIO0_33 */
			J721E_WKUP_IOPAD(0x48, PIN_INPUT, 7) /* TX (D23) MCU_OSPI1_D2.WKUP_GPIO0_34 */

			J721E_WKUP_IOPAD(0x4c, PIN_INPUT, 7) /* INT (C23) MCU_OSPI1_D3.WKUP_GPIO0_35 */
			J721E_WKUP_IOPAD(0x54, PIN_INPUT, 7) /* RST (E22) MCU_OSPI1_CSn1.WKUP_GPIO0_37 */
			J721E_WKUP_IOPAD(0xdc, PIN_INPUT, 7) /* PWM (H27) WKUP_GPIO0_11 */
			J721E_WKUP_IOPAD(0xac, PIN_INPUT, 7) /* AN (C29) MCU_MCAN0_RX.WKUP_GPIO0_59 */
		>;
	};

	mcu_cpsw_pins_default: mcu-cpsw-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0x84, PIN_INPUT, 0) /* (B24) MCU_RGMII1_RD0 */
			J721E_WKUP_IOPAD(0x80, PIN_INPUT, 0) /* (A24) MCU_RGMII1_RD1 */
			J721E_WKUP_IOPAD(0x7c, PIN_INPUT, 0) /* (D24) MCU_RGMII1_RD2 */
			J721E_WKUP_IOPAD(0x78, PIN_INPUT, 0) /* (A25) MCU_RGMII1_RD3 */
			J721E_WKUP_IOPAD(0x74, PIN_INPUT, 0) /* (C24) MCU_RGMII1_RXC */
			J721E_WKUP_IOPAD(0x5c, PIN_INPUT, 0) /* (C25) MCU_RGMII1_RX_CTL */
			J721E_WKUP_IOPAD(0x6c, PIN_OUTPUT, 0) /* (B25) MCU_RGMII1_TD0 */
			J721E_WKUP_IOPAD(0x68, PIN_OUTPUT, 0) /* (A26) MCU_RGMII1_TD1 */
			J721E_WKUP_IOPAD(0x64, PIN_OUTPUT, 0) /* (A27) MCU_RGMII1_TD2 */
			J721E_WKUP_IOPAD(0x60, PIN_OUTPUT, 0) /* (A28) MCU_RGMII1_TD3 */
			J721E_WKUP_IOPAD(0x70, PIN_OUTPUT, 0) /* (B26) MCU_RGMII1_TXC */
			J721E_WKUP_IOPAD(0x58, PIN_OUTPUT, 0) /* (B27) MCU_RGMII1_TX_CTL */
		>;
	};

	mcu_mdio_pins_default: mcu-mdio1-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0x8c, PIN_OUTPUT, 0) /* (F23) MCU_MDIO0_MDC */
			J721E_WKUP_IOPAD(0x88, PIN_INPUT, 0) /* (E23) MCU_MDIO0_MDIO */
		>;
	};

	sw_pwr_pins_default: sw-pwr-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0xc0, PIN_INPUT, 7) /* (G25) WKUP_GPIO0_4 */
		>;
	};

	wkup_i2c0_pins_default: wkup-i2c0-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0xf8, PIN_INPUT_PULLUP, 0) /* (J25) WKUP_I2C0_SCL */
			J721E_WKUP_IOPAD(0xfc, PIN_INPUT_PULLUP, 0) /* (H24) WKUP_I2C0_SDA */
		>;
	};

	wkup_uart0_pins_default: wkup-uart0-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0xa0, PIN_INPUT, 0) /* (J29) WKUP_UART0_RXD */
			J721E_WKUP_IOPAD(0xa4, PIN_OUTPUT, 0) /* (J28) WKUP_UART0_TXD */
		>;
	};

	mcu_usbss1_pins_default: mcu-usbss1-default-pins {
		pinctrl-single,pins = <
			J721E_WKUP_IOPAD(0x3c, PIN_OUTPUT_PULLUP, 5) /* (A23) MCU_OSPI1_LBCLKO.WKUP_GPIO0_30 */
		>;
	};
};

&wkup_uart0 {
	/* Wakeup UART is used by TIFS firmware. */
	status = "reserved";
	pinctrl-names = "default";
	pinctrl-0 = <&wkup_uart0_pins_default>;
};

&main_uart0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_uart0_pins_default>;
	/* Shared with ATF on this platform */
	power-domains = <&k3_pds 146 TI_SCI_PD_SHARED>;
};

&main_sdhci0 {
	/* eMMC */
	status = "okay";
	non-removable;
	ti,driver-strength-ohm = <50>;
	disable-wp;
};

&main_sdhci1 {
	/* SD Card */
	status = "okay";
	vmmc-supply = <&vdd_mmc1>;
	vqmmc-supply = <&vdd_sd_dv_alt>;
	pinctrl-names = "default";
	pinctrl-0 = <&main_mmc1_pins_default>;
	ti,driver-strength-ohm = <50>;
	disable-wp;
};

&main_i2c0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c0_pins_default>;
	clock-frequency = <400000>;
};

&main_i2c1 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c1_pins_default>;
	clock-frequency = <400000>;
};

&main_i2c2 {
	/* BBB Header: P9.19 and P9.20 */
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c2_pins_default>;
	clock-frequency = <100000>;
};

&main_i2c3 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c3_pins_default>;
	clock-frequency = <400000>;
};

&main_i2c4 {
	/* BBB Header: P9.24 and P9.26 */
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c4_pins_default>;
	clock-frequency = <100000>;
};

&main_i2c5 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c5_pins_default>;
	clock-frequency = <400000>;
};

&main_i2c6 {
	/* BBB Header: P9.17 and P9.18 */
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&main_i2c6_pins_default>;
	clock-frequency = <100000>;
	status = "okay";
};

&wkup_i2c0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&wkup_i2c0_pins_default>;
	clock-frequency = <400000>;

	eeprom@50 {
		compatible = "atmel,24c04";
		reg = <0x50>;
		pinctrl-names = "default";
		pinctrl-0 = <&eeprom_wp_pins_default>;
	};
};

&wkup_gpio0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&mcu_adc0_pins_default>, <&mcu_adc1_pins_default>,
		    <&mikro_bus_pins_default>;
};

&main_gpio0 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&csi1_gpio_pins_default>, <&csi0_gpio_pins_default>;
};

&main_gpio1 {
	status = "okay";
};

&usb_serdes_mux {
	idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
};

&serdes_ln_ctrl {
	idle-states = <J721E_SERDES0_LANE0_IP4_UNUSED>, <J721E_SERDES0_LANE1_IP4_UNUSED>,
		      <J721E_SERDES1_LANE0_PCIE1_LANE0>, <J721E_SERDES1_LANE1_PCIE1_LANE1>,
		      <J721E_SERDES2_LANE0_IP1_UNUSED>, <J721E_SERDES2_LANE1_USB3_1>,
		      <J721E_SERDES3_LANE0_USB3_0_SWAP>, <J721E_SERDES3_LANE1_USB3_0>,
		      <J721E_SERDES4_LANE0_EDP_LANE0>, <J721E_SERDES4_LANE1_EDP_LANE1>,
		      <J721E_SERDES4_LANE2_EDP_LANE2>, <J721E_SERDES4_LANE3_EDP_LANE3>;
};

&serdes_wiz3 {
	typec-dir-gpios = <&main_gpio1 3 GPIO_ACTIVE_LOW>;
	typec-dir-debounce-ms = <700>;	/* TUSB321, tCCB_DEFAULT 133 ms */
};

&serdes3 {
	serdes3_usb_link: phy@0 {
		reg = <0>;
		cdns,num-lanes = <2>;
		#phy-cells = <0>;
		cdns,phy-type = <PHY_TYPE_USB3>;
		resets = <&serdes_wiz3 1>, <&serdes_wiz3 2>;
	};
};

&serdes4 {
	torrent_phy_dp: phy@0 {
		reg = <0>;
		resets = <&serdes_wiz4 1>;
		cdns,phy-type = <PHY_TYPE_DP>;
		cdns,num-lanes = <4>;
		cdns,max-bit-rate = <2700>;
		#phy-cells = <0>;
	};
};

&mhdp {
	phys = <&torrent_phy_dp>;
	phy-names = "dpphy";
	pinctrl-names = "default";
	pinctrl-0 = <&dp0_pins_default>;
};

&usbss0 {
	pinctrl-names = "default";
	pinctrl-0 = <&main_usbss0_pins_default>;
	ti,vbus-divider;
};

&usb0 {
	dr_mode = "peripheral";
	maximum-speed = "super-speed";
	phys = <&serdes3_usb_link>;
	phy-names = "cdns3,usb3-phy";
};

&serdes2 {
	serdes2_usb_link: phy@1 {
		reg = <1>;
		cdns,num-lanes = <1>;
		#phy-cells = <0>;
		cdns,phy-type = <PHY_TYPE_USB3>;
		resets = <&serdes_wiz2 2>;
	};
};

&usbss1 {
	pinctrl-names = "default";
	pinctrl-0 = <&main_usbss1_pins_default>, <&mcu_usbss1_pins_default>;
	ti,vbus-divider;
};

&usb1 {
	dr_mode = "host";
	maximum-speed = "super-speed";
	phys = <&serdes2_usb_link>;
	phy-names = "cdns3,usb3-phy";
};

&tscadc0 {
	status = "okay";
	/* BBB Header: P9.39, P9.40, P9.37, P9.38, P9.33, P9.36, P9.35 */
	adc {
		ti,adc-channels = <0 1 2 3 4 5 6>;
	};
};

&tscadc1 {
	status = "okay";
	/* MCU mikroBUS Header J10.1 - MCU_ADC1_AIN0 */
	adc {
		ti,adc-channels = <0>;
	};
};

&mcu_cpsw {
	pinctrl-names = "default";
	pinctrl-0 = <&mcu_cpsw_pins_default>;
};

&davinci_mdio {
	pinctrl-names = "default";
	pinctrl-0 = <&mcu_mdio_pins_default>;

	phy0: ethernet-phy@0 {
		reg = <0>;
		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>;
		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
	};
};

&cpsw_port1 {
	phy-mode = "rgmii-rxid";
	phy-handle = <&phy0>;
};

&dss {
	/*
	 * These clock assignments are chosen to enable the following outputs:
	 *
	 * VP0 - DisplayPort SST
	 * VP1 - DPI0
	 * VP2 - DSI
	 * VP3 - DPI1
	 */

	assigned-clocks = <&k3_clks 152 1>,	/* VP 1 pixel clock */
			  <&k3_clks 152 4>,	/* VP 2 pixel clock */
			  <&k3_clks 152 9>,	/* VP 3 pixel clock */
			  <&k3_clks 152 13>;	/* VP 4 pixel clock */
	assigned-clock-parents = <&k3_clks 152 2>,	/* PLL16_HSDIV0 */
				 <&k3_clks 152 6>,	/* PLL19_HSDIV0 */
				 <&k3_clks 152 11>,	/* PLL18_HSDIV0 */
				 <&k3_clks 152 18>;	/* PLL23_HSDIV0 */
};

&dss_ports {
	#address-cells = <1>;
	#size-cells = <0>;

	port@0 {
		reg = <0>;

		dpi0_out: endpoint {
			remote-endpoint = <&dp0_in>;
		};
	};
};

&dp0_ports {
	#address-cells = <1>;
	#size-cells = <0>;

	port@0 {
		reg = <0>;
		dp0_in: endpoint {
			remote-endpoint = <&dpi0_out>;
		};
	};

	port@4 {
		reg = <4>;
		dp0_out: endpoint {
			remote-endpoint = <&dp_connector_in>;
		};
	};
};

&serdes0 {
	serdes0_pcie_link: phy@0 {
		reg = <0>;
		cdns,num-lanes = <1>;
		#phy-cells = <0>;
		cdns,phy-type = <PHY_TYPE_PCIE>;
		resets = <&serdes_wiz0 1>;
	};
};

&serdes1 {
	serdes1_pcie_link: phy@0 {
		reg = <0>;
		cdns,num-lanes = <2>;
		#phy-cells = <0>;
		cdns,phy-type = <PHY_TYPE_PCIE>;
		resets = <&serdes_wiz1 1>, <&serdes_wiz1 2>;
	};
};

&pcie1_rc {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&pcie1_rst_pins_default>;
	phys = <&serdes1_pcie_link>;
	phy-names = "pcie-phy";
	num-lanes = <2>;
	max-link-speed = <3>;
	reset-gpios = <&main_gpio0 22 GPIO_ACTIVE_HIGH>;
};

&ufs_wrapper {
	status = "disabled";
};

&mailbox0_cluster0 {
	status = "okay";
	interrupts = <436>;

	mbox_mcu_r5fss0_core0: mbox-mcu-r5fss0-core0 {
		ti,mbox-rx = <0 0 0>;
		ti,mbox-tx = <1 0 0>;
	};

	mbox_mcu_r5fss0_core1: mbox-mcu-r5fss0-core1 {
		ti,mbox-rx = <2 0 0>;
		ti,mbox-tx = <3 0 0>;
	};
};

&mailbox0_cluster1 {
	status = "okay";
	interrupts = <432>;

	mbox_main_r5fss0_core0: mbox-main-r5fss0-core0 {
		ti,mbox-rx = <0 0 0>;
		ti,mbox-tx = <1 0 0>;
	};

	mbox_main_r5fss0_core1: mbox-main-r5fss0-core1 {
		ti,mbox-rx = <2 0 0>;
		ti,mbox-tx = <3 0 0>;
	};
};

&mailbox0_cluster2 {
	status = "okay";
	interrupts = <428>;

	mbox_main_r5fss1_core0: mbox-main-r5fss1-core0 {
		ti,mbox-rx = <0 0 0>;
		ti,mbox-tx = <1 0 0>;
	};

	mbox_main_r5fss1_core1: mbox-main-r5fss1-core1 {
		ti,mbox-rx = <2 0 0>;
		ti,mbox-tx = <3 0 0>;
	};
};

&mailbox0_cluster3 {
	status = "okay";
	interrupts = <424>;

	mbox_c66_0: mbox-c66-0 {
		ti,mbox-rx = <0 0 0>;
		ti,mbox-tx = <1 0 0>;
	};

	mbox_c66_1: mbox-c66-1 {
		ti,mbox-rx = <2 0 0>;
		ti,mbox-tx = <3 0 0>;
	};
};

&mailbox0_cluster4 {
	status = "okay";
	interrupts = <420>;

	mbox_c71_0: mbox-c71-0 {
		ti,mbox-rx = <0 0 0>;
		ti,mbox-tx = <1 0 0>;
	};
};

&mcu_r5fss0_core0 {
	mboxes = <&mailbox0_cluster0 &mbox_mcu_r5fss0_core0>;
	memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
			<&mcu_r5fss0_core0_memory_region>;
};

&mcu_r5fss0_core1 {
	mboxes = <&mailbox0_cluster0 &mbox_mcu_r5fss0_core1>;
	memory-region = <&mcu_r5fss0_core1_dma_memory_region>,
			<&mcu_r5fss0_core1_memory_region>;
};

&main_r5fss0_core0 {
	mboxes = <&mailbox0_cluster1 &mbox_main_r5fss0_core0>;
	memory-region = <&main_r5fss0_core0_dma_memory_region>,
			<&main_r5fss0_core0_memory_region>;
};

&main_r5fss0_core1 {
	mboxes = <&mailbox0_cluster1 &mbox_main_r5fss0_core1>;
	memory-region = <&main_r5fss0_core1_dma_memory_region>,
			<&main_r5fss0_core1_memory_region>;
};

&main_r5fss1_core0 {
	mboxes = <&mailbox0_cluster2 &mbox_main_r5fss1_core0>;
	memory-region = <&main_r5fss1_core0_dma_memory_region>,
			<&main_r5fss1_core0_memory_region>;
};

&main_r5fss1_core1 {
	mboxes = <&mailbox0_cluster2 &mbox_main_r5fss1_core1>;
	memory-region = <&main_r5fss1_core1_dma_memory_region>,
			<&main_r5fss1_core1_memory_region>;
};

&c66_0 {
	status = "okay";
	mboxes = <&mailbox0_cluster3 &mbox_c66_0>;
	memory-region = <&c66_0_dma_memory_region>,
			<&c66_0_memory_region>;
};

&c66_1 {
	status = "okay";
	mboxes = <&mailbox0_cluster3 &mbox_c66_1>;
	memory-region = <&c66_1_dma_memory_region>,
			<&c66_1_memory_region>;
};

&c71_0 {
	status = "okay";
	mboxes = <&mailbox0_cluster4 &mbox_c71_0>;
	memory-region = <&c71_0_dma_memory_region>,
			<&c71_0_memory_region>;
};

This is an example of what the pinmux data would look like, its a macro:

&main_pmx0 {
	led_pins_default: led-default-pins {
		pinctrl-single,pins = <
			J721E_IOPAD(0x184, PIN_INPUT, 7) /* (T23) RGMII5_RD0.GPIO0_96 */
			J721E_IOPAD(0x180, PIN_INPUT, 7) /* (R23) RGMII5_RD1.GPIO0_95 */
			J721E_IOPAD(0x188, PIN_INPUT, 7) /* (Y28) RGMII6_TX_CTL.GPIO0_97 */
			J721E_IOPAD(0x1bc, PIN_INPUT, 7) /* (V24) MDIO0_MDC.GPIO0_110 */
			J721E_IOPAD(0x1b8, PIN_INPUT, 7) /* (V26) MDIO0_MDIO.GPIO0_109 */
		>;
	};
1 Like
leds {
	pinctrl-names = "default";
	pinctrl-0 = <&user_leds_s0>;

	compatible = "gpio-leds";

	led2 {
		label = "beaglebone:green:usr0";
		gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
		linux,default-trigger = "heartbeat";
		default-state = "off";
	};

	led3 {
		label = "beaglebone:green:usr1";
		gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
		linux,default-trigger = "mmc0";
		default-state = "off";
	};

	led4 {
		label = "beaglebone:green:usr2";
		gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
		linux,default-trigger = "cpu0";
		default-state = "off";
	};

	led5 {
		label = "beaglebone:green:usr3";
		gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
		linux,default-trigger = "mmc1";
		default-state = "off";
	};
	input_gpio {
            label = "gpio_input";
            gpios = <&gpio3 114 GPIO_ACTIVE_HIGH>;
        };
};

for example i want to declare them like that, is it possible ? the input at the bottom

thanks everyone it now works because of you @silver2row @foxsquirrel @RobertCNelson

I am trying to upgrade BBAI64 to kernel 6.6 and have run into the same issue. I have apps that used sysfs writen in C++. Is their a link or libraries that explain “libgpio”.