Add touchscreen for msm8916-samsung-a5u
cover Add touchscreen for msm8916-samsung-a5u
This patch series enables the touchscreen
on the Samsung Galaxy A5 (2015) ("samsung-a5u").
Stephan Gerhold (4):
arm64: dts: qcom: msm8916: Add blsp_i2c1
arm64: dts: qcom: msm8916: Add blsp_i2c5
arm64: dts: qcom: msm8916-samsung-a2015: Add touchscreen regulator
arm64: dts: qcom: msm8916-samsung-a5u: Add touchscreen
arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 48 +++++++++++++++++++ .../qcom/msm8916-samsung-a2015-common.dtsi | 25 ++++++++++ .../boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 35 ++++++++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 30 ++++++++++++ 4 files changed, 138 insertions(+)
Signature · 1 line
2.26.2
PATCH 1/4 arm64: dts: qcom: msm8916: Add blsp_i2c1
MSM8916 has another I2C QUP controller that can be enabled on GPIO 2 and 3.
Add blsp_i2c1 to msm8916.dtsi and disable it by default.
---
On samsung-a2015 there is an external TFA9895 speaker amplifier connected to blsp_i2c1. There isn't a proper mainline driver for it (yet?), but it's nice to have the I2C bus in mainline at least.
--- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 24 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 15 ++++++++++++++ 2 files changed, 39 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +24 -0
@@ -262,6 +262,30 @@ pinconf { }; }; + i2c1_default: i2c1_default { + pinmux { + function = "blsp_i2c1"; + pins = "gpio2", "gpio3"; + }; + pinconf { + pins = "gpio2", "gpio3"; + drive-strength = <2>; + bias-disable; + }; + }; + + i2c1_sleep: i2c1_sleep { + pinmux { + function = "gpio"; + pins = "gpio2", "gpio3"; + }; + pinconf { + pins = "gpio2", "gpio3"; + drive-strength = <2>; + bias-disable; + }; + }; + i2c2_default: i2c2_default { pinmux { function = "blsp_i2c2";
arch/arm64/boot/dts/qcom/msm8916.dtsi +15 -0
@@ -612,6 +612,21 @@ blsp_spi6: spi@78ba000 { status = "disabled"; }; + blsp_i2c1: i2c@78b5000 { + compatible = "qcom,i2c-qup-v2.2.1"; + reg = <0x078b5000 0x500>; + interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gcc GCC_BLSP1_AHB_CLK>, + <&gcc GCC_BLSP1_QUP1_I2C_APPS_CLK>; + clock-names = "iface", "core"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c1_default>; + pinctrl-1 = <&i2c1_sleep>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + blsp_i2c2: i2c@78b6000 { compatible = "qcom,i2c-qup-v2.2.1"; reg = <0x078b6000 0x500>;
Signature · 1 line
2.26.2
Re: [PATCH 1/4] arm64: dts: qcom: msm8916: Add blsp_i2c1
Quoted 5 lines · Stephan Gerhold
MSM8916 has another I2C QUP controller that can be enabled on GPIO 2 and 3.
Add
blsp_i2c1tomsm8916.dtsiand disable it by default.
Regards,
Bjorn
Quoted 74 lines
Signed-off-by Stephan Gerhold <[email protected]>---
On samsung-a2015 there is an external TFA9895 speaker amplifier connected toblsp_i2c1. There isn't a proper mainline driver for it (yet?), but it's nice to have the I2C bus in mainline at least.--- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 24 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 15 ++++++++++++++ 2 files changed, 39 insertions(+)arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +24
-0@@ -262,6 +262,30 @@ pinconf { }; }; + i2c1_default: i2c1_default { + pinmux { + function = "blsp_i2c1"; + pins = "gpio2", "gpio3"; + }; + pinconf { + pins = "gpio2", "gpio3"; + drive-strength = <2>; + bias-disable; + }; + }; + + i2c1_sleep: i2c1_sleep { + pinmux { + function = "gpio"; + pins = "gpio2", "gpio3"; + }; + pinconf { + pins = "gpio2", "gpio3"; + drive-strength = <2>; + bias-disable; + }; + }; + i2c2_default: i2c2_default { pinmux { function = "blsp_i2c2";arch/arm64/boot/dts/qcom/msm8916.dtsi +15
-0@@ -612,6 +612,21 @@ blsp_spi6: spi@78ba000 { status = "disabled"; }; + blsp_i2c1: i2c@78b5000 { + compatible = "qcom,i2c-qup-v2.2.1"; + reg = <0x078b5000 0x500>; + interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gcc GCC_BLSP1_AHB_CLK>, + <&gcc GCC_BLSP1_QUP1_I2C_APPS_CLK>; + clock-names = "iface", "core"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c1_default>; + pinctrl-1 = <&i2c1_sleep>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + blsp_i2c2: i2c@78b6000 { compatible = "qcom,i2c-qup-v2.2.1"; reg = <0x078b6000 0x500>;Signature · 1 line
2.26.2
PATCH 2/4 arm64: dts: qcom: msm8916: Add blsp_i2c5
In reply to Stephan GerholdMSM8916 has another I2C QUP controller that can be enabled on GPIO 18 and 19.
Add blsp_i2c5 to msm8916.dtsi and disable it by default.
---
Most MSM8916 smartphones/tablets have a touchscreen connected to blsp_i2c5.
--- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 24 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 15 ++++++++++++++ 2 files changed, 39 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +24 -0
@@ -334,6 +334,30 @@ pinconf { }; }; + i2c5_default: i2c5_default { + pinmux { + function = "blsp_i2c5"; + pins = "gpio18", "gpio19"; + }; + pinconf { + pins = "gpio18", "gpio19"; + drive-strength = <2>; + bias-disable; + }; + }; + + i2c5_sleep: i2c5_sleep { + pinmux { + function = "gpio"; + pins = "gpio18", "gpio19"; + }; + pinconf { + pins = "gpio18", "gpio19"; + drive-strength = <2>; + bias-disable; + }; + }; + i2c6_default: i2c6_default { pinmux { function = "blsp_i2c6";
arch/arm64/boot/dts/qcom/msm8916.dtsi +15 -0
@@ -657,6 +657,21 @@ blsp_i2c4: i2c@78b8000 { status = "disabled"; }; + blsp_i2c5: i2c@78b9000 { + compatible = "qcom,i2c-qup-v2.2.1"; + reg = <0x078b9000 0x500>; + interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gcc GCC_BLSP1_AHB_CLK>, + <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>; + clock-names = "iface", "core"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c5_default>; + pinctrl-1 = <&i2c5_sleep>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + blsp_i2c6: i2c@78ba000 { compatible = "qcom,i2c-qup-v2.2.1"; reg = <0x078ba000 0x500>;
Signature · 1 line
2.26.2
Re: [PATCH 2/4] arm64: dts: qcom: msm8916: Add blsp_i2c5
Quoted 5 lines · Stephan Gerhold
MSM8916 has another I2C QUP controller that can be enabled on GPIO 18 and 19.
Add
blsp_i2c5tomsm8916.dtsiand disable it by default.
Quoted 73 lines
Signed-off-by Stephan Gerhold <[email protected]>---
Most MSM8916 smartphones/tablets have a touchscreen connected toblsp_i2c5.--- arch/arm64/boot/dts/qcom/msm8916-pins.dtsi | 24 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8916.dtsi | 15 ++++++++++++++ 2 files changed, 39 insertions(+)arch/arm64/boot/dts/qcom/msm8916-pins.dtsi +24
-0@@ -334,6 +334,30 @@ pinconf { }; }; + i2c5_default: i2c5_default { + pinmux { + function = "blsp_i2c5"; + pins = "gpio18", "gpio19"; + }; + pinconf { + pins = "gpio18", "gpio19"; + drive-strength = <2>; + bias-disable; + }; + }; + + i2c5_sleep: i2c5_sleep { + pinmux { + function = "gpio"; + pins = "gpio18", "gpio19"; + }; + pinconf { + pins = "gpio18", "gpio19"; + drive-strength = <2>; + bias-disable; + }; + }; + i2c6_default: i2c6_default { pinmux { function = "blsp_i2c6";arch/arm64/boot/dts/qcom/msm8916.dtsi +15
-0@@ -657,6 +657,21 @@ blsp_i2c4: i2c@78b8000 { status = "disabled"; }; + blsp_i2c5: i2c@78b9000 { + compatible = "qcom,i2c-qup-v2.2.1"; + reg = <0x078b9000 0x500>; + interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&gcc GCC_BLSP1_AHB_CLK>, + <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>; + clock-names = "iface", "core"; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&i2c5_default>; + pinctrl-1 = <&i2c5_sleep>; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + blsp_i2c6: i2c@78ba000 { compatible = "qcom,i2c-qup-v2.2.1"; reg = <0x078ba000 0x500>;Signature · 1 line
2.26.2
PATCH 3/4 arm64: dts: qcom: msm8916-samsung-a2015: Add touchscreen regulator
In reply to Stephan GerholdA3U and A5U both use an extra touchscreen LDO regulator that provides 3.3V for the touch screen controller.
Add it as fixed regulator to the common include.
--- .../qcom/msm8916-samsung-a2015-common.dtsi | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +25 -0
@@ -138,6 +138,19 @@ hall-sensor { }; }; + reg_vdd_tsp: regulator-vdd-tsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&tsp_en_default>; + }; + i2c-muic { compatible = "i2c-gpio"; sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
@@ -195,6 +208,18 @@ pinconf { bias-disable; }; }; + + tsp_en_default: tsp_en_default { + pinmux { + function = "gpio"; + pins = "gpio73"; + }; + pinconf { + pins = "gpio73"; + drive-strength = <2>; + bias-disable; + }; + }; }; &smd_rpm_regulators {
Signature · 1 line
2.26.2
Re: [PATCH 3/4] arm64: dts: qcom: msm8916-samsung-a2015: Add touchscreen regulator
Quoted 36 lines · Stephan Gerhold
A3U and A5U both use an extra touchscreen LDO regulator that provides 3.3V for the touch screen controller.
Add it as fixed regulator to the common include.
Cc Michael Srba <[email protected]>Signed-off-by Stephan Gerhold <[email protected]>--- .../qcom/msm8916-samsung-a2015-common.dtsi | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+)arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +13
-0@@ -138,6 +138,19 @@ hall-sensor { }; }; + reg_vdd_tsp: regulator-vdd-tsp { + compatible = "regulator-fixed"; + regulator-name = "vdd_tsp"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&msmgpio 73 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-names = "default"; + pinctrl-0 = <&tsp_en_default>; + }; + i2c-muic { compatible = "i2c-gpio"; sda-gpios = <&msmgpio 105 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi pinconf { · line 212
Quoted 5 lines
arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +2
-0@@ -195,6 +208,18 @@ pinconf { bias-disable; }; }; + + tsp_en_default: tsp_en_default {
Node names should not include '_', so this line should be
tsp_en_default: tsp-en-default {I fixed this up in both patch 3 and 4 and applied the series.
Thanks,
Bjorn
Quoted 16 lines
arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +10
-0+ pinmux { + function = "gpio"; + pins = "gpio73"; + }; + pinconf { + pins = "gpio73"; + drive-strength = <2>; + bias-disable; + }; + }; }; &smd_rpm_regulators {Signature · 1 line
2.26.2
PATCH 4/4 arm64: dts: qcom: msm8916-samsung-a5u: Add touchscreen
In reply to Stephan GerholdA5U uses a Melfas MMS345L touchscreen that is connected to blsp_i2c5. Add it to the device tree.
---
Note: For the touchscreen to work this patch depends on
https://lore.kernel.org/linux-input/[email protected]/
which was just applied to linux-next.
--- .../boot/dts/qcom/msm8916-samsung-a5u-eur.dts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+)
arch/arm64/boot/dts/qcom/msm8916-samsung-a5u-eur.dts +35 -0
@@ -9,8 +9,43 @@ / { compatible = "samsung,a5u-eur", "qcom,msm8916"; }; +&blsp_i2c5 { + status = "okay"; + + touchscreen@48 { + compatible = "melfas,mms345l"; + + reg = <0x48>; + interrupt-parent = <&msmgpio>; + interrupts = <13 IRQ_TYPE_EDGE_FALLING>; + + touchscreen-size-x = <720>; + touchscreen-size-y = <1280>; + + avdd-supply = <®_vdd_tsp>; + vdd-supply = <&pm8916_l6>; + + pinctrl-names = "default"; + pinctrl-0 = <&ts_int_default>; + }; +}; + &pronto { iris { compatible = "qcom,wcn3680"; }; }; + +&msmgpio { + ts_int_default: ts_int_default { + pinmux { + function = "gpio"; + pins = "gpio13"; + }; + pinconf { + pins = "gpio13"; + drive-strength = <2>; + bias-disable; + }; + }; +};
Signature · 1 line
2.26.2