atmel: Remove local <dt-bindings/pinctrl/at91.h>
Subsystems (3)
PATCH 1/1 atmel: Remove local <dt-bindings/pinctrl/at91.h>
We have this binding file in both include/dt-bindings/ and dts/upstream/include/dt-bindings. These files are identical save for the fact that we do not have commit adb2424d0d05 ("dt-bindings: clock: add clock definitions for Ralink SoCs") from the kernel applied. However, this change is rather important and should not have been omitted here most likely. Remove our local copy to get in sync with upstream now.
---
Cc: Eugen Hristev <[email protected]>
Cc: Mihai Sain <[email protected]>
The full kernel commit log is at
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b3292852863215825f88905b9dbafc3101e1d7e
and so this sounds very important. Please let me know if this should go in master for v2025.07 (or Eugen, please pick it and send a PR). Thanks!
--- include/dt-bindings/pinctrl/at91.h | 49 ------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 include/dt-bindings/pinctrl/at91.h
include/dt-bindings/pinctrl/at91.h deleted +0 -49
@@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* -* This header provides constants for most at91 pinctrl bindings. -* -* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> -*/ - -#ifndef __DT_BINDINGS_AT91_PINCTRL_H__ -#define __DT_BINDINGS_AT91_PINCTRL_H__ - -#define AT91_PINCTRL_NONE (0 << 0) -#define AT91_PINCTRL_PULL_UP (1 << 0) -#define AT91_PINCTRL_MULTI_DRIVE (1 << 1) -#define AT91_PINCTRL_DEGLITCH (1 << 2) -#define AT91_PINCTRL_PULL_DOWN (1 << 3) -#define AT91_PINCTRL_DIS_SCHMIT (1 << 4) -#define AT91_PINCTRL_OUTPUT (1 << 7) -#define AT91_PINCTRL_OUTPUT_VAL (x) ((x & 0x1) << 8) -#define AT91_PINCTRL_SLEWRATE (1 << 9) -#define AT91_PINCTRL_DEBOUNCE (1 << 16) -#define AT91_PINCTRL_DEBOUNCE_VAL (x) (x << 17) - -#define AT91_PINCTRL_PULL_UP_DEGLITCH (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DEGLITCH) - -#define AT91_PINCTRL_DRIVE_STRENGTH_DEFAULT (0x0 << 5) -#define AT91_PINCTRL_DRIVE_STRENGTH_LOW (0x1 << 5) -#define AT91_PINCTRL_DRIVE_STRENGTH_MED (0x2 << 5) -#define AT91_PINCTRL_DRIVE_STRENGTH_HI (0x3 << 5) - -#define AT91_PINCTRL_SLEWRATE_DIS (0x0 << 9) -#define AT91_PINCTRL_SLEWRATE_ENA (0x1 << 9) - -#define AT91_PIOA 0 -#define AT91_PIOB 1 -#define AT91_PIOC 2 -#define AT91_PIOD 3 -#define AT91_PIOE 4 - -#define AT91_PERIPH_GPIO 0 -#define AT91_PERIPH_A 1 -#define AT91_PERIPH_B 2 -#define AT91_PERIPH_C 3 -#define AT91_PERIPH_D 4 - -#define ATMEL_PIO_DRVSTR_LO 1 -#define ATMEL_PIO_DRVSTR_ME 2 -#define ATMEL_PIO_DRVSTR_HI 3 - -#endif /* __DT_BINDINGS_AT91_PINCTRL_H__ */
Signature · 1 line
2.43.0
Quoted 8 lines · Tom Rini
We have this binding file in both
include/dt-bindings/and dts/upstream/include/dt-bindings. These files are identical save for the fact that we do not have commitadb2424d0d05("dt-bindings: clock: add clock definitions for Ralink SoCs") from the kernel applied. However, this change is rather important and should not have been omitted here most likely. Remove our local copy to get in sync with upstream now.Signed-off-by Tom Rini <[email protected]>
Quoted 8 lines
---
Cc: Eugen Hristev <[email protected]>
Cc: Mihai Sain <[email protected]>The full kernel commit log is at
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b3292852863215825f88905b9dbafc3101e1d7e
and so this sounds very important. Please let me know if this should go in master for v2025.07 (or Eugen, please pick it and send a PR). Thanks!
Hi Tom,
I do not see the connection with the Ralink SoCs. Maybe wrong commit referenced ?
Anyway, on the slewrate bits, as of today we have DIS==0 and ENA==1 and the driver treats them the same way. Hence DTs with DIS flag will have the bit erased in the register
With the kernel bindings file, DIS==1 and ENA==0, but the driver still considers DIS==0 and ENA==1 , so the DTs that have DIS as flags will get the bit written in the register.
If we also port the driver patch then the driver will also consider DIS==1 and ENA==0 , so the DTs with DIS flag will get the bit written in the register.
So there is an important change by changing the bits values, as the register eventually ends up with a different value.
The driver patch apparently just interprets the DIS/ENA bits differently, but the end result is the same
Please correct me if my logic is wrong.
I would also believe testing on the sam9x60 would be required for the slew rate change. From what I remember back then, slew rate change was not needed in Uboot, but I might be wrong.
Eugen
Quoted 60 lines
--- include/dt-bindings/pinctrl/at91.h | 49 ------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 include/dt-bindings/pinctrl/at91.hinclude/dt-bindings/pinctrl/at91.h deleted +0
-49@@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* -* This header provides constants for most at91 pinctrl bindings. -* -* Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> -*/ - -#ifndef __DT_BINDINGS_AT91_PINCTRL_H__ -#define __DT_BINDINGS_AT91_PINCTRL_H__ - -#define AT91_PINCTRL_NONE (0 << 0) -#define AT91_PINCTRL_PULL_UP (1 << 0) -#define AT91_PINCTRL_MULTI_DRIVE (1 << 1) -#define AT91_PINCTRL_DEGLITCH (1 << 2) -#define AT91_PINCTRL_PULL_DOWN (1 << 3) -#define AT91_PINCTRL_DIS_SCHMIT (1 << 4) -#define AT91_PINCTRL_OUTPUT (1 << 7) -#define AT91_PINCTRL_OUTPUT_VAL (x) ((x & 0x1) << 8) -#define AT91_PINCTRL_SLEWRATE (1 << 9) -#define AT91_PINCTRL_DEBOUNCE (1 << 16) -#define AT91_PINCTRL_DEBOUNCE_VAL (x) (x << 17) - -#define AT91_PINCTRL_PULL_UP_DEGLITCH (AT91_PINCTRL_PULL_UP | AT91_PINCTRL_DEGLITCH) - -#define AT91_PINCTRL_DRIVE_STRENGTH_DEFAULT (0x0 << 5) -#define AT91_PINCTRL_DRIVE_STRENGTH_LOW (0x1 << 5) -#define AT91_PINCTRL_DRIVE_STRENGTH_MED (0x2 << 5) -#define AT91_PINCTRL_DRIVE_STRENGTH_HI (0x3 << 5) - -#define AT91_PINCTRL_SLEWRATE_DIS (0x0 << 9) -#define AT91_PINCTRL_SLEWRATE_ENA (0x1 << 9) - -#define AT91_PIOA 0 -#define AT91_PIOB 1 -#define AT91_PIOC 2 -#define AT91_PIOD 3 -#define AT91_PIOE 4 - -#define AT91_PERIPH_GPIO 0 -#define AT91_PERIPH_A 1 -#define AT91_PERIPH_B 2 -#define AT91_PERIPH_C 3 -#define AT91_PERIPH_D 4 - -#define ATMEL_PIO_DRVSTR_LO 1 -#define ATMEL_PIO_DRVSTR_ME 2 -#define ATMEL_PIO_DRVSTR_HI 3 - -#endif /* __DT_BINDINGS_AT91_PINCTRL_H__ */
Quoted 20 lines · Eugen Hristev
Quoted 8 lines · Tom Rini
We have this binding file in both
include/dt-bindings/and dts/upstream/include/dt-bindings. These files are identical save for the fact that we do not have commitadb2424d0d05("dt-bindings: clock: add clock definitions for Ralink SoCs") from the kernel applied. However, this change is rather important and should not have been omitted here most likely. Remove our local copy to get in sync with upstream now.Signed-off-by Tom Rini <[email protected]>Quoted 8 lines
---
Cc: Eugen Hristev <[email protected]>
Cc: Mihai Sain <[email protected]>The full kernel commit log is at
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b3292852863215825f88905b9dbafc3101e1d7e
and so this sounds very important. Please let me know if this should go in master for v2025.07 (or Eugen, please pick it and send a PR). Thanks!
Quoted 4 lines
Hi Tom,
I do not see the connection with the Ralink SoCs. Maybe wrong commit referenced ?
Erm, the kernel link for me is "pinctrl: at91: Enable slewrate by default on SAM9X60".
Quoted 17 lines
Anyway, on the slewrate bits, as of today we have DIS==0 and ENA==1 and the driver treats them the same way. Hence DTs with DIS flag will have the bit erased in the register
With the kernel bindings file, DIS==1 and ENA==0, but the driver still considers DIS==0 and ENA==1 , so the DTs that have DIS as flags will get the bit written in the register.
If we also port the driver patch then the driver will also consider DIS==1 and ENA==0 , so the DTs with DIS flag will get the bit written in the register.
So there is an important change by changing the bits values, as the register eventually ends up with a different value.
The driver patch apparently just interprets the DIS/ENA bits differently, but the end result is the same
Quoted 5 lines
Please correct me if my logic is wrong.
I would also believe testing on the sam9x60 would be required for the slew rate change. From what I remember back then, slew rate change was not needed in Uboot, but I might be wrong.
So, there's I guess two parts to all of this. First, yes it would be good to test this change on real hardware and make sure things work as expected. Second, yes, it looks like we need to make the parallel change in drivers/pinctrl/pinctrl-at91.c (to match what the kernel did at the time too) and we can't just remove the old binding file we need to update them at the same time (since long term we need to remove all of the old kernel dts stuff). The final thing is that it really is important to get them in sync as it's valid to pass our device tree to the kernel to use. Can you take care of the changes here? I don't have hardware to test on, thanks.
Signature · 1 line
Tom
Quoted 21 lines · Tom Rini
Quoted 20 lines · Eugen Hristev
Quoted 16 lines · Tom Rini
We have this binding file in both
include/dt-bindings/and dts/upstream/include/dt-bindings. These files are identical save for the fact that we do not have commitadb2424d0d05("dt-bindings: clock: add clock definitions for Ralink SoCs") from the kernel applied. However, this change is rather important and should not have been omitted here most likely. Remove our local copy to get in sync with upstream now.Signed-off-by Tom Rini <[email protected]>---
Cc: Eugen Hristev <[email protected]>
Cc: Mihai Sain <[email protected]>The full kernel commit log is at
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0b3292852863215825f88905b9dbafc3101e1d7e
and so this sounds very important. Please let me know if this should go in master for v2025.07 (or Eugen, please pick it and send a PR). Thanks!
Quoted 7 lines
Quoted 4 lines
Hi Tom,
I do not see the connection with the Ralink SoCs. Maybe wrong commit referenced ?
Erm, the kernel link for me is "pinctrl: at91: Enable slewrate by default on SAM9X60".
The link is good, I ment the commit message above.
Quoted 24 lines
Quoted 18 lines
Anyway, on the slewrate bits, as of today we have DIS==0 and ENA==1 and the driver treats them the same way. Hence DTs with DIS flag will have the bit erased in the register
With the kernel bindings file, DIS==1 and ENA==0, but the driver still considers DIS==0 and ENA==1 , so the DTs that have DIS as flags will get the bit written in the register.
If we also port the driver patch then the driver will also consider DIS==1 and ENA==0 , so the DTs with DIS flag will get the bit written in the register.
So there is an important change by changing the bits values, as the register eventually ends up with a different value.
The driver patch apparently just interprets the DIS/ENA bits differently, but the end result is the sameQuoted 5 lines
Please correct me if my logic is wrong.
I would also believe testing on the sam9x60 would be required for the slew rate change. From what I remember back then, slew rate change was not needed in Uboot, but I might be wrong.
Quoted 10 lines
So, there's I guess two parts to all of this. First, yes it would be good to test this change on real hardware and make sure things work as expected. Second, yes, it looks like we need to make the parallel change in
drivers/pinctrl/pinctrl-at91.c(to match what the kernel did at the time too) and we can't just remove the old binding file we need to update them at the same time (since long term we need to remove all of the old kernel dts stuff). The final thing is that it really is important to get them in sync as it's valid to pass our device tree to the kernel to use. Can you take care of the changes here? I don't have hardware to test on, thanks.
I do not have any sam9x60 based board . This would have to be tested by Mihai or someone from Microchip team.
So your patch would be good, then another patch for the pinctrl driver to port the changes from Linux . This can be done by Mihai or the team, if they want, otherwise I will do it, but it has to be tested anyway by someone . Especially the hardware with slew rates, like the SD card.
Eugen
Quoted 1 line
Quoted 63 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
We have this binding file in both
include/dt-bindings/and dts/upstream/include/dt-bindings. These files are identical save for the fact that we do not have commitadb2424d0d05("dt-bindings: clock: add clock definitions for Ralink SoCs") from the kernel applied. However, this change is rather important and should not have been omitted here most likely. Remove our local copy to get in sync with upstream now.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: Eugen Hristev <[email protected]>
Cc: Mihai Sain <[email protected]>The full kernel commit log is at
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?
id=0b3292852863215825f88905b9dbafc3101e1d7eQuoted 10 lines
Quoted 7 lines
Quoted 2 lines
and so this sounds very important. Please let me know if this should go in master for v2025.07 (or Eugen, please pick it and send a PR). Thanks!
Hi Tom,
I do not see the connection with the Ralink SoCs. Maybe wrong commit referenced ?
Erm, the kernel link for me is "pinctrl: at91: Enable slewrate by default on SAM9X60".
The link is good, I ment the commit message above.
Quoted 24 lines
Quoted 18 lines
Anyway, on the slewrate bits, as of today we have DIS==0 and ENA==1 and the driver treats them the same way. Hence DTs with DIS flag will have the bit erased in the register
With the kernel bindings file, DIS==1 and ENA==0, but the driver still considers DIS==0 and ENA==1 , so the DTs that have DIS as flags will get the bit written in the register.
If we also port the driver patch then the driver will also consider DIS==1 and ENA==0 , so the DTs with DIS flag will get the bit written in the register.
So there is an important change by changing the bits values, as the register eventually ends up with a different value.
The driver patch apparently just interprets the DIS/ENA bits differently, but the end result is the sameQuoted 5 lines
Please correct me if my logic is wrong.
I would also believe testing on the sam9x60 would be required for the slew rate change. From what I remember back then, slew rate change was not needed in Uboot, but I might be wrong.
Quoted 10 lines
So, there's I guess two parts to all of this. First, yes it would be good to test this change on real hardware and make sure things work as expected. Second, yes, it looks like we need to make the parallel change in
drivers/pinctrl/pinctrl-at91.c(to match what the kernel did at the time too) and we can't just remove the old binding file we need to update them at the same time (since long term we need to remove all of the old kernel dts stuff). The final thing is that it really is important to get them in sync as it's valid to pass our device tree to the kernel to use. Can you take care of the changes here? I don't have hardware to test on, thanks.
Quoted 7 lines
I do not have any sam9x60 based board . This would have to be tested by Mihai or someone from Microchip team.
So your patch would be good, then another patch for the pinctrl driver to port the changes from Linux . This can be done by Mihai or the team, if they want, otherwise I will do it, but it has to be tested anyway by someone . Especially the hardware with slew rates, like the SD card.
Yes.
I can test the modifications on sam9x60 and sam9x7 boards, since they use the same pin controller. This patch should be ported ?
https://github.com/torvalds/linux/commit/0b3292852863215825f88905b9dbafc3101e1d7e
Regards,
Mihai
Quoted 4 lines
Eugen
Quoted 1 line
Quoted 71 lines · On 6/3/25 09:18, [email protected] wrote:
Quoted 63 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
We have this binding file in both
include/dt-bindings/and dts/upstream/include/dt-bindings. These files are identical save for the fact that we do not have commitadb2424d0d05("dt-bindings: clock: add clock definitions for Ralink SoCs") from the kernel applied. However, this change is rather important and should not have been omitted here most likely. Remove our local copy to get in sync with upstream now.Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Signed-off-by Tom Rini <[email protected]>---
Cc: Eugen Hristev <[email protected]>
Cc: Mihai Sain <[email protected]>The full kernel commit log is at
https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?
id=0b3292852863215825f88905b9dbafc3101e1d7eQuoted 10 lines
Quoted 7 lines
Quoted 2 lines
and so this sounds very important. Please let me know if this should go in master for v2025.07 (or Eugen, please pick it and send a PR). Thanks!
Hi Tom,
I do not see the connection with the Ralink SoCs. Maybe wrong commit referenced ?
Erm, the kernel link for me is "pinctrl: at91: Enable slewrate by default on SAM9X60".
The link is good, I ment the commit message above.
Quoted 24 lines
Quoted 18 lines
Anyway, on the slewrate bits, as of today we have DIS==0 and ENA==1 and the driver treats them the same way. Hence DTs with DIS flag will have the bit erased in the register
With the kernel bindings file, DIS==1 and ENA==0, but the driver still considers DIS==0 and ENA==1 , so the DTs that have DIS as flags will get the bit written in the register.
If we also port the driver patch then the driver will also consider DIS==1 and ENA==0 , so the DTs with DIS flag will get the bit written in the register.
So there is an important change by changing the bits values, as the register eventually ends up with a different value.
The driver patch apparently just interprets the DIS/ENA bits differently, but the end result is the sameQuoted 5 lines
Please correct me if my logic is wrong.
I would also believe testing on the sam9x60 would be required for the slew rate change. From what I remember back then, slew rate change was not needed in Uboot, but I might be wrong.
Quoted 10 lines
So, there's I guess two parts to all of this. First, yes it would be good to test this change on real hardware and make sure things work as expected. Second, yes, it looks like we need to make the parallel change in
drivers/pinctrl/pinctrl-at91.c(to match what the kernel did at the time too) and we can't just remove the old binding file we need to update them at the same time (since long term we need to remove all of the old kernel dts stuff). The final thing is that it really is important to get them in sync as it's valid to pass our device tree to the kernel to use. Can you take care of the changes here? I don't have hardware to test on, thanks.Quoted 7 lines
I do not have any sam9x60 based board . This would have to be tested by Mihai or someone from Microchip team.
So your patch would be good, then another patch for the pinctrl driver to port the changes from Linux . This can be done by Mihai or the team, if they want, otherwise I will do it, but it has to be tested anyway by someone . Especially the hardware with slew rates, like the SD card.
Quoted 4 lines
Yes.
I can test the modifications on sam9x60 and sam9x7 boards, since they use the same pin controller. This patch should be ported ?
https://github.com/torvalds/linux/commit/0b3292852863215825f88905b9dbafc3101e1d7e
Yes this looks right.
Also this patch (in the mail), the removal of the old header, makes Uboot use the kernel header that already includes the change for the macros.
Quoted 9 lines
Regards,
MihaiQuoted 4 lines
Eugen
Quoted 1 line