dt-bindings: arm: Limit cpus schema to only check Arm 'cpu' nodes

Matching on the 'cpus' node was a bad choice because the schema is
incorrectly applied to non-Arm cpus nodes. As we now have a common cpus
schema which checks the general structure, it is also redundant to do so
in the Arm CPU schema.

The downside is one could conceivably mix different architecture's cpu
nodes or have typos in the compatible string. The latter problem pretty
much exists for every schema.

Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
Rob Herring 2019-06-26 16:27:21 -06:00
parent ef4db28c1f
commit 9ea6b821ce
1 changed files with 198 additions and 237 deletions

View File

@ -39,281 +39,242 @@ description: |+
described below. described below.
properties: properties:
$nodename: reg:
const: cpus maxItems: 1
description: Container of cpu nodes
'#address-cells':
enum: [1, 2]
description: | description: |
Definition depends on ARM architecture version and configuration: Usage and definition depend on ARM architecture version and
configuration:
On uniprocessor ARM architectures previous to v7 On uniprocessor ARM architectures previous to v7
value must be 1, to enable a simple enumeration this property is required and must be set to 0.
scheme for processors that do not have a HW CPU
identification register.
On 32-bit ARM 11 MPcore, ARM v7 or later systems
value must be 1, that corresponds to CPUID/MPIDR
registers sizes.
On ARM v8 64-bit systems value should be set to 2,
that corresponds to the MPIDR_EL1 register size.
If MPIDR_EL1[63:32] value is equal to 0 on all CPUs
in the system, #address-cells can be set to 1, since
MPIDR_EL1[63:32] bits are not used for CPUs
identification.
'#size-cells': On ARM 11 MPcore based systems this property is
const: 0 required and matches the CPUID[11:0] register bits.
patternProperties: Bits [11:0] in the reg cell must be set to
'^cpu@[0-9a-f]+$': bits [11:0] in CPU ID register.
type: object
properties:
device_type:
const: cpu
reg: All other bits in the reg cell must be set to 0.
maxItems: 1
description: |
Usage and definition depend on ARM architecture version and
configuration:
On uniprocessor ARM architectures previous to v7 On 32-bit ARM v7 or later systems this property is
this property is required and must be set to 0. required and matches the CPU MPIDR[23:0] register
bits.
On ARM 11 MPcore based systems this property is Bits [23:0] in the reg cell must be set to
required and matches the CPUID[11:0] register bits. bits [23:0] in MPIDR.
Bits [11:0] in the reg cell must be set to All other bits in the reg cell must be set to 0.
bits [11:0] in CPU ID register.
All other bits in the reg cell must be set to 0. On ARM v8 64-bit systems this property is required
and matches the MPIDR_EL1 register affinity bits.
On 32-bit ARM v7 or later systems this property is * If cpus node's #address-cells property is set to 2
required and matches the CPU MPIDR[23:0] register
bits.
Bits [23:0] in the reg cell must be set to The first reg cell bits [7:0] must be set to
bits [23:0] in MPIDR. bits [39:32] of MPIDR_EL1.
All other bits in the reg cell must be set to 0. The second reg cell bits [23:0] must be set to
bits [23:0] of MPIDR_EL1.
On ARM v8 64-bit systems this property is required * If cpus node's #address-cells property is set to 1
and matches the MPIDR_EL1 register affinity bits.
* If cpus node's #address-cells property is set to 2 The reg cell bits [23:0] must be set to bits [23:0]
of MPIDR_EL1.
The first reg cell bits [7:0] must be set to All other bits in the reg cells must be set to 0.
bits [39:32] of MPIDR_EL1.
The second reg cell bits [23:0] must be set to compatible:
bits [23:0] of MPIDR_EL1. enum:
- arm,arm710t
- arm,arm720t
- arm,arm740t
- arm,arm7ej-s
- arm,arm7tdmi
- arm,arm7tdmi-s
- arm,arm9es
- arm,arm9ej-s
- arm,arm920t
- arm,arm922t
- arm,arm925
- arm,arm926e-s
- arm,arm926ej-s
- arm,arm940t
- arm,arm946e-s
- arm,arm966e-s
- arm,arm968e-s
- arm,arm9tdmi
- arm,arm1020e
- arm,arm1020t
- arm,arm1022e
- arm,arm1026ej-s
- arm,arm1136j-s
- arm,arm1136jf-s
- arm,arm1156t2-s
- arm,arm1156t2f-s
- arm,arm1176jzf
- arm,arm1176jz-s
- arm,arm1176jzf-s
- arm,arm11mpcore
- arm,armv8 # Only for s/w models
- arm,cortex-a5
- arm,cortex-a7
- arm,cortex-a8
- arm,cortex-a9
- arm,cortex-a12
- arm,cortex-a15
- arm,cortex-a17
- arm,cortex-a53
- arm,cortex-a57
- arm,cortex-a72
- arm,cortex-a73
- arm,cortex-m0
- arm,cortex-m0+
- arm,cortex-m1
- arm,cortex-m3
- arm,cortex-m4
- arm,cortex-r4
- arm,cortex-r5
- arm,cortex-r7
- brcm,brahma-b15
- brcm,brahma-b53
- brcm,vulcan
- cavium,thunder
- cavium,thunder2
- faraday,fa526
- intel,sa110
- intel,sa1100
- marvell,feroceon
- marvell,mohawk
- marvell,pj4a
- marvell,pj4b
- marvell,sheeva-v5
- marvell,sheeva-v7
- nvidia,tegra132-denver
- nvidia,tegra186-denver
- nvidia,tegra194-carmel
- qcom,krait
- qcom,kryo
- qcom,kryo385
- qcom,scorpion
* If cpus node's #address-cells property is set to 1 enable-method:
allOf:
The reg cell bits [23:0] must be set to bits [23:0] - $ref: '/schemas/types.yaml#/definitions/string'
of MPIDR_EL1. - oneOf:
# On ARM v8 64-bit this property is required
All other bits in the reg cells must be set to 0.
compatible:
items:
- enum: - enum:
- arm,arm710t - psci
- arm,arm720t - spin-table
- arm,arm740t # On ARM 32-bit systems this property is optional
- arm,arm7ej-s - enum:
- arm,arm7tdmi - actions,s500-smp
- arm,arm7tdmi-s - allwinner,sun6i-a31
- arm,arm9es - allwinner,sun8i-a23
- arm,arm9ej-s - allwinner,sun9i-a80-smp
- arm,arm920t - allwinner,sun8i-a83t-smp
- arm,arm922t - amlogic,meson8-smp
- arm,arm925 - amlogic,meson8b-smp
- arm,arm926e-s - arm,realview-smp
- arm,arm926ej-s - brcm,bcm11351-cpu-method
- arm,arm940t - brcm,bcm23550
- arm,arm946e-s - brcm,bcm2836-smp
- arm,arm966e-s - brcm,bcm63138
- arm,arm968e-s - brcm,bcm-nsp-smp
- arm,arm9tdmi
- arm,arm1020e
- arm,arm1020t
- arm,arm1022e
- arm,arm1026ej-s
- arm,arm1136j-s
- arm,arm1136jf-s
- arm,arm1156t2-s
- arm,arm1156t2f-s
- arm,arm1176jzf
- arm,arm1176jz-s
- arm,arm1176jzf-s
- arm,arm11mpcore
- arm,armv8 # Only for s/w models
- arm,cortex-a5
- arm,cortex-a7
- arm,cortex-a8
- arm,cortex-a9
- arm,cortex-a12
- arm,cortex-a15
- arm,cortex-a17
- arm,cortex-a53
- arm,cortex-a57
- arm,cortex-a72
- arm,cortex-a73
- arm,cortex-m0
- arm,cortex-m0+
- arm,cortex-m1
- arm,cortex-m3
- arm,cortex-m4
- arm,cortex-r4
- arm,cortex-r5
- arm,cortex-r7
- brcm,brahma-b15 - brcm,brahma-b15
- brcm,brahma-b53 - marvell,armada-375-smp
- brcm,vulcan - marvell,armada-380-smp
- cavium,thunder - marvell,armada-390-smp
- cavium,thunder2 - marvell,armada-xp-smp
- faraday,fa526 - marvell,98dx3236-smp
- intel,sa110 - mediatek,mt6589-smp
- intel,sa1100 - mediatek,mt81xx-tz-smp
- marvell,feroceon - qcom,gcc-msm8660
- marvell,mohawk - qcom,kpss-acc-v1
- marvell,pj4a - qcom,kpss-acc-v2
- marvell,pj4b - renesas,apmu
- marvell,sheeva-v5 - renesas,r9a06g032-smp
- marvell,sheeva-v7 - rockchip,rk3036-smp
- nvidia,tegra132-denver - rockchip,rk3066-smp
- nvidia,tegra186-denver - socionext,milbeaut-m10v-smp
- nvidia,tegra194-carmel - ste,dbx500-smp
- qcom,krait
- qcom,kryo
- qcom,kryo385
- qcom,scorpion
enable-method: cpu-release-addr:
allOf: $ref: '/schemas/types.yaml#/definitions/uint64'
- $ref: '/schemas/types.yaml#/definitions/string'
- oneOf:
# On ARM v8 64-bit this property is required
- enum:
- psci
- spin-table
# On ARM 32-bit systems this property is optional
- enum:
- actions,s500-smp
- allwinner,sun6i-a31
- allwinner,sun8i-a23
- allwinner,sun9i-a80-smp
- allwinner,sun8i-a83t-smp
- amlogic,meson8-smp
- amlogic,meson8b-smp
- arm,realview-smp
- brcm,bcm11351-cpu-method
- brcm,bcm23550
- brcm,bcm2836-smp
- brcm,bcm63138
- brcm,bcm-nsp-smp
- brcm,brahma-b15
- marvell,armada-375-smp
- marvell,armada-380-smp
- marvell,armada-390-smp
- marvell,armada-xp-smp
- marvell,98dx3236-smp
- mediatek,mt6589-smp
- mediatek,mt81xx-tz-smp
- qcom,gcc-msm8660
- qcom,kpss-acc-v1
- qcom,kpss-acc-v2
- renesas,apmu
- renesas,r9a06g032-smp
- rockchip,rk3036-smp
- rockchip,rk3066-smp
- socionext,milbeaut-m10v-smp
- ste,dbx500-smp
cpu-release-addr: description:
$ref: '/schemas/types.yaml#/definitions/uint64' Required for systems that have an "enable-method"
property value of "spin-table".
On ARM v8 64-bit systems must be a two cell
property identifying a 64-bit zero-initialised
memory location.
description: cpu-idle-states:
Required for systems that have an "enable-method" $ref: '/schemas/types.yaml#/definitions/phandle-array'
property value of "spin-table". description: |
On ARM v8 64-bit systems must be a two cell List of phandles to idle state nodes supported
property identifying a 64-bit zero-initialised by this cpu (see ./idle-states.txt).
memory location.
cpu-idle-states: capacity-dmips-mhz:
$ref: '/schemas/types.yaml#/definitions/phandle-array' $ref: '/schemas/types.yaml#/definitions/uint32'
description: | description:
List of phandles to idle state nodes supported u32 value representing CPU capacity (see ./cpu-capacity.txt) in
by this cpu (see ./idle-states.txt). DMIPS/MHz, relative to highest capacity-dmips-mhz
in the system.
capacity-dmips-mhz: dynamic-power-coefficient:
$ref: '/schemas/types.yaml#/definitions/uint32' $ref: '/schemas/types.yaml#/definitions/uint32'
description: description:
u32 value representing CPU capacity (see ./cpu-capacity.txt) in A u32 value that represents the running time dynamic
DMIPS/MHz, relative to highest capacity-dmips-mhz power coefficient in units of uW/MHz/V^2. The
in the system. coefficient can either be calculated from power
measurements or derived by analysis.
dynamic-power-coefficient: The dynamic power consumption of the CPU is
$ref: '/schemas/types.yaml#/definitions/uint32' proportional to the square of the Voltage (V) and
description: the clock frequency (f). The coefficient is used to
A u32 value that represents the running time dynamic calculate the dynamic power as below -
power coefficient in units of uW/MHz/V^2. The
coefficient can either be calculated from power
measurements or derived by analysis.
The dynamic power consumption of the CPU is Pdyn = dynamic-power-coefficient * V^2 * f
proportional to the square of the Voltage (V) and
the clock frequency (f). The coefficient is used to
calculate the dynamic power as below -
Pdyn = dynamic-power-coefficient * V^2 * f where voltage is in V, frequency is in MHz.
where voltage is in V, frequency is in MHz. qcom,saw:
$ref: '/schemas/types.yaml#/definitions/phandle'
description: |
Specifies the SAW* node associated with this CPU.
qcom,saw: Required for systems that have an "enable-method" property
$ref: '/schemas/types.yaml#/definitions/phandle' value of "qcom,kpss-acc-v1" or "qcom,kpss-acc-v2"
description: |
Specifies the SAW* node associated with this CPU.
Required for systems that have an "enable-method" property * arm/msm/qcom,saw2.txt
value of "qcom,kpss-acc-v1" or "qcom,kpss-acc-v2"
* arm/msm/qcom,saw2.txt qcom,acc:
$ref: '/schemas/types.yaml#/definitions/phandle'
description: |
Specifies the ACC* node associated with this CPU.
qcom,acc: Required for systems that have an "enable-method" property
$ref: '/schemas/types.yaml#/definitions/phandle' value of "qcom,kpss-acc-v1" or "qcom,kpss-acc-v2"
description: |
Specifies the ACC* node associated with this CPU.
Required for systems that have an "enable-method" property * arm/msm/qcom,kpss-acc.txt
value of "qcom,kpss-acc-v1" or "qcom,kpss-acc-v2"
* arm/msm/qcom,kpss-acc.txt rockchip,pmu:
$ref: '/schemas/types.yaml#/definitions/phandle'
description: |
Specifies the syscon node controlling the cpu core power domains.
rockchip,pmu: Optional for systems that have an "enable-method"
$ref: '/schemas/types.yaml#/definitions/phandle' property value of "rockchip,rk3066-smp"
description: | While optional, it is the preferred way to get access to
Specifies the syscon node controlling the cpu core power domains. the cpu-core power-domains.
Optional for systems that have an "enable-method"
property value of "rockchip,rk3066-smp"
While optional, it is the preferred way to get access to
the cpu-core power-domains.
required:
- device_type
- reg
- compatible
dependencies:
cpu-release-addr: [enable-method]
rockchip,pmu: [enable-method]
required: required:
- '#address-cells' - device_type
- '#size-cells' - reg
- compatible
dependencies:
rockchip,pmu: [enable-method]
examples: examples:
- | - |