Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp136553rdg; Tue, 10 Oct 2023 06:27:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6Pg3QVG5Nwaen2lr4kArx+QTNrSBaCU4J2Exe49Q4sQh/LguyhPCydt2RbdDYpRrFxTzZ X-Received: by 2002:a9d:4d0a:0:b0:6bd:93e:460b with SMTP id n10-20020a9d4d0a000000b006bd093e460bmr17374662otf.19.1696944474685; Tue, 10 Oct 2023 06:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696944474; cv=none; d=google.com; s=arc-20160816; b=rDhPzq+vGCYeX3q26YYBVrmUeTs/Ah0ZJ/I5Yw67Az1k+o5AzfkiiKFNa8teflZuZy RcqsgfwJL/IfQvPWfR6PuQ7K2Z5fjKOZQeXUOqGe/0ERLm6RJZ7Z3PMGv9DMKuwp2YcR HtC3JPyrGdeQQGDmzfV+73k6D7I9C+cZ9q9bOBdRI/fUYi2VP0WV7DyKiwxAudClNik3 G6uviHy6y0gLHNn5vL3NTbw0NjmAEXSZS3Vbli6E9mLnaFFe17m/w5kKJD20ZpPhuOBu 3Cl3WhdyIWegXOwu693ge26VoibGkxiYS+O2BF1hLU9BoSoWATXr51SpkNoPXD3CvEFY 7Z7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZGLi6ZZ7hP8CWSEWm0V3dbJhp2/y5MlpYoiVN1v/31o=; fh=z+OAQ93rRufMg5H3qvWwAsHk4rSAlhYmsbqT/v3Ft0E=; b=y3BATcqfX3Lr51fhpfkejrgMfM3o3yK2Ha0eTYIy99w05kTf95sGY2ZaAxHjt6AqVZ fqat6DTkgYQG4lytg8e6F/DqLuMzEC+duzv+dwxH5mhlnyc4wfsHA6fRHxg7tr3n+jBU 7s+5cWRKKvK1TmOBR5hi3OqDM8lvLcGXRUq69V1gUQxXEmIkDA0EzWwU55FWayK5lbE2 yBVxgW35B+Xm9nYvjuRPYoqaINF0N2A8r/43WjIuXdtzWeRnqE0QPVR5YMZcS0G3JKzp XWwnqOUmNvh0WEWcgqYynxU2ByhUZFJ8qBtXmyk6XD819i5zbR2z3eAkb0BVu/2MMq9J IruQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="G0/rVqXx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id m20-20020a637114000000b00577448019cbsi12441211pgc.841.2023.10.10.06.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 06:27:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@tuxon.dev header.s=google header.b="G0/rVqXx"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 3880F80B1A24; Tue, 10 Oct 2023 06:27:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232311AbjJJN12 (ORCPT + 99 others); Tue, 10 Oct 2023 09:27:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232243AbjJJN1R (ORCPT ); Tue, 10 Oct 2023 09:27:17 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 892A2B6 for ; Tue, 10 Oct 2023 06:27:16 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9b2cee40de8so1227564966b.1 for ; Tue, 10 Oct 2023 06:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1696944435; x=1697549235; darn=vger.kernel.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=ZGLi6ZZ7hP8CWSEWm0V3dbJhp2/y5MlpYoiVN1v/31o=; b=G0/rVqXxwIE8cxASApycEOgZax435tWrG5/ASY092Ueb1n5qQqH+93FL7NFgNUEBfb zEfH6Ta6tEm45H/YYkPD97Ux/aARZh/DVG7G3Dzpe9dJVRpz4rNjpiMokPwDtU6Fk7n3 gZC4FbmzySXZHuOJTu0Vp3JyzLenZXTLEZQcXLcM7r3aTHiE9OYjTjT/OZaW5J/8jn+n IZYhcxnW7YOem8I14ReHKLq8gpPKAs/FHayUFTJdYE/CKYnzcqLU9lOJEvZH+khWN55+ WZ/ChejtBLEohDc9DSf/tNE/fpxOCscYsBEP81lvvszYxYXN+lz6L1PuUp5DAwdudkcT Qdkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696944435; x=1697549235; 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=ZGLi6ZZ7hP8CWSEWm0V3dbJhp2/y5MlpYoiVN1v/31o=; b=UpucJ8LT5KFyDWjFaK96IkP0G2V/P2HynI7Qhu+vmiqYQNlKeTS/dfzRwPkfzomdOI KqNxJXyJx3ktceRxIY2pSASae4Ihl1JkH5KGJUvuJNtcSUoOg8LD5i1GXcUp9YW57Fpc xNcY5dO/opMDiPI3ab3oWx6hyUbjCyFzDLKurCNdvdv3TTg2CQIWr10LlNd12OCaU2q2 C3/iq7r4Mwszt2zd3Fyz0++jffg/C71y9YElYKTeDnD9Wc3h1CCwcwS5XYI8P1UVw63G fEJkfwLtW7+LJiFpPRzzbV2srb+hcD1gow7zMQ6nTY/78xB58oZxCRALiMg4ZeHY+2tv 3IIw== X-Gm-Message-State: AOJu0YzjqivjKEi/NlhTKLq+jusopqYe7fTaaMoIxBX1oWbiiSxdhT6o dNNQ3yO/jKX3O99jFge2X0kZ7A== X-Received: by 2002:a17:907:9491:b0:9a5:962c:cb6c with SMTP id dm17-20020a170907949100b009a5962ccb6cmr14152972ejc.31.1696944435109; Tue, 10 Oct 2023 06:27:15 -0700 (PDT) Received: from claudiu-X670E-Pro-RS.. ([82.78.167.152]) by smtp.gmail.com with ESMTPSA id i16-20020a1709064ed000b0099bd0b5a2bcsm8526578ejv.101.2023.10.10.06.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 06:27:14 -0700 (PDT) From: Claudiu X-Google-Original-From: Claudiu To: geert+renesas@glider.be, magnus.damm@gmail.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org Cc: linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, Claudiu Beznea Subject: [PATCH 4/6] arm64: dts: renesas: rzg3s-smarc-som: Enable SDHI2 Date: Tue, 10 Oct 2023 16:26:59 +0300 Message-Id: <20231010132701.1658737-5-claudiu.beznea.uj@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231010132701.1658737-1-claudiu.beznea.uj@bp.renesas.com> References: <20231010132701.1658737-1-claudiu.beznea.uj@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 10 Oct 2023 06:27:47 -0700 (PDT) X-Spam-Level: ** From: Claudiu Beznea Add SDHI2 to RZ/G3S Smarc SoM. SDHI2 pins are multiplexed with SCIF1, SSI3, IRQ0. The selection b/w SDHI2 and SCIF1, SSI3, IRQ0 is done with a switch button. To be able to select b/w these a compilation flag has been added (SW_SD2_EN) at the moment being instantiated to select SDHI2. Signed-off-by: Claudiu Beznea --- .../boot/dts/renesas/rzg3s-smarc-som.dtsi | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi index 185ca8289a35..58a68356b9d7 100644 --- a/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi +++ b/arch/arm64/boot/dts/renesas/rzg3s-smarc-som.dtsi @@ -13,14 +13,21 @@ * @SW_SD0_DEV_SEL: * 0 - SD0 is connected to eMMC * 1 - SD0 is connected to uSD0 card + * @SW_SD2_EN: + * 0 - SCIF1, SSI3, IRQ0, IRQ1 connected to SoC + * 1 - SD2 is connected to SoC */ #define SW_SD0_DEV_SEL 1 +#define SW_SD2_EN 1 / { compatible = "renesas,rzg3s-smarcm", "renesas,r9a08g045s33", "renesas,r9a08g045"; aliases { mmc0 = &sdhi0; +#if SW_SD2_EN + mmc2 = &sdhi2; +#endif }; chosen { @@ -63,6 +70,24 @@ reg_1p8v: regulator1 { regulator-always-on; }; #endif + + vcc_sdhi2: regulator2 { + compatible = "regulator-fixed"; + regulator-name = "SDHI2 Vcc"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpios = <&pinctrl RZG2L_GPIO(8, 1) GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + reg_3p3v: regulator3 { + compatible = "regulator-fixed"; + regulator-name = "fixed-3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; }; &extal_clk { @@ -100,6 +125,19 @@ &sdhi0 { }; #endif +#if SW_SD2_EN +&sdhi2 { + pinctrl-0 = <&sdhi2_pins>; + pinctrl-1 = <&sdhi2_pins>; + pinctrl-names = "default", "state_uhs"; + vmmc-supply = <&vcc_sdhi2>; + vqmmc-supply = <®_3p3v>; + bus-width = <4>; + max-frequency = <50000000>; + status = "okay"; +}; +#endif + &pinctrl { sdhi0_pins: sd0 { data { @@ -139,4 +177,26 @@ sdhi0_emmc_pins: sd0-emmc { "SD0_CLK", "SD0_CMD", "SD0_RST#"; power-source = <1800>; }; + + sdhi2_pins: sd2 { + data { + pins = "P11_2", "P11_3", "P12_0", "P12_1"; + input-enable; + }; + + ctrl { + pins = "P11_1"; + input-enable; + }; + + mux { + pinmux = , /* SD2_CLK */ + , /* SD2_CMD */ + , /* SD2_DATA0 */ + , /* SD2_DATA1 */ + , /* SD2_DATA2 */ + , /* SD2_DATA3 */ + ; /* SD2_CD# */ + }; + }; }; -- 2.39.2