<DC-IRC>
<mariob> the first time i heard about 5V 5A is from this radxa psu
<DC-IRC>
<clever___> something else i want from the pi5, is a sort of PD reporter
<DC-IRC>
<clever___> exactly what modes does the attached device list as valid?
<DC-IRC>
<mariob> the first time i heard about 5V 5A PD is from this radxa psu
<DC-IRC>
<mariob> if that runs on the VPU, unlikely that they'll ever provide that
<DC-IRC>
<mariob> if it runs on the VPU, unlikely that they'll ever provide that
<DC-IRC>
<clever___> they already have 2 ways to access the PMIC
<DC-IRC>
<clever___> `vcgencmd pmicrd 0x12` can read any PMIC register
<DC-IRC>
<mariob> one could actually request more from the PSU and fry the board
<DC-IRC>
<clever___> `vcgencmd pmicwr 0x12 0x34` can write any PMIC register
<DC-IRC>
<mariob> one could actually request higher voltage from the PSU and fry the board
<DC-IRC>
<clever___> but, there are no da9091 datasheets, and i would assume the PD peripheral will get confused if 2 hosts try to boss it around at once
<DC-IRC>
<clever___> `drivers/rtc/rtc-rpi.c` talks to the firmware over the standard property mailbox
<DC-IRC>
<clever___> the RTC itself, is a feature of the da9091, so the firmware then relays those commands to the PMIC
<DC-IRC>
<clever___> so all they need, is a way to PD packet out the port, and a big scary warning
<DC-IRC>
<Tonymac32> PD requires the cable also identify as 5A capable
<DC-IRC>
<Tonymac32> basically PD is an awesome, amazing, super useful, pain in the ass
<DC-IRC>
<infinity_q> lol
<DC-IRC>
<Tonymac32> these are not mobile devices, use a barrel
<DC-IRC>
<clever___> yeah, thats why i mentioned, a psu with a removable cable is more expensive overall
<DC-IRC>
<clever___> because it needs a smart cable
<DC-IRC>
<clever___> while the rpi psu, has a permanently attached cable, so they can cheat and have 1 chip doing both psu and cable roles
<DC-IRC>
<Tonymac32> yeah that's fine, it's their liability
<DC-IRC>
<clever___> thats also why i want better pd logging and diagnostics
<DC-IRC>
<Tonymac32> *I* am not running 5A through a usb cable to a marginally engineered SBC
<DC-IRC>
<Tonymac32> 😄
<DC-IRC>
<clever___> so i can both debug pi5 problems, and document what a cable or psu can do, and figure out its compatability matrix with non-rpi devices
<DC-IRC>
<clever___> and the pi5 can throttle itself and run at 3a
<DC-IRC>
<clever___> most of that i think is "spare" power for the usb-a ports and hdd's
<DC-IRC>
<mariob> that's probably it. the cable i got with my radxa psu is not e-marked
<DC-IRC>
<Tonymac32> the fact it is 5V is a complete and utter travesty
<DC-IRC>
<mariob> yet they promote it as PD too 🤦♂️
<DC-IRC>
<infinity_q> I mean, seriously? rk3588 has more io *and* more cpu. and it only usually requires 4A
<DC-IRC>
<Tonymac32> well, the nanopi M4, M4V2, etc are the same
<DC-IRC>
<Tonymac32> and it is... less than optimal
<DC-IRC>
<mariob> it doesn't need that much current, but you know, peripherals
<DC-IRC>
<Tonymac32> I don't currently run any RK3588 at 5V so I don't know what the pull is there
<DC-IRC>
<Tonymac32> but Mario is correct, if you want USB to work you need some oomph
<DC-IRC>
<Tonymac32> Asus handled this by putting power electronics that could jump a car on the front end of the Tinker board 2
<DC-IRC>
<Tonymac32> up to 19V in
<DC-IRC>
<Tonymac32> barrel jack
<DC-IRC>
<Tonymac32> every USB port conforms to standards for current output
<DC-IRC>
<Tonymac32> also a bit expensive, and only I have mainline images 😉
<DC-IRC>
<clever___> rpi engineers have stated, that they only accept 5v, because of board space issues, and extra waste heat from a variable->5v buck converter
<DC-IRC>
<Tonymac32> pfffffffft
<DC-IRC>
<mariob> rock 5a in the meanwhile
<DC-IRC>
<Tonymac32> the heat is nothing, that's pure lies
<DC-IRC>
<clever___> but i did give an example, of how to abuse the ideal diode....
<DC-IRC>
<mariob> with PD and m.2 slot
<DC-IRC>
<infinity_q> but that oomph is not really best suited to be coming from the SBC, unless the board is like industrial rated
<DC-IRC>
<mariob> how did radxa pull it off on 5a?
<DC-IRC>
<Tonymac32> 🙂
<DC-IRC>
<clever___> there is a lot of traces in the power corner, on the back side.....
<DC-IRC>
<Tonymac32> like all their boards this is just poor layout
<DC-IRC>
<infinity_q> because they are not rpi
<DC-IRC>
<Tonymac32> remember it took unitl the 3 or 3+ or something to figure out that ground planes can be used to move heat
<DC-IRC>
<Tonymac32> and the bragged about it
<DC-IRC>
<Tonymac32> when really they should have been ashamed 😄
<DC-IRC>
<Tonymac32> it's fine if they aren't up to industry standards, until they sell themselves as such. I wouldn't give them any grief if they werent so absorbed in their own image
<DC-IRC>
<Tonymac32> This board looks ok, I'm not sold I want their "southbridge" IP on it though
<DC-IRC>
<Tonymac32> seems syupid to reinvent the wheel
<DC-IRC>
<Tonymac32> seems stupid to reinvent the wheel
<DC-IRC>
<clever___> the way i see it, all of the peripherals that make an rpi an rpi, are now isolated from the SoC
<DC-IRC>
<clever___> so they could switch to another SoC vendor, without it ceasing to be rpi like
<DC-IRC>
<mariob> they moved a ton of stuff there though..
<DC-IRC>
<mariob> this seems the most plausible reason tbh
<DC-IRC>
<Tonymac32> well, they are stuck to the VC like nothing else
<DC-IRC>
<clever___> any SoC with a pcie controller could be slotted in, and it would basically still be an rpi
<DC-IRC>
<Tonymac32> moving to a different GPU would wreck their entire ecosystem I think
<DC-IRC>
<clever___> for the pi5, yeah
<DC-IRC>
<clever___> but now that the RP1 is done, does it need to stay with broadcom?
<DC-IRC>
<Tonymac32> the VC is still the system supervisor isn't it?
<DC-IRC>
<clever___> only the vc4 v3d has been properly documented
<DC-IRC>
<clever___> everything else is undocumented and driven thru linux drivers
<DC-IRC>
<clever___> yes, even on the pi5
<DC-IRC>
<Tonymac32> yeah, they'd have to have all new everything to retool fromt hat
<DC-IRC>
<Tonymac32> yeah, they'd have to have all new everything to retool from that
<DC-IRC>
<clever___> they already did on the pi5
<DC-IRC>
<clever___> the VPU firmware is doing almost nothing, compared to the pi4
<DC-IRC>
<clever___> it only manages basic bootup logic, and thermal/voltage throttling
<DC-IRC>
<Tonymac32> did they fully abstract that behind some EFI firmware or something?
<DC-IRC>
<clever___> you could easily do that with just u-boot
<DC-IRC>
<clever___> PSCI for secondary core bringup, shutdown, reboot, and suspend2ram
<DC-IRC>
<Tonymac32> interesting, they might be moving in the right direction, by 2027 we might see something interesting. 😉
<DC-IRC>
<mariob> SD cards should die already for OS usage
<DC-IRC>
<Tonymac32> eh they obviously use low layer count PCB's
<DC-IRC>
<Tonymac32> so no way to route it out
<DC-IRC>
<clever___> ive tried implementing PWM audio on the pi3, and i just did the dumb thing, take each audio sample, and feed it directly to the pwm controller, and it sounds like crap 😛
<DC-IRC>
<clever___> the closed firmware PWM audio sounds much better, to my untrained ears
<DC-IRC>
<mariob> does it?
<DC-IRC>
<mariob> i couldn't tell any difference
<DC-IRC>
<clever___> compared to my own implementation, it does
<DC-IRC>
<clever___> line 127 sets this code to 8bit mode
<DC-IRC>
<clever___> line 154 sets it to play each sample once
<DC-IRC>
<clever___> in 8 bit mode, the range must be 2^8 or 256
<DC-IRC>
<clever___> and at 48khz sample rate, the pwm needs a clock of `48*256`khz
<DC-IRC>
<clever___> line 181 sets the PWM to be driven from PLLC (but PLLH also works), and computes the correct divisor, based on the current PLL frequency
<DC-IRC>
<mariob> have you tried higher depth?
<DC-IRC>
<clever___> higher bit depth needs higher clocks
<DC-IRC>
<mariob> it can take quite a bit of overclock
<DC-IRC>
<clever___> 16bit PWM would need a 3.14ghz pwm clock
<DC-IRC>
<Tonymac32> 😄
<DC-IRC>
<mariob> it works at 13 bit 44.1 khz nice
<DC-IRC>
<clever___> and the pwm has a /2 as a minimum
<DC-IRC>
<clever___> so i would need a 6ghz PLL
<DC-IRC>
<clever___> which is out of spec on many places
<DC-IRC>
<clever___> ```
<DC-IRC>
<clever___> > 100000000 / Math.pow(2,7)
<DC-IRC>
<clever___> 781,250
<DC-IRC>
<clever___> ```
<DC-IRC>
<clever___> the official firmware, does non-integer upscaling, to ~781khz and 7bit
<DC-IRC>
<clever___> and uses dithering to wiggle bit0 of that, to simulate a higher bit depth
<DC-IRC>
<clever___> plus all kinds of fancy math i cant wrap my head around and dont want to replicate
<DC-IRC>
<clever___> that then lets it use a simple 100mhz pwm clock
<DC-IRC>
<clever___> printf("AVOID_MASH set, divider forced to %d, ", (int)desired_divider);
<DC-IRC>
<clever___> }
<DC-IRC>
<clever___> ```
<DC-IRC>
<clever___> and this is for DPI video, which can do vga or a lot of parallel digital LCD's
<DC-IRC>
<clever___> in this case, its able to avoid fractional division, at the cost of changing the fps
<DC-IRC>
<clever___> and i have seen, LCD's get weird artifacting if you use fractional and no pixel clock
<DC-IRC>
<clever___> the lcd is sampling in the middle of every pixel time
<DC-IRC>
<clever___> the pixels vary in size, due to fractional division
<DC-IRC>
<clever___> that causes horizontal noise, as the pixels jiggle left/right
<DC-IRC>
<clever___> it can be solved, by just sampling on the pixel clock edge, but not all displays support that
<DC-IRC>
<clever___> with the current state of the open firmware, i can boot linux on both the pi2 and pi3, and ive even got usb booting working on the pi3
<DC-IRC>
<clever___> but i have 2 major roadblocks in the path of using it as a desktop machine
<DC-IRC>
<clever___> * the arm cant access the HVS registers, so no 2d accel for linux, enless i re-write the drivers
<DC-IRC>
<clever___> * the hdmi block isnt online, and all hdmi registers ignore writes, and return garbage data on read
<DC-IRC>
<clever___> so you can only use it on dpi(or vga) or composite, or just headless
<DC-IRC>
<clever___> this video is also running at double speed
<DC-IRC>
<clever___> its a 30fps video, but i configured it to play 1 frame per vsync
<DC-IRC>
<clever___> with with 480i, its getting 60 syncs/sec!
<DC-IRC>
<clever___> had to adjust the code after realizing that, to halve the playback speed
<DC-IRC>
<clever___> @mariob another thing ive done, that varies massively from the closed firmware
<DC-IRC>
<clever___> `/boot` isnt fat32 anymore, its just a directory on `/` and must be ext4
<DC-IRC>
<clever___> the boot firmware supports ext4, and just reads the kernel from there!
<DC-IRC>
<clever___> id say it offers far more stability in terms of an improper shutdown, but i have yet to implement handling the journal, so it may crash from a partial write confusing things