From: "Heiko Stübner" <heiko@sntech.de>
To: Sumit Garg <sumit.garg@linaro.org>,
Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Kever Yang <kever.yang@rock-chips.com>,
Tom Rini <trini@konsulko.com>,
Klaus Goger <klaus.goger@cherry.de>,
Heiko Stuebner <heiko.stuebner@cherry.de>,
Quentin Schulz <foss+uboot@0leil.net>
Cc: u-boot@lists.denx.de, Quentin Schulz <quentin.schulz@cherry.de>,
Quentin Schulz <quentin.schulz@cherry.de>
Subject: Re: [PATCH 1/3] arm64: dts: rockchip: add PCIe3 support on rk3588-jaguar
Date: Thu, 04 Jul 2024 16:10:29 +0200 [thread overview]
Message-ID: <1928504.IobQ9Gjlxr@diego> (raw)
In-Reply-To: <20240704-tsd-rk3588-nvme-v1-1-fb9e8dde9570@cherry.de>
Am Donnerstag, 4. Juli 2024, 14:53:31 CEST schrieb Quentin Schulz:
> From: Heiko Stuebner <heiko.stuebner@cherry.de>
>
> The Jaguar SBC provides an M.2 slot connected to the pcie3 controller.
> In contrast to a number of other boards the pcie-refclk is gpio-controlled,
> so the necessary clock and is added to the list of pcie3 clocks.
>
> Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> Link: https://lore.kernel.org/r/20240423074956.2622318-1-heiko@sntech.de
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
>
> [ upstream commit: 0ec7e1096332bc2b9bc881c21cfd234058f747b3 ]
>
> (cherry picked from commit 76a89655ae740dddb57187b5b52071ed99187452)
on a rk3588-jaguar
Tested-by: Heiko Stuebner <heiko@sntech.de>
> ---
> dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts | 59 +++++++++++++++++++++++
> 1 file changed, 59 insertions(+)
>
> diff --git a/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts b/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts
> index 7d7303f8ecb..678ed8b4dcc 100644
> --- a/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts
> +++ b/dts/upstream/src/arm64/rockchip/rk3588-jaguar.dts
> @@ -72,6 +72,27 @@
> };
> };
>
> + /*
> + * 100MHz reference clock for PCIe peripherals from PI6C557-05BLE
> + * clock generator.
> + * The clock output is gated via the OE pin on the clock generator.
> + * This is modeled as a fixed-clock plus a gpio-gate-clock.
> + */
> + pcie_refclk_gen: pcie-refclk-gen-clock {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <100000000>;
> + };
> +
> + pcie_refclk: pcie-refclk-clock {
> + compatible = "gpio-gate-clock";
> + clocks = <&pcie_refclk_gen>;
> + #clock-cells = <0>;
> + enable-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>; /* PCIE30X4_CLKREQN_M0 */
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie30x4_clkreqn_m0>;
> + };
> +
> pps {
> compatible = "pps-gpio";
> gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_HIGH>;
> @@ -353,6 +374,30 @@
> status = "okay";
> };
>
> +&pcie30phy {
> + status = "okay";
> +};
> +
> +&pcie3x4 {
> + /*
> + * The board has a gpio-controlled "pcie_refclk" generator,
> + * so add it to the list of clocks.
> + */
> + clocks = <&cru ACLK_PCIE_4L_MSTR>, <&cru ACLK_PCIE_4L_SLV>,
> + <&cru ACLK_PCIE_4L_DBI>, <&cru PCLK_PCIE_4L>,
> + <&cru CLK_PCIE_AUX0>, <&cru CLK_PCIE4L_PIPE>,
> + <&pcie_refclk>;
> + clock-names = "aclk_mst", "aclk_slv",
> + "aclk_dbi", "pclk",
> + "aux", "pipe",
> + "ref";
> + pinctrl-names = "default";
> + pinctrl-0 = <&pcie30x4_waken_m0 &pcie30x4_perstn_m0>;
> + reset-gpios = <&gpio0 RK_PD0 GPIO_ACTIVE_HIGH>; /* PCIE30X4_PERSTN_M0 */
> + vpcie3v3-supply = <&vcc3v3_mdot2>;
> + status = "okay";
> +};
> +
> &pinctrl {
> emmc {
> emmc_reset: emmc-reset {
> @@ -371,6 +416,20 @@
> rockchip,pins = <1 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
> };
> };
> +
> + pcie30x4 {
> + pcie30x4_clkreqn_m0: pcie30x4-clkreqn-m0 {
> + rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + pcie30x4_perstn_m0: pcie30x4-perstn-m0 {
> + rockchip,pins = <0 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
> + };
> +
> + pcie30x4_waken_m0: pcie30x4-waken-m0 {
> + rockchip,pins = <0 RK_PC7 12 &pcfg_pull_none>;
> + };
> + };
> };
>
> &saradc {
>
>
next prev parent reply other threads:[~2024-07-04 14:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 12:53 [PATCH 0/3] rockchip: enable PCIe/NVMe support for Theobroma RK3588 devices Quentin Schulz
2024-07-04 12:53 ` [PATCH 1/3] arm64: dts: rockchip: add PCIe3 support on rk3588-jaguar Quentin Schulz
2024-07-04 14:10 ` Heiko Stübner [this message]
2024-07-15 7:22 ` Kever Yang
2024-07-04 12:53 ` [PATCH 2/3] rockchip: jaguar-rk3588: add PCIe M.2 M-KEY NVMe support Quentin Schulz
2024-07-04 14:12 ` Heiko Stübner
2024-07-15 7:23 ` Kever Yang
2024-07-04 12:53 ` [PATCH 3/3] rockchip: tiger-rk3588: add PCIe support Quentin Schulz
2024-07-04 14:18 ` Heiko Stübner
2024-07-15 7:23 ` Kever Yang
2024-07-05 5:32 ` [PATCH 0/3] rockchip: enable PCIe/NVMe support for Theobroma RK3588 devices Sumit Garg
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=1928504.IobQ9Gjlxr@diego \
--to=heiko@sntech.de \
--cc=foss+uboot@0leil.net \
--cc=heiko.stuebner@cherry.de \
--cc=kever.yang@rock-chips.com \
--cc=klaus.goger@cherry.de \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@cherry.de \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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