Re: AM37x unable to drive output of some gpio lines (works with 2.6.37)

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

 



On 10/12/2015 04:12 PM, Ladislav Michl wrote:
> On Fri, Oct 09, 2015 at 11:45:17AM +0200, Rolf Peukert wrote:
>> On 09.10.2015 02:54, Ladislav Michl wrote:
>>> Hi there!
>>>
>>> on custom AM37x board running 2.6.37 this was enough to enable gpio 67:
>>> echo 71 > /sys/class/gpio/export
>>> echo out > /sys/class/gpio/gpio71/direction
>>> echo 1 > /sys/class/gpio/gpio71/value
>>>
>>> However, with DT configured linux-4.2 compiled using omap2plus_defconfig
>>> this no longer works.
>> [...]
>>
>> Is some other device driver using these pins? Pins 70 and 71 could be
>> DSS or UART1. Maybe you need to set them to "disabled" in your DT.
> 
> Only UART2 is enabled. This should not make difference anyway, as it should
> be matter of mux config and gpio settings. Working GPIO 82 is on the same
> bank as GPIO 71 and to make it work from U-Boot only these registers need
> to be touched:
> => mw.l 0x480020DC 0x40004
> => mw.l 0x480020F4 0x40004
> => mw.l 0x49052034 0xFFF41F3F
> => mw.l 0x4905203C <value>
> First two writes are mux config, 3rd is direction and the last one is output.
> Both GPIO 71 and 82 could be driven this way. But as long as kernel steps in,
> GPIO 71 no longer works even if I use devmem utility to write relevant
> registers. Just tried 3.19.8 and it does not work either, moving backward
> to the past...
> 

I think You might need to check pin muxing in DT-file. if you have smth like

	dss_dpi_pins_cm_t35x: pinmux_dss_dpi_pins_cm_t35x {
		pinctrl-single,pins = <
			OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE0)	/* dss_data0.dss_data0 */
			OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE0)	/* dss_data1.dss_data1 */

^^^^^ it will not work as gpio.

			OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE0)	/* dss_data2.dss_data2 */
			OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE0)	/* dss_data3.dss_data3 */
			OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE0)	/* dss_data4.dss_data4 */
			OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE0)	/* dss_data5.dss_data5 */
		>;
	};


-- 
regards,
-grygorii
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux