mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 15:14:52 +00:00

It appears that pinctrl-single is misused on this SoC to control both
the mux and the input and output and bias settings. This results in
non-working pinctrl configurations for GPIOs within the device tree.
This is what happens:
(1) During startup the pinctrl settings are applied according to the
device tree. I.e. the pin is configured as output and with
pull-ups enabled.
(2) During startup a device driver requests a GPIO.
(3) pinctrl-single is applying the default GPIO setting according to
the pinctrl-single,gpio-range property.
This would work as expected if the pinctrl-single is only controlling
the function mux, but it also controls the input/output buffer enable,
the pull-up and pull-down settings etc (pinctrl-single,function-mask
covers the entire pad setting instead of just the mux field).
Remove the pinctrl-single,gpio-range property, so that no settings are
applied during a gpio_request() call.
Fixes: d72d73a44c
("arm64: dts: ti: k3-am62p: Add gpio-ranges properties")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Link: https://lore.kernel.org/r/20250221091447.595199-1-mwalle@kernel.org
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
77 lines
1.9 KiB
Plaintext
77 lines
1.9 KiB
Plaintext
// SPDX-License-Identifier: GPL-2.0-only OR MIT
|
|
/*
|
|
* Device Tree file for the AM62P MAIN domain peripherals
|
|
*
|
|
* Copyright (C) 2023-2024 Texas Instruments Incorporated - https://www.ti.com/
|
|
*/
|
|
|
|
&cbass_main {
|
|
usbss1: usb@f910000 {
|
|
compatible = "ti,am62-usb";
|
|
reg = <0x00 0x0f910000 0x00 0x800>,
|
|
<0x00 0x0f918000 0x00 0x400>;
|
|
clocks = <&k3_clks 162 3>;
|
|
clock-names = "ref";
|
|
ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>;
|
|
#address-cells = <2>;
|
|
#size-cells = <2>;
|
|
power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>;
|
|
ranges;
|
|
status = "disabled";
|
|
|
|
usb1: usb@31100000 {
|
|
compatible = "snps,dwc3";
|
|
reg = <0x00 0x31100000 0x00 0x50000>;
|
|
interrupts = <GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>, /* irq.0 */
|
|
<GIC_SPI 226 IRQ_TYPE_LEVEL_HIGH>; /* irq.0 */
|
|
interrupt-names = "host", "peripheral";
|
|
maximum-speed = "high-speed";
|
|
dr_mode = "otg";
|
|
snps,usb2-gadget-lpm-disable;
|
|
snps,usb2-lpm-disable;
|
|
};
|
|
};
|
|
};
|
|
|
|
&oc_sram {
|
|
reg = <0x00 0x70000000 0x00 0x10000>;
|
|
ranges = <0x00 0x00 0x70000000 0x10000>;
|
|
};
|
|
|
|
&inta_main_dmss {
|
|
ti,interrupt-ranges = <5 69 35>;
|
|
};
|
|
|
|
&main_conf {
|
|
audio_refclk0: clock-controller@82e0 {
|
|
compatible = "ti,am62-audio-refclk";
|
|
reg = <0x82e0 0x4>;
|
|
clocks = <&k3_clks 157 0>;
|
|
assigned-clocks = <&k3_clks 157 0>;
|
|
assigned-clock-parents = <&k3_clks 157 16>;
|
|
#clock-cells = <0>;
|
|
};
|
|
|
|
audio_refclk1: clock-controller@82e4 {
|
|
compatible = "ti,am62-audio-refclk";
|
|
reg = <0x82e4 0x4>;
|
|
clocks = <&k3_clks 157 18>;
|
|
assigned-clocks = <&k3_clks 157 18>;
|
|
assigned-clock-parents = <&k3_clks 157 34>;
|
|
#clock-cells = <0>;
|
|
};
|
|
};
|
|
|
|
&main_gpio0 {
|
|
gpio-ranges = <&main_pmx0 0 0 32>, <&main_pmx0 32 33 38>,
|
|
<&main_pmx0 70 72 22>;
|
|
ti,ngpio = <92>;
|
|
};
|
|
|
|
&main_gpio1 {
|
|
gpio-ranges = <&main_pmx0 0 94 32>, <&main_pmx0 42 137 5>,
|
|
<&main_pmx0 47 143 3>, <&main_pmx0 50 149 2>;
|
|
gpio-reserved-ranges = <32 10>;
|
|
ti,ngpio = <52>;
|
|
};
|