AW: Using uart1 on mediatek mt8195 derived board

Thomas Schaefer Thomas.Schaefer at kontron.com
Tue Dec 19 11:29:43 CET 2023


>El 2023-12-08 17:06, Thomas Schaefer va escriure:
>> Hi Macpaul, Fabien,
>>
>> I'm referring to patch series
>> https://patc/
>> hwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20230804110448.24589-1-ma
>> cpaul.lin%40mediatek.com%2F&data=05%7C02%7CThomas.Schaefer%40kontron.c
>> om%7C7254656e8bcd4aaa665608dc006d75f3%7C8c9d3c973fd941c8a2b1646f3942da
>> f1%7C0%7C0%7C638385717332491611%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLj
>> AwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&s
>> data=eNa2nC%2BcBA8g8GC2z32nBO%2B4MvKIJGb2XU2lw3EqzTE%3D&reserved=0
>> where support for the mediatek mt8195 SOC is introduced into u-boot.
>> We are developing a board based on the mt8195 as well but we want to
>> use UART1 instead of UART0 for debug output messages.
>>
>> Our board is booting and we see boot messages on a debug pin header
>> connected to UART0 when using the settings from the demo board, but
>> when trying to switch to UART1, no more messages appear on the
>> console. What we have tried is the following:
>>
>> - Adaptation of the dts and dtsi files with uart1 settings taken from
>> linux device tree:
>>
>> diff --git a/arch/arm/dts/mt8195.dtsi b/arch/arm/dts/mt8195.dtsi index
>> a7e4db5aa7..53eb437fad 100644
>> --- a/arch/arm/dts/mt8195.dtsi
>> +++ b/arch/arm/dts/mt8195.dtsi
>> @@ -245,6 +245,17 @@
>>                         status = "disabled";
>>                 };
>>
>> +               uart1: serial at 11001200 {
>> +                       compatible = "mediatek,mt8195-uart",
>> +                                    "mediatek,hsuart";
>> +                       reg = <0 0x11001200 0 0x1000>;
>> +                       interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
>> +                       clock-frequency = <26000000>;
>> +                       clocks = <&clk26m>, <&clk26m>;
>> +                       clock-names = "baud", "bus";
>> +                       status = "disabled";
>> +               };
>> +
>>                 pericfg_ao: syscon at 11003000 {
>>                         compatible = "mediatek,mt8195-pericfg_ao",
>> "syscon";
>>                         reg = <0 0x11003000 0 0x1000>;
>>
>> diff --git a/arch/arm/dts/mt8195-kontron-sbc-i1200.dts
>> b/arch/arm/dts/mt8195-kontron-sbc-i1200.dts
>> index c6ea7e8f3d..4700a6d303 100644
>> --- a/arch/arm/dts/mt8195-kontron-sbc-i1200.dts
>> +++ b/arch/arm/dts/mt8195-kontron-sbc-i1200.dts
>> @@ -58,7 +58,7 @@
>>         };
>>
>>         chosen {
>> -               stdout-path = &uart0;
>> +               stdout-path = &uart1;
>>         };
>>
>>         reg_1p8v: regulator-1p8v {
>> @@ -121,7 +121,7 @@
>>         status = "okay";
>>  };
>>
>> -&uart0 {
>> +&uart1 {
>>         status = "okay";
>>  };
>>
>> We also tried to change the DEBUG_UART settings in the defconfig to
>> match with UART1, but without success.
>>
>> Are there any special means to make UART1 interface run?
>
>Did you had a look in the DTS from the kernel:
>https://elixir.bootlin.com/linux/v6.7-rc6/source/arch/arm64/boot/dts/mediatek/mt8195.dtsi#L1040
>
>My bet would be that infracfg_ao CLK_INFRA_AO_UART1 is not configured correctly.
>
>Best regards,
>Matthias.
>

Hi Matthias,

actually the problem was that we didn't enable some transceivers on UART1 line.

After fixing this, UART1 now works without problems.

Best regards,
Thomas

>>
>> Best regards,
>> Thomas
>>
>> Thomas Schäfer
>> SW Design Engineer
>>
>>
>> Kontron Europe GmbH
>> Heinrich-Barth-Straße 1-1a | 66115 Saarbrücken | Germany


More information about the U-Boot mailing list