Merge "ARM: dts: qcom: add alt_sleep_clk pinctrl configuration for Sun"

This commit is contained in:
qctecmdr
2023-10-12 22:21:39 -07:00
committed by Gerrit - the friendly Code Review server
5 changed files with 111 additions and 63 deletions

View File

@@ -4,6 +4,7 @@
*/ */
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/leds/common.h>
#include <dt-bindings/spmi/spmi.h> #include <dt-bindings/spmi/spmi.h>
&spmi_bus { &spmi_bus {
@@ -34,78 +35,28 @@
#interrupt-cells = <2>; #interrupt-cells = <2>;
}; };
pm8550_pwm_1: pwms@e800 { led-controller {
compatible = "qcom,pwm-lpg"; compatible = "qcom,pm8350c-pwm";
reg = <0xe800>; #address-cells = <1>;
reg-names = "lpg-base"; #size-cells = <0>;
#pwm-cells = <2>; #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 { led@1 {
qcom,lpg-chan-id = <1>; reg = <1>;
qcom,ramp-step-ms = <100>; color = <LED_COLOR_ID_RED>;
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 {
label = "red"; label = "red";
pwms = <&pm8550_pwm_1 0 1000000>;
led-sources = <0>;
linux,default-trigger = "timer";
}; };
green { led@2 {
reg = <2>;
color = <LED_COLOR_ID_GREEN>;
label = "green"; label = "green";
pwms = <&pm8550_pwm_1 1 1000000>;
led-sources = <1>;
linux,default-trigger = "timer";
}; };
blue { led@3 {
reg = <3>;
color = <LED_COLOR_ID_BLUE>;
label = "blue"; label = "blue";
pwms = <&pm8550_pwm_1 2 1000000>;
led-sources = <2>;
linux,default-trigger = "timer";
}; };
}; };

View File

@@ -3,4 +3,27 @@
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun-pmic-overlay.dtsi" #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 = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce,interval = <15>;
linux,can-disable;
};
};
};

View File

@@ -3,4 +3,27 @@
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun-pmic-overlay.dtsi" #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 = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
};

View File

@@ -37,3 +37,31 @@
&pm8550ve_i_temp_alarm { &pm8550ve_i_temp_alarm {
status = "ok"; 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>;
};
};
};

View File

@@ -3,4 +3,27 @@
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
*/ */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun-pmic-overlay.dtsi" #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 = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
};