Can the OPI5 be Configured to Run LCNC?

More
12 May 2023 14:07 #271227 by echristley
What does dtb stand for?

Also, as I bring this together, should I document the effort here, or a separate build thread? I'd like to lay down a clean trail of breadcrumbs that the next person can pick up.

Please Log in or Create an account to join the conversation.

More
12 May 2023 15:23 #271231 by royka
Device Tree Binary, you'll find it somewhere in /boot/dtb
find /boot -name *.dtb

For me it's all ok, but it might be easier to find and to follow when you start a new thread.
The following user(s) said Thank You: echristley

Please Log in or Create an account to join the conversation.

More
14 May 2023 18:32 - 14 May 2023 18:54 #271360 by Guglielmi
Royka (or any other..),
do you know why serials are not working?
Could be disabled in configuration?
armbian-config setting has no "Hardware" configuration, I checked again in the kernel config but I did not found a specific "enable" for serial.
ClassicLadder search for ttyS0, 1,2,3, USB0, USB1
I found that I have a ttyS9, I don't know why.. in case, how to change the list in ClassicLadder?

Now I have OPI5 working fine, driver for GPIO, today I also enabled my custom HMI based on qtpyvcp.. last step is the modbus for spindle and additional I/O I already have, than I replace RPI4

I tried to add "overlays=uart0-m2 uart1-m1 uart3-m0 uart4-m0" as explained in the manual, but nothing..
 
Last edit: 14 May 2023 18:54 by Guglielmi.

Please Log in or Create an account to join the conversation.

More
14 May 2023 21:22 #271372 by royka
Perhaps you don't have the overlay files in /boot/dtb/rockchip/overlay.
You could download them (save raw) from:
github.com/orangepi-xunlong/linux-orange...dts/rockchip/overlay

Then to compile for example:
dtc -I dts -O dtb -o orangepi-5-uart0.dtbo rk3588-uart0-m2.dts

Place the dtbo file in /boot/dtb/rockchip/overlay/
In armbianEnv.txt
overlay_prefix=orangepi-5
overlays= uart0

The downside to do it this way is when you install/update a new dtb the added overlays will get deleted. There is also an option to put it in something like user-overlays which get not deleted, but I haven't tried that yet.

Would be nice if you would share your driver. About your previous post I read the step rate should be divided by 2 because it's one for up and one for down.
Attachments:
The following user(s) said Thank You: Guglielmi

Please Log in or Create an account to join the conversation.

More
14 May 2023 21:48 - 14 May 2023 21:48 #271373 by Guglielmi
Thanks, I will share of course.. I'm just waiting after a real test with hardware, maybe I have something to adjust and I have to re-post the file updated. Give me few days I will attach it! 
Last edit: 14 May 2023 21:48 by Guglielmi.
The following user(s) said Thank You: royka

Please Log in or Create an account to join the conversation.

More
15 May 2023 21:07 #271423 by Guglielmi
I checked and now the serial works perfectly !!
I'm now designing the interface board and finally I will test on CNC.

Last question: I can work with ttyS0 or ttyS1 so in principle I'm fine.. but.. there is a potential debug UART on OPI5 (3 pins separated and close to GPIOs).. why I can't do the same as other UARTs? In the repo you posted above, I can't find dts for this port, in the manual is reported as ttyUSB0, I found some info in the web and based on them, it seems to be ttyS2. 
 

Should I disable the console and then maybe I can access to it? (how?)
If it's an effort, I can deal with ttyS0, but using the debug port I can have 2 additional GPIOs for general purpose functions.. at the moment I don't need but designing the hardware interface I prefer to have the max flexibility.
 
Attachments:

Please Log in or Create an account to join the conversation.

More
15 May 2023 21:35 #271427 by royka
Nice!
To disable the serial console I think adding the following line to armbianEnv.txt should work:
console=display
echo "console=display" | sudo tee -a /boot/armbianEnv.txt

There is no overlay file for it needed I guess because it's enabled by default in the dtb.
The following user(s) said Thank You: Guglielmi

Please Log in or Create an account to join the conversation.

More
15 May 2023 22:15 #271429 by Guglielmi
Yes, I disabled the console (at least the command console=ttyS2 disappeared) but unfortunately it doesn't help to get the port available.. 
Strange.. if I try to create manually the dts like others based on UART2? The problem is that ttyS2 is not present in dev folder
 

Please Log in or Create an account to join the conversation.

More
15 May 2023 22:48 #271430 by royka
I see it's already in use in:
github.com/armbian/linux-rockchip/blob/r...ip/rk3588-linux.dtsi

When I enable this overlay I can see ttyS2, could you test this one?
 
Attachments:

Please Log in or Create an account to join the conversation.

More
16 May 2023 19:10 #271463 by Guglielmi
I placed the file into /boot/dtb/rockchip/overlay/ folder, as others files and if I add uart2 in the overlay command into
ArmbianEnv.txt file, it doesn't boot.. doesn't startup.
I tried to add the file and remove the uart2 name in the ArmbianEnv.txt file and the serial is not existing..
What I did wrong?
The file it seems in the folder above in the repo, should I place it in /boot/dtb/rockchip/ folder?

Please Log in or Create an account to join the conversation.

Time to create page: 0.188 seconds
Powered by Kunena Forum