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
montjoie_ has joined #linux-sunxi
montjoie has quit [Ping timeout: 480 seconds]
Jookia has quit [Ping timeout: 480 seconds]
Daanct12 has joined #linux-sunxi
Jookia has joined #linux-sunxi
hexdump01 has joined #linux-sunxi
hexdump0815 has quit [Ping timeout: 480 seconds]
tlwoerner has quit [Quit: Leaving]
tlwoerner has joined #linux-sunxi
sonolin has quit [Ping timeout: 480 seconds]
macromorgan_ has quit [Read error: Connection reset by peer]
macromorgan has joined #linux-sunxi
Jookia has quit [Ping timeout: 480 seconds]
Jookia has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
Jookia has quit [Remote host closed the connection]
Jookia has joined #linux-sunxi
Jookia has quit [Remote host closed the connection]
Daanct12 has quit [Quit: WeeChat 4.0.5]
Daanct12 has joined #linux-sunxi
hexdump01 has quit [Ping timeout: 480 seconds]
warpme has joined #linux-sunxi
Jookia has joined #linux-sunxi
<Jookia> does sunxi support suspend?
warpme has quit []
<gamiee> depends on chip
<gamiee> and if you use SCP
warpme has joined #linux-sunxi
<Jookia> SCP?
<gamiee> System Control Processor
<gamiee> For Allwinners, it is https://github.com/crust-firmware/crust
evgeny_boger has quit [Quit: evgeny_boger]
tnovotny has joined #linux-sunxi
apritzel has joined #linux-sunxi
<Jookia> ah
DarkNeutrino has joined #linux-sunxi
bauen1 has quit [Ping timeout: 480 seconds]
evgeny_boger has joined #linux-sunxi
evgeny_boger has quit [Quit: evgeny_boger]
<apritzel> Hi, does anyone have some information about register offset 0 in the "SRAM controller" IP, aka. SYS_CFG? The particular SoC in question is the H616, but any info about this register from other SoCs would be helpful as well
<apritzel> on the H616 it's at offset 0x300.0000, so the same block which has (documented) the VER_REG and EMAC_EPHY_CLK_REG0 registers
<apritzel> bit 16(?) apparently needs to be cleared to make THS temperature readings meaningful
anarsoul|2 has joined #linux-sunxi
anarsoul has quit [Read error: Connection reset by peer]
bauen1 has joined #linux-sunxi
dsimic is now known as Guest2955
dsimic has joined #linux-sunxi
Guest2955 has quit [Ping timeout: 480 seconds]
digetx has quit [Ping timeout: 480 seconds]
Daanct12 has quit [Quit: WeeChat 4.0.5]
bauen1 has quit [Ping timeout: 480 seconds]
bauen1 has joined #linux-sunxi
warpme has quit []
JohnDoe_71Rus has quit []
bauen1 has quit [Read error: Connection reset by peer]
bauen1 has joined #linux-sunxi
warpme has joined #linux-sunxi
digetx has joined #linux-sunxi
digetx has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
digetx has joined #linux-sunxi
szemzoa_ has quit [Remote host closed the connection]
warpme has quit []
digetx has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
digetx has joined #linux-sunxi
digetx has quit []
JohnDoe_71Rus has joined #linux-sunxi
evgeny_boger has joined #linux-sunxi
szemzoa has joined #linux-sunxi
szemzoa has quit [Remote host closed the connection]
szemzoa has joined #linux-sunxi
digetx has joined #linux-sunxi
vagrantc has joined #linux-sunxi
vveapon has quit [Read error: Connection reset by peer]
vveapon has joined #linux-sunxi
tnovotny has quit [Quit: Leaving]
vagrantc has quit [Quit: leaving]
apritzel has quit [Ping timeout: 480 seconds]
vagrantc has joined #linux-sunxi
warpme has joined #linux-sunxi
DarkNeutrino has quit [Remote host closed the connection]
vagrantc has quit [Quit: leaving]
bauen1 has quit [Ping timeout: 480 seconds]
warpme has quit []
KREYREN_ has joined #linux-sunxi
KREYREN_ has quit []
KREYREN_oftc has joined #linux-sunxi
<KREYREN_oftc> https://github.com/OLIMEX/DIY-LAPTOP/issues/68 Do you have a contect to how to make fastboot to work on A64?
<KREYREN_oftc> or if i should just focus on ums as the end goal is to have write access in the emmc
warpme has joined #linux-sunxi
<gamiee> KREYREN_oftc : fastboot is software implementation, something what is implemented within u-boot
<gamiee> and as far as I know, mainline u-boot supports fastboot. But question is, if u-boot supports USB Gadget on A64
<KREYREN_oftc> gamiee, how can i use that? Also it seems to need a hardware adjustments e.g. TH15200 from sipeed has this BOOT button to enter it
<gamiee> firstly, it would be good to clarify, what do you want to do.
<KREYREN_oftc> there are proprietary A64 tablets that have fastboot so it should support it?
<KREYREN_oftc> gamiee, enable users of OLIMEX Teres-I to have write access in eMMC if desired
<gamiee> still, lack of context.
<gamiee> as I mentioned, fastboot is implemented by u-boot, so it depends on software.
<gamiee> but there is FEL mode.
<KREYREN_oftc> what's FEL mode
<gamiee> What is flashing mode directly integrated into BootROM.
<KREYREN_oftc> and fastboot doesn't seem to be present on the config for teres_i
<KREYREN_oftc> as trying to get fastboot commands from uboot shell
warpme has quit []
warpme has joined #linux-sunxi
<gamiee> hm
<KREYREN_oftc> FEL seems to be also important, but i guess that's mainly for the cases where the device is hard-bricked?
<KREYREN_oftc> So i guess it should be used only as a last resolt ?
<gamiee> correct
<KREYREN_oftc> So fastboot/ums is more appropriate for allowing users to have write access in eMMC right?
<KREYREN_oftc> and if so how to set uboot to use it
warpme has quit []
warpme has joined #linux-sunxi
apritzel has joined #linux-sunxi
<apritzel> KREYREN_oftc: it's indeed just a matter of enabling it in the U-Boot (def)config
bauen1 has joined #linux-sunxi
<KREYREN_oftc> apritzel, which setting? I can't find any docs on this and source code has https://github.com/u-boot/u-boot/blob/997bef3c6d22d12c7fd092fb831bf94d114c9f6f/cmd/fastboot.c#L60 that seems to look for CONFIG_USB_FUNCTION_FASTBOOT?
<apritzel> check bananapi_m64_defconfig
<apritzel> fastboot will automatically be enabled once you have CONFIG_USB_MUSB_GADGET=y
<apritzel> and since that works on the BPi M64 (also A64), it should work on the Teres I
<KREYREN_oftc> thanks i will try it
<apritzel> though personally I prefer UMS over fastboot
<apritzel> since you can actually mount eMMC partitions
<KREYREN_oftc> i ideally want to automate it in AerithForge to flash it on the device
<KREYREN_oftc> (fork of armbian)
<apritzel> so you can read and write to the eMMC easily, including completely dd'ing an image in
<KREYREN_oftc> hmmm dd'ing would make it work on armbian too
<KREYREN_oftc> https://github.com/u-boot/u-boot/blob/master/configs/teres_i_defconfig#L18C1-L19C1 hmm teres has that disabled for some reason atm
<apritzel> for UMS you need CMD_USB_MASS_STORAGE=y, maybe one or two more, don't remember exactly
<KREYREN_oftc> can you do both fastboot and UMS?
<apritzel> yes
<apritzel> it's two commands, and you can launch whatever you want, but not at the same time
<KREYREN_oftc> Do you know the way to make this work via the button? e.g. holding BOOT button and connecting a USB cable
<apritzel> for UMS it's: => ums 0 mmc 1 for the whole disk, or "ums 0 mmc 1:1" for just one partition
<apritzel> what is the BOOT button here? Does that enter FEL mode?
<KREYREN_oftc> i saw it used on other boards e.g. sipeed TH1520 where you hold BOOT Button connect the USB and it will enter fastboot
<KREYREN_oftc> or common on android devices holding vol down and power
<KREYREN_oftc> or vol up
<apritzel> so AW SoCs have a "FEL" pin, which is sometimes connected to a button labelled "U-Boot" or "FEL"
<KREYREN_oftc> that will go to FEL no?
<apritzel> you press it while powering on, and the *BootROM* will enter FEL, a proprietary Allwinner USB protocol
<apritzel> so that doesn't help you easily here, although you can upload and execute a U-Boot copy
<apritzel> and then use fastboot or UMS from there
<apritzel> if you have a GPIO, you can add a hook into U-Boot, to check that GPIO during startup, then launch the respective command
<apritzel> the FEL pin is not a normal GPIO, though its state can be read via a register
<apritzel> so you could press the FEL button right *after* the system booted, then check this in U-Boot, maybe even via a script
<KREYREN_oftc> doesn't seem to have gpio on the current design, but could be added
<apritzel> KREYREN_oftc: if you have a U-Boot prompt, try "md.l 0x1c00024", with and without the button pressed
<KREYREN_oftc> (it's OSHW and i am researching this for a v2)
<KREYREN_oftc> i don't have any button on the board atm
<apritzel> so FEL is powerful, because it can revive completely bricked systems
<apritzel> but it's not a GPIO, so it's somewhat lost to the system later
<KREYREN_oftc> hmm i see O.o
<apritzel> I wouldn't know of a Linux driver exposing the state, and it would need to poll anyway, because there are no interrupts
<apritzel> but for U-Boot that might be OK
<apritzel> sounds like a 15 minute job to write a command that returns the status of the button, so that you can check this easily in a script
<KREYREN_oftc> makes sense
<apritzel> I doubt that U-Boot scripting is powerful enough to isolate bit 8 from an MMIO out of the box atm
<apritzel> so a normal GPIO sounds more flexible, I think that would work already: there is a "gpio" command, where you can query the state easily, and I am pretty sure that can be used in scripts
<apritzel> you could add that to the autoboot command: before launching the normal distroboot process, you check that GPIO and launch fastboot or UMS
<apritzel> or use can use a U-Boot menu, I believe the display works in U-Boot on the Teres I?
<KREYREN_oftc> yep it shows the uboot interface
mps_ has joined #linux-sunxi
<KREYREN_oftc> i don't like the idea of autoboot as afaik that would get to the initrd phase and i want to handle that before that
<apritzel> so you can script up a menu, with a "Normal boot" default entry, and a fastboot and/or UMS entry
<KREYREN_oftc> that could be a good option actually
<KREYREN_oftc> unless someone breaks the display :D
<KREYREN_oftc> but then there is UART
<apritzel> U-boot's distroboot would eventually start Linux, yes, but the U-Boot menu runs before that
mps has quit [Ping timeout: 480 seconds]
<KREYREN_oftc> yep i like the idea seems as much more robust and would make it easier for water and dust proofing
<KREYREN_oftc> thanks for brainstorm :)
<apritzel> not sure what's the USB OTG story is, the Wiki mentions a "USB 2.0 OTG" port, but it's not enabled in the DT either, so it's not available under Linux as well
<KREYREN_oftc> yea was looking at that too
<apritzel> does the laptop have a microUSB port?
<KREYREN_oftc> nope
<KREYREN_oftc> just microhdmi
<KREYREN_oftc> otherwise 2x USB-A port
<KREYREN_oftc> i plan on adding USB-C bcs the current charging mechanism is kinda trash
<apritzel> do you know if there is a hub involved?
<apritzel> at the current model?
* KREYREN_oftc is checking schematics
<apritzel> or how is the keyboard connected?
<apritzel> the A64 has only two USB ports, and one of them is also the OTG port
<KREYREN_oftc> 1 in 4 out
<apritzel> yeah, so that's the non-OTG port
<apritzel> now if the other USB A socket is connected directly to USB0, it could be used for OTG, just with a non-standard USB cable: A plug to A plug
<KREYREN_oftc> https://i.imgur.com/qkHftwX.png there seems to be OTG on non-hub connector
<apritzel> but that's not enabled in the DT, not even for pure host support
<apritzel> USB-I smells like a microB port, but maybe it's just pads or pins, and they are not connected?
<KREYREN_oftc> should it be enabled?
<apritzel> USB-*ID*
<KREYREN_oftc> oh the USB5OTG doesn't seem to be connected there
<KREYREN_oftc> checking
<apritzel> look at the sun50i-a64-pine64.dts, that uses port0 as a pure host port (under Linux)
<apritzel> but it can be used for OTG (with that nasty cable), with some DT changes, or maybe in U-Boot even without them
<KREYREN_oftc> https://i.imgur.com/BEtF4Y6.png there is a thick trail for OTG that goes to the daughter board
<KREYREN_oftc> checking the dts
<apritzel> yes
<apritzel> the circuitry looks like proper USB-OTG, with ID pin, power enable, and voltage detect
* KREYREN_oftc doesn't know how to define dts yet
<KREYREN_oftc> just adding that codeblock will make it work or?
<KREYREN_oftc> btw the gerbers etc.. are available on https://github.com/olimex/diy-laptop
<apritzel> well, just adding this works for the most simple case, on the Pine64
<KREYREN_oftc> how can it be checked?
<apritzel> the BananaPi M64 has proper USB-OTG port, and it's a dedicated USB-microB port there
<apritzel> that DT should serve as an example for the right DT lines
<KREYREN_oftc> daughter board btw https://i.imgur.com/dOdYrgA.png
<KREYREN_oftc> it seems to be out of data as it's not using the USB5VOTG
<KREYREN_oftc> and it's rev.B where the board seems to be rev.C i will report it upstream later
<KREYREN_oftc> (i guess someone forgot to upload it)
<KREYREN_oftc> example noted i will investigate it
JohnDoe_71Rus has quit []
<KREYREN_oftc> yep was looking at the rev.B of the teres board it seems that the USB5VOTG is an addition in the rev.C
warpme has quit []
KREYREN_oftc has quit [Remote host closed the connection]
kuba2k2 has joined #linux-sunxi
KREYREN_oftc has joined #linux-sunxi
<KREYREN_oftc> sry my net crashed
kuba2k2 has quit [Ping timeout: 480 seconds]
Hypfer has quit [Ping timeout: 480 seconds]
Hypfer has joined #linux-sunxi
vagrantc has joined #linux-sunxi
KREYREN_oftc has quit [Remote host closed the connection]
KREYREN_ has joined #linux-sunxi
apritzel has quit [Ping timeout: 480 seconds]
KREYREN_ has quit [Remote host closed the connection]
KREYREN_ has joined #linux-sunxi
KREYREN__ has joined #linux-sunxi
KREYREN_ has quit [Remote host closed the connection]
KREYREN__ has quit [Remote host closed the connection]
KREYREN__ has joined #linux-sunxi
jason123santaonirc is now known as jason123onirc
DuClare has quit [Remote host closed the connection]
KREYREN__ has quit [Remote host closed the connection]
KREYREN__ has joined #linux-sunxi
KREYREN__ has quit [Remote host closed the connection]
KREYREN_ has joined #linux-sunxi
KREYREN__ has joined #linux-sunxi
KREYREN_ has quit [Remote host closed the connection]
KREYREN_ has joined #linux-sunxi
KREYREN_ has quit [Remote host closed the connection]
KREYREN__ has quit [Remote host closed the connection]
KREYREN_ has joined #linux-sunxi
KREYREN_ has quit [Remote host closed the connection]
KREYREN_ has joined #linux-sunxi
GrantM11235 has joined #linux-sunxi
<GrantM11235> I'm trying to port mainline u-boot to a new board, but I'm having trouble getting u-boot to recognize the onboard spi nand flash. When I run sf probe it says "invalid chip select"
GrantM11235[m] has quit []
GrantM11235[m] has joined #linux-sunxi
GrantM11235 has left #linux-sunxi [#linux-sunxi]
<GrantM11235[m]> I copied the device tree and defconfig from another board that uses the same SoC https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/suniv-f1c200s-lctech-pi.dts