MSS GPIO2 pin using a PLIC interrupt with polarfire SOC #338
Unanswered
govindsi
asked this question in
Linux drivers for PolarFire Soc
Replies: 1 comment 5 replies
-
Hey @govindsi are you trying to map the GPIO as an interrupt or the f2m? They're separate things, my understanding is you're driving the f2m input from the GPIO bibuf but it looks like you're configuring the GPIO as an input which is confusing me. The F2M interrupt is separate to the GPIO interrupt. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have MSS GPIO2 port 21 which is connected as interrupt signals to MSS_INT_F2M port to be used a PLIC interrupt.
This is being used a IRQ line for an i2c client.
GPIO2_21 -> MSS:MSS_INT_F2M[7:7]
FPGA side:
sd_instantiate_macro -sd_name ${sd_name} -macro_name {BIBUF} -instance_name {GPIO2_21_BIBUF}
sd_connect_pins -sd_name ${sd_name} -pin_names {"MSS:GPIO_2_M2F_21" "GPIO2_21_BIBUF:D"}
sd_connect_pins -sd_name ${sd_name} -pin_names {"MSS:GPIO_2_OE_M2F_21" "GPIO2_21_BIBUF:E"}
sd_connect_pins -sd_name ${sd_name} -pin_names {"MSS:GPIO_2_F2M_21" "GPIO2_21_BIBUF:Y"}
sd_rename_port -sd_name ${sd_name} -current_port_name {PAD} -new_port_name {GPIO2_21}
sd_connect_pins -sd_name ${sd_name} -pin_names {"MSS:MSS_INT_F2M[7:7]" "GPIO2_21_BIBUF:Y"}
Linux side Mapping:
Interrupt configuration in i2c client dtsi.
As per TRM ( page 102) https://www.microsemi.com/document-portal/doc_download/1245725-polarfire-soc-fpga-mss-technical-reference-manual
MSS_INT_F2M[31:0] 32 [136:105] [149:118] — [47:16] [47:16] [47:16] [47:16]
IRQ no should be ------->118 + 7 (MSS:MSS_INT_F2M[7:7] ) = 125
GPIO configuration is valid.
root@buildroot:/sys/class/gpio# ls
export gpiochip476 gpiochip480 unexport
root@buildroot:/sys/class/gpio# echo 501 > export ----------------> 480 + 21(gpio21) = 501
root@buildroot:/sys/class/gpio/gpio501# cat direction
in
Issue: there is interrupt flood on GPIO21, which is not expected and later interrupt gets masked due to the flood.
Seems its still missing some mapping.
What could be missing to map the MSS GPIO2 pin 21 as PLIC interrupt?
Some of the key registers dumped and looks good.
SUBBLK_CLOCK_CR=3ffdffff
SUBBLK_RESET_CR=0
gpio_cfg= 0x02
GPIO_INTERRUPT_FAB_CR=0 and tried with GPIO_INTERRUPT_FAB_CR=ffffffff as well
Beta Was this translation helpful? Give feedback.
All reactions