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 332AEC35FFF for ; Wed, 19 Mar 2025 07:42:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type: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=OReKKcfOJkNp0kmi489WA/dv8ioDXf0PJNSDqJ933OM=; b=MUFpvPsOI5Pge6H3DI0XPzY0BZ hm8/1P+PWGyD7A5VBVwTepdGUiHZjhATd8HzwKAP2RpsWLG13Fz9xy8kXtOXQWqmBvDCwk5+2wIrm BiZn2zCFYTYtDadFzRVHTI4n6BLejWVeQegqu0cihvwjuU1nYgCcLSE2LU4fcvmCScDhmo9HBTPCF ieVRHhvgGMf853U5XotQof0Beu7vIAnt2BcKyh+PRJ5nJdYknXWY4LfUSdasbm4PzHANFOZtIqdNd 73EpkON/3zxrUQ5AxItyPRSHlSroyV0YNKTbHx6YSiyT0V4nplgsVB6d65OrNt1+RF1MYn1OA53dU vDECDZXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tuo4R-00000008FXy-0NkW; Wed, 19 Mar 2025 07:42:35 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tuo22-00000008F9v-2kMc; Wed, 19 Mar 2025 07:40:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 3BBF7A48FC8; Wed, 19 Mar 2025 07:34:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B4F4C4CEE9; Wed, 19 Mar 2025 07:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742370005; bh=tKIbx2+7UEC6SU/Ci8glYFwYES+rjaNTdcbdH+R6TS4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=iTC2J7vI9gdw4qI2bdHDiMSymEqGhCe2EaCZpTpfQ2DERnFKR7kQs4qTvHQnTr7Tf Ng+DPcHm19bSxSO0miPkBpWLO9gbiq1xESNFLalNDHqTCSKQCmbd3l20qsrxk52w7E 1h+0v7377B0cpcqmfluYlpWf/kC4rT5P6xGzjjlq9e/M9/O33V9w2INM76kL2Cdj/P BfD+wdg8rSDUGHcoR4q3cB/LF3zf9aViOVfjBrvSYFhbuZWGQRR9UO2pkjT8JYGzm5 f2jqjFYo3VhcjJWuf2wRJ3A6viyEJjxq4lLg20lqwORpgH2hKficXCrNhSLVw+6SiB w0dToPGlDelcA== Message-ID: Date: Wed, 19 Mar 2025 08:39:52 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 09/13] dt-bindings: phy: Add documentation for Airoha AN7581 USB PHY To: Christian Marangi Cc: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Vinod Koul , Kishon Vijay Abraham I , Matthias Brugger , AngeloGioacchino Del Regno , Greg Kroah-Hartman , Lorenzo Bianconi , Daniel Danzberger , Arnd Bergmann , Linus Walleij , Nikita Shubin , Guo Ren , Yangyu Chen , Ben Hutchings , Felix Fietkau , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-usb@vger.kernel.org, upstream@airoha.com References: <20250309132959.19045-1-ansuelsmth@gmail.com> <20250309132959.19045-10-ansuelsmth@gmail.com> <4f16d239-f540-45d5-b67a-767b09f1c70c@kernel.org> <67d0862f.df0a0220.375bd.6b15@mx.google.com> <4a9ac302-dfbe-4d76-a634-a445957c313c@kernel.org> <67d95979.050a0220.166852.25e6@mx.google.com> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2t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RikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <67d95979.050a0220.166852.25e6@mx.google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250319_004006_832904_8099F2F0 X-CRM114-Status: GOOD ( 22.14 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On 18/03/2025 12:31, Christian Marangi wrote: > On Sun, Mar 16, 2025 at 06:01:02PM +0100, Krzysztof Kozlowski wrote: >> On 11/03/2025 19:51, Christian Marangi wrote: >>>> >>>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>>> + enum: [0, 1] >>>> >>>> I don't understand why do you need index property here (which are >>>> usually not allowed). >>>> >>> >>> Eh... As said in the description this is really to differentiate the 2 >>> different physical port... >>> >>> Each port have a dedicated oscillator for calibration and these >>> calibration are identified by an offset (all placed one after another in >>> a separate register space). >> >> So different oscillators? Then describe the oscillator and its differences. >> >> Different programing model? Different compatible. >> >> Other difference? Depending what is the difference. >> >> But there is no such thing as "different port ID" based on your >> description above. You just claimed that they are different, but you do >> not put that difference to hardware description. Instead you encode that >> difference in the drivers and it should be opposite. The DTS, so the >> hardware description, should tell you the difference. And I am sorry, >> but in 99% of cases "I am the first phy" and "I am the second" is not >> the actual difference we are interested in. >> > > Ok to make it as clear as possible. (hope I don't contraddict with the > previous statement) (actually yes the "separate register space statement > was wrong and sorry for the confusion") > > - 2 USB port > - USB 2.0 needs to be calibrated with an oscillator > - Each USB port have his own dedicated oscillator somewhere in the HW > - Each USB port have at the same offset a register to SELECT the > oscillator. This register refer to the same oscillator selection in > the HW. > > Example: > reg 0x1fac0100 MASK 27:26 can be set to source out of oscillator 0,1,2 > reg 0x1fae0100 MASK 27:26 can be set to source out of oscillator 0,1,2 So that's your difference between devices - you choose the oscillator. > > Both register refer to the same oscillators in hardware (hence each > port should select the correct one) > Selecting oscillator 0 for both USB port is problematic. > > With this in mind is it ok if I describe this with something like > > airoha,usb2-monitor-clk-sel = ; > > and some dt-bindings include > > #define AIROHA_USB2_MONCLK_SEL0 0 > #define AIROHA_USB2_MONCLK_SEL1 1 > #define AIROHA_USB2_MONCLK_SEL2 2 > #define AIROHA_USB2_MONCLK_SEL3 3 > > Or an enum of string like "osc0", "osc1", "osc2"...? Both are fine. Best regards, Krzysztof