mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 22:23:55 +00:00
arm64: dts: qcom: pmk8350: Allow specifying arbitrary SID
PMK8350 is shipped on SID6 with some SoCs, for example with SM6375. Add some preprocessor logic to allow changing the SID in cases like this. While I am not in favour of adding #if's into the device tree, this is the least messy way to handle this. If one isn't specified, it will default to 0 (as it has been previously). Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221115152727.9736-3-konrad.dybcio@linaro.org
This commit is contained in:
parent
d409e44d2e
commit
f73de026a4
@ -8,10 +8,15 @@
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/spmi/spmi.h>
|
||||
|
||||
/* (Sadly) this PMIC can be configured to be at different SIDs */
|
||||
#ifndef PMK8350_SID
|
||||
#define PMK8350_SID 0
|
||||
#endif
|
||||
|
||||
&spmi_bus {
|
||||
pmk8350: pmic@0 {
|
||||
pmk8350: pmic@PMK8350_SID {
|
||||
compatible = "qcom,pmk8350", "qcom,spmi-pmic";
|
||||
reg = <0x0 SPMI_USID>;
|
||||
reg = <PMK8350_SID SPMI_USID>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@ -21,14 +26,14 @@
|
||||
|
||||
pon_pwrkey: pwrkey {
|
||||
compatible = "qcom,pmk8350-pwrkey";
|
||||
interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
|
||||
interrupts = <PMK8350_SID 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
|
||||
linux,code = <KEY_POWER>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
pon_resin: resin {
|
||||
compatible = "qcom,pmk8350-resin";
|
||||
interrupts = <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
|
||||
interrupts = <PMK8350_SID 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
@ -38,14 +43,14 @@
|
||||
reg = <0x3100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <PMK8350_SID 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
|
||||
#io-channel-cells = <1>;
|
||||
};
|
||||
|
||||
pmk8350_adc_tm: adc-tm@3400 {
|
||||
compatible = "qcom,adc-tm7";
|
||||
reg = <0x3400>;
|
||||
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <PMK8350_SID 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#thermal-sensor-cells = <1>;
|
||||
@ -56,7 +61,7 @@
|
||||
compatible = "qcom,pmk8350-rtc";
|
||||
reg = <0x6100>, <0x6200>;
|
||||
reg-names = "rtc", "alarm";
|
||||
interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupts = <PMK8350_SID 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user