From cfb7fd9ece5036d16d119e4b21ca64b94142fc63 Mon Sep 17 00:00:00 2001 From: thefiqs <26687854+thefiqs@users.noreply.github.com> Date: Mon, 24 Aug 2026 09:46:34 +0100 Subject: [PATCH] kernel: fix AW99706 DT property lookups Signed-off-by: thefiqs <26687854+thefiqs@users.noreply.github.com> --- kernel/PATCHES.md | 3 ++ ...w99706-use-dt-binding-property-names.patch | 52 +++++++++++++++++++ kernel/patches/series | 1 + 3 files changed, 56 insertions(+) create mode 100644 kernel/patches/0065-backlight-aw99706-use-dt-binding-property-names.patch diff --git a/kernel/PATCHES.md b/kernel/PATCHES.md index ddd0477..5e43e7e 100644 --- a/kernel/PATCHES.md +++ b/kernel/PATCHES.md @@ -90,6 +90,9 @@ no equivalent submission was found, or a permanent URL to the upstream submissio - `patches/0062-backlight-aw99706-honor-blank-power-state.patch` source: https://github.com/ROCKNIX/distribution/blob/bcf3b5bc574990b96543484575b06f912153a715/projects/ROCKNIX/devices/SM8750/patches/linux/0062-backlight-aw99706-honor-blank-power-state.patch upstream: unknown +- `patches/0065-backlight-aw99706-use-dt-binding-property-names.patch` + source: https://github.com/mrdidit/distribution/blob/b14788a72b7399f03aad2cdcced2e3b91ae15810/projects/ROCKNIX/devices/SM8750/patches/linux/0065-backlight-aw99706-use-dt-binding-property-names.patch + upstream: unknown - `patches/0015-touchscreen-edt-ft5x06-allow-to-override-input-name.patch` source: https://github.com/ROCKNIX/distribution/blob/bcf3b5bc574990b96543484575b06f912153a715/projects/ROCKNIX/devices/SM8250/patches/linux/0015-touchscreen-edt-ft5x06-allow-to-override-input-name.patch upstream: https://lore.kernel.org/r/20260409-ft5x06-label-v1-1-21e8a9ae9a60@gmail.com diff --git a/kernel/patches/0065-backlight-aw99706-use-dt-binding-property-names.patch b/kernel/patches/0065-backlight-aw99706-use-dt-binding-property-names.patch new file mode 100644 index 0000000..05ae683 --- /dev/null +++ b/kernel/patches/0065-backlight-aw99706-use-dt-binding-property-names.patch @@ -0,0 +1,52 @@ +From: mrdidit <26687854+mrdidit@users.noreply.github.com> +Date: Wed, 12 Aug 2026 00:00:00 +0000 +Subject: [PATCH] backlight: aw99706: use documented DT property names + +The binding names the frequency, current and voltage properties with unit +suffixes, but the driver looked up shorter names. As a result, valid DT +values were silently ignored and the defaults were used. + +This is particularly harmful on the KONKR Pocket Fit Elite: its DT limits +ILED_MAX to 7000 uA, while the ignored property makes the driver select its +20000 uA default (CFG2 0x1e instead of 0x04), overheating the display area. + +Make the driver lookups match the binding and existing DTS users. +Signed-off-by: mrdidit <26687854+mrdidit@users.noreply.github.com> +--- + drivers/video/backlight/aw99706.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/drivers/video/backlight/aw99706.c b/drivers/video/backlight/aw99706.c +index 938f352..5340c2d 100644 +--- a/drivers/video/backlight/aw99706.c ++++ b/drivers/video/backlight/aw99706.c +@@ -130,23 +130,23 @@ static const struct aw99706_dt_prop aw99706_dt_props[] = { + AW99706_CFG0_REG, AW99706_DIM_MODE_MASK, 1, + }, + { +- "awinic,sw-freq", aw99706_dt_property_lookup, ++ "awinic,sw-freq-hz", aw99706_dt_property_lookup, + aw99706_sw_freq_tbl, ARRAY_SIZE(aw99706_sw_freq_tbl), + AW99706_CFG1_REG, AW99706_SW_FREQ_MASK, 750000, + }, + { +- "awinic,sw-ilmt", aw99706_dt_property_lookup, ++ "awinic,sw-ilmt-microamp", aw99706_dt_property_lookup, + aw99706_sw_ilmt_tbl, ARRAY_SIZE(aw99706_sw_ilmt_tbl), + AW99706_CFG1_REG, AW99706_SW_ILMT_MASK, 3000000, + }, + { +- "awinic,iled-max", aw99706_dt_property_iled_max_convert, ++ "awinic,iled-max-microamp", aw99706_dt_property_iled_max_convert, + NULL, 0, + AW99706_CFG2_REG, AW99706_ILED_MAX_MASK, 20000, + + }, + { +- "awinic,uvlo-thres", aw99706_dt_property_lookup, ++ "awinic,uvlo-thres-microvolt", aw99706_dt_property_lookup, + aw99706_ulvo_thres_tbl, ARRAY_SIZE(aw99706_ulvo_thres_tbl), + AW99706_CFG2_REG, AW99706_UVLOSEL_MASK, 2200000, + }, +-- +2.51.0 diff --git a/kernel/patches/series b/kernel/patches/series index 08193df..5cf969c 100644 --- a/kernel/patches/series +++ b/kernel/patches/series @@ -27,6 +27,7 @@ 0056-backlight-aw99706-enable-hwen-before-chip-id-read.patch 0057-backlight-aw99706-konkr-cfg7.patch 0062-backlight-aw99706-honor-blank-power-state.patch +0065-backlight-aw99706-use-dt-binding-property-names.patch # ============== Touchscreen ============== 0015-touchscreen-edt-ft5x06-allow-to-override-input-name.patch