Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3798834rdb; Thu, 14 Sep 2023 03:04:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOnjPBYS7bUdC8JRqBJubOvrLAA2nU+Y5pb83EfV9+tewJGAvtl0NPztSDiDBQ3WeLTUTv X-Received: by 2002:a05:6808:643:b0:3a8:8408:edac with SMTP id z3-20020a056808064300b003a88408edacmr5476181oih.37.1694685855662; Thu, 14 Sep 2023 03:04:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694685855; cv=none; d=google.com; s=arc-20160816; b=Y459O6oSYd74HQRGD4NxGGos35sPObFKJIE63boASydl3NsbapRCQd4+aNYIJ3AgW4 rREDde1IhK7vB+n/6eyTYEpNBK0FjiDAFDbOqlBoeztJ0zSPOL82kn18O3OrtumcvmbE uqlTGtWXvHBsPNY3CrbPLsZyqEQ7Rf4w9rhV/cy0w8Hi+gMQ3IBFLd4ldhwO8HMUTIKX VAuhcyGHIgbrSLxZowL1dX8ZQfW/Yzn4v5SCws9v5FmB0f/gAzj9mb7e2UlXR7R7eUCf 8D/uJVQYuZrkEbAdG7AmD58NVfXlR2c5UYSWrN2pC9yim40ANIXIW2WcgzA2/dqfsy7o eAcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=dGvyPuDXfJumH13lGGqN64P86dyDCoQjPGvMDx/fHQU=; fh=asj61oZNJ6eDfmDLamJd2s7G1I7RqPpOy3YuOI7yh2k=; b=EGn35Dni8FZ7wZ+C93AhC7aL7Eu3uQg9qfGmLrSlAbnqen3sljoB7oKk/V3md1iWJz jSpHT8UcPfnDUsyzQUqzXNs/+4Ss9OBePtgYIb84UXxzxqQg5al/DtlzkNmO8rudcQg/ QVt27mjcEj1ud0oyaKCTzN6vBBLuNU/lkb+l8P3otieRZpq7ELGzbXRhPMtKyz1AC9R4 GW0rB7pFcdIIfQyx6HHlGQpPB51mHyk3q1fk9jTsQn0TeV+6w4YtToBFKW05mRUooDCx 44Cwkwo/JgJjQ/QGv5JhoNQC2lQZgGSACijKSmZTbvbMycPBCYz9cn/nFZQJRFtHCfVf Zw0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DLQQgPDE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id s4-20020a056a00178400b0068fbf6ba315si1313444pfg.233.2023.09.14.03.04.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 03:04:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DLQQgPDE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BB8D780874C7; Wed, 13 Sep 2023 23:15:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbjINGPt (ORCPT + 99 others); Thu, 14 Sep 2023 02:15:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230255AbjINGPs (ORCPT ); Thu, 14 Sep 2023 02:15:48 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9507F5 for ; Wed, 13 Sep 2023 23:15:43 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9ad810be221so76142966b.2 for ; Wed, 13 Sep 2023 23:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694672142; x=1695276942; darn=vger.kernel.org; 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=dGvyPuDXfJumH13lGGqN64P86dyDCoQjPGvMDx/fHQU=; b=DLQQgPDEAaObTKNLdTw7Z/9rGBt/jvdZqSnKERdo+TGuRJ4qECLiOJ6UQaMsOSUhyc ZvYCcv9Rv80J6hSAo7dE0li52dgQaMTkavf4spd7QjByTl1wHnjCSVkRO6DVQkkAxWaH VPwg+hiEPLk9wMCe73wNwJ2zeRzOQQM6DgHAmPjL+EyK8K9uMwTlxXxfnMxIeu+nqH6B 2krsrZQKoC0rgrrZswHzWXIRMSBNuFd0OX0GhnNl319akWcvKhKc5wzZloMRlYNgbMj9 AqTAM7ZeQVgmgTRwuTGw7nDxcvRfkHWmdQMAanKBf5Bt9G0KaZZpiMcSSKz1lY5EyRsP n3wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694672142; x=1695276942; 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=dGvyPuDXfJumH13lGGqN64P86dyDCoQjPGvMDx/fHQU=; b=jrlxmuZ1K6pqZITpX3PfPoyvceyEgvTdUtITwYJpy7G+fG6Eg+YRZExDDgzo1IW3xX 72o2unJA8aOqaps3PTY0/0Jys+bBPaT3EO8wixUUaeo9qPyjHshqYnbDyj9h5lyWb9VF i2uQBVh87HZud9b7fAWcdTNQ1WHV7IacLi+r+A1c65zvSVB847uE+iwQ/9IR26s6jVlw PX0tOENlXASWljFMhkIu1rrdtNlP6n+Oshj3vlvUtNyk6WA0WboeAk0fQSV19UlIkkDg oLhjx7RDR9VMl+wOQDAEBXfpLUhCHHB1btH9pM4c5K7nqi9fS0d//+rdy/2oHhMF1H87 WyZw== X-Gm-Message-State: AOJu0YyscZ2n49aG9JOZGlDJmnzFEhltj+x9MhL7zplNna+MBMVeKuJd zM4CY/hLpaNJ1+EvgfglV1eOgA== X-Received: by 2002:a17:907:b10:b0:9ad:ada4:bad4 with SMTP id h16-20020a1709070b1000b009adada4bad4mr1786445ejl.11.1694672142335; Wed, 13 Sep 2023 23:15:42 -0700 (PDT) Received: from [192.168.1.20] ([178.197.214.188]) by smtp.gmail.com with ESMTPSA id uz3-20020a170907118300b0099cc36c4681sm507215ejb.157.2023.09.13.23.15.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Sep 2023 23:15:41 -0700 (PDT) Message-ID: <357805c5-bedb-8972-bcf1-fabaaaf90ad9@linaro.org> Date: Thu, 14 Sep 2023 08:15:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH v7 4/4] clk: qcom: add clock controller driver for qca8386/qca8084 Content-Language: en-US To: Luo Jie , andersson@kernel.org, agross@kernel.org, konrad.dybcio@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, catalin.marinas@arm.com, will@kernel.org, p.zabel@pengutronix.de Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_srichara@quicinc.com References: <20230914054639.13075-1-quic_luoj@quicinc.com> <20230914054639.13075-5-quic_luoj@quicinc.com> From: Krzysztof Kozlowski In-Reply-To: <20230914054639.13075-5-quic_luoj@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 13 Sep 2023 23:15:50 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email On 14/09/2023 07:46, Luo Jie wrote: > The clock controller driver of qca8386/qca8084 is registered > as the MDIO device, the hardware register is accessed by MDIO bus > that is normally used to access general PHY device, which is > different from the current existed qcom clock controller drivers > using ioremap to access hardware clock registers. > > MDIO bus is common utilized by both qca8386/qca8084 and other > PHY devices, so the mutex lock mdio_bus->mdio_lock should be > used instead of using the mutex lock of remap. > > To access the hardware clock registers of qca8386/qca8084, there > is special MDIO frame sequence(three MDIO read/write operations) > need to be sent to device. > > Signed-off-by: Luo Jie > --- > drivers/clk/qcom/Kconfig | 9 + > drivers/clk/qcom/Makefile | 1 + > drivers/clk/qcom/nsscc-qca8k.c | 2178 ++++++++++++++++++++++++++++++++ > 3 files changed, 2188 insertions(+) > create mode 100644 drivers/clk/qcom/nsscc-qca8k.c > > diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig > index 865db5202e4c..c95ada6a1385 100644 > --- a/drivers/clk/qcom/Kconfig > +++ b/drivers/clk/qcom/Kconfig > @@ -203,6 +203,15 @@ config IPQ_GCC_9574 > i2c, USB, SD/eMMC, etc. Select this for the root clock > of ipq9574. > > +config IPQ_NSSCC_QCA8K > + tristate "QCA8K(QCA8386 or QCA8084) NSS Clock Controller" > + depends on MDIO_BUS || COMPILE_TEST This is SoC is for both ARM and ARM64 worlds? > + help > + Support for NSS(Network SubSystem) clock controller on > + qca8386/qca8084 chip. > + Say Y or M if you want to use network features of switch or > + PHY device. Select this for the root clock of qca8k. > + Best regards, Krzysztof