* [PATCH 0/3] Add Himax HX83112A support for Fairphone 4 touchscreen
@ 2026-08-21 7:12 Luca Weiss
2026-08-21 7:12 ` [PATCH 1/3] dt-bindings: touchscreen: trivial-touch: Add Himax HX83112A Luca Weiss
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Luca Weiss @ 2026-08-21 7:12 UTC (permalink / raw)
To: Job Noorman, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Frank Li, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, linux-input, devicetree,
linux-kernel, linux-arm-msm, Luca Weiss
Add bindings, driver modifications and dts additions to support the
touchscreen on the Fairphone 4.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Luca Weiss (3):
dt-bindings: touchscreen: trivial-touch: Add Himax HX83112A
Input: himax_hx83112b - Add HX83112A support
arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen
.../bindings/input/touchscreen/trivial-touch.yaml | 2 +
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 21 +++++++++-
drivers/input/touchscreen/himax_hx83112b.c | 46 ++++++++++++++++++++++
3 files changed, 68 insertions(+), 1 deletion(-)
---
base-commit: 237a1c39e8dfd3e1c6f1f023eea37a48ec04cc63
change-id: 20260820-fp4-hx83112a-b3e14819ae14
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] dt-bindings: touchscreen: trivial-touch: Add Himax HX83112A
2026-08-21 7:12 [PATCH 0/3] Add Himax HX83112A support for Fairphone 4 touchscreen Luca Weiss
@ 2026-08-21 7:12 ` Luca Weiss
2026-08-21 7:12 ` [PATCH 2/3] Input: himax_hx83112b - Add HX83112A support Luca Weiss
2026-08-21 7:12 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen Luca Weiss
2 siblings, 0 replies; 7+ messages in thread
From: Luca Weiss @ 2026-08-21 7:12 UTC (permalink / raw)
To: Job Noorman, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Frank Li, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, linux-input, devicetree,
linux-kernel, linux-arm-msm, Luca Weiss
Describe the compatible for the Himax HX83112A touchscreen controller,
which doesn't need any special resources not described in the
trivial-touch bindings.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml b/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml
index 6316a8d32f39..a4b535bdbd6c 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml
+++ b/Documentation/devicetree/bindings/input/touchscreen/trivial-touch.yaml
@@ -18,6 +18,8 @@ properties:
- azoteq,iqs525
# Himax hx83100a touchscreen controller
- himax,hx83100a
+ # Himax hx83112a touchscreen controller
+ - himax,hx83112a
# Himax hx83112b touchscreen controller
- himax,hx83112b
# Hynitron cstxxx series touchscreen controller
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] Input: himax_hx83112b - Add HX83112A support
2026-08-21 7:12 [PATCH 0/3] Add Himax HX83112A support for Fairphone 4 touchscreen Luca Weiss
2026-08-21 7:12 ` [PATCH 1/3] dt-bindings: touchscreen: trivial-touch: Add Himax HX83112A Luca Weiss
@ 2026-08-21 7:12 ` Luca Weiss
2026-08-21 7:12 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen Luca Weiss
2 siblings, 0 replies; 7+ messages in thread
From: Luca Weiss @ 2026-08-21 7:12 UTC (permalink / raw)
To: Job Noorman, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Frank Li, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, linux-input, devicetree,
linux-kernel, linux-arm-msm, Luca Weiss
The HX83112A touch controller works nearly identical to other supported
chips, we just need a small dance before we can start using the
touchscreen.
For that a new 'init' callback is introduced to facilitate that.
Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/input/touchscreen/himax_hx83112b.c | 46 ++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/drivers/input/touchscreen/himax_hx83112b.c b/drivers/input/touchscreen/himax_hx83112b.c
index 0aa67dfacbad..cc8b904d88e6 100644
--- a/drivers/input/touchscreen/himax_hx83112b.c
+++ b/drivers/input/touchscreen/himax_hx83112b.c
@@ -62,6 +62,7 @@ struct himax_ts_data;
struct himax_chip {
u32 id;
int (*check_id)(struct himax_ts_data *ts);
+ int (*init)(struct himax_ts_data *ts);
int (*read_events)(struct himax_ts_data *ts, struct himax_event *event,
size_t length);
};
@@ -364,6 +365,12 @@ static int himax_probe(struct i2c_client *client)
return error;
}
+ if (ts->chip->init) {
+ error = ts->chip->init(ts);
+ if (error)
+ return error;
+ }
+
error = himax_input_register(ts);
if (error)
return error;
@@ -395,10 +402,47 @@ static int himax_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(himax_pm_ops, himax_suspend, himax_resume);
+static int hx83112a_init(struct himax_ts_data *ts)
+{
+ int error;
+ u32 buf[2];
+
+ /*
+ * By default, the chip boots into safe mode. We clear the FW ISR
+ * register and perform a second hardware reset to boot normally.
+ */
+ buf[0] = 0x9000005c;
+ buf[1] = 0x00000000;
+ error = regmap_bulk_write(ts->regmap, HIMAX_AHB_ADDR_BYTE_0, buf, 2);
+ if (error)
+ return error;
+
+ himax_reset(ts);
+
+ /* Give the MCU time to reload firmware */
+ msleep(100);
+
+ /* Enable the touch algorithm */
+ buf[0] = 0x1000748c;
+ buf[1] = 0xa55aa55a;
+ error = regmap_bulk_write(ts->regmap, HIMAX_AHB_ADDR_BYTE_0, buf, 2);
+ if (error)
+ return error;
+
+ return 0;
+}
+
static const struct himax_chip hx83100a_chip = {
.read_events = hx83100a_read_events,
};
+static const struct himax_chip hx83112a_chip = {
+ .id = 0x83112a,
+ .check_id = himax_check_product_id,
+ .init = hx83112a_init,
+ .read_events = himax_read_events,
+};
+
static const struct himax_chip hx83112b_chip = {
.id = 0x83112b,
.check_id = himax_check_product_id,
@@ -407,6 +451,7 @@ static const struct himax_chip hx83112b_chip = {
static const struct i2c_device_id himax_ts_id[] = {
{ .name = "hx83100a", .driver_data = (kernel_ulong_t)&hx83100a_chip },
+ { .name = "hx83112a", .driver_data = (kernel_ulong_t)&hx83112a_chip },
{ .name = "hx83112b", .driver_data = (kernel_ulong_t)&hx83112b_chip },
{ /* sentinel */ }
};
@@ -415,6 +460,7 @@ MODULE_DEVICE_TABLE(i2c, himax_ts_id);
#ifdef CONFIG_OF
static const struct of_device_id himax_of_match[] = {
{ .compatible = "himax,hx83100a", .data = &hx83100a_chip },
+ { .compatible = "himax,hx83112a", .data = &hx83112a_chip },
{ .compatible = "himax,hx83112b", .data = &hx83112b_chip },
{ /* sentinel */ }
};
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen
2026-08-21 7:12 [PATCH 0/3] Add Himax HX83112A support for Fairphone 4 touchscreen Luca Weiss
2026-08-21 7:12 ` [PATCH 1/3] dt-bindings: touchscreen: trivial-touch: Add Himax HX83112A Luca Weiss
2026-08-21 7:12 ` [PATCH 2/3] Input: himax_hx83112b - Add HX83112A support Luca Weiss
@ 2026-08-21 7:12 ` Luca Weiss
2026-08-21 12:16 ` Abel Vesa
` (2 more replies)
2 siblings, 3 replies; 7+ messages in thread
From: Luca Weiss @ 2026-08-21 7:12 UTC (permalink / raw)
To: Job Noorman, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Frank Li, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, linux-input, devicetree,
linux-kernel, linux-arm-msm, Luca Weiss
Add a node and pinctrl for the Himax HX83112A touchscreen found on this
phone.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
index 23f950067a08..ff609f7e1796 100644
--- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
+++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
@@ -626,7 +626,19 @@ &i2c8 {
clock-frequency = <400000>;
status = "okay";
- /* HX83112A touchscreen @ 48 */
+ touchscreen@48 {
+ compatible = "himax,hx83112a";
+ reg = <0x48>;
+
+ interrupts-extended = <&tlmm 22 IRQ_TYPE_EDGE_FALLING>;
+ reset-gpios = <&tlmm 21 GPIO_ACTIVE_LOW>;
+
+ touchscreen-size-x = <1080>;
+ touchscreen-size-y = <2340>;
+
+ pinctrl-0 = <&touchscreen_default>;
+ pinctrl-names = "default";
+ };
};
&i2c10 {
@@ -1117,6 +1129,13 @@ platform {
&tlmm {
gpio-reserved-ranges = <13 4>, <56 2>;
+ touchscreen_default: touchscreen-default-state {
+ pins = "gpio21", "gpio22";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
qup_uart1_sleep_cts: qup-uart1-sleep-cts-state {
pins = "gpio61";
function = "gpio";
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen
2026-08-21 7:12 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen Luca Weiss
@ 2026-08-21 12:16 ` Abel Vesa
2026-08-21 12:41 ` David Heidelberg
2026-08-24 6:49 ` Konrad Dybcio
2 siblings, 0 replies; 7+ messages in thread
From: Abel Vesa @ 2026-08-21 12:16 UTC (permalink / raw)
To: Luca Weiss
Cc: Job Noorman, Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Frank Li, Bjorn Andersson, Konrad Dybcio,
~postmarketos/upstreaming, phone-devel, linux-input, devicetree,
linux-kernel, linux-arm-msm
On 26-08-21 09:12:20, Luca Weiss wrote:
> Add a node and pinctrl for the Himax HX83112A touchscreen found on this
> phone.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen
2026-08-21 7:12 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen Luca Weiss
2026-08-21 12:16 ` Abel Vesa
@ 2026-08-21 12:41 ` David Heidelberg
2026-08-24 6:49 ` Konrad Dybcio
2 siblings, 0 replies; 7+ messages in thread
From: David Heidelberg @ 2026-08-21 12:41 UTC (permalink / raw)
To: Luca Weiss, Job Noorman, Dmitry Torokhov, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Bjorn Andersson,
Konrad Dybcio
Cc: phone-devel, linux-input, devicetree, linux-kernel, linux-arm-msm
On 21/08/2026 09:12, Luca Weiss wrote:
> Add a node and pinctrl for the Himax HX83112A touchscreen found on this
> phone.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> index 23f950067a08..ff609f7e1796 100644
> --- a/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> +++ b/arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts
> @@ -626,7 +626,19 @@ &i2c8 {
> clock-frequency = <400000>;
> status = "okay";
>
> - /* HX83112A touchscreen @ 48 */
> + touchscreen@48 {
> + compatible = "himax,hx83112a";
> + reg = <0x48>;
> +
> + interrupts-extended = <&tlmm 22 IRQ_TYPE_EDGE_FALLING>;
> + reset-gpios = <&tlmm 21 GPIO_ACTIVE_LOW>;
> +
> + touchscreen-size-x = <1080>;
> + touchscreen-size-y = <2340>;
> +
> + pinctrl-0 = <&touchscreen_default>;
> + pinctrl-names = "default";
> + };
> };
>
> &i2c10 {
> @@ -1117,6 +1129,13 @@ platform {
> &tlmm {
> gpio-reserved-ranges = <13 4>, <56 2>;
>
> + touchscreen_default: touchscreen-default-state {
> + pins = "gpio21", "gpio22";
I guess you could use here irq-pins {}, reset-pins {},
but with or without change,
Reviewed-by: David Heidelberg <david@ixit.cz>
> + function = "gpio";
> + drive-strength = <8>;
> + bias-pull-up;
> + };
> +
> qup_uart1_sleep_cts: qup-uart1-sleep-cts-state {
> pins = "gpio61";
> function = "gpio";
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen
2026-08-21 7:12 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen Luca Weiss
2026-08-21 12:16 ` Abel Vesa
2026-08-21 12:41 ` David Heidelberg
@ 2026-08-24 6:49 ` Konrad Dybcio
2 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2026-08-24 6:49 UTC (permalink / raw)
To: Luca Weiss, Job Noorman, Dmitry Torokhov, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Bjorn Andersson,
Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, linux-input, devicetree,
linux-kernel, linux-arm-msm
On 8/21/26 9:12 AM, Luca Weiss wrote:
> Add a node and pinctrl for the Himax HX83112A touchscreen found on this
> phone.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-08-24 6:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-21 7:12 [PATCH 0/3] Add Himax HX83112A support for Fairphone 4 touchscreen Luca Weiss
2026-08-21 7:12 ` [PATCH 1/3] dt-bindings: touchscreen: trivial-touch: Add Himax HX83112A Luca Weiss
2026-08-21 7:12 ` [PATCH 2/3] Input: himax_hx83112b - Add HX83112A support Luca Weiss
2026-08-21 7:12 ` [PATCH 3/3] arm64: dts: qcom: sm7225-fairphone-fp4: Enable touchscreen Luca Weiss
2026-08-21 12:16 ` Abel Vesa
2026-08-21 12:41 ` David Heidelberg
2026-08-24 6:49 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox