Re: gpio-omap: add support gpiolib bias (pull-up/down) flags?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2020 at 09:42:08AM -0700, Tony Lindgren wrote:
> * Drew Fustini <drew@xxxxxxxx> [200423 13:17]:
> > Thanks, Tony.  I was able to apply your patch cleanly to 5.5.9 kernel
> > and boot it ok on the PocketBeagle (AM3358) which is what I'm currently
> > testing with.  I can switch to 5.7.x but I just happened to be on 5.5.x
> > because that is when bias flags were added to gpiolib uapi.
> 
> OK. BTW, with PocketBeagle and mainline v5.6 kernel, I see the micro-USB
> connection always get disconnected after few hours of use. Are you aware
> ofthat?
> 
> This is with the micro-USB configured as acm and ecm gadget via configfs.

I've been rebooting often as I build new kernels with debug output but I
will do a test with 5.6 by leaving it running overnight and see if it gets
disrupted.  I use the PocketBeagle with the TechLab PocketCape [0] for
kernel development as there is no eMMC to confuse the boot sequence and
the TechLab has a seperate USB to serial converter so I can easily see
u-boot and kernel console.

I asked Robert Nelson if he'd heard of this issue and he had not.  But he
asked how you are powering the board as any blip would probably reset the
board instantly as not enough cap's on the PocketBeagle's USB power rail.  

> > I'm a somewhat confused about the difference between the "gpio-ranges"
> > property for the gpio[0-3] nodes and the "pinctrl-single,gpio-range"
> > property for the am33xx_pinmux node.
> > 
> > For a test, I tried adding "gpio-ranges" to arch/arm/boot/dts/am33xx-l4.dtsi:
> > 
> >                         gpio0: gpio@0 {
> >                                 compatible = "ti,omap4-gpio";
> >                                 gpio-controller;
> >                                 #gpio-cells = <2>;
> >                                 interrupt-controller;
> >                                 #interrupt-cells = <2>;
> >                                 reg = <0x0 0x1000>;
> >                                 interrupts = <96>;
> >                                 gpio-ranges = <&am33xx_pinmux 0 0 1>;
> > 			}
> 
> So the gpio-ranges tells the gpio contorller what pinctrl device pin
> to use for configuring things.

Thanks, that makes sense. 

But in this case, pinctrl-single also needs to parse "gpio-ranges"
property from the gpio nodes?

> > and "pinctrl-single,gpio-range" like this:
> > 
> >                                 am33xx_pinmux: pinmux@800 {
> >                                         compatible = "pinctrl-single";
> >                                         reg = <0x800 0x238>;
> >                                         #pinctrl-cells = <1>;
> >                                         pinctrl-single,register-width = <32>;
> >                                         pinctrl-single,function-mask = <0x7f>;
> > 
> >                                         pinctrl-single,gpio-range = <&range 0 1 0>;
> > 
> >                                         range: gpio-range {
> >                                                 #pinctrl-single,gpio-range-cells = <3>;
> >                                         };
> >                                 };
> > 
> > Do you think both of those properties would be needed?
> 
> No I don't think so. The pinctrl-single could be additionally
> configured for gpio functionality too. For omaps, that gpio
> functionality would be mostly limited to output toggling using the
> internal pulls. Would be still usable on some systems though.

What woud it mean for the pinctrl-single to be configured for gpio
functionality?

Would that be needed for pinctrl_gpio_request() to succeed?

> Also, it's been a while so I don't remember where I started running
> into addressing issues though.. My guess is that you will soon hit
> them too and notice :)
> 
> But basically we want to reference the pinctrl pins based on their
> physical offset from the padconf base register, and not based on an
> invented number in the dts. Well maybe you can describe the problem
> further for us to discuss when you see it :)

Wouldn't the pinctrl pin numbering be from 0 to pcs_device.size /
pcs_device.width ?  

That index number of the pin plus pcs_device would give the physical
address of the padconf register.


Thanks,
Drew

[0] https://beagleboard.org/techlab



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux