* Re: replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? [not found] <D7202A6C-5250-4B55-B3B8-FF15BCCA97AC@dominion.thruhere.net> @ 2012-09-26 12:56 ` Matt Porter 2012-09-26 13:03 ` Linus Walleij 0 siblings, 1 reply; 7+ messages in thread From: Matt Porter @ 2012-09-26 12:56 UTC (permalink / raw) To: Koen Kooi; +Cc: List List, Linux Kernel Mailing List, linus.walleij Adding Linus W. and lkml. On Wed, Sep 26, 2012 at 01:46:45PM +0200, Koen Kooi wrote: > Hi, > > With a patched 3.6rc7 on my beaglebone I can set the pinmux for pins using pinctrl and that seems to work. On the 3.2 vendor tree there was the omap_mux driver with an awesome debugfs interface: > > # cat /sys/kernel/debug/omap_mux/lcd_data0 > name: lcd_data0.ehrpwm2A (0x44e108a0/0x8a0 = 0x0003), b NA, t NA > mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE3 > signals: lcd_data0 | gpmc_a0 | pr1_mii_mt0_clk | ehrpwm2A | NA | pr1_pru1_pru_r30_0 | pr1_pru1_pru_r31_0 | gpio2_6 > > Notice how it tells me that it's muxed the PWM in 2 ways: signal name (ehrpwm2A) and register content (0x0003). Compare to pinctrl: > > root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 * > pinconf-pins:pin 40 (44e108a0): > pingroups:pin 40 (44e108a0) > pinmux-pins:pin 40 (44e108a0): 4a300000.pruss (GPIO UNCLAIMED) function pinmux_pruss_led_pins group pinmux_pruss_led_pins > pins:pin 40 (44e108a0) pinctrl-single > > What is that pin muxed to? It is part of the 'pinmux_pruss_led_pins' in the DT, but debugfs remains mute on how pin 40 is muxed. It does seem like a pretty big gap in the pinctrl/pinmux debugfs interface when viewed from an OMAP perspective. Ideally there would be a pinctrl/pinmux hook to the pinmux driver to provide the detailed h/w specific pin state info. -Matt ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? 2012-09-26 12:56 ` replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? Matt Porter @ 2012-09-26 13:03 ` Linus Walleij 2012-09-26 16:15 ` Matt Porter 0 siblings, 1 reply; 7+ messages in thread From: Linus Walleij @ 2012-09-26 13:03 UTC (permalink / raw) To: Matt Porter, Tony Lindgren Cc: Koen Kooi, List List, Linux Kernel Mailing List On Wed, Sep 26, 2012 at 2:56 PM, Matt Porter <mporter@ti.com> wrote: > Adding Linus W. and lkml. > On Wed, Sep 26, 2012 at 01:46:45PM +0200, Koen Kooi wrote: >> Hi, >> >> With a patched 3.6rc7 on my beaglebone I can set the pinmux for pins using pinctrl and that seems to work. On the 3.2 vendor tree there was the omap_mux driver with an awesome debugfs interface: >> >> # cat /sys/kernel/debug/omap_mux/lcd_data0 >> name: lcd_data0.ehrpwm2A (0x44e108a0/0x8a0 = 0x0003), b NA, t NA >> mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE3 >> signals: lcd_data0 | gpmc_a0 | pr1_mii_mt0_clk | ehrpwm2A | NA | pr1_pru1_pru_r30_0 | pr1_pru1_pru_r31_0 | gpio2_6 >> >> Notice how it tells me that it's muxed the PWM in 2 ways: signal name (ehrpwm2A) and register content (0x0003). Compare to pinctrl: >> >> root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 * >> pinconf-pins:pin 40 (44e108a0): >> pingroups:pin 40 (44e108a0) >> pinmux-pins:pin 40 (44e108a0): 4a300000.pruss (GPIO UNCLAIMED) function pinmux_pruss_led_pins group pinmux_pruss_led_pins >> pins:pin 40 (44e108a0) pinctrl-single >> >> What is that pin muxed to? It is part of the 'pinmux_pruss_led_pins' in the DT, but debugfs remains mute on how pin 40 is muxed. > > It does seem like a pretty big gap in the pinctrl/pinmux debugfs > interface when viewed from an OMAP perspective. Ideally there would > be a pinctrl/pinmux hook to the pinmux driver to provide the detailed > h/w specific pin state info. So add the hooks you need? I assume you are using Tony's pinctrl-single driver, so Tony is the one to ask. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? 2012-09-26 13:03 ` Linus Walleij @ 2012-09-26 16:15 ` Matt Porter 2012-09-26 17:21 ` Koen Kooi 0 siblings, 1 reply; 7+ messages in thread From: Matt Porter @ 2012-09-26 16:15 UTC (permalink / raw) To: Linus Walleij Cc: Tony Lindgren, Koen Kooi, List List, Linux Kernel Mailing List On Wed, Sep 26, 2012 at 03:03:27PM +0200, Linus Walleij wrote: > On Wed, Sep 26, 2012 at 2:56 PM, Matt Porter <mporter@ti.com> wrote: > > Adding Linus W. and lkml. > > On Wed, Sep 26, 2012 at 01:46:45PM +0200, Koen Kooi wrote: > >> Hi, > >> > >> With a patched 3.6rc7 on my beaglebone I can set the pinmux for pins using pinctrl and that seems to work. On the 3.2 vendor tree there was the omap_mux driver with an awesome debugfs interface: > >> > >> # cat /sys/kernel/debug/omap_mux/lcd_data0 > >> name: lcd_data0.ehrpwm2A (0x44e108a0/0x8a0 = 0x0003), b NA, t NA > >> mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE3 > >> signals: lcd_data0 | gpmc_a0 | pr1_mii_mt0_clk | ehrpwm2A | NA | pr1_pru1_pru_r30_0 | pr1_pru1_pru_r31_0 | gpio2_6 > >> > >> Notice how it tells me that it's muxed the PWM in 2 ways: signal name (ehrpwm2A) and register content (0x0003). Compare to pinctrl: > >> > >> root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 * > >> pinconf-pins:pin 40 (44e108a0): > >> pingroups:pin 40 (44e108a0) > >> pinmux-pins:pin 40 (44e108a0): 4a300000.pruss (GPIO UNCLAIMED) function pinmux_pruss_led_pins group pinmux_pruss_led_pins > >> pins:pin 40 (44e108a0) pinctrl-single > >> > >> What is that pin muxed to? It is part of the 'pinmux_pruss_led_pins' in the DT, but debugfs remains mute on how pin 40 is muxed. > > > > It does seem like a pretty big gap in the pinctrl/pinmux debugfs > > interface when viewed from an OMAP perspective. Ideally there would > > be a pinctrl/pinmux hook to the pinmux driver to provide the detailed > > h/w specific pin state info. > > So add the hooks you need? Ok. :) > I assume you are using Tony's pinctrl-single driver, so Tony is the one to ask. Yes, so roughly for pinctrl-single I have the following...likely broken for arbitrary register sizes but a starting point. Tony, any thoughts about this? Koen: you just need a userspace tool that groks the raw data for human consumption. The nice thing is that the old omap_mux implementation had plenty of OMAP-isms in the parser that didn't apply to AM33xx. A userspace tool can do a better job of parsing on a per-part basis. --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -246,7 +246,15 @@ static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev, struct seq_file *s, unsigned offset) { - seq_printf(s, " " DRIVER_NAME); + struct pcs_device *pcs; + unsigned val; + + pcs = pinctrl_dev_get_drvdata(pctldev); + + val = pcs->read(pcs->base + offset); + val &= pcs->fmask; + + seq_printf(s, "%08x %s " , val, DRIVER_NAME); } static void pcs_dt_free_map(struct pinctrl_dev *pctldev, ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? 2012-09-26 16:15 ` Matt Porter @ 2012-09-26 17:21 ` Koen Kooi 2012-09-26 18:52 ` Tony Lindgren 0 siblings, 1 reply; 7+ messages in thread From: Koen Kooi @ 2012-09-26 17:21 UTC (permalink / raw) To: Matt Porter Cc: Linus Walleij, Tony Lindgren, List List, Linux Kernel Mailing List Op 26 sep. 2012, om 18:15 heeft Matt Porter <mporter@ti.com> het volgende geschreven: > On Wed, Sep 26, 2012 at 03:03:27PM +0200, Linus Walleij wrote: >> On Wed, Sep 26, 2012 at 2:56 PM, Matt Porter <mporter@ti.com> wrote: >>> Adding Linus W. and lkml. >>> On Wed, Sep 26, 2012 at 01:46:45PM +0200, Koen Kooi wrote: >>>> Hi, >>>> >>>> With a patched 3.6rc7 on my beaglebone I can set the pinmux for pins using pinctrl and that seems to work. On the 3.2 vendor tree there was the omap_mux driver with an awesome debugfs interface: >>>> >>>> # cat /sys/kernel/debug/omap_mux/lcd_data0 >>>> name: lcd_data0.ehrpwm2A (0x44e108a0/0x8a0 = 0x0003), b NA, t NA >>>> mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE3 >>>> signals: lcd_data0 | gpmc_a0 | pr1_mii_mt0_clk | ehrpwm2A | NA | pr1_pru1_pru_r30_0 | pr1_pru1_pru_r31_0 | gpio2_6 >>>> >>>> Notice how it tells me that it's muxed the PWM in 2 ways: signal name (ehrpwm2A) and register content (0x0003). Compare to pinctrl: >>>> >>>> root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 * >>>> pinconf-pins:pin 40 (44e108a0): >>>> pingroups:pin 40 (44e108a0) >>>> pinmux-pins:pin 40 (44e108a0): 4a300000.pruss (GPIO UNCLAIMED) function pinmux_pruss_led_pins group pinmux_pruss_led_pins >>>> pins:pin 40 (44e108a0) pinctrl-single >>>> >>>> What is that pin muxed to? It is part of the 'pinmux_pruss_led_pins' in the DT, but debugfs remains mute on how pin 40 is muxed. >>> >>> It does seem like a pretty big gap in the pinctrl/pinmux debugfs >>> interface when viewed from an OMAP perspective. Ideally there would >>> be a pinctrl/pinmux hook to the pinmux driver to provide the detailed >>> h/w specific pin state info. >> >> So add the hooks you need? > > Ok. :) > >> I assume you are using Tony's pinctrl-single driver, so Tony is the one to ask. > > Yes, so roughly for pinctrl-single I have the following...likely broken > for arbitrary register sizes but a starting point. Tony, any thoughts > about this? > > Koen: you just need a userspace tool that groks the raw data for human > consumption. The nice thing is that the old omap_mux implementation had > plenty of OMAP-isms in the parser that didn't apply to AM33xx. A > userspace tool can do a better job of parsing on a per-part basis. > > --- a/drivers/pinctrl/pinctrl-single.c > +++ b/drivers/pinctrl/pinctrl-single.c > @@ -246,7 +246,15 @@ static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev, > struct seq_file *s, > unsigned offset) > { > - seq_printf(s, " " DRIVER_NAME); > + struct pcs_device *pcs; > + unsigned val; > + > + pcs = pinctrl_dev_get_drvdata(pctldev); > + > + val = pcs->read(pcs->base + offset); > + val &= pcs->fmask; > + > + seq_printf(s, "%08x %s " , val, DRIVER_NAME); > } > > static void pcs_dt_free_map(struct pinctrl_dev *pctldev, Much better already: root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 pins pin 40 (44e108a0) 00000027 pinctrl-single Now I can write a userspace tool do list the current muxes without resorting to devmem2! ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? 2012-09-26 17:21 ` Koen Kooi @ 2012-09-26 18:52 ` Tony Lindgren 2012-09-26 18:53 ` Koen Kooi 0 siblings, 1 reply; 7+ messages in thread From: Tony Lindgren @ 2012-09-26 18:52 UTC (permalink / raw) To: Koen Kooi Cc: Matt Porter, Linus Walleij, List List, Linux Kernel Mailing List * Koen Kooi <koen@dominion.thruhere.net> [120926 10:23]: > > Op 26 sep. 2012, om 18:15 heeft Matt Porter <mporter@ti.com> het volgende geschreven: > > > On Wed, Sep 26, 2012 at 03:03:27PM +0200, Linus Walleij wrote: > >> On Wed, Sep 26, 2012 at 2:56 PM, Matt Porter <mporter@ti.com> wrote: > >>> Adding Linus W. and lkml. > >>> On Wed, Sep 26, 2012 at 01:46:45PM +0200, Koen Kooi wrote: > >>>> Hi, > >>>> > >>>> With a patched 3.6rc7 on my beaglebone I can set the pinmux for pins using pinctrl and that seems to work. On the 3.2 vendor tree there was the omap_mux driver with an awesome debugfs interface: > >>>> > >>>> # cat /sys/kernel/debug/omap_mux/lcd_data0 > >>>> name: lcd_data0.ehrpwm2A (0x44e108a0/0x8a0 = 0x0003), b NA, t NA > >>>> mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE3 > >>>> signals: lcd_data0 | gpmc_a0 | pr1_mii_mt0_clk | ehrpwm2A | NA | pr1_pru1_pru_r30_0 | pr1_pru1_pru_r31_0 | gpio2_6 > >>>> > >>>> Notice how it tells me that it's muxed the PWM in 2 ways: signal name (ehrpwm2A) and register content (0x0003). Compare to pinctrl: > >>>> > >>>> root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 * > >>>> pinconf-pins:pin 40 (44e108a0): > >>>> pingroups:pin 40 (44e108a0) > >>>> pinmux-pins:pin 40 (44e108a0): 4a300000.pruss (GPIO UNCLAIMED) function pinmux_pruss_led_pins group pinmux_pruss_led_pins > >>>> pins:pin 40 (44e108a0) pinctrl-single > >>>> > >>>> What is that pin muxed to? It is part of the 'pinmux_pruss_led_pins' in the DT, but debugfs remains mute on how pin 40 is muxed. > >>> > >>> It does seem like a pretty big gap in the pinctrl/pinmux debugfs > >>> interface when viewed from an OMAP perspective. Ideally there would > >>> be a pinctrl/pinmux hook to the pinmux driver to provide the detailed > >>> h/w specific pin state info. > >> > >> So add the hooks you need? > > > > Ok. :) > > > >> I assume you are using Tony's pinctrl-single driver, so Tony is the one to ask. > > > > Yes, so roughly for pinctrl-single I have the following...likely broken > > for arbitrary register sizes but a starting point. Tony, any thoughts > > about this? > > > > Koen: you just need a userspace tool that groks the raw data for human > > consumption. The nice thing is that the old omap_mux implementation had > > plenty of OMAP-isms in the parser that didn't apply to AM33xx. A > > userspace tool can do a better job of parsing on a per-part basis. > > > > --- a/drivers/pinctrl/pinctrl-single.c > > +++ b/drivers/pinctrl/pinctrl-single.c > > @@ -246,7 +246,15 @@ static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev, > > struct seq_file *s, > > unsigned offset) > > { > > - seq_printf(s, " " DRIVER_NAME); > > + struct pcs_device *pcs; > > + unsigned val; > > + > > + pcs = pinctrl_dev_get_drvdata(pctldev); > > + > > + val = pcs->read(pcs->base + offset); > > + val &= pcs->fmask; > > + > > + seq_printf(s, "%08x %s " , val, DRIVER_NAME); > > } > > > > static void pcs_dt_free_map(struct pinctrl_dev *pctldev, > > Much better already: > > root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 pins > pin 40 (44e108a0) 00000027 pinctrl-single Cool :) For the proper patch feel free to add: Acked-by: Tony Lindgren <tony@atomide.com> > Now I can write a userspace tool do list the current muxes without resorting to devmem2! Yeah maybe add support to omapconf for that? I can generate the data for balls etc from old omap mux if you let me know the format you need. Regards, Tony ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? 2012-09-26 18:52 ` Tony Lindgren @ 2012-09-26 18:53 ` Koen Kooi 2012-09-26 19:04 ` Tony Lindgren 0 siblings, 1 reply; 7+ messages in thread From: Koen Kooi @ 2012-09-26 18:53 UTC (permalink / raw) To: Tony Lindgren Cc: Matt Porter, Linus Walleij, List List, Linux Kernel Mailing List Op 26 sep. 2012, om 20:52 heeft Tony Lindgren <tony@atomide.com> het volgende geschreven: > * Koen Kooi <koen@dominion.thruhere.net> [120926 10:23]: >> >> Op 26 sep. 2012, om 18:15 heeft Matt Porter <mporter@ti.com> het volgende geschreven: >> >>> On Wed, Sep 26, 2012 at 03:03:27PM +0200, Linus Walleij wrote: >>>> On Wed, Sep 26, 2012 at 2:56 PM, Matt Porter <mporter@ti.com> wrote: >>>>> Adding Linus W. and lkml. >>>>> On Wed, Sep 26, 2012 at 01:46:45PM +0200, Koen Kooi wrote: >>>>>> Hi, >>>>>> >>>>>> With a patched 3.6rc7 on my beaglebone I can set the pinmux for pins using pinctrl and that seems to work. On the 3.2 vendor tree there was the omap_mux driver with an awesome debugfs interface: >>>>>> >>>>>> # cat /sys/kernel/debug/omap_mux/lcd_data0 >>>>>> name: lcd_data0.ehrpwm2A (0x44e108a0/0x8a0 = 0x0003), b NA, t NA >>>>>> mode: OMAP_PIN_OUTPUT | OMAP_MUX_MODE3 >>>>>> signals: lcd_data0 | gpmc_a0 | pr1_mii_mt0_clk | ehrpwm2A | NA | pr1_pru1_pru_r30_0 | pr1_pru1_pru_r31_0 | gpio2_6 >>>>>> >>>>>> Notice how it tells me that it's muxed the PWM in 2 ways: signal name (ehrpwm2A) and register content (0x0003). Compare to pinctrl: >>>>>> >>>>>> root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 * >>>>>> pinconf-pins:pin 40 (44e108a0): >>>>>> pingroups:pin 40 (44e108a0) >>>>>> pinmux-pins:pin 40 (44e108a0): 4a300000.pruss (GPIO UNCLAIMED) function pinmux_pruss_led_pins group pinmux_pruss_led_pins >>>>>> pins:pin 40 (44e108a0) pinctrl-single >>>>>> >>>>>> What is that pin muxed to? It is part of the 'pinmux_pruss_led_pins' in the DT, but debugfs remains mute on how pin 40 is muxed. >>>>> >>>>> It does seem like a pretty big gap in the pinctrl/pinmux debugfs >>>>> interface when viewed from an OMAP perspective. Ideally there would >>>>> be a pinctrl/pinmux hook to the pinmux driver to provide the detailed >>>>> h/w specific pin state info. >>>> >>>> So add the hooks you need? >>> >>> Ok. :) >>> >>>> I assume you are using Tony's pinctrl-single driver, so Tony is the one to ask. >>> >>> Yes, so roughly for pinctrl-single I have the following...likely broken >>> for arbitrary register sizes but a starting point. Tony, any thoughts >>> about this? >>> >>> Koen: you just need a userspace tool that groks the raw data for human >>> consumption. The nice thing is that the old omap_mux implementation had >>> plenty of OMAP-isms in the parser that didn't apply to AM33xx. A >>> userspace tool can do a better job of parsing on a per-part basis. >>> >>> --- a/drivers/pinctrl/pinctrl-single.c >>> +++ b/drivers/pinctrl/pinctrl-single.c >>> @@ -246,7 +246,15 @@ static void pcs_pin_dbg_show(struct pinctrl_dev *pctldev, >>> struct seq_file *s, >>> unsigned offset) >>> { >>> - seq_printf(s, " " DRIVER_NAME); >>> + struct pcs_device *pcs; >>> + unsigned val; >>> + >>> + pcs = pinctrl_dev_get_drvdata(pctldev); >>> + >>> + val = pcs->read(pcs->base + offset); >>> + val &= pcs->fmask; >>> + >>> + seq_printf(s, "%08x %s " , val, DRIVER_NAME); >>> } >>> >>> static void pcs_dt_free_map(struct pinctrl_dev *pctldev, >> >> Much better already: >> >> root@bone-mainline:/sys/kernel/debug/pinctrl/44e10800.pinmux# grep 8a0 pins >> pin 40 (44e108a0) 00000027 pinctrl-single > > Cool :) For the proper patch feel free to add: > > Acked-by: Tony Lindgren <tony@atomide.com> > >> Now I can write a userspace tool do list the current muxes without resorting to devmem2! > > Yeah maybe add support to omapconf for that? I can generate > the data for balls etc from old omap mux if you let me know the > format you need. It's for am335x :) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? 2012-09-26 18:53 ` Koen Kooi @ 2012-09-26 19:04 ` Tony Lindgren 0 siblings, 0 replies; 7+ messages in thread From: Tony Lindgren @ 2012-09-26 19:04 UTC (permalink / raw) To: Koen Kooi Cc: Matt Porter, Linus Walleij, List List, Linux Kernel Mailing List * Koen Kooi <koen@dominion.thruhere.net> [120926 11:54]: > > It's for am335x :) Ah OK we don't have that data in the kernel then. But if you have some format in mind suitable I can still generate the other omap+package+mode data for you. Regards, Tony ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-26 19:04 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <D7202A6C-5250-4B55-B3B8-FF15BCCA97AC@dominion.thruhere.net> 2012-09-26 12:56 ` replacement for /sys/kernel/debug/omap_mux in DT/pinctrl land ? Matt Porter 2012-09-26 13:03 ` Linus Walleij 2012-09-26 16:15 ` Matt Porter 2012-09-26 17:21 ` Koen Kooi 2012-09-26 18:52 ` Tony Lindgren 2012-09-26 18:53 ` Koen Kooi 2012-09-26 19:04 ` Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).