forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dt-bindings: bus: imx-weim: convert to YAML
Convert the i.MX Wireless External Interface Module binding to YAML. Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Krzysztof Kozlowski <[email protected]>
- Loading branch information
Showing
5 changed files
with
237 additions
and
118 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
Documentation/devicetree/bindings/memory-controllers/fsl/fsl,imx-weim-peripherals.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/memory-controllers/fsl/fsl,imx-weim-peripherals.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: i.MX WEIM Bus Peripheral Nodes | ||
|
||
maintainers: | ||
- Shawn Guo <[email protected]> | ||
- Sascha Hauer <[email protected]> | ||
|
||
description: | ||
This binding is meant for the child nodes of the WEIM node. The node | ||
represents any device connected to the WEIM bus. It may be a Flash chip, | ||
RAM chip or Ethernet controller, etc. These properties are meant for | ||
configuring the WEIM settings/timings and will accompany the bindings | ||
supported by the respective device. | ||
|
||
properties: | ||
reg: true | ||
|
||
fsl,weim-cs-timing: | ||
$ref: /schemas/types.yaml#/definitions/uint32-array | ||
description: | ||
Timing values for the child node. | ||
minItems: 2 | ||
maxItems: 6 | ||
|
||
# the WEIM child will have its own native properties | ||
additionalProperties: true |
204 changes: 204 additions & 0 deletions
204
Documentation/devicetree/bindings/memory-controllers/fsl/fsl,imx-weim.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,204 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/memory-controllers/fsl/fsl,imx-weim.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: i.MX Wireless External Interface Module (WEIM) | ||
|
||
maintainers: | ||
- Shawn Guo <[email protected]> | ||
- Sascha Hauer <[email protected]> | ||
|
||
description: | ||
The term "wireless" does not imply that the WEIM is literally an interface | ||
without wires. It simply means that this module was originally designed for | ||
wireless and mobile applications that use low-power technology. The actual | ||
devices are instantiated from the child nodes of a WEIM node. | ||
|
||
properties: | ||
$nodename: | ||
pattern: "^memory-controller@[0-9a-f]+$" | ||
|
||
compatible: | ||
oneOf: | ||
- enum: | ||
- fsl,imx1-weim | ||
- fsl,imx27-weim | ||
- fsl,imx50-weim | ||
- fsl,imx51-weim | ||
- fsl,imx6q-weim | ||
- items: | ||
- enum: | ||
- fsl,imx31-weim | ||
- fsl,imx35-weim | ||
- const: fsl,imx27-weim | ||
- items: | ||
- enum: | ||
- fsl,imx6sx-weim | ||
- fsl,imx6ul-weim | ||
- const: fsl,imx6q-weim | ||
|
||
"#address-cells": | ||
const: 2 | ||
|
||
"#size-cells": | ||
const: 1 | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
clocks: | ||
maxItems: 1 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
ranges: true | ||
|
||
fsl,weim-cs-gpr: | ||
$ref: /schemas/types.yaml#/definitions/phandle | ||
description: | | ||
Phandle to the system General Purpose Register controller that contains | ||
WEIM CS GPR register, e.g. IOMUXC_GPR1 on i.MX6Q. IOMUXC_GPR1[11:0] | ||
should be set up as one of the following 4 possible values depending on | ||
the CS space configuration. | ||
IOMUXC_GPR1[11:0] CS0 CS1 CS2 CS3 | ||
--------------------------------------------- | ||
05 128M 0M 0M 0M | ||
033 64M 64M 0M 0M | ||
0113 64M 32M 32M 0M | ||
01111 32M 32M 32M 32M | ||
In case that the property is absent, the reset value or what bootloader | ||
sets up in IOMUXC_GPR1[11:0] will be used. | ||
fsl,burst-clk-enable: | ||
type: boolean | ||
description: | ||
The presence of this property indicates that the weim bus should operate | ||
in Burst Clock Mode. | ||
|
||
fsl,continuous-burst-clk: | ||
type: boolean | ||
description: | ||
Make Burst Clock to output continuous clock. Without this option Burst | ||
Clock will output clock only when necessary. | ||
|
||
patternProperties: | ||
"^.*@[0-7],[0-9a-f]+$": | ||
type: object | ||
description: Devices attached to chip selects are represented as subnodes. | ||
$ref: fsl,imx-weim-peripherals.yaml | ||
additionalProperties: true | ||
required: | ||
- fsl,weim-cs-timing | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- clocks | ||
- "#address-cells" | ||
- "#size-cells" | ||
- ranges | ||
|
||
allOf: | ||
- if: | ||
properties: | ||
compatible: | ||
not: | ||
contains: | ||
enum: | ||
- fsl,imx50-weim | ||
- fsl,imx6q-weim | ||
then: | ||
properties: | ||
fsl,weim-cs-gpr: false | ||
fsl,burst-clk-enable: false | ||
- if: | ||
not: | ||
required: | ||
- fsl,burst-clk-enable | ||
then: | ||
properties: | ||
fsl,continuous-burst-clk: false | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
const: fsl,imx1-weim | ||
then: | ||
patternProperties: | ||
"^.*@[0-7],[0-9a-f]+$": | ||
properties: | ||
fsl,weim-cs-timing: | ||
items: | ||
items: | ||
- description: CSxU | ||
- description: CSxL | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
enum: | ||
- fsl,imx27-weim | ||
- fsl,imx31-weim | ||
- fsl,imx35-weim | ||
then: | ||
patternProperties: | ||
"^.*@[0-7],[0-9a-f]+$": | ||
properties: | ||
fsl,weim-cs-timing: | ||
items: | ||
items: | ||
- description: CSCRxU | ||
- description: CSCRxL | ||
- description: CSCRxA | ||
- if: | ||
properties: | ||
compatible: | ||
contains: | ||
enum: | ||
- fsl,imx50-weim | ||
- fsl,imx51-weim | ||
- fsl,imx6q-weim | ||
- fsl,imx6sx-weim | ||
- fsl,imx6ul-weim | ||
then: | ||
patternProperties: | ||
"^.*@[0-7],[0-9a-f]+$": | ||
properties: | ||
fsl,weim-cs-timing: | ||
items: | ||
items: | ||
- description: CSxGCR1 | ||
- description: CSxGCR2 | ||
- description: CSxRCR1 | ||
- description: CSxRCR2 | ||
- description: CSxWCR1 | ||
- description: CSxWCR2 | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
memory-controller@21b8000 { | ||
compatible = "fsl,imx6q-weim"; | ||
reg = <0x021b8000 0x4000>; | ||
clocks = <&clks 196>; | ||
#address-cells = <2>; | ||
#size-cells = <1>; | ||
ranges = <0 0 0x08000000 0x08000000>; | ||
fsl,weim-cs-gpr = <&gpr>; | ||
flash@0,0 { | ||
compatible = "cfi-flash"; | ||
reg = <0 0 0x02000000>; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
bank-width = <2>; | ||
fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000 | ||
0x0000c000 0x1404a38e 0x00000000>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters