xref: /freebsd/sys/contrib/device-tree/Bindings/spi/spi-mtk-nor.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel Vadot* Serial NOR flash controller for MediaTek ARM SoCs
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: 	  For mt8173, compatible should be "mediatek,mt8173-nor",
5*c66ec88fSEmmanuel Vadot		  and it's the fallback compatible for other Soc.
6*c66ec88fSEmmanuel Vadot		  For every other SoC, should contain both the SoC-specific compatible
7*c66ec88fSEmmanuel Vadot		  string and "mediatek,mt8173-nor".
8*c66ec88fSEmmanuel Vadot		  The possible values are:
9*c66ec88fSEmmanuel Vadot		  "mediatek,mt2701-nor", "mediatek,mt8173-nor"
10*c66ec88fSEmmanuel Vadot		  "mediatek,mt2712-nor", "mediatek,mt8173-nor"
11*c66ec88fSEmmanuel Vadot		  "mediatek,mt7622-nor", "mediatek,mt8173-nor"
12*c66ec88fSEmmanuel Vadot		  "mediatek,mt7623-nor", "mediatek,mt8173-nor"
13*c66ec88fSEmmanuel Vadot		  "mediatek,mt7629-nor", "mediatek,mt8173-nor"
14*c66ec88fSEmmanuel Vadot		  "mediatek,mt8173-nor"
15*c66ec88fSEmmanuel Vadot- reg: 		  physical base address and length of the controller's register
16*c66ec88fSEmmanuel Vadot- interrupts:	  Interrupt number used by the controller.
17*c66ec88fSEmmanuel Vadot- clocks: 	  the phandle of the clocks needed by the nor controller
18*c66ec88fSEmmanuel Vadot- clock-names: 	  the names of the clocks
19*c66ec88fSEmmanuel Vadot		  the clocks should be named "spi" and "sf". "spi" is used for spi bus,
20*c66ec88fSEmmanuel Vadot		  and "sf" is used for controller, these are the clocks witch
21*c66ec88fSEmmanuel Vadot		  hardware needs to enabling nor flash and nor flash controller.
22*c66ec88fSEmmanuel Vadot		  See Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
23*c66ec88fSEmmanuel Vadot- #address-cells: should be <1>
24*c66ec88fSEmmanuel Vadot- #size-cells:	  should be <0>
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel VadotThere should be only one spi slave device following generic spi bindings.
27*c66ec88fSEmmanuel VadotIt's not recommended to use this controller for devices other than SPI NOR
28*c66ec88fSEmmanuel Vadotflash due to limited transfer capability of this controller.
29*c66ec88fSEmmanuel Vadot
30*c66ec88fSEmmanuel VadotExample:
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadotnor_flash: spi@1100d000 {
33*c66ec88fSEmmanuel Vadot	compatible = "mediatek,mt8173-nor";
34*c66ec88fSEmmanuel Vadot	reg = <0 0x1100d000 0 0xe0>;
35*c66ec88fSEmmanuel Vadot	interrupts = <&spi_flash_irq>;
36*c66ec88fSEmmanuel Vadot	clocks = <&pericfg CLK_PERI_SPI>,
37*c66ec88fSEmmanuel Vadot		 <&topckgen CLK_TOP_SPINFI_IFR_SEL>;
38*c66ec88fSEmmanuel Vadot	clock-names = "spi", "sf";
39*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
40*c66ec88fSEmmanuel Vadot	#size-cells = <0>;
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel Vadot	flash@0 {
43*c66ec88fSEmmanuel Vadot		compatible = "jedec,spi-nor";
44*c66ec88fSEmmanuel Vadot		reg = <0>;
45*c66ec88fSEmmanuel Vadot	};
46*c66ec88fSEmmanuel Vadot};
47*c66ec88fSEmmanuel Vadot
48