ARM: dts/keystone: Introduce SoC specific compatible matches
Subsystems (4)
Nishanth Menon
maintainercover ARM: dts/keystone: Introduce SoC specific compatible matches
Hi,
Here is a series that introduces keystone SoC specific compatible flags
Series based on v4.3-rc1.
Test log(merge on master): http://paste.ubuntu.org.cn/3462285 (note netcp seems to freezeup after a while into boot. debug not complete on that yet - boots fine with a minimal system..)
Nishanth Menon (3):
Documentation: dt: keystone: provide SoC specific compatible flags
ARM: keystone: Update compatible to have SoC specific matches
ARM: dts: keystone: Update SoC specific compatible flags
.../devicetree/bindings/arm/keystone/keystone.txt | 20 +++++++++++++++++--- arch/arm/boot/dts/k2e-evm.dts | 2 +- arch/arm/boot/dts/k2e.dtsi | 3 +++ arch/arm/boot/dts/k2hk-evm.dts | 2 +- arch/arm/boot/dts/k2hk.dtsi | 3 +++ arch/arm/boot/dts/k2l-evm.dts | 2 +- arch/arm/boot/dts/k2l.dtsi | 3 +++ arch/arm/boot/dts/keystone.dtsi | 1 + arch/arm/mach-keystone/keystone.c | 3 +++ 9 files changed, 33 insertions(+), 6 deletions(-)
Signature · 1 line
2.1.4
Nishanth Menon
maintainerPATCH 1/3 Documentation: dt: keystone: provide SoC specific compatible flags
Keystone2 devices are used on more platforms than just Texas Instruments reference evaluation platforms called EVMs. Providing a generic compatible "ti,keystone" is not sufficient to differentiate various SoC definitions possible on various platforms. So, provide compatible matches for each SoC family by itself.
This allows SoC specific logic to be run time handled based on of_machine_is_compatible("ti,k2hk") or as needed for the dependent processor instead of needing to use board dependent compatibles that are needed now.
--- .../devicetree/bindings/arm/keystone/keystone.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/arm/keystone/keystone.txt +17 -3
@@ -9,12 +9,26 @@ Required properties: the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 type UART should use the specified compatible for those devices. +SoC families: + +- Keystone 2 generic SoC: + compatible = "ti,keystone" + +SoCs: + +- Keystone 2 Hawking/Kepler + compatible = ti,k2hk", "ti,keystone" +- Keystone 2 Lamarr + compatible = ti,k2l", "ti,keystone" +- Keystone 2 Edison + compatible = ti,k2e", "ti,keystone" + Boards: - Keystone 2 Hawking/Kepler EVM - compatible = "ti,k2hk-evm","ti,keystone" + compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone" - Keystone 2 Lamarr EVM - compatible = "ti,k2l-evm","ti,keystone" + compatible = "ti,k2l-evm", "ti, k2l", "ti,keystone" - Keystone 2 Edison EVM - compatible = "ti,k2e-evm","ti,keystone" + compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone"
Signature · 1 line
2.1.4
Nishanth Menon
maintainerPATCH 2/3 ARM: keystone: Update compatible to have SoC specific matches
In reply to Nishanth MenonWith future SoCs of keystone2 family, the generic compatible match may not be sufficient to handle SoC specific handling. So introduce matches based on SoC compatiblity.
--- arch/arm/mach-keystone/keystone.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-keystone/keystone.c +3 -0
@@ -97,6 +97,9 @@ static long long __init keystone_pv_fixup(void) }static const char *const keystone_match[]__initconst = { +"ti,k2hk" , +"ti,k2e" , +"ti,k2l" ,"ti,keystone" ,NULL , };
Signature · 1 line
2.1.4
Nishanth Menon
maintainerPATCH 3/3 ARM: dts: keystone: Update SoC specific compatible flags
In reply to Nishanth MenonUpdate the compatible flags to allow specific SoC identification.
--- arch/arm/boot/dts/k2e-evm.dts | 2 +- arch/arm/boot/dts/k2e.dtsi | 3 +++ arch/arm/boot/dts/k2hk-evm.dts | 2 +- arch/arm/boot/dts/k2hk.dtsi | 3 +++ arch/arm/boot/dts/k2l-evm.dts | 2 +- arch/arm/boot/dts/k2l.dtsi | 3 +++ arch/arm/boot/dts/keystone.dtsi | 1 + 7 files changed, 13 insertions(+), 3 deletions(-)
arch/arm/boot/dts/k2e-evm.dts +1 -1
@@ -13,7 +13,7 @@ #include "k2e.dtsi" / { - compatible = "ti,k2e-evm","ti,keystone"; + compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone"; model = "Texas Instruments Keystone 2 Edison EVM"; soc {
arch/arm/boot/dts/k2e.dtsi +3 -0
@@ -9,6 +9,9 @@ */ / { + compatible = "ti,k2e", "ti,keystone"; + model = "Texas Instruments Keystone 2 Edison SoC"; + cpus { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/k2hk-evm.dts +1 -1
@@ -13,7 +13,7 @@ #include "k2hk.dtsi" / { - compatible = "ti,k2hk-evm","ti,keystone"; + compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone"; model = "Texas Instruments Keystone 2 Kepler/Hawking EVM"; soc {
arch/arm/boot/dts/k2hk.dtsi +3 -0
@@ -9,6 +9,9 @@ */ / { + compatible = "ti,k2hk", "ti,keystone"; + model = "Texas Instruments Keystone 2 Kepler/Hawking SoC"; + cpus { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/k2l-evm.dts +1 -1
@@ -13,7 +13,7 @@ #include "k2l.dtsi" / { - compatible = "ti,k2l-evm","ti,keystone"; + compatible = "ti,k2l-evm", "ti,k2l", "ti,keystone"; model = "Texas Instruments Keystone 2 Lamarr EVM"; soc {
arch/arm/boot/dts/k2l.dtsi +3 -0
@@ -9,6 +9,9 @@ */ / { + compatible = "ti,k2l", "ti,keystone"; + model = "Texas Instruments Keystone 2 Lamarr SoC"; + cpus { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/keystone.dtsi +1 -0
@@ -12,6 +12,7 @@ #include "skeleton.dtsi" / { + compatible = "ti,keystone"; model = "Texas Instruments Keystone 2 SoC"; #address-cells = <2>; #size-cells = <2>;
Signature · 1 line
2.1.4
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to Nishanth MenonQuoted 41 lines · Nishanth Menon
Keystone2 devices are used on more platforms than just Texas Instruments reference evaluation platforms called EVMs. Providing a generic compatible "ti,keystone" is not sufficient to differentiate various SoC definitions possible on various platforms. So, provide compatible matches for each SoC family by itself.
This allows SoC specific logic to be run time handled based on
of_machine_is_compatible("ti,k2hk")or as needed for the dependent processor instead of needing to use board dependent compatibles that are needed now.Signed-off-by Nishanth Menon <[email protected]>--- .../devicetree/bindings/arm/keystone/keystone.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)Documentation/devicetree/bindings/arm/keystone/keystone.txt +14
-0@@ -9,12 +9,26 @@ Required properties: the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 type UART should use the specified compatible for those devices. +SoC families: + +- Keystone 2 generic SoC: + compatible = "ti,keystone" + +SoCs: + +- Keystone 2 Hawking/Kepler + compatible = ti,k2hk", "ti,keystone" +- Keystone 2 Lamarr + compatible = ti,k2l", "ti,keystone" +- Keystone 2 Edison + compatible = ti,k2e", "ti,keystone" + Boards: - Keystone 2 Hawking/Kepler EVM
Documentation/devicetree/bindings/arm/keystone/keystone.txt Required properties: · line 34
Quoted 10 lines
Documentation/devicetree/bindings/arm/keystone/keystone.txt +3
-3- compatible = "ti,k2hk-evm","ti,keystone" + compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone" - Keystone 2 Lamarr EVM - compatible = "ti,k2l-evm","ti,keystone" + compatible = "ti,k2l-evm", "ti, k2l", "ti,keystone" - Keystone 2 Edison EVM - compatible = "ti,k2e-evm","ti,keystone" + compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone"
DTS takes care of the difference in the hardware and If there SoC specific customization required outside this, then it is best to include this as part of that change. In the past, I believe we didn't do it due to the same reason as above.
Murali
Signature · 2 lines
Murali Karicheri Linux Kernel, Keystone
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to Nishanth MenonNishant,
Quoted 6 lines · Nishanth Menon
Keystone2 devices are used on more platforms than just Texas Instruments reference evaluation platforms called EVMs. Providing a generic compatible "ti,keystone" is not sufficient to differentiate various SoC definitions possible on various platforms. So, provide compatible matches for each SoC family by itself.
Quoted 7 lines
This allows SoC specific logic to be run time handled based on
of_machine_is_compatible("ti,k2hk")or as needed for the dependent processor instead of needing to use board dependent compatibles that are needed now.Signed-off-by Nishanth Menon <[email protected]>---
You need to expand that 'not sufficient' for me. Unless there is genuine case to support this, I would want to avoid this churn.
Regards,
Santosh
Nishanth Menon
maintainerRe: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to Murali KaricheriQuoted 1 line · Murali Karicheri
On 09/22/2015 12:08 PM, Nishanth Menon wrote:
[...]
Quoted 34 lines
Quoted 34 lines
diff --git
a/Documentation/devicetree/bindings/arm/keystone/keystone.txtb/Documentation/devicetree/bindings/arm/keystone/keystone.txtindex59d7a46f85eb..800d2d02e27b100644Documentation/devicetree/bindings/arm/keystone/keystone.txt +0
-0@@ -9,12 +9,26 @@ Required properties: the form "ti,keystone-*". Generic devices like gic, arch_timers,ns16550
type UART should use the specified compatible for those devices.Documentation/devicetree/bindings/arm/keystone/keystone.txt +16
-2+SoC families: + +- Keystone 2 generic SoC: + compatible = "ti,keystone" + +SoCs: + +- Keystone 2 Hawking/Kepler + compatible = ti,k2hk", "ti,keystone" +- Keystone 2 Lamarr + compatible = ti,k2l", "ti,keystone" +- Keystone 2 Edison + compatible = ti,k2e", "ti,keystone" + Boards: - Keystone 2 Hawking/Kepler EVM - compatible = "ti,k2hk-evm","ti,keystone" + compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone" - Keystone 2 Lamarr EVM - compatible = "ti,k2l-evm","ti,keystone" + compatible = "ti,k2l-evm", "ti, k2l", "ti,keystone"
Quoted 8 lines
Documentation/devicetree/bindings/arm/keystone/keystone.txt Required properties: · line 34
Quoted 4 lines
- Keystone 2 Edison EVM
Documentation/devicetree/bindings/arm/keystone/keystone.txt +1
-1- compatible = "ti,k2e-evm","ti,keystone" + compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone"DTS takes care of the difference in the hardware and If there SoC specific customization required outside this, then it is best to include this as part of that change. In the past, I believe we didn't do it due to the same reason as above.
Right now, they all claim to be the same keystone SoC -> which is inaccurate at the very least, and downright wrong IMHO since k2e/hk and l are different SoCs - even though they belong to keystone family, they are as similar as OMAP4 is to OMAP5 is to DRA7. This is similar to how various other SoCs distinguish between SoCs as well.
Signature · 2 lines
Regards, Nishanth Menon
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to santosh shilimkarQuoted 14 lines · santosh shilimkar
Nishant,
Quoted 11 lines · Nishanth Menon
Keystone2 devices are used on more platforms than just Texas Instruments reference evaluation platforms called EVMs. Providing a generic compatible "ti,keystone" is not sufficient to differentiate various SoC definitions possible on various platforms. So, provide compatible matches for each SoC family by itself.
This allows SoC specific logic to be run time handled based on
of_machine_is_compatible("ti,k2hk")or as needed for the dependent processor instead of needing to use board dependent compatibles that are needed now.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Nishanth Menon <[email protected]>---
You need to expand that 'not sufficient' for me. Unless there is genuine case to support this, I would want to avoid this churn.
I agree. If there are run time check required in code to treat the variants of Keystone SoC differently, then this change is needed. At this time, SoC DTS captures these differences. IMHO, If a future Keystone SoC support required SoC specific compatibility string to customize SoC specific initialization code, then it can be introduced at that time. I am not sure why this is introduced with out an example usage.
Quoted 9 lines
Regards,
Santosh_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 2 lines
Murali Karicheri Linux Kernel, Keystone
Nishanth Menon
maintainerRe: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
Quoted 21 lines · Murali Karicheri
Quoted 14 lines · santosh shilimkar
Nishant,
Quoted 11 lines · Nishanth Menon
Keystone2 devices are used on more platforms than just Texas Instruments reference evaluation platforms called EVMs. Providing a generic compatible "ti,keystone" is not sufficient to differentiate various SoC definitions possible on various platforms. So, provide compatible matches for each SoC family by itself.
This allows SoC specific logic to be run time handled based on
of_machine_is_compatible("ti,k2hk")or as needed for the dependent processor instead of needing to use board dependent compatibles that are needed now.Quoted 5 lines
Quoted 2 lines
Signed-off-by Nishanth Menon <[email protected]>---
You need to expand that 'not sufficient' for me. Unless there is genuine case to support this, I would want to avoid this churn.
Quoted 6 lines
I agree. If there are run time check required in code to treat the variants of Keystone SoC differently, then this change is needed. At this time, SoC DTS captures these differences. IMHO, If a future Keystone SoC support required SoC specific compatibility string to customize SoC specific initialization code, then it can be introduced at that time. I am not sure why this is introduced with out an example usage.
a) See
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/usage-model.txt#n116
-> all we have today is board, soc generic family. The generic compatible flag of ti,keystone to mark that this is a keystone2 device does not identify that what kind of soc it is. which is what this series introduces.
b) there is no realistic way for user space applications such as a test framework or other SoC based applications in a generic distro to detect the right SoC this platform is running on - imagine writing SoC specific code that depends on board compatible flags - there is never an end to that story as the number of boards expand.
c) Ideally we will try never to introduce code that will have to depend on SoC compatible flag based match in kernel - but that is not a reason not to follow guidelines provided by devicetree documentation to provide SoC specific compatible flags.
Signature · 2 lines
Regards, Nishanth Menon
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
Nishanth,
Quoted 42 lines · Nishanth Menon
Quoted 21 lines · Murali Karicheri
Quoted 14 lines · santosh shilimkar
Nishant,
Quoted 11 lines · Nishanth Menon
Keystone2 devices are used on more platforms than just Texas Instruments reference evaluation platforms called EVMs. Providing a generic compatible "ti,keystone" is not sufficient to differentiate various SoC definitions possible on various platforms. So, provide compatible matches for each SoC family by itself.
This allows SoC specific logic to be run time handled based on
of_machine_is_compatible("ti,k2hk")or as needed for the dependent processor instead of needing to use board dependent compatibles that are needed now.Quoted 5 lines
Quoted 2 lines
Signed-off-by Nishanth Menon <[email protected]>---
You need to expand that 'not sufficient' for me. Unless there is genuine case to support this, I would want to avoid this churn.
Quoted 6 lines
I agree. If there are run time check required in code to treat the variants of Keystone SoC differently, then this change is needed. At this time, SoC DTS captures these differences. IMHO, If a future Keystone SoC support required SoC specific compatibility string to customize SoC specific initialization code, then it can be introduced at that time. I am not sure why this is introduced with out an example usage.
a) See
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/usage-model.txt#n116
-> all we have today is board, soc generic family. The generic compatible flag of ti,keystone to mark that this is a keystone2 device does not identify that what kind of soc it is. which is what this series introduces.b) there is no realistic way for user space applications such as a test framework or other SoC based applications in a generic distro to detect the right SoC this platform is running on - imagine writing SoC specific code that depends on board compatible flags - there is never an end to that story as the number of boards expand.
Quoted 5 lines
c) Ideally we will try never to introduce code that will have to depend on SoC compatible flag based match in kernel - but that is not a reason not to follow guidelines provided by devicetree documentation to provide SoC specific compatible flags.
Thanks for pointing out the link which provided me some thing to cross check my argument.
The relevant description from the above quoted below for discussion. ===================== Cut from the above ===============================
The 'compatible' property contains a sorted list of strings starting with the exact name of the machine, followed by an optional list of boards it is compatible with sorted from most compatible to least. For example, the root compatible properties for the TI BeagleBoard and its successor, the BeagleBoard xM board might look like, respectively:
compatible = "ti,omap3-beagleboard", "ti,omap3450", "ti,omap3"; compatible = "ti,omap3-beagleboard-xm", "ti,omap3450", "ti,omap3";
Where "ti,omap3-beagleboard-xm" specifies the exact model, it also claims that it compatible with the OMAP 3450 SoC, and the omap3 family of SoCs in general. You'll notice that the list is sorted from most specific (exact board) to least specific (SoC family).
=======================================================================
So in keystone case, we have
"ti,k2hk-evm","ti,keystone";
IMO, this is consistent with the above description as ti,k2hk-evm describes the board exactly and ti,keystone is the optional list which is a generic SoC name.
=========================== Cut from the above==========================
The reasoning behind this scheme is the observation that in the majority of cases, a single machine_desc can support a large number of boards if they all use the same SoC, or same family of SoCs. However, invariably there will be some exceptions where a specific board will require special setup code that is not useful in the generic case. Special cases could be handled by explicitly checking for the troublesome board(s) in generic setup code, but doing so very quickly becomes ugly and/or unmaintainable if it is more than just a couple of cases.
Instead, the compatible list allows a generic machine_desc to provide support for a wide common set of boards by specifying "less compatible" values in the dt_compat list. In the example above, generic board support can claim compatibility with "ti,omap3" or "ti,omap3450". If a bug was discovered on the original beagleboard that required special workaround code during early boot, then a new machine_desc could be added which implements the workarounds and only matches on "ti,omap3-beagleboard".
=======================================================================
This is how interpret the above.
ti,omap3 is the family of omap3 devices similar to keystone. ti,omap3450 is required if there is an exceptional treatment required for ti,omap3450.
In keystone case so far there is no case of exceptional treatment required in the code for a specific SoC. So a generic name, ti,keystone is used. When exceptional treatment is needed in the future, for example k2hk Soc, we should introduce SoC specific string in the following order.
"ti,k2hk-evm", "ti,k2hk", "ti,keystone"
So unless there is an exception, there is no need for a SoC specific string in the compatibility string list. So this can be added later if there is need for exceptional treatment. Did I get it wrong?
Signature · 2 lines
Murali Karicheri Linux Kernel, Keystone
Nishanth Menon
maintainerRe: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
On 09/24/2015 10:54 AM, Murali Karicheri wrote:
[...]
Quoted 7 lines
ti,omap3 is the family of omap3 devices similar to keystone. ti,omap3450 is required if there is an exceptional treatment required for ti,omap3450.
In keystone case so far there is no case of exceptional treatment required in the code for a specific SoC. So a generic name, ti,keystone is used. When exceptional treatment is needed in the future, for example k2hk Soc, we should introduce SoC specific string in the following order.
Did you do a grep on the code to see?
$ git grep ti,omap3 arch/arm/mach-omap2/
arch/arm/mach-omap2/board-generic.c: "ti,omap3430",
arch/arm/mach-omap2/board-generic.c: "ti,omap3",
arch/arm/mach-omap2/board-generic.c: "ti,omap36xx",
arch/arm/mach-omap2/board-generic.c: "ti,omap3-beagle",This is the same as keystone's device support. even though only 36xx was needed, we introduced other SoC specific compatibility match.
Quoted 6 lines
"ti,k2hk-evm", "ti,k2hk", "ti,keystone"
So unless there is an exception, there is no need for a SoC specific string in the compatibility string list. So this can be added later if there is need for exceptional treatment. Did I get it wrong?
I see both your views seem to be "if we dont need a compatible" dont add it. My view was based on "be accurate in the hardware description"
OK - i will probably agree on the topic. But, how about userspace needing to know which SoC they are on, without needing to depend on board->soc mapping? How do we help resolve that?
Signature · 2 lines
Regards, Nishanth Menon
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
Quoted 27 lines · Nishanth Menon
On 09/24/2015 10:54 AM, Murali Karicheri wrote:
[...]Quoted 7 lines
ti,omap3 is the family of omap3 devices similar to keystone. ti,omap3450 is required if there is an exceptional treatment required for ti,omap3450.
In keystone case so far there is no case of exceptional treatment required in the code for a specific SoC. So a generic name, ti,keystone is used. When exceptional treatment is needed in the future, for example k2hk Soc, we should introduce SoC specific string in the following order.
Did you do a grep on the code to see?
$ git grep ti,omap3 arch/arm/mach-omap2/ arch/arm/mach-omap2/board-generic.c: "ti,omap3430", arch/arm/mach-omap2/board-generic.c: "ti,omap3", arch/arm/mach-omap2/board-generic.c: "ti,omap36xx", arch/arm/mach-omap2/board-generic.c: "ti,omap3-beagle",This is the same as keystone's device support. even though only 36xx was needed, we introduced other SoC specific compatibility match.
Quoted 6 lines
"ti,k2hk-evm", "ti,k2hk", "ti,keystone"
So unless there is an exception, there is no need for a SoC specific string in the compatibility string list. So this can be added later if there is need for exceptional treatment. Did I get it wrong?
Quoted 7 lines
I see both your views seem to be "if we dont need a compatible" dont add it. My view was based on "be accurate in the hardware description"
OK - i will probably agree on the topic. But, how about userspace needing to know which SoC they are on, without needing to depend on
board->socmapping? How do we help resolve that?
Why the user space should care about exact SOC ?
Nishanth Menon
maintainerRe: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
Quoted 1 line · santosh shilimkar
On 9/25/2015 7:50 AM, Nishanth Menon wrote:
[...]
Quoted 5 lines
Quoted 4 lines
But, how about userspace
needing to know which SoC they are on, without needing to depend onboard->socmapping? How do we help resolve that?Why the user space should care about exact SOC ?
examples vary - trivial one is: debug tools like omapconf[1] or testing tools like opentest[2] need some standard way to ensure Linux kernel is functional - trusting the least set of parameters is usually what we would prefer. while building a generic distro such as debian or yocto, one prefers NOT to need to do a package build per SoC/perboard - that never scales. instead, you'd like the same application run on different systems dynamically.
[1] https://github.com/omapconf/omapconf
[2] http://arago-project.org/wiki/index.php/Opentest
Signature · 2 lines
Regards, Nishanth Menon
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
Quoted 9 lines · Nishanth Menon
Quoted 1 line · santosh shilimkar
On 9/25/2015 7:50 AM, Nishanth Menon wrote:
[...]
Quoted 5 lines
Quoted 4 lines
But, how about userspace
needing to know which SoC they are on, without needing to depend onboard->socmapping? How do we help resolve that?Why the user space should care about exact SOC ?
Quoted 8 lines
examples vary - trivial one is: debug tools like omapconf[1] or testing tools like opentest[2] need some standard way to ensure Linux kernel is functional - trusting the least set of parameters is usually what we would prefer. while building a generic distro such as debian or yocto, one prefers NOT to need to do a package build per SoC/perboard - that never scales. instead, you'd like the same application run on different systems dynamically.
I guessed omapconf example is coming though Keystone has no such tool yet ;-). Opentest shouldn't need that info either.
I do agree that having a soc along with board is useful in longer run to accommodation more boards and variants. And only on that merit, I am willing to take these patches.
Please refresh the series commit messages based on the discussion so far and repost. Will pick it up then.
Regards,
Santosh
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
Quoted 18 lines · santosh shilimkar
Quoted 9 lines · Nishanth Menon
Quoted 1 line · santosh shilimkar
On 9/25/2015 7:50 AM, Nishanth Menon wrote:
[...]
Quoted 5 lines
Quoted 4 lines
But, how about userspace
needing to know which SoC they are on, without needing to depend onboard->socmapping? How do we help resolve that?Why the user space should care about exact SOC ?
Quoted 8 lines
examples vary - trivial one is: debug tools like omapconf[1] or testing tools like opentest[2] need some standard way to ensure Linux kernel is functional - trusting the least set of parameters is usually what we would prefer. while building a generic distro such as debian or yocto, one prefers NOT to need to do a package build per SoC/perboard - that never scales. instead, you'd like the same application run on different systems dynamically.
Quoted 1 line
I guessed omapconf example is coming though Keystone has no such tool
:) That is true - as of now. maynot be the case for future.
Quoted 1 line
yet ;-). Opentest shouldn't need that info either.
we did debate this on opentest, but we could not implement anything since we did not have a consistent solution yet.
Quoted 7 lines
I do agree that having a soc along with board is useful in longer run to accommodation more boards and variants. And only on that merit, I am willing to take these patches.
Please refresh the series commit messages based on the discussion so far and repost. Will pick it up then.
Thanks. I will do so (probably early next week)..
Signature · 2 lines
Regards, Nishanth Menon
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to Nishanth MenonQuoted 6 lines · Nishanth Menon
Quoted 1 line · santosh shilimkar
On 9/25/2015 7:50 AM, Nishanth Menon wrote:
[...]
Quoted 3 lines
Quoted 3 lines
But, how about userspace
needing to know which SoC they are on, without needing to depend onboard->socmapping? How do we help resolve that?
Believe it or not, user space tools that are custom to a specific SoC would require such knowledge. So I agree on this front that a SoC specific compatibility is cool to have. I think that should have been clear in the commit description.
My Acked-By: Murali Karicheri <[email protected]>
Quoted 15 lines
Quoted 2 lines
Quoted 1 line
Why the user space should care about exact SOC ?
examples vary - trivial one is: debug tools like omapconf[1] or testing tools like opentest[2] need some standard way to ensure Linux kernel is functional - trusting the least set of parameters is usually what we would prefer. while building a generic distro such as debian or yocto, one prefers NOT to need to do a package build per SoC/perboard - that never scales. instead, you'd like the same application run on different systems dynamically.
[1] https://github.com/omapconf/omapconf
[2] http://arago-project.org/wiki/index.php/Opentest
Signature · 2 lines
Murali Karicheri Linux Kernel, Keystone
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to Nishanth MenonNishant,
Quoted 2 lines · Nishanth Menon
Quoted 1 line · santosh shilimkar
9/25/2015 9:01 AM, Nishanth Menon wrote:
[..]
Quoted 5 lines
Quoted 3 lines
Please refresh the series commit messages based on the discussion so far and repost. Will pick it up then.
Thanks. I will do so (probably early next week)..
Just want to check if you have series ready. I was planning to make queue ready over the weekend for upcoming merge window. I can hold that for another week though so let me know.
Regards,
Santosh
Nishanth Menon
maintainerv2 cover ARM: dts/keystone: Introduce SoC specific compatible matches
In reply to Nishanth MenonHi,
Round 2 of the series with updated patch #1. This series introduces SoC specific dt compatible property to allow for future SoCs to be handled and for userspace applications that can introduce features based on SoC they are functioning on.
V1 of the series: http://marc.info/?l=devicetree&m=144309031109988&w=2
V2 of the series has the following changes:
- updated commit message in patch #1
- picked up acked-by for patch #1
Series based on v4.3-rc1
Tested on v4.3-rc3: http://pastebin.ubuntu.com/12659000/
Nishanth Menon (3):
Documentation: dt: keystone: provide SoC specific compatible flags
ARM: keystone: Update compatible to have SoC specific matches
ARM: dts: keystone: Update SoC specific compatible flags
.../devicetree/bindings/arm/keystone/keystone.txt | 20 +++++++++++++++++--- arch/arm/boot/dts/k2e-evm.dts | 2 +- arch/arm/boot/dts/k2e.dtsi | 3 +++ arch/arm/boot/dts/k2hk-evm.dts | 2 +- arch/arm/boot/dts/k2hk.dtsi | 3 +++ arch/arm/boot/dts/k2l-evm.dts | 2 +- arch/arm/boot/dts/k2l.dtsi | 3 +++ arch/arm/boot/dts/keystone.dtsi | 1 + arch/arm/mach-keystone/keystone.c | 3 +++ 9 files changed, 33 insertions(+), 6 deletions(-)
Signature · 1 line
2.1.4
Nishanth Menon
maintainerPATCH v2 1/3 Documentation: dt: keystone: provide SoC specific compatible flags
Keystone2 devices are used on more platforms than just Texas Instruments reference evaluation platforms called EVMs. Providing a generic compatible "ti,keystone" is not sufficient to differentiate various SoC definitions possible on various platforms for the following reasons:
a) Userspace applications have no way of knowing which SoC they are functioning, providing the compatible matches provide a mechanism for them to enable SoC specific functionality. Such userspace applications are typically automated test framework or SoC custom hardware acceleration entitlement from a common file system.
b) Provides an accurate hardware description. This allows SoC specific logic to be run time handled based on of_machine_is_compatible("ti,k2hk") or as needed for the dependent processor instead of needing to use board dependent compatibles that are needed now.
Hence, provide compatible matches for each SoC in the Keystone family.
---
Changes since V2:
- elaborated reasoning why this change is useful - highlighted potential userspace usage as well.
- picked up Acked-by from Murali
V1: https://patchwork.kernel.org/patch/7240891/
.../devicetree/bindings/arm/keystone/keystone.txt | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/arm/keystone/keystone.txt +17 -3
@@ -9,12 +9,26 @@ Required properties: the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 type UART should use the specified compatible for those devices. +SoC families: + +- Keystone 2 generic SoC: + compatible = "ti,keystone" + +SoCs: + +- Keystone 2 Hawking/Kepler + compatible = ti,k2hk", "ti,keystone" +- Keystone 2 Lamarr + compatible = ti,k2l", "ti,keystone" +- Keystone 2 Edison + compatible = ti,k2e", "ti,keystone" + Boards: - Keystone 2 Hawking/Kepler EVM - compatible = "ti,k2hk-evm","ti,keystone" + compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone" - Keystone 2 Lamarr EVM - compatible = "ti,k2l-evm","ti,keystone" + compatible = "ti,k2l-evm", "ti, k2l", "ti,keystone" - Keystone 2 Edison EVM - compatible = "ti,k2e-evm","ti,keystone" + compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone"
Signature · 1 line
2.1.4
Nishanth Menon
maintainerPATCH v2 2/3 ARM: keystone: Update compatible to have SoC specific matches
In reply to Nishanth MenonWith future SoCs of keystone2 family, the generic compatible match may not be sufficient to handle SoC specific handling. So introduce matches based on SoC compatiblity.
---
Changes in V2:
- reformatting of commit message. no functional change
V1: https://patchwork.kernel.org/patch/7240901/
arch/arm/mach-keystone/keystone.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-keystone/keystone.c +3 -0
@@ -97,6 +97,9 @@ static long long __init keystone_pv_fixup(void) }static const char *const keystone_match[]__initconst = { +"ti,k2hk" , +"ti,k2e" , +"ti,k2l" ,"ti,keystone" ,NULL , };
Signature · 1 line
2.1.4
Nishanth Menon
maintainerPATCH v2 3/3 ARM: dts: keystone: Update SoC specific compatible flags
In reply to Nishanth MenonUpdate the compatible flags to allow specific SoC identification.
---
V2: No change
V1: https://patchwork.kernel.org/patch/7240911/
arch/arm/boot/dts/k2e-evm.dts | 2 +- arch/arm/boot/dts/k2e.dtsi | 3 +++ arch/arm/boot/dts/k2hk-evm.dts | 2 +- arch/arm/boot/dts/k2hk.dtsi | 3 +++ arch/arm/boot/dts/k2l-evm.dts | 2 +- arch/arm/boot/dts/k2l.dtsi | 3 +++ arch/arm/boot/dts/keystone.dtsi | 1 + 7 files changed, 13 insertions(+), 3 deletions(-)
arch/arm/boot/dts/k2e-evm.dts +1 -1
@@ -13,7 +13,7 @@ #include "k2e.dtsi" / { - compatible = "ti,k2e-evm","ti,keystone"; + compatible = "ti,k2e-evm", "ti,k2e", "ti,keystone"; model = "Texas Instruments Keystone 2 Edison EVM"; soc {
arch/arm/boot/dts/k2e.dtsi +3 -0
@@ -9,6 +9,9 @@ */ / { + compatible = "ti,k2e", "ti,keystone"; + model = "Texas Instruments Keystone 2 Edison SoC"; + cpus { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/k2hk-evm.dts +1 -1
@@ -13,7 +13,7 @@ #include "k2hk.dtsi" / { - compatible = "ti,k2hk-evm","ti,keystone"; + compatible = "ti,k2hk-evm", "ti,k2hk", "ti,keystone"; model = "Texas Instruments Keystone 2 Kepler/Hawking EVM"; soc {
arch/arm/boot/dts/k2hk.dtsi +3 -0
@@ -9,6 +9,9 @@ */ / { + compatible = "ti,k2hk", "ti,keystone"; + model = "Texas Instruments Keystone 2 Kepler/Hawking SoC"; + cpus { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/k2l-evm.dts +1 -1
@@ -13,7 +13,7 @@ #include "k2l.dtsi" / { - compatible = "ti,k2l-evm","ti,keystone"; + compatible = "ti,k2l-evm", "ti,k2l", "ti,keystone"; model = "Texas Instruments Keystone 2 Lamarr EVM"; soc {
arch/arm/boot/dts/k2l.dtsi +3 -0
@@ -9,6 +9,9 @@ */ / { + compatible = "ti,k2l", "ti,keystone"; + model = "Texas Instruments Keystone 2 Lamarr SoC"; + cpus { #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/keystone.dtsi +1 -0
@@ -12,6 +12,7 @@ #include "skeleton.dtsi" / { + compatible = "ti,keystone"; model = "Texas Instruments Keystone 2 SoC"; #address-cells = <2>; #size-cells = <2>;
Signature · 1 line
2.1.4
Nishanth Menon
maintainerRe: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to santosh shilimkarQuoted 11 lines · santosh shilimkar
Nishant,
Quoted 2 lines · Nishanth Menon
Quoted 1 line · santosh shilimkar
9/25/2015 9:01 AM, Nishanth Menon wrote:
[..]
Quoted 3 lines
Quoted 3 lines
Please refresh the series commit messages based on the discussion so far and repost. Will pick it up then.
Quoted 6 lines
Quoted 2 lines
Thanks. I will do so (probably early next week)..
Just want to check if you have series ready. I was planning to make queue ready over the weekend for upcoming merge window. I can hold that for another week though so let me know.
Apologies on the delay. Update series was send:
https://patchwork.kernel.org/patch/7322821/
https://patchwork.kernel.org/patch/7322831/
https://patchwork.kernel.org/patch/7322841/
Signature · 2 lines
Regards, Nishanth Menon
[email protected]
AppliedQuoted 7 lines · Nishanth Menon
Hi,
Round 2 of the series with updated patch #1. This series introduces SoC specific dt compatible property to allow for future SoCs to be handled and for userspace applications that can introduce features based on SoC they are functioning on.
Quoted 7 lines
V1 of the series: http://marc.info/?l=devicetree&m=144309031109988&w=2
V2 of the series has the following changes:
- updated commit message in patch #1
- picked up acked-by for patch #1Series based on v4.3-rc1
Queued up for 4.4. Thanks !!
Regards,
Santosh
Re: [PATCH 1/3] Documentation: dt: keystone: provide SoC specific compatible flags
In reply to Nishanth MenonQuoted 19 lines · Nishanth Menon
Quoted 11 lines · santosh shilimkar
Nishant,
Quoted 2 lines · Nishanth Menon
Quoted 1 line · santosh shilimkar
9/25/2015 9:01 AM, Nishanth Menon wrote:
[..]
Quoted 3 lines
Quoted 3 lines
Please refresh the series commit messages based on the discussion so far and repost. Will pick it up then.
Quoted 6 lines
Quoted 2 lines
Thanks. I will do so (probably early next week)..
Just want to check if you have series ready. I was planning to make queue ready over the weekend for upcoming merge window. I can hold that for another week though so let me know.
Quoted 5 lines
Apologies on the delay. Update series was send:
https://patchwork.kernel.org/patch/7322821/
https://patchwork.kernel.org/patch/7322831/
https://patchwork.kernel.org/patch/7322841/
No worries. Should show up in linux-next soon. I will let it sit there along with other patches for few more days and then send it up.
Regards,
Santosh