GPIO Support on pcm043
Hi
I just tried (for i in seq 0 96)gpio_set_direction $i 1
andgpio_set_direction $i 0
on a barebox for pcm043 with gpio support compiled in. But no LED was lighting up.
Is there some obvious error on my side or is there no gpio support for pcm043? At least there seems to be support for the gpio ports on imx?
Any hints?
Thanks
Tim
Hottinger Baldwin Messtechnik GmbH, Im Tiefen See 45, 64293 Darmstadt, Germany | www.hbm.com
Registered as GmbH (German limited liability corporation) in the commercial register at the local court of Darmstadt, HRB 1147 Company domiciled in Darmstadt | CEO: Andreas Huellhorst | Chairman of the board: James Charles Webster
Als Gesellschaft mit beschraenkter Haftung eingetragen im Handelsregister des Amtsgerichts Darmstadt unter HRB 1147 Sitz der Gesellschaft: Darmstadt | Geschaeftsfuehrung: Andreas Huellhorst | Aufsichtsratsvorsitzender: James Charles Webster
The information in this email is confidential. It is intended solely for the addressee. If you are not the intended recipient, please let me know and delete this email.
Die in dieser E-Mail enthaltene Information ist vertraulich und lediglich fur den Empfaenger bestimmt. Sollten Sie nicht der eigentliche Empfaenger sein, informieren Sie mich bitte kurz und loeschen diese E-Mail.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi Tim,
Quoted 5 lines · Tim Sander
I just tried (for i in
seq 0 96)gpio_set_direction$i 1
andgpio_set_direction$i 0
Quoted 8 lines
on a barebox for pcm043 with gpio support compiled in. But no LED was lighting up.
Is there some obvious error on my side or is there no gpio support for pcm043? At least there seems to be support for the gpio ports on imx?
Any hints?
you first need to configure the mux of the pins to GPIO mode, then you can use them as gpio.
Eric
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi Eric
Thanks for your answer
Quoted 7 lines
Quoted 4 lines
Is there some obvious error on my side or is there no gpio support for pcm043? At least there seems to be support for the gpio ports on imx?
Any hints?you first need to configure the mux of the pins to GPIO mode, then you can use them as gpio.
After tripping into that trap multiple times, i've already checked that, but forgot to mention it:
static struct pad_desc pcm043_pads[] = {
...
MX35_PAD_D3_CLS__GPIO1_4,
MX35_PAD_D3_SPL__GPIO1_5,
...These should be the gpio nrs 4 and 5 which means that gpio_set_direction 4 1
orgpio_set_direction 4 0
should light up the led.
The led is working under linux so it's some problem with the gpio setup.
Thanks
Tim
Hottinger Baldwin Messtechnik GmbH, Im Tiefen See 45, 64293 Darmstadt, Germany | www.hbm.com
Registered as GmbH (German limited liability corporation) in the commercial register at the local court of Darmstadt, HRB 1147 Company domiciled in Darmstadt | CEO: Andreas Huellhorst | Chairman of the board: James Charles Webster
Als Gesellschaft mit beschraenkter Haftung eingetragen im Handelsregister des Amtsgerichts Darmstadt unter HRB 1147 Sitz der Gesellschaft: Darmstadt | Geschaeftsfuehrung: Andreas Huellhorst | Aufsichtsratsvorsitzender: James Charles Webster
The information in this email is confidential. It is intended solely for the addressee. If you are not the intended recipient, please let me know and delete this email.
Die in dieser E-Mail enthaltene Information ist vertraulich und lediglich für den Empfaenger bestimmt. Sollten Sie nicht der eigentliche Empfaenger sein, informieren Sie mich bitte kurz und loeschen diese E-Mail.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 18 lines · Tim Sander
Hi Eric
Thanks for your answer
Quoted 7 lines
Quoted 4 lines
Is there some obvious error on my side or is there no gpio support for pcm043? At least there seems to be support for the gpio ports on imx?
Any hints?you first need to configure the mux of the pins to GPIO mode, then you can use them as gpio.
After tripping into that trap multiple times, i've already checked that, but forgot to mention it:
static struct pad_desc pcm043_pads[] = { ... MX35_PAD_D3_CLS__GPIO1_4, MX35_PAD_D3_SPL__GPIO1_5, ...
Quoted 6 lines
These should be the gpio nrs 4 and 5 which means that
gpio_set_direction4 1
orgpio_set_direction4 0
should light up the led.
if the led is wired on gpio1_5 it should.
Eric
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi,
Quoted 19 lines · Eric Bénard
Quoted 18 lines · Tim Sander
Hi Eric
Thanks for your answer
Quoted 7 lines
Quoted 4 lines
Is there some obvious error on my side or is there no gpio support for pcm043? At least there seems to be support for the gpio ports on imx?
Any hints?you first need to configure the mux of the pins to GPIO mode, then you can use them as gpio.
After tripping into that trap multiple times, i've already checked that, but forgot to mention it:
static structpad_descpcm043_pads[] = {
...MX35_PAD_D3_CLS__GPIO1_4,MX35_PAD_D3_SPL__GPIO1_5,
...
Quoted 8 lines
Quoted 6 lines
These should be the gpio nrs 4 and 5 which means that
gpio_set_direction4 1
orgpio_set_direction4 0
should light up the led.if the led is wired on
gpio1_5it should.
I mean 1_4 here
Eric
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Quoted 10 lines · Tim Sander
Hi Eric
Thanks for your answer
Quoted 7 lines
Quoted 4 lines
Is there some obvious error on my side or is there no gpio support for pcm043? At least there seems to be support for the gpio ports on imx?
Any hints?you first need to configure the mux of the pins to GPIO mode, then you can use them as gpio.
Quoted 7 lines
After tripping into that trap multiple times, i've already checked that, but forgot to mention it:
static struct pad_desc pcm043_pads[] = { ... MX35_PAD_D3_CLS__GPIO1_4, MX35_PAD_D3_SPL__GPIO1_5, ...
Have you checked that you chose the correct iomux setup? These particular pins can be routed to three different pads each:
#define MX35_PAD_CAPTURE__GPIO1_4 IOMUX_PAD(0x328, 0x004, 5, 0x850, 0, NO_PAD_CTRL)
#define MX35_PAD_SCKR__GPIO1_4 IOMUX_PAD(0x584, 0x140, 5, 0x850, 1, NO_PAD_CTRL)
#define MX35_PAD_D3_CLS__GPIO1_4 IOMUX_PAD(0x68c, 0x228, 5, 0x850, 2, NO_PAD_CTRL)
#define MX35_PAD_COMPARE__GPIO1_5 IOMUX_PAD(0x32c, 0x008, 5, 0x854, 0, NO_PAD_CTRL)
#define MX35_PAD_FSR__GPIO1_5 IOMUX_PAD(0x588, 0x144, 5, 0x854, 1, NO_PAD_CTRL)
#define MX35_PAD_D3_SPL__GPIO1_5 IOMUX_PAD(0x690, 0x22c, 5, 0x854, 2, NO_PAD_CTRL)
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Hi
Thanks for your help guys! I just noticed i had two mux entries per pad. The last had overriden my first settings. Its now working as intended, sorry for the noise.
Best regards
Tim
Hottinger Baldwin Messtechnik GmbH, Im Tiefen See 45, 64293 Darmstadt, Germany | www.hbm.com
Registered as GmbH (German limited liability corporation) in the commercial register at the local court of Darmstadt, HRB 1147 Company domiciled in Darmstadt | CEO: Andreas Huellhorst | Chairman of the board: James Charles Webster
Als Gesellschaft mit beschraenkter Haftung eingetragen im Handelsregister des Amtsgerichts Darmstadt unter HRB 1147 Sitz der Gesellschaft: Darmstadt | Geschaeftsfuehrung: Andreas Huellhorst | Aufsichtsratsvorsitzender: James Charles Webster
The information in this email is confidential. It is intended solely for the addressee. If you are not the intended recipient, please let me know and delete this email.
Die in dieser E-Mail enthaltene Information ist vertraulich und lediglich für den Empfaenger bestimmt. Sollten Sie nicht der eigentliche Empfaenger sein, informieren Sie mich bitte kurz und loeschen diese E-Mail.
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Hi Tim,
Quoted 6 lines · Tim Sander
Hi
I just tried (for i in
seq 0 96)gpio_set_direction$i 1
andgpio_set_direction$i 0
I suppose the actual command you used is gpio_direction_output, right? there is no gpio_set_direction command.
I just checked that as of latest master the LED on the baseboard connected to gpio2_6 works with:
gpio_direction_output 38 0gpio_direction_output 38 1
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox