Re: dts: n900: isp1704 gpio

From: Felipe Balbi
Date: Thu Nov 27 2014 - 10:22:36 EST


Hi,

On Thu, Nov 27, 2014 at 03:13:43PM +0100, Pali Rohár wrote:
> Hello,
>
> in commit "ARM: dts: OMAP3-N900: Add isp1704 support"
> e17337a26962943c27124a14b0794eabe76af437 was added support for
> isp1704 chip with configured gpio "3". Now I looked into legacy
> board rx51 data and there is gpio "67" for isp1704.
>
> I would like to ask, why we have different gpio in board data and
> in DTS data? I'm sure that isp1704 worked from legacy board data
> without problem, so I do not understand why in DTS code is
> different gpio number.

it's magic! Seriously though, each GPIO bank as 32 GPIOs with numbers
starting at 0, note that DTS uses the 3rd GPIO line on the 3rd GPIO
bank.

Bank0 handles GPIOs 0 - 31, Bank1 handles GPIOs 32 - 63, Bank 2 handles
GPIOs 64 - 95, and so on...

Offset 3 on Bank 3 would be 64 + 3 == 67. Yay, magic.

--
balbi

Attachment: signature.asc
Description: Digital signature