Re: [PATCH 2/3] arm64: dts: sophgo: add initial Milk-V Duo S board support

Inochi Amaoto <[email protected]>
Newsgroups dev.linux.lists.sophgo,org.infradead.lists.linux-riscv,org.kernel.vger.linux-devicetree
Message-ID <7e37k5hdn7nnn7cxnfrzqfy7h7a3ofnaf4r6rgk7exehrhsn2i@rvxjxvh2sodw>
On Sun, Oct 26, 2025 at 10:48:50PM +0000, Michael Opdenacker wrote:
> Hi Joshua
> 
> Thanks a lot for working on support for Milk-V Duo S. I'll be happy to test
> your V3 :)
> 
> On 10/26/25 22:35, Joshua Milas wrote:
> > Inochi,
> > 
> > Thanks for pointing me twards duo-pinmux. I was able to use it to get
> > the default config which is uart0, spi3, and i2c4. I can change the
> > dts to match, but...
> > 
> > > I suggest enabling devices that are accessed by default
> > Would we rather enable anything that can be accessed by the pinmux?
> 
> If I understand correctly, you can't do that because there will be
> conflicts.

> From the Duo S pinout diagram (https://milkv.io/duo-s/duos-pinout.webp), on
> headers 41 and 39, you have to choose between MIPI, I2C2, PWM12/13 or SD1.
> If at least 2 of these are selected at the same time, there will be a
> conflict, and I assume that the pinctrl controller driver will flag it.
> 

Yes, that's true. Boards with CV18XX always require setting pinctrl.

> Then it sounds complicated to define a default combination for the whole
> board, because it's like a default use model. Who gets to choose? What
> Inochi suggests is to follow the vendor kernel choice, which would
> correspond to the way the vendor intended the board to be used. However the
> community could choose another default way to use the board, so the choice
> may be up to the first contributor to the mainline kernel for this board,
> possibly revised through later discussions.
> 

In fact, I see the maintainers do not agree adding every possible
configuration to the DTS, (especially without "omit-if-unused" flag).
And in many case, it is impossible to add all possibility. As a
result, I prefer to use DTS overlay if there is something custom,
and keep the mainline DTS minimum.

> I guess there are cases when the choice is easy:
> 
> - When only one configuration is available for a set of pins
> - When there are important devices on I2C or SPI buses on the board. Then,
> you want to find a way to prioritize such buses. Fortunately, I guess the
> board design also guides you to the right choice.
> 

In fact the priority is the thing that is hard to decide. This is why
I suggesting keeping compatible with the vendor kernel, as many people
starts with vendor kernel and it is a good thing to refer.

>
> I was facing the the same question today on another board, and that's why
> I'm happy it's raised here. As thousands of DTS files have been written
> before, I'd love to hear from people with experience on this topic. Are
> guidelines written anywhere for board DTS creators?
> 
> Cheers
> Michael.
> 
> -- 
> Michael Opdenacker
> Root Commit
> Yocto Project and OpenEmbedded Training course - Learn by doing:
> https://rootcommit.com/training/yocto/
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.