Publish Platina Linux source base for Xiaomi Mi 8 Lite
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 616 KiB |
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"generator": "built-in image_gen.imagegen",
|
||||
"date": "2026-10-22",
|
||||
"asset": "platina-linux-logo.png",
|
||||
"sha256": "84e7559014037e14f0952a7c928e3a08876220b65024323cfc41713fab1a7493",
|
||||
"version_is_separate": true
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Bounded Platina LCD diagnostics, without detaching or replacing DRM. */
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <drm/drm_mipi_dsi.h>
|
||||
|
||||
static bool wake;
|
||||
static bool enable_iovcc;
|
||||
static bool own_enable;
|
||||
static struct regulator *iovcc;
|
||||
module_param(wake, bool, 0400);
|
||||
module_param(enable_iovcc, bool, 0400);
|
||||
MODULE_PARM_DESC(wake, "Send standard DCS sleep-out/display-on after reading status");
|
||||
static int read_result, wake_result;
|
||||
static int io_enabled;
|
||||
static unsigned char power_before, power_after;
|
||||
module_param(read_result, int, 0444);
|
||||
module_param(io_enabled, int, 0444);
|
||||
module_param(wake_result, int, 0444);
|
||||
module_param(power_before, byte, 0444);
|
||||
module_param(power_after, byte, 0444);
|
||||
|
||||
static int __init platina_panel_dcs_init(void)
|
||||
{
|
||||
struct device_node *node;
|
||||
struct mipi_dsi_device *dsi;
|
||||
unsigned long flags;
|
||||
|
||||
if (!of_machine_is_compatible("xiaomi,platina"))
|
||||
return -ENODEV;
|
||||
node = of_find_node_by_path("/soc@0/display-subsystem@c900000/dsi@c994000/panel@0");
|
||||
if (!node)
|
||||
return -ENODEV;
|
||||
dsi = of_find_mipi_dsi_device_by_node(node);
|
||||
of_node_put(node);
|
||||
if (!dsi)
|
||||
return -ENODEV;
|
||||
iovcc = regulator_get_optional(&dsi->dev, "iovcc");
|
||||
if (IS_ERR(iovcc)) {
|
||||
io_enabled = PTR_ERR(iovcc);
|
||||
iovcc = NULL;
|
||||
read_result = -EHOSTDOWN;
|
||||
goto done;
|
||||
}
|
||||
io_enabled = regulator_is_enabled(iovcc);
|
||||
if (!io_enabled && enable_iovcc) {
|
||||
wake_result = regulator_enable(iovcc);
|
||||
if (!wake_result) {
|
||||
own_enable = true;
|
||||
io_enabled = regulator_is_enabled(iovcc);
|
||||
}
|
||||
}
|
||||
if (io_enabled <= 0) {
|
||||
read_result = -EHOSTDOWN;
|
||||
goto done;
|
||||
}
|
||||
|
||||
flags = dsi->mode_flags;
|
||||
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
|
||||
read_result = mipi_dsi_dcs_read(dsi, 0x0a, &power_before, 1);
|
||||
if (wake && read_result == 1) {
|
||||
wake_result = mipi_dsi_dcs_exit_sleep_mode(dsi);
|
||||
if (!wake_result) {
|
||||
msleep(120);
|
||||
wake_result = mipi_dsi_dcs_set_display_on(dsi);
|
||||
msleep(20);
|
||||
}
|
||||
if (!wake_result)
|
||||
read_result = mipi_dsi_dcs_read(dsi, 0x0a, &power_after, 1);
|
||||
}
|
||||
dsi->mode_flags = flags;
|
||||
done:
|
||||
put_device(&dsi->dev);
|
||||
pr_info("platina-panel-dcs: iovcc=%d read=%d power_before=0x%02x power_after=0x%02x wake=%d\n",
|
||||
io_enabled, read_result, power_before, power_after, wake_result);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit platina_panel_dcs_exit(void)
|
||||
{
|
||||
if (own_enable)
|
||||
regulator_disable(iovcc);
|
||||
if (iovcc)
|
||||
regulator_put(iovcc);
|
||||
}
|
||||
module_init(platina_panel_dcs_init);
|
||||
module_exit(platina_panel_dcs_exit);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Platina read-only DCS status and optional standard LCD wake test");
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"source_url": "https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/0bb2780bccb9c7e05f0edf5db8860e779179b5f9/arch/arm/boot/dts/qcom/dsi-panel-tianma-fhd-nt36672a-video.dtsi",
|
||||
"source_sha256": "8b8314421455305d4750366a327f09278729c6fe17889cc1348dcbfc967238fd",
|
||||
"stock_boot_sha256": "8ef6f1d9b937eb8aa571957f69629a6d7be40eef412f585647f29b9ddf243d86",
|
||||
"stock_fdt_offset": 19640617,
|
||||
"stock_fdt_sha256": "549885ab06856cd63c4717b85f77bf08eab1544f6898924a158905ebd273a9ad",
|
||||
"on_command_hex": "15010000000002ff2215000000000002fb01150000000000020040150000000000020140150000000000020240150000000000020340150000000000020440150000000000020540150000000000020640150000000000020740150000000000020840150000000000020940150000000000020a40150000000000020b40150000000000020c40150000000000020d40150000000000020e40150100000000020f4015000000000002104015000000000002115015000000000002126015000000000002137015000000000002145815000000000002156815000000000002167815000000000002177715000000000002183e150000000000021936150000000000021a30150000000000021b28150000000000021c25150000000000021d23150000000000021e26150100000000021f2a15000000000002203015000000000002213615000000000002223c1500000000000223401500000000000224401500000000000225401500000000000226401500000000000227401500000000000228401500000000000253011500000000000254011500000000000255ff1500000000000256761500000000000258c81500000000000259ca150000000000025a48150000000000025b48150000000000025c48150000000000025d48150000000000025e48150100000000025f48150000000000026048150000000000026148150000000000026248150000000000026348150000000000026448150000000000026548150000000000026648150000000000026748150000000000026848150000000000026948150000000000026a48150000000000026b48150000000000026c48150000000000026d48150000000000026e48150100000000026fc815000000000002700315000000000002710015000000000002728015000000000002730015000000000002740615000000000002750c15000000000002760315000000000002770915000000000002780f150000000000027968150000000000027a8b150000000000027c80150000000000027d80150000000000027e80150100000000027f00150000000000028000150000000000028100150000000000028301150000000000028400150000000000028580150000000000028680150000000000028780150000000000028840150000000000028983150000000000028a8615000000000002b77615010000000002b87615010000000002ff2315000000000002fb0115000000000002006015000000000002070015000000000002080115010000000002090015000000000002110115000000000002128015000000000002156d15010000000002160b15000000000002290a1500000000000230ff1500000000000231ff1500000000000232ff1500000000000233ff1500000000000234ff1500000000000235ff1500000000000236ff1500000000000237ff1500000000000238fc1500000000000239f9150000000000023af5150000000000023bf1150000000000023dee150000000000023feb1500000000000240e91501000000000241e5150000000000022a131500000000000245ff1500000000000246f51500000000000247ea1500000000000248df1500000000000249d5150000000000024aca150000000000024bc0150000000000024cb6150000000000024dac150000000000024ea2150000000000024f9815000000000002508e15000000000002518415000000000002527a150000000000025370150100000000025466150000000000022b0e1500000000000258ff1500000000000259ff150000000000025aff150000000000025bff150000000000025cff150000000000025dff150000000000025eff150000000000025fff1500000000000260f61500000000000261ec1500000000000262e31500000000000263d91500000000000264d01500000000000265c71500000000000266bd1501000000000267b315000000000002018415010000000002060115000000000002052d15000000000002040515010000000002ff2515000000000002fb0115010000000002050415010000000002ff1015000000000002fb01150000000000023500290000000000035107ff15000000000002532415010000000002550005010000000002290005010000460002110015010000000002ff2415000000000002fb0115000000000002c30115000000000002c45415010000000002c28e15010000000002ff10",
|
||||
"off_command_hex": "15010000000002ff2415000000000002fb0115010000000002c30015010000000002ff10050100000000022800050100003c00021000"
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"name": "Platina Linux",
|
||||
"version": "0.1.1",
|
||||
"channel": "development",
|
||||
"released": "2026-10-22"
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"repositories": {
|
||||
"pmbootstrap": {
|
||||
"url": "https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git",
|
||||
"commit": "7d23010a125ca7386fec4e390d14128b6c24d266",
|
||||
"path": "tools/pmbootstrap"
|
||||
},
|
||||
"pmaports": {
|
||||
"url": "https://gitlab.postmarketos.org/postmarketOS/pmaports.git",
|
||||
"commit": "1c36715c14a2712bf3746a26dccb0ba5e93a0b2a",
|
||||
"channels_commit": "02b84c93abb1d510de752ebb2143d83fc55f68cd"
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"candidate": {
|
||||
"ports": "ports/candidate",
|
||||
"kernel": "7.2.12",
|
||||
"kernel_package": "7.2.12-r1",
|
||||
"device_package": "5-r31",
|
||||
"firmware_package": "2-r5"
|
||||
}
|
||||
},
|
||||
"local_firmware": [
|
||||
"a512_zap.elf",
|
||||
"firmware-xiaomi-platina-bdwlan.tar.gz",
|
||||
"firmware-xiaomi-platina-modem.tar.gz"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user