Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2210252iof; Tue, 7 Jun 2022 23:18:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrEJSOJSaWhsIzI0Oc0/BYvqLF103YCUGS89vQnvMrWxSO+SfoXJm/yNaoTSztjk7/ouik X-Received: by 2002:a63:8a4c:0:b0:3fc:5c99:a195 with SMTP id y73-20020a638a4c000000b003fc5c99a195mr28506088pgd.29.1654669098247; Tue, 07 Jun 2022 23:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654669098; cv=none; d=google.com; s=arc-20160816; b=sbuSnNu9uMXnQENOFR8Fh7swHBulNc37Miqn5H9Ajv6Y4MH51yPxcFw2DclUnOKLw8 BpLA5TbFc+g+6zDveFtbQlUQyvf0Jjsjod/5zIkrvl3q7/bQwEH/XivhZS4BE7g0VhP6 b8GMMQUiPrTh6j7MyWoAZ5v327kAHEZeXSx0aoh23aSOHej+lkXGU0Fu4xGfxShS/RdJ O1fYO1Zmfl/SVaNx/WurpQmHkYKk//LJPH/IX3hTuac16lxUkB5k6uEMLrxaMbM+yWTD Tp33b0S3MoPSrSdijxt3Jd3WX7KPz/yRgbml4E/RzkRlFkmE3McDkh2JsUsnhvfSDoMR OAbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2fKoWW6NOg5lxeXgt4oK9futpOxTdvNtK6BCDtPAU98=; b=VBfQuJ3UsiQcKoRrj5S288FfcfWrKkq4wKNW5gL7cz90R9k9lYstX+XsPT1yO2w9j8 pRdE+gqidPuPHdU3F6Ns1Cqg7hY6Ztq+kNPOpOg/sJMs3FE9LXtkvUJqCwxtKnxz6pbz tlvQYhJlHMZG3m+UQzYieaHDt6oR+ywpV3kmD3azZmHrftmqvhuYoz8POtw1NeKQ0Rv/ X10Tx6Nu+f2UamETvIOS7rIicoI4ZBlrBg0ldEoUfhNhhMT5tD1LAavq230+1Qj/B6xv QZKrs5LjtWT27okwe+9smCtaCahf/4+OzyVSwS8PNMhA1ZYLQcihfSFAF/7MAyZjkBns pAkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SolS7aXq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u8-20020a056a00098800b00510538e14f6si12445258pfg.364.2022.06.07.23.18.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:18:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SolS7aXq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A31DD1D9EC1; Tue, 7 Jun 2022 22:38:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357665AbiFHByQ (ORCPT + 99 others); Tue, 7 Jun 2022 21:54:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1586635AbiFGXve (ORCPT ); Tue, 7 Jun 2022 19:51:34 -0400 Received: from mail-ot1-x32b.google.com (mail-ot1-x32b.google.com [IPv6:2607:f8b0:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 261A128DC1D for ; Tue, 7 Jun 2022 15:43:09 -0700 (PDT) Received: by mail-ot1-x32b.google.com with SMTP id r14-20020a056830418e00b0060b8da9ff75so13887791otu.11 for ; Tue, 07 Jun 2022 15:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=2fKoWW6NOg5lxeXgt4oK9futpOxTdvNtK6BCDtPAU98=; b=SolS7aXqDUswytp1fIPeZ8E1O3SQf6wC7YBU78MIsnycc/aht7NFwCUavHoI6an47Y TUuuc48GSuMVJYOpJ14Z5Y+qsODzrZYwDUObm1f8e4XyCvphW5hPQrTajc6XPdZKzCb5 LlCje7mUunZrQIvSOEXGVBawzYxgCxwUeMkYQ+SkapFy5RW4cxafIQosi3FzQhYE/G6u aqQW/J4nFuZ2gbrnANdIzSDKP1fwBuWLt40+SkGe1cGhRDeMOojyaJPQG64uf6DJ/buU Fi9TXW46Rs2RP/CenV0BX0mwXdkI4o+sHrahqRUdSVkraBny2sYLjM9Hs90H4S/+7FYl li8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2fKoWW6NOg5lxeXgt4oK9futpOxTdvNtK6BCDtPAU98=; b=F4eVtOdokACHqWtPH4vT7bxm/2D0wIsZSAs4Q9Ar7qvgcwyNMxLjzCahWfipj0eEwd yG4+I17nH1Dbrhtoto2/OXRA/dJxJYJ850wS0YkRnU5seneZiiGzonyS47NkKKDszB6+ hT3u+8FV2iqPC8uHDOzWSm/v4CDc/Kt1Zaa3PwdI10lyC7b976VNkvVRcRcREPpb9oE3 zN5lxvfBnaTLnZAUlRZ60PXuOurnz5I2XCbO1SMDA80QHTJu2XtW082NQs3V/UzJCQOr UI0lrWX1NEJX6xOZsH+Q3x/QQHk3m3G+gFB5T8hJX2vVWx7Zmqe1kyCuQ1nK0fpyPilz QpZQ== X-Gm-Message-State: AOAM531Bk2Fdnz7LDN7OgRaTV1EiwYaCzqFb5PzDN+qPWTpIrUm3pl+C 6yfhGfMlZuSJscSMJNwMTDUH+w== X-Received: by 2002:a05:6830:9c2:b0:606:1e0a:cc8d with SMTP id y2-20020a05683009c200b006061e0acc8dmr13468851ott.265.1654641787842; Tue, 07 Jun 2022 15:43:07 -0700 (PDT) Received: from ripper (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id u13-20020a056871008d00b000f5d4e5b9a0sm8903477oaa.2.2022.06.07.15.43.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 15:43:07 -0700 (PDT) Date: Tue, 7 Jun 2022 15:45:30 -0700 From: Bjorn Andersson To: Dmitry Baryshkov Cc: Kishon Vijay Abraham I , Vinod Koul , Manu Gautam , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/5] phy: qcom-qmp: Add USB3 5NM QMP UNI registers Message-ID: References: <20220607213543.4057620-1-bjorn.andersson@linaro.org> <20220607213543.4057620-3-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 07 Jun 14:58 PDT 2022, Dmitry Baryshkov wrote: > On 08/06/2022 00:35, Bjorn Andersson wrote: [..] > > +#define USB3_V5_5NM_UNI_QSERDES_COM_BIN_VCOCAL_CMP_CODE2_MODE0 0x1b0 > > +#define USB3_V5_5NM_UNI_QSERDES_COM_BIN_VCOCAL_CMP_CODE1_MODE1 0x1b4 > > +#define USB3_V5_5NM_UNI_QSERDES_COM_BIN_VCOCAL_CMP_CODE2_MODE1 0x1b8 > > +#define USB3_V5_5NM_UNI_QSERDES_COM_BIN_VCOCAL_HSCLK_SEL 0x1bc > > +#define USB3_V5_5NM_UNI_QSERDES_COM_RESERVED_1 0x1c0 > > +#define USB3_V5_5NM_UNI_QSERDES_COM_MODE_OPERATION_STATUS 0x1c4 > > These defines look completely compatible with the existing ones in the > QSERDES_V5_COM_ namespace. Please use them instead. > Can you please confirm that all these constants are exactly the same as the existing V5 entries? [..] > > +/* Module: USB3_UNI_PCS_USB3_PCIE_USB3_UNI_PCS_USB3 */ > > +#define USB3_V5_5NM_UNI_PCS_USB3_POWER_STATE_CONFIG1 0x00 > > +#define USB3_V5_5NM_UNI_PCS_USB3_AUTONOMOUS_MODE_STATUS 0x04 > > +#define USB3_V5_5NM_UNI_PCS_USB3_AUTONOMOUS_MODE_CTRL 0x08 > > +#define USB3_V5_5NM_UNI_PCS_USB3_AUTONOMOUS_MODE_CTRL2 0x0c > > +#define USB3_V5_5NM_UNI_PCS_USB3_LFPS_RXTERM_IRQ_SOURCE_STATUS 0x10 > > +#define USB3_V5_5NM_UNI_PCS_USB3_LFPS_RXTERM_IRQ_CLEAR 0x14 > > +#define USB3_V5_5NM_UNI_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL 0x18 > > +#define USB3_V5_5NM_UNI_PCS_USB3_LFPS_TX_ECSTART 0x1c > > +#define USB3_V5_5NM_UNI_PCS_USB3_LFPS_PER_TIMER_VAL 0x20 > > +#define USB3_V5_5NM_UNI_PCS_USB3_LFPS_TX_END_CNT_U3_START 0x24 > > +#define USB3_V5_5NM_UNI_PCS_USB3_LFPS_CONFIG1 0x28 > > +#define USB3_V5_5NM_UNI_PCS_USB3_RXEQTRAINING_LOCK_TIME 0x2c > > +#define USB3_V5_5NM_UNI_PCS_USB3_RXEQTRAINING_WAIT_TIME 0x30 > > +#define USB3_V5_5NM_UNI_PCS_USB3_RXEQTRAINING_CTLE_TIME 0x34 > > +#define USB3_V5_5NM_UNI_PCS_USB3_RXEQTRAINING_WAIT_TIME_S2 0x38 > > +#define USB3_V5_5NM_UNI_PCS_USB3_RXEQTRAINING_DFE_TIME_S2 0x3c > > +#define USB3_V5_5NM_UNI_PCS_USB3_RCVR_DTCT_DLY_U3_L 0x40 > > +#define USB3_V5_5NM_UNI_PCS_USB3_RCVR_DTCT_DLY_U3_H 0x44 > > +#define USB3_V5_5NM_UNI_PCS_USB3_ARCVR_DTCT_EN_PERIOD 0x48 > > +#define USB3_V5_5NM_UNI_PCS_USB3_ARCVR_DTCT_CM_DLY 0x4c > > +#define USB3_V5_5NM_UNI_PCS_USB3_TXONESZEROS_RUN_LENGTH 0x50 > > +#define USB3_V5_5NM_UNI_PCS_USB3_ALFPS_DEGLITCH_VAL 0x54 > > +#define USB3_V5_5NM_UNI_PCS_USB3_SIGDET_STARTUP_TIMER_VAL 0x58 > > +#define USB3_V5_5NM_UNI_PCS_USB3_TEST_CONTROL 0x5c > > +#define USB3_V5_5NM_UNI_PCS_USB3_RXTERMINATION_DLY_SEL 0x60 > > These look like QPHY_V5_PCS_USB3, but without additional 0x300 offset. I'd > suggest modifying qcom-qmp-phy-usb.c to allocate another register space for > pcs_usb and updating QPHY_V4_PCS_USB3_foo / QPHY_V5_PCS_USB3_foo defines to > remove this offset. > > Afterwards most if not all constants from this header can be merged into > phy-qcom-qmp.h I do not think that it makes sense to split this header at > this moment. The QSERDES_COM/_TX/_RX/_PCS defines are common to all PHY > types. > You might be right, but I spent considerable time debugging the combo phy (which is version 5.0.0) and in the end it turned out that it's not the same offsets. I really would prefer that we stop haphazardly try to fit things into the phy-qcom-qmp.h with version numbers that we essentially make up base, when Qualcomm dumps the register layout for each generation in their downstream kernel. Regards, Bjorn