User:Knuxify/Draft:Qualcomm/Adding a new SoC to mainline Linux: Difference between revisions

Knuxify (talk | contribs)
Knuxify (talk | contribs)
Line 35: Line 35:
In order to begin mainlining your SoC, you need to have the following bits of information:
In order to begin mainlining your SoC, you need to have the following bits of information:


* The '''downstream codename''' ("DTS nickname"?) of your SoC. If you're lucky, it's probably already somewhere out there online. You'll find it in the driver names on the device, as well as in the main compatible string of the devicetree. This will be useful when looking things up in the downstream kernel, as it primarily uses the codename.
* The '''codenames''' of the SoC. Qualcomm SoCs appear to have two codenames:
* The '''internal codename''' of your SoC. Around mid-2025, Qualcomm's mainline Linux engineers decided that instead of using the model name for SoC drivers, they should use the codename instead... except the codename in the downstream code isn't always the same as the ''actual'' SoC codename.
** ''"DTS nickname"'' (board name?). You'll find it in the driver names on the device, as well as in the main compatible string of the devicetree. This is what's used across most of the downstream kernel.
** Sometimes the downstream codename matches with the internal name (as might be the case for "waipio" given it's mentioned alongside the others in [https://mysupport.qualcomm.com/supportforums/s/question/0D54V00007gUfXASA0/whats-the-difference-of-v69-and-v73 this random Qualcomm support forums post]), other times it's different (SM7435 uses "parrot" in the kernel but is actually called "netrani"<ref>https://lore.kernel.org/lkml/[email protected]/</ref>, SM7635 uses "volcano" in downstream but is actually called "milos").
** ''Platform codename(?)''. Presumably shared between multiple SoCs from the same family.
** ''Mere mortals'' shall not know these codenames... but you can probably ask your friendly neighborhood sympathizer of the mainline cause<ref>https://lore.kernel.org/lkml/888a7598-38d9-4640-9823-2b073da006f4@kernel.org/</ref>.
** Since SM7635 ("Volcano"/"Milos"), Qualcomm has changed their policy around driver/compatible naming in mainline and now expects developers to use the platform codename instead<ref>https://lore.kernel.org/lkml/[email protected]/</ref>. If you're unsure of the platform codename for your device, you can send the Qualcomm folks an email and ask them directly<ref>I ended up getting [https://lore.kernel.org/lkml/c379aad4-96f6-4134-8b90-0f1eec8001a3@oss.qualcomm.com/ a public reply to my query for SM7435].</ref>, or just use the model name for now and let them correct you (as was done in the Milos case).
* A copy of the '''downstream kernel'''; preferably the one for your device, but you can also use the kernel from another device with the same SoC, or - as a last resort - any kernel with the relevant SoC drivers (hint: search by downstream codename).
* A copy of the '''downstream kernel'''; preferably the one for your device, but you can also use the kernel from another device with the same SoC, or - as a last resort - any kernel with the relevant SoC drivers (hint: search by downstream codename).
* A copy of the '''<code>qcom_proprietary_devicetree</code>''' or similar repo with the DTSI source files (because they're not in the kernel repo for whatever reason...). Search for <code>(downstream codename).dtsi</code> on GitHub and you'll find the right repository eventually.
* A copy of the '''<code>qcom_proprietary_devicetree</code>''' or similar repo with the DTSI source files (because they're not in the kernel repo for whatever reason...). Search for <code>(downstream codename).dtsi</code> on GitHub and you'll find the right repository eventually.