]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: qcom: glymur-crd: Enable keyboard, trackpad and touchscreen
authorAbel Vesa <abel.vesa@oss.qualcomm.com>
Fri, 20 Mar 2026 11:35:03 +0000 (13:35 +0200)
committerBjorn Andersson <andersson@kernel.org>
Thu, 26 Mar 2026 14:40:48 +0000 (09:40 -0500)
On CRD, the keyboard, trackpad and touchscreen are connected over I2C
and all share a 3.3V regulator.

So describe the regulator and each input device along with their
pinctrl states.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260320-glymur-dts-crd-enable-kbd-tp-ts-v6-1-626d008534d9@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/glymur-crd.dts

index 09a532822787f2e16045c5cb446945d24c916326..51ea23a49b9e66f14d08dcff777789d16647fd17 100644 (file)
@@ -8,6 +8,8 @@
 #include "glymur.dtsi"
 #include "glymur-crd.dtsi"
 
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+
 / {
        model = "Qualcomm Technologies, Inc. Glymur CRD";
        compatible = "qcom,glymur-crd", "qcom,glymur";
 
                regulator-boot-on;
        };
+
+       vreg_misc_3p3: regulator-misc-3p3 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "VREG_MISC_3P3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+
+               gpio = <&pmh0110_f_e0_gpios 6 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+
+               pinctrl-0 = <&misc_3p3_reg_en>;
+               pinctrl-names = "default";
+
+               regulator-boot-on;
+       };
+};
+
+&i2c0 {
+       clock-frequency = <400000>;
+
+       status = "okay";
+
+       touchpad@2c {
+               compatible = "hid-over-i2c";
+               reg = <0x2c>;
+
+               hid-descr-addr = <0x20>;
+               interrupts-extended = <&tlmm 3 IRQ_TYPE_LEVEL_LOW>;
+
+               vdd-supply = <&vreg_misc_3p3>;
+               vddl-supply = <&vreg_l15b_e0_1p8>;
+
+               pinctrl-0 = <&tpad_default>;
+               pinctrl-names = "default";
+
+               wakeup-source;
+       };
+
+       keyboard@3a {
+               compatible = "hid-over-i2c";
+               reg = <0x3a>;
+
+               hid-descr-addr = <0x1>;
+               interrupts-extended = <&tlmm 67 IRQ_TYPE_LEVEL_LOW>;
+
+               vdd-supply = <&vreg_misc_3p3>;
+               vddl-supply = <&vreg_l15b_e0_1p8>;
+
+               pinctrl-0 = <&kybd_default>;
+               pinctrl-names = "default";
+
+               wakeup-source;
+       };
+};
+
+&i2c8 {
+       clock-frequency = <400000>;
+
+       status = "okay";
+
+       touchscreen@38 {
+               compatible = "hid-over-i2c";
+               reg = <0x38>;
+
+               hid-descr-addr = <0x1>;
+               interrupts-extended = <&tlmm 51 IRQ_TYPE_LEVEL_LOW>;
+
+               vdd-supply = <&vreg_misc_3p3>;
+               vddl-supply = <&vreg_l15b_e0_1p8>;
+
+               pinctrl-0 = <&ts0_default>;
+               pinctrl-names = "default";
+       };
 };
 
 &i2c5 {
        status = "okay";
 };
 
+&pmh0110_f_e0_gpios {
+       misc_3p3_reg_en: misc-3p3-reg-en-state {
+               pins = "gpio6";
+               function = "normal";
+               bias-disable;
+               input-disable;
+               output-enable;
+               drive-push-pull;
+               power-source = <1>; /* 1.8 V */
+               qcom,drive-strength = <PMIC_GPIO_STRENGTH_LOW>;
+       };
+};
+
 &smb2370_j_e2_eusb2_repeater {
        vdd18-supply = <&vreg_l15b_e0_1p8>;
        vdd3-supply = <&vreg_l7b_e0_2p79>;
                drive-strength = <16>;
                bias-disable;
        };
+
+       kybd_default: kybd-default-state {
+               pins = "gpio67";
+               function = "gpio";
+               bias-disable;
+       };
+
+       tpad_default: tpad-default-state {
+               pins = "gpio3";
+               function = "gpio";
+               bias-disable;
+       };
+
+       ts0_default: ts0-default-state {
+               int-n-pins {
+                       pins = "gpio51";
+                       function = "gpio";
+                       bias-disable;
+               };
+
+               reset-n-pins {
+                       pins = "gpio48";
+                       function = "gpio";
+                       drive-strength = <16>;
+                       bias-disable;
+               };
+       };
 };
 
 &usb_0 {