In the following snip from imx6ul.dtsi:, what do the numbers following iomuxc mean?
gpio-ranges = <&iomuxc 0 23 10>, <&iomuxc 10 17 6>, <&iomuxc 16 33 16>;
Thanks Carlos- yes, it describes gpio-ranges, but not the iomuxc part of it.
Empirically I think I've figured it out- it seems that that the first number is the start of the range, the 2nd number, when multiplied by 4 is the offset to the iomuxc control register (starting at 20E_0000h) and the third number is the number of bits in the group.
So for this entry (gpio1):
gpio-ranges = <&iomuxc 0 23 10>, <&iomuxc 10 17 6>, <&iomuxc 16 33 16>;
Now the GPIO1 registers aren't contiguous, there are 3 groups, hence 3 entries in the gpio-ranges statement.
First group is GPIO1.0 - GPIO1.9, base offset = 23 * 4 = 0x5c which is IOMUXC_SW_MUX_CTL_PAD_GPIO1_IO00
Second group is GPIO1.10 - GPIO1.15, base offset = 17 * 4 = 0x44 which is IOMUXC_SW_MUX_CTL_PAD_JTAG_MOD
Third group is GPIO1.16 - GPIO1.31, base offset = 33 * 4 = 0x84 which is IOMUXC_SW_MUX_CTL_PAD_UART1_TX_DATA
Could you please point out which version NXP official release uses the gpio-ranges?
Here is the NXP git. Please confirm which tag .
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/
rel_4.1.15-1.0.0_ga
That's what repo info says. When I run bitbake, it says 4.1.15-1.2.0 is my distro version.
Where is the statement of gpio-ranges you mentioned in the imx6ul.dtsi of the NXP official release BSP rel_imx_4.1.15_1.2.0_ga ?
Please check the following link:
Thanks Biyong- clearly I did not get it from the right place. My version of the file only has a 2015 copyright date (as opposed to 2015-2016) so I see now it is an old file. Google "gpio-ranges = <&iomuxc 0 49 16>, <&iomuxc 16 111 6>" and you'll see a number of places where you can find the out-of-date file- I probably picked it up there with my Windows PC (my build PC has the correct file).
Hi Charlie,
please take a look to kernel-source/Documentation/devicetree/bindigns/gpio/gpio.txt, here is described gpio-ranges property.
Regards,
Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------