Hi kyle,
This is the device tree I got socfpga.dts after creating using dtc
hps_0_gpio0: gpio@0xff708000 {
compatible = "snps,dw-apb-gpio", "snps,dw-gpio-16.1", "snps,dw-gpio";
reg = <0xff708000 0x00000100>;
interrupt-parent = <&hps_0_arm_gic_0>;
interrupts = <0 164 4>;
# gpio-cells = <2>;
gpio-controller;
# address-cells = <1>;
# size-cells = <0>;
hps_0_gpio0_porta: gpio-controller@0 {
compatible = "snps,dw-apb-gpio-port";
gpio-controller;
# gpio-cells = <2>;
snps,nr-gpios = <29>;
reg = <0>;
interrupt-controller;
# interrupt-cells = <2>;
interrupts = <0 164 4>;
interrupt-parent = <&hps_0_arm_gic_0>;
}; //end gpio-controller@0 (hps_0_gpio0_porta)
}; //end gpio@0xff708000 (hps_0_gpio0)
hps_0_gpio1: gpio@0xff709000 {
compatible = "snps,dw-apb-gpio", "snps,dw-gpio-16.1", "snps,dw-gpio";
reg = <0xff709000 0x00000100>;
interrupt-parent = <&hps_0_arm_gic_0>;
interrupts = <0 165 4>;
# gpio-cells = <2>;
gpio-controller;
# address-cells = <1>;
# size-cells = <0>;
hps_0_gpio1_porta: gpio-controller@0 {
compatible = "snps,dw-apb-gpio-port";
gpio-controller;
# gpio-cells = <2>;
snps,nr-gpios = <29>;
reg = <0>;
interrupt-controller;
# interrupt-cells = <2>;
interrupts = <0 165 4>;
interrupt-parent = <&hps_0_arm_gic_0>;
}; //end gpio-controller@0 (hps_0_gpio1_porta)
}; //end gpio@0xff709000 (hps_0_gpio1)
hps_0_gpio2: gpio@0xff70a000 {
compatible = "snps,dw-apb-gpio", "snps,dw-gpio-16.1", "snps,dw-gpio";
reg = <0xff70a000 0x00000100>;
interrupt-parent = <&hps_0_arm_gic_0>;
interrupts = <0 166 4>;
# gpio-cells = <2>;
gpio-controller;
# address-cells = <1>;
# size-cells = <0>;
hps_0_gpio2_porta: gpio-controller@0 {
compatible = "snps,dw-apb-gpio-port";
gpio-controller;
# gpio-cells = <2>;
snps,nr-gpios = <27>;
reg = <0>;
interrupt-controller;
# interrupt-cells = <2>;
interrupts = <0 166 4>;
interrupt-parent = <&hps_0_arm_gic_0>;
}; //end gpio-controller@0 (hps_0_gpio2_porta)
}; //end gpio@0xff70a000 (hps_0_gpio2)
sopc2dts --input soc_system.sopcinfo --output socfpga.dts
dtc -I dts -O dtb -o socfpga.dtb socfpga.dts
I used these 2 commands to create the .dtb and the .rbf from the qsysy what I have. then I copied the uImage .img and then the .rbf and dtb.
still my gpios are not set...any missing link...
Thanks in advance
Ravi
--- Quote Start ---
Hi ravi,
They are not bound in your case.. there is nothing obvious on your debug list... except the controllers and this is normal.
As your device tree would have something like this included to attach the GPIOs to the memory locations:
hps_0_gpio0: gpio@0xff708000 {
compatible = "snps,dw-gpio-14.0", "snps,dw-gpio";
reg = < 0xFF708000 0x00001000 >;
interrupt-parent = < &hps_0_arm_gic_0 >;
interrupts = < 0 164 4 >;
clocks = < &l4_mp_clk >;
# gpio-cells = < 2 >;
gpio-controller;
}; //end gpio@0xff708000 (hps_0_gpio0)
hps_0_gpio1: gpio@0xff709000 {
compatible = "snps,dw-gpio-14.0", "snps,dw-gpio";
reg = < 0xFF709000 0x00001000 >;
interrupt-parent = < &hps_0_arm_gic_0 >;
interrupts = < 0 165 4 >;
clocks = < &l4_mp_clk >;
# gpio-cells = < 2 >;
gpio-controller;
}; //end gpio@0xff709000 (hps_0_gpio1)
hps_0_gpio2: gpio@0xff70a000 {
compatible = "snps,dw-gpio-14.0", "snps,dw-gpio";
reg = < 0xFF70A000 0x00001000 >;
interrupt-parent = < &hps_0_arm_gic_0 >;
interrupts = < 0 166 4 >;
clocks = < &l4_mp_clk >;
# gpio-cells = < 2 >;
gpio-controller;
}; //end gpio@0xff70a000 (hps_0_gpio2)
Have you tried other GPIO's? Perhaps its your circuit or you have included a device on your GPIO's such as a peripheral (UART, SPI or CAN controller) to these pins in Quartus Qys design and is not configurable.
Or you have forgotten to add it again in the pin assignments like you did originally with the first GPIO's this could be your issue.
regards
Kyle
--- Quote End ---