xref: /freebsd/sys/contrib/device-tree/src/riscv/sophgo/sg2002-licheerv-nano-b.dts (revision 5f62a964e9f8abc6a05d8338273fadd154f0a206)
1*5f62a964SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2*5f62a964SEmmanuel Vadot/*
3*5f62a964SEmmanuel Vadot * Copyright (C) 2024 Thomas Bonnefille <thomas.bonnefille@bootlin.com>
4*5f62a964SEmmanuel Vadot */
5*5f62a964SEmmanuel Vadot
6*5f62a964SEmmanuel Vadot/dts-v1/;
7*5f62a964SEmmanuel Vadot
8*5f62a964SEmmanuel Vadot#include "sg2002.dtsi"
9*5f62a964SEmmanuel Vadot
10*5f62a964SEmmanuel Vadot/ {
11*5f62a964SEmmanuel Vadot	model = "LicheeRV Nano B";
12*5f62a964SEmmanuel Vadot	compatible = "sipeed,licheerv-nano-b", "sipeed,licheerv-nano", "sophgo,sg2002";
13*5f62a964SEmmanuel Vadot
14*5f62a964SEmmanuel Vadot	aliases {
15*5f62a964SEmmanuel Vadot		gpio0 = &gpio0;
16*5f62a964SEmmanuel Vadot		gpio1 = &gpio1;
17*5f62a964SEmmanuel Vadot		gpio2 = &gpio2;
18*5f62a964SEmmanuel Vadot		gpio3 = &gpio3;
19*5f62a964SEmmanuel Vadot		serial0 = &uart0;
20*5f62a964SEmmanuel Vadot		serial1 = &uart1;
21*5f62a964SEmmanuel Vadot		serial2 = &uart2;
22*5f62a964SEmmanuel Vadot		serial3 = &uart3;
23*5f62a964SEmmanuel Vadot		serial4 = &uart4;
24*5f62a964SEmmanuel Vadot	};
25*5f62a964SEmmanuel Vadot
26*5f62a964SEmmanuel Vadot	chosen {
27*5f62a964SEmmanuel Vadot		stdout-path = "serial0:115200n8";
28*5f62a964SEmmanuel Vadot	};
29*5f62a964SEmmanuel Vadot};
30*5f62a964SEmmanuel Vadot
31*5f62a964SEmmanuel Vadot&osc {
32*5f62a964SEmmanuel Vadot	clock-frequency = <25000000>;
33*5f62a964SEmmanuel Vadot};
34*5f62a964SEmmanuel Vadot
35*5f62a964SEmmanuel Vadot&pinctrl {
36*5f62a964SEmmanuel Vadot	uart0_cfg: uart0-cfg {
37*5f62a964SEmmanuel Vadot		uart0-pins {
38*5f62a964SEmmanuel Vadot			pinmux = <PINMUX(PIN_UART0_TX, 0)>,
39*5f62a964SEmmanuel Vadot				 <PINMUX(PIN_UART0_RX, 0)>;
40*5f62a964SEmmanuel Vadot			bias-pull-up;
41*5f62a964SEmmanuel Vadot			drive-strength-microamp = <10800>;
42*5f62a964SEmmanuel Vadot			power-source = <3300>;
43*5f62a964SEmmanuel Vadot		};
44*5f62a964SEmmanuel Vadot	};
45*5f62a964SEmmanuel Vadot
46*5f62a964SEmmanuel Vadot	sdhci0_cfg: sdhci0-cfg {
47*5f62a964SEmmanuel Vadot		sdhci0-clk-pins {
48*5f62a964SEmmanuel Vadot			pinmux = <PINMUX(PIN_SD0_CLK, 0)>;
49*5f62a964SEmmanuel Vadot			bias-pull-up;
50*5f62a964SEmmanuel Vadot			drive-strength-microamp = <16100>;
51*5f62a964SEmmanuel Vadot			power-source = <3300>;
52*5f62a964SEmmanuel Vadot		};
53*5f62a964SEmmanuel Vadot
54*5f62a964SEmmanuel Vadot		sdhci0-cmd-pins {
55*5f62a964SEmmanuel Vadot			pinmux = <PINMUX(PIN_SD0_CMD, 0)>;
56*5f62a964SEmmanuel Vadot			bias-pull-up;
57*5f62a964SEmmanuel Vadot			drive-strength-microamp = <10800>;
58*5f62a964SEmmanuel Vadot			power-source = <3300>;
59*5f62a964SEmmanuel Vadot		};
60*5f62a964SEmmanuel Vadot
61*5f62a964SEmmanuel Vadot		sdhci0-data-pins {
62*5f62a964SEmmanuel Vadot			pinmux = <PINMUX(PIN_SD0_D0, 0)>,
63*5f62a964SEmmanuel Vadot				 <PINMUX(PIN_SD0_D1, 0)>,
64*5f62a964SEmmanuel Vadot				 <PINMUX(PIN_SD0_D2, 0)>,
65*5f62a964SEmmanuel Vadot				 <PINMUX(PIN_SD0_D3, 0)>;
66*5f62a964SEmmanuel Vadot			bias-pull-up;
67*5f62a964SEmmanuel Vadot			drive-strength-microamp = <10800>;
68*5f62a964SEmmanuel Vadot			power-source = <3300>;
69*5f62a964SEmmanuel Vadot		};
70*5f62a964SEmmanuel Vadot
71*5f62a964SEmmanuel Vadot		sdhci0-cd-pins {
72*5f62a964SEmmanuel Vadot			pinmux = <PINMUX(PIN_SD0_CD, 0)>;
73*5f62a964SEmmanuel Vadot			bias-pull-up;
74*5f62a964SEmmanuel Vadot			drive-strength-microamp = <10800>;
75*5f62a964SEmmanuel Vadot			power-source = <3300>;
76*5f62a964SEmmanuel Vadot		};
77*5f62a964SEmmanuel Vadot	};
78*5f62a964SEmmanuel Vadot};
79*5f62a964SEmmanuel Vadot
80*5f62a964SEmmanuel Vadot&sdhci0 {
81*5f62a964SEmmanuel Vadot	pinctrl-0 = <&sdhci0_cfg>;
82*5f62a964SEmmanuel Vadot	pinctrl-names = "default";
83*5f62a964SEmmanuel Vadot	status = "okay";
84*5f62a964SEmmanuel Vadot	bus-width = <4>;
85*5f62a964SEmmanuel Vadot	no-1-8-v;
86*5f62a964SEmmanuel Vadot	no-mmc;
87*5f62a964SEmmanuel Vadot	no-sdio;
88*5f62a964SEmmanuel Vadot	disable-wp;
89*5f62a964SEmmanuel Vadot};
90*5f62a964SEmmanuel Vadot
91*5f62a964SEmmanuel Vadot&uart0 {
92*5f62a964SEmmanuel Vadot	pinctrl-0 = <&uart0_cfg>;
93*5f62a964SEmmanuel Vadot	pinctrl-names = "default";
94*5f62a964SEmmanuel Vadot	status = "okay";
95*5f62a964SEmmanuel Vadot};
96