2021-11-09
01:01Dcow has joined #asahi-dev
01:18Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
02:33riker77_ has joined #asahi-dev
02:35riker77 has quit [Ping timeout: 480 seconds]
02:35riker77_ is now known as riker77
03:29dsrt^ has joined #asahi-dev
03:35rkt has joined #asahi-dev
03:53phiologe has joined #asahi-dev
03:56PhilippvK has quit [Ping timeout: 480 seconds]
04:28dsrt^ has quit [Ping timeout: 480 seconds]
04:38dsrt^ has joined #asahi-dev
04:40skipwich has joined #asahi-dev
05:45DarkShadow44 has quit [Quit: ZNC - https://znc.in]
05:46DarkShadow44 has joined #asahi-dev
05:47DarkShadow44 has quit []
05:47DarkShadow44 has joined #asahi-dev
06:13rkt has quit [Remote host closed the connection]
07:00dsrt^ has quit [Ping timeout: 480 seconds]
07:00dsrt^ has joined #asahi-dev
07:10chadmed has quit [Remote host closed the connection]
07:11chadmed has joined #asahi-dev
08:45aleasto has joined #asahi-dev
09:21marcanmaz: works now, wasn't really much to do other than poke the right SMC GPIOs to enable the devices... I'll bisect out my patches to see what's really necessary
09:22marcanI did run into a bizarro problem, though. read8/read16 from the SD card reader does not work, it returns all FF. But from the WLAN chip it does.
09:22marcanyou'd *think* that's just a chip quirk, but Linux already has support for this specific chip and it doesn't work around it... so either the chip revision in these machines is bugged or this only happens on this platform?
09:23marcanother than that we also need platform quirks for the SD reader (CD/WP pin polarities), which means yet another OF PCIe device node :-)
09:23mazalmost feels like it needs another enable to make it visible (all Fs is usually 'no device here')
09:24marcanthis isn't the first time I see this crap in an SDHC host, but it's weird that it's reads only and apparently nobody hits this on other platforms?
09:25marcanI will say after I poked the CD/WP polarity bits (which I ghidra'd because faking it in the HV and diffing would be a bit silly just to find two bits...) and worked around the read8/16 thing, it worked fine
09:26marcannot sure about the read8/16 override; I'd love to find someone with one of these things in another machine to find out if it works and if any revision registers say anything interesting
09:27marcanapple's driver is for multiple SDHC chips and unconditionally uses 32-bit reads/writes for everything
09:31dsrt^ has quit [Ping timeout: 480 seconds]
09:31j_eymarcan: https://ubuntu.com/certified/202004-27835/18.04%20LTS "Lenovo ThinkPad P73" seems to have this SDHC
09:33Dcow has joined #asahi-dev
09:33Dcow has quit []
09:36psykose has quit [Remote host closed the connection]
09:38rkt has joined #asahi-dev
09:38Dcow has joined #asahi-dev
09:52Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
09:53Dcow has joined #asahi-dev
09:59psykose has joined #asahi-dev
10:04arndmarcan: there are standard properties for inverted wp/cd signals, as documented in Documentation/devicetree/bindings/mmc/mmc-controller.yaml, and I think there is a helper function to parse those
10:04psykose has quit [Remote host closed the connection]
10:05psykose has joined #asahi-dev
10:06kettenis has quit [Quit: Lost terminal]
10:10kettenis has joined #asahi-dev
10:18arndmarcan: is it reading the wrong byte (e.g. some byteswap gone wrong), or is it always 0xff for any address?
10:25Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
10:35arndmarcan: for testing the read_b/read_w change, it shouldn't be hard to find the right person: I see that akashi worked on https://www.spinics.net/lists/linux-mmc/msg61479.html, I can ask him about it when I see him on IRC, and apparently the Ben Chuang from Genesys is active on the driver as well
10:40j_eymarcan: also I had a go at rewriting the SPI driver, it seems to work, but probably would be good to explore some of the registers a bit more to make sure theyre really doing as expected. not sure if I will continue too much with it, if not, you could maybe use it as a starting point
10:40Dcow has joined #asahi-dev
11:01j_eymarcan: there's an SMC driver here https://github.com/AsahiLinux/linux/commits/sven/20210829
11:02j_eyand I had a few commits on top starting to add a debugfs interface to it https://gitlab.arm.com/linux-arm/jg-open/-/commits/smc-wip/
11:04kettenisdon't want to tell you what to work on, but the rtkit stuff is a fairly basic building block, hint, hint
11:08sveni think the tricky parts are "do we want/need a separate SART node" and "do we want/need a separate RTKit firmware node"
11:09sveni think we had some discussion about the rtkit node and decided that we don't really need a node for those
11:12kettenisI fear it depends on how the SMC functionality is going to be split out over multiple drivers and whether that needs multiple DT nodes
11:15sveni think most SMC commands can only be done in serial because they use the same shared memory area
11:18svenwe would only need one if we had multiple SMC-based drivers that all talk to rtkit directly
11:19sven(which might still be required, i don't really know what SMC does but at least so far i suspect that we will have a single RTKit client)
11:40marcanalso, uh, I ran into a weird thing where the first command issued after init returns garbage? (low 32 bits of init result end up in high bits?)
11:40j_eyyeah https://gitlab.arm.com/linux-arm/jg-open/-/commit/4e5f9ce10c901cb2a9f5cb79782773f67c6e0c29#43c6427788452164e3a6724d3a37d4aaad3a7b9c_124_139
11:42svenI feel like we should really only have a single rtkit client for each coproc that may then provide an interface for multiple drivers if necessary
11:43marcanone advantage of doing the SMC driver with sub-drivers on top is you could reload the subdrivers with impunity
11:43marcanwhile reloading SMC needs an SMC restart or at least a clean shutdown, if we can even do that
11:46kettenisI think there are examples in Linux for "MFD"s that don't have a node in the DT for each separate function
11:49marcanit's not much different from e.g. some of the power management schemes used on other SoCs
11:53rkt has left #asahi-dev [#asahi-dev]
12:29Dcow has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
12:40Dcow has joined #asahi-dev
13:25Dcow has quit [Ping timeout: 480 seconds]
14:42gpanders[m]1 is now known as gpanders
14:42gpanders has quit [Quit: Reconnecting]
14:42gpanders has joined #asahi-dev
14:42gpanders has quit []
14:42gpanders has joined #asahi-dev
15:01yuyichao has quit [Ping timeout: 480 seconds]
15:12yuyichao has joined #asahi-dev
15:45waagrr has quit [Read error: Connection reset by peer]
15:45waagrr has joined #asahi-dev
15:48vx^ has quit [Quit: :)~]
15:52vx^ has joined #asahi-dev
16:01X-Scale` has joined #asahi-dev
16:06X-Scale has quit [Ping timeout: 480 seconds]
17:02___nick___ has joined #asahi-dev
17:03___nick___ has quit []
17:04___nick___ has joined #asahi-dev
17:20aleasto has quit [Quit: Konversation terminated!]
17:20aleasto has joined #asahi-dev
17:43X-Scale has joined #asahi-dev
17:48X-Scale` has quit [Ping timeout: 480 seconds]
18:31aleasto has quit [Ping timeout: 480 seconds]
18:32aleasto has joined #asahi-dev
19:41squags has joined #asahi-dev
20:00squags has quit [Ping timeout: 480 seconds]
20:01___nick___ has quit []
20:03___nick___ has joined #asahi-dev
20:08squags has joined #asahi-dev
20:11jacoxon has joined #asahi-dev
20:16squags has quit [Ping timeout: 480 seconds]
20:23squags has joined #asahi-dev
21:08___nick___ has quit [Ping timeout: 480 seconds]
21:08squags has quit [Remote host closed the connection]
21:26squags has joined #asahi-dev
22:14jacoxon has quit []
22:30aleasto has quit [Quit: Konversation terminated!]
23:25squags has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:43squags has joined #asahi-dev
23:56egavinc has quit [Quit: Leaving]