[beagleboard] Pin Mux values in DTS files

Hi all,

Quick question, what reference should I look to for answers for the values that are used in .dts file for pin muxing?

For example:

   fragment@0 {
         target = <&am33xx_pinmux>;
         __overlay__ {
             bb_uart4_pins: pinmux_bb_uart4_pins {
                 pinctrl-single,pins = <
                     0x070 0x26 /* gpmc_wait0.uart4_rxd | MODE6 */
                     0x074 0x06 /* gpmc_wpn.uart4_txd | MODE6 */
                 >;
             };
         };
     };

Where does one find the values that are used in the pinctrl-single,pins element?
     0x070 0x26
     0x074 0x06

I'm looking at enabling UART3 on the AM335x ZCZ balls L16 and L17 (gpio2_19 and gpio2_18) .

Thanks,

Ross

<snip>

You want the AM335x Technical Reference Manual from TI, typically
referred to here as the TRM.

Have it, been looking through it (all 4700 pages), any particular section?

Does this sound right:

     L16 set for UART3_TX 0x0138 0x81 /* uart3_txd mode 1 */
     L17 set for UART3_RX 0x0134 0x81 /* uart3_rxd mode 1 */

Thanks

The AM335x Technical Reference Manual is the source of all goodness, but the P8 and P9 PDFs here are quite useful:
https://github.com/derekmolloy/boneDeviceTree/tree/master/docs

You may also want to read his (Derek Molloy’s) blog, e.g.
http://derekmolloy.ie/gpios-on-the-beaglebone-black-using-device-tree-overlays/

The TI pinmux tool is nice for this sort of thing (unfortunately only for Windows .exe):
http://www.ti.com/tool/pinmuxtool

Mark

Hi all,

Quick question, what reference should I look to for answers for the
values that are used in .dts file for pin muxing?

For example:

<snip>

You want the AM335x Technical Reference Manual from TI, typically
referred to here as the TRM.

Have it, been looking through it (all 4700 pages), any particular section?

The Control Module (Section 9), specifically 9.3.1 "Control Module
Registers" and 9.3.1.50 "conf_<module>_<pin> Register" document the pin
mux registers.

Does this sound right:

    L16 set for UART3_TX 0x0138 0x81 /* uart3_txd mode 1 */
    L17 set for UART3_RX 0x0134 0x81 /* uart3_rxd mode 1 */

If you want to know what data to put into the pin mux registers, you
need to refer to Section 2.2 and Table 2.7 of the data sheet, "Ball
Characteristics". This lists the physical pin characteristics and the
various legal mode settings.

Got it, did have the pin mux wrong, should be 0x09 for the tx and 0x29 for the rx lines.

Thanks,
Ross

The TI pinmux tool is nice for this sort of thing (unfortunately only for Windows .exe):
http://www.ti.com/tool/pinmuxtool

If you are using Device Tree, it is better to use this:

https://github.com/strahlex/BBIOConfig

Regards,
John