Hi.
I would like to use SPI-I/F of hikey board.
How should I write the device tree?
Now I try writing .dtsi files, but SPI is NOT registerd.
I cannot find f7106000.spi under /sys/devices/smb .
Maybe, more information for pinmux is necessary.
(Detail is NOT described in Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf.)
Please teach me how to register SPI-I/F.
The followings are my trial code. [Base: android-5.1.1_r1(LMY47V)]
Especially, I want to know parts indicated by ‘**’.
■arch/arm64/boot/dts/hi6220.dtsi
spi_0: spi@f7106000 {
compatible = "arm,pl022", "arm,primecell";
reg = <0x0 0xf7106000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0 ** 0x4>;
clocks = <&clock_sys HI6220_SPI_CLK>;
clock-names = "clk_spi";
pinctrl-names = "default";
pinctrl-0 = <& spi0_pmx_func &spi0_cfg_func>;
m25p80@1 {
compatible = "st,m25p80";
reg = <1>;
spi-max-frequency = <50000000>;
spi-cpol;
spi-cpha;
pl022,hierarchy = <0>;
pl022,interface = <0>;
pl022,slave-tx-disable;
pl022,com-mode = <0x0>;
pl022,rx-level-trig = <0>;
pl022,tx-level-trig = <0>;
pl022,ctrl-len = <0x11>;
pl022,wait-state = <0>;
pl022,duplex = <0>;
};
};
■arch/arm64/boot/dts/hikey-pinctrl.dtsi
spi0_pmx_func: spi0_pmx_func {
pinctrl-single,pins = <
0x** MUX_M0 /* SPI0_DI (IOMG???) /
0x* MUX_M0 /* SPI0_DO (IOMG???) /
0x* MUX_M0 /* SPI0_CS_N (IOMG???) /
0x* MUX_M0 /* SPI0_CLK (IOMG???) */
>;
};
spi0_cfg_func: spi0_cfg_func {
pinctrl-single,pins = <
0x*** 0x0 /* SPI0_DI (IOCFG???) */
0x*** 0x0 /* SPI0_DO (IOCFG???) */
0x*** 0x0 /* SPI0_CS_N (IOCFG???) */
0x*** 0x0 /* SPI0_CLK (IOCFG???) */
>;
pinctrl-single,bias-pulldown = <PULL_DIS PULL_DOWN PULL_DIS PULL_DOWN>;
pinctrl-single,bias-pullup = <PULL_DIS PULL_UP PULL_DIS PULL_UP>;
pinctrl-single,drive-strength = <DRIVE1_02MA DRIVE_MASK>;
};