From patchwork Tue Sep 12 04:51:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13380686 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 CC2F7CA0EC9 for ; Tue, 12 Sep 2023 04:54:26 +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:References:In-Reply-To: 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: List-Owner; bh=TXkXw79ODghi5oWZrveUqvNAo+LshsgLqmWFjjT7Gf4=; b=h+w4pv2hV3ZzHY jrD1fD5mpFYRvhWAsgfRRt/GJ8BNQR0ChSb9sjRuQQ7AYyl1hUa86qoU1LZVbK0NXBApuVXjrqoe9 p8Dhnw17krL4QcX3q8lHZKmmncbmcl9HOYpHGHbiEG/DuGzVhqLPCdMdnrFwklpmX55xyQ7mQyPrq L0EnLrmtuw2SeeZqHOpStkbMv7kKn62+j3EKIIO9FlSNDEOHngq04qNZznFvFJTiHvXrH88EOwtZm dH4/YUnEchVZ3diqoo74n01cayJRfwEWAWxpOfsZXapZuF+6+qhneEULZN8Osv4Fws2oLBYqMwVAm GJ73G9K/nee4E9k6c27g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qfvPX-0028iH-2l; Tue, 12 Sep 2023 04:54:03 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qfvOv-00288J-1s for linux-arm-kernel@lists.infradead.org; Tue, 12 Sep 2023 04:53:29 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-52889bc61b6so6808691a12.0 for ; Mon, 11 Sep 2023 21:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1694494404; x=1695099204; 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=zKyYCY5Eawqt55a4Xl0O7T3NyqsE5dk2eEFtaGmMqxE=; b=ObCWHOUSX0D3LEzdz7e7JHen9gWbkBgsayBtKs2jqvae0oytmwy7q1ZF4zxQQfDtcD 4hMTTSuWPfQi42GNd331dGC0kqwuRxWe8yCSFLFyVGaIjgAvU8a6eOj8w0PFsmtnDVXe c8DAkrQZhfNaICRZHXlLS+//Fbb8A3vf9hYeDl8GQN3No6Mv8EdBiq3F7AQBAqVUJwVw DzmsWL+v3TFVv2k4AAuk/ObNCvPmKZpdCom3yv69K7OYwFVM9k8+bvbc2KFQk7leSx3F hRPFlvlipBHozxL8JVhHRPC8hMqAsWWikUEZbpiz+7UsdAWG7SgDKhgnt9NnxPHFUWot BRXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694494404; x=1695099204; 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=zKyYCY5Eawqt55a4Xl0O7T3NyqsE5dk2eEFtaGmMqxE=; b=O92CUAcYzPfc+FL1+HpONLqHK3A6M3SCxmR6FT1EfSYRkOtOCVai5RmAH8N3xdhNFl dO6tB763L4OUAyKJ8tnzWR2iDLE4XwphCmEjE1AwiQol+hsR6+zBdonq+cfzxRmz1OBi KtUBSojyEnepAMOE2hdcVHR66X9XEpodGe8dchq1jKpBwleRqEcBe4GkclET9wr5QGbN m3xSOPptTvdFv/vNERRIJ7XzAmFKxHKnPsX57scombH/osSNDDy91JiiaRNYUmNs05pb jkTrThm7/Aca2UmqRBDdnO6L0eGNpfuev918SehXjaLFUTPceooJ6/yp2VhUikvndKn+ WUhA== X-Gm-Message-State: AOJu0YxQ1z+Rg/p6ZvyxhQy0ltyph42bRlY08sJscypNvbBGjNw5RNx3 JF58b4esw0LXM+QYEJmJ694cOA== X-Google-Smtp-Source: AGHT+IG/66tUEndbVz1eoqV+N7JI0z1KvlhGtZm3CpGGgpR/XGPkb9QxGMHU5+zWq9ZYq5YA3iChmA== X-Received: by 2002:aa7:ce0d:0:b0:525:528d:836f with SMTP id d13-20020aa7ce0d000000b00525528d836fmr9879149edv.18.1694494404043; Mon, 11 Sep 2023 21:53:24 -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.53.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 21:53:23 -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 33/37] arm64: dts: renesas: rzg3l-smarc-som: add initial support for RZ/G3S SMARC Carrier-II SoM Date: Tue, 12 Sep 2023 07:51:53 +0300 Message-Id: <20230912045157.177966-34-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230912045157.177966-1-claudiu.beznea.uj@bp.renesas.com> References: <20230912045157.177966-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230911_215325_761102_30420EC6 X-CRM114-Status: GOOD ( 16.57 ) 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 Add initial support for RZ/G3S SMARC Carrier-II SoM. SoM contains the following devices: - RZ/G3S microcontroller: Renesas R9A08G045S33GBG - 9-channel PMIC: Renesas RAA215300 - Clock Generator: Renesas 5L35023B - 128M QSPI Flash: Renesas AT25QL128A - 8G LPDDR4 SDRAM: Micron MT53D512M16D1DS-046 - 64GB eMMC Flash: Micron MTFC64GBCAQTC - 2x Gigabit Ethernet Transceiver: Microchip KSZ9131RNX - 5x Current Monitors: Renesas ISL28025FR12Z The following interfaces are available on SoM board: - 2 uSD interfaces - 12-pin, 1.0mm pitch connector to the RZ/G3S ADC IO - 4-pin, 1.0mm pitch connector to the RZ/G3S I3C IO - JTAG connector At the moment the 24MHz output of 5L35023B, memory SD ch0 (with all its bits) were described in device tree. SD channel 0 of RZ/G3S is connected to an uSD card interface and an eMMC. The selection b/w them is done though a hardware switch. The DT will select b/w uSD and eMMC though SW_SD0_DEV_SEL build flag. Signed-off-by: Claudiu Beznea --- .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 147 ++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi new file mode 100644 index 000000000000..ea53b9ff7b6f --- /dev/null +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi @@ -0,0 +1,147 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +/* + * Device Tree Source for the R9A08G045S33 SMARC Carrier-II's SoM board. + * + * Copyright (C) 2023 Renesas Electronics Corp. + */ + +#include +#include + +/* + * Signals of SW_CONFIG switches: + * @SW_SD0_DEV_SEL: + * 0 - SD0 is connected to eMMC + * 1 - SD0 is connected to uSD0 card + */ +#define SW_SD0_DEV_SEL 1 + +/ { + aliases { + mmc0 = &sdhi0; + }; + + chosen { + bootargs = "ignore_loglevel"; + stdout-path = "serial0:115200n8"; + }; + + memory@48000000 { + device-type = "memory"; + /* First 128MB is reserved for secure area. */ + reg = <0x0 0x48000000 0x0 0x38000000>; + }; + + reg_3p3v: regulator0 { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + +#if SW_SD0_DEV_SEL + vccq_sdhi0: regulator1 { + compatible = "regulator-gpio"; + regulator-name = "SDHI0 VccQ"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <3300000>; + gpios = <&pinctrl RZG2L_GPIO(2, 2) GPIO_ACTIVE_HIGH>; + gpios-states = <1>; + states = <3300000 1>, <1800000 0>; + }; +#else + reg_1p8v: regulator1 { + compatible = "regulator-fixed"; + regulator-name = "fixed-1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; +#endif +}; + +&extal_clk { + clock-frequency = <24000000>; +}; + +#if SW_SD0_DEV_SEL +/* SD0 slot */ +&sdhi0 { + pinctrl-0 = <&sdhi0_pins>; + pinctrl-1 = <&sdhi0_uhs_pins>; + pinctrl-names = "default", "state_uhs"; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <&vccq_sdhi0>; + bus-width = <4>; + sd-uhs-sdr50; + sd-uhs-sdr104; + max-frequency = <125000000>; + status = "okay"; +}; +#else +/* eMMC */ +&sdhi0 { + pinctrl-0 = <&sdhi0_emmc_pins>; + pinctrl-1 = <&sdhi0_emmc_pins>; + pinctrl-names = "default", "state_uhs"; + vmmc-supply = <®_3p3v>; + vqmmc-supply = <®_1p8v>; + bus-width = <8>; + mmc-hs200-1_8v; + non-removable; + fixed-emmc-driver-type = <1>; + max-frequency = <125000000>; + status = "okay"; +}; +#endif + +&pinctrl { + sd0-pwr-en-hog { + gpio-hog; + gpios = ; + output-high; + line-name = "sd0_pwr_en"; + }; + + sdhi0_pins: sd0 { + data { + pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3"; + power-source = <3300>; + }; + + ctrl { + pins = "SD0_CLK", "SD0_CMD"; + power-source = <3300>; + }; + + cd { + pinmux = ; /* SD0_CD */ + }; + }; + + sdhi0_uhs_pins: sd0-uhs { + data { + pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3"; + power-source = <1800>; + }; + + ctrl { + pins = "SD0_CLK", "SD0_CMD"; + power-source = <1800>; + }; + + cd { + pinmux = ; /* SD0_CD */ + }; + }; + + sdhi0_emmc_pins: sd0-emmc { + pins = "SD0_DATA0", "SD0_DATA1", "SD0_DATA2", "SD0_DATA3", + "SD0_DATA4", "SD0_DATA5", "SD0_DATA6", "SD0_DATA7", + "SD0_CLK", "SD0_CMD", "SD0_RST#"; + power-source = <1800>; + }; +};