Using GPIO on the LS1028ardb board

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using GPIO on the LS1028ardb board

ソリューションへジャンプ
1,646件の閲覧回数
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 件の賞賛
返信
1 解決策
1,634件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
1,635件の閲覧回数
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 件の賞賛
返信
1,602件の閲覧回数
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 件の賞賛
返信