From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 D728E3D3B3 for ; Wed, 16 Apr 2025 00:02:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744761738; cv=none; b=lp9WbmJOEan0qb4KWCyrCLkLh2KeT97YS8k938w/jDUYs7cTXZg3kVrj9CMSMdA7LpLJQfzgdibtyP69gVtQDRMgYh4Gb4Dc3AbnHccKMjceI73rP0OMU7LPRgIrlr4Ree6Bx32r0fZ6JKkhdt/KxWKn6JDhGjj0t9D7Q8ZyIK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744761738; c=relaxed/simple; bh=X73kg4tdW06GAOX2zu95FNoOmd3sHwKiCictodfiuao=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gCLZ4fbFITS6nuDEttrWJYVQDxQhTAIXMZ3ItloGjmuO5g46TgjXWG2cpzoUDK6gm8YufdQWdAgj3z6L7t4P3Zbn2sH1NVIPVhO3T6pZIy/ex8YXHwu4t9BHndqfq9RRggbC+b+HylRfoUvpHi4Ze7MFF7X3WJkK/6K001Z+plk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=A2yoB7fN; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="A2yoB7fN" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-736ab1c43c4so5622390b3a.1 for ; Tue, 15 Apr 2025 17:02:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1744761735; x=1745366535; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ztpfrrq65RboKoVCNPKCaSBonp9V4OT02BBtVtoD/uU=; b=A2yoB7fNZ6vr106sCoS0BC1bhuUqQ1o9IZsyWw4omSUEgsJESB1XdkfRGVmYk2BgWD xQLXqT2K3TAzVuVBHUiLEioHpuvp8l7jxebQKF7ax5cagILI48OyTqkbDvfD9QRjlXyj LdisZ6l2FQmDpFpgM7h/TNuGWA0hYkZ/OZs40= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744761735; x=1745366535; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ztpfrrq65RboKoVCNPKCaSBonp9V4OT02BBtVtoD/uU=; b=gcVTwsnQDXyuBUr1F3BBbpeZKJ5bkV5k2Ggq8OXcZacCNDAuNt66Z+X3RrxccnHr97 T9g8SOvVAcEJaset6fQ1Qdp0lq+rtBdX1UK0moIJfRfpHVYdJGRRr4O2xpk5+Wm0wDfk fB7SctFgDv2ZxX/SuuFS/gIyOMntsmDua0JFkQlhGSOke47suHHlpU3jy1SH7FkLJoyJ 5/PJRLYEGZz/HOCwHe68aes4ScdpoAApOLjQARB8eU1kHdxanbREV70Uy+GkIn3BLHai /+HTYmydAei3y3QC3pROkc4zwePY4F9ARdpazmOndJOyJVqj+z36Vgvt9Y6eb6fy+Bou m6YA== X-Forwarded-Encrypted: i=1; AJvYcCW+BqKee9GKM8TGfBpXPhJrPNxND1BuFLdhCup07o0Ha0Qxz4IyLiOzTlFH2RTKb0zzTV3+UBwggolFS+3qa2M=@lists.linux.dev X-Gm-Message-State: AOJu0YzgKzrPQXCL1YtXRDqxg2IMmf3IAxlhtzCULAE4zoQEylg+DSz8 w+hW4x+pTRnQikfL8rjVkkFCj619UAJ0/0ziBAUDwNPThEYiR49y5Hw2m0BsOg== X-Gm-Gg: ASbGncvYvYrQ1d7PNbrXYOJRQPc/xUr6k/iqk6DOVoxI3cSaImVfH6pWJgHt1t7QbWT fH9f+uniT/4r5EMyl4i0IKWeaYchsnSrUZMZbS8pTRNQtymUj7iNkTG1/R2T1DBUzXuFfSp3oNu L12k4buMpGubnL8LJ9apWN2cIWFIDk/mcY22kjqSaOMnmArQEa/1wJ60XTJ+zPjOCbD0zS6homB JbC45Jg3O/I/m6TIBulecYQgoxpXwTLkeNEDVCMbOAzPpuKQ4qxBV45BxfXU78rjDuCOGOzNxy4 dqxWRTkX7XabVEvAB75xv78q3jdVdB952Zyyz+aCyd+c3PV0X+Us2RZiFGQe+8rSKAf1zLTEx9+ kMw== X-Google-Smtp-Source: AGHT+IHkUQNhj55ArcxMsqdZ9goNzK1iX/oCF1gdLXwsnONXGZV+o45RA+2MeBctZXHEWSSuaXlJnA== X-Received: by 2002:a05:6a00:2e29:b0:736:48d1:57f7 with SMTP id d2e1a72fcca58-73c1f90d688mr1947843b3a.7.1744761735002; Tue, 15 Apr 2025 17:02:15 -0700 (PDT) Received: from localhost (199.24.125.34.bc.googleusercontent.com. [34.125.24.199]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-73bd21c3216sm9157830b3a.49.2025.04.15.17.02.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Apr 2025 17:02:14 -0700 (PDT) From: Stephen Boyd To: Tzung-Bi Shih Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev, Bjorn Andersson , Konrad Dybcio , devicetree@vger.kernel.org, Dmitry Baryshkov , Krzysztof Kozlowski , Rob Herring , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Conor Dooley , Benson Leung , chrome-platform@lists.linux.dev, Pin-yen Lin , Abhishek Pandit-Subedi , =?UTF-8?q?=C5=81ukasz=20Bartosik?= , Jameson Thies , Andrei Kuchynski Subject: [PATCH 2/7] platform/chrome: cros_ec_typec: Allow DP configure to work Date: Tue, 15 Apr 2025 17:02:02 -0700 Message-ID: <20250416000208.3568635-3-swboyd@chromium.org> X-Mailer: git-send-email 2.49.0.604.gff1f9ca942-goog In-Reply-To: <20250416000208.3568635-1-swboyd@chromium.org> References: <20250416000208.3568635-1-swboyd@chromium.org> Precedence: bulk X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DP altmode driver fails the configure stage because the status VDO that is spoofed in cros_typec_enable_dp() is missing a couple flags. Add them so that the configure succeeds. This has the nice side effect of properly reflecting the pin assignment and configuration of the DP altmode in sysfs. Cc: Benson Leung Cc: Tzung-Bi Shih Cc: Cc: Pin-yen Lin Cc: Abhishek Pandit-Subedi Cc: Ɓukasz Bartosik Cc: Jameson Thies Cc: Andrei Kuchynski Signed-off-by: Stephen Boyd --- drivers/platform/chrome/cros_ec_typec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/chrome/cros_ec_typec.c b/drivers/platform/chrome/cros_ec_typec.c index 6ee182101bc9..2cbe29f08064 100644 --- a/drivers/platform/chrome/cros_ec_typec.c +++ b/drivers/platform/chrome/cros_ec_typec.c @@ -531,7 +531,7 @@ static int cros_typec_enable_dp(struct cros_typec_data *typec, } /* Status VDO. */ - dp_data.status = DP_STATUS_ENABLED; + dp_data.status = DP_STATUS_ENABLED | DP_STATUS_CON_UFP_D | DP_STATUS_PREFER_MULTI_FUNC; if (port->mux_flags & USB_PD_MUX_HPD_IRQ) dp_data.status |= DP_STATUS_IRQ_HPD; if (port->mux_flags & USB_PD_MUX_HPD_LVL) -- https://chromeos.dev