dts: binding: refine nxp rdc property

Define rdc property in a yaml file and include it in the peripheral's
dts binding.

Signed-off-by: Jiafei Pan <Jiafei.Pan@nxp.com>
This commit is contained in:
Jiafei Pan 2024-08-07 14:44:11 +08:00 committed by Anas Nashif
parent ec85b0b4ef
commit 7380e287ef
11 changed files with 31 additions and 72 deletions

View file

@ -5,7 +5,7 @@ description: Vf610 Adc
compatible: "nxp,vf610-adc" compatible: "nxp,vf610-adc"
include: adc-controller.yaml include: [adc-controller.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -30,21 +30,5 @@ properties:
"#io-channel-cells": "#io-channel-cells":
const: 1 const: 1
rdc:
type: int
required: true
description: |
Set the RDC permission for this peripheral: the RDC controls which
processor can access to this peripheral. User can select to assign this
peripheral to the M4 processor, A9 processor or both with R/W or RW
permissions. To set wanted permission a user should use the helper
macro RDC_DOMAIN_PERM(domain,permission) where domain must be one of
M4_DOMAIN_ID or A9_DOMAIN_ID and permission one among
RDC_DOMAIN_PERM_NONE, RDC_DOMAIN_PERM_W, RDC_DOMAIN_PERM_R,
RDC_DOMAIN_PERM_RW. Example to allow both processor to read/write to
this peripheral a user should put:
rdc = <(RDC_DOMAIN_PERM(A9_DOMAIN_ID, RDC_DOMAIN_PERM_RW) |
RDC_DOMAIN_PERM(M4_DOMAIN_ID, RDC_DOMAIN_PERM_RW))>;
io-channel-cells: io-channel-cells:
- input - input

View file

@ -1,11 +1,11 @@
# Copyright (c) 2018, NXP # Copyright 2018, 2024 NXP
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
description: i.MX Enhanced Periodic Interrupt Timer (EPIT) description: i.MX Enhanced Periodic Interrupt Timer (EPIT)
compatible: "nxp,imx-epit" compatible: "nxp,imx-epit"
include: base.yaml include: [base.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -18,8 +18,3 @@ properties:
type: int type: int
required: true required: true
description: Set the EPIT prescaler between 0 and 4095 description: Set the EPIT prescaler between 0 and 4095
rdc:
type: int
required: true
description: Set the RDC permission for this peripheral

View file

@ -5,7 +5,7 @@ description: NXP ENET1G IP Module
compatible: "nxp,enet1g" compatible: "nxp,enet1g"
include: ["base.yaml"] include: ["base.yaml", "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -13,7 +13,3 @@ properties:
clocks: clocks:
required: true required: true
rdc:
type: int
description: Set the RDC(Resource Domain Controller) domain permission for this peripheral

View file

@ -1,20 +1,16 @@
# Copyright (c) 2017, NXP # Copyright 2017, 2024 NXP
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
description: i.MX GPIO node description: i.MX GPIO node
compatible: "nxp,imx-gpio" compatible: "nxp,imx-gpio"
include: [gpio-controller.yaml, base.yaml] include: [gpio-controller.yaml, base.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
required: true required: true
rdc:
type: int
description: Set the RDC permission for this peripheral
pinmux: pinmux:
type: phandles type: phandles
description: | description: |

View file

@ -1,20 +1,16 @@
# Copyright 2024, NXP # Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
description: i.MX RGPIO node description: i.MX RGPIO node
compatible: "nxp,imx-rgpio" compatible: "nxp,imx-rgpio"
include: [gpio-controller.yaml, base.yaml] include: [gpio-controller.yaml, base.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
required: true required: true
rdc:
type: int
description: Set the RDC permission for this peripheral
pinmux: pinmux:
type: phandles type: phandles
description: | description: |

View file

@ -5,7 +5,7 @@ description: i.MX I2C node
compatible: "fsl,imx21-i2c" compatible: "fsl,imx21-i2c"
include: [i2c-controller.yaml, pinctrl-device.yaml] include: [i2c-controller.yaml, pinctrl-device.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -13,8 +13,3 @@ properties:
interrupts: interrupts:
required: true required: true
rdc:
type: int
required: true
description: Set the RDC permission for this peripheral

View file

@ -1,11 +1,11 @@
# Copyright (c) 2018, NXP # Copyright 2018, 2024 NXP
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
description: i.MX Messaging Unit description: i.MX Messaging Unit
compatible: "nxp,imx-mu" compatible: "nxp,imx-mu"
include: base.yaml include: [base.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -13,8 +13,3 @@ properties:
interrupts: interrupts:
required: true required: true
rdc:
type: int
required: true
description: Set the RDC permission for this peripheral

View file

@ -0,0 +1,16 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0
properties:
rdc:
type: int
description: |
Set the RDC permission for specified peripheral: Resource Domain Controller (RDC)
supports flexible configuration on IPs access permission, each individual IP can,
for example, be configured as A-core only or M-core only. This property uses some
macros defined in 'include/zephyr/dt-bindings/rdc/imx_rdc.h' to configure current
peripheral's access permission.
For example to allow both A53 and M7 Core to have read/write permission to current
peripheral:
rdc = <(RDC_DOMAIN_PERM(A53_DOMAIN_ID, RDC_DOMAIN_PERM_RW)|\
RDC_DOMAIN_PERM(M7_DOMAIN_ID, RDC_DOMAIN_PERM_RW))>;

View file

@ -10,7 +10,7 @@ description: |
compatible: "fsl,imx27-pwm" compatible: "fsl,imx27-pwm"
include: [pwm-controller.yaml, pinctrl-device.yaml, base.yaml] include: [pwm-controller.yaml, pinctrl-device.yaml, base.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -24,11 +24,6 @@ properties:
required: true required: true
description: Set the PWM prescale between 0 and 4096 description: Set the PWM prescale between 0 and 4096
rdc:
type: int
required: true
description: Set the RDC permission for this peripheral
"#pwm-cells": "#pwm-cells":
const: 2 const: 2

View file

@ -3,7 +3,7 @@ description: |
compatible: "nxp,imx-iuart" compatible: "nxp,imx-iuart"
include: [uart-controller.yaml, pinctrl-device.yaml] include: [uart-controller.yaml, pinctrl-device.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -17,7 +17,3 @@ properties:
pinctrl-names: pinctrl-names:
required: true required: true
rdc:
type: int
description: Set the RDC permission for this peripheral

View file

@ -1,11 +1,11 @@
# Copyright (c) 2017, NXP # Copyright 2017, 2024 NXP
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
description: iMX UART description: iMX UART
compatible: "nxp,imx-uart" compatible: "nxp,imx-uart"
include: [uart-controller.yaml, pinctrl-device.yaml] include: [uart-controller.yaml, pinctrl-device.yaml, "nxp,rdc-policy.yaml"]
properties: properties:
reg: reg:
@ -19,11 +19,6 @@ properties:
required: true required: true
description: Set the UART Port to modem mode 0 (dce) 64 (dte) description: Set the UART Port to modem mode 0 (dce) 64 (dte)
rdc:
type: int
required: true
description: Set the RDC permission for this peripheral
pinctrl-0: pinctrl-0:
required: true required: true