f_ changed the topic of ##raspberrypi-internals to: The inner workings of the Raspberry Pi (Low level VPU/HW) -- for general queries please visit #raspberrypi -- open firmware: https://librerpi.github.io/ -- VC4 VPU Programmers Manual: https://github.com/hermanhermitage/videocoreiv/wiki -- chat logs: https://libera.irclog.whitequark.org/~h~raspberrypi-internals -- bridged to matrix and discord
jcea has quit [Ping timeout: 272 seconds]
f_[xmpp] has joined ##raspberrypi-internals
angerisagift has quit [Ping timeout: 255 seconds]
angerisagift has joined ##raspberrypi-internals
<Ad0> is there something I have to do with u-boot if I intend to use uart0 and uart1 as rs485? that is - I don't want uboot console to disturb anything
<Ad0> damn seems like the raspberrypi kernel has 0 support
<Ad0> like on a kernel level
<clever> Ad0: in theory, just disable the uart in u-boot
<Ad0> yeah
<Ad0> I added CONFIG_DM_SERIAL=n
<Ad0> if uart0 has rs485 devices attached to it they will receive garbage during boot and that's not nice hehe
<Ad0> also the raspberry pi kernel 5.10 does not have kernel level rs485 support in amba-pl011.c, but 5.15 does
<Ad0> so 5.15 it is, I can't be arsed to patch 5.10 with that
<Ad0> also function names etc get moved around
<Ad0> not as simple as replacing the C file
<clever> Ad0: connect an rs232 uart to uart0 in parallel (just rx is fine), what does it detect during boot?
<Ad0> I will check, right now it just locks up if I set status="okay" in the dts
<Ad0> I need to fix that first
<Herc> echo ___o2e mi
Riku_V has quit [Ping timeout: 272 seconds]
jcea has joined ##raspberrypi-internals
<Ad0> or u-boot, I can't debug it sadly
<Ad0> &uart1 is fine
<Ad0> could enable_uart=1 cause problems?
<Ad0> I see it's commented out in the working device
bob_x2 has quit [Ping timeout: 255 seconds]
<Ad0> nope that was not it
<Ad0> maybe it messes with the serial stuff in u-boot ...
<Ad0> brcm,pins = <14 15 17>;
<Ad0> or the brcm,function
<clever> enable_uart=1 tells the firmware to mux a uart to gpio 14/15, and may auto-configure the uart
<clever> which uart, depends on if bt is enabled
<clever> u-boot may then ignore all of that, and do its own thing
bob_x2 has joined ##raspberrypi-internals
<Ad0> ok
<Ad0> so I can just turn it off right
<Ad0> since it's handled in the device tree
<clever> yeah
<clever> the mini-uart is where things get a bit more complex
<clever> but that cant do 485
<Ad0> yeah but the uart0 is the one causing problems
<clever> i'm still wondering, what text is uart0 printing in rs232 mode, that is causing the corrupt 485 data
<clever> once we know the string its printing, we can know where to look
<Ad0> yeah I can't even know
<Ad0> because I can't get the RS485 overlay to work
<Ad0> when overriding &uart0 it doesn't boot
<Ad0> &uart1 makes it boot and it shows correctly RS485 term etc in debug gpio
<Ad0> so maybe there's something with my firmware vs that firmware, or it's the kernel
<Ad0> literally the last thing left
<Ad0> I just set status="okay" to see if it boots in default
<Ad0> nope doesn't boot LOL
<Ad0> only boot if uart0 is disabled
<Ad0> I do have to have CONFIG_OF_BOARD right?
<clever> Ad0: i forget what that one does, ive not used u-boot much lately
<Ad0> If this variable is defined, U-Boot will use the device tree
<Ad0> provided by the board at runtime instead of embedding one with
<Ad0> the image
<clever> Ad0: i think thats in reference to which DT u-boot itself uses, for how to access the debug uart and gfx and sd/usb
<clever> and then your uboot script determines which DT linux gets
<Ad0> ok
<clever> and depending on what both are doing, uboot and/or linux, can ignore the enable_uart=1 and dtoverlay flags
finsternis has quit [Ping timeout: 264 seconds]
finsternis has joined ##raspberrypi-internals
<f_ridge> <f​_[mtrx]1/M> annoying
<f_ridge> <f​_[mtrx]1/M> I'll fix the bridge real quick.
<f_> Sorry for the inconvienience.
<f_> :/
<f_> `should` work now, sorry!
<f_> I shall consider puppetting someday.
f_ is now known as funderscore
funderscore is now known as f_
<Ad0> it booted when I explicitly set enable_uart=0
<Ad0> clever, it was u-boot
<Ad0> it has to have been something with the RS485 chips messing things up in the boot process
<Ad0> omg I did it
<Ad0> thanks for all your help clever
<clever> Ad0: your welcome
Riku_V has joined ##raspberrypi-internals