Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: Add compatible for Mediatek MT8186

Merge series from Leilk Liu <leilk.liu@mediatek.com>:

This is more YAML conversion than new compatible.

+160 -101
+102
Documentation/devicetree/bindings/spi/mediatek,spi-mt65xx.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/mediatek,spi-mt65xx.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: SPI Bus controller for MediaTek ARM SoCs 8 + 9 + maintainers: 10 + - Leilk Liu <leilk.liu@mediatek.com> 11 + 12 + allOf: 13 + - $ref: "/schemas/spi/spi-controller.yaml#" 14 + 15 + properties: 16 + compatible: 17 + oneOf: 18 + - items: 19 + - enum: 20 + - mediatek,mt7629-spi 21 + - const: mediatek,mt7622-spi 22 + - items: 23 + - enum: 24 + - mediatek,mt8516-spi 25 + - const: mediatek,mt2712-spi 26 + - items: 27 + - enum: 28 + - mediatek,mt6779-spi 29 + - mediatek,mt8186-spi 30 + - mediatek,mt8192-spi 31 + - mediatek,mt8195-spi 32 + - const: mediatek,mt6765-spi 33 + - items: 34 + - enum: 35 + - mediatek,mt2701-spi 36 + - mediatek,mt2712-spi 37 + - mediatek,mt6589-spi 38 + - mediatek,mt6765-spi 39 + - mediatek,mt6893-spi 40 + - mediatek,mt7622-spi 41 + - mediatek,mt8135-spi 42 + - mediatek,mt8173-spi 43 + - mediatek,mt8183-spi 44 + 45 + reg: 46 + maxItems: 1 47 + 48 + interrupts: 49 + maxItems: 1 50 + 51 + clocks: 52 + items: 53 + - description: clock used for the parent clock 54 + - description: clock used for the muxes clock 55 + - description: clock used for the clock gate 56 + 57 + clock-names: 58 + items: 59 + - const: parent-clk 60 + - const: sel-clk 61 + - const: spi-clk 62 + 63 + mediatek,pad-select: 64 + $ref: /schemas/types.yaml#/definitions/uint32-array 65 + maxItems: 4 66 + items: 67 + enum: [0, 1, 2, 3] 68 + description: 69 + specify which pins group(ck/mi/mo/cs) spi controller used. 70 + This is an array. 71 + 72 + required: 73 + - compatible 74 + - reg 75 + - interrupts 76 + - clocks 77 + - clock-names 78 + - '#address-cells' 79 + - '#size-cells' 80 + 81 + unevaluatedProperties: false 82 + 83 + examples: 84 + - | 85 + #include <dt-bindings/clock/mt8173-clk.h> 86 + #include <dt-bindings/gpio/gpio.h> 87 + #include <dt-bindings/interrupt-controller/arm-gic.h> 88 + #include <dt-bindings/interrupt-controller/irq.h> 89 + 90 + spi@1100a000 { 91 + compatible = "mediatek,mt8173-spi"; 92 + #address-cells = <1>; 93 + #size-cells = <0>; 94 + reg = <0x1100a000 0x1000>; 95 + interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>; 96 + clocks = <&topckgen CLK_TOP_SYSPLL3_D2>, 97 + <&topckgen CLK_TOP_SPI_SEL>, 98 + <&pericfg CLK_PERI_SPI0>; 99 + clock-names = "parent-clk", "sel-clk", "spi-clk"; 100 + cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>; 101 + mediatek,pad-select = <1>, <0>; 102 + };
+58
Documentation/devicetree/bindings/spi/mediatek,spi-slave-mt27xx.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/spi/mediatek,spi-slave-mt27xx.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: SPI Slave controller for MediaTek ARM SoCs 8 + 9 + maintainers: 10 + - Leilk Liu <leilk.liu@mediatek.com> 11 + 12 + allOf: 13 + - $ref: "/schemas/spi/spi-controller.yaml#" 14 + 15 + properties: 16 + compatible: 17 + enum: 18 + - mediatek,mt2712-spi-slave 19 + - mediatek,mt8195-spi-slave 20 + 21 + reg: 22 + maxItems: 1 23 + 24 + interrupts: 25 + maxItems: 1 26 + 27 + clocks: 28 + maxItems: 1 29 + 30 + clock-names: 31 + items: 32 + - const: spi 33 + 34 + required: 35 + - compatible 36 + - reg 37 + - interrupts 38 + - clocks 39 + - clock-names 40 + 41 + unevaluatedProperties: false 42 + 43 + examples: 44 + - | 45 + #include <dt-bindings/clock/mt2712-clk.h> 46 + #include <dt-bindings/gpio/gpio.h> 47 + #include <dt-bindings/interrupt-controller/arm-gic.h> 48 + #include <dt-bindings/interrupt-controller/irq.h> 49 + 50 + spi@10013000 { 51 + compatible = "mediatek,mt2712-spi-slave"; 52 + reg = <0x10013000 0x100>; 53 + interrupts = <GIC_SPI 283 IRQ_TYPE_LEVEL_LOW>; 54 + clocks = <&infracfg CLK_INFRA_AO_SPI1>; 55 + clock-names = "spi"; 56 + assigned-clocks = <&topckgen CLK_TOP_SPISLV_SEL>; 57 + assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>; 58 + };
-68
Documentation/devicetree/bindings/spi/spi-mt65xx.txt
··· 1 - Binding for MTK SPI controller 2 - 3 - Required properties: 4 - - compatible: should be one of the following. 5 - - mediatek,mt2701-spi: for mt2701 platforms 6 - - mediatek,mt2712-spi: for mt2712 platforms 7 - - mediatek,mt6589-spi: for mt6589 platforms 8 - - mediatek,mt6765-spi: for mt6765 platforms 9 - - mediatek,mt7622-spi: for mt7622 platforms 10 - - "mediatek,mt7629-spi", "mediatek,mt7622-spi": for mt7629 platforms 11 - - mediatek,mt8135-spi: for mt8135 platforms 12 - - mediatek,mt8173-spi: for mt8173 platforms 13 - - mediatek,mt8183-spi: for mt8183 platforms 14 - - mediatek,mt6893-spi: for mt6893 platforms 15 - - "mediatek,mt8192-spi", "mediatek,mt6765-spi": for mt8192 platforms 16 - - "mediatek,mt8195-spi", "mediatek,mt6765-spi": for mt8195 platforms 17 - - "mediatek,mt8516-spi", "mediatek,mt2712-spi": for mt8516 platforms 18 - - "mediatek,mt6779-spi", "mediatek,mt6765-spi": for mt6779 platforms 19 - 20 - - #address-cells: should be 1. 21 - 22 - - #size-cells: should be 0. 23 - 24 - - reg: Address and length of the register set for the device 25 - 26 - - interrupts: Should contain spi interrupt 27 - 28 - - clocks: phandles to input clocks. 29 - The first should be one of the following. It's PLL. 30 - - <&clk26m>: specify parent clock 26MHZ. 31 - - <&topckgen CLK_TOP_SYSPLL3_D2>: specify parent clock 109MHZ. 32 - It's the default one. 33 - - <&topckgen CLK_TOP_SYSPLL4_D2>: specify parent clock 78MHZ. 34 - - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ. 35 - - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ. 36 - The second should be <&topckgen CLK_TOP_SPI_SEL>. It's clock mux. 37 - The third is <&pericfg CLK_PERI_SPI0>. It's clock gate. 38 - 39 - - clock-names: shall be "parent-clk" for the parent clock, "sel-clk" for the 40 - muxes clock, and "spi-clk" for the clock gate. 41 - 42 - Optional properties: 43 - -cs-gpios: see spi-bus.txt. 44 - 45 - - mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi 46 - controller used. This is an array, the element value should be 0~3, 47 - only required for MT8173. 48 - 0: specify GPIO69,70,71,72 for spi pins. 49 - 1: specify GPIO102,103,104,105 for spi pins. 50 - 2: specify GPIO128,129,130,131 for spi pins. 51 - 3: specify GPIO5,6,7,8 for spi pins. 52 - 53 - Example: 54 - 55 - - SoC Specific Portion: 56 - spi: spi@1100a000 { 57 - compatible = "mediatek,mt8173-spi"; 58 - #address-cells = <1>; 59 - #size-cells = <0>; 60 - reg = <0 0x1100a000 0 0x1000>; 61 - interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>; 62 - clocks = <&topckgen CLK_TOP_SYSPLL3_D2>, 63 - <&topckgen CLK_TOP_SPI_SEL>, 64 - <&pericfg CLK_PERI_SPI0>; 65 - clock-names = "parent-clk", "sel-clk", "spi-clk"; 66 - cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>; 67 - mediatek,pad-select = <1>, <0>; 68 - };
-33
Documentation/devicetree/bindings/spi/spi-slave-mt27xx.txt
··· 1 - Binding for MTK SPI Slave controller 2 - 3 - Required properties: 4 - - compatible: should be one of the following. 5 - - mediatek,mt2712-spi-slave: for mt2712 platforms 6 - - mediatek,mt8195-spi-slave: for mt8195 platforms 7 - - reg: Address and length of the register set for the device. 8 - - interrupts: Should contain spi interrupt. 9 - - clocks: phandles to input clocks. 10 - It's clock gate, and should be <&infracfg CLK_INFRA_AO_SPI1>. 11 - - clock-names: should be "spi" for the clock gate. 12 - 13 - Optional properties: 14 - - assigned-clocks: it's mux clock, should be <&topckgen CLK_TOP_SPISLV_SEL>. 15 - - assigned-clock-parents: parent of mux clock. 16 - It's PLL, and should be one of the following. 17 - - <&topckgen CLK_TOP_UNIVPLL1_D2>: specify parent clock 312MHZ. 18 - It's the default one. 19 - - <&topckgen CLK_TOP_UNIVPLL1_D4>: specify parent clock 156MHZ. 20 - - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ. 21 - - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ. 22 - 23 - Example: 24 - - SoC Specific Portion: 25 - spis1: spi@10013000 { 26 - compatible = "mediatek,mt2712-spi-slave"; 27 - reg = <0 0x10013000 0 0x100>; 28 - interrupts = <GIC_SPI 283 IRQ_TYPE_LEVEL_LOW>; 29 - clocks = <&infracfg CLK_INFRA_AO_SPI1>; 30 - clock-names = "spi"; 31 - assigned-clocks = <&topckgen CLK_TOP_SPISLV_SEL>; 32 - assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>; 33 - };