02:56
jcea has quit [Ping timeout: 272 seconds]
06:33
f_[xmpp] has joined ##raspberrypi-internals
12:18
angerisagift has quit [Ping timeout: 255 seconds]
12:20
angerisagift has joined ##raspberrypi-internals
13:06
<
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
13:54
<
Ad0 >
damn seems like the raspberrypi kernel has 0 support
13:54
<
Ad0 >
like on a kernel level
14:31
<
clever >
Ad0: in theory, just disable the uart in u-boot
14:34
<
Ad0 >
I added CONFIG_DM_SERIAL=n
14:35
<
Ad0 >
if uart0 has rs485 devices attached to it they will receive garbage during boot and that's not nice hehe
14:35
<
Ad0 >
also the raspberry pi kernel 5.10 does not have kernel level rs485 support in amba-pl011.c, but 5.15 does
14:36
<
Ad0 >
so 5.15 it is, I can't be arsed to patch 5.10 with that
14:36
<
Ad0 >
also function names etc get moved around
14:37
<
Ad0 >
not as simple as replacing the C file
14:41
<
clever >
Ad0: connect an rs232 uart to uart0 in parallel (just rx is fine), what does it detect during boot?
14:41
<
Ad0 >
I will check, right now it just locks up if I set status="okay" in the dts
14:42
<
Ad0 >
I need to fix that first
14:55
<
Herc >
echo ___o2e mi
15:38
Riku_V has quit [Ping timeout: 272 seconds]
16:12
jcea has joined ##raspberrypi-internals
17:26
<
Ad0 >
or u-boot, I can't debug it sadly
17:26
<
Ad0 >
&uart1 is fine
17:27
<
Ad0 >
could enable_uart=1 cause problems?
17:27
<
Ad0 >
I see it's commented out in the working device
17:28
bob_x2 has quit [Ping timeout: 255 seconds]
17:29
<
Ad0 >
nope that was not it
17:29
<
Ad0 >
maybe it messes with the serial stuff in u-boot ...
17:30
<
Ad0 >
brcm,pins = <14 15 17>;
17:30
<
Ad0 >
or the brcm,function
17:31
<
clever >
enable_uart=1 tells the firmware to mux a uart to gpio 14/15, and may auto-configure the uart
17:31
<
clever >
which uart, depends on if bt is enabled
17:32
<
clever >
u-boot may then ignore all of that, and do its own thing
17:34
bob_x2 has joined ##raspberrypi-internals
17:35
<
Ad0 >
so I can just turn it off right
17:35
<
Ad0 >
since it's handled in the device tree
17:36
<
clever >
the mini-uart is where things get a bit more complex
17:36
<
clever >
but that cant do 485
17:47
<
Ad0 >
yeah but the uart0 is the one causing problems
17:49
<
clever >
i'm still wondering, what text is uart0 printing in rs232 mode, that is causing the corrupt 485 data
17:49
<
clever >
once we know the string its printing, we can know where to look
18:12
<
Ad0 >
yeah I can't even know
18:13
<
Ad0 >
because I can't get the RS485 overlay to work
18:13
<
Ad0 >
when overriding &uart0 it doesn't boot
18:14
<
Ad0 >
&uart1 makes it boot and it shows correctly RS485 term etc in debug gpio
18:15
<
Ad0 >
so maybe there's something with my firmware vs that firmware, or it's the kernel
18:17
<
Ad0 >
literally the last thing left
18:20
<
Ad0 >
I just set status="okay" to see if it boots in default
18:20
<
Ad0 >
nope doesn't boot LOL
18:20
<
Ad0 >
only boot if uart0 is disabled
18:26
<
Ad0 >
I do have to have CONFIG_OF_BOARD right?
18:27
<
clever >
Ad0: i forget what that one does, ive not used u-boot much lately
18:30
<
Ad0 >
If this variable is defined, U-Boot will use the device tree
18:30
<
Ad0 >
provided by the board at runtime instead of embedding one with
18:33
<
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
18:33
<
clever >
and then your uboot script determines which DT linux gets
18:34
<
clever >
and depending on what both are doing, uboot and/or linux, can ignore the enable_uart=1 and dtoverlay flags
18:38
finsternis has quit [Ping timeout: 264 seconds]
18:38
finsternis has joined ##raspberrypi-internals
18:41
<
f_ridge >
<fâ_[mtrx]1/M> annoying
18:41
<
f_ridge >
<fâ_[mtrx]1/M> I'll fix the bridge real quick.
18:44
<
f_ >
Sorry for the inconvienience.
18:46
<
f_ >
`should` work now, sorry!
18:50
<
f_ >
I shall consider puppetting someday.
18:56
f_ is now known as funderscore
18:58
funderscore is now known as f_
19:07
<
Ad0 >
it booted when I explicitly set enable_uart=0
19:37
<
Ad0 >
clever, it was u-boot
19:38
<
Ad0 >
it has to have been something with the RS485 chips messing things up in the boot process
20:31
<
Ad0 >
thanks for all your help clever
20:33
<
clever >
Ad0: your welcome
22:13
Riku_V has joined ##raspberrypi-internals