Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2679021imw; Wed, 6 Jul 2022 09:55:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sTdctW5zd3M9cEdgQzazuOcqZ5Eoc6pJcTd6kkPNoQar0Vyv2FGIQJtpnvcWIlH2Hbyd7M X-Received: by 2002:a17:90b:2114:b0:1ef:8ac4:c66c with SMTP id kz20-20020a17090b211400b001ef8ac4c66cmr19150232pjb.174.1657126507473; Wed, 06 Jul 2022 09:55:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657126507; cv=none; d=google.com; s=arc-20160816; b=eXm0ac5UX1mLiJh+4z+2+h+Pftp93yk96rGwLJ13Yh9GaCTU+IiAlnzJlMDFSz4Z1o zIIg24jLWPXry/A5STrLvDIBwn5y/pe0AJOUMjGYN1/Wryk0+eAh7HcsppBiU3YsxZFG Z/QbptpBY/m6G0N39KJZfllo6IviBRsh4t6b1yEK3XBtHiYNiBQUr2UT5hfMOCIPXeH8 bk6x4czm3xweY+bV5HI4sPVuFpECH7awKc3y3YE/nisirc1S4cd4kEhja2Ne+KI7B56b cAI7vld8dT1uGDH/P6jvvTllHZ3jYIhxqGtWh8F+bbosE2iOKUoWMpuPQOhnYmIB22Fk qRpg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=gFzSblCXd9ixFvM9qEStifuAy+dNYfEm7QCn/AIme10=; b=HQDzQ3bCfMnCxk1unkLMRBHaBPi7bvE36XKK20Yy6x5GVrcwrbIs9B5R2r8yZMlBLQ lDPFa98CQFF4XIiSI0aNeFH0+8AQ6v0nFUzhYyoxeIpoJG9OUj5ZmfaGEfxN+w0LVfxd RsuMVc+7QEA4kpEfLg7TGeB5D8tip1j898vKnBbH0JDlme8kfWkPXbLgKMsTVe5N29Ln 6rt4u8qOke7vsSD9DW2NNCBaK/oJVI8ATKUvqPYMmhwzpgM4P1WHo6X+njBE654M9bSm wN/r7Wlsywp+4N22s2MKQ19Iqy9xejikQQAMzcu6j21vRKeBGRPCgAhDTcrpSurQWxT8 QA/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ge+fJ19M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a170902b94800b00161872d6f01si15381164pls.98.2022.07.06.09.54.54; Wed, 06 Jul 2022 09:55:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ge+fJ19M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232948AbiGFQvu (ORCPT + 99 others); Wed, 6 Jul 2022 12:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234092AbiGFQvr (ORCPT ); Wed, 6 Jul 2022 12:51:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DF152A42D; Wed, 6 Jul 2022 09:51:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 181E9B81E32; Wed, 6 Jul 2022 16:51:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 072EBC3411C; Wed, 6 Jul 2022 16:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657126303; bh=pIiWhmzedFgugbr07W1T7Td/EKYRbZ9ectUju0WGfCk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ge+fJ19MGAxwkfdGkPGAlffA869wkEJnIo+qBMcyxMktWwMme4Xr9KH58gLkM4hVP RGn62if3hFffimiyBpH1AeFafkJ1iAPhLLfJYp/KmWyDpZZWH2igubVXIZhshv1Tai oPzS9Iarw52/FXD+nX/hhgt2l5ZpJMz8YG0xJVLQ7z2QbWfXzj5p+/046/QrIwnmNr Rg2w7Q6XXF3zI1vhEiVl8QCDJJ3aef2yQjxJtRxCMKJe4Zze1H2AGMCHrKiF777+I3 onCecIwtu022Fs04j2Tn8sGleZ/QyrSZy8gZpbOcAVpbfVpG2e6utJlxTnt7wdxtlH SM49rT+6RZFvA== Date: Wed, 6 Jul 2022 22:21:39 +0530 From: Vinod Koul To: Wangseok Lee Cc: "robh+dt@kernel.org" , "krzk+dt@kernel.org" , "kishon@ti.com" , "linux-kernel@vger.kernel.org" , "jesper.nilsson@axis.com" , "lars.persson@axis.com" , "bhelgaas@google.com" , "linux-phy@lists.infradead.org" , "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "lorenzo.pieralisi@arm.com" , "kw@linux.com" , "linux-arm-kernel@axis.com" , "kernel@axis.com" , Moon-Ki Jun , Sang Min Kim , Dongjin Yang , Yeeun Kim Subject: Re: [PATCH v3 4/5] phy: Add ARTPEC-8 PCIe PHY driver Message-ID: References: <20220614011616epcms2p7dcaa67c53b7df5802dd7a697e2d472d7@epcms2p7> <20220614013446epcms2p8c88ea65da49447f72fef6536c7f73fb6@epcms2p8> <20220706081036epcms2p6baf1d8afac994cd0d45c5e59029c8ce7@epcms2p6> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220706081036epcms2p6baf1d8afac994cd0d45c5e59029c8ce7@epcms2p6> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 06-07-22, 17:10, Wangseok Lee wrote: > On?05-07-22,?15:30,?Vinod Koul?wrote: > > On?14-06-22,?10:34,?Wangseok?Lee?wrote: > >>?Add?support?Axis,?ARTPEC-8?SoC. > >>?ARTPEC-8?is?the?SoC?platform?of?Axis?Communications. > >>?This?is?based?on?arm64?and?support?GEN4?&?2lane. > >>?This?driver?provides?PHY?interface?for?ARTPEC-8?SoC?PCIe?controller, > >>?based?on?Samsung?PCIe?PHY?IP. > >> > >> Signed-off-by: Wangseok Lee > >> Signed-off-by: Jaeho Cho > >> --- > >> v2->v3 : > >> -remove unnecessary indentation > >> -redefine local struct to statis const > >> -add static const to struct that requires static const definition > >> -remove wrappers on writel and readl > >> > >> v1->v2 : > >> -change folder name of phy driver to axis from artpec > >> --- > >> drivers/phy/Kconfig | 1 + > >> drivers/phy/Makefile | 1 + > >> drivers/phy/axis/Kconfig | 9 + > >> drivers/phy/axis/Makefile | 2 + > >> drivers/phy/axis/phy-artpec8-pcie.c | 776 ++++++++++++++++++++++++++++++++++++ > >> 5 files changed, 789 insertions(+) > >> create mode 100644 drivers/phy/axis/Kconfig > >> create mode 100644 drivers/phy/axis/Makefile > >> create mode 100644 drivers/phy/axis/phy-artpec8-pcie.c > >> > >> diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig > >> index 300b0f2..92b8232 100644 > >> --- a/drivers/phy/Kconfig > >> +++ b/drivers/phy/Kconfig > >> @@ -73,6 +73,7 @@ config PHY_CAN_TRANSCEIVER > >>?? > >>??source?"drivers/phy/allwinner/Kconfig" > >>??source?"drivers/phy/amlogic/Kconfig" > >>?+source?"drivers/phy/axis/Kconfig" > >>??source?"drivers/phy/broadcom/Kconfig" > >>??source?"drivers/phy/cadence/Kconfig" > >>??source?"drivers/phy/freescale/Kconfig" > >>?diff?--git?a/drivers/phy/Makefile?b/drivers/phy/Makefile > >>?index?01e9eff..808c055e?100644 > >>?---?a/drivers/phy/Makefile > >>?+++?b/drivers/phy/Makefile > >>?@@?-12,6?+12,7?@@?obj-$(CONFIG_PHY_PISTACHIO_USB)????????????????+=?phy-pistachio-usb.o > >>??obj-$(CONFIG_USB_LGM_PHY)????????????????+=?phy-lgm-usb.o > >>??obj-y????????????????????????????????????????+=?allwinner/????????\ > >>?????????????????????????????????????????????amlogic/????????\ > >>?+???????????????????????????????????????????axis/????????????????\ > >>?????????????????????????????????????????????broadcom/????????\ > >>?????????????????????????????????????????????cadence/????????\ > >>?????????????????????????????????????????????freescale/????????\ > >>?diff?--git?a/drivers/phy/axis/Kconfig?b/drivers/phy/axis/Kconfig > >>?new?file?mode?100644 > >>?index?0000000..7198b93 > >>?---?/dev/null > >>?+++?b/drivers/phy/axis/Kconfig > >>?@@?-0,0?+1,9?@@ > >>?+config?PHY_ARTPEC8_PCIE > >>?+????????bool?"ARTPEC-8?PCIe?PHY?driver" > >>?+????????depends?on?OF?&&?(ARCH_ARTPEC8?||?COMPILE_TEST) > >>?+????????select?GENERIC_PHY > >>?+????????help > >>?+??????????Enable?PCIe?PHY?support?for?ARTPEC-8?SoC. > >>?+??????????This?driver?provides?PHY?interface?for?ARTPEC-8?SoC > >>?+??????????PCIe?controller. > >>?+??????????This?is?based?on?Samsung?PCIe?PHY?IP. > > > > How?different?is?it?from?SS?IP?and?why?should?it?not?be?under > > phy/samsung/?then? > > > > SoC platform is completely different from exynos platform and different > from exynos PCIe PHY. So the overall sysreg configuration is different > and register map is also different. The reset method and type of PHY for > initialization are different. This is not a driver that supports Samsung > SoC platform, but this PHY driver that supports only Axis, Artpec-8 > platforms, so it is not added to phy/samsung. SoC is a moot point. If the IP block is same then we should try to reuse the existing phy driver, modifications to current driver to support your changes should be fine... Is that feasible? -- ~Vinod