pinctrl/arm: dt-bindings: k3: Deprecate header with register constants
Subsystems (6)
Nishanth Menon
maintainerv2 cover pinctrl/arm: dt-bindings: k3: Deprecate header with register constants
Hi,
This is an updated series to move the pinctrl bindings over to arch as the definitions are hardware definitions without driver usage.
This series was triggered by the discussion in [1]
v1: https://lore.kernel.org/linux-arm-kernel/[email protected]/
Nishanth Menon (3):
dt-bindings: net: ti: k3-am654-cpsw-nuss: Drop pinmux header
arm64: dts: ti: Use local header for pinctrl register values
dt-bindings: pinctrl: k3: Deprecate header with register constants
.../devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml | 1 - arch/arm64/boot/dts/ti/k3-am62.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-am62a.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-am64.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-am65.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-j7200.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-j721e.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-j721s2.dtsi | 3 ++- arch/arm64/boot/dts/ti/k3-j784s4.dtsi | 3 ++- .../pinctrl/k3.h => arch/arm64/boot/dts/ti/k3-pinctrl.h | 6 +++--- include/dt-bindings/pinctrl/k3.h | 7 +++++++ 11 files changed, 26 insertions(+), 12 deletions(-) copy include/dt-bindings/pinctrl/k3.h => arch/arm64/boot/dts/ti/k3-pinctrl.h (93%)
[1] https://lore.kernel.org/all/[email protected]/
Signature · 7 lines
2.40.0 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Nishanth Menon
maintainerPATCH v2 1/3 dt-bindings: net: ti: k3-am654-cpsw-nuss: Drop pinmux header
Drop the pinmux header reference as it is not used. Examples should just show the node definition.
---
Changes since V1:
- Minor update to the commit message to indicate the header reference is not used.
V1: https://lore.kernel.org/linux-arm-kernel/[email protected]/
Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml | 1 - 1 file changed, 1 deletion(-)
Documentation/devicetree/bindings/net/ti,k3-am654-cpsw-nuss.yaml +0 -1
@@ -232,7 +232,6 @@ additionalProperties: false examples: - | - #include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> #include <dt-bindings/net/ti-dp83867.h> #include <dt-bindings/interrupt-controller/irq.h>
Signature · 1 line
2.40.0
Nishanth Menon
maintainerPATCH v2 2/3 arm64: dts: ti: Use local header for pinctrl register values
In reply to Nishanth MenonThe DTS uses hardware register values directly in pin controller pin configuration and not an abstraction of any form.
These definitions were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings.
Store the constants in a header next to DTS and use them instead of bindings.
---
Changes since V1:
- Updated $subject and $commit-message
- Dropped the deletion of bindings header (instead followon patch provides a deprecation warning)
- NOTE: checkpatch insists the following error exists:
ERROR: Macros with complex values should be enclosed in parentheses However, as explained in patches to include/dt-bindings/pinctrl/k3.h, we do not need parentheses enclosing the values for this macro as we do intend it to generate two separate values as has been done for other similar platforms.
V1: https://lore.kernel.org/linux-arm-kernel/[email protected]/
arch/arm64/boot/dts/ti/k3-am62.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-am62a.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-am64.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-am65.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-j7200.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-j721e.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-j721s2.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-j784s4.dtsi | 3 +- arch/arm64/boot/dts/ti/k3-pinctrl.h | 53 +++++++++++++++++++++++++++ 9 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 arch/arm64/boot/dts/ti/k3-pinctrl.h
arch/arm64/boot/dts/ti/k3-am62.dtsi +2 -1
@@ -8,9 +8,10 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 AM625 SoC"; compatible = "ti,am625";
arch/arm64/boot/dts/ti/k3-am62a.dtsi +2 -1
@@ -8,9 +8,10 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 AM62A SoC"; compatible = "ti,am62a7";
arch/arm64/boot/dts/ti/k3-am64.dtsi +2 -1
@@ -8,9 +8,10 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 AM642 SoC"; compatible = "ti,am642";
arch/arm64/boot/dts/ti/k3-am65.dtsi +2 -1
@@ -8,9 +8,10 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 AM654 SoC"; compatible = "ti,am654";
arch/arm64/boot/dts/ti/k3-j7200.dtsi +2 -1
@@ -7,9 +7,10 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 J7200 SoC"; compatible = "ti,j7200";
arch/arm64/boot/dts/ti/k3-j721e.dtsi +2 -1
@@ -7,9 +7,10 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 J721E SoC"; compatible = "ti,j721e";
arch/arm64/boot/dts/ti/k3-j721s2.dtsi +2 -1
@@ -10,9 +10,10 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 J721S2 SoC";
arch/arm64/boot/dts/ti/k3-j784s4.dtsi +2 -1
@@ -10,9 +10,10 @@ #include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/arm-gic.h> -#include <dt-bindings/pinctrl/k3.h> #include <dt-bindings/soc/ti,sci_pm_domain.h> +#include "k3-pinctrl.h" + / { model = "Texas Instruments K3 J784S4 SoC"; compatible = "ti,j784s4";
arch/arm64/boot/dts/ti/k3-pinctrl.h new file +53 -0
53 lines not on this page · raw message
Signature · 1 line
2.40.0
Re: [PATCH V2 2/3] arm64: dts: ti: Use local header for pinctrl register values
Quoted 7 lines · Nishanth Menon
The DTS uses hardware register values directly in pin controller pin configuration and not an abstraction of any form.
These definitions were previously put in the bindings header to avoid code duplication and to provide some context meaning (name), but they do not fit the purpose of bindings.
Quoted 8 lines
Store the constants in a header next to DTS and use them instead of bindings.
Suggested-by Krzysztof Kozlowski <[email protected]>Suggested-by Linus Walleij <[email protected]>Signed-off-by Nishanth Menon <[email protected]>---
Best regards,
Krzysztof
Nishanth Menon
maintainerPATCH v2 3/3 dt-bindings: pinctrl: k3: Deprecate header with register constants
In reply to Nishanth MenonFor convenience (less code duplication), the pin controller pin configuration register values were defined in the bindings header. These are not some IDs or other abstraction layer but raw numbers used in the registers.
These constants do not fit the purpose of bindings. They do not provide any abstraction, any hardware and driver independent ID. In fact, the Linux pinctrl-single driver actually do not use the bindings header at all.
All of the constants were moved already to headers local to DTS (residing in DTS directory), so remove any references to the bindings header and add a warning that it is deprecated.
---
New patch in V2 series and we expect to remove this header after a kernel rev.
include/dt-bindings/pinctrl/k3.h | 7 +++++++ 1 file changed, 7 insertions(+)
include/dt-bindings/pinctrl/k3.h +7 -0
@@ -8,6 +8,13 @@#ifndef _DT_BINDINGS_PINCTRL_TI_K3_H#define _DT_BINDINGS_PINCTRL_TI_K3_H +/* +* These bindings are deprecated, because they do not match the actual +* concept of bindings but rather contain pure register values. +* Instead include the header in the DTS source directory. +*/ +#warning "These bindings are deprecated. Instead, use the header in the DTS source directory." +#define PULLUDEN_SHIFT (16)#define PULLTYPESEL_SHIFT (17)#define RXACTIVE_SHIFT (18)
Signature · 1 line
2.40.0
Re: [PATCH V2 3/3] dt-bindings: pinctrl: k3: Deprecate header with register constants
Quoted 17 lines · Nishanth Menon
For convenience (less code duplication), the pin controller pin configuration register values were defined in the bindings header. These are not some IDs or other abstraction layer but raw numbers used in the registers.
These constants do not fit the purpose of bindings. They do not provide any abstraction, any hardware and driver independent ID. In fact, the Linux pinctrl-single driver actually do not use the bindings header at all.
All of the constants were moved already to headers local to DTS (residing in DTS directory), so remove any references to the bindings header and add a warning that it is deprecated.
Quoted 6 lines
---
New patch in V2 series and we expect to remove this header after a kernel rev.include/dt-bindings/pinctrl/k3.h | 7 +++++++ 1 file changed, 7 insertions(+)
This should go to the same branch as DTS, so not pinctrl tree, to avoid warnings.
Best regards,
Krzysztof
Quoted 4 lines · Nishanth Menon
This is an updated series to move the pinctrl bindings over to arch as the definitions are hardware definitions without driver usage.
This series was triggered by the discussion in [1]
As mentioned by the DT maintainer I think this best all go into the same tree as the DTS files, so let's merge it all through the TI SoC tree.
Yours,
Linus Walleij
Hi Nishanth Menon,
Quoted 8 lines · Nishanth Menon
This is an updated series to move the pinctrl bindings over to arch as the definitions are hardware definitions without driver usage.
This series was triggered by the discussion in [1]
v1: https://lore.kernel.org/linux-arm-kernel/[email protected]/
[...]
I have applied the following to branch ti-k3-dts-next on [1]. Thank you!
[1/3] dt-bindings: net: ti: k3-am654-cpsw-nuss: Drop pinmux header
commit: c680fa2a09a9550284546d2deeb31640ec3b56c8
[2/3] arm64: dts: ti: Use local header for pinctrl register values
commit: fe49f2d776f7994dc60dd04712a437fd0bdc67a0
[3/3] dt-bindings: pinctrl: k3: Deprecate header with register constants
commit: f2de003e1426ccbefa281a066040da7699f6d461All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
[1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D