#
…

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:22marcanit's weird
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:23marcanbut 32-bit reads do work
09:23marcanas do all size writes
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:24svenand i thought that old sdhc on the wii was already cursed
09:24marcansven: the wii sdhc had this problem too :D
09:24marcan*and* the byte order swap
09:24svenyeah, i still have a trauma from writing that driver and making random sd cards work :D
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:27marcanthough it shouldn't really hurt to do unconditionally
09:27marcanapple's driver is for multiple SDHC chips and unconditionally uses 32-bit reads/writes for everything
09:27marcanalso this problem also happens in osx
09:27marcan(otherwise I'd just find what it does differently)
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:06marcanah, cool, I was wondering about that (hadn't looked yet)
10:06marcanshould be an easy patch then
10:06kettenis has quit [Quit: Lost terminal]
10:10kettenis has joined #asahi-dev
10:11kettenismarcan: that sdhc/pcie behaviour is really weird
10:18arndmarcan: is it reading the wrong byte (e.g. some byteswap gone wrong), or is it always 0xff for any address?
10:18marcanalways 0xff/0xffff for any address
10:18marcanall 8-bit and 16-bit reads
10:19marcan32-bit works fine, any size *writes* work fine
10:19marcanwhich is bizarre, usually writes are what break first
10:19marcan(byte enables gone wrong)
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: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:02sven"driver" :-P
11:03j_eyall the commits have a WIP prefix :D
11:04sveni also need to get back and at least clean rtkit up a bit
11:04kettenisdon't want to tell you what to work on, but the rtkit stuff is a fairly basic building block, hint, hint
11:04j_eycant have nvme without it!
11:06kettenisgetting the DT bindings sorted out will take some back and forth still
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:09svenbut it's been a while
11:09kettenisindeed; defenitely more than a memory halt-time ago for me ;)
11:09svenyup :D
11:09ketteniss/halt/half/
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:13j_eyyeah, that's something I don't really understand
11:15sveni think most SMC commands can only be done in serial because they use the same shared memory area
11:18j_eysven: how do other drivers like hwmon or whatever interact with the smc though?
11:18svenunclear. but that wouldn't change if we need an rtkit node
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:33kettenisit provides quite a wide variety of functionality, i.e. GPIO, powerdown, sensors
11:34kettenistraditionally those are handled by separate drivers
11:36kettenisbut as stated above, these all depend on the same shared memory
11:39marcansven: macos always seems to serialize SMC commands
11:39marcanI've never seen it overlap them scrolling through the HV logs
11:39marcanso I'd do the same
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:40marcanno idea what's up with that...
11:40svenhuh… don’t think so
11:41sveni dont think I saw that
11:41marcancould be I fail it somewhere
11:41svenbut I did see some weird thing where only the first gpio read is successful
11:41svenand read after that always returned zero
11:41marcaneither way, we wouldn't have multiple SMC drivers on top of RTKit
11:41marcanwhat we *could* have is one SMC driver that provides the K/V interface
11:41marcanand then other drivers that talk to *that*
11:41svenuntil I did I write to _any_ gpio
11:41marcanI did see that too
11:41marcanwith the m1n1 driver I made today
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:42marcanyes, exactly
11:42marcanthere is no sane way of muxing stuff over the mailbox
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:43svenAt least so far smc also seems like the only candidate for multiple drivers anyway
11:44marcanit'd be a bespoke interface
11:44marcancould just be a bunch of sub-nodes of SMC, not declared as a bus
11:44marcanthen SMC just does the scan
11:44marcanthat would allow us to have different compatibles for different features
11:45marcanand enable/disable things depending on the device config
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:49marcansure, but why not have a node?
11:49marcanI mean a sub-node
11:49marcanit's not much different from e.g. some of the power management schemes used on other SoCs
11:50kettenisthe hard problem is to come up with a meaningful subdividion ;)
11:52kettenisthe spmi pmu has a similar issue of course
11:53rkt has left #asahi-dev [#asahi-dev]
11:55marcanwell, there are some obvious ones like GPIO, BMIC
11:56marcanbattery management
12:03kettenisis there actually something to control in that area?
12:05marcanreading levels/status at least
12:05marcanbut usually there are at least some controls
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
20:28kettenis00000005c1800500 3135302a 67612a2a ...
20:28kettenisthe tell-tale signs of some Synopsys DesignWare "IP"
20:29kettenis(just something that caught my eye when I watched today's youtube stream)
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]
…