From patchwork Mon Dec 2 14:33:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 13890846 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 66DEDD78326 for ; Mon, 2 Dec 2024 14:42:42 +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: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=MO7RndIL4M9BqBFNQs9/VUiPinRWNZHXUCcV/Hhz6kY=; b=jTvhr1AmRqUig5+0bZgrPwHX88 NA8HcMkDNOzuDhC/0hY4EU0ctVDNRdp5totc4dhz3M5uQeJnt/npgaB6pVDCIvwgBY/XJeTC8wFlA KdGsiZ7ZqFaMS2+lttHPsvLKpKxVoIKJ5qFNryNNOAdNB5/nOKN51Vd7c014R8J3jruHeuWmPrlVs +i0NWIWO0A0EuZayPvmBM0KzsMVZYvPXou48Cjr3bhGD19Vc9a+pzSK7vkGRiR92d6abVWdkgh/y/ SWinGTFa575Cx9O+9TFTPPhqZi2SOpnZ0enrKdAFzfNpMOT3yrSPm9IBuZElyQ0NoibKfZVrHYoGI /u+9OhWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI7d9-00000006UsC-0hqk; Mon, 02 Dec 2024 14:42:31 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI7UY-00000006Spc-1cGq for linux-arm-kernel@lists.infradead.org; Mon, 02 Dec 2024 14:33:41 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-434a0fd9778so40037965e9.0 for ; Mon, 02 Dec 2024 06:33:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1733150016; x=1733754816; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MO7RndIL4M9BqBFNQs9/VUiPinRWNZHXUCcV/Hhz6kY=; b=L91Oe052GF4fSOvN3W7tpFdpadJ2jx8bFUmO+t2w32BKuwHxSTmMO/2bMcZi2YOcd3 9rM8wxOmqIBs3DHuMSwOpDhukkb5yYC/YOwviZk1ljztIqdwhcvuhhhFhAo0TbfXPTGR hUT866nriF/6tuGm0boHjh5bAlfIeIB1pSIU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733150016; x=1733754816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MO7RndIL4M9BqBFNQs9/VUiPinRWNZHXUCcV/Hhz6kY=; b=PfLRSFB/2lZPZWCgbvNFcX/7bwwhzAfMrkmQkL1WtHWyAbsLUF/hIlZx0UuUFLrNXv bfckkp6L/+A1I0MtIbBN1zZihR/n6OQ89JWy/73cf433o0i7/MolEUlk/LlAdoBcyOHL XmYNprk84Tnu787NGDm2MukjUjBEhkghsOaiXRTpnyBhQ3gZOyGK969NRk8DuTbXSGPz gI/Gq6k0Jt1n39VLJiSSCVXDnP7y3qOPD0KEns8IsBfLVl7uwfsmYP8jhjLjvDBeIeg3 XvFY1HxpXyf9e9/OEupXU3N5aKho5eWdA41UXAfznN6ki4aCMN4LS5o0SmTGdNYE3A1P GDHA== X-Gm-Message-State: AOJu0YzsXtTOzirZFUOXIosS6ehR9+FsRBZdo8GugAL7yD75N3qRhQMF h6haENAfnuQRCJ70y1FTGasO/dycKD1zsNzjNlTaTyolpOC0RdBcXMJywsuGFb/jKHW2z2QyGMu z X-Gm-Gg: ASbGncuDxzGjv4ZOn4SV2JHY95636b412inDvHV5KvNgQWk7zkgiSjSYatC1ufL4ISU +/ZHojVjD3bPTIypal/HtPDwvjBpzZ8LSMNdIY8QW0ulwwNeGGSNndqHWraOi+5iFYAMjs08k6a e6uOuOvwN3XuuTcEIJES7XNSWNRtsR+xq16B4FA6AlIZwtbAit6T6s4F+J1jCd0l12k4FT+aSVV YkNc8V1V2FHZ8013b3A7KYOuC0dzz1q/Ra2Ajt36OExKlxj+hFG0V4hCFVmLfzL0fJGcr762Kg3 waduBHtIuiVr/lElvx3TJ/y/SwAf1L9FV7dxIAtvtpu9UeQ= X-Google-Smtp-Source: AGHT+IFnRH0g2zecuvkeg70vcEHwDBSX16i2HnGbj1QA8WdxkOgfJwLhEB0xy8ebIOY3bQXUoeRFnA== X-Received: by 2002:a5d:5f81:0:b0:385:e9ba:acda with SMTP id ffacd0b85a97d-385e9baaeeamr5801500f8f.2.1733150016329; Mon, 02 Dec 2024 06:33:36 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385eed2510esm4312569f8f.69.2024.12.02.06.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 06:33:36 -0800 (PST) From: Romain Naour To: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, kristo@kernel.org, vigneshr@ti.com, nm@ti.com, Romain Naour Subject: [PATCHv3 1/2] dt-bindings: mfd: syscon: Add ti,j721e-acspcie-proxy-ctrl compatible Date: Mon, 2 Dec 2024 15:33:30 +0100 Message-ID: <20241202143331.126800-1-romain.naour@smile.fr> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_063338_706099_16F8661F X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Romain Naour The ACSPCIE_PROXY_CTRL registers within the CTRL_MMR space of TI's J721e SoC are used to drive the reference clock to the PCIe Endpoint device via the PAD IO Buffers. Add the compatible for allowing the PCIe driver to obtain the regmap for the ACSPCIE_CTRL register within the System Controller device-tree node in order to enable the PAD IO Buffers. The Technical Reference Manual for J721e SoC with details of the ASCPCIE_CTRL registers is available at: https://www.ti.com/lit/zip/spruil1 Signed-off-by: Romain Naour --- Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml index b414de4fa779..032cdd30d95f 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -115,6 +115,7 @@ select: - ti,am625-dss-oldi-io-ctrl - ti,am62p-cpsw-mac-efuse - ti,am654-dss-oldi-io-ctrl + - ti,j721e-acspcie-proxy-ctrl - ti,j784s4-acspcie-proxy-ctrl - ti,j784s4-pcie-ctrl - ti,keystone-pllctrl From patchwork Mon Dec 2 14:33:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 13890847 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 DBF2CD78326 for ; Mon, 2 Dec 2024 14:43:44 +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: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9OcRP67UkWqEX1kfwylj4ZfjPBj6iFSQEtH2rLKeSLI=; b=vsVBxKwhSA0LWT8kKFA5mty6Mz vSbd1tgGuRLbbFMSD5pkhzLMERhBGpS0k2PQTVM8FT9fOiC2bvpIc9mUFKIf1ecBAXge5PGfx86P+ u9zYxwA8UswAw0PYyuGjoGjxWjP5pTJ9RvmRB0QjZznhVysIXu8+LoGD4h0Q3lUETR2gIi7A9pDnN 3LfD9LccRqWGcEbLF7UuO6GeMPL1B8LdOhvk4af1rl+fgm5mHsZT4DWT7W/F1t+TLDVEsX/vYdLhu 1+78P4aPmtmENzv7+5W+DdITdm15sF5S8nFSMWczXdlhd10bgze6lFH3Qu7tVYBGnPGVjBfoVZcnL ppo2pOcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tI7e6-00000006V73-3D4U; Mon, 02 Dec 2024 14:43:30 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tI7UZ-00000006Sq2-19Ct for linux-arm-kernel@lists.infradead.org; Mon, 02 Dec 2024 14:33:42 +0000 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-385eb7ee7e2so808393f8f.3 for ; Mon, 02 Dec 2024 06:33:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1733150017; x=1733754817; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9OcRP67UkWqEX1kfwylj4ZfjPBj6iFSQEtH2rLKeSLI=; b=ikFxsOaRKKB8Sh4yqmIzfQIOGC1Ct7cJ2OSpWoIm+ossOfSunbB7VJIfFWaWtfGZtj hkZVXLE1sqKtpkGWjnOcpq024WtUlCG5XNzrNI9PoLoesWl0EydgZpF30O/7eQ//qry9 ywfNCEMctzefO015LRHBDsEyJQt2Te/Zz4Eeo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733150017; x=1733754817; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9OcRP67UkWqEX1kfwylj4ZfjPBj6iFSQEtH2rLKeSLI=; b=HqZoMqFyW+KqL27Q3NgOJZzvOvo4uv+fFXCc8+ClRhVfeWlFXZDxJU1uFh1qZ7guG6 I/BlWKEmbSKLm0kF3YlA0q+YiGgVnH4ZAinXErx6Z4tXJCU6YKhjNLHumz5A8iHQrOas BOs5aAr/tC89mjTMgTPhFL0Jkbw4IX7hZo438gymoRbpS5RQVXKaRN2zPb8QaAMp27Rj vQKK+odrgTegLnBkqvt9+8h2Bxaj2JqQk/nPzzGnKplhv6EZrUkG6bEp3OCq5/6J9+hx oHdT1/4cWEEj411/Eui/8+duEdRLU3V9Vmpvs6XR6/KWblWhNZMc1WHtG1yr1rroC4j3 4Rwg== X-Gm-Message-State: AOJu0YxVlPyuK3NkULevWPfPug84KWP7JkImJz50NJD9u4Kb7ljiTF5J jRZhpo8OFrP3ehv7MBfWOHJ6dB8skB66fgvMD5NAXd+w9PiUHQIgSiddNit9Ehk= X-Gm-Gg: ASbGncsJNx3gveIJUbM048cqGbs2tqSjORQCAO9mgb3Q+q+Js+IYSc8lMdPjH0sH0pa kb8Jt7FSW026H2vF+zXBv9nDPcvhqK2zS7FPBBlvznteI0a0P7ppOP9ljOcLqGqgDAq6G00sWtQ TEdQ+2XEst9aXIWsSAEDXByzpIb/Fzk8I1zDXNfHSEfrWP/ifiUzAiM+8yq22GAo5dVW1guSh7F jfW2/asPUTHtfgegJ4NUEoabBskSKUclzYmXRG98bLxAeJJBpnQsEA83tcEhl8BY/+11+Puo8nl tQJn3ESHDyihk8wMNW36DIG6O2z5sJGzUNMD4X+RC8h5Fys= X-Google-Smtp-Source: AGHT+IHIRiUC7pSf2CvIWjZMDX19I1R/wO3AhDavAhcZNTvCN4vMWcNnrOsyDB3TFGYdPtnX4ejb3g== X-Received: by 2002:a5d:59ab:0:b0:385:f23a:2fe1 with SMTP id ffacd0b85a97d-385f23a32e6mr4087650f8f.26.1733150017155; Mon, 02 Dec 2024 06:33:37 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385eed2510esm4312569f8f.69.2024.12.02.06.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 06:33:36 -0800 (PST) From: Romain Naour To: devicetree@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, kristo@kernel.org, vigneshr@ti.com, nm@ti.com, Romain Naour , Siddharth Vadapalli Subject: [PATCHv3 2/2] arm64: dts: ti: k3-j721e-beagleboneai64: Enable ACSPCIE output for PCIe1 Date: Mon, 2 Dec 2024 15:33:31 +0100 Message-ID: <20241202143331.126800-2-romain.naour@smile.fr> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241202143331.126800-1-romain.naour@smile.fr> References: <20241202143331.126800-1-romain.naour@smile.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241202_063339_320307_76C13991 X-CRM114-Status: GOOD ( 13.75 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Romain Naour Unlike the SK-TDA4VM (k3-j721e-sk) board, there is no clock generator (CDCI6214RGET) on the BeagleBone AI-64 (k3-j721e-beagleboneai64) to provide PCIe refclk signal to PCIe Endponts. So the ACSPCIE module must provide refclk through PCIe_REFCLK pins. Use the new "ti,syscon-acspcie-proxy-ctrl" property to enable ACSPCIE module's PAD IO Buffers. Cc: Siddharth Vadapalli Signed-off-by: Romain Naour --- With this patch, we can remove "HACK: Sierra: Drive clock out" patch applied on vendor kernel for BeagleBone AI-64: https://openbeagle.org/beagleboard/linux/-/commit/ad65d7ef675966cdbc5d75f2bd545fad1914ba9b v3: - update "acspcie0_proxy_ctrl" compatible to "ti,j721e-acspcie-proxy-ctrl" since this property is specific to j721e variant. v2: - use generic style comments - use "syscon" as generic node name for "acspcie0_proxy_ctrl" node - Keep the compatible "ti,j784s4-acspcie-proxy-ctrl" since the ACSPCIE buffer and its functionality is the same across all K3 SoCs. (Siddharth Vadapalli) "The compatible "ti,j784s4-acspcie-pcie-ctrl" should be reused for J721E and all other K3 SoCs. For example, see: https://lore.kernel.org/r/20240402105708.4114146-1-s-vadapalli@ti.com/ which introduced "ti,am62p-cpsw-mac-efuse" compatible. The same compatible is reused across all K3 SoCs: https://lore.kernel.org/r/20240628151518.40100-1-afd@ti.com/ " --- arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts | 5 +++++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts b/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts index fb899c99753e..741ad2ba6fdb 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts +++ b/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts @@ -859,6 +859,11 @@ &pcie1_rc { num-lanes = <2>; max-link-speed = <3>; reset-gpios = <&main_gpio0 22 GPIO_ACTIVE_HIGH>; + /* + * There is no on-board or external reference clock generators, + * use refclk from the ACSPCIE module's PAD IO Buffers. + */ + ti,syscon-acspcie-proxy-ctrl = <&acspcie0_proxy_ctrl 0x3>; }; &ufs_wrapper { diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi index af3d730154ac..32a232a90100 100644 --- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi @@ -5,6 +5,7 @@ * Copyright (C) 2016-2024 Texas Instruments Incorporated - https://www.ti.com/ */ #include +#include #include #include @@ -82,6 +83,11 @@ ehrpwm_tbclk: clock-controller@4140 { reg = <0x4140 0x18>; #clock-cells = <1>; }; + + acspcie0_proxy_ctrl: syscon@18090 { + compatible = "ti,j721e-acspcie-proxy-ctrl", "syscon"; + reg = <0x18090 0x4>; + }; }; main_ehrpwm0: pwm@3000000 { @@ -979,8 +985,8 @@ pcie1_rc: pcie@2910000 { max-link-speed = <3>; num-lanes = <2>; power-domains = <&k3_pds 240 TI_SCI_PD_EXCLUSIVE>; - clocks = <&k3_clks 240 1>; - clock-names = "fck"; + clocks = <&k3_clks 240 1>, <&serdes1 CDNS_SIERRA_DERIVED_REFCLK>; + clock-names = "fck", "pcie_refclk"; #address-cells = <3>; #size-cells = <2>; bus-range = <0x0 0xff>;