Serial NOR flash controller for MediaTek ARM SoCs
Schema identifier ($id): "http://devicetree.org/schemas/spi/mediatek,spi-mtk-nor.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Bayi Cheng <bayi.cheng@mediatek.com>", "Chuanhong Guo <gch981213@gmail.com>"
This spi controller support single, dual, or quad mode transfer for SPI NOR flash. There should be only one spi slave device following generic spi bindings. It's not recommended to use this controller for devices other than SPI NOR flash due to limited transfer capability of this controller.
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):/schemas/spi/spi-controller.yaml#
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Allowed values (
enum):"mediatek,mt8173-nor","mediatek,mt8186-nor","mediatek,mt8192-nor"
Rule 2
Array item rules (
items)Item 1
Allowed values (
enum):"mediatek,mt2701-nor","mediatek,mt2712-nor","mediatek,mt7622-nor","mediatek,mt7623-nor","mediatek,mt7629-nor","mediatek,mt8195-nor"Item 2
Exact value (
const):"mediatek,mt8173-nor"
Rule 3
Array item rules (
items)Item 1
Item 2
Exact value (
const):"mediatek,mt8186-nor"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — not listed as required here #
Maximum number of items (maxItems): 1
clocks — required here #
Minimum number of items (minItems): 2
Array item rules (items) #
Item 1
clock used for spi bus
Item 2
clock used for controller
Item 3
clock used for nor dma bus. this depends on hardware design, so this is optional.
Item 4
clock used for controller axi slave bus. this depends on hardware design, so it is optional.
clock-names — required here #
Minimum number of items (minItems): 2
Array item rules (items) #
Item 1
Exact value (
const):"spi"
Item 2
Exact value (
const):"sf"
Item 3
Exact value (
const):"axi"
Item 4
Exact value (
const):"axi_s"
Required in this object (required): "compatible", "reg", "clocks", "clock-names"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/clock/mt8173-clk.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
nor_flash: spi@1100d000 {
compatible = "mediatek,mt8173-nor";
reg = <0 0x1100d000 0 0xe0>;
interrupts = <1>;
clocks = <&pericfg CLK_PERI_SPI>, <&topckgen CLK_TOP_SPINFI_IFR_SEL>,
<&pericfg CLK_PERI_NFI>;
clock-names = "spi", "sf", "axi";
#address-cells = <1>;
#size-cells = <0>;
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)