Using GPIO on the LS1028ardb board

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

Using GPIO on the LS1028ardb board

Jump to solution
1,643 Views
SoccerMom
Contributor II

Hello,

I have an LS1028ardb board and I want to use GPIOs. Where on this development board can I use GPIOs from and how do I set them up? Should I use the Microclick Modules and then set them as GPIO from the device tree or rcw? 

Thanks,

Manasi

0 Kudos
Reply
1 Solution
1,631 Views
yipingwang
NXP TechSupport
NXP TechSupport

You need to configure RCW to enable GPIO.

For example, if you want to use  GPIO3_DAT12, you need to configure RCW[EC1_SAI4_5_PMUX] as 1.

yipingwang_0-1667981237300.png

In dts  arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi, make sure the following GPIO device nodes are defined.

gpio1: gpio@2300000 {
compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
reg = <0x0 0x2300000 0x0 0x10000>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
little-endian;
};

gpio2: gpio@2310000 {
compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
reg = <0x0 0x2310000 0x0 0x10000>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
little-endian;
};

gpio3: gpio@2320000 {
compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
reg = <0x0 0x2320000 0x0 0x10000>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;

#interrupt-cells = <2>;
little-endian;
};

Linux Kernel configuration is as the following.

yipingwang_1-1667981946500.png

 

View solution in original post

0 Kudos
Reply
2 Replies
1,632 Views
yipingwang
NXP TechSupport
NXP TechSupport

You need to configure RCW to enable GPIO.

For example, if you want to use  GPIO3_DAT12, you need to configure RCW[EC1_SAI4_5_PMUX] as 1.

yipingwang_0-1667981237300.png

In dts  arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi, make sure the following GPIO device nodes are defined.

gpio1: gpio@2300000 {
compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
reg = <0x0 0x2300000 0x0 0x10000>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
little-endian;
};

gpio2: gpio@2310000 {
compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
reg = <0x0 0x2310000 0x0 0x10000>;
interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;
#interrupt-cells = <2>;
little-endian;
};

gpio3: gpio@2320000 {
compatible = "fsl,ls1028a-gpio","fsl,qoriq-gpio";
reg = <0x0 0x2320000 0x0 0x10000>;
interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
gpio-controller;
#gpio-cells = <2>;
interrupt-controller;

#interrupt-cells = <2>;
little-endian;
};

Linux Kernel configuration is as the following.

yipingwang_1-1667981946500.png

 

0 Kudos
Reply
1,599 Views
SoccerMom
Contributor II

Thanks Yiping. I have the following RCW word here:


Reset Configuration Word (RCW):
00000000: 34004010 00000030 00000000 00000000
00000010: 00000000 008f0000 0030c000 00000000
00000020: 01a031a0 00002580 00000000 00003296
00000030: 00000000 00000010 00000000 00000000
00000040: 00000000 00000000 00000000 00000000
00000050: 00000000 00000000 00000000 00000000
00000060: 00000000 00000000 200e705a 00000000
00000070: bb580000 00000000

 

So I guess I need to change the 200e705a to 100e705a at address 0x68? I am hoping the the bit location you mentioned above start with 0, if not I will be off by one, hence thought to confirm. Also I wanted to know if there was a document that talks about all the bit positions in the RCW word and what they correspond to?

 

0 Kudos
Reply