xref: /freebsd/sys/contrib/device-tree/src/riscv/starfive/jh7100-common.dtsi (revision 1719886f6d08408b834d270c59ffcfd821c8f63a)
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-jh7100.h>
12
13/ {
14	aliases {
15		serial0 = &uart3;
16	};
17
18	chosen {
19		stdout-path = "serial0:115200n8";
20	};
21
22	cpus {
23		timebase-frequency = <6250000>;
24	};
25
26	memory@80000000 {
27		device_type = "memory";
28		reg = <0x0 0x80000000 0x2 0x0>;
29	};
30
31	leds {
32		compatible = "gpio-leds";
33
34		led-ack {
35			gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
36			color = <LED_COLOR_ID_GREEN>;
37			function = LED_FUNCTION_HEARTBEAT;
38			linux,default-trigger = "heartbeat";
39			label = "ack";
40		};
41	};
42};
43
44&gpio {
45	i2c0_pins: i2c0-0 {
46		i2c-pins {
47			pinmux = <GPIOMUX(62, GPO_LOW,
48				  GPO_I2C0_PAD_SCK_OEN,
49				  GPI_I2C0_PAD_SCK_IN)>,
50				 <GPIOMUX(61, GPO_LOW,
51				  GPO_I2C0_PAD_SDA_OEN,
52				  GPI_I2C0_PAD_SDA_IN)>;
53			bias-disable; /* external pull-up */
54			input-enable;
55			input-schmitt-enable;
56		};
57	};
58
59	i2c1_pins: i2c1-0 {
60		i2c-pins {
61			pinmux = <GPIOMUX(47, GPO_LOW,
62				  GPO_I2C1_PAD_SCK_OEN,
63				  GPI_I2C1_PAD_SCK_IN)>,
64				 <GPIOMUX(48, GPO_LOW,
65				  GPO_I2C1_PAD_SDA_OEN,
66				  GPI_I2C1_PAD_SDA_IN)>;
67			bias-pull-up;
68			input-enable;
69			input-schmitt-enable;
70		};
71	};
72
73	i2c2_pins: i2c2-0 {
74		i2c-pins {
75			pinmux = <GPIOMUX(60, GPO_LOW,
76				  GPO_I2C2_PAD_SCK_OEN,
77				  GPI_I2C2_PAD_SCK_IN)>,
78				 <GPIOMUX(59, GPO_LOW,
79				  GPO_I2C2_PAD_SDA_OEN,
80				  GPI_I2C2_PAD_SDA_IN)>;
81			bias-disable; /* external pull-up */
82			input-enable;
83			input-schmitt-enable;
84		};
85	};
86
87	uart3_pins: uart3-0 {
88		rx-pins {
89			pinmux = <GPIOMUX(13, GPO_LOW, GPO_DISABLE,
90				  GPI_UART3_PAD_SIN)>;
91			bias-pull-up;
92			drive-strength = <14>;
93			input-enable;
94			input-schmitt-enable;
95			slew-rate = <0>;
96		};
97		tx-pins {
98			pinmux = <GPIOMUX(14, GPO_UART3_PAD_SOUT,
99				  GPO_ENABLE, GPI_NONE)>;
100			bias-disable;
101			drive-strength = <35>;
102			input-disable;
103			input-schmitt-disable;
104			slew-rate = <0>;
105		};
106	};
107};
108
109&i2c0 {
110	clock-frequency = <100000>;
111	i2c-sda-hold-time-ns = <300>;
112	i2c-sda-falling-time-ns = <500>;
113	i2c-scl-falling-time-ns = <500>;
114	pinctrl-names = "default";
115	pinctrl-0 = <&i2c0_pins>;
116	status = "okay";
117
118	pmic@5e {
119		compatible = "ti,tps65086";
120		reg = <0x5e>;
121		gpio-controller;
122		#gpio-cells = <2>;
123
124		regulators {
125		};
126	};
127};
128
129&i2c1 {
130	clock-frequency = <400000>;
131	i2c-sda-hold-time-ns = <300>;
132	i2c-sda-falling-time-ns = <100>;
133	i2c-scl-falling-time-ns = <100>;
134	pinctrl-names = "default";
135	pinctrl-0 = <&i2c1_pins>;
136	status = "okay";
137};
138
139&i2c2 {
140	clock-frequency = <100000>;
141	i2c-sda-hold-time-ns = <300>;
142	i2c-sda-falling-time-ns = <500>;
143	i2c-scl-falling-time-ns = <500>;
144	pinctrl-names = "default";
145	pinctrl-0 = <&i2c2_pins>;
146	status = "okay";
147};
148
149&osc_sys {
150	clock-frequency = <25000000>;
151};
152
153&osc_aud {
154	clock-frequency = <27000000>;
155};
156
157&uart3 {
158	pinctrl-names = "default";
159	pinctrl-0 = <&uart3_pins>;
160	status = "okay";
161};
162