[PATCH v3 27/36] dts: msm8916: replace with upstream DTS

Caleb Connolly caleb.connolly at linaro.org
Fri Feb 9 17:06:11 CET 2024



On 02/02/2024 08:38, Sumit Garg wrote:
> On Tue, 30 Jan 2024 at 19:35, Caleb Connolly <caleb.connolly at linaro.org> wrote:
>>
>> Drop the U-Boot specific dragonboard410c.dts in favour of the upstream
>> msm8916-sbc.dts. No additional changes are needed to this DTS for U-Boot
>> support.
>>
>> Taken from kernel tag v6.7
>>
>> Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
>> Signed-off-by: Caleb Connolly <caleb.connolly at linaro.org>
>> ---
>>  arch/arm/dts/Makefile                   |    2 +-
>>  arch/arm/dts/apq8016-sbc-u-boot.dtsi    |   11 +
>>  arch/arm/dts/apq8016-sbc.dts            |  729 +++++++++
>>  arch/arm/dts/dragonboard410c-uboot.dtsi |   44 -
>>  arch/arm/dts/dragonboard410c.dts        |  221 ---
>>  arch/arm/dts/msm8916.dtsi               | 2702 +++++++++++++++++++++++++++++++
>>  configs/dragonboard410c_defconfig       |    2 +-
>>  7 files changed, 3444 insertions(+), 267 deletions(-)
>>
>> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
>> index 92a4465f5f41..4c8b29b983a4 100644
>> --- a/arch/arm/dts/Makefile
>> +++ b/arch/arm/dts/Makefile
>> @@ -628,7 +628,7 @@ dtb-$(CONFIG_TARGET_SL28) += fsl-ls1028a-kontron-sl28.dtb \
>>
>>  dtb-$(CONFIG_TARGET_TEN64) += fsl-ls1088a-ten64.dtb
>>
>> -dtb-$(CONFIG_ARCH_SNAPDRAGON) += dragonboard410c.dtb \
>> +dtb-$(CONFIG_ARCH_SNAPDRAGON) += apq8016-sbc.dtb \
>>         dragonboard820c.dtb \
>>         sdm845-db845c.dtb \
>>         sdm845-samsung-starqltechn.dtb \
>> diff --git a/arch/arm/dts/apq8016-sbc-u-boot.dtsi b/arch/arm/dts/apq8016-sbc-u-boot.dtsi
>> new file mode 100644
>> index 000000000000..838e629a8ade
>> --- /dev/null
>> +++ b/arch/arm/dts/apq8016-sbc-u-boot.dtsi
>> @@ -0,0 +1,11 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Copyright (c) 2024, Linaro Ltd.
>> + */
>> +
>> +/ {
>> +       /* When running as a first-stage bootloader this isn't filled in automatically */
>> +       memory at 80000000 {
>> +               reg = <0 0x80000000 0 0x3da00000>;
>> +       };
>> +};
> 
> With U-Boot booting as the first stage bootloader, we have to enable
> the serial driver prior to relocation. Although we have
> DM_FLAG_PRE_RELOC for clock and the serial driver, what about the
> pinctrl driver required to configure UART specific pins prior to
> relocation? Without following change we get broken U-Boot log without
> header prints:

Ohhh nice! This makes a whole lot of sense. Thanks for figuring this out.

I finally got my hands on some db410c's (thanks Neil!) and can confirm
this fixes the issue. I tried using DM_FLAG_PRE_RELOC on the pinctrl
driver but it doesn't seem like that's enough to get pinctrl going. I'll
pick your patch below.
> 
> diff --git a/arch/arm/dts/apq8016-sbc-u-boot.dtsi
> b/arch/arm/dts/apq8016-sbc-u-boot.dtsi
> index 838e629a8ade..0a21732be6cb 100644
> --- a/arch/arm/dts/apq8016-sbc-u-boot.dtsi
> +++ b/arch/arm/dts/apq8016-sbc-u-boot.dtsi
> @@ -9,3 +9,11 @@
>                 reg = <0 0x80000000 0 0x3da00000>;
>         };
>  };
> +
> +&tlmm {
> +       bootph-all;
> +
> +       blsp-uart2-default-state {
> +               bootph-all;
> +       };
> +};
> 
> Fixes broken U-Boot log:
> 
> S - Flash Throughput, 82000 KB/s  (1503304 Bytes,  18330 us)
> S - DDR Frequency, 400 MHz
> Core:  135 devices, 20 uclasses, devicetree: board
> MMC:   mmc at 7824900: 0, mmc at 7864900: 1
> Loading Environment from MMC... OK
> In:    serial at 78b0000
> Out:   serial at 78b0000
> Err:   serial at 78b0000
> ## Error: Can't overwrite "serial#"
> ## Error inserting "serial#" variable, errno=1
> Net:   No ethernet found.
> Hit any key to stop autoboot:  0
> dragonboard410c =>
> 
> -Sumit

-- 
// Caleb (they/them)


More information about the U-Boot mailing list