FAQ_MA35_Family DTS SPI_Clock Setting
Posted: 11 Apr 2024, 15:13
Question :
MA35D1 DTS SPI Clock Setting
Answer.
The default clock configuration of SPI2 is 10MHz.
If users want to modify this frequency, how to do in DTS(device tree)?
#MA35 , #SPI #DTS
.
MA35D1 DTS SPI Clock Setting
Answer.
The default clock configuration of SPI2 is 10MHz.
If users want to modify this frequency, how to do in DTS(device tree)?
Code: Select all
spi2: spi@40620000 {
compatible = "nuvoton,ma35d1-spi";
reg = <0x0 0x40620000 0x0 0x10000>;
interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk SPI2_GATE>;
dmas = <&pdma1 8>,<&pdma1 9>;
dma-names = "tx","rx";
pdma_reqsel_tx = <64>;
pdma_reqsel_rx = <65>;
use_pdma = <0>;
num_cs = <2>;
lsb = <0>;
sleep = <0>;
txbitlen = <8>;
bus_num = <4>;
spimode = <0>;
mrxphase = <0>;
spi-max-frequency = <50000000>;
status = "okay";
};
&spi2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi2>;
};
&pinctrl {
spi2 {
pinctrl_spi2: spi2grp {
nuvoton,pins =
<SYS_GPL_MFPL_PL2MFP_SPI2_SS0 &pcfg_default>,
<SYS_GPL_MFPL_PL3MFP_SPI2_CLK &pcfg_default>,
<SYS_GPL_MFPL_PL0MFP_SPI2_MOSI &pcfg_default>,
<SYS_GPL_MFPL_PL1MFP_SPI2_MISO &pcfg_default>;
};
};
};
#MA35 , #SPI #DTS
.