mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vignesh Raman <vignesh.raman@collabora.com>
To: Maxime Ripard <mripard@kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: dri-devel@lists.freedesktop.org, helen.koike@collabora.com,
	guilherme.gallo@collabora.com, sergi.blanch.torne@collabora.com,
	david.heidelberg@collabora.com, daniels@collabora.com,
	gustavo.padovan@collabora.com, emma@anholt.net,
	robclark@freedesktop.org, robdclark@google.com,
	anholt@google.com, robdclark@gmail.com, airlied@gmail.com,
	daniel@ffwll.ch, jani.nikula@linux.intel.com,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org,
	virtualization@lists.linux-foundation.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 2/7] drm: ci: Force db410c to host mode
Date: Tue, 5 Sep 2023 15:39:33 +0530	[thread overview]
Message-ID: <2c812fe4-04ba-0243-5330-c7b7e695cff9@collabora.com> (raw)
In-Reply-To: <ueznsu2dlvq5zp3ls262fww54bnlqa3e2ssr6f65vrrionloms@ir2ywgeajj4w>

Hi Dmitry, Maxime,

On 05/09/23 14:13, Maxime Ripard wrote:
> Hi,
> 
> On Mon, Sep 04, 2023 at 07:59:26PM +0300, Dmitry Baryshkov wrote:
>> On Mon, 4 Sept 2023 at 19:16, Vignesh Raman <vignesh.raman@collabora.com> wrote:
>>>
>>> Force db410c to host mode to fix network issue which results in failure
>>> to mount root fs via NFS.
>>> See https://gitlab.freedesktop.org/gfx-ci/linux/-/commit/cb72a629b8c15c80a54dda510743cefd1c4b65b8
>>>
>>> Use fdtoverlay command to merge base device tree with an overlay
>>> which contains the fix for USB controllers to work in host mode.
>>>
>>> Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
>>> ---
>>>
>>> v2:
>>>    - Use fdtoverlay command to merge overlay dtbo with the base dtb instead of modifying the kernel sources
>>>
>>> ---
>>>   drivers/gpu/drm/ci/build.sh                         |  5 +++++
>>>   .../gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dts  | 13 +++++++++++++
>>>   2 files changed, 18 insertions(+)
>>>   create mode 100644 drivers/gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dts
>>>
>>> diff --git a/drivers/gpu/drm/ci/build.sh b/drivers/gpu/drm/ci/build.sh
>>> index 7b014287a041..92ffd98cd09e 100644
>>> --- a/drivers/gpu/drm/ci/build.sh
>>> +++ b/drivers/gpu/drm/ci/build.sh
>>> @@ -92,6 +92,11 @@ done
>>>
>>>   if [[ -n ${DEVICE_TREES} ]]; then
>>>       make dtbs
>>> +    if [[ -e arch/arm64/boot/dts/qcom/apq8016-sbc.dtb ]]; then
>>> +        dtc -@ -I dts -O dtb -o drivers/gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dtbo drivers/gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dts
>>> +        fdtoverlay -i arch/arm64/boot/dts/qcom/apq8016-sbc.dtb -o arch/arm64/boot/dts/qcom/apq8016-sbc-overlay.dtb drivers/gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dtbo
>>> +        mv arch/arm64/boot/dts/qcom/apq8016-sbc-overlay.dtb arch/arm64/boot/dts/qcom/apq8016-sbc.dtb
>>> +    fi
>>>       cp ${DEVICE_TREES} /lava-files/.
>>>   fi
>>>
>>> diff --git a/drivers/gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dts b/drivers/gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dts
>>> new file mode 100644
>>> index 000000000000..57b7604f1c23
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/ci/dt-overlays/apq8016-sbc-overlay.dts
>>> @@ -0,0 +1,13 @@
>>> +/dts-v1/;
>>> +/plugin/;
>>> +
>>> +/ {
>>> +    fragment@0 {
>>> +        target-path = "/soc@0";
>>> +        __overlay__ {
>>> +            usb@78d9000 {
>>> +                dr_mode = "host";
>>> +            };
>>> +        };
>>> +    };
>>> +};
>>> --
>>> 2.40.1
>>
>> Can we use normal dtso syntax here instead of defining fragments manually?
> 
> What Dmitry is hinting about is to use the "Sugar Syntax". There a good documentation here:
> https://source.android.com/docs/core/architecture/dto/syntax


With the below DTO syntax,
/dts-v1/;
/plugin/;

&usb {
   usb@78d9000 {
     dr_mode = "host";
   };
};

Decoded dtbo file is,
/dts-v1/;

/ {

	fragment@0 {
		target = <0xffffffff>;

		__overlay__ {

			usb@78d9000 {
				dr_mode = "host";
			};
		};
	};

	__fixups__ {
		usb = "/fragment@0:target:0";
	};
};

With the previous fix using fragment we get,
/ {

	fragment@0 {
		target-path	 = "/soc@0";

		__overlay__ {

			usb@78d9000 {
				dr_mode = "host";
			};
		};
	};
};

Decoded apq8016-sbc.dtb file with the fix (setting dr_mode to host) is,
/dts-v1/;
/ {	
	soc@0 {
		usb@78d9000 {
			dr_mode = "host";
		};	
	};
};

How can set the target to "soc@0" using the DTO syntax? Otherwise 
fdtoverlay fails to apply the dtbo file with the base dtb.

Regards,
Vignesh

  reply	other threads:[~2023-09-05 17:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04 16:15 [PATCH v2 0/7] drm: ci: fixes Vignesh Raman
2023-09-04 16:15 ` [PATCH v2 1/7] drm: ci: igt_runner: remove todo Vignesh Raman
2023-09-04 16:15 ` [PATCH v2 2/7] drm: ci: Force db410c to host mode Vignesh Raman
2023-09-04 16:59   ` Dmitry Baryshkov
2023-09-05  8:43     ` Maxime Ripard
2023-09-05 10:09       ` Vignesh Raman [this message]
2023-09-05 11:00         ` Maxime Ripard
2023-09-05 11:10           ` Dmitry Baryshkov
2023-09-05 11:41             ` Vignesh Raman
2023-09-05 11:57               ` Maxime Ripard
2023-09-05 13:36                 ` Vignesh Raman
2023-09-05 13:40                   ` Maxime Ripard
2023-09-06  5:11                     ` Vignesh Raman
2023-09-06 12:55   ` Helen Koike
2023-09-06 13:13     ` Maxime Ripard
2023-09-04 16:15 ` [PATCH v2 3/7] drm: ci: virtio: update ci variables Vignesh Raman
2023-09-04 16:15 ` [PATCH v2 4/7] drm: ci: Enable configs to fix mt8173 boot hang issue Vignesh Raman
2023-09-04 16:15 ` [PATCH v2 5/7] drm: ci: Update xfails Vignesh Raman
2023-09-04 16:15 ` [PATCH v2 6/7] drm: ci: Enable new jobs Vignesh Raman
2023-09-04 16:15 ` [PATCH v2 7/7] drm: ci: Use scripts/config to enable/disable configs Vignesh Raman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c812fe4-04ba-0243-5330-c7b7e695cff9@collabora.com \
    --to=vignesh.raman@collabora.com \
    --cc=airlied@gmail.com \
    --cc=anholt@google.com \
    --cc=daniel@ffwll.ch \
    --cc=daniels@collabora.com \
    --cc=david.heidelberg@collabora.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emma@anholt.net \
    --cc=guilherme.gallo@collabora.com \
    --cc=gustavo.padovan@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mripard@kernel.org \
    --cc=robclark@freedesktop.org \
    --cc=robdclark@gmail.com \
    --cc=robdclark@google.com \
    --cc=sergi.blanch.torne@collabora.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®