devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: claudiu beznea <claudiu.beznea@tuxon.dev>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: 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,
	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 <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH 33/37] arm64: dts: renesas: rzg3l-smarc-som: add initial support for RZ/G3S SMARC Carrier-II SoM
Date: Mon, 18 Sep 2023 09:02:07 +0300	[thread overview]
Message-ID: <458ac1fb-575b-6ebd-7da0-a8d3abd3d5f8@tuxon.dev> (raw)
In-Reply-To: <CAMuHMdUfwtpe5qLonZ0CZcaRw1j5x7xLLXJpMqpWLX5AzK3xmw@mail.gmail.com>

Hi, Geert,

On 15.09.2023 17:28, Geert Uytterhoeven wrote:
> Hi Claudiu,
> 
> Thanks for your patch!
> 
> On Tue, Sep 12, 2023 at 6:53 AM Claudiu <claudiu.beznea@tuxon.dev> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>
>> 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
> 
> That's an 8 Gib part, so 1 GiB?
> 
>> - 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
> 
> Please drop the description of parts you are not adding to the DTS yet.
> 
>> 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 <claudiu.beznea.uj@bp.renesas.com>
> 
>> --- /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 <dt-bindings/gpio/gpio.h>
>> +#include <dt-bindings/pinctrl/rzg2l-pinctrl.h>
>> +
>> +/*
>> + * 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 = <&reg_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 = <&reg_3p3v>;
>> +       vqmmc-supply = <&reg_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 = <RZG2L_GPIO(2, 1) GPIO_ACTIVE_HIGH>;
> 
> According to the schematics, P2_1 controls power to the uSD slot.
> Hence shouldn't reg_3p3v above be modelled using regulator-gpio,
> with enable-gpios pointing to P2_1?

That should work. I'll check it, thanks!

> 
>> +               output-high;
>> +               line-name = "sd0_pwr_en";
>> +       };
> Gr{oetje,eeting}s,
> 
>                         Geert
> 

  reply	other threads:[~2023-09-18  6:02 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12  4:51 [PATCH 00/37] Add new Renesas RZ/G3S SoC and RZ/G3S SMARC EVK Claudiu
2023-09-12  4:51 ` [PATCH 01/37] dt-bindings: serial: renesas,scif: document r9a08g045 support Claudiu
2023-09-12 16:00   ` Rob Herring
2023-09-14  9:35   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 02/37] dt-bindings: soc: renesas: document Renesas RZ/G3S SoC variants Claudiu
2023-09-12 16:01   ` Rob Herring
2023-09-14  9:49   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 03/37] dt-bindings: soc: renesas: renesas,rzg2l-sysc: document RZ/G3S SoC Claudiu
2023-09-12 16:01   ` Rob Herring
2023-09-14  9:49   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 04/37] soc: renesas: identify " Claudiu
2023-09-14  9:49   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 05/37] soc: renesas: remove blank lines Claudiu
2023-09-14  9:49   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 06/37] clk: renesas: rzg2l: wait for status bit of SD mux before continuing Claudiu
2023-09-14 11:42   ` Geert Uytterhoeven
2023-09-15  5:35     ` claudiu beznea
2023-09-12  4:51 ` [PATCH 07/37] clk: renesas: rzg2l: lock around writes to mux register Claudiu
2023-09-14 12:13   ` Geert Uytterhoeven
2023-09-15  5:46     ` claudiu beznea
2023-09-12  4:51 ` [PATCH 08/37] clk: renesas: rzg2l: trust value returned by hardware Claudiu
2023-09-12 16:43   ` Sergey Shtylyov
2023-09-14 12:18     ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 09/37] clk: renesas: rzg2l: fix computation formula Claudiu
2023-09-14 12:55   ` Geert Uytterhoeven
2023-09-26 11:47     ` claudiu beznea
2023-09-26 14:44       ` Geert Uytterhoeven
2023-09-27  8:00         ` Geert Uytterhoeven
2023-09-28  4:55           ` claudiu beznea
2023-09-12  4:51 ` [PATCH 10/37] clk: renesas: rzg2l: use core->name for clock name Claudiu
2023-09-14 13:04   ` Geert Uytterhoeven
2023-09-15  5:47     ` claudiu beznea
2023-09-18  8:03       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 11/37] clk: renesas: rzg2l: simplify a bit the logic in rzg2l_mod_clock_endisable() Claudiu
2023-09-14 13:06   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 12/37] clk: renesas: rzg2l: reduce the critical area Claudiu
2023-09-14 13:12   ` Geert Uytterhoeven
2023-09-15  5:51     ` claudiu beznea
2023-09-15  7:05       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 13/37] clk: renesas: rzg2l: use FIELD_GET() for PLL register fields Claudiu
2023-09-14 13:19   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 14/37] clk: renesas: rzg2l: use u32 for flag and mux_flags Claudiu
2023-09-14 13:29   ` Geert Uytterhoeven
2023-09-18  8:03     ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 15/37] clk: renesas: rzg2l: add support for RZ/G3S PLL Claudiu
2023-09-14 13:58   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 16/37] clk: renesas: rzg2l: add struct clk_hw_data Claudiu
2023-09-14 15:17   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 17/37] clk: renesas: rzg2l: remove CPG_SDHI_DSEL from generic header Claudiu
2023-09-14 15:18   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 18/37] clk: renesas: rzg2l: refactor sd mux driver Claudiu
2023-09-14 15:18   ` Geert Uytterhoeven
2023-09-15  7:30     ` claudiu beznea
2023-09-15  8:06       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 19/37] clk: renesas: rzg2l: add a divider clock for RZ/G3S Claudiu
2023-09-12  4:51 ` [PATCH 20/37] dt-bindings: clock: renesas,rzg2l-cpg: document RZ/G3S SoC Claudiu
2023-09-12 16:02   ` Rob Herring
2023-09-15 11:58   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 21/37] dt-bindings: clock: add r9a08g045 CPG clocks and resets definitions Claudiu
2023-09-12 16:03   ` Rob Herring
2023-09-14 15:26     ` Geert Uytterhoeven
2023-09-15  7:24       ` Krzysztof Kozlowski
2023-09-15  7:38         ` Geert Uytterhoeven
2023-09-15  7:42           ` Krzysztof Kozlowski
2023-09-15 11:59   ` Geert Uytterhoeven
2023-09-28  4:54     ` claudiu beznea
2023-09-28  7:25       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 22/37] clk: renesas: add minimal boot support for RZ/G3S SoC Claudiu
2023-09-15 12:52   ` Geert Uytterhoeven
2023-09-18  6:20     ` claudiu beznea
2023-09-18  7:00       ` Geert Uytterhoeven
2023-09-18  7:50     ` claudiu beznea
2023-09-18  9:05       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 23/37] pinctrl: renesas: rzg2l: index all registers based on port offset Claudiu
2023-09-20 13:20   ` Geert Uytterhoeven
2023-09-20 13:43     ` Lad, Prabhakar
2023-09-12  4:51 ` [PATCH 24/37] pinctrl: renesas: rzg2l: adapt for different SD, PWPR register offsets Claudiu
2023-09-21 12:07   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 25/37] pinctrl: renesas: rzg2l: adapt function number for RZ/G3S Claudiu
2023-09-21 12:51   ` Geert Uytterhoeven
2023-09-26  9:55     ` claudiu beznea
2023-09-26 14:23       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 26/37] pinctrl: renesas: rzg2l: move ds and oi to SoC specific configuration Claudiu
2023-09-21 12:54   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 27/37] pinctrl: renesas: rzg2l: add support for different ds values on different groups Claudiu
2023-09-21 13:07   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 28/37] pinctrl: renesas: rzg2l: make struct rzg2l_pinctrl_data::dedicated_pins constant Claudiu
2023-09-21 13:08   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 29/37] dt-bindings: pinctrl: renesas: document RZ/G3S SoC Claudiu
2023-09-12 16:13   ` Rob Herring
2023-09-21 15:00   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 30/37] pinctrl: renesas: rzg2l: add support for " Claudiu
2023-09-21 14:58   ` Geert Uytterhoeven
2023-09-26 10:58     ` claudiu beznea
2023-09-26 14:29       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 31/37] dt-bindings: mmc: renesas,sdhi: Document RZ/G3S support Claudiu
2023-09-12 16:13   ` Rob Herring
2023-09-14 14:47   ` Ulf Hansson
2023-09-14 15:35   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 32/37] arm64: dts: renesas: add initial DTSI for RZ/G3S SoC Claudiu
2023-09-15 13:17   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 33/37] arm64: dts: renesas: rzg3l-smarc-som: add initial support for RZ/G3S SMARC Carrier-II SoM Claudiu
2023-09-15 14:28   ` Geert Uytterhoeven
2023-09-18  6:02     ` claudiu beznea [this message]
2023-09-12  4:51 ` [PATCH 34/37] arm64: dts: renesas: rzg3s-smarc: add initial device tree for RZ SMARC Carrier-II board Claudiu
2023-09-15 14:32   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 35/37] dt-bindings: arm: renesas: document SMARC Carrier-II EVK Claudiu
2023-09-12 16:16   ` Rob Herring
2023-09-13  5:32     ` claudiu beznea
2023-09-13 15:16       ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 36/37] arm64: dts: renesas: r9a08g045s33-smarc: add initial device tree for RZ/G3S SMARC EVK board Claudiu
2023-09-21 15:02   ` Geert Uytterhoeven
2023-09-12  4:51 ` [PATCH 37/37] arm64: defconfig: enable RZ/G3S (R9A08G045) SoC Claudiu
2023-09-15 14:34   ` Geert Uytterhoeven
2023-09-12  8:55 ` [PATCH 00/37] Add new Renesas RZ/G3S SoC and RZ/G3S SMARC EVK Linus Walleij
2023-09-12  9:03   ` Geert Uytterhoeven
2023-09-12  9:05     ` Linus Walleij
2023-09-13  5:40       ` claudiu beznea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=458ac1fb-575b-6ebd-7da0-a8d3abd3d5f8@tuxon.dev \
    --to=claudiu.beznea@tuxon.dev \
    --cc=arnd@arndb.de \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=catalin.marinas@arm.com \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=neil.armstrong@linaro.org \
    --cc=nfraprado@collabora.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=quic_bjorande@quicinc.com \
    --cc=rafal@milecki.pl \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=will@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).