[PATCH 3/3] ARM: dts: at91: sam9x60: Add spi0 node (flexcom 0)
Eugen Hristev
eugen.hristev at linaro.org
Tue Nov 11 13:33:31 CET 2025
On 11/11/25 14:15, Alexander Dahl wrote:
> Hello Eugen,
>
> Am Tue, Nov 11, 2025 at 01:34:35PM +0200 schrieb Eugen Hristev:
>>
>>
>> On 11/11/25 13:26, Alexander Dahl wrote:
>>> Copied from linux kernel v6.18-rc4. Stripped attributes not supported
>>> by U-Boot drivers (dma, interrupt, fifo-size).
>>
>> Hello Alexander,
>>
>> Have you tried to configure the build to use upstream DTS ? this should
>> be available in the U-boot dir. CONFIG_OF_UPSTREAM I believe.
>
> Quick try with _just_ enabling CONFIG_OF_UPSTREAM and adding the
> obligatory folder to CONFIG_DEFAULT_DEVICE_TREE leads to the expected
> build errors:
>
> DTC dts/upstream/src/arm/microchip/at91-sam9x60_curiosity.dtb
> Error: …/u-boot/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi:43.1-7 Label or path clk32 not found
> Error: …/u-boot/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi:51.1-9 Label or path main_rc not found
> Error: …/u-boot/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi:67.1-16 Label or path pinctrl_sdhci0 not found
> Error: …/u-boot/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi:79.1-9 Label or path pit64b0 not found
> Error: …/u-boot/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi:87.1-8 Label or path sdhci0 not found
> Error: …/u-boot/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi:91.1-13 Label or path slow_rc_osc not found
> FATAL ERROR: Syntax error parsing input tree
>
> Not bad for the first shot, but I guess at least the clock related
> issues might get challenging. However I need to put this aside for later.
>
> One question though, while we are at it: Would it be possible to
> define a custom dts in U-Boot and include an upstream .dtsi?
There is a custom dts in U-boot, in your case sam9x60-u-boot.dtsi, and
this should be automatically included by the build tool.
This applies on top of the upstream dts if you select it, or, the
in-tree DTS.
You want to do some combo of both or something ? I didn't fully
understand it.
In the case of the above errors, it appears the *-u-boot.dtsi is at
fault for referencing non-upstream nodes
>
> Greets
> Alex
>
>>
>> Also, if you really want to update this u-boot DT, you would have to
>> copy it as-is, no stripping. Even if the props are unused. The only real
>> issue would be if Uboot stops working or gets confused by these extra props
>>
>> Eugen>
>>> Signed-off-by: Alexander Dahl <ada at thorsis.com>
>>> ---
>>> arch/arm/dts/sam9x60.dtsi | 10 ++++++++++
>>> 1 file changed, 10 insertions(+)
>>>
>>> diff --git a/arch/arm/dts/sam9x60.dtsi b/arch/arm/dts/sam9x60.dtsi
>>> index a33c0d57398..1ee30422518 100644
>>> --- a/arch/arm/dts/sam9x60.dtsi
>>> +++ b/arch/arm/dts/sam9x60.dtsi
>>> @@ -182,6 +182,16 @@
>>> ranges = <0x0 0xf801c000 0x800>;
>>> status = "disabled";
>>>
>>> + spi0: spi at 400 {
>>> + compatible = "microchip,sam9x60-spi", "atmel,at91rm9200-spi";
>>> + reg = <0x400 0x200>;
>>> + #address-cells = <1>;
>>> + #size-cells = <0>;
>>> + clocks = <&pmc PMC_TYPE_PERIPHERAL 5>;
>>> + clock-names = "spi_clk";
>>> + status = "disabled";
>>> + };
>>> +
>>> i2c0: i2c at 600 {
>>> compatible = "microchip,sam9x60-i2c";
>>> reg = <0x600 0x200>;
>>
>
More information about the U-Boot
mailing list