GPIO modules not loading on LS1046AFRWY board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GPIO modules not loading on LS1046AFRWY board

821 Views
acosara
Contributor IV

I'm trying to enable wake from GPIO on a LS1046AFRWY board. 

I modified the config files to enable GPIO driver using make menuconfig:

acosara_0-1702332767278.png

I went to /build_ls1046afrwy/tmp/work-shared/ls1046afrwy/kernel-source/drivers/gpio and modified gpio-mpc8xxx.c to add these lines at the end of the static int mpc8xxx_probe function:

device_init_wakeup(&pdev->dev, true);

enable_irq_wake(mpc8xxx_gc->irqn);

Then I modified arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi to this line to the end of gpio3: gpio@2320000:

fsl,rcpm-wakeup = <&rcpm 0x40>;

Then I ran:

$ make

$ make modules

$ make mrproper

I copied the generated images onto the boot folder of the SD card that already had the basic ls-image-main deployed and working on it. Then I copied the generated "modules" folder from the "module-ls1046afrwy.tgz" archive onto the "modules" folder on the SD card. 

It looks like there are GPIO modules in there:

 

acosara_2-1702333674500.png

 

I booted the LS1046AFRWY board from the SD card. I get not errors and the board boots up, but I don't see the GPIO drivers being installed. The /sys/class/gpio directory does not exist on the target and I can't run any GPIO commands that reference it.

Am I doing something wrong in the process?

 

 

Tags (1)
0 Kudos
Reply
5 Replies

796 Views
yipingwang
NXP TechSupport
NXP TechSupport

You have configured GPIO as built-in driver not module, please rebuild and update Linux Kernel "Image".

Under Linux Kernel, please check whether "CONFIG_GPIO_MPC8XXX" has been enabled.

~# zcat /proc/config.gz | grep GPIO_MPC8XXX

 

You could refer to https://community.nxp.com/t5/Layerscape-Knowledge-Base/Sleep-and-Wake-up-by-GPIO-on-LS1028/ta-p/1498...

 

0 Kudos
Reply

740 Views
acosara
Contributor IV

The "CONFIG_GPIO_MPC8XXX" has been enabled. This is what I get if run:

~# zcat /proc/config.gz | grep GPIO_MPC8XXX

CONFIG_GPIO_MPC8XXX=y

But I don't see the /sys/class/gpio directory on the target and I can't run any GPIO commands that reference it.

0 Kudos
Reply

723 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please configure RCW to enable GPIO.

0 Kudos
Reply

717 Views
acosara
Contributor IV

This is the RCW file that the build uses as far as I can tell:
>/build_ls1046afrwy/tmp/deploy/images/ls1046afrwy/rcw/ls1046afrwy/NN_NNQNNPNP_3040_0506/rcw_1600_sdboot.bin

Under Code Warrior, I see no option to enable/disable GPIO as a whole. The white paper you shared earlier about enabling wake from GPIO on LS1028 implies the same thing. The only relevant option is to select the correct pin muxing for the pin I plan to use. In my case that's pin EC1, which has to be muxed as GPIO3, which I did, in the RCW:

Reset Configuration Word > SoC Specific Configuration > EC1 [416-418] 

Which was already set to:

0b001 - GPIO 3

0 Kudos
Reply

676 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to this document to configure GPIO support in Linux Kernel first.

https://community.nxp.com/t5/Layerscape-Knowledge-Base/LS1043-GPIO-support-in-Linux-SDK/ta-p/1103689

0 Kudos
Reply