Message ID | 20250214-pinctrl_defines-v1-0-fbc86a42ef3c@gocontroll.com (mailing list archive) |
---|---|
Headers | show |
Series | arm64: dts: imx8m: Add pinctrl config definitions | expand |
Hi Maud, Am Freitag, dem 14.02.2025 um 16:57 +0100 schrieb Maud Spierings via B4 Relay: > Up untill now the extra function mux (pull resistor, etc) has been > defined as a raw hex value, this is difficult to interpret. Add > definitions for these parts of the pinctrl registers to allow for more > readable pinctrl definitions in devictree files. > I certainly prefer the short form with the hex value, I find that quite a bit more readable than very verbose swathes of defines ORed together. But each to their own. > At this point the patch is not complete, some pinctrl definitions set > bit 30 (0x40000000) but according to the reference manual this is a > reserved field, I currently have no way to identify what the meaning of > this bit is, I hope someone in this CC may be able to provide an answer > to this. It will then be fixed in the v2 of this patch. This is not a mystery bit, it's used by the pinctrl driver to force enable the input path of the pad (SION). This is defined in the generic i.MX pinctrl binding, see Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt Regards, Lucas > > It should also be done for the mn/mq but I currently do not have the > reference manuals for these to verify these fields, though I can only > assume that they would be the same. > > Signed-off-by: Maud Spierings <maudspierings@gocontroll.com> > --- > Maud Spierings (2): > arm64: dts: imx8mm: Add pinctrl config definitions > arm64: dts: imx8mp: Add pinctrl config definitions > > arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h | 27 ++++++++++++++++++++++++++ > arch/arm64/boot/dts/freescale/imx8mp-pinfunc.h | 27 ++++++++++++++++++++++++++ > 2 files changed, 54 insertions(+) > --- > base-commit: 0ae0fa3bf0b44c8611d114a9f69985bf451010c3 > change-id: 20250214-pinctrl_defines-237e7db61c6a > > Best regards,
From: Lucas Stach <l.stach@pengutronix.de> Sent: Friday, February 14, 2025 5:28 PM >Hi Maud, >Am Freitag, dem 14.02.2025 um 16:57 +0100 schrieb Maud Spierings via B4 >Relay: >> Up untill now the extra function mux (pull resistor, etc) has been >> defined as a raw hex value, this is difficult to interpret. Add >> definitions for these parts of the pinctrl registers to allow for more >> readable pinctrl definitions in devictree files. >I certainly prefer the short form with the hex value, I find that quite >a bit more readable than very verbose swathes of defines ORed together. >But each to their own. I personally prefer it, but it would be accepted if I write a dts using this if it gets accepted? I am currently working on devicetrees for all of our devices preferably they would use this. >> At this point the patch is not complete, some pinctrl definitions set >> bit 30 (0x40000000) but according to the reference manual this is a >> reserved field, I currently have no way to identify what the meaning of >> this bit is, I hope someone in this CC may be able to provide an answer >> to this. It will then be fixed in the v2 of this patch. >This is not a mystery bit, it's used by the pinctrl driver to force >enable the input path of the pad (SION). This is defined in the generic >i.MX pinctrl binding, see >Documentation/devicetree/bindings/pinctrl/fsl,imx-pinctrl.txt I had a suspicion that it was that but got confused because that is a different register. Will change it to that in v2 somewhere next week. Kind regards, Maud Spierings
Am Samstag, dem 15.02.2025 um 10:02 +0000 schrieb Maud Spierings | GOcontroll: > From: Lucas Stach <l.stach@pengutronix.de> > Sent: Friday, February 14, 2025 5:28 PM > > > Hi Maud, > > > Am Freitag, dem 14.02.2025 um 16:57 +0100 schrieb Maud Spierings via B4 > > Relay: > > > Up untill now the extra function mux (pull resistor, etc) has been > > > defined as a raw hex value, this is difficult to interpret. Add > > > definitions for these parts of the pinctrl registers to allow for more > > > readable pinctrl definitions in devictree files. > > > I certainly prefer the short form with the hex value, I find that quite > > a bit more readable than very verbose swathes of defines ORed together. > > But each to their own. > > I personally prefer it, but it would be accepted if I write a dts using this if it > gets accepted? I am currently working on devicetrees for all of our devices > preferably they would use this. > I'm not the ultimate authority on this, as I'm not the official maintainer of the i.MX DTs. That would be Shawn, so he has to agree to this. However, my gut feeling is that it would be accepted if you as the author of the board DT prefer this style. Just don't go around and convert other board DTs maintained by other people to the verbose define style. Regards, Lucas
Up untill now the extra function mux (pull resistor, etc) has been defined as a raw hex value, this is difficult to interpret. Add definitions for these parts of the pinctrl registers to allow for more readable pinctrl definitions in devictree files. At this point the patch is not complete, some pinctrl definitions set bit 30 (0x40000000) but according to the reference manual this is a reserved field, I currently have no way to identify what the meaning of this bit is, I hope someone in this CC may be able to provide an answer to this. It will then be fixed in the v2 of this patch. It should also be done for the mn/mq but I currently do not have the reference manuals for these to verify these fields, though I can only assume that they would be the same. Signed-off-by: Maud Spierings <maudspierings@gocontroll.com> --- Maud Spierings (2): arm64: dts: imx8mm: Add pinctrl config definitions arm64: dts: imx8mp: Add pinctrl config definitions arch/arm64/boot/dts/freescale/imx8mm-pinfunc.h | 27 ++++++++++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8mp-pinfunc.h | 27 ++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) --- base-commit: 0ae0fa3bf0b44c8611d114a9f69985bf451010c3 change-id: 20250214-pinctrl_defines-237e7db61c6a Best regards,