Dtb loading - hdmi/ dsi

hi,

In earlier releases 16.09 , we have board-id , by setting different subtypes and modifying in lk, we are able to load different dtbs if the display connected is either hdmi/dsi based on the gpio of the switch will set the subtype board ids, this will load the required dtbs.

arch/arm64/boot/dts/qcom/apq8016-sbc.dts
qcom,board-id = <QCOM_BRD_ID(SBC, 1, 0) QCOM_BRD_SUBTYPE_DEFAULT>;

But current release 18.01 there is no option to set board-id. could you please suggest some better approach to load different dtbs

hi Vinay,

we’ve made changes in this area , this is correct. We made 1 change in LK for a ‘special’ case : if there is only 1 DTB appended to the kernel compressed Image, then LK should go ahead and use it without checking for board ID vs CDT data.

We have made this change for both DB410c and DB820c, btw.

The board-id mechanism is a non standard, non upstreamable solution, and it was causing issues for kernel developers working with mainline. We no longer have to use dtbTool to patch the DTB (and add the board-id).

However this change is an ‘addition’, and you can continue to use LK/dtbTool as before. Since we completely removed the qcom,board-id data, you have to add it back, but then everything should continue to work as before in your case.

We are also thinking about adding some level of support for DTS overlay in LK. What we are going to do is not clearly defined yet… but the need is there. E.g. we need mechanisms to support DTS overlay in LK to support various mezzanines… I suspect you could be interested by that too. The very first use case for us is support for various camera configs…

nicolas,

if i want to go with the current 18.01 release without using dtbtool and board-id we have to go with dts overlay in lk and in the kernel also

Both the panel driver and the hdmi driver cannot be in the same apq8016-sbc.dtsi, since both shares the clock and device tree sections of dsi0. In theory is it possible to update the dsi@1a98000 section in the lk based on the sw (DSI_SW_SEL).[ for ex: local-bd-address]
By doing this it is going to be overhead for lk to have the panel driver details.

i think you can append multiple DTB to the compressed kernel Image. I haven’t tried that , but the code indicates that it should work… so you can do:

  1. add the board-id in your DTS
  2. append 2 DTBs to Image.gz

and it will be working as before, without using dtbTool.

Alternatively, you can still use dtbTool , even with the 18.01 release. We decided to stop using it, because we don’t it need, but if you generate a boot image with dtbTool, it will work as before.