Skip to content

Commit 3e2accf

Browse files
committed
riscv: dts: Add full JH7100, Starlight and VisionFive support
Based on the device tree in https://github.com/starfive-tech/u-boot/ with contributions from: yanhong.wang <yanhong.wang@starfivetech.com> Huan.Feng <huan.feng@starfivetech.com> ke.zhu <ke.zhu@starfivetech.com> yiming.li <yiming.li@starfivetech.com> jack.zhu <jack.zhu@starfivetech.com> Samin Guo <samin.guo@starfivetech.com> Chenjieqin <Jessica.Chen@starfivetech.com> bo.li <bo.li@starfivetech.com> Rearranged, cleanups, fixes, pins and resets added by Emil. Cleanups, fixes, clocks added by Geert. Cleanups and GPIO fixes from Drew. Thermal zone added by Stephen. PWM pins added by Jianlong. Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Stephen L Arnold <nerdboy@gentoo.org> Signed-off-by: Drew Fustini <drew@beagleboard.org> Signed-off-by: Jianlong Huang <jianlong.huang@starfivetech.com>
1 parent 3436f25 commit 3e2accf

6 files changed

Lines changed: 1213 additions & 149 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight.dtb
2+
dtb-$(CONFIG_SOC_STARFIVE) += jh7100-beaglev-starlight-a1.dtb jh7100-beaglev-starlight.dtb jh7100-starfive-visionfive-v1.dtb
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: GPL-2.0 OR MIT
2+
/*
3+
* Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk>
4+
*/
5+
6+
/dts-v1/;
7+
#include "jh7100-common.dtsi"
8+
#include <dt-bindings/gpio/gpio.h>
9+
10+
/ {
11+
model = "BeagleV Starlight Beta A1";
12+
compatible = "beagle,beaglev-starlight-jh7100-a1", "starfive,jh7100";
13+
14+
gpio-restart {
15+
compatible = "gpio-restart";
16+
gpios = <&gpio 63 GPIO_ACTIVE_HIGH>;
17+
priority = <224>;
18+
};
19+
};
20+
21+
&gpio {
22+
/* don't reset gpio mux for serial console and reset gpio */
23+
starfive,keep-gpiomux = <13 14 63>;
24+
};
Lines changed: 6 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,164 +1,22 @@
11
// SPDX-License-Identifier: GPL-2.0 OR MIT
22
/*
3-
* Copyright (C) 2021 StarFive Technology Co., Ltd.
43
* Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk>
54
*/
65

76
/dts-v1/;
8-
#include "jh7100.dtsi"
7+
#include "jh7100-common.dtsi"
98
#include <dt-bindings/gpio/gpio.h>
10-
#include <dt-bindings/leds/common.h>
11-
#include <dt-bindings/pinctrl/pinctrl-starfive.h>
129

1310
/ {
1411
model = "BeagleV Starlight Beta";
1512
compatible = "beagle,beaglev-starlight-jh7100-r0", "starfive,jh7100";
16-
17-
aliases {
18-
serial0 = &uart3;
19-
};
20-
21-
chosen {
22-
stdout-path = "serial0:115200n8";
23-
};
24-
25-
cpus {
26-
timebase-frequency = <6250000>;
27-
};
28-
29-
memory@80000000 {
30-
device_type = "memory";
31-
reg = <0x0 0x80000000 0x2 0x0>;
32-
};
33-
34-
leds {
35-
compatible = "gpio-leds";
36-
37-
led-ack {
38-
gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
39-
color = <LED_COLOR_ID_GREEN>;
40-
function = LED_FUNCTION_HEARTBEAT;
41-
linux,default-trigger = "heartbeat";
42-
label = "ack";
43-
};
44-
};
4513
};
4614

47-
&gpio {
48-
i2c0_pins: i2c0-0 {
49-
i2c-pins {
50-
pinmux = <GPIOMUX(62, GPO_LOW,
51-
GPO_I2C0_PAD_SCK_OEN,
52-
GPI_I2C0_PAD_SCK_IN)>,
53-
<GPIOMUX(61, GPO_LOW,
54-
GPO_I2C0_PAD_SDA_OEN,
55-
GPI_I2C0_PAD_SDA_IN)>;
56-
bias-disable; /* external pull-up */
57-
input-enable;
58-
input-schmitt-enable;
59-
};
60-
};
61-
62-
i2c1_pins: i2c1-0 {
63-
i2c-pins {
64-
pinmux = <GPIOMUX(47, GPO_LOW,
65-
GPO_I2C1_PAD_SCK_OEN,
66-
GPI_I2C1_PAD_SCK_IN)>,
67-
<GPIOMUX(48, GPO_LOW,
68-
GPO_I2C1_PAD_SDA_OEN,
69-
GPI_I2C1_PAD_SDA_IN)>;
70-
bias-pull-up;
71-
input-enable;
72-
input-schmitt-enable;
73-
};
74-
};
75-
76-
i2c2_pins: i2c2-0 {
77-
i2c-pins {
78-
pinmux = <GPIOMUX(60, GPO_LOW,
79-
GPO_I2C2_PAD_SCK_OEN,
80-
GPI_I2C2_PAD_SCK_IN)>,
81-
<GPIOMUX(59, GPO_LOW,
82-
GPO_I2C2_PAD_SDA_OEN,
83-
GPI_I2C2_PAD_SDA_IN)>;
84-
bias-disable; /* external pull-up */
85-
input-enable;
86-
input-schmitt-enable;
87-
};
88-
};
89-
90-
uart3_pins: uart3-0 {
91-
rx-pins {
92-
pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
93-
GPI_UART3_PAD_SIN)>;
94-
bias-pull-up;
95-
drive-strength = <14>;
96-
input-enable;
97-
input-schmitt-enable;
98-
slew-rate = <0>;
99-
};
100-
tx-pins {
101-
pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
102-
GPO_ENABLE, GPI_NONE)>;
103-
bias-disable;
104-
drive-strength = <35>;
105-
input-disable;
106-
input-schmitt-disable;
107-
slew-rate = <0>;
108-
};
109-
};
15+
&gmac {
16+
snps,reset-gpios = <&gpio 63 GPIO_ACTIVE_LOW>;
11017
};
11118

112-
&i2c0 {
113-
clock-frequency = <100000>;
114-
i2c-sda-hold-time-ns = <300>;
115-
i2c-sda-falling-time-ns = <500>;
116-
i2c-scl-falling-time-ns = <500>;
117-
pinctrl-names = "default";
118-
pinctrl-0 = <&i2c0_pins>;
119-
status = "okay";
120-
121-
pmic@5e {
122-
compatible = "ti,tps65086";
123-
reg = <0x5e>;
124-
gpio-controller;
125-
#gpio-cells = <2>;
126-
127-
regulators {
128-
};
129-
};
130-
};
131-
132-
&i2c1 {
133-
clock-frequency = <400000>;
134-
i2c-sda-hold-time-ns = <300>;
135-
i2c-sda-falling-time-ns = <100>;
136-
i2c-scl-falling-time-ns = <100>;
137-
pinctrl-names = "default";
138-
pinctrl-0 = <&i2c1_pins>;
139-
status = "okay";
140-
};
141-
142-
&i2c2 {
143-
clock-frequency = <100000>;
144-
i2c-sda-hold-time-ns = <300>;
145-
i2c-sda-falling-time-ns = <500>;
146-
i2c-scl-falling-time-ns = <500>;
147-
pinctrl-names = "default";
148-
pinctrl-0 = <&i2c2_pins>;
149-
status = "okay";
150-
};
151-
152-
&osc_sys {
153-
clock-frequency = <25000000>;
154-
};
155-
156-
&osc_aud {
157-
clock-frequency = <27000000>;
158-
};
159-
160-
&uart3 {
161-
pinctrl-names = "default";
162-
pinctrl-0 = <&uart3_pins>;
163-
status = "okay";
19+
&gpio {
20+
/* don't reset gpio mux for serial console on uart3 */
21+
starfive,keep-gpiomux = <13 14>;
16422
};

0 commit comments

Comments
 (0)