[PATCH v2 4/6] board: starfive: support Milk-V Mars board
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Mon Apr 1 17:54:45 CEST 2024
On 4/1/24 17:28, Aurelien Jarno wrote:
> On 2024-03-28 17:01, Heinrich Schuchardt wrote:
>> On 24.03.24 16:00, Aurelien Jarno wrote:
>>> On 2024-03-21 19:11, Heinrich Schuchardt wrote:
>>>> The differences between the Milk-V Mars board and the VisionFive 2 board
>>>> are small enough that we can support both using the same U-Boot build.
>>>>
>>>> * The model and compatible property are taken from proposed Linux patches.
>>>> * The EEPROM is atmel,24c02 according to the vendor U-Boot.
>>>> * The second Ethernet port is not available.
>>>
>>> From the device tree that have been submitted to the kernel [1] it seems
>>> another difference is that there is a CD gpio for mmc1.
>>
>> Thank you for reviewing.
>>
>> On all of Milk-V Mars, VisionFive 2 1.2B, and 1.3A I see GPIO 41 level
>> changing when removing or inserting an SD card using U-Boot command 'gpio
>> status -a'. So this seems not to be Milk-V specific.
>>
>> Could you, please, check.
>
> This already have been answered by others, thanks.
>
>>> From the schematics, it also seems that the usb0 port is not in
>>> peripheral mode, but in host mode. That said on the submitted kernel
>>> device tree it seems simply disabled.
>>
>> All three blue-colored USB 3.0 ports are able to read an SD-card in U-Boot.
>>
>> The black port provides 5V but I could not make it work.
>>
>> On the schema I found:
>>
>> USB20: Do not support OTG mode and AVSS_USB0-AVSS_USB2 attached to ground.
>>
>> Could you, please, specify which node in the device-tree you want to
>> disable. I cannot see anything disabled for usb at 10100000 and usb at 0 in the
>> kernel device-tree.
>
> Disclaimer, I have no such board, but I remember people on IRC trying to
> use the device tree from the VF2 on a Milk-V Mars and getting an error
> with the USB being in a wrong mode.
>
> The difference I have noticed is not a node but the dr_mode property:
>
> &usb0 {
> dr_mode = "peripheral";
> status = "okay";
> };
Thanks Aurelien for the explanation.
The node usb at 10100000 (aka usb0) does not exist in the U-Boot
VisionFive2 device-tree, yet. There isn't any dr_mode property either.
We will have to consider this node once we merge the Linux device-tree.
Best regards
Heinrich
>
> This does not appear on the patches submitted on the Linux side for the MilkV
> Mars.
>
> Aurelien
>
More information about the U-Boot
mailing list