cancel
Showing results for 
Search instead for 
Did you mean: 

Should I code my device tree for extra peripherals that did not generated by CubeMX?

Gencay
Associate III

I am editing a device tree for my custom board generated by Cube MX. My TF-A .dts folder does not contain any information about QUADSPI which is used for serial flash memory, so should I add a node for quadspi and a child node for flash or I should only edit peripherals generated by CubeMx which are sections like these:

/* USER CODE BEGIN peripheralX */
	/* USER CODE END peripheralX */

I am a little confused, can you help me with this? Thank you in advance.

1 REPLY 1
Olivier GALLIEN
ST Employee

Hi @Gencay,

I'm surprise .. QUADSPI is a boot device properly handle in CubeMX.

You get proper node in TF-A DT ( ev1 board example :(

&qspi {

pinctrl-names = "default";

pinctrl-0 = <&quadspi_pins_mx>;

status = "okay";

/* USER CODE BEGIN qspi */

reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;

#address-cells = <1>;

#size-cells = <0>;

flash0:mx66l51235l@0 {

compatible = "jedec,spi-nor";

reg = <0>;

spi-rx-bus-width = <4>;

spi-max-frequency = <108000000>;

#address-cells = <1>;

#size-cells = <1>;

};

/* USER CODE END qspi */

};

QUADSPI internal peripheral - stm32mpu

QUADSPI device tree configuration - stm32mpu

Could you please elaborate further ?

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.