diff --git a/qcom/pm8550.dtsi b/qcom/pm8550.dtsi index 04a3c806..09dcaa7b 100644 --- a/qcom/pm8550.dtsi +++ b/qcom/pm8550.dtsi @@ -4,6 +4,7 @@ */ #include +#include #include &spmi_bus { @@ -34,78 +35,28 @@ #interrupt-cells = <2>; }; - pm8550_pwm_1: pwms@e800 { - compatible = "qcom,pwm-lpg"; - reg = <0xe800>; - reg-names = "lpg-base"; + led-controller { + compatible = "qcom,pm8350c-pwm"; + #address-cells = <1>; + #size-cells = <0>; #pwm-cells = <2>; - qcom,num-lpg-channels = <3>; - nvmem = <&pmk8550_sdam_21 &pmk8550_sdam_22>; - nvmem-names = "lpg_chan_sdam", "lut_sdam"; - qcom,lut-sdam-base = <0x45>; - qcom,lut-patterns = <0 10 20 30 40 50 60 70 80 90 100 - 90 80 70 60 50 40 30 20 10 0>; - qcom,tick-duration-us = <7800>; - lpg@1 { - qcom,lpg-chan-id = <1>; - qcom,ramp-step-ms = <100>; - qcom,ramp-low-index = <0>; - qcom,ramp-high-index = <19>; - qcom,ramp-pattern-repeat; - qcom,lpg-sdam-base = <0x48>; - }; - - lpg@2 { - qcom,lpg-chan-id = <2>; - qcom,ramp-step-ms = <100>; - qcom,ramp-low-index = <0>; - qcom,ramp-high-index = <19>; - qcom,ramp-pattern-repeat; - qcom,lpg-sdam-base = <0x56>; - }; - - lpg@3 { - qcom,lpg-chan-id = <3>; - qcom,ramp-step-ms = <100>; - qcom,ramp-low-index = <0>; - qcom,ramp-high-index = <19>; - qcom,ramp-pattern-repeat; - qcom,lpg-sdam-base = <0x64>; - }; - }; - - pm8550_pwm_2: pwms@eb00 { - compatible = "qcom,pwm-lpg"; - reg = <0xeb00>; - reg-names = "lpg-base"; - pwm-cells = <2>; - qcom,num-lpg-channels = <1>; - }; - - pm8550_rgb: qcom,leds@ef00 { - compatible = "qcom,tri-led"; - reg = <0xef00>; - - red { + led@1 { + reg = <1>; + color = ; label = "red"; - pwms = <&pm8550_pwm_1 0 1000000>; - led-sources = <0>; - linux,default-trigger = "timer"; }; - green { + led@2 { + reg = <2>; + color = ; label = "green"; - pwms = <&pm8550_pwm_1 1 1000000>; - led-sources = <1>; - linux,default-trigger = "timer"; }; - blue { + led@3 { + reg = <3>; + color = ; label = "blue"; - pwms = <&pm8550_pwm_1 2 1000000>; - led-sources = <2>; - linux,default-trigger = "timer"; }; }; diff --git a/qcom/sun-cdp.dtsi b/qcom/sun-cdp.dtsi index fa61d1a8..7e07349f 100644 --- a/qcom/sun-cdp.dtsi +++ b/qcom/sun-cdp.dtsi @@ -3,4 +3,27 @@ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ +#include +#include + #include "sun-pmic-overlay.dtsi" + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce,interval = <15>; + linux,can-disable; + }; + }; +}; diff --git a/qcom/sun-mtp.dtsi b/qcom/sun-mtp.dtsi index fa61d1a8..87b375c1 100644 --- a/qcom/sun-mtp.dtsi +++ b/qcom/sun-mtp.dtsi @@ -3,4 +3,27 @@ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ +#include +#include + #include "sun-pmic-overlay.dtsi" + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +}; diff --git a/qcom/sun-pmic-overlay.dtsi b/qcom/sun-pmic-overlay.dtsi index 65b2f045..90ff568a 100644 --- a/qcom/sun-pmic-overlay.dtsi +++ b/qcom/sun-pmic-overlay.dtsi @@ -37,3 +37,31 @@ &pm8550ve_i_temp_alarm { status = "ok"; }; + +&pm8550_gpios { + key_vol_up { + key_vol_up_default: key_vol_up_default { + pins = "gpio6"; + function = "normal"; + input-enable; + bias-pull-up; + power-source = <1>; + }; + }; +}; + +&pmk8550_gpios { + pinctrl-0 = <&alt_sleep_clk_default>; + pinctrl-names = "default"; + + alt_sleep_clk { + alt_sleep_clk_default: alt_sleep_clk_default { + pins = "gpio3"; + function = "func1"; + input-disable; + output-enable; + bias-disable; + power-source = <0>; + }; + }; +}; diff --git a/qcom/sun-qrd.dtsi b/qcom/sun-qrd.dtsi index fa61d1a8..87b375c1 100644 --- a/qcom/sun-qrd.dtsi +++ b/qcom/sun-qrd.dtsi @@ -3,4 +3,27 @@ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ +#include +#include + #include "sun-pmic-overlay.dtsi" + +&soc { + gpio_keys { + compatible = "gpio-keys"; + label = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&key_vol_up_default>; + + vol_up { + label = "volume_up"; + gpios = <&pm8550_gpios 6 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = ; + gpio-key,wakeup; + debounce-interval = <15>; + linux,can-disable; + }; + }; +};