Hacker News new | ask | show | jobs
Fairphone 6 wide camera experimental Linux support (nondescriptpointer.com)
160 points by helonaut 6 days ago
7 comments

It's a pity those IMX and ISOCELL sensor chips are unobtainable from Digikey.

Anyone with experience buying them in smaller quantities?

They aren't intended to be available frankly. You either buy them as camera modules, smartphone type or IP camera type, or don't at all.

A part of it is just how involved the manufacturing of those camera modules is. The sensor chips ships as bare silicon dies. They're precisely placed, glued and wire bonded to the substrate PCB, then adorned with a focus/OIS voice coil frame and a lens assembly. Absolutely nothing about this process is hobbyist friendly.

The other part is that corporations are incredibly stupid about how "valuable" their precious proprietary data is, and would rather jump into a volcano than give a sensor datasheet to someone who doesn't look like they have at least 20 lawyers employed and can take a MOQ of 100000 units. And how would one use a sensor without a datasheet, or a bring-up register sequence, or anything at all?

Vendor buying agreements and NDAs often prevent hobbyist-grade sensor boards from even existing. Especially for cutting edge high performance sensors, like the ones found in flagship smartphones.

Ok, how would you buy them if you were a small company making e.g. scientific instruments?
You wouldn't!

You'd buy instead an "industrial/automation/automotive" sensor - one that has a fraction of the raw resolution, but maybe spots some other perks. Like a global shutter with no rolling shutter distortions, a "no RGGB Bayer" option that lets you set up your own filters and pick what wavelengths you care about, a package that's amenable to low volume manufacturing, longevity guarantees, availability in quantities of tens instead of tens of thousands, or actual documentation that you can get without 3-6 months of salesman and lawyer negotiations.

Or you'd buy a ready-made "scientific instrument" camera from someone else. Which probably has another "industrial" sensor - maybe worse, maybe better than one you could get directly, depending on how up to date the catalog is and how good of a working relationship does the instrument company have with the sensor vendors. And a price tag in 4-5 digits range. Then you would integrate that thing as a subsystem into whatever science hardware you wanted to make.

But if you truly want the "flagship smartphone" mix of small sensor size, low cost and high resolution? There are no good options! Clearly, the tech just hasn't advanced far enough for that!

Then how do you explain that Digikey still sells many camera sensors.

For example this one:

https://mm.digikey.com/Volume0/opasdata/d220001/medias/docus...

Have you even looked at this datasheet? This is one of those "industrial" sensors I was talking about.

It's not CMOS. It doesn't even have a digital interface. It has basically nothing in common with the kind of image sensors you'd find in a flagship smartphone, like Samsung ISOCELL. It's a very specialized device made for a very short list of uses, none of which are in consumer electronics.

Most sensors you'll see there are similar. Not all of them are as hideously exotic as the one you linked, but very few of them are the SKUs you'd find in a smartphone. The closest thing to a smartphone camera sensor would probably be STMicroelectronics VD56G3, which is similar to VD56G0 that Apple uses in iPhone FaceID. And even that is a specialized structured light NIR piece.

There are some vendors that have a good variety of IMX sensors boards. Usually labelled Board Level MIPI camera, some with usable v4l drivers.
have fairphone looked into supporting GrapheneOS? what exactly is missing there other than "it's not Pixel"?
It would take extensive work to achieve the hardware requirements and the capability for an OEM that isn't able to develop their own chips with Memory tagging enforcement (mte) which the Snapdragon 8 Elite used in the upcoming Motorola phones will have. It won't be cheap and it won't be easy.

Google has set the bar high with their security features.

The hardware doesn't support the relevant security features GrapheneOS requires.

https://grapheneos.org/faq#future-devices

A team of people patching and releasing firmware and hardware drivers to the public on a monthly basis.
It would need to provide that for around 7 years. It would need to avoid getting increasingly delayed over time. It would also need to provide the hardware-based security features required by GrapheneOS. That includes a proper secure element with the features we need and fully functional hardware memory tagging usable for all of the kernel and userspace. Motorola Mobility is working on providing what we need for next generation devices. Fairphone repeatedly expressed disinterest and is partnered with a company taking AOSP in the opposite direction from us for privacy and security. Fairphone replaced their own OS with that and it was a major downgrade moving them further away from possibly ever providing what we need.
Another dev has been hard at work bringing Fairphone 6 Linux support for calls, audio, microphone, NFC, GPS, and IMU: https://blorp.piefed.zip/inbox/u/https%3A%2F%2Fani.social%2F...

It's now probably the most modern well-supported pmOS phone.

Amazing, I didn't see this yet. Indeed seems like it is well on track to become a usable device now.
I wish one day I could do cool stuff like that. Kudos!
I'm sure you will!
Never give up!
Good to see this! Love Fairphone!
Does the article seem AI-written/assisted to anyone else?

Some parts that stood out to me: > A phone camera is not a single device. On Qualcomm SoCs, the capture path is a chain: > The bus register base moved from 0xa00 to 0x1800, and encapsulating that offset shift accounted for most of the work. > It gated the AHB register bus used by the whole camera complex, including the CCI. Without it, register accesses silently returned zero. > With the wrong numbering, CSIPHY programmed a lane mask with lane 0 missing, and the PHY never locked. > This was the main bug. Frames arrived at the right rate and size, and buf_done fired, but every pixel was zero. [...] The data path delivered frame timing, but not pixel data. > Changing the register value from PLAIN64 (0xa) to 0x0 turned the all-zero frames into real images: the maximum pixel value was 255, the full colour-bar pattern appeared, and the violations stopped.

Sorry if not, but it seems like so much uses AI nowadays.

I submitted this article, as the author of the blog article is my close friend and we’re trying to build an open phone stack together. He clearly wrote that he used Opus for helping him write the driver. He also used LLM to help him write the article, but everything in the post is correct. The fact is that 1) the driver has been fixed and the camera is working (most important accomplishment) and 2) humans are able to help make drivers in a fraction of the time cost that it used to take. Both points are remarkable and deserve HackerNews top 1 position. Vote up please! :)
Before AI slop, I rarely saw humans make so many words bold and explicitly mention all affected filenames. On the latter point, humans try to convey the main ideas, while LLMs tend to enumerate the files they changed.

Since this post has a lot of terms in bold and enumerates filenames, yes, it seems at least ai-assisted.

I've been doing it all along. Formatted texts just look well from the point of perception — same for em dashes.
It is almost certainly AI-written. Very odd writing style, also the repo README is Claude-generated.
True, the article was written with LLM help. Although the most important takeaways are that 1) the camera driver for the FP6 has been fixed and 2) humans can help produce drivers in a fraction of the time cost thanks to LLM help. These are both remarkable enough to vote this article to first place on HackerNews :)
Has anyone had any luck in writing drivers using LLMs? It’s one of those areas of software that is very niche and no one wants to do it. And it’s also relatively testable
Drivers live at a nasty intersection of kernel land code, hardware-coupled code, poorly documented interfaces and undocumented interactions that have to be trialed-and-errored on real HW.

Modern LLMs kick ass, but they aren't magic.

Fully vibe coding a driver for things more complex than, perhaps, a well documented CMOS sensor (that's a small part of what's covered in the article) is still a no-no.

But an LLM does wonders at emitting boilerplate, "vibe checking" your implementations, suggesting how to implement certain things, helping debug some of the things, etc. You can get the LLM to do a lot, but you still need a lot of understanding, and a lot of applied handholding.

Yes this was done with Opus 4.8 and it was very effective. I ran a local harness on the phone itself so it could probe around and experiment. You do have to reboot into a newly compiled kernel occasionally if a module reload is not sufficient.

Obviously this work was mainly porting downstream code and information so the scope was fairly limited but the diagnostics it could do were very impressive.