From patchwork Tue Nov 14 10:14:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13455044 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 BE736C4332F for ; Tue, 14 Nov 2023 10:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1+ytWq8kAvvshBvnGY98bmTDhVu94fAR9be+1dHyXWs=; b=if42/5WDu7lIGv lyl50/G15uowbikNPEn/wK266/Ydh8a+eHjgz30KCcFBgYSqNfgzGN/VGN0e8ICgpEJ8EgKaDDRMg PR+xmkBPPPngUAs2/T5Xtbai+rdnfmA/eFfXCf6y5wUSAxRdbOgon7ZE/HH00BZP+QRhglh4lpcsk OE3SMoRdeMA6BWOH81MgYqBttns+VV3RQ/BcHcf6E3CxWRbtUAgIxIOK+KumGiT7uZEbvAk71k5Nk YEztE28L/J4hHGgQJDTKaOkH06t5TYgKSpPFj2wAnCQojTVf2mMeJhrWg0P+d3dK0CZzGnVH4pvFn ahXKHBNL+IKJkMURrdMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2qRd-00FYj8-1Z; Tue, 14 Nov 2023 10:14:57 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2qRY-00FYgG-0n for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2023 10:14:55 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40891d38e3fso40081305e9.1 for ; Tue, 14 Nov 2023 02:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699956890; x=1700561690; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=GRDQG90whNGruPKHBuSb0fwlNjOLqK156tQl7yY601s=; b=Nt7szbSeoQ8X4CZbhI+BZS8qdJo96KJiGoVbTaXHoBAGnSQSMfvx+5zdCEd9CTuKM9 +2lhPSc8Q4/kGhQeLfbrRMwlgvWDzeIaFn3x/u0WSwrAJdsiDguUDhPOmeBS3Ai5Uxaa nfBlZcFwlLMbwU5sgN07xhQPJcX4x2CYjovJuyoN2sxB7NR5MFEi4c0mQC6CK+aqovwV 5EbeRd6yBQbtpcnGc812vJkxyetrypGwDQiAU+hb21RuUv/bpoEwodyqHpXd1oj/nRq/ 7MjmiE/gzSdATjtoW4mxHk3BtVxsp2ZsuW+GJ0EsLwUStGsI1qMaIru9mp3euVQKT7tm xeFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699956890; x=1700561690; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GRDQG90whNGruPKHBuSb0fwlNjOLqK156tQl7yY601s=; b=q7IkHxa3t/fwM+V4mr4pOf4HfJPX2gk9k1ob+V0/pC8gHiNSTNaXV6unhIru79M++o 2tMHEz9KsBROWbu0M46/14h8AtXCW/Yhw9UlqBpzOIOkct3+B6hLOCb4LBYwjpNFtLqG +D+sZYfoW8xF7VKNZURI8R3EliLNBMoEqkSFoOLF04VrcJ2b5+ldm701kJhmpvTlC/Ru 5rv3TJXfJXeXvjneaofMhGAJkEPhAz8F5T8AWd8LN2O3CbXiB/Io9oZFXmX4UBHD8m8X G3T82faUuOvFrWG6hvqJ5NYYmw0y0t5Apm+FkTKMU5PFBAl+ApHXocFqmrzJL1JMLAaI UmRg== X-Gm-Message-State: AOJu0Yyb6Q0Xu1YhbAm2S6a9bwQkQfEmzf0viiMevVhVu8NO0Q+RazCB bgsG4OcJdAO6cjYawITQT36Clw== X-Google-Smtp-Source: AGHT+IHmsBNotjLNrikShfJJvLrq11qapucSps8g7MZLwa+tjWVJJCpV7UxEKCvxDB7DcdqG+/7Vxw== X-Received: by 2002:a05:6000:146:b0:32d:8ac4:d23f with SMTP id r6-20020a056000014600b0032d8ac4d23fmr5433225wrx.29.1699956890236; Tue, 14 Nov 2023 02:14:50 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id n2-20020a5d4202000000b0032d886039easm7335585wrq.14.2023.11.14.02.14.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 02:14:49 -0800 (PST) From: Neil Armstrong Date: Tue, 14 Nov 2023 11:14:43 +0100 Subject: [PATCH 1/3] dt-bindings: clock: g12a-clkc: add MIPI ISP & CSI PHY clock ids MIME-Version: 1.0 Message-Id: <20231114-topic-amlogic-upstream-isp-clocks-v1-1-223958791501@linaro.org> References: <20231114-topic-amlogic-upstream-isp-clocks-v1-0-223958791501@linaro.org> In-Reply-To: <20231114-topic-amlogic-upstream-isp-clocks-v1-0-223958791501@linaro.org> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jerome Brunet , Kevin Hilman , Martin Blumenstingl Cc: Daniel Scally , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=831; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=tPtJJ4m8r/duCINFRVQmq1vnhsfEoL+l4IqBBJv4OFw=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlU0iWrW3bJixBh86isYE3uIDZg0edHMEQSNsOH/tr 2wGdcu+JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZVNIlgAKCRB33NvayMhJ0anlD/ wIbIB19tLkjnhKjUpQ6bxJq1f1aWQ1KhjVUIpQ7ASlwxyFig16JMn8WUBIGhvjnLWqfSzl35us30L5 UHO40qf3vj4ZRTwjEeJ3+3ut4Ifd1l+a/DZa/r7sLT2nO4PYBqjdoGhLCEmjywyah0a4yTosnqOl49 uFPChwRBc+gB8t4179Ew79CaOQVsDj5V0HJ9e6YGHfprV9Nkbcb2PvTMja93Yd/aaAl6xE0Bq+TYaT 1ZiKTkPqmERwpBQTCQObCQXk5vnK8RejXUIJ3zkn/hk65BRFDilS056YsYn9N9XePaFdwfZEc6RJEo xj2TwDruehIwRanthgjnlc6k1+iDL3PMLe770Ghsr1Zd2A3o28TnSVIMVX3Oy5IOPQ/BYQ61Ykc0jW OcgcsST7i+BXnFDHh5VBlAd3wLNq0zxB6Y0kdrUJYDmu///jxUzvauhhu+IR9f8PYqxwZ5QaAA9aSh SMbslJdDNd24tNIiV49IVwkkaqmpZrYznVlkPnh6cizZUoQVK9LSF465viJBIEHSHSdDeg0WTDBuEa roceDDkzbDqH+9M8DhE+Js0UK0ZytEyXYARScxFh5buD5wrn2reCjg2camoSUyMElS2/0mUIo6DufP UwBTTgQ1X/YGXn2w8rdLdKWQ3qvxkd9LKURzAVJTXPmCYaFxEAv+b/snXHGw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_021452_324458_778952A0 X-CRM114-Status: UNSURE ( 9.43 ) 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 Add MIPI ISP & CSI PHY clock ids to G12A clock bindings header Signed-off-by: Neil Armstrong Acked-by: Conor Dooley --- include/dt-bindings/clock/g12a-clkc.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/dt-bindings/clock/g12a-clkc.h b/include/dt-bindings/clock/g12a-clkc.h index 636d713f95ff..fd09819da2ec 100644 --- a/include/dt-bindings/clock/g12a-clkc.h +++ b/include/dt-bindings/clock/g12a-clkc.h @@ -281,5 +281,11 @@ #define CLKID_MIPI_DSI_PXCLK 270 #define CLKID_CTS_ENCL 271 #define CLKID_CTS_ENCL_SEL 272 +#define CLKID_MIPI_ISP_DIV 273 +#define CLKID_MIPI_ISP_SEL 274 +#define CLKID_MIPI_ISP 275 +#define CLKID_MIPI_ISP_GATE 276 +#define CLKID_MIPI_ISP_CSI_PHY0 277 +#define CLKID_MIPI_ISP_CSI_PHY1 278 #endif /* __G12A_CLKC_H */ From patchwork Tue Nov 14 10:14:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13455042 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 8EC20C4167B for ; Tue, 14 Nov 2023 10:15:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b6qWMvwjXreV8fxg5KLiBLwxHvNnFzKw3P+wwR+Cxj8=; b=cugEoAi5Nki2GH 9VqeVusI21N6i1gQM2BZ/nd+NmwLbI9ueWZjI439TD8f3HB9Z4QBk7mS5mBs6oUQVycfnK0OmeDc+ eqlyOShCqaLpQpl/4xCMy3I5TvV0BZ5WPscHyEWdj3C+rrGhFf1Elmd428Q/5VKkz9j5qsDd3tcJJ P1ekkbuttrFv0TSCgtH3hTZQ98tD1BjCfPzaYCP+Sl70E8HyiLT/sXku9WxXvYsQrTfdJdwWcCAJU jfVHYwztVGNqG0I7pSgE4wLG8oMAWZLfyUNVzK/Fcq1LGS+MlzlRrb48ZBCOtY0niwLstrcRiwiol BjvUWJ7vOsVTfljwfcUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2qRf-00FYk6-0C; Tue, 14 Nov 2023 10:14:59 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2qRZ-00FYgK-2U for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2023 10:14:55 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-32fdd0774d9so3303296f8f.2 for ; Tue, 14 Nov 2023 02:14:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699956891; x=1700561691; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Usa3VquYxAPDycVqQKpd67nWp9ekHUYyeEdbo8Ek7jY=; b=YON+Bk3IY/Xl0Ii9ZOSLpA//eBcLLOOFLQUaCg7QWzJsVsJP7Tw38lvpASZFCA7IvH QNbzidQIUyrYGLU+P6pfEilvD6HiCTcOxVt4GJWLEgM+d8bnpmxS7qjL1X1e3XtwF3PI 3S2HWk1wuGwq3gPnnhGh6gb/Wffb+qt+aT70ruy3sLDu7LsAB4Cm+8h3jpHlNOZNBn+r U8rDmXsHsKpSQs01yAQGQotkXLaNSTGAM867S92j/3zULmCtUYL7CQn5aSUCs+0hEAqB sp3hy0m1cEX45h8A6OClJNbU7JnP7ToksRSF0mB3hu7B2moxndoyL7Te4doXdd3zIml+ NPvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699956891; x=1700561691; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Usa3VquYxAPDycVqQKpd67nWp9ekHUYyeEdbo8Ek7jY=; b=MnDSBTYcoYdiABc5ZxhgUI7ZU0HRpXz4A7yk77zdvNaeJej8NRDfdoPNXTxjrHS8iA LpbqKIiO9PZm4TY1KUxIljPmS7U6DShFps90JeqCYWQblhkekcY7iLDJVlALd1ToXdb/ bxZrc3I7yLbKBPEzGHeNSf3Gjyd8DsVN1a1inWteJc9wqznQGp37o/bmGo8pUg288OYp MH/mjtBvYkR2DLyN/uyd8iboynzufGLEyfGMe+INDHNdTW1aYbZjK4RzP0BYPyjVzhen gJh+WOBSt+mCe9dh9oQ5ztiexMhU/jDtc9xm69oJaAM8MXsRS3KCa2PfkSs+TJiPCCJO Lz0w== X-Gm-Message-State: AOJu0Ywq0feF/N5f4/rVDjQ2qfvkDV4sHCoaTh9cxe0U4qu5r5FuQ2fl nISHZ7cd/4ClRoeyD7IzUzkBOePAp3J9V9bw+Pyt3ORE X-Google-Smtp-Source: AGHT+IEzVZMK67kMUGREpJZSlwqk/XFJZSzmj5Cu4UNpZkY1pqqaaiRElgez6kW52TTfdqVYtkAZjg== X-Received: by 2002:a05:6000:1565:b0:32f:7ebe:3e5a with SMTP id 5-20020a056000156500b0032f7ebe3e5amr7525048wrz.50.1699956891208; Tue, 14 Nov 2023 02:14:51 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id n2-20020a5d4202000000b0032d886039easm7335585wrq.14.2023.11.14.02.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 02:14:50 -0800 (PST) From: Neil Armstrong Date: Tue, 14 Nov 2023 11:14:44 +0100 Subject: [PATCH 2/3] clk: meson: g12a: add MIPI ISP clocks MIME-Version: 1.0 Message-Id: <20231114-topic-amlogic-upstream-isp-clocks-v1-2-223958791501@linaro.org> References: <20231114-topic-amlogic-upstream-isp-clocks-v1-0-223958791501@linaro.org> In-Reply-To: <20231114-topic-amlogic-upstream-isp-clocks-v1-0-223958791501@linaro.org> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jerome Brunet , Kevin Hilman , Martin Blumenstingl Cc: Daniel Scally , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3403; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=dZke1iq4FAITvgVMIUDhLoZap1P+Z6ah4DJyhujVIds=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlU0iXlwUukpCz/mpc05k9GDypuFrhFLdOZG5tKQ+r wnMvS0yJAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZVNIlwAKCRB33NvayMhJ0cx7D/ 9z5wa9btnYn9c2UrV+P9UhiZazbpjGG9COykZ17lwepwf4InMJLNjO+5SpCbzT9BV8I+Gr6RdoUozQ P2EbVQKscHgusKvlYKyNza3n/6DZ2VnW33BP40nGIs0Ji1cDCUqSQjKdUKWXgniTL++Mc70l0fM9Ar LfDQ0VJCEVRUaIMU5mCIu7vc0J67V7ebMuM//zvkGkeq3dGGq22yC/1/r3LJuaRBOQXF4Nm7+tKCc9 YB/jttKphPf0lHvaeJoKdidTON6c7okJUOLTPTWHqTnkTsYHtosGPJ0R3SJsG8GhZ2CH/KFlJgsjdN gTQ8eJJ7aUwYoh2lVlU8QgNr/urUXcsgrR9e1hgVuneNdkFtrprpwI7/S3Vpfg0jQ5J4SNAtgaohr1 vIUw/7WDyctSoRFZF1FSOQHFLEzzTwVQDILOBAAfZTIKs4ISy/RXXk3FL7y09nYDAO2Q1LKJ9Yzn7h YMHIpVnTcyQ9RiB2SsCvCb09SmQ52nF263gMdC6nX/fDyIHqZmHziALJSfaoLME98At8AK2LzaKiKO 0zyHJCHYBgYxqJPuBW8oyoJO4nRU8+UaUo03HQa+dlVVUkSx8oI/nnib35TcwImCuuLUtfxTzDc5Vo VP2M+eyZKiVPxhPysDcyqh3ie419ejLZuJvW5FDAbt37/md2GLj+0cDa+xdw== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_021453_918268_C9D1479E X-CRM114-Status: GOOD ( 13.49 ) 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 Add the MIPI ISP gate, divider and mux used to feed the MIPI CSI ISP (Image Signal Processor) IP on the Amlogic G12B SoC. Signed-off-by: Neil Armstrong --- drivers/clk/meson/g12a.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ drivers/clk/meson/g12a.h | 1 + 2 files changed, 67 insertions(+) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index f373a8d48b1d..a8312f29d1cc 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -3722,6 +3722,66 @@ static struct clk_regmap g12a_mipi_dsi_pxclk = { }, }; +/* MIPI ISP Clocks */ + +static const struct clk_parent_data g12b_mipi_isp_parent_data[] = { + { .fw_name = "xtal", }, + { .hw = &g12a_gp0_pll.hw }, + { .hw = &g12a_hifi_pll.hw }, + { .hw = &g12a_fclk_div2p5.hw }, + { .hw = &g12a_fclk_div3.hw }, + { .hw = &g12a_fclk_div4.hw }, + { .hw = &g12a_fclk_div5.hw }, + { .hw = &g12a_fclk_div7.hw }, +}; + +static struct clk_regmap g12b_mipi_isp_sel = { + .data = &(struct clk_regmap_mux_data){ + .offset = HHI_ISP_CLK_CNTL, + .mask = 7, + .shift = 9, + }, + .hw.init = &(struct clk_init_data){ + .name = "mipi_isp_sel", + .ops = &clk_regmap_mux_ops, + .parent_data = g12b_mipi_isp_parent_data, + .num_parents = ARRAY_SIZE(g12b_mipi_isp_parent_data), + }, +}; + +static struct clk_regmap g12b_mipi_isp_div = { + .data = &(struct clk_regmap_div_data){ + .offset = HHI_ISP_CLK_CNTL, + .shift = 0, + .width = 7, + }, + .hw.init = &(struct clk_init_data){ + .name = "mipi_isp_div", + .ops = &clk_regmap_divider_ops, + .parent_hws = (const struct clk_hw *[]) { + &g12b_mipi_isp_sel.hw + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + }, +}; + +static struct clk_regmap g12b_mipi_isp = { + .data = &(struct clk_regmap_gate_data){ + .offset = HHI_ISP_CLK_CNTL, + .bit_idx = 8, + }, + .hw.init = &(struct clk_init_data) { + .name = "mipi_isp", + .ops = &clk_regmap_gate_ops, + .parent_hws = (const struct clk_hw *[]) { + &g12b_mipi_isp_div.hw + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + }, +}; + /* HDMI Clocks */ static const struct clk_parent_data g12a_hdmi_parent_data[] = { @@ -4729,6 +4789,9 @@ static struct clk_hw *g12b_hw_clks[] = { [CLKID_MIPI_DSI_PXCLK_SEL] = &g12a_mipi_dsi_pxclk_sel.hw, [CLKID_MIPI_DSI_PXCLK_DIV] = &g12a_mipi_dsi_pxclk_div.hw, [CLKID_MIPI_DSI_PXCLK] = &g12a_mipi_dsi_pxclk.hw, + [CLKID_MIPI_ISP_SEL] = &g12b_mipi_isp_sel.hw, + [CLKID_MIPI_ISP_DIV] = &g12b_mipi_isp_div.hw, + [CLKID_MIPI_ISP] = &g12b_mipi_isp.hw, }; static struct clk_hw *sm1_hw_clks[] = { @@ -5221,6 +5284,9 @@ static struct clk_regmap *const g12a_clk_regmaps[] = { &g12a_mipi_dsi_pxclk_sel, &g12a_mipi_dsi_pxclk_div, &g12a_mipi_dsi_pxclk, + &g12b_mipi_isp_sel, + &g12b_mipi_isp_div, + &g12b_mipi_isp, }; static const struct reg_sequence g12a_init_regs[] = { diff --git a/drivers/clk/meson/g12a.h b/drivers/clk/meson/g12a.h index f11ee3c59849..27df99c4565a 100644 --- a/drivers/clk/meson/g12a.h +++ b/drivers/clk/meson/g12a.h @@ -70,6 +70,7 @@ #define HHI_MALI_CLK_CNTL 0x1b0 #define HHI_VPU_CLKC_CNTL 0x1b4 #define HHI_VPU_CLK_CNTL 0x1bC +#define HHI_ISP_CLK_CNTL 0x1C0 #define HHI_NNA_CLK_CNTL 0x1C8 #define HHI_HDMI_CLK_CNTL 0x1CC #define HHI_VDEC_CLK_CNTL 0x1E0 From patchwork Tue Nov 14 10:14:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 13455045 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 705F4C4167D for ; Tue, 14 Nov 2023 10:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FJmVeqbV/MN0hydSX4cSEh/xV2zWpW+Lk4NDQUzq8gU=; b=CGtXSGOP8dP5gB eg9Ksef/OOmkE3BXeAez1XnYKegCZTG4dswzUI7xOTriSrMU/OD2Qix8WlPC6rqZ5vrYGtwMeA8/J fwPVIdIRHZbL2hOeLt4PRlLQKDXZ9iNKIvIOwrWf1o4Z7T21JGbMZYy4PvWshgmWg3HjmjVEI9LJy 7e6BL7K+AOpq47rc3KePT4CMFDpjWX9E3IDGPu1xSTAdGXYOfHJm2OFAxn98ywUD7L9RV8qFPPrIi UUbaZZm+6OkkEa+g+R+FIL+n3hDwMTq04J7eWSTMMOzKxbseu4YmyAGmswGrsCu068Wa6u1CacGGz R+oYqC6K+JhGY4hhScpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2qRl-00FYn9-35; Tue, 14 Nov 2023 10:15:05 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2qRa-00FYhJ-2d for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2023 10:14:56 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-507e85ebf50so7159815e87.1 for ; Tue, 14 Nov 2023 02:14:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699956892; x=1700561692; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=989mY4zS1x08vGe3jaH2doZ857QaMFqojYApjOFNcNA=; b=t1BxLclXvYUIECxTMavTvANDyqdZkHt0fN9XOA22d2yPq9JN8Wbz4aG7GPlIoEJ2nd IChXTblFVYmmdI3zqeyL771njecQ0e3m9Vvsm+2Fgp+UlhSatBM362k5QiI8WTTAxBRS Qcovj1k9W02O9GIX1lB/4Sg1gV0jpe78jYoq6UXw8lMOo/QK9gztfaK4LZRkjJeYjFu2 oNn6eEPd9KnEpHugfAfYskZSR7T5mit5vqpUdrFzLSljulmNrfndY8YbUjh2Ztj5rBOd BeMlGHcs+H12br/1vUcn//3jgVtNn2a5Gs8YlXJH2sLh3TS0PEq4vyN6l8y6AlgaLqBu fjvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699956892; x=1700561692; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=989mY4zS1x08vGe3jaH2doZ857QaMFqojYApjOFNcNA=; b=GbltguVSF/B9HoigIWmf+tXImMks5UNUXH4W6fzXqtRb85BUHXl2XB11UoXVF7eiNj UuSU+HFVl2H9Ajapclmj2x/gh1IaXyXDxVrDz+YjdFMkVCsjIcrsIn40rWzkMw19LP3V tQe5aVTGbl+Z4Yd3VfDN0g8s4C9aa3IzSb/XRDvyLtTcpO8wI0deE/mzqSvB6DkU+3xB cjVPMYH6JmEbR10P5MVxnInb1WvCViNFH3hVxPwAr/gtWIe5zYMIbXpvQ9wV9DbEpBLd Q2/noyua9BEUhyAYCAkpYQTwSXWKZA/L4fBybOJDtUPnqGygR0WM4ol0pNXc3L3REFLO euHA== X-Gm-Message-State: AOJu0Yw/4EYgmCaB2vwfSLM7Je/wyjY/3DtJOOCrrSvouFoUeRe8mwxJ d9SeYEnzwN9QrUasZptA3iUjRg== X-Google-Smtp-Source: AGHT+IEFDSgibpjMV4Y7PnvYBSXrksO4SQXgiQw6EKC+4nF+gMP8A5o+yNQNi1S3cVJxowIPQccVKg== X-Received: by 2002:a05:6512:20d3:b0:503:653:5711 with SMTP id u19-20020a05651220d300b0050306535711mr4965401lfr.9.1699956892200; Tue, 14 Nov 2023 02:14:52 -0800 (PST) Received: from arrakeen.starnux.net ([2a01:e0a:982:cbb0:52eb:f6ff:feb3:451a]) by smtp.gmail.com with ESMTPSA id n2-20020a5d4202000000b0032d886039easm7335585wrq.14.2023.11.14.02.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Nov 2023 02:14:51 -0800 (PST) From: Neil Armstrong Date: Tue, 14 Nov 2023 11:14:45 +0100 Subject: [PATCH 3/3] clk: meson: g12a: add CSI & ISP gates clocks MIME-Version: 1.0 Message-Id: <20231114-topic-amlogic-upstream-isp-clocks-v1-3-223958791501@linaro.org> References: <20231114-topic-amlogic-upstream-isp-clocks-v1-0-223958791501@linaro.org> In-Reply-To: <20231114-topic-amlogic-upstream-isp-clocks-v1-0-223958791501@linaro.org> To: Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jerome Brunet , Kevin Hilman , Martin Blumenstingl Cc: Daniel Scally , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Neil Armstrong X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1776; i=neil.armstrong@linaro.org; h=from:subject:message-id; bh=G6Kb72oGcBrPLl5eFs681WZSIgqU+YTJL+dNbC8hxWs=; b=owEBbQKS/ZANAwAKAXfc29rIyEnRAcsmYgBlU0iXw3tWEkFljMjnl008PiXXewEGfT3AHYBO+Wi+ sQAl3i+JAjMEAAEKAB0WIQQ9U8YmyFYF/h30LIt33NvayMhJ0QUCZVNIlwAKCRB33NvayMhJ0QufD/ 0ceRMlDLWS+bur9qzpxRCQm4JTKJ6Kx+cIpmoZWH64KiPe9srQxK38q/CKawXo+wQvZjc1gWV+ldur BgqhGY/VxsjAwt8p+FO7NT8BotOl5Xhh9U4gbEf2DJqMUYjcZx7gLBrpWFNMFLId9cEXCdrmAbo7G/ UfeW+cHrY5rOCkSvtcAWFUE12xUANkKlU/8VB/51OUcvrS4iyymlxA2qV6EKltNwJRTdLtuMBMFzHT 0HzZH7C8MObagKeOiWT3MH4g8tk/sJk98dB3NkL1BH3p7NxCRc9Nsswrtw20S+Nn05Usfvty8mLEeY ugjrfY0vyBqZMqmrMxhApo6gmLeex65PpEjR+z7LENPXc46UoAel7LI5fV/y5HOlT+erymy1vPVf+S JSOSn1rJ/ESZMYCgdECBtjFXqbAwMt/qDb/NvLD4elGmYYPnbx2z7pytzdidK5CBvvsMYxjbsn3DDU WUMUXuwwPY2QNnFpxLic0Obir+1TsIsu+IcS5fnHPf2+2VRRLS27gijuuYvWrJl9GWCDRDqnC+8gIR JDuC2awJSuWNOfb//BOiZmN4H+6CyG0ARxAEfvdU2AXfaBC/tXnthHtxvVhHZFJeWAi1iN80IWqaYJ tMAOb2UldwqlNqZ1XqH2gzxt2oofds639E4P1jOIzqN0dGsX6tCB85evzSlQ== X-Developer-Key: i=neil.armstrong@linaro.org; a=openpgp; fpr=89EC3D058446217450F22848169AB7B1A4CFF8AE X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_021454_859895_2CF7910A X-CRM114-Status: GOOD ( 10.34 ) 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 Add the gates entires for the CSI ISP domain and CSI PHYs. Signed-off-by: Neil Armstrong --- drivers/clk/meson/g12a.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c index a8312f29d1cc..b0bd37ae1a81 100644 --- a/drivers/clk/meson/g12a.c +++ b/drivers/clk/meson/g12a.c @@ -4274,9 +4274,12 @@ static MESON_GATE(g12a_htx_hdcp22, HHI_GCLK_MPEG2, 3); static MESON_GATE(g12a_htx_pclk, HHI_GCLK_MPEG2, 4); static MESON_GATE(g12a_bt656, HHI_GCLK_MPEG2, 6); static MESON_GATE(g12a_usb1_to_ddr, HHI_GCLK_MPEG2, 8); +static MESON_GATE(g12b_mipi_isp_gate, HHI_GCLK_MPEG2, 17); static MESON_GATE(g12a_mmc_pclk, HHI_GCLK_MPEG2, 11); static MESON_GATE(g12a_uart2, HHI_GCLK_MPEG2, 15); static MESON_GATE(g12a_vpu_intr, HHI_GCLK_MPEG2, 25); +static MESON_GATE(g12b_csi_phy1, HHI_GCLK_MPEG2, 28); +static MESON_GATE(g12b_csi_phy0, HHI_GCLK_MPEG2, 29); static MESON_GATE(g12a_gic, HHI_GCLK_MPEG2, 30); static MESON_GATE(g12a_vclk2_venci0, HHI_GCLK_OTHER, 1); @@ -4792,6 +4795,9 @@ static struct clk_hw *g12b_hw_clks[] = { [CLKID_MIPI_ISP_SEL] = &g12b_mipi_isp_sel.hw, [CLKID_MIPI_ISP_DIV] = &g12b_mipi_isp_div.hw, [CLKID_MIPI_ISP] = &g12b_mipi_isp.hw, + [CLKID_MIPI_ISP_GATE] = &g12b_mipi_isp_gate.hw, + [CLKID_MIPI_ISP_CSI_PHY0] = &g12b_csi_phy0.hw, + [CLKID_MIPI_ISP_CSI_PHY1] = &g12b_csi_phy1.hw, }; static struct clk_hw *sm1_hw_clks[] = { @@ -5287,6 +5293,9 @@ static struct clk_regmap *const g12a_clk_regmaps[] = { &g12b_mipi_isp_sel, &g12b_mipi_isp_div, &g12b_mipi_isp, + &g12b_mipi_isp_gate, + &g12b_csi_phy1, + &g12b_csi_phy0, }; static const struct reg_sequence g12a_init_regs[] = {