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
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
acmeplus has quit []
acmeplus has joined #linux-sunxi
Jookia has quit [Ping timeout: 480 seconds]
ftg has quit [Read error: Connection reset by peer]
ItsKaitlyn03 has joined #linux-sunxi
<ItsKaitlyn03> hi, I'm back
<ItsKaitlyn03> (on linux now)
<acmeplus> How did the experiment go?
<acmeplus> I need to resolder the uart on the TSP to test
<ItsKaitlyn03> havent tested anything yet
<acmeplus> ok
Jookia has joined #linux-sunxi
<acmeplus> @ItsKaitlyn03 does that board have a public firmware available?
<ItsKaitlyn03> I can toss the tina linux firmware and android firmware i received later
<ItsKaitlyn03> but just note that if your board doesnt have an axp707 pmic
<ItsKaitlyn03> you might fry something
<ItsKaitlyn03> okay can confirm
<ItsKaitlyn03> sunxi fel works
<acmeplus> Thanks! will check before
<acmeplus> That's great
<acmeplus> with spl or uboot?
<ItsKaitlyn03> "AWUSBFEX soc=00001855(A133) 00000001 ver=0001 44 08 scratchpad=00002200 00000000 00000000"
<ItsKaitlyn03> i did sunxi fel ver
<acmeplus> Mine has onboard nand and I need to trigger FEL manually via uboot, I believe pressing 2 while booting
<ItsKaitlyn03> can confirm the uart0 hello world also works
<ItsKaitlyn03> "Hello from Allwinner A133! Returning back to FEL."
<Jookia> ItsKaitlyn03: pog!
<ItsKaitlyn03> okay so
<ItsKaitlyn03> "U-Boot SPL 2023.07-g4332ec5b00 (May 12 2024 - 21:12:57 -0400) DRAM:"
<ItsKaitlyn03> it hangs straight after dram LOL
<ItsKaitlyn03> i should also mention that my board has lpddr4
<ItsKaitlyn03> and apritzel's a133 uboot only supports ddr3
<ItsKaitlyn03> so ill have to upgrade his a133 branch, ill likely fork u-boot now
<acmeplus> I wonder if you can try the H700 u-boot
gnarface has quit [Quit: Leaving]
<ItsKaitlyn03> i doubt h700 is similar enough
<ItsKaitlyn03> h616 and a133 have some similarities
<acmeplus> Yeah, but check @tokyovigilante u-boot, he added the DRAM patches for that one, that may be similar
montjoie_ has joined #linux-sunxi
<acmeplus> The PMIC is different and I'm sure there are other differences, but maybe the DRAM changes helps
montjoie has quit [Ping timeout: 480 seconds]
<ItsKaitlyn03> where is their u-boot?
<ItsKaitlyn03> okay their u-boot has some h616 changes to dram
<acmeplus> The h700 has DRAM and PMIC changes vs 616
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
jernej has joined #linux-sunxi
<ItsKaitlyn03> note that it accounts for both SIDs
<ItsKaitlyn03> in the phy_init
<ItsKaitlyn03> so i'll somehow need to bring in their h616 dram patches
<ItsKaitlyn03> also looking at the reversed libdram and the h616 dram, it looks shockingly similar
gnarface has joined #linux-sunxi
<Jookia> ItsKaitlyn03: interesting
<ItsKaitlyn03> okay so
<ItsKaitlyn03> h700 is just rebadged h616
<ItsKaitlyn03> so i have 2 ways to go about this: bring in tokyovigilante h616 dram init and modify it for a133
<ItsKaitlyn03> OR modify h616 dram init myself to have similar changes to what they're doing
<ItsKaitlyn03> i checked some of the offsets h616 dram init uses and it looks similar
<Jookia> maybe start with the h616 dram init?
<ItsKaitlyn03> yeah
gnarface has quit [Ping timeout: 480 seconds]
gnarface has joined #linux-sunxi
<ItsKaitlyn03> aand
<ItsKaitlyn03> after mainlining the a133 commit
<ItsKaitlyn03> "U-Boot SPL 2024.07-rc2-g91b69efd8c (May 12 2024 - 23:08:17 -0400)"
<ItsKaitlyn03> now to get DRAM init working...
<ItsKaitlyn03> why is debug logs not working lol
hexdump0815 has joined #linux-sunxi
<ItsKaitlyn03> ok so printf works but debug logging does not
<ItsKaitlyn03> -.-
<ItsKaitlyn03> maybe im not enabling something correctly?
hexdump01 has quit [Ping timeout: 480 seconds]
<ItsKaitlyn03> ok i just did "#define LOG_DEBUG" in the dram stuff, that works
<ItsKaitlyn03> appears its dying at testing rank width
<ItsKaitlyn03> okay it dies on mctl_sys_init
<ItsKaitlyn03> hah "Unknown hack, which enables access of mctl_ctl regs" causes the crash
<Jookia> oh no
<Jookia> time to replace it? :D
<ItsKaitlyn03> nah the hack doesn't exist in the decomp'd libdram
<ItsKaitlyn03> i guess its not needed on a133?
<ItsKaitlyn03> now it's failing in mctl_ctrl_init :D
<ItsKaitlyn03> I'm using an age old debugging method
<ItsKaitlyn03> just placing "debug("mctl_ctrl_init: 0\n");" on any parts im unsure of
<ItsKaitlyn03> and incrementing the number
<ItsKaitlyn03> oh its failing straight at the beginning of that method
<Jookia> oh no
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
<ItsKaitlyn03> I'm half tempted to use the libdram decomp that already exists
<ItsKaitlyn03> I think h616 and a133 has too many differences potentially
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
<Jookia> yeah?
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
junari has joined #linux-sunxi
junari has quit [Remote host closed the connection]
acmeplus has joined #linux-sunxi
apritzel has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
warpme has quit []
acmeplus has joined #linux-sunxi
Robot_ has joined #linux-sunxi
warpme has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
sauce has quit [Remote host closed the connection]
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
warpme has quit []
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
sauce has joined #linux-sunxi
tnovotny has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
warpme has joined #linux-sunxi
paulk has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
apritzel has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
<apritzel> ItsKaitlyn03: to see "debug()" output, you need to add "#define DEBUG" at the *very* beginning of the source file (before the #include's)
<apritzel> in general we indeed expect some differences between the A133 and H616 DRAM code. I'd suggest to either butcher the existing H616 driver in your branch, or to copy the file and hack away
<apritzel> when this eventually works, we can see how we nicely integrate both drivers
<apritzel> if you can correlate the disassembly and the U-Boot driver code, that's great, and that seems to be the most promising approach
<apritzel> btw: I have some AXP707 patches, will dig them out tonight
<apritzel> one tricky part could be that the AXP707 does not provide the correct 1.1V for the LPDDR4 DRAM on reset, so we would need PMIC code in the SPL to fix that
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
gamiee__ has quit []
gamiee_ has joined #linux-sunxi
acmeplus has joined #linux-sunxi
warpme has quit []
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
warpme has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
sauce has quit [Remote host closed the connection]
warpme has quit []
sauce has joined #linux-sunxi
dsimic is now known as Guest6316
dsimic has joined #linux-sunxi
Guest6316 has quit [Ping timeout: 480 seconds]
acmeplus has quit [Ping timeout: 480 seconds]
acmeplus has joined #linux-sunxi
acmeplus has quit [Ping timeout: 480 seconds]
<tokyovigilante> macromorgan: do you have a DT node for the panel backlight PWMs?
<tokyovigilante> working on the panel driver but can't tell if its not working or I just can't see it
warpme has joined #linux-sunxi
<tokyovigilante> hmm, potentially just not working
<tokyovigilante> [ 12.766448] sun8i-mixer 1100000.mixer: deferred probe timeout, ignoring dependency
<tokyovigilante> [ 12.774625] sun8i-mixer 1100000.mixer: iommu configuration for device failed with -ETIMEDOUT
<tokyovigilante> dts/upstream/src/arm64/allwinner/sun50i-h700-anbernic-rg35xx-plus.dtb: Warning (graph_endpoint): /panel/port/endpoint: graph connection to node '/soc/tcon-top@6510000/ports/port@1/endpoint@2' is not bidirectional
<tokyovigilante> also potentially an issues
acmeplus has joined #linux-sunxi
ItsKaitlyn03 has quit [Remote host closed the connection]
warpme has quit []
tnovotny has quit [Quit: Leaving]
warpme has joined #linux-sunxi
JohnDoe_71Rus has quit [Quit: KVIrc 5.2.0 Quasar http://www.kvirc.net/]
machinehum has joined #linux-sunxi
ungeskriptet is now known as Guest6325
ungeskriptet has joined #linux-sunxi
ungeskriptet is now known as Guest6327
ungeskriptet has joined #linux-sunxi
Guest6325 has quit [Ping timeout: 480 seconds]
ungeskriptet is now known as Guest6329
ungeskriptet has joined #linux-sunxi
ungeskriptet is now known as Guest6330
ungeskriptet has joined #linux-sunxi
Guest6327 has quit [Ping timeout: 480 seconds]
Guest6329 has quit [Ping timeout: 480 seconds]
Guest6330 has quit [Ping timeout: 480 seconds]
paulk has quit [Ping timeout: 480 seconds]
paulk has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
Schimsalabim has quit [Ping timeout: 480 seconds]
<macromorgan> not yet, but I can make one, hang on
<jernej> ItsKaitlyn03: apritzel: mbus configuration is surely SoC specific
<apritzel> yes, but this can be dumped and deduced quite easily, I guess?
<jernej> correct
Schimsalabim has joined #linux-sunxi
warpme has quit []
Schimsalabim has quit [Ping timeout: 480 seconds]
Schimsalabim has joined #linux-sunxi
electricworry has joined #linux-sunxi
ItsKaitlyn03 has joined #linux-sunxi
<ItsKaitlyn03> I think I'm going to experiment some more with the libdram decomp
<jernej> A133 DRAM init really seems similar to H616 at first glance, but I would argue that at least addresses are different.
<ItsKaitlyn03> I think there is some differences such as some H616 hacks not working/existing on A133
<jernej> yeah, but also datasheets list DRAM peripheral regions pretty differently
<jernej> so there is no other way than walk trough disassembly and check everything
<ItsKaitlyn03> i guess I'll just copy the H616 DRAM code that already exists and work off it
paulk has quit [Quit: WeeChat 3.0]
<macromorgan> dmesg
<macromorgan> err... tabbed to the wrong window :-(
<macromorgan> hehe
warpme has joined #linux-sunxi
<ItsKaitlyn03> btw how fine would it be to just support LPDDR4 for the initial a133 dram initialization code?
<ItsKaitlyn03> since my only a133 devices use LPDDR4
<apritzel> ItsKaitlyn03: yes, go ahead with that, we can fill the gaps later
<apritzel> and yes, copy the code into a new file, and hack away on that. We can then diff that later and decide whether to keep it in a separate file or whether to merge it
<ItsKaitlyn03> also went ahead and made a new defconfig for my liontron board
paulk has joined #linux-sunxi
warpme has quit []
ftg has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
<Raqbit> tokyovigilante: I noticed that the AZXP717 u-boot patches don't add default for the AXP_DCDC3_VOLT config option. Is this intentional? From the description it appears that it should be 1.1V
<ItsKaitlyn03> is it important to set the PLL lock time for pll5
<ItsKaitlyn03> since libdram for a133 does it
<ItsKaitlyn03> or rather
<ItsKaitlyn03> PLL_SDM_ENABLE
<ItsKaitlyn03> oh it is required i think
<ItsKaitlyn03> :aware:
<ItsKaitlyn03> PLL_DDR_PAT0_CTRL_REG
ItsKaitlyn03 has quit [Remote host closed the connection]
JohnDoe_71Rus has quit [Quit: KVIrc 5.2.2 Quasar http://www.kvirc.net/]
apritzel has joined #linux-sunxi
<apritzel> Raqbit: a default value in defconfig makes sense if there is one value that's used (almost) everywhere
<apritzel> for DRAM we don't really know this, for LPDDR4 it's 1.1V, but for LPDDR3 it's 1.2V
<apritzel> the solution is simply to define that voltage in the _defconfig file
<Raqbit> apritzel: Got it, that makes sense.
<tokyovigilante> Raqbit: I noticed that too, will add it to my defconfig
acmeplus has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
kilobyte_ has quit [Read error: Connection reset by peer]
Robot_ has quit [Ping timeout: 480 seconds]
gnarface has quit [Ping timeout: 480 seconds]
gnarface has joined #linux-sunxi
electricworry has quit [Ping timeout: 480 seconds]
colinsane has quit []
colinsane has joined #linux-sunxi
<tokyovigilante> Just looking at the clock calibration for the H6/616 again, and based on the manual the registers are already defined, for the internal 32K oscillator (IOSC) which is what the low frequency oscillator (LOSC) is actually derived from, and enabling calibration is actually on the IOSC
<tokyovigilante> The H6 *can* have an external 32KHz crystal and optionally enable autocal if this is not present but the H616 doesn't support an external crystal and should *always* have autocal on.... I think
<tokyovigilante> ie support is already in the new RTC code (ccu-sun6i-rtc.c)
<tokyovigilante> and it just needs enabling by toggling the currently defined IOSC_CLK_CALI_SRC_SEL
<tokyovigilante> val = readl(cm->base + IOSC_CLK_CALI_REG);
<tokyovigilante> writel(val | IOSC_CLK_CALI_EN | IOSC_CLK_CALI_SRC_SEL,
<tokyovigilante> cm->base + IOSC_CLK_CALI_REG);
<tokyovigilante> Just can't tell if this is already enabling it
ftg has quit [Read error: Connection reset by peer]
<tokyovigilante> In fact I wonder if autocal has always worked in the mainline driver and that whole issue was because of the use of an old armbian tree
KREYREN_oftc has joined #linux-sunxi
<apritzel> tokyovigilante: it seems the H616/H313 *package* does not connect the external 32K oscillator pins
<apritzel> but the die supports it, and the T507 datasheet and manual mention an (optional) external 32K oscillator, similar to the H6
<apritzel> (there are X32KIN and X32KOUT pins, next to the fanout pin)
kilobyte_ has joined #linux-sunxi
KREYREN_oftc has quit [Remote host closed the connection]
KREYREN_oftc has joined #linux-sunxi
kikuchan has joined #linux-sunxi