From patchwork Tue Sep 12 04:51:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13380655 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 ED784CA0EC9 for ; Tue, 12 Sep 2023 04:52:47 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IcM8Z/KvzI4UbFEt4xerqjjINV0eRLrdMaF48r6WTBk=; b=Nn4tDM+oHAi7sA jN2sOlmaugrNJVX1WxPx5UnqU89unaD78aItHae1qxOui67pBzbijYOHL08onOSsoNh+2FJ6zbbQi maTlbULrqGqIpB+GfQJN2bxBAfQICy5KtCxkn1KV/ZNr+vxzqfCZKm3tLW8Jlbh/yCOyFaSOhvoWD JwurCX0SojPO/OdkBy06UxP9IM9J658KyIYDTyotYRNqsV/rt341T36gWkK+Ek66bnzkQWMo35KDd jQVCo/E54kb2znopdLBE+wfFp2i2YAXYPnGjHf7EwF9mk5IeO6L6fuBZaKxNKol+YicQTKvnoXpCT t+ZXFc3S8Zv8Ni385nCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfvNt-0027Im-32; Tue, 12 Sep 2023 04:52:21 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qfvNq-0027I7-2M for linux-arm-kernel@lists.infradead.org; Tue, 12 Sep 2023 04:52:20 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-522dd6b6438so6225861a12.0 for ; Mon, 11 Sep 2023 21:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1694494336; x=1695099136; 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=ZL8AUPRM1aegmrc4Jg4uOM+4oALiCtGLkJY+J8Syis0=; b=pG5jUNJpd5c4RqE6MEIV3wqS49aLfiOZAhvIUvtN1R3P3lQ5/XX+4PNNrrAuxUqiof 5tJx+Kvw0rjyW9J7402flu7rSpMkvWt5SNCQ79Uo1AEjxEGsLFN0EkCOmYjO46e+4dIk ggnr/B0a95A3dspmOc+CqmFu2QIJLRig/EoBjLBNDHbjXaaMnCNVvjBVrW9ncyF/kA22 XIW1ujrHlPCtmJxJEbXRjduHqZfczmApUHUlj7CZS8jshv4wjaRMRuuoaO8lrVrRko2t Edf6pzb02Z+wKByljFNQsQ1WuIAR/7swjgASLAoC871rQ5/Au4b08g/fZZr9b+h3dIb2 4lOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694494336; x=1695099136; 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=ZL8AUPRM1aegmrc4Jg4uOM+4oALiCtGLkJY+J8Syis0=; b=FU4WE27HrE/8O2Try8xQfFJXzzRv2yRW5xpW0SsVJwddUPvd9yj8rlvPoGntYg6iPM XoYdA76G+kaYhzhat7oElE8+63ADXCn3YzESrwgxAfb2tTDi8MMtSTvCYrLoOB7f6n3n WFwUgttI1Eh2HMAaZNwjzPRKgR2l5Kwy/AvadhCuqYqo+iF6jNW19tcWWtXCBybal41T yn8gWbDkL7T6oqHRmJA8/h34sTO20yVMYl/VXC2zasDXILHF9Yfi1yeFsQiFwekc1ih7 2bdi1UOoDz3TitYsJvZySyBNlkud5QgcfDNkWxVR0u/vN23lmuwiNJIba6Zip/8GsSV/ yGDA== X-Gm-Message-State: AOJu0Yzpk4PQNKiY5+pFQOqLVBEb7LPdILFm0rDM1C976DjhheZMDlLi 1O8GU7RA4Dws1c7Dm18N9RbrbA== X-Google-Smtp-Source: AGHT+IH/7FX3AG4GBKPNWl3bGJcnTxMw8eitbqLPSbHY6Kq8+B6wBqEBknJ7/dQ5zhBRhOc1jR5Sgg== X-Received: by 2002:a50:ec90:0:b0:522:6e3f:b65 with SMTP id e16-20020a50ec90000000b005226e3f0b65mr9982020edr.33.1694494336357; Mon, 11 Sep 2023 21:52:16 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.145]) by smtp.gmail.com with ESMTPSA id f21-20020a05640214d500b0051e22660835sm5422415edx.46.2023.09.11.21.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 21:52:16 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, ulf.hansson@linaro.org, linus.walleij@linaro.org, gregkh@linuxfoundation.org, jirislaby@kernel.org, magnus.damm@gmail.com, catalin.marinas@arm.com, will@kernel.org, prabhakar.mahadev-lad.rj@bp.renesas.com, biju.das.jz@bp.renesas.com, quic_bjorande@quicinc.com, arnd@arndb.de, konrad.dybcio@linaro.org, neil.armstrong@linaro.org, nfraprado@collabora.com, rafal@milecki.pl, wsa+renesas@sang-engineering.com Cc: linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea Subject: [PATCH 00/37] Add new Renesas RZ/G3S SoC and RZ/G3S SMARC EVK Date: Tue, 12 Sep 2023 07:51:20 +0300 Message-Id: <20230912045157.177966-1-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230911_215219_182903_EFE976D2 X-CRM114-Status: GOOD ( 16.32 ) 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: Claudiu Beznea Hi, This patch series adds initial support for The Renesas RZ/G3S (R9A08G045{S33}) SoC. The RZ/G3S device is a general-purpose microprocessor with a single-core Arm® Cortex®-A55 (1.1GHz) and a dual-core Arm® Cortex®-M33 (250MHz), perfect for an IOT gateway controller. This includes: - SoC identification; - clocks (core clocks, pin controller clock, serial interface, SD ch0 clock) and corresponding resets; - minimal device tree for SoM and carrier boards. With this series Linux can boot from eMMC or SD card. The eMMC and uSD interface are multiplexed on the SoM; selection is made using a hardware switch. Patches are gouped as follows: - 01-04 adds SoC identification support; - 05 is a simple cleanup on SoC identification support - 06-09 contain fixes on clock drivers identified while adding RZ/G3S support - 10-14 clock cleanups identifies while adding support for RZ/G3S - 15-22 clock changes needed by RZ/G3S - 23-30 pinctrl changes needed by RZ/G3S - 31 document SDHI for RZ/G3S - 32-37 device tree support for RZ/G3S Thank you, Claudiu Beznea Claudiu Beznea (37): dt-bindings: serial: renesas,scif: document r9a08g045 support dt-bindings: soc: renesas: document Renesas RZ/G3S SoC variants dt-bindings: soc: renesas: renesas,rzg2l-sysc: document RZ/G3S SoC soc: renesas: identify RZ/G3S SoC soc: renesas: remove blank lines clk: renesas: rzg2l: wait for status bit of SD mux before continuing clk: renesas: rzg2l: lock around writes to mux register clk: renesas: rzg2l: trust value returned by hardware clk: renesas: rzg2l: fix computation formula clk: renesas: rzg2l: use core->name for clock name clk: renesas: rzg2l: simplify a bit the logic in rzg2l_mod_clock_endisable() clk: renesas: rzg2l: reduce the critical area clk: renesas: rzg2l: use FIELD_GET() for PLL register fields clk: renesas: rzg2l: use u32 for flag and mux_flags clk: renesas: rzg2l: add support for RZ/G3S PLL clk: renesas: rzg2l: add struct clk_hw_data clk: renesas: rzg2l: remove CPG_SDHI_DSEL from generic header clk: renesas: rzg2l: refactor sd mux driver clk: renesas: rzg2l: add a divider clock for RZ/G3S dt-bindings: clock: renesas,rzg2l-cpg: document RZ/G3S SoC dt-bindings: clock: add r9a08g045 CPG clocks and resets definitions clk: renesas: add minimal boot support for RZ/G3S SoC pinctrl: renesas: rzg2l: index all registers based on port offset pinctrl: renesas: rzg2l: adapt for different SD/PWPR register offsets pinctrl: renesas: rzg2l: adapt function number for RZ/G3S pinctrl: renesas: rzg2l: move ds and oi to SoC specific configuration pinctrl: renesas: rzg2l: add support for different ds values on different groups pinctrl: renesas: rzg2l: make struct rzg2l_pinctrl_data::dedicated_pins constant dt-bindings: pinctrl: renesas: document RZ/G3S SoC pinctrl: renesas: rzg2l: add support for RZ/G3S SoC dt-bindings: mmc: renesas,sdhi: Document RZ/G3S support arm64: dts: renesas: add initial DTSI for RZ/G3S SoC arm64: dts: renesas: rzg3l-smarc-som: add initial support for RZ/G3S SMARC Carrier-II SoM arm64: dts: renesas: rzg3s-smarc: add initial device tree for RZ SMARC Carrier-II Board dt-bindings: arm: renesas: document SMARC Carrier-II EVK arm64: dts: renesas: r9a08g045s33-smarc: add initial device tree for RZ/G3S SMARC EVK board arm64: defconfig: enable RZ/G3S (R9A08G045) SoC .../bindings/clock/renesas,rzg2l-cpg.yaml | 1 + .../devicetree/bindings/mmc/renesas,sdhi.yaml | 2 + .../pinctrl/renesas,rzg2l-pinctrl.yaml | 26 +- .../bindings/serial/renesas,scif.yaml | 1 + .../soc/renesas/renesas,rzg2l-sysc.yaml | 1 + .../bindings/soc/renesas/renesas.yaml | 8 + arch/arm64/boot/dts/renesas/Makefile | 2 + arch/arm64/boot/dts/renesas/r9a08g045.dtsi | 139 ++++ .../boot/dts/renesas/r9a08g045s33-smarc.dts | 17 + arch/arm64/boot/dts/renesas/r9a08g045s33.dtsi | 14 + .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 147 ++++ arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi | 28 + arch/arm64/configs/defconfig | 1 + drivers/clk/renesas/Kconfig | 7 +- drivers/clk/renesas/Makefile | 1 + drivers/clk/renesas/r9a07g043-cpg.c | 19 +- drivers/clk/renesas/r9a07g044-cpg.c | 19 +- drivers/clk/renesas/r9a08g045-cpg.c | 217 ++++++ drivers/clk/renesas/rzg2l-cpg.c | 495 ++++++++++-- drivers/clk/renesas/rzg2l-cpg.h | 39 +- drivers/pinctrl/renesas/pinctrl-rzg2l.c | 728 ++++++++++++++---- drivers/soc/renesas/Kconfig | 6 + drivers/soc/renesas/renesas-soc.c | 15 +- include/dt-bindings/clock/r9a08g045-cpg.h | 243 ++++++ 24 files changed, 1924 insertions(+), 252 deletions(-) create mode 100644 arch/arm64/boot/dts/renesas/r9a08g045.dtsi create mode 100644 arch/arm64/boot/dts/renesas/r9a08g045s33-smarc.dts create mode 100644 arch/arm64/boot/dts/renesas/r9a08g045s33.dtsi create mode 100644 arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi create mode 100644 arch/arm64/boot/dts/renesas/rzg3s-smarc.dtsi create mode 100644 drivers/clk/renesas/r9a08g045-cpg.c create mode 100644 include/dt-bindings/clock/r9a08g045-cpg.h