* [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus
@ 2022-09-13 13:28 Linus Walleij
2022-09-13 13:28 ` [PATCH 2/3] ARM: dts: qcom-msm8660: Add GSBI3 I2C bus Linus Walleij
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Linus Walleij @ 2022-09-13 13:28 UTC (permalink / raw)
To: linux-arm-msm, Andy Gross, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-kernel, Herman van Hazendonk, Linus Walleij
GSBI1 can be used to enable an external SPI bus on e.g. the
APQ8060. On the DragonBoard APQ8060 this SPI bus is used to
talk to the LCD display.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arm/boot/dts/qcom-msm8660.dtsi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index 63a501c63cf8..5640c02db852 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -131,6 +131,31 @@ gcc: clock-controller@900000 {
reg = <0x900000 0x4000>;
};
+ gsbi1: gsbi@16000000 {
+ compatible = "qcom,gsbi-v1.0.0";
+ cell-index = <12>;
+ reg = <0x16000000 0x100>;
+ clocks = <&gcc GSBI1_H_CLK>;
+ clock-names = "iface";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+ status = "disabled";
+
+ syscon-tcsr = <&tcsr>;
+
+ gsbi1_spi: spi@16080000 {
+ compatible = "qcom,spi-qup-v1.1.1";
+ reg = <0x16080000 0x1000>;
+ interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GSBI1_QUP_CLK>, <&gcc GSBI1_H_CLK>;
+ clock-names = "core", "iface";
+ status = "disabled";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ };
+ };
+
gsbi6: gsbi@16500000 {
compatible = "qcom,gsbi-v1.0.0";
cell-index = <12>;
--
2.37.3
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ARM: dts: qcom-msm8660: Add GSBI3 I2C bus
2022-09-13 13:28 [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Linus Walleij
@ 2022-09-13 13:28 ` Linus Walleij
2022-09-13 13:28 ` [PATCH 3/3] ARM: dts: qcom: Add TMA340 to APQ8060 DragonBoard Linus Walleij
2022-09-13 15:17 ` (subset) [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Bjorn Andersson
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2022-09-13 13:28 UTC (permalink / raw)
To: linux-arm-msm, Andy Gross, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-kernel, Herman van Hazendonk, Linus Walleij
GSBI3 can be used to enable an external I2C bus on e.g. the
APQ8060. On the DragonBoard APQ8060 this I2C bus is used to
talk to the Cypress CY8CTMA340 CYTTSP touchscreen.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arm/boot/dts/qcom-msm8660.dtsi | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/arch/arm/boot/dts/qcom-msm8660.dtsi b/arch/arm/boot/dts/qcom-msm8660.dtsi
index 5640c02db852..f3131bee752e 100644
--- a/arch/arm/boot/dts/qcom-msm8660.dtsi
+++ b/arch/arm/boot/dts/qcom-msm8660.dtsi
@@ -156,6 +156,31 @@ gsbi1_spi: spi@16080000 {
};
};
+ gsbi3: gsbi@16200000 {
+ compatible = "qcom,gsbi-v1.0.0";
+ cell-index = <12>;
+ reg = <0x16200000 0x100>;
+ clocks = <&gcc GSBI3_H_CLK>;
+ clock-names = "iface";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ syscon-tcsr = <&tcsr>;
+ status = "disabled";
+
+ gsbi3_i2c: i2c@16280000 {
+ compatible = "qcom,i2c-qup-v1.1.1";
+ reg = <0x16280000 0x1000>;
+ interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&gcc GSBI3_QUP_CLK>, <&gcc GSBI3_H_CLK>;
+ clock-names = "core", "iface";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "disabled";
+ };
+ };
+
gsbi6: gsbi@16500000 {
compatible = "qcom,gsbi-v1.0.0";
cell-index = <12>;
--
2.37.3
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ARM: dts: qcom: Add TMA340 to APQ8060 DragonBoard
2022-09-13 13:28 [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Linus Walleij
2022-09-13 13:28 ` [PATCH 2/3] ARM: dts: qcom-msm8660: Add GSBI3 I2C bus Linus Walleij
@ 2022-09-13 13:28 ` Linus Walleij
2022-09-13 15:17 ` (subset) [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Bjorn Andersson
2 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2022-09-13 13:28 UTC (permalink / raw)
To: linux-arm-msm, Andy Gross, Bjorn Andersson, Konrad Dybcio
Cc: linux-arm-kernel, Herman van Hazendonk, Linus Walleij
This adds the CY8CTMA340 Touchscreen to the APQ8060 DragonBoard.
Tested without display by issuing cat /dev/input/input/event3
which produces appropriate noise and interrupts on the dedicated
GPIO line.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
.../arm/boot/dts/qcom-apq8060-dragonboard.dts | 71 ++++++++++++++++++-
1 file changed, 70 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
index 70a1dd629c7a..b07a0ba9e734 100644
--- a/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
+++ b/arch/arm/boot/dts/qcom-apq8060-dragonboard.dts
@@ -159,6 +159,19 @@ data {
};
};
+ dragon_gsbi3_i2c_pins: gsbi3_i2c {
+ mux {
+ pins = "gpio43", "gpio44";
+ function = "gsbi3";
+ };
+ pinconf {
+ pins = "gpio43", "gpio44";
+ drive-strength = <8>;
+ /* These have external pull-up 2.2kOhm to 1.8V */
+ bias-disable;
+ };
+ };
+
dragon_gsbi8_i2c_pins: gsbi8_i2c {
mux {
pins = "gpio64", "gpio65";
@@ -240,6 +253,22 @@ irq {
bias-pull-up;
};
};
+
+ dragon_tma340_gpios: tma340 {
+ reset {
+ /* RESET line, TS_ATTN, WAKE_CTP */
+ pins = "gpio58";
+ function = "gpio";
+ drive-strength = <6>;
+ bias-disable;
+ };
+ irq {
+ pins = "gpio61"; /* IRQ line */
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
};
qcom,ssbi@500000 {
@@ -444,6 +473,45 @@ led@133 {
};
};
+ gsbi@16200000 {
+ status = "okay";
+ qcom,mode = <GSBI_PROT_I2C>;
+
+ gsbi3_i2c: i2c@16280000 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&dragon_gsbi3_i2c_pins>;
+
+ touchscreen@24 {
+ compatible = "cypress,cy8ctma340";
+ reg = <0x24>;
+ /* Certainly we can do at least 400 kHz */
+ clock-frequency = <400000>;
+ /* IRQ on GPIO61 called /CTP_INT */
+ interrupt-parent = <&tlmm>;
+ interrupts = <61 IRQ_TYPE_EDGE_FALLING>;
+ /*
+ * The I2C bus is using a PCA9306 level translator from L16A
+ * to L2B so these two voltages are needed and L16A is
+ * kind of the IO voltage, however L16Aisn't really fed to
+ * the TMA340, which relies entirely on L2B (PM8901 L2).
+ */
+ vcpin-supply = <&pm8058_l16>;
+ vdd-supply = <&pm8901_l2>;
+ /* GPIO58, called WAKE_CTP */
+ reset-gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
+ touchscreen-size-x = <480>;
+ touchscreen-size-y = <800>;
+ active-interval-ms = <0>;
+ touch-timeout-ms = <255>;
+ lowpower-interval-ms = <10>;
+ bootloader-key = /bits/ 8 <0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&dragon_tma340_gpios>;
+ };
+ };
+ };
+
gsbi@19800000 {
status = "okay";
qcom,mode = <GSBI_PROT_I2C>;
@@ -634,7 +702,8 @@ l1 {
bias-pull-down;
};
l2 {
- regulator-min-microvolt = <2850000>;
+ /* TMA340 requires strictly 3.3V */
+ regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
bias-pull-down;
};
--
2.37.3
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: (subset) [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus
2022-09-13 13:28 [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Linus Walleij
2022-09-13 13:28 ` [PATCH 2/3] ARM: dts: qcom-msm8660: Add GSBI3 I2C bus Linus Walleij
2022-09-13 13:28 ` [PATCH 3/3] ARM: dts: qcom: Add TMA340 to APQ8060 DragonBoard Linus Walleij
@ 2022-09-13 15:17 ` Bjorn Andersson
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-09-13 15:17 UTC (permalink / raw)
To: linus.walleij, linux-arm-msm, konrad.dybcio, agross; +Cc: me, linux-arm-kernel
On Tue, 13 Sep 2022 15:28:44 +0200, Linus Walleij wrote:
> GSBI1 can be used to enable an external SPI bus on e.g. the
> APQ8060. On the DragonBoard APQ8060 this SPI bus is used to
> talk to the LCD display.
>
>
Applied, thanks!
[1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus
commit: affa747d36aa81b2285fe0221e2624b0afaa3482
[2/3] ARM: dts: qcom-msm8660: Add GSBI3 I2C bus
commit: 77012a11c36e4609f2c0e0ff0bf215a8448d9033
[3/3] ARM: dts: qcom: Add TMA340 to APQ8060 DragonBoard
commit: 2aac1179717d2bf7ed2747a823c104c918d37a80
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-09-13 15:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-13 13:28 [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Linus Walleij
2022-09-13 13:28 ` [PATCH 2/3] ARM: dts: qcom-msm8660: Add GSBI3 I2C bus Linus Walleij
2022-09-13 13:28 ` [PATCH 3/3] ARM: dts: qcom: Add TMA340 to APQ8060 DragonBoard Linus Walleij
2022-09-13 15:17 ` (subset) [PATCH 1/3] ARM: dts: qcom-msm8660: Add GSBI1 SPI bus Bjorn Andersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).