Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp597218lqp; Fri, 5 Apr 2024 03:19:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW22xqNpWnYZJibG29LbD6iV2JFPF4IFz6CGLav+r+Dp5ir2MZfhu8nu3P+4hV/BfcrAxl8ZFWMbIPxycN0N34ef5mrTWHJFH4X8vMulA== X-Google-Smtp-Source: AGHT+IF++R7wYBJacaQdqDPKZSO2p8uXLv8eun1rfpVv37N9NTeyvj5tGwB5Xxr7pr329S//A2i4 X-Received: by 2002:a05:622a:253:b0:432:f394:ba6e with SMTP id c19-20020a05622a025300b00432f394ba6emr887151qtx.64.1712312399381; Fri, 05 Apr 2024 03:19:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712312399; cv=pass; d=google.com; s=arc-20160816; b=uO9sfCKqyap9f0NuwN/yM0of8RkGTR3e3Ir9wNbyOv0XZOKn/M2aEzPhbRPVmcFmZb T6LTVowXf/Wj86WNuyoZV9wJBXCJSzEY/7ruSEfFYNeaNq93nFlVkxF6FSGXsSh6NATd kGerzda/BcIuW81aE2uvjO24EIYsU9wqSYIOcrSCk0ORaqhRCR1jSmvT5K/8ixPdQi8z KCkv8XrMwOlXIKfQL6y3P5sQaJwe2o9mwRz+i8whGE7rwSaC223rYUlBj1A89p7pDJeQ 5/SAm27/e7PsfnVL+XjySRAtengtwJBti/uoI9y+7tNkOdShPdyxTsZW0zR95XTi9i9L Sv6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=/7wBknhXnwsdUBBqfoshvbTdHyCPt+Ehzl1Q7shB3pk=; fh=p2Sj6sLrFi5uo8mQS8HtofMNwSk+zRLQRAI8OFOcvEA=; b=db6l0QPawmoSkyJVZvpSLZ5kdzaloZi7bvthzM6Lf2TEsYSvy19rgqteDYZ7UUFBgj iUZlOTLfzPLFb4jP4WNOtzPM0p0wOLSX5N/CD18QI+1FAfvRE6HpSIEgYe2gqTJzmFPZ VeaW9/U8k+8QdLlona4VaF7jFN9oFHXFM499YXiTwu1PQ5qK0sE1ibeBACAMDfC9eUfB 9EJgOnKDR8A5Vhfq8cOK/uQ3xdwyTML0Tt05t+YT5fyexOYSHefDMWeM4nzaoo7bbdMi DCtDV73G4bOYpIIWD0EFsxyk9O+s5KuZ9o+ERtnxRwx84tHnXLHsES/fLsqew1QdWCoG I3tw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=kMZ3ZPK+; arc=pass (i=1 spf=pass spfdomain=fairphone.com dkim=pass dkdomain=fairphone.com dmarc=pass fromdomain=fairphone.com); spf=pass (google.com: domain of linux-kernel+bounces-132812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132812-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d15-20020ac85d8f000000b004343a018c54si1382224qtx.794.2024.04.05.03.19.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 03:19:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@fairphone.com header.s=fair header.b=kMZ3ZPK+; arc=pass (i=1 spf=pass spfdomain=fairphone.com dkim=pass dkdomain=fairphone.com dmarc=pass fromdomain=fairphone.com); spf=pass (google.com: domain of linux-kernel+bounces-132812-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132812-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fairphone.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0F6CE1C21405 for ; Fri, 5 Apr 2024 10:19:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E432B161B56; Fri, 5 Apr 2024 10:19:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b="kMZ3ZPK+" Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0815516193A for ; Fri, 5 Apr 2024 10:19:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712312390; cv=none; b=FeKzSUlyVhVPUmIfSp40lG1iNcNYRq+CGXKi0PgvjhF1cBZ9LD/dhdeeMC9HbHem2z7O0FO1ODAdT/8idhcxPIkiQ/pHSOvviD2N8ZG8hvAjQLTo5czF8z4kdYHXxKFhHU+897j4loG3oaFZ+EspiHsiLCdakyz4saLPw4lYQg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712312390; c=relaxed/simple; bh=0OI2ryIMCXvO8K9vutx7EIqbESyjJfJ3MkE47w6lRgQ=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=aJ1eG8tnQ/7MyRIrmkqVev/0vdurANJTQW3MUCGJbvDogOfOpzGauUv7sze5ZXGzgbqYyD/fQV1fhyObtiW89uzWKSAvEgIq51tBb2Wh99NzEQK7uj5lJPNCZiH8ewgROnz7LHCUptx2Zo+Z+f591krVCelQ6U2BUzynnnVnicQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com; spf=pass smtp.mailfrom=fairphone.com; dkim=pass (2048-bit key) header.d=fairphone.com header.i=@fairphone.com header.b=kMZ3ZPK+; arc=none smtp.client-ip=209.85.218.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fairphone.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fairphone.com Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a519eae91d1so98405066b.3 for ; Fri, 05 Apr 2024 03:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fairphone.com; s=fair; t=1712312387; x=1712917187; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/7wBknhXnwsdUBBqfoshvbTdHyCPt+Ehzl1Q7shB3pk=; b=kMZ3ZPK+sPR9UEoin6D/sgvVaZO85XByUatjMvsQDWCSkUAWA4cpOFHMkefjnj/nq3 NvMWxhLYvfcrBia5ixw8ndE4s/KMhJ3jjSFDtkRwSYg0P1bsmv5Y/4P46pXoFUY0PUxe ginzIYX1dXxUYAE/kXXNGH8lTOlJXK1XMwNnadzKxOGfopIVDpgybs/+i+ufD5hb7jol AYVl3dk+Wqk6BO505JF6+8maVQwHpe+PyMhEcbHIcXVAl+HquiAaIh8QlNzSPiKDk1Fi X3TuijLwCmbkdXmwETzNt8RCIaFWTtfUdTG1aqbMVLj0EtD/fn+i8H9xH1lz2twZB7tA MbZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712312387; x=1712917187; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/7wBknhXnwsdUBBqfoshvbTdHyCPt+Ehzl1Q7shB3pk=; b=D+FTyH4Du4T4nNM3KvhgXS77LgMUaaHi7ez29qJKRIvL/caihQg1r/wcKfRzbh9xRn 8OnLvC9ZGGK9vW9JeFHzRw0HS+y9KbBex9f8DPzmT99I6mmPmx3tFtkXTL2Oh7G/CmTn p5c+ixuDUjy0O2NwiwDiIoA4lsrctW7ieEEESlk9F1v4wg714DwqMJkHWMc5+WMbMwGK 6GHMtYyeVNBQQiWUX1oIFCnGSpmJfMvt6/9RB43zF5cGa6liz46FP2W5cKHfJzrCWNCu vyMZpHre9XG/FlDFSLOEBsf907ajPZkW5WaFr6WYnNtjCCcYdlBPU47V25eTq/TzVKBR wMcg== X-Forwarded-Encrypted: i=1; AJvYcCWdf1qy2VF/lZwmdHEkfhkHQY1UoqB7Lu/V6ysPxqP2D7opICgUPwpODIpptIg+bZ113b4s2FKE1wEYEvNIkLoOkNKAZAjTtmv+hcBN X-Gm-Message-State: AOJu0YyYN8PZa2i4qOHHwoMN//r94cGFqIMfYOIiebIWKdCTSoJWqMub XhnGg83Qb+7zZXYYkGaxH/qAb5S9in31zJJb+AEiNLXQrX+l2HyM4Gtk+K8I8Ac= X-Received: by 2002:a17:906:38f:b0:a47:2036:dbc4 with SMTP id b15-20020a170906038f00b00a472036dbc4mr541798eja.25.1712312387218; Fri, 05 Apr 2024 03:19:47 -0700 (PDT) Received: from localhost (144-178-202-138.static.ef-service.nl. [144.178.202.138]) by smtp.gmail.com with ESMTPSA id gx26-20020a1709068a5a00b00a46b4c09670sm670330ejc.131.2024.04.05.03.19.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Apr 2024 03:19:46 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 05 Apr 2024 12:19:46 +0200 Message-Id: From: "Luca Weiss" To: , "Konrad Dybcio" , "Bjorn Andersson" Cc: "Vinod Koul" , "Kishon Vijay Abraham I" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Abhinav Kumar" , , , , Subject: Re: [PATCH RFT 0/7] arm64: qcom: allow up to 4 lanes for the Type-C DisplayPort Altmode X-Mailer: aerc 0.15.2 References: <20240229-topic-sm8x50-upstream-phy-combo-typec-mux-v1-0-07e24a231840@linaro.org> <7a7aa05f-9ae6-4ca0-a423-224fc78fbd0c@linaro.org> <236a104c-fc16-4b3d-9a00-e16517c00e3a@linaro.org> <963b60e5-6ab7-4d9f-885a-ba744c2b7991@linaro.org> In-Reply-To: <963b60e5-6ab7-4d9f-885a-ba744c2b7991@linaro.org> On Fri Apr 5, 2024 at 10:08 AM CEST, Neil Armstrong wrote: > Hi Luca, > > On 29/03/2024 10:02, Luca Weiss wrote: > > On Tue Mar 26, 2024 at 10:02 PM CET, Konrad Dybcio wrote: > >> On 16.03.2024 5:01 PM, Bjorn Andersson wrote: > >>> On Fri, Mar 15, 2024 at 06:35:15PM +0100, Neil Armstrong wrote: > >>>> On 15/03/2024 18:19, Luca Weiss wrote: > >>>>> On Thu Feb 29, 2024 at 2:07 PM CET, Neil Armstrong wrote: > >>>>>> Register a typec mux in order to change the PHY mode on the Type-C > >>>>>> mux events depending on the mode and the svid when in Altmode setu= p. > >>>>>> > >>>>>> The DisplayPort phy should be left enabled if is still powered on > >>>>>> by the DRM DisplayPort controller, so bail out until the DisplayPo= rt > >>>>>> PHY is not powered off. > >>>>>> > >>>>>> The Type-C Mode/SVID only changes on plug/unplug, and USB SAFE sta= tes > >>>>>> will be set in between of USB-Only, Combo and DisplayPort Only so > >>>>>> this will leave enough time to the DRM DisplayPort controller to > >>>>>> turn of the DisplayPort PHY. > >>>>>> > >>>>>> The patchset also includes bindings changes and DT changes. > >>>>>> > >>>>>> This has been successfully tested on an SM8550 board, but the > >>>>>> Thinkpad X13s deserved testing between non-PD USB, non-PD DisplayP= ort, > >>>>>> PD USB Hubs and PD Altmode Dongles to make sure the switch works > >>>>>> as expected. > >>>>>> > >>>>>> The DisplayPort 4 lanes setup can be check with: > >>>>>> $ cat /sys/kernel/debug/dri/ae01000.display-controller/DP-1/dp_deb= ug > >>>>>> name =3D msm_dp > >>>>>> drm_dp_link > >>>>>> rate =3D 540000 > >>>>>> num_lanes =3D 4 > >>>>> > >>>>> Hi Neil, > >>>>> > >>>>> I tried this on QCM6490/SC7280 which should also support 4-lane DP = but I > >>>>> haven't had any success so far. > >>>>> > >>> [..] > >>>>> [ 1775.563969] [drm:dp_ctrl_link_train] *ERROR* max v_level reached > >>>>> [ 1775.564031] [drm:dp_ctrl_link_train] *ERROR* link training #1 fa= iled. ret=3D-11 > >>>> > >>>> Interesting #1 means the 4 lanes are not physically connected to the= other side, > >>>> perhaps QCM6490/SC7280 requires a specific way to enable the 4 lanes= in the PHY, > >>>> or some fixups in the init tables. > >>>> > >>> > >>> I tested the same on rb3gen2 (qcs6490) a couple of weeks ago, with th= e > >>> same outcome. Looking at the AUX reads, after switching to 4-lane the > >>> link training is failing on all 4 lanes, in contrast to succeeding on= ly > >>> on the first 2 if you e.g. forget to mux the other two. > >>> > >>> As such, my expectation is that there's something wrong in the QMP PH= Y > >>> (or possibly redriver) for this platform. > >> > >> Do we have any downstream tag where 4lane dp works? I'm willing to bel= ieve > >> the PHY story.. > >=20 > > Just tested on Fairphone 5 downstream and 4 lane appears to work there. > > This is with an USB-C to HDMI adapter that only does HDMI. > >=20 > > FP5:/ # cat /sys/kernel/debug/drm_dp/dp_debug > > state=3D0x20a5 > > link_rate=3D270000 > > num_lanes=3D4 > > resolution=3D2560x1440@60Hz > > pclock=3D241500KHz > > bpp=3D24 > > test_req=3DDP_LINK_STATUS_UPDATED > > lane_count=3D4 > > bw_code=3D10 > > v_level=3D0 > > p_level=3D0 > >=20 > > Sources are here: > > https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-5.4= /+/refs/heads/odm/rc/target/13/fp5 > > And probably more importantly techpack/display: > > https://gerrit-public.fairphone.software/plugins/gitiles/platform/vendo= r/opensource/display-drivers/+/refs/heads/odm/rc/target/13/fp5 > > Dts if useful: > > https://gerrit-public.fairphone.software/plugins/gitiles/kernel/msm-ext= ra/devicetree/+/refs/heads/kernel/13/fp5 > > Could you retry with this applied ? > > https://lore.kernel.org/all/20240405000111.1450598-1-swboyd@chromium.org/ Unfortunately I do not see any change with this on QCM6490 Fairphone 5 and 4-lane DP. Regards Luca > > Thanks, > Neil > > >=20 > > Regards > > Luca > >=20 > >> > >> Konrad > >=20