[U-Boot] [PATCH 1/1] rpi: set serial port clock to 48 MHz
Mirza Krak
mirza.krak at gmail.com
Sun Dec 4 21:01:16 CET 2016
2016-12-01 10:34 GMT+01:00 Mirza Krak <mirza.krak at gmail.com>:
> 2016-11-30 19:07 GMT+01:00 Stephen Warren <swarren at wwwdotorg.org>:
>> On 11/29/2016 11:47 PM, Mirza Krak wrote:
>>>
>>> 2016-11-30 5:05 GMT+01:00 Stephen Warren <swarren at wwwdotorg.org>:
>>>>
>>>> On 11/27/2016 11:05 PM, Mirza Krak wrote:
>>>>>
>>>>>
>>>>> From: Mirza Krak <mirza.krak at gmail.com>
>>>>>
>>>>> Recently the default UART clock rate has been changed to 48 MHz on all
>>>>> pi`s in the firmware files, which broke UART support in u-boot.
>>>>>
>>>>> Align configuration to boot firmware.
>>>>
>>>>
>>>>
>>>>> diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
>>>>
>>>>
>>>>
>>>>> @@ -37,7 +37,7 @@ static const struct pl01x_serial_platdata
>>>>> serial_platdata = {
>>>>> .base = 0x20201000,
>>>>> #endif
>>>>> .type = TYPE_PL011,
>>>>> - .clock = 3000000,
>>>>> + .clock = 48000000,
>>
>>
>> Now that I look into this some more, I will point out that this code doesn't
>> even exist in the latest U-Boot, so your patch doesn't apply.
>
> Yes, my bad. I am on 2016.03. Looking in upstream code I can see that
> some changes have been made regarding this.
>
>>
>> Instead, the UART is now instantiated from DT:-( Presumably the UART drivers
>> attempt to dynamically query the clock rate from the clock provider
>> described in DT, yet since there is no such provider implemented in U-Boot,
>> this must currently fail, and I presume that if U-Boot still works at all on
>> the Pi, then the UART drivers must simply skip programming the divider at
>> all, and thus rely on the FW having initialized it.
>
> From what I see it no longer tries to initialize the UART on RPi at
> all and does rely on the FW having initialized it, which seems to be
> intentional. See [1].
>
>>
>> Does updating to the latest U-Boot code solve your problem?
>
> Will give it a go, but probably solves my problems.
Did a test run on 2016.11 U-boot and works like a charm.
Best Regards
Mirza
More information about the U-Boot
mailing list