Hi, On Thu, Oct 3, 2024 at 10:23 AM Hal Feng <[email protected]> wrote: > > > On 01.10.24 01:56, Heinrich Schuchardt wrote: > > Another approach would be to build all device-trees into U-Boot and use the > > EEPROM information to select the correct one at runtime. > > > > This approach is selected by Wandboard defconfig and other boards by > > specifying CONFIG_MULTI_DTB_FIT and CONFIG_OF_LIST. The choice of the > > device-tree is made in board_fit_config_name_match(). > > > > The advantage from the standpoint of a Linux distro would be that one distro > > image can be provided that will run on all JH7110 boards. > > That is a good idea. I will try to do this after my five-day vacation. > By the way, I wanna know whether jh7110-milkv-mars-cm.dts and > jh7110-milkv-mars-cm-lite.dts are in the process of upstreaming? > I don't see them in the kernel mainline. > > Thanks for your suggestions. > > Best regards, > Hal
There is not any jh7110-milkv-mars-cm.dts and jh7110-milkv-mars-cmlite.dts patch for Linux kernel upstream yet. Now may be a good time to do so, since Star64 was accepted and makes use of the common jh7110 dtsi that was introduced with devicetree of Milk-V Mars to Linux kernel. First this can go in U-Boot as the jh7110-milkv-mars.dts is good for Milk-V Mars CM and CM Lite, with addition of some GPIO assignments. This can be stubbed out by including jh7110-milkv-mars.dts until there are accepted upstream devicetree files for Mars CM and CM Lite. There are different GPIO assignments depending if it is U-Boot phase or Linux phase of the boot process; per the vendor sources. It is enough to pass a loaded jh7110-milkv-mars.dts to Linux on Mars CM and CM Lite hardware, if this GPIO assignment was done at U-Boot time and since then there is never any MMC reset while in Linux kernel: https://github.com/milkv-mars/mars-buildroot-sdk/commit/880a249518f72ecf1e2947dfeb2c66e5035fce90 https://github.com/milkv-mars/mars-buildroot-sdk/commit/042ea06598995db99ddbbbb252ee439c42b9c1a9 Much of the above diff listings can be ignored as already implemented or not needed, however, provided for reference what I am talking about for GPIO assignments 22 24 62 depending on the phase of boot process. -E

