]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: qcom: kaanapali-mtp: Add PMIC support
authorJishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Mon, 23 Mar 2026 06:19:42 +0000 (23:19 -0700)
committerBjorn Andersson <andersson@kernel.org>
Thu, 26 Mar 2026 14:40:46 +0000 (09:40 -0500)
Include PMIC files used on Kaanapali MTP boards. Add configurations for
keys (volume up and volume down), RGB LEDs and flash LEDs.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Shawn Guo <shengchao.guo@oss.qualcomm.com>
Signed-off-by: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <jingyi.wang@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260322-knp-pmic-dt-v1-2-70bc40ea4428@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/kaanapali-mtp.dts

index bc57935c042c98377c8e0b0f9d50f19bf09ddefe..5054c59336878feaf34d444ffdd791d83b38d3eb 100644 (file)
@@ -5,9 +5,21 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "kaanapali.dtsi"
 
+#include "pm8010-kaanapali.dtsi"     /* SPMI1: SID-12/13   */
+#include "pmd8028-kaanapali.dtsi"    /* SPMI1: SID-4       */
+#include "pmh0101.dtsi"              /* SPMI0: SID-1       */
+#include "pmh0104-kaanapali.dtsi"    /* SPMI1: SID-9       */
+#include "pmh0110-kaanapali.dtsi"    /* SPMI0: SID-3/5/6/8 */
+#include "pmih0108-kaanapali.dtsi"   /* SPMI1: SID-7       */
+#include "pmk8850.dtsi"              /* SPMI0: SID-0       */
+#include "pmr735d-kaanapali.dtsi"    /* SPMI1: SID-10      */
+
 / {
        model = "Qualcomm Technologies, Inc. Kaanapali MTP";
        compatible = "qcom,kaanapali-mtp", "qcom,kaanapali";
                };
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+
+               pinctrl-0 = <&key_vol_up_default>;
+               pinctrl-names = "default";
+
+               key-volume-up {
+                       label = "Volume Up";
+                       linux,code = <KEY_VOLUMEUP>;
+                       gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <15>;
+                       linux,can-disable;
+                       wakeup-source;
+               };
+       };
+
        sound {
                compatible = "qcom,kaanapali-sndcard", "qcom,sm8450-sndcard";
                model = "Kaanapali-MTP";
        reset-gpios = <&tlmm 102 GPIO_ACTIVE_LOW>;
 };
 
+&pmh0101_flash {
+       status = "okay";
+
+       led-0 {
+               function = LED_FUNCTION_FLASH;
+               function-enumerator = <0>;
+               color = <LED_COLOR_ID_YELLOW>;
+               led-sources = <1>, <4>;
+               led-max-microamp = <500000>;
+               flash-max-microamp = <2000000>;
+               flash-max-timeout-us = <1280000>;
+       };
+
+       led-1 {
+               function = LED_FUNCTION_FLASH;
+               function-enumerator = <1>;
+               color = <LED_COLOR_ID_WHITE>;
+               led-sources = <2>, <3>;
+               led-max-microamp = <500000>;
+               flash-max-microamp = <2000000>;
+               flash-max-timeout-us = <1280000>;
+       };
+};
+
+&pmh0101_pwm {
+       status = "okay";
+
+       multi-led {
+               color = <LED_COLOR_ID_RGB>;
+               function = LED_FUNCTION_STATUS;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               led@1 {
+                       reg = <1>;
+                       color = <LED_COLOR_ID_RED>;
+               };
+
+               led@2 {
+                       reg = <2>;
+                       color = <LED_COLOR_ID_GREEN>;
+               };
+
+               led@3 {
+                       reg = <3>;
+                       color = <LED_COLOR_ID_BLUE>;
+               };
+       };
+};
+
+&pon_resin {
+       linux,code = <KEY_VOLUMEDOWN>;
+
+       status = "okay";
+};
+
 &remoteproc_adsp {
        firmware-name = "qcom/kaanapali/adsp.mbn",
                        "qcom/kaanapali/adsp_dtb.mbn";
                bias-disable;
        };
 
+       key_vol_up_default: key-vol-up-default-state {
+               pins = "gpio101";
+               function = "gpio";
+               output-disable;
+               bias-pull-up;
+       };
+
        pcie0_default_state: pcie0-default-state {
                perst-n-pins {
                        pins = "gpio102";