1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c9ccf3a3SEmmanuel Vadot%YAML 1.2 3c9ccf3a3SEmmanuel Vadot--- 4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/spi/mediatek,spi-mt65xx.yaml# 5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c9ccf3a3SEmmanuel Vadot 7c9ccf3a3SEmmanuel Vadottitle: SPI Bus controller for MediaTek ARM SoCs 8c9ccf3a3SEmmanuel Vadot 9c9ccf3a3SEmmanuel Vadotmaintainers: 10c9ccf3a3SEmmanuel Vadot - Leilk Liu <leilk.liu@mediatek.com> 11c9ccf3a3SEmmanuel Vadot 12c9ccf3a3SEmmanuel VadotallOf: 13*cb7aa33aSEmmanuel Vadot - $ref: /schemas/spi/spi-controller.yaml# 14c9ccf3a3SEmmanuel Vadot 15c9ccf3a3SEmmanuel Vadotproperties: 16c9ccf3a3SEmmanuel Vadot compatible: 17c9ccf3a3SEmmanuel Vadot oneOf: 18c9ccf3a3SEmmanuel Vadot - items: 19c9ccf3a3SEmmanuel Vadot - enum: 20c9ccf3a3SEmmanuel Vadot - mediatek,mt7629-spi 21b97ee269SEmmanuel Vadot - mediatek,mt8365-spi 22c9ccf3a3SEmmanuel Vadot - const: mediatek,mt7622-spi 23c9ccf3a3SEmmanuel Vadot - items: 24c9ccf3a3SEmmanuel Vadot - enum: 25c9ccf3a3SEmmanuel Vadot - mediatek,mt8516-spi 26c9ccf3a3SEmmanuel Vadot - const: mediatek,mt2712-spi 27c9ccf3a3SEmmanuel Vadot - items: 28c9ccf3a3SEmmanuel Vadot - enum: 29c9ccf3a3SEmmanuel Vadot - mediatek,mt6779-spi 30c9ccf3a3SEmmanuel Vadot - mediatek,mt8186-spi 31c9ccf3a3SEmmanuel Vadot - mediatek,mt8192-spi 32c9ccf3a3SEmmanuel Vadot - mediatek,mt8195-spi 33c9ccf3a3SEmmanuel Vadot - const: mediatek,mt6765-spi 34c9ccf3a3SEmmanuel Vadot - items: 35c9ccf3a3SEmmanuel Vadot - enum: 36c9ccf3a3SEmmanuel Vadot - mediatek,mt7986-spi-ipm 37b97ee269SEmmanuel Vadot - mediatek,mt8188-spi-ipm 38c9ccf3a3SEmmanuel Vadot - const: mediatek,spi-ipm 39c9ccf3a3SEmmanuel Vadot - items: 40c9ccf3a3SEmmanuel Vadot - enum: 41c9ccf3a3SEmmanuel Vadot - mediatek,mt2701-spi 42c9ccf3a3SEmmanuel Vadot - mediatek,mt2712-spi 43c9ccf3a3SEmmanuel Vadot - mediatek,mt6589-spi 44c9ccf3a3SEmmanuel Vadot - mediatek,mt6765-spi 45c9ccf3a3SEmmanuel Vadot - mediatek,mt6893-spi 46c9ccf3a3SEmmanuel Vadot - mediatek,mt7622-spi 47c9ccf3a3SEmmanuel Vadot - mediatek,mt8135-spi 48c9ccf3a3SEmmanuel Vadot - mediatek,mt8173-spi 49c9ccf3a3SEmmanuel Vadot - mediatek,mt8183-spi 50c9ccf3a3SEmmanuel Vadot 51c9ccf3a3SEmmanuel Vadot reg: 52c9ccf3a3SEmmanuel Vadot maxItems: 1 53c9ccf3a3SEmmanuel Vadot 54c9ccf3a3SEmmanuel Vadot interrupts: 55c9ccf3a3SEmmanuel Vadot maxItems: 1 56c9ccf3a3SEmmanuel Vadot 57c9ccf3a3SEmmanuel Vadot clocks: 58d5b0e70fSEmmanuel Vadot minItems: 3 59c9ccf3a3SEmmanuel Vadot items: 60c9ccf3a3SEmmanuel Vadot - description: clock used for the parent clock 61c9ccf3a3SEmmanuel Vadot - description: clock used for the muxes clock 62c9ccf3a3SEmmanuel Vadot - description: clock used for the clock gate 63d5b0e70fSEmmanuel Vadot - description: clock used for the AHB bus, this clock is optional 64c9ccf3a3SEmmanuel Vadot 65c9ccf3a3SEmmanuel Vadot clock-names: 66d5b0e70fSEmmanuel Vadot minItems: 3 67c9ccf3a3SEmmanuel Vadot items: 68c9ccf3a3SEmmanuel Vadot - const: parent-clk 69c9ccf3a3SEmmanuel Vadot - const: sel-clk 70c9ccf3a3SEmmanuel Vadot - const: spi-clk 71d5b0e70fSEmmanuel Vadot - const: hclk 72c9ccf3a3SEmmanuel Vadot 73c9ccf3a3SEmmanuel Vadot mediatek,pad-select: 74c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 75c9ccf3a3SEmmanuel Vadot minItems: 1 76c9ccf3a3SEmmanuel Vadot maxItems: 4 77c9ccf3a3SEmmanuel Vadot items: 78c9ccf3a3SEmmanuel Vadot enum: [0, 1, 2, 3] 79c9ccf3a3SEmmanuel Vadot description: 80c9ccf3a3SEmmanuel Vadot specify which pins group(ck/mi/mo/cs) spi controller used. 81c9ccf3a3SEmmanuel Vadot This is an array. 82c9ccf3a3SEmmanuel Vadot 83c9ccf3a3SEmmanuel Vadotrequired: 84c9ccf3a3SEmmanuel Vadot - compatible 85c9ccf3a3SEmmanuel Vadot - reg 86c9ccf3a3SEmmanuel Vadot - interrupts 87c9ccf3a3SEmmanuel Vadot - clocks 88c9ccf3a3SEmmanuel Vadot - clock-names 89c9ccf3a3SEmmanuel Vadot - '#address-cells' 90c9ccf3a3SEmmanuel Vadot - '#size-cells' 91c9ccf3a3SEmmanuel Vadot 92c9ccf3a3SEmmanuel VadotunevaluatedProperties: false 93c9ccf3a3SEmmanuel Vadot 94c9ccf3a3SEmmanuel Vadotexamples: 95c9ccf3a3SEmmanuel Vadot - | 96c9ccf3a3SEmmanuel Vadot #include <dt-bindings/clock/mt8173-clk.h> 97c9ccf3a3SEmmanuel Vadot #include <dt-bindings/gpio/gpio.h> 98c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 99c9ccf3a3SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 100c9ccf3a3SEmmanuel Vadot 101c9ccf3a3SEmmanuel Vadot spi@1100a000 { 102c9ccf3a3SEmmanuel Vadot compatible = "mediatek,mt8173-spi"; 103c9ccf3a3SEmmanuel Vadot #address-cells = <1>; 104c9ccf3a3SEmmanuel Vadot #size-cells = <0>; 105c9ccf3a3SEmmanuel Vadot reg = <0x1100a000 0x1000>; 106c9ccf3a3SEmmanuel Vadot interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>; 107c9ccf3a3SEmmanuel Vadot clocks = <&topckgen CLK_TOP_SYSPLL3_D2>, 108c9ccf3a3SEmmanuel Vadot <&topckgen CLK_TOP_SPI_SEL>, 109c9ccf3a3SEmmanuel Vadot <&pericfg CLK_PERI_SPI0>; 110c9ccf3a3SEmmanuel Vadot clock-names = "parent-clk", "sel-clk", "spi-clk"; 111c9ccf3a3SEmmanuel Vadot cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>; 112c9ccf3a3SEmmanuel Vadot mediatek,pad-select = <1>, <0>; 113c9ccf3a3SEmmanuel Vadot }; 114