linux4sam / dt-overlay-at91

AT91 Device Tree Overlays and FIT image descriptors
Other
10 stars 33 forks source link

SAMA5D4 iso7816 pin configuration error in linux kernel #2

Closed zizimumu closed 4 years ago

zizimumu commented 4 years ago

I wored in SAMA5D4-xplained board to test iso7816 function using linux kernel 4.19, I used USART0 as 7816 port, add pin configuration as below, after kernel boot, it shew me "usart0-0: pin conf 2 mux_id 0 not supported for pioD28",

            usart0 {
                pinctrl_usart0: usart0-0 {
                    atmel,pins =
                        <AT91_PIOD 12 AT91_PERIPH_A AT91_PINCTRL_PULL_UP    /* RXD */
                         AT91_PIOD 13 AT91_PERIPH_A AT91_PINCTRL_NONE       /* TXD */
                         AT91_PIOD 28 AT91_PERIPH_A AT91_PINCTRL_NONE       /* TXD */
                        >;
                };

by changing the "atmel,mux-mask" values as below from 0x0003ff00 to 0xB003ff00, this bug was fixed.


     pinctrl: pinctrl@fc06a000 {

        #address-cells = <1>;

        #size-cells = <1>;

        compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus";

        ranges = <0xfc068000 0xfc068000 0x100

            0xfc06a000 0xfc06a000 0x4000>;

        /* WARNING: revisit as pin spec has changed */

        atmel,mux-mask = <

           /*  A         B         C */

           0xffffffff 0x3ffcfe7c 0x1c010101   /* pioA */

           0x7fffffff 0xfffccc3a 0x3f00cc3a   /* pioB */

           0xffffffff 0x3ff83fff 0xff00ffff   /* pioC */

           0xB003ff00 0x8002a800 0x00000000   /* pioD */

           0xffffffff 0x7fffffff 0x76fff1bf   /* pioE */

           >;
ldesroches commented 4 years ago

Hi,

Thanks I'm poised to send a patch. If you want me to put the appropriate tag in order to give you the credit for this find, please give me your email address.

Regards