1// SPDX-License-Identifier: GPL-2.0 OR MIT
2/*
3 * Copyright (C) 2021 StarFive Technology Co., Ltd.
4 * Copyright (C) 2021 Emil Renner Berthing <kernel@esmil.dk>
5 */
6
7/dts-v1/;
8#include "jh7100.dtsi"
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/leds/common.h>
11#include <dt-bindings/pinctrl/pinctrl-starfive.h>
12
13/ {
14	model = "BeagleV Starlight Beta";
15	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	};
45};
46
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	};
110};
111
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";
164};
165