summaryrefslogtreecommitdiff
path: root/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
blob: 283663647a86ff137917ced8bfe79a129c86342a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// SPDX-License-Identifier: GPL-2.0 OR MIT
/*
 * Copyright (c) 2024 Yixun Lan <dlan@gentoo.org>
 */

#include <dt-bindings/gpio/gpio.h>

#define K1_PADCONF(pin, func) (((pin) << 16) | (func))

/* Map GPIO pin to each bank's <index, offset> */
#define K1_GPIO(x)	(x / 32) (x % 32)

&pinctrl {
	uart0_2_cfg: uart0-2-cfg {
		uart0-2-pins {
			pinmux = <K1_PADCONF(68, 2)>,
				 <K1_PADCONF(69, 2)>;

			bias-pull-up = <0>;
			drive-strength = <32>;
		};
	};
};