ChanServ changed the topic of #linux-sunxi to: Allwinner/sunxi development - Did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait for an answer! - This channel is logged at https://oftc.irclog.whitequark.org/linux-sunxi
moteen has joined #linux-sunxi
rajkosto has joined #linux-sunxi
moteen has quit [Ping timeout: 480 seconds]
apritzel_ has quit [Ping timeout: 480 seconds]
Daanct12 has joined #linux-sunxi
Daanct12 has quit [Remote host closed the connection]
Daanct12 has joined #linux-sunxi
Daanct12 has quit [Remote host closed the connection]
Daanct12 has joined #linux-sunxi
Danct12 has quit [Read error: Connection reset by peer]
Danct12 has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
Daanct12 has quit [Remote host closed the connection]
Daanct12 has joined #linux-sunxi
aggi has quit [Remote host closed the connection]
aggi has joined #linux-sunxi
aggi has quit [Remote host closed the connection]
aggi has joined #linux-sunxi
Daanct12 has quit [Remote host closed the connection]
gsz has joined #linux-sunxi
gnarface has quit [Ping timeout: 480 seconds]
gnarface has joined #linux-sunxi
Rajko has joined #linux-sunxi
Rajko has quit []
apritzel_ has joined #linux-sunxi
rajkosto has quit [Ping timeout: 480 seconds]
apritzel_ has quit [Ping timeout: 480 seconds]
gsz has quit [Quit: leaving]
moteen has joined #linux-sunxi
moteen_ has joined #linux-sunxi
moteen has quit [Ping timeout: 480 seconds]
apritzel_ has joined #linux-sunxi
pnill has joined #linux-sunxi
apritzel_ has quit [Ping timeout: 480 seconds]
aggi_ has joined #linux-sunxi
aggi has quit [Remote host closed the connection]
moteen_ has quit [Remote host closed the connection]
gsz has joined #linux-sunxi
apritzel_ has joined #linux-sunxi
JohnDoe7 has joined #linux-sunxi
moteen has joined #linux-sunxi
moteen has quit [Ping timeout: 480 seconds]
sunshavi has joined #linux-sunxi
Danct12 has quit [Remote host closed the connection]
Danct12 has joined #linux-sunxi
evgeny_boger has joined #linux-sunxi
cnxsoft has quit []
moteen has joined #linux-sunxi
apritzel_ has left #linux-sunxi [#linux-sunxi]
apritzel has joined #linux-sunxi
<apritzel> smaeul: do you have anything clean for the D1/R258/NCAT2 pinctrl in U-Boot already?
<apritzel> smaeul: if not, I would fix this (for R528/T113 support), and move it out of arch/arm/nonsense by the way
<smaeul> moving GPIO out of arch/arm is on my list, but it's like 10 levels of yaks deep
<smaeul> I was going to try to remove the non-DM GPIO function calls from drivers, but it turns out that requires 1) adding AXP152 bindings, 2) adding a bunch of panel bindings, and 3) adding PMICs and display pipelines to a bunch of devicetrees
<apritzel> smaeul: yeah, I saw your hacks, hence the question ;-) I was thinking you have bigger fish to fry, so let me have a look
<smaeul> oh and of course the DM driver for AXP GPIO depends on DM_PMIC, which depends on DM clocks, which don't work on A31/A23/A33 because of the PRCM MFD mess
<smaeul> I was in the middle of responding to your comments on my series removing the A31/A23/A33 platform SMP code... so if you're wondering what the _real_ reason is, it's for D1 pinctrl support in U-Boot
<apritzel> my plan was: move pinmux.c to drivers/pinctrl/sunxi, move asm/arch/gpio.h to something generic, handle the differing offsets via CONFIG_SUNXI_NEW_PINCTRL in pinmux.c
<smaeul> sounds reasonable. half of asm/arch/gpio.h (like the part that depends on asm/arch/cpu.h) can just stay there
<smaeul> same thing for pinmux.c -- anything that depends on asm/arch won't be usable on RISC-V. though you should be able to hide the non-bank functions behind ARM && SPL
<apritzel> asm/arch/gpio.h sounds like a U-Boot anachronism to begin with, and not sure why we include asm/arch/cpu.h in the first place
* apritzel reaches for the machete
bauen1 has quit [Ping timeout: 480 seconds]
<jernej> apritzel, smaeul: if it helps anything, I have a patch for partially converting DE2 and sun8i HDMI driver to DM resets and clocks
<jernej> partial because there is no infrastructure to calculate factors for whole clock chain
<jernej> in DM clock driver (right?)
<smaeul> yes, that certainly helps! right, there is no rate support in the DM clock driver yet
<jernej> smaeul: take a look at this branch then: https://github.com/jernejsk/u-boot/commits/de2-fixes
<jernej> some patches are already included upstream, but not last few
<jernej> mostly because there is missing infrastructure to support two screens in U-Boot
<apritzel> jernej: awesome!
<jernej> apritzel: I think you should remember these patches, since you did some research why A64 breaks :)
<apritzel> jernej: yeah, I remember we stopped merging the series at this point back then
<jernej> but some following patches should still improve situation, at least from DM perspective
<apritzel> I gracefully forgot the details, but I think it was some U-Boot "speciality", which maybe was fixed meanwhile?
<jernej> as I said, issue is that U-Boot proper doesn't support more than one screen
<jernej> anyway, only one patch causes issue (the one mentioned few lines above). Most, if not all, patches following it, is just refactoring to DM clocks/resets and using DT provided information
<jernej> it would also stop probing HDMI driver on boards where is no HDMI connector
JohnDoe7 has quit []
<apritzel> smaeul: I see now that the GPIO stuff is all very painful in the details, but I will try anyway ...
aggi_ has quit []
aggi has joined #linux-sunxi
rajkosto has joined #linux-sunxi
moteen has quit [Remote host closed the connection]
vagrantc has joined #linux-sunxi
evgeny_boger has quit [Quit: evgeny_boger]
gsz has quit [Quit: leaving]
evgeny_boger has joined #linux-sunxi
swiftgeek has quit [Ping timeout: 480 seconds]
swiftgeek has joined #linux-sunxi
hallyn has joined #linux-sunxi
rajkosto has quit [Read error: Connection reset by peer]
<apritzel> smaeul: have you explored what it would take to move (most of?) arch/arm/mach-sunxi/Kconfig into board/sunxi/Kconfig? Are there any pitfalls?
<smaeul> apritzel: sort of. I tried moving all of the DRAM options to drivers/ram, but that got stuck on DM dependencies
<smaeul> I think all of the video options belong in drivers/video (well, the ones that don't belong in the devicetree)
<smaeul> the remainder I put in board/sunxi/Kconfig for D1
<smaeul> apritzel: the main pitfall is that you can only include board/sunxi/Kconfig from one place
<smaeul> so I don't think you would want to move the MACH_* options
bauen1 has joined #linux-sunxi
<apritzel> did you try drivers/ddr? IIRC, I read on #u-boot the other day that this is meant for legacy (non-DM) DRAM drivers?
<smaeul> I didn't realize that existed
swiftgeek_ has joined #linux-sunxi
<apritzel> and yeah, for video I think we will move completely to DM and DT some day, so it might be worth waiting for that
<smaeul> to expand a bit on the pitfall: U-Boot includes _all_ architecture Kconfigs, unlike Linux which just includes arch/$ARCH/Kconfig, so you can't include board/sunxi/Kconfig from both arch/arm and arch/riscv. You have to include it from some top-level location and guard it with the ARM/RISC-V symbols
<smaeul> s/symbols$/platform symbols/
<apritzel> did you find any precedence of a platform with multiple architectures? I guess U-Boot avoided most of them by merging arm64 and arm ...
swiftgeek has quit [Ping timeout: 480 seconds]
<smaeul> yeah, there are the powerpc->arm transitions
<apritzel> is asm/arm/cpu.h bothering you? I got somewhere with removing that from sunxi_common.h, and thinking about splitting this up, to smaller headers, just containing the few addresses that the (ARM) SPL needs hardcoded
<apritzel> asm/arch/cpu.h, I meant
<apritzel> smaeul: if you haven't guessed yet, my immediate motivation is R528/T113 support, and hoping to pave the way for the D1 on the way
<apritzel> as supporting both R528 and D1 would force us for instance to embrace the identical memory map/pinctrl/CCU of both, across arch/xxx directories
swiftgeek_ has quit [Quit: swiftgeek_]
swiftgeek has joined #linux-sunxi
<apritzel> smaeul: did you find a nice location for sharing sunxi-specific header files, across arch/xxx ?
<apritzel> I see include/clk/sunxi.h, I guess this to share structs between clk and reset?
<apritzel> shall we have a include/sunxi/ directory, and put shared headers in there?
<apritzel> Or are shared headers (outside of driver subsystems) a sign of bad design, and we should avoid them in the first place?
<smaeul> apritzel: I don't know of a good place. what kind of header are you sharing?
<smaeul> > embrace the identical memory map/pinctrl/CCU of both
<apritzel> well, I guess what we need from arch/arm/include/asm/arch-sunxi? Or are trying to avoid them in the first with DM_SPL?
<smaeul> that just means reusing compatible strings, right?
<smaeul> yes, I'm trying to avoid asm/arch entirely
<apritzel> smaeul: well, I guess I am thinking too much about hardcoded SPL information
<apritzel> how are you setting up the PLLs and bus clocks? the DT doesn't help here, I guess? Or do you fish just the CCU base address from it?
<smaeul> right now I don't. but if I did, it would go in the clock driver probe function
<apritzel> not setting up those clocks in U-Boot at all, you mean? Is that done in OpenSBI or do you just rely on the defaults?
<smaeul> yes, I mean not setting them up at all. The settings from the BROM last all the way to Linux. But I do plan to add at least CPU clock set up, as the BROM default is ~400 MHz
<smaeul> so "but when I do" would be a more accurate tone
<smaeul> The defaults happen to work for RISC-V because the NBROM and SBROM are merged. so the BROM raises the bus and CPU clocks for crypto speed. The defaults from ARM NBROMs are probably worse
milek7 has joined #linux-sunxi
evgeny_boger has quit [Ping timeout: 480 seconds]
moteen has joined #linux-sunxi
moteen has quit [Ping timeout: 480 seconds]