ChanServ changed the topic of #msm8937-mainline to: Boot Linux on your MSM8917/37/40 and QM215 mobile! | GitHub: https://github.com/msm89x7-mainline | Logs: https://oftc.irclog.whitequark.org/msm8937-mainline | Bridged to #msm8937-mainline:kde.org on Matrix
funderscore is now known as f_
ungeskriptet_ has joined #msm8937-mainline
ungeskriptet has quit [Ping timeout: 480 seconds]
ungeskriptet_ is now known as ungeskriptet
<NekoCWD[m]> [Rejected torch patches](https://patchwork.kernel.org/project/linux-arm-msm/list/?series=525767), I will port it to 6.12
<barni2000[m]> i don't understand when some simple stuff should be changed why people stop sending their patches
<barni2000[m]> this is the upstreaming process send+review+change+send+review...applied
<NekoCWD[m]> There are new qcom spmi flash driver, but it controlls only new 3/4 chan flash. Maybe we need to merge drivers somehow
<barni2000[m]> it is for newer pmic-s
<NekoCWD[m]> Yes, but the behavior seems quite similar
<M0xCAFEBABE[m]> <barni2000[m]> "i don't understand when some..." <- perhaps... some submitters just aren't able to handle their requests
<NekoCWD[m]> YEY! It works
<NekoCWD[m]> barni2000How can i name driver? `leds-qcom-flash-old`? `leds-qcom-flash-v1`? Or something
<barni2000[m]> maybe v1 idk
<barni2000[m]> but ig now you should check for common parts
<NekoCWD[m]> Lol, I've copy-pasted markw's sensors and it works
<NekoCWD[m]> Sensors via bitbanged i2c4 :D
<barni2000[m]> bitbanging is working yes but it would be better finalize the smgr driver what toonis have written
<NekoCWD[m]> what is smgr?
<barni2000[m]> sensor manager mainline implemenation of SCC
<barni2000[m]> s/SCC/SSC/
<barni2000[m]> now you need ucm config
<barni2000[m]> downstream mixer_path.xml is good for reference but earpiece and jack should be easy
<barni2000[m]> for speaker you will need amp driver mostly
<NekoCWD[m]> barni2000[m]: Yea, i'm working on it
<NekoCWD[m]> barni2000[m]: I can't find it in downstream dt
<barni2000[m]> xiaomi-vince config should work
<NekoCWD[m]> Oh, will try
<barni2000[m]> set the sound card model
<NekoCWD[m]> i've setted as xiaomi-prada
<barni2000[m]> you will need just include the hifi conf like this
<barni2000[m]> maybr you will need simple-amplifier
<M0xCAFEBABE[m]> btw, for reference the correct mixer_paths used in stock rom is mixer_paths_mtp.xml
<barni2000[m]> motos cannot be used with generic package, wifi will not work
<barni2000[m]> nv bin should be packaged
<barni2000[m]> idk if i can set firmware-path property for nv bin
<NekoCWD[m]> Ahah, it works :D
<NekoCWD[m]> But speaker works in headphones mode and headphones doesn't work
<NekoCWD[m]> barni2000how to control simple-audio-amplifier? I see no cset for it in amixer
<barni2000[m]> simple-audio-amplifier like a fixed regulator it is pulling the gpio pin thats all
<NekoCWD[m]> pin-switches + widget + aux-devs in soundcard node
<barni2000[m]> <NekoCWD[m]> "But speaker works in headphones..." <- it use pm8937 codec then for speakers
<barni2000[m]> you should check motos config
<barni2000[m]> motto-potter is same architecture
<NekoCWD[m]> Which repo contain dt for motto-potter?
<barni2000[m]> i mean the ucm config
<barni2000[m]> msm8953
<barni2000[m]> i said it wrong
<barni2000[m]> moto potter is uses earpiece and speaker with 1 speaker
<barni2000[m]> somewhere i have found some description about the used architectures
<barni2000[m]> there is a case when it is using 1 channel from headphone out
<barni2000[m]> * headphone out for speakers
<NekoCWD[m]> What to do if the sound in the headphones is heavily distorted?
<barni2000[m]> check the initial volume values
<NekoCWD[m]> They are ok
<barni2000[m]> do you have the mixer_path?
<NekoCWD[m]> Yea
<barni2000[m]> i think it has different controls a bit
<barni2000[m]> <ctl name="RX HPH Mode" value="HD2"/>
<NekoCWD[m]> barni2000
<barni2000[m]> i guess it will be controlled by simple amps
<barni2000[m]> there were two gpios for headphone
<barni2000[m]> s/headphone/headphones/
<NekoCWD[m]> qcom,msm-switch-headphone-en = <&tlmm 94 0>;
<NekoCWD[m]> qcom,msm-switch-headphone-in = <&tlmm 95 0>;
<barni2000[m]> barni2000[m]: this is an resolved form of mixer path
<barni2000[m]> NekoCWD[m]: yes this is important
<barni2000[m]> i think you could find some similar devices between msm8916
<barni2000[m]> * between msm8916 dts
<barni2000[m]> NekoCWD[m]: same occured on msm8953
<barni2000[m]> other thing if there is no active pcm it will make some constant noise
<NekoCWD[m]> barni2000[m]: Gpios enabled, but nothing changed
<barni2000[m]> it can be caused by mclk or pinctrls
<barni2000[m]> NekoCWD[m]: try to disable them
<barni2000[m]> they should disable headphone
<NekoCWD[m]> yea, i cloned this repo and working on top of it
<barni2000[m]> most of the msm8953 devices was easy to enable but they are using simple architecture
<NekoCWD[m]> AAAAAAA tlmm with higer bias fixed this
<barni2000[m]> so pinctrl
<barni2000[m]> i should check it on ms8953 latter there were some reported issues
<barni2000[m]> pinctrls are important but i am barely understand them :|
<NekoCWD[m]> Yey! All works fine! Even headset mic detection <3
<M0xCAFEBABE[m]> nais :3
<NekoCWD[m]> barni2000 Why there are no dais in soundcard node? Will we it define in every dt?
<barni2000[m]> idk i was not define them
<barni2000[m]> but there are some there iirc
<NekoCWD[m]> Ok, i will add missing
<barni2000[m]> 1st sound commits should be fixed ig
<barni2000[m]> there were some review at the mail list
<NekoCWD[m]> barni2000[m]: What commits?
<barni2000[m]> a moment
<barni2000[m]> this patch series should be fixed because of msm8909, msm8917, msm8937, msm8940 and msm8953
<barni2000[m]> and msm8956
<barni2000[m]> couple of stuff are trivial to fix
<barni2000[m]> btw at upstream they don't really like device specific stuff in soc dts so maybe dais should go into the devices dt
<barni2000[m]> no
<NekoCWD[m]> It works somehow. Without pinctrl there are no sound
<barni2000[m]> show your pinctrl
<barni2000[m]> maybe gpio68 is not under cdc_pdm0
<barni2000[m]> 16 static const char * const cdc_pdm0_groups[] = {
<barni2000[m]> 17 | "gpio69", "gpio70", "gpio71", "gpio72", "gpio73", "gpio74",
<barni2000[m]> 18 };
<NekoCWD[m]> Yea, there are gpio 69-74. Than what i need to write here?
<barni2000[m]> gpio68 is in audio_reset and gpio group
<NekoCWD[m]> barni2000[m]: `function="audio_reset"` ?
<barni2000[m]> how downstream look like
<NekoCWD[m]> No pinctrl dor 68
<NekoCWD[m]> *
<NekoCWD[m]> Ah, i've copied that from 8953
<barni2000[m]> these are in the msm8937.dtsi 1 moment
<barni2000[m]> 8953 have more gpio pins
<NekoCWD[m]> Thanks. I'm too silly with pinctrls
<barni2000[m]> btw i am not sure every pins are needed
<barni2000[m]> downstream sometimes keep useless pinctrls
<M0xCAFEBABE[m]> saw a mismatching indent in hf-in {} node btw)
<NekoCWD[m]> M0xCAFEBABE[m]: ?
<NekoCWD[m]> What's wrong?
<barni2000[m]> did you copied wcd form msm8953?
<NekoCWD[m]> Yes
<NekoCWD[m]> It works btw
<barni2000[m]> tresholds should be different
<NekoCWD[m]> Oh
<barni2000[m]> s/tresholds/thresholds/
<barni2000[m]> almost every device has custom values
<NekoCWD[m]> In prada dt?
<barni2000[m]> generally msm8952.c contain the values
<NekoCWD[m]> barni2000thresholds in prada dt?
<barni2000[m]> it is not defined in dt
<NekoCWD[m]> I mean where it is defined in mainline? I've copied from markw dt. It's pretty similar devices
<barni2000[m]> we don't have the original sources
<NekoCWD[m]> What the MBHC does?
<barni2000[m]> headset buttons
<barni2000[m]> jack detection etc
<NekoCWD[m]> Hmm, ok, than i just hint my values as untested. Jack detection and jack mic detection works fine for me
<barni2000[m]> i have added rolex and montana
<barni2000[m]> maybe i should do a rebase to latest stable to squash the fixups or i can do that later with 6.13 rebase
<barni2000[m]> btw afaik prada uses ov5675 so camera can be enabled
<barni2000[m]> but maybe msm8937 have different camera clocks from 8917 idk
<NekoCWD[m]> barni2000[m]: camss will work?
<barni2000[m]> msm8917 camss is there
<barni2000[m]> i should check the values for msm8937
<barni2000[m]> but now i will rest
<NekoCWD[m]> Me to. It's near to 1 AM for me
<barni2000[m]> i have pushed also fixes for ugg/ugglite sdcard, and riva backlight
<barni2000[m]> ov5670
<NekoCWD[m]> ov5670/ov13853
<barni2000[m]> ov5670 has driver
<barni2000[m]> markw also have ov5670 and it is working on pmos
<NekoCWD[m]> Seems to be sam as markw
<NekoCWD[m]> Ahah
<barni2000[m]> maybe markw branch contains original sources of prada
<M0xCAFEBABE[m]> barni2000[m]: they're even different ODM...
<M0xCAFEBABE[m]> it's just they have some common hardware components
<M0xCAFEBABE[m]> don't be misleaded by the defconfigs, it's meme
<barni2000[m]> and both called redmi 4
<M0xCAFEBABE[m]> * don't be misleaded by the defconfigs, these are meme
<barni2000[m]> markw have prime as a postfix
<barni2000[m]> somewhere santoni also redmi 4 :D
<barni2000[m]> <insert a clown here>
<M0xCAFEBABE[m]> barni2000[m]: only in india afaik
<barni2000[m]> yes
<barni2000[m]> codenames are better then devices real name
<M0xCAFEBABE[m]> M0xCAFEBABE[m]: prada's ODM is FIH
<M0xCAFEBABE[m]> markw's is Wingtech
<M0xCAFEBABE[m]> land&santoni are Wingtech too
<M0xCAFEBABE[m]> just for completeness, ugg/ugglite are longcheer
<barni2000[m]> riva/rolex?
<M0xCAFEBABE[m]> wingtech too
<barni2000[m]> btw there are 2 variants of riva my 1st one has 2 sim tray
<M0xCAFEBABE[m]> pretty sure that santoni&rolex&riva are in the same branch
<barni2000[m]> M0xCAFEBABE[m]: yes with rosy
<barni2000[m]> Redmi 4A, Redmi 5, Redmi 5A
<barni2000[m]> santoni on different branch but riva also ther just they don't write to the README
<barni2000[m]> * santoni on different branch but riva also there just they don't write it to the README
<M0xCAFEBABE[m]> M0xCAFEBABE[m]: cuz same camera blobs in android supports all these 3 devices
<NekoCWD[m]> how to test cameras?
<M0xCAFEBABE[m]> * cuz same camera blobs in android supports all these 3 devices, kernel stuff are similar too
<barni2000[m]> NekoCWD[m]: `media-ctl -p` first, after libcamera apps or megapixels
<M0xCAFEBABE[m]> barni2000[m]: iirc there's so many santoni stuff in riva branch, or in reverse, or both
<M0xCAFEBABE[m]> barni2000[m]: well yeah
<barni2000[m]> motorola branches almost contains their every devices
<NekoCWD[m]> well, camss starts fine
<NekoCWD[m]> Hmm, camera seems to probe fine (no errors and module shows in lsmod), i can see it on i2c bus, but there are no /dev/media0 or /dev/video0. What's wrong?
<barni2000[m]> then it is not probing fine or camss not probing fine
<barni2000[m]> there is no qcom,msm8937-camss :D
<barni2000[m]> only 8917
<NekoCWD[m]> XD
<NekoCWD[m]> can i just change 8937->8917 in dtsi?
<barni2000[m]> ig they are same
<NekoCWD[m]> csid versions
<barni2000[m]> i don't think it is matter too much
<barni2000[m]> clocks are same
<NekoCWD[m]> Hmm. Phone now starting too long
<NekoCWD[m]> barni2000 /dev/video0-5 appears
<NekoCWD[m]> media0 doesn't appears
<barni2000[m]> media-ctl -p ?
<barni2000[m]> ig sensor was not probed succesfully
<barni2000[m]> check dmesg for ov5670
<barni2000[m]> did you add the sensor to your kernel config?
<NekoCWD[m]> Yes, there are ov5670 module
<barni2000[m]> it caused by camss :D
<NekoCWD[m]> fr?
<barni2000[m]> it wiil block graceful power off your devices
<barni2000[m]> s/devices/device/
<barni2000[m]> do you got some vfe backtrace?
<NekoCWD[m]> <barni2000[m]> "it wiil block graceful power off..." <- For now i got a lot of `detected fb_set_par error, error code: -16`. I've patched kernel to not show this messages, and now waiting for boot
<barni2000[m]> i have a hack for vfe
<NekoCWD[m]> Share please
<NekoCWD[m]> Null deref :D
<barni2000[m]> it seems different issue but apply my hack first
<NekoCWD[m]> barni2000[m]: applied
<NekoCWD[m]> seems like camss break everyting, lol. TS doesn't work, wifi/bt also doesn't :D
<barni2000[m]> btw it seems csid0 is switched with csid1 and csiphy0 with csiphy1 so that is the difference between 8917 and 8937
<NekoCWD[m]> need i switch reg_names?
<barni2000[m]> no only phys are switched
<barni2000[m]> switch the regs in phys
<barni2000[m]> but maybe it should be switched in camss.c also
<NekoCWD[m]> also in interrupts?
<barni2000[m]> wait
<NekoCWD[m]> seems to be error in link_entities
<NekoCWD[m]> lol, there are no link_entities in msm8917_resources
<barni2000[m]> check bindings in 8917.dtsi
<barni2000[m]> i think i have updated there
<NekoCWD[m]> [ 17.828220] ov5670 4-0036: Unsupported clock frequency 0
<barni2000[m]> 8937 have different clocks i have checked the gcc
<barni2000[m]> NekoCWD[m]: how your bindings look like
<barni2000[m]> mclk2?
<barni2000[m]> was it copied from 8953?
<NekoCWD[m]> barni2000[m]: From downstream
<NekoCWD[m]> It uses mclk2 for front camera
<barni2000[m]> 8937 uses s3 for supply?
<NekoCWD[m]> barni2000[m]: Yea
<barni2000[m]> try assigned-clock-rates also
<NekoCWD[m]> oh, i accidently deleted xo_board. Now there are other error
<NekoCWD[m]> csid is null somehoe
<NekoCWD[m]> s/somehoe/somehow/
<NekoCWD[m]> *
<barni2000[m]> they are not matching