Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp810946rdb; Tue, 23 Jan 2024 16:24:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGAJrNeIf5xL+zC5V/HONwd7KLJBvY5sez2zrQcH3Zm6JuwgYYP9D+fR9QrNJgXzTVS5LB X-Received: by 2002:a05:6a21:6d9d:b0:19a:1656:bc5f with SMTP id wl29-20020a056a216d9d00b0019a1656bc5fmr29374pzb.2.1706055889251; Tue, 23 Jan 2024 16:24:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706055889; cv=pass; d=google.com; s=arc-20160816; b=IR8xAViQqapBNEfUw7Dp/S10Tdbd7PeFUa5kGSM3FZMWne7TOL2SsLuysN78I+2s4w HimmFT1tHECuKWvVb4TPicrIabeO4WRYYAi367icGMd0F0xnbIG2mtQzgXQZ7eXu2e8y 8zOYNLAtV/SAxmQj1JgC94o3woHcBTA2k/1EQlp2iGINFoqwCQ8XxSSfqEUA2qDgNEPR /UlbFT1CfzQ17xKj0XaagWoNgt+9gLIp3BxMXr4BcBtc3LU4MdKA3hvBkyJMJppv9bNg yYt0p4RjYh09CY0vthG1e/weGZei/YhlBnz65KH5//TLtLMOFZGjWiT+LBooC6zAZWbx j5ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=RYUPWC8mbieR/1UzrjwjYwXh1EY0A6c/zt9SEQfzmDo=; fh=Dp2vB8nxz9jD6dofrLyqnv+T5ud07kKU/fqzp+looTE=; b=dmPoTcJy9rDlcSRbyaGE2c6IT82SQ5Bcj44vGv8rc+KuMKcySle2IJCpUgeymevs+T hGxLk8d50Sa2yDqAAnhix/nO27flB7KhffU3KOnhhodOHby7e4dWkgNoHpa1yek0u1RZ NbnUUzeztaesai9KijsWheP8wIMOxZrTsSpjLMjKohK9WbP51MRPG0ojr1J+Dd+ay1ac vRTDBqkRZZymeXb7DwGY0fzNuXOhxyJ+CnRgtICASHBWz91u+a1hFtpcnAurGFojv2dD 8cTKhUocDjGY5U9/BdwC99x+UNNYBSRcWXIy2s0YJiJokJ7gaaniwxGCqgLFeOhS19bl UaeQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=EgLvktNb; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-36219-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36219-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x23-20020a62fb17000000b006dab36291d7si12528023pfm.4.2024.01.23.16.24.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 16:24:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36219-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=EgLvktNb; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-36219-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36219-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DFD5428A613 for ; Wed, 24 Jan 2024 00:24:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B0C2EDB; Wed, 24 Jan 2024 00:24:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="EgLvktNb" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAF0D622; Wed, 24 Jan 2024 00:24:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706055880; cv=none; b=YdoDatErEnresBHlBBJHo0+UIV7X/U7UgO4duE2gOO7zy7PdhGbe9f1PZUA6W1sssj/j6JJ3HAFCa6iPqbH1hq7IaNRG5g7OFRMUVji+hh7LrAjYjdPRZPR64UW2eXbWSKojuzXQUQioV5K8Tc/O1KaoT6MNYrYdFRHJ0t7pDVA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706055880; c=relaxed/simple; bh=1Ilef9mn2H+4EwNKZD3TwdLOWn1+suThiEC0pHeCWIw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aiDV7OPOKWIfRzjGLhLcUITepakwHBd2uUNI0SkFHVrZtYCZipo6S0KkiOtbkvsB0xc16yNz4vd5gCeSGOcNuSWLnZBAUfY5m5XPepix/icR7rPPnyXejL820bd6DRDhLfjFiGbBA6KpWcGGdISG/l3dYWcdDS2VdHEf8B9LX+c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=EgLvktNb; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1706055876; bh=1Ilef9mn2H+4EwNKZD3TwdLOWn1+suThiEC0pHeCWIw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=EgLvktNb+xFV5neKx76QNUz8Z6PPviCRKinW7BzxHLZO1KWzI0qzXvuVuWr3naKRD t7boXipAQId+6NrFpby105Ebs67n+knviJsu4/Xc6fXMVhJ4nSbJUZ+zQKyYq1hhpK BGeeCn4z1XqWwBXo/DR3QlGnVEljBMqYSu9Wodipu9yWstwAWPEY1315bYR0I0a7Nl zdsDTJzZXs56kUABSuzQUNzvZjSKxNh6uH7YufGKAI7mCJksKpTrooIRpZV2MoZZzo cLAtdcb43RImuABmsrMTHbEIs52y0imxjhQanzf0k1OxWl6LAWGqL2oj0h5Klkh5LG chz8vkBvwMabA== Received: from [100.115.223.179] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C780D3782066; Wed, 24 Jan 2024 00:24:35 +0000 (UTC) Message-ID: Date: Wed, 24 Jan 2024 02:24:35 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/3] phy: rockchip: Add Samsung HDMI/DP Combo PHY driver Content-Language: en-US To: Andy Yan , Vinod Koul , Kishon Vijay Abraham I , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Philipp Zabel , Johan Jonker , Sebastian Reichel , Sascha Hauer , Algea Cao Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com References: <20240119193806.1030214-1-cristian.ciocaltea@collabora.com> <20240119193806.1030214-4-cristian.ciocaltea@collabora.com> <298b7a10-2acb-4297-92cd-2ee4d890bfb2@rock-chips.com> From: Cristian Ciocaltea In-Reply-To: <298b7a10-2acb-4297-92cd-2ee4d890bfb2@rock-chips.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Andy, On 1/22/24 12:17, Andy Yan wrote: > Hi Cristian: > > On 1/20/24 03:38, Cristian Ciocaltea wrote: >> Add driver for the Rockchip HDMI/eDP TX Combo PHY found on RK3588 SoC. [...] >> +static int rockchip_hdptx_phy_power_on(struct phy *phy) >> +{ >> +    struct rockchip_hdptx_phy *hdptx = phy_get_drvdata(phy); >> +    int bus_width = phy_get_bus_width(hdptx->phy); >> +    int bit_rate = bus_width & DATA_RATE_MASK; >> +    int ret; >> + >> +    dev_dbg(hdptx->dev, "%s bus_width=%x rate=%d\n", >> +        __func__, bus_width, bit_rate); >> + >> +    ret = pm_runtime_resume_and_get(hdptx->dev); >> +    if (ret) { >> +        dev_err(hdptx->dev, "Failed to resume phy: %d\n", ret); >> +        return ret; >> +    } >> + >> +    if (bus_width & HDMI_EARC_MASK) >> +        hdptx->earc_en = true; >> +    else >> +        hdptx->earc_en = false; >> + >> +    if (bus_width & HDMI_MODE_MASK) { > > Here use phy->attrs.bus_width to indicate different work mode, > we also use the same in our bsp, but not sure if it is the appropriate way. Unfortunately the PHY API doesn't seem to provide a clean way to pass arbitrary data. Probably for the initial support we could simply drop the 10-bit color depth, FRL and EARC features. Thanks, Cristian