Go to advanced search

by cleverca22
Mon Jun 15, 2020 1:38 pm
Forum: Graphics programming
Topic: DPI config from userland
Replies: 10
Views: 532

Re: DPI config from userland

0 is a valid offset for SCALER_DISPLISTn, it just means the start of the dlist memory. The firmware is pretty noddy in dlist memory handling and just splits it into 3, each of which is then double buffered. There are 3 HVS channels on all Pis. Follow the pixel valve (controls the timing) config in ...
by cleverca22
Mon Jun 15, 2020 11:32 am
Forum: Graphics programming
Topic: DPI config from userland
Replies: 10
Views: 532

Re: DPI config from userland

the secondary goal is to bringup the display without the firmware, so it still helps to understand what the kernel is doing fully, and i believe i have it all figured out for the VC4 line of pi's vc4_dpi.c doesn't use the firmware at all, except possibly via the mailbox to setup the clocks. would v...
by cleverca22
Mon Jun 15, 2020 8:39 am
Forum: Graphics programming
Topic: DPI config from userland
Replies: 10
Views: 532

Re: DPI config from userland

I'd suggest you stick with the mainline drivers unless you are really going bare metal, otherwise the two will fight. yeah, it does look like it would be difficult to tell the kernel to not touch a certain subset of the display list registers, better to let the kernel manage it You can also add add...
by cleverca22
Mon Jun 15, 2020 1:34 am
Forum: Graphics programming
Topic: DPI config from userland
Replies: 10
Views: 532

Re: DPI config from userland

ive confirmed that the DPI clock comes from `CM_DPI(CTL|DIV)` and is fed by either the main crystal or PLLD_PER

so that just leaves how to manage the HVS, and if i should reuse the existing linux drivers, or bypass them at some level
by cleverca22
Sat Jun 13, 2020 10:56 am
Forum: Graphics programming
Topic: DPI config from userland
Replies: 10
Views: 532

DPI config from userland

the driver in question: https://github.com/raspberrypi/linux/blob/rpi-4.19.y/drivers/gpu/drm/vc4/vc4_dpi.c does the linux DRM layer allow you to configure and bring-up DPI at runtime, without any changes to device-tree? can you change parameters like the active width and porches without a reboot? ca...
by cleverca22
Fri Jun 12, 2020 5:40 pm
Forum: Advanced users
Topic: BCM54213PE Ethernet CableChecker™ diagnostics
Replies: 5
Views: 286

Re: BCM54213PE Ethernet CableChecker™ diagnostics

FYI, the PHY appears to be a BCM54213PE... Thanks, I successfully disabled the ethernet LEDs in the drivers/net/phy/broadcom.c with BCM_LED_SRC_OFF : static void bcm54213pe_config_init(struct phy_device *phydev) { ... val = BCM5482_SHD_LEDS1_LED1(BCM_LED_SRC_OFF) | BCM5482_SHD_LEDS1_LED3(BCM_LED_SR...
by cleverca22
Fri Jun 12, 2020 5:16 pm
Forum: Advanced users
Topic: BCM54213PE Ethernet CableChecker™ diagnostics
Replies: 5
Views: 286

Re: BCM54213PE Ethernet CableChecker™ diagnostics

i'm guessing you would access that by poking at some PHY registers over the MDIO bus? https://github.com/raspberrypi/linux/blob/8e61c35166281b15cd5b273e227f8fff89417f15/drivers/net/ethernet/broadcom/genet/bcmmii.c#L420-L443 this code deals with interfacing to the MDIO bus, and you could then either ...
by cleverca22
Fri Jun 12, 2020 5:06 pm
Forum: C/C++
Topic: Edge detection using /dev/gpiomem
Replies: 22
Views: 1056

Re: Edge detection using /dev/gpiomem

I have a pulse that I want to measure, it's important to get a the pulse width as that determines the function the microcontroller sending it wants. one option is to implement a character device, where the `read()` function will block until a pulse (or maybe many pulses) happens then it would repor...
by cleverca22
Fri Jun 12, 2020 4:45 am
Forum: Troubleshooting
Topic: USB Failure - VL805 FW version: 00000000 - Can't flash EEPROM
Replies: 14
Views: 614

Re: USB Failure - VL805 FW version: 00000000 - Can't flash EEPROM

try using `uart_2ndstage=1` in `config.txt` when you boot `recovery.bin`

then hook a uart adapter up, and see what output it generates
by cleverca22
Thu Jun 11, 2020 3:42 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPU theory
Replies: 4
Views: 308

Re: GPU theory

https://www.raspberrypi.org/forums/viewtopic.php?f=67&t=257280 and https://blog.benjdoherty.com/2019/05/21/Exploring-Hardware-Compositing-With-the-Raspberry-Pi/ these also go into detail of how the HVS works for the rpi 0-3 line, you control the HVS via the dispmanx api to the firmware for the rpi4,...
by cleverca22
Wed Jun 10, 2020 5:05 pm
Forum: C/C++
Topic: Edge detection using /dev/gpiomem
Replies: 22
Views: 1056

Re: Edge detection using /dev/gpiomem

and anything you do in userland is going to have massive inaccuracies with timing, which may make the job impossible

kernel space can at least record a timestamp in the irq handler, and give better accuracy
by cleverca22
Wed Jun 10, 2020 3:23 pm
Forum: Troubleshooting
Topic: (Solved) Troubleshooting conclusion confirmation RPi4
Replies: 8
Views: 239

Re: Troubleshooting conclusion confirmation RPi4

do you have a volt meter and/or uart adapter? have you tried the eeprom recovery image? Yes I have tried the eeprom recovery image. I used the Raspberry Pi Imager to make a recovery SD card. Following the directions listed https://www.raspberrypi.org/downloads/ can you try setting `BOOT_UART=1` in ...
by cleverca22
Wed Jun 10, 2020 3:12 pm
Forum: General discussion
Topic: Pi 4 and USB3 Speed?
Replies: 3
Views: 131

Re: Pi 4 and USB3 Speed?

more info is over in viewtopic.php?f=63&t=276260
by cleverca22
Wed Jun 10, 2020 2:55 pm
Forum: Troubleshooting
Topic: (Solved) Troubleshooting conclusion confirmation RPi4
Replies: 8
Views: 239

Re: Troubleshooting conclusion confirmation RPi4

do you have a volt meter and/or uart adapter?

have you tried the eeprom recovery image?
by cleverca22
Wed Jun 10, 2020 2:43 pm
Forum: C/C++
Topic: Edge detection using /dev/gpiomem
Replies: 22
Views: 1056

Re: Edge detection using /dev/gpiomem

i think you would need a kernel module to both catch the IRQ and also deal with measuring the timing

have a look at https://lwn.net/Kernel/LDD3/, chapters 1, 2, 3, and 10 would cover the basics you would need
by cleverca22
Tue Jun 09, 2020 1:47 pm
Forum: General discussion
Topic: What can reduce USB 3.0 speed? How is it wired up internally?
Replies: 7
Views: 400

Re: What can reduce USB 3.0 speed? How is it wired up internally?

from what ive been able to gather, the VL805 is also capable of driving 4 usb ports, all at 3.0 speeds but the rpi4 only has 2 ports wired for 3.0 usage, and the other 2 ports wired for 2.0 speeds so you need to use the blue 3.0 ports for any 3.0 capable device, and be aware that all 4 ports are sha...
by cleverca22
Mon Jun 08, 2020 1:21 am
Forum: Beginners
Topic: Re-use lcd screen from car head unit
Replies: 4
Views: 230

Re: Re-use lcd screen from car head unit

if the display is DPI or DSI based, it could also maybe work would need to know more about the model# first, and then compare it to everything the pi can generate (DPI, DSI, HDMI, composite) a quick glance at RCD510 on google makes me think that its an entire computer in a box, and you would need to...
by cleverca22
Sun Jun 07, 2020 3:13 pm
Forum: Bare metal, Assembly language
Topic: PCIe on RPi 4
Replies: 9
Views: 1684

Re: PCIe on RPi 4

where is that documented?
is that maybe a side effect of it only having 1 pci-e lane, so they only expeded it to have a single pci-e device on the bus?
by cleverca22
Sat Jun 06, 2020 8:59 pm
Forum: Beginners
Topic: Usb-C Boot
Replies: 19
Views: 853

Re: Usb-C Boot

its not documented clearly, but when you tell config.txt to set usb-c to host mode, it doesnt use dwc2 in host mode instead, it silently switches to an xhci usb controller, and changes which one is enabled in the device-tree passed to linux dtoverlay=dwc2,dr_mode=host is how you switch the DWC2 con...
by cleverca22
Sat Jun 06, 2020 7:43 am
Forum: Beginners
Topic: Usb-C Boot
Replies: 19
Views: 853

Re: Usb-C Boot

ive not been talking about the 4 main usb ports there are 3 usb controllers on the rpi4 1: the old dwc2 controller 2: the vl805 xhci controller (on the 4 main ports) 3: a more hidden xhci controller inside the SoC 1/3 are sharing a single USB PHY, and wired to the USB-C port `dtoverlay=dwc2` configu...
by cleverca22
Sat Jun 06, 2020 6:36 am
Forum: Beginners
Topic: Usb-C Boot
Replies: 19
Views: 853

Re: Usb-C Boot

https://github.com/raspberrypi/documentation/issues/1217#issuecomment-536932640 The unimaginatively named otg_mode config.txt parameter does the necessary fiddling. Set to 1 to enable the xhci controller in place of dwc_otg, using the same USB2.0 OTG PHY. Changing the controller over needs to be don...
by cleverca22
Sat Jun 06, 2020 4:51 am
Forum: Beginners
Topic: Usb-C Boot
Replies: 19
Views: 853

Re: Usb-C Boot

from what ive been reading, the usb-c port is routed to an on-chip xhci controller when set to host mode The firmware default is to use the old USB 2.0 OTG controller in the SoC for both host and device mode. You'd also need a flag in bootconf.txt to force it into host mode since we don't have an O...
by cleverca22
Sat Jun 06, 2020 12:25 am
Forum: Beginners
Topic: Usb-C Boot
Replies: 19
Views: 853

Re: Usb-C Boot

from what ive been reading, the usb-c port is routed to an on-chip xhci controller when set to host mode baring silicon bugs, it sounds relatively simple to modify the eeprom code to boot from usb-c but its still limited to usb2.0 speeds, so it would have better performance to use the vl805 controll...
by cleverca22
Sat Jun 06, 2020 12:21 am
Forum: General discussion
Topic: Fail-safe firmware upgrades
Replies: 16
Views: 524

Re: Fail-safe firmware upgrades

i think the safest route, would be to use something like a journaled FS (such as ext4) for the real kernel and boot config and then have a bootloader on the fat32 (perhaps just u-boot) which will read its config from the 2nd fs then properly configured, the journaled FS should undo partial writes af...
by cleverca22
Thu Jun 04, 2020 6:08 pm
Forum: Networking and servers
Topic: PXE Boot client.
Replies: 2
Views: 273

Re: PXE Boot client.

the network boot in the RPI4 isnt entirely PXE compliant, but something custom it will just use dhcp+tftp to get an ip, and load `start4.elf`, possibly from a prefixed path (like ${serial}/start4.elf), and then load more boot files from there https://github.com/raspberrypi/documentation/blob/master/...

Go to advanced search