All of lore.kernel.org
 help / color / mirror / Atom feed
From: E Shattow <e@freeshell.de>
To: Minda Chen <minda.chen@starfivetech.com>,
	Hal Feng <hal.feng@starfivetech.com>,
	Tom Rini <trini@konsulko.com>, Rick Chen <rick@andestech.com>,
	Leo <ycliang@andestech.com>
Cc: u-boot@lists.denx.de, E Shattow <e@freeshell.de>
Subject: [RFC v1 1/4] riscv: dts: starfive: Add Milk-V Mars CM and Mars CM Lite from upstream Linux for-next
Date: Wed, 24 Sep 2025 22:32:05 -0700	[thread overview]
Message-ID: <20250925053233.1874027-2-e@freeshell.de> (raw)
In-Reply-To: <20250925053233.1874027-1-e@freeshell.de>

Import dtsi common to Mars CM and Mars CM Lite, and adopt dts for each as
per-board automatic inclusion. This commit should be reverted
when devicetree-rebasing release candidate for Linux 6.18 is sync'ed.

Signed-off-by: E Shattow <e@freeshell.de>
---
 .../dts/jh7110-milkv-marscm-emmc-u-boot.dtsi  |  12 ++
 .../dts/jh7110-milkv-marscm-lite-u-boot.dtsi  |  25 +++
 arch/riscv/dts/jh7110-milkv-marscm.dtsi       | 159 ++++++++++++++++++
 3 files changed, 196 insertions(+)
 create mode 100644 arch/riscv/dts/jh7110-milkv-marscm-emmc-u-boot.dtsi
 create mode 100644 arch/riscv/dts/jh7110-milkv-marscm-lite-u-boot.dtsi
 create mode 100644 arch/riscv/dts/jh7110-milkv-marscm.dtsi

diff --git a/arch/riscv/dts/jh7110-milkv-marscm-emmc-u-boot.dtsi b/arch/riscv/dts/jh7110-milkv-marscm-emmc-u-boot.dtsi
new file mode 100644
index 00000000000..e568537af2c
--- /dev/null
+++ b/arch/riscv/dts/jh7110-milkv-marscm-emmc-u-boot.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2025 E Shattow <e@freeshell.de>
+ */
+
+/dts-v1/;
+#include "jh7110-milkv-marscm.dtsi"
+
+/ {
+	model = "Milk-V Mars CM";
+	compatible = "milkv,marscm-emmc", "starfive,jh7110";
+};
diff --git a/arch/riscv/dts/jh7110-milkv-marscm-lite-u-boot.dtsi b/arch/riscv/dts/jh7110-milkv-marscm-lite-u-boot.dtsi
new file mode 100644
index 00000000000..6c40d0ec401
--- /dev/null
+++ b/arch/riscv/dts/jh7110-milkv-marscm-lite-u-boot.dtsi
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2025 E Shattow <e@freeshell.de>
+ */
+
+/dts-v1/;
+#include "jh7110-milkv-marscm.dtsi"
+
+/ {
+	model = "Milk-V Mars CM Lite";
+	compatible = "milkv,marscm-lite", "starfive,jh7110";
+};
+
+&mmc0 {
+	bus-width = <4>;
+	cd-gpios = <&sysgpio 41 GPIO_ACTIVE_LOW>;
+};
+
+&mmc0_pins {
+	pwren-pins {
+		pinmux = <GPIOMUX(22, GPOUT_HIGH,
+				      GPOEN_ENABLE,
+				      GPI_NONE)>;
+	};
+};
diff --git a/arch/riscv/dts/jh7110-milkv-marscm.dtsi b/arch/riscv/dts/jh7110-milkv-marscm.dtsi
new file mode 100644
index 00000000000..25b70af564e
--- /dev/null
+++ b/arch/riscv/dts/jh7110-milkv-marscm.dtsi
@@ -0,0 +1,159 @@
+// SPDX-License-Identifier: GPL-2.0 OR MIT
+/*
+ * Copyright (C) 2025 E Shattow <e@freeshell.de>
+ */
+
+/dts-v1/;
+#include <dt-bindings/interrupt-controller/irq.h>
+#include "jh7110-common.dtsi"
+
+/ {
+	aliases {
+		i2c1 = &i2c1;
+		i2c3 = &i2c3;
+		i2c4 = &i2c4;
+		serial3 = &uart3;
+	};
+
+	sdio_pwrseq: sdio-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&sysgpio 33 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&gmac0 {
+	assigned-clocks = <&aoncrg JH7110_AONCLK_GMAC0_TX>;
+	assigned-clock-parents = <&aoncrg JH7110_AONCLK_GMAC0_RMII_RTX>;
+	starfive,tx-use-rgmii-clk;
+	status = "okay";
+};
+
+&i2c0 {
+	status = "okay";
+};
+
+&i2c2 {
+	status = "disabled";
+};
+
+&i2c6 {
+	status = "disabled";
+};
+
+&mmc1 {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	mmc-pwrseq = <&sdio_pwrseq>;
+	non-removable;
+	status = "okay";
+
+	ap6256: wifi@1 {
+		compatible = "brcm,bcm43456-fmac", "brcm,bcm4329-fmac";
+		reg = <1>;
+		interrupt-parent = <&sysgpio>;
+		interrupts = <34 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "host-wake";
+		pinctrl-0 = <&wifi_host_wake_irq>;
+		pinctrl-names = "default";
+	};
+};
+
+&pcie0 {
+	status = "okay";
+};
+
+&phy0 {
+	rx-internal-delay-ps = <1500>;
+	tx-internal-delay-ps = <1500>;
+	motorcomm,rx-clk-drv-microamp = <3970>;
+	motorcomm,rx-data-drv-microamp = <2910>;
+	motorcomm,tx-clk-10-inverted;
+	motorcomm,tx-clk-100-inverted;
+	motorcomm,tx-clk-1000-inverted;
+	motorcomm,tx-clk-adj-enabled;
+};
+
+&pwm {
+	status = "okay";
+};
+
+&spi0 {
+	status = "okay";
+};
+
+&sysgpio {
+	uart1_pins: uart1-0 {
+		tx-pins {
+			pinmux = <GPIOMUX(16, GPOUT_SYS_UART1_TX,
+					      GPOEN_ENABLE,
+					      GPI_NONE)>;
+			bias-disable;
+			drive-strength = <12>;
+			input-disable;
+			input-schmitt-disable;
+		};
+
+		rx-pins {
+			pinmux = <GPIOMUX(17, GPOUT_LOW,
+					      GPOEN_DISABLE,
+					      GPI_SYS_UART1_RX)>;
+			bias-pull-up;
+			input-enable;
+			input-schmitt-enable;
+		};
+
+		cts-pins {
+			pinmux = <GPIOMUX(3, GPOUT_LOW,
+					     GPOEN_DISABLE,
+					     GPI_SYS_UART1_CTS)>;
+			bias-disable;
+			input-enable;
+			input-schmitt-enable;
+		};
+
+		rts-pins {
+			pinmux = <GPIOMUX(2, GPOUT_SYS_UART1_RTS,
+					     GPOEN_ENABLE,
+					     GPI_NONE)>;
+			bias-disable;
+			input-disable;
+			input-schmitt-disable;
+		};
+	};
+
+	usb0_pins: usb0-0 {
+		vbus-pins {
+			pinmux = <GPIOMUX(25, GPOUT_SYS_USB_DRIVE_VBUS,
+					      GPOEN_ENABLE,
+					      GPI_NONE)>;
+			bias-disable;
+			input-disable;
+			input-schmitt-disable;
+			slew-rate = <0>;
+		};
+	};
+
+	wifi_host_wake_irq: wifi-host-wake-irq-0 {
+		wake-pins {
+			pinmux = <GPIOMUX(34, GPOUT_LOW,
+					      GPOEN_DISABLE,
+					      GPI_NONE)>;
+			input-enable;
+		};
+	};
+};
+
+&uart1 {
+	uart-has-rtscts;
+	pinctrl-0 = <&uart1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&usb0 {
+	dr_mode = "host";
+	pinctrl-names = "default";
+	pinctrl-0 = <&usb0_pins>;
+	status = "okay";
+};
-- 
2.50.0


  reply	other threads:[~2025-09-25  5:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25  5:32 [RFC v1 0/4] Add upstream boards Milk-V Mars CM and Mars CM Lite E Shattow
2025-09-25  5:32 ` E Shattow [this message]
2025-09-25  5:32 ` [RFC v1 2/4] board: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection by product_id E Shattow
2025-09-25  5:32 ` [RFC v1 3/4] riscv: dts: Add placeholder files for pending upstream Milk-V Mars CM and Mars CM Lite E Shattow
2025-09-25  5:32 ` [RFC v1 4/4] configs: starfive: Add Milk-V Mars CM and Mars CM Lite to visionfive2 E Shattow
2025-10-02  6:28 ` [RFC v1 0/4] Add upstream boards Milk-V Mars CM and Mars CM Lite E Shattow

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=20250925053233.1874027-2-e@freeshell.de \
    --to=e@freeshell.de \
    --cc=hal.feng@starfivetech.com \
    --cc=minda.chen@starfivetech.com \
    --cc=rick@andestech.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=ycliang@andestech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.