mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-31 22:23:05 +00:00

This patch adds the option 1 (hence the name pwm14_1) pinctrl configuration for PWM14 on the SpacemiT K1 SoC. PWM14 option 1 is used for PWM-based backlight control on MIPI displays. This configuration is present on all existing K1 development boards, such as the Banana Pi BPI-F3 and the Milk-V Jupiter. For reference, a more complete list of PWM0-PWM19 pinctrl configurations including all options can be found in [1]. Note: Since the corresponding functionality for other pins is not yet in use or ready for upstreaming, this patch includes only the pwm14_1 setting. [1] https://lore.kernel.org/all/20250411131423.3802611-7-guodong@riscstar.com/ Signed-off-by: Guodong Xu <guodong@riscstar.com> Link: https://lore.kernel.org/r/20250429085048.1310409-5-guodong@riscstar.com Signed-off-by: Yixun Lan <dlan@gentoo.org>
32 lines
595 B
Plaintext
32 lines
595 B
Plaintext
// 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>;
|
|
};
|
|
};
|
|
|
|
pwm14_1_cfg: pwm14-1-cfg {
|
|
pwm14-1-pins {
|
|
pinmux = <K1_PADCONF(44, 4)>;
|
|
bias-pull-up = <0>;
|
|
drive-strength = <32>;
|
|
};
|
|
};
|
|
};
|