-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable MPM interrupt controller #153
base: 6.6.10/main
Are you sure you want to change the base?
Changes from 1 commit
ec031a3
a44903a
1ec7111
28dda52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -633,6 +633,24 @@ | |
reg = <0 0 0 0>; | ||
}; | ||
|
||
mpm: interrupt-controller@601d4 { | ||
compatible = "qcom,mpm"; | ||
qcom,rpm-msg-ram = <&apss_mpm>; | ||
interrupts = <GIC_SPI 171 IRQ_TYPE_EDGE_RISING>; | ||
mboxes = <&apcs 1>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
#power-domain-cells = <0>; | ||
interrupt-parent = <&intc>; | ||
qcom,mpm-pin-count = <96>; | ||
qcom,mpm-pin-map = <2 184>, /* tsens_upper_lower_int */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems it is not matching with this https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/LA.UM.9.6.2.r1-04800-89xx.0/drivers/irqchip/qcom/mpm-8953.c#L16 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This offset IS confusing, but this is due to the the different mpm drivers in mainline and downstream kernel. The downstream kernel routes every interrupt through the mpm. The irq numbers in mpm-pin-map should differ by 32 due to this, I think my template for this was
This has since then been reverted
I think I had the mentioned problem, too, (crash on boot when using mpm as tlmm's wakeup-parent) but solved it (as in avoiding the crash, wakeup is still not working). I will look into it but first have to rebase these to the newest branch, I havent't booted my FP3 into debian for a long time. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried to find an example (i.e. an android kernel for msm8996 where the wakegic is used in the devicetree) but couldn't find one, so I tried to use the data from mpm-8953.c in my devicetree without shifting:
and with this the kernel hangs when booting. I take this is a hint that the shift is correct. |
||
<37 220>, /* qmp_usb3_lfps_rxterm_irq -> ss_phy_irq */ | ||
<49 136>, /* qusb2phy_dpse_hv -> hs_phy_irq*/ | ||
<53 72>, /* mdss_irq */ | ||
<58 136>, /* qusb2phy_dmse_hv -> hs_phy_irq*/ | ||
<88 190>; /* ee0_krait_hlos_spmi_periph_irq */ | ||
}; | ||
|
||
pmu { | ||
compatible = "arm,cortex-a53-pmu"; | ||
interrupts = <GIC_PPI 7 (GIC_CPU_MASK_SIMPLE(8) | IRQ_TYPE_LEVEL_HIGH)>; | ||
|
@@ -694,11 +712,13 @@ | |
CLUSTER0_PD: power-domain-cluster0 { | ||
#power-domain-cells = <0>; | ||
domain-idle-states = <&CLUSTER_RET>, <&CLUSTER_GDHS>, <&CLUSTER_PC>; | ||
power-domains = <&mpm>; | ||
}; | ||
|
||
CLUSTER1_PD: power-domain-cluster1 { | ||
#power-domain-cells = <0>; | ||
domain-idle-states = <&CLUSTER_RET>, <&CLUSTER_GDHS>, <&CLUSTER_PC>; | ||
power-domains = <&mpm>; | ||
}; | ||
}; | ||
|
||
|
@@ -958,6 +978,13 @@ | |
rpm_msg_ram: sram@60000 { | ||
compatible = "qcom,rpm-msg-ram"; | ||
spasswolf marked this conversation as resolved.
Show resolved
Hide resolved
|
||
reg = <0x00060000 0x8000>; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
ranges = <0 0x00060000 0x8000>; | ||
|
||
apss_mpm: sram@1d4 { | ||
reg = <0x1d4 0x48>; | ||
}; | ||
}; | ||
|
||
hsusb_phy: phy@79000 { | ||
|
@@ -1012,8 +1039,8 @@ | |
reg = <0x004a9000 0x1000>, /* TM */ | ||
<0x004a8000 0x1000>; /* SROT */ | ||
#qcom,sensors = <16>; | ||
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupts-extended = <&mpm 2 IRQ_TYPE_LEVEL_HIGH>, | ||
<&intc GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupt-names = "uplow", "critical"; | ||
#thermal-sensor-cells = <1>; | ||
}; | ||
|
@@ -1052,6 +1079,7 @@ | |
interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; | ||
gpio-controller; | ||
gpio-ranges = <&tlmm 0 0 142>; | ||
wakeup-parent = <&mpm>; | ||
#gpio-cells = <2>; | ||
interrupt-controller; | ||
#interrupt-cells = <2>; | ||
|
@@ -2176,7 +2204,7 @@ | |
<0x0200a000 0x2100>; | ||
reg-names = "core", "chnls", "obsrvr", "intr", "cnfg"; | ||
interrupt-names = "periph_irq"; | ||
interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupts-extended = <&mpm 88 IRQ_TYPE_LEVEL_HIGH>; | ||
qcom,ee = <0>; | ||
qcom,channel = <0>; | ||
interrupt-controller; | ||
|
@@ -2247,8 +2275,8 @@ | |
#size-cells = <1>; | ||
ranges; | ||
|
||
interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, | ||
<GIC_SPI 220 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupts-extended = <&mpm 49 IRQ_TYPE_LEVEL_HIGH>, | ||
<&mpm 37 IRQ_TYPE_LEVEL_HIGH>; | ||
interrupt-names = "hs_phy_irq", "ss_phy_irq"; | ||
|
||
clocks = <&gcc GCC_USB_PHY_CFG_AHB_CLK>, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/LA.UM.9.6.2.r1-04800-89xx.0/arch/arm64/boot/dts/qcom/msm8953.dtsi#L268
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But i am not totally sure because of this https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/LA.UM.9.6.2.r1-04800-89xx.0/arch/arm64/boot/dts/qcom/msm8953.dtsi#L275
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the downstream mpm controller "#interrupt-cells = <3>" only because it is used as interrupt-parent of the whole device-tree. In the examples in the mainline devicetree "qcom,mpm" is used with "#interrupt-cells = <2>", while the interrupt controller uses 3 cells (in sm6375.dtsi, qcm2290.dtsi).