From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 044E2C4332F for ; Tue, 15 Nov 2022 14:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PcUdjo0eUJGyHOGx8Stq0v5mAlW2xH4vpxHFJji78Hc=; b=2cGDmq27kWQWAU zwpoyHFl+CyV4em11meI/tfzI8NBvuIWxONSUYmxy9W3hRclv9ZxuE0BgabV0V8aHXFn/bWo7XnX3 p479lJ9m9St4RFhSz1up0nHmZNLj/qnqRRW5UE0rrFeaUTch6Bnd2SClbjEfGWcmGNeubosVoDb0D ZPFnNJT0TXlOCRBIPFndy/Ex8abM3vmrhQxR5/z4oc72HDx9HmX91y4RdXl/9kEY1bInEOCzpzZ2L MLuI0NMTQjwoJ/W5FGKUYJVhjeyvhKx79YZChqlzM/7Pa1ETZNZ5HcGf3DL/CaXnjdVeCjIMn1e0T 4LCxpehndRNhCdRHY0vQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouxNE-00C7P1-Ay; Tue, 15 Nov 2022 14:57:16 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouxNA-00C7Jz-SF for linux-phy@lists.infradead.org; Tue, 15 Nov 2022 14:57:14 +0000 Received: by mail-lf1-x12a.google.com with SMTP id j16so24762980lfe.12 for ; Tue, 15 Nov 2022 06:57:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=DJek8SvY1lKznzyHiHHaCNeGOuDew0+hc/954ZKQZoo=; b=XCKQP2v4t1zCGERxBtVGE0MF/1x+qOv4zbnMsLNEb845mJn4wjXgRsw0fV3M+zoFwB KHNsVWKGUEkftwb1b5xobkusAs80O6C6jBpsPsR+mdPhxJ8MAzBpYfJUVeHjwJFOSODz Yawq7iwkvB+xzXfQvtw9g0w0zMk8IoMLpJ2u3yhBV6T4TfkAcneJ8rto60pT/xPhDr4u KrsM0Wi+04es9OgwTr4mAZMbOtrk1q1gqsH95Iiw4bKzQ2im3o/a04kITaySfItQSgES vrZA4ktt2Cm9bI2CyZ50mSYB/sMpgK9dAO6GqvNllOtYdXpBNQyqgX7hBv58avv1I7B5 zoJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DJek8SvY1lKznzyHiHHaCNeGOuDew0+hc/954ZKQZoo=; b=i4Jb3bLKviMCjcsRFdVsAgKZIMQtnXGO0C+jSuu+cpufiXKRIaEVIwNw+wyHprwNKr LvudeuBtjLIKYQfNC3cLOgqcSZhTEt1qopTuz3o2ikYfwLaMtGDONcZc+TWqhmumsmXy wGJOK6Hgb4upVSeNdSm2HUhLNE2+lbb1jAwRCvHasQJybEyWXUn5IwEtwagCYchcKrRj H6GSG9rQkWvuvcBQ0wBBPwfcrSSrv/mPdQuQjGhu5IJ7tWoQgwHgoobkrDyGbi6EzuYN wVLZnpUYK3V344vpbjDc6XfbjFRUA7cRiicUQZVXiaKpiB7jf+M5zG4b2vjvaKdsPrnB qTbw== X-Gm-Message-State: ANoB5plOk8itq6cMNLcdyRDCiAaz2RkSG02eA/z3+WQNvksLxzsc4+8V 2APbi/7UGLv/LJv0zC+vxBx7W86OQSAnjKtr X-Google-Smtp-Source: AA0mqf7EJdF6Rm3TGtS3IrReZ2gMfHNq0nBv5xhrw57YYWrJhBklbkSG9T4lJmh0N7yrbW9WrlVPIA== X-Received: by 2002:a05:6512:3134:b0:4a8:3a6a:c2b8 with SMTP id p20-20020a056512313400b004a83a6ac2b8mr5806014lfd.557.1668524220782; Tue, 15 Nov 2022 06:57:00 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id s7-20020a19ad47000000b004abc977ad7fsm2225842lfd.294.2022.11.15.06.56.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Nov 2022 06:57:00 -0800 (PST) Message-ID: <28ddcec9-095f-f2e7-48ab-e05aab04963a@linaro.org> Date: Tue, 15 Nov 2022 15:56:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 02/14] dt-bindings: phy: qcom,qmp-usb3-dp: fix sc8280xp bindings Content-Language: en-US To: Johan Hovold Cc: Johan Hovold , Vinod Koul , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <02725b78-04ad-8f4a-25c2-9cdaa1e37ab7@linaro.org> <8420c342-9dce-aea7-8d1e-f141e0c1ebb5@linaro.org> <61df3c4f-f41c-9525-606d-1b8261163080@linaro.org> From: Krzysztof Kozlowski In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221115_065712_953277_709D2213 X-CRM114-Status: GOOD ( 22.79 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On 15/11/2022 15:22, Johan Hovold wrote: > On Tue, Nov 15, 2022 at 09:12:54AM +0100, Krzysztof Kozlowski wrote: >> On 14/11/2022 18:08, Johan Hovold wrote: >>>> >>>> Which is also fine. I don't understand still why it is a problem - even >>>> if you have multiple files, one for each SoC/phy. If USB4 brings here 10 >>>> more clocks and other SoCs/phys might bring many more options, then what >>>> else can you do? Grow the binding file with big text-based mapping of >>>> IDs? It's not a viable solution. Header or headers is the only >>>> maintainable way for such cases. >>> >>> So then we must add per-SoC (and PHY type) headers even if we can >>> possibly reuse defines from one platform for another as long as they >>> appear to be similar enough? >> >> No, you don't have to. I just got impression that future devices will >> bring so many changes that anyway you will end up with per-SoC defines. >> >>> For example, using a "SC7180_USB3_DP" infix >>> for the current platforms and add a new series of indexes for SC8280XP: >>> >>> QMP_SC7180_USB3_DP_USB3_PIPE 0 >>> QMP_SC7180_USB3_DP_DP_LINK 1 >>> QMP_SC7180_USB3_DP_DP_VCO_DIV 2 >>> >>> QMP_SC8280XP_USB4_USB3_DP_USB3_PIPE 0 >>> QMP_SC8280XP_USB4_USB3_DP_DP_LINK 1 >>> QMP_SC8280XP_USB4_USB3_DP_DP_VCO_DIV 2 >>> QMP_SC8280XP_USB4_USB3_DP_USB4_PCIE_PIPE 3 >>> ... >>> QMP_SC8280XP_USB4_USB3_DP_USB4_RX1 9 >> >> The names are just a names, you can even use QMP_SC7180_* on SC8280XP. >> You can skip the SoC part and have something shared. We already have >> such patterns - although maybe more often for outside components (like >> PMICs). The differences are: >> 1. For per-SoC name it's quite obvious which clock is supported on fiven >> SoC, >> 2. With shared names, you should document somewhere mapping between >> supported clocks and SoCs. Also what to do if new device comes with 10 >> new clocks entirely different - re-use/map existing defines or add >> completely new set of 10 of them? > > Ok, thanks. I'll go with a common prefix per PHY type for now, and we > can worry about hypothetical hardware revisions later. > > I'll use a "QMP_USB43DP_" prefix for the new SC8280XP binding, which can > be reused also for the older SoCs with USB3-DP PHYs if/when we convert > them as their indexes will be a subset of the SC8280XP ones: > > /* QMP USB4-USB3-DP clocks */ > #define QMP_USB43DP_USB3_PIPE_CLK 0 > #define QMP_USB43DP_DP_LINK_CLK 1 > #define QMP_USB43DP_DP_VCO_DIV_CLK 2 > > Since I'm adding a new header anyway, I decided to go with dedicated > indexes also for the PHY selection (instead of using the PHY_TYPE > defines): > > /* QMP USB4-USB3-DP PHYs */ > #define QMP_USB43DP_USB3_PHY 0 > #define QMP_USB43DP_DP_PHY 1 > > I'll add these to a common dt-bindings/phy/phy-qcom-qmp.h header so that > it can be used also for the UFS clocks (with a "QMP_UFS_" prefix). Sounds good, thanks. Best regards, Krzysztof -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy