]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
riscv: dts: starfive: add common board dtsi for Milk-V Mars CM variants
authorE Shattow <e@freeshell.de>
Fri, 5 Sep 2025 14:39:39 +0000 (07:39 -0700)
committerConor Dooley <conor.dooley@microchip.com>
Tue, 16 Sep 2025 19:35:01 +0000 (20:35 +0100)
Add a common board dtsi for use by Milk-V Mars CM and Milk-V Mars CM Lite.

Signed-off-by: E Shattow <e@freeshell.de>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
arch/riscv/boot/dts/starfive/jh7110-milkv-marscm.dtsi [new file with mode: 0644]

diff --git a/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm.dtsi b/arch/riscv/boot/dts/starfive/jh7110-milkv-marscm.dtsi
new file mode 100644 (file)
index 0000000..25b70af
--- /dev/null
@@ -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";
+};