···11-Binding for MTK SPI controller22-33-Required properties:44-- compatible: should be one of the following.55- - mediatek,mt2701-spi: for mt2701 platforms66- - mediatek,mt2712-spi: for mt2712 platforms77- - mediatek,mt6589-spi: for mt6589 platforms88- - mediatek,mt6765-spi: for mt6765 platforms99- - mediatek,mt7622-spi: for mt7622 platforms1010- - "mediatek,mt7629-spi", "mediatek,mt7622-spi": for mt7629 platforms1111- - mediatek,mt8135-spi: for mt8135 platforms1212- - mediatek,mt8173-spi: for mt8173 platforms1313- - mediatek,mt8183-spi: for mt8183 platforms1414- - mediatek,mt6893-spi: for mt6893 platforms1515- - "mediatek,mt8192-spi", "mediatek,mt6765-spi": for mt8192 platforms1616- - "mediatek,mt8195-spi", "mediatek,mt6765-spi": for mt8195 platforms1717- - "mediatek,mt8516-spi", "mediatek,mt2712-spi": for mt8516 platforms1818- - "mediatek,mt6779-spi", "mediatek,mt6765-spi": for mt6779 platforms1919-2020-- #address-cells: should be 1.2121-2222-- #size-cells: should be 0.2323-2424-- reg: Address and length of the register set for the device2525-2626-- interrupts: Should contain spi interrupt2727-2828-- clocks: phandles to input clocks.2929- The first should be one of the following. It's PLL.3030- - <&clk26m>: specify parent clock 26MHZ.3131- - <&topckgen CLK_TOP_SYSPLL3_D2>: specify parent clock 109MHZ.3232- It's the default one.3333- - <&topckgen CLK_TOP_SYSPLL4_D2>: specify parent clock 78MHZ.3434- - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ.3535- - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ.3636- The second should be <&topckgen CLK_TOP_SPI_SEL>. It's clock mux.3737- The third is <&pericfg CLK_PERI_SPI0>. It's clock gate.3838-3939-- clock-names: shall be "parent-clk" for the parent clock, "sel-clk" for the4040- muxes clock, and "spi-clk" for the clock gate.4141-4242-Optional properties:4343--cs-gpios: see spi-bus.txt.4444-4545-- mediatek,pad-select: specify which pins group(ck/mi/mo/cs) spi4646- controller used. This is an array, the element value should be 0~3,4747- only required for MT8173.4848- 0: specify GPIO69,70,71,72 for spi pins.4949- 1: specify GPIO102,103,104,105 for spi pins.5050- 2: specify GPIO128,129,130,131 for spi pins.5151- 3: specify GPIO5,6,7,8 for spi pins.5252-5353-Example:5454-5555-- SoC Specific Portion:5656-spi: spi@1100a000 {5757- compatible = "mediatek,mt8173-spi";5858- #address-cells = <1>;5959- #size-cells = <0>;6060- reg = <0 0x1100a000 0 0x1000>;6161- interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>;6262- clocks = <&topckgen CLK_TOP_SYSPLL3_D2>,6363- <&topckgen CLK_TOP_SPI_SEL>,6464- <&pericfg CLK_PERI_SPI0>;6565- clock-names = "parent-clk", "sel-clk", "spi-clk";6666- cs-gpios = <&pio 105 GPIO_ACTIVE_LOW>, <&pio 72 GPIO_ACTIVE_LOW>;6767- mediatek,pad-select = <1>, <0>;6868-};
···11-Binding for MTK SPI Slave controller22-33-Required properties:44-- compatible: should be one of the following.55- - mediatek,mt2712-spi-slave: for mt2712 platforms66- - mediatek,mt8195-spi-slave: for mt8195 platforms77-- reg: Address and length of the register set for the device.88-- interrupts: Should contain spi interrupt.99-- clocks: phandles to input clocks.1010- It's clock gate, and should be <&infracfg CLK_INFRA_AO_SPI1>.1111-- clock-names: should be "spi" for the clock gate.1212-1313-Optional properties:1414-- assigned-clocks: it's mux clock, should be <&topckgen CLK_TOP_SPISLV_SEL>.1515-- assigned-clock-parents: parent of mux clock.1616- It's PLL, and should be one of the following.1717- - <&topckgen CLK_TOP_UNIVPLL1_D2>: specify parent clock 312MHZ.1818- It's the default one.1919- - <&topckgen CLK_TOP_UNIVPLL1_D4>: specify parent clock 156MHZ.2020- - <&topckgen CLK_TOP_UNIVPLL2_D4>: specify parent clock 104MHZ.2121- - <&topckgen CLK_TOP_UNIVPLL1_D8>: specify parent clock 78MHZ.2222-2323-Example:2424-- SoC Specific Portion:2525-spis1: spi@10013000 {2626- compatible = "mediatek,mt2712-spi-slave";2727- reg = <0 0x10013000 0 0x100>;2828- interrupts = <GIC_SPI 283 IRQ_TYPE_LEVEL_LOW>;2929- clocks = <&infracfg CLK_INFRA_AO_SPI1>;3030- clock-names = "spi";3131- assigned-clocks = <&topckgen CLK_TOP_SPISLV_SEL>;3232- assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>;3333-};