Skip to content

Commit 0f135d3

Browse files
committed
Merge tag 'arm-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC fixes from Arnd Bergmann: "There are three sets of patches for the soc tree: - Marek Behún addresses multiple build time regressions caused by changes to the cznic turris-omnia support - Dmitry Torokhov fixes a regression in the legacy "gumstix" board code he cleaned up earlier - The TI K3 maintainers found multiple bugs in the in gpio, audio and pcie devicetree nodes" * tag 'arm-fixes-6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: pxa/gumstix: fix attaching properties to vbus gpio device doc: platform: cznic: turris-omnia-mcu: Use double backticks for attribute value doc: platform: cznic: turris-omnia-mcu: Fix sphinx-build warning platform: cznic: turris-omnia-mcu: Make GPIO code optional platform: cznic: turris-omnia-mcu: Make poweroff and wakeup code optional platform: cznic: turris-omnia-mcu: Make TRNG code optional platform: cznic: turris-omnia-mcu: Make watchdog code optional arm64: dts: ti: k3-j784s4-main: Correct McASP DMAs arm64: dts: ti: k3-j722s: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-am62p: Fix gpio-range for main_pmx0 arm64: dts: ti: k3-am62p: Add gpio-ranges for mcu_gpio0 arm64: dts: ti: k3-am62-verdin-dahlia: Keep CTRL_SLEEP_MOCI# regulator on arm64: dts: ti: k3-j784s4-evm: Consolidate serdes0 references arm64: dts: ti: k3-j784s4-evm: Assign only lanes 0 and 1 to PCIe1
2 parents 146430a + 6b1124c commit 0f135d3

File tree

13 files changed

+129
-87
lines changed

13 files changed

+129
-87
lines changed

Documentation/ABI/testing/sysfs-bus-i2c-devices-turris-omnia-mcu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ Description: (RW) The front button on the Turris Omnia router can be
3232
interrupt.
3333

3434
This file switches between these two modes:
35-
- "mcu" makes the button press event be handled by the MCU to
36-
change the LEDs panel intensity.
37-
- "cpu" makes the button press event be handled by the CPU.
35+
- ``mcu`` makes the button press event be handled by the MCU to
36+
change the LEDs panel intensity.
37+
- ``cpu`` makes the button press event be handled by the CPU.
3838

3939
Format: %s.
4040

arch/arm/mach-pxa/gumstix.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/mtd/mtd.h>
2222
#include <linux/mtd/partitions.h>
2323
#include <linux/gpio/machine.h>
24+
#include <linux/gpio/property.h>
2425
#include <linux/gpio.h>
2526
#include <linux/err.h>
2627
#include <linux/clk.h>
@@ -40,6 +41,7 @@
4041
#include <linux/platform_data/mmc-pxamci.h>
4142
#include "udc.h"
4243
#include "gumstix.h"
44+
#include "devices.h"
4345

4446
#include "generic.h"
4547

@@ -99,8 +101,8 @@ static void __init gumstix_mmc_init(void)
99101
}
100102
#endif
101103

102-
#ifdef CONFIG_USB_PXA25X
103-
static const struct property_entry spitz_mci_props[] __initconst = {
104+
#if IS_ENABLED(CONFIG_USB_PXA25X)
105+
static const struct property_entry gumstix_vbus_props[] __initconst = {
104106
PROPERTY_ENTRY_GPIO("vbus-gpios", &pxa2xx_gpiochip_node,
105107
GPIO_GUMSTIX_USB_GPIOn, GPIO_ACTIVE_HIGH),
106108
PROPERTY_ENTRY_GPIO("pullup-gpios", &pxa2xx_gpiochip_node,
@@ -109,8 +111,9 @@ static const struct property_entry spitz_mci_props[] __initconst = {
109111
};
110112

111113
static const struct platform_device_info gumstix_gpio_vbus_info __initconst = {
112-
.name = "gpio-vbus",
113-
.id = PLATFORM_DEVID_NONE,
114+
.name = "gpio-vbus",
115+
.id = PLATFORM_DEVID_NONE,
116+
.properties = gumstix_vbus_props,
114117
};
115118

116119
static void __init gumstix_udc_init(void)

arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,6 @@
4343
sound-dai = <&mcasp0>;
4444
};
4545
};
46-
47-
reg_usb_hub: regulator-usb-hub {
48-
compatible = "regulator-fixed";
49-
enable-active-high;
50-
/* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */
51-
gpio = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
52-
regulator-boot-on;
53-
regulator-name = "HUB_PWR_EN";
54-
};
5546
};
5647

5748
/* Verdin ETHs */
@@ -193,11 +184,6 @@
193184
status = "okay";
194185
};
195186

196-
/* Do not force CTRL_SLEEP_MOCI# always enabled */
197-
&reg_force_sleep_moci {
198-
status = "disabled";
199-
};
200-
201187
/* Verdin SD_1 */
202188
&sdhci1 {
203189
status = "okay";
@@ -218,15 +204,7 @@
218204
};
219205

220206
&usb1 {
221-
#address-cells = <1>;
222-
#size-cells = <0>;
223207
status = "okay";
224-
225-
usb-hub@1 {
226-
compatible = "usb424,2744";
227-
reg = <1>;
228-
vdd-supply = <&reg_usb_hub>;
229-
};
230208
};
231209

232210
/* Verdin CTRL_WAKE1_MICO# */

arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,6 @@
138138
vin-supply = <&reg_1v8>;
139139
};
140140

141-
/*
142-
* By default we enable CTRL_SLEEP_MOCI#, this is required to have
143-
* peripherals on the carrier board powered.
144-
* If more granularity or power saving is required this can be disabled
145-
* in the carrier board device tree files.
146-
*/
147141
reg_force_sleep_moci: regulator-force-sleep-moci {
148142
compatible = "regulator-fixed";
149143
enable-active-high;

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-mcu.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@
146146
power-domains = <&k3_pds 79 TI_SCI_PD_EXCLUSIVE>;
147147
clocks = <&k3_clks 79 0>;
148148
clock-names = "gpio";
149+
gpio-ranges = <&mcu_pmx0 0 0 21>, <&mcu_pmx0 21 23 1>,
150+
<&mcu_pmx0 22 32 2>;
149151
};
150152

151153
mcu_rti0: watchdog@4880000 {

arch/arm64/boot/dts/ti/k3-am62p-main.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
&main_pmx0 {
4646
pinctrl-single,gpio-range =
4747
<&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
48-
<&main_pmx0_range 33 92 PIN_GPIO_RANGE_IOPAD>,
48+
<&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,
49+
<&main_pmx0_range 72 22 PIN_GPIO_RANGE_IOPAD>,
4950
<&main_pmx0_range 137 5 PIN_GPIO_RANGE_IOPAD>,
5051
<&main_pmx0_range 143 3 PIN_GPIO_RANGE_IOPAD>,
5152
<&main_pmx0_range 149 2 PIN_GPIO_RANGE_IOPAD>;

arch/arm64/boot/dts/ti/k3-j722s-main.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@
193193
&main_pmx0 {
194194
pinctrl-single,gpio-range =
195195
<&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
196-
<&main_pmx0_range 33 55 PIN_GPIO_RANGE_IOPAD>,
196+
<&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,
197+
<&main_pmx0_range 72 17 PIN_GPIO_RANGE_IOPAD>,
197198
<&main_pmx0_range 101 25 PIN_GPIO_RANGE_IOPAD>,
198199
<&main_pmx0_range 137 5 PIN_GPIO_RANGE_IOPAD>,
199200
<&main_pmx0_range 143 3 PIN_GPIO_RANGE_IOPAD>,

arch/arm64/boot/dts/ti/k3-j784s4-evm.dts

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,14 @@
12621262
&serdes0 {
12631263
status = "okay";
12641264

1265+
serdes0_pcie1_link: phy@0 {
1266+
reg = <0>;
1267+
cdns,num-lanes = <2>;
1268+
#phy-cells = <0>;
1269+
cdns,phy-type = <PHY_TYPE_PCIE>;
1270+
resets = <&serdes_wiz0 1>, <&serdes_wiz0 2>;
1271+
};
1272+
12651273
serdes0_usb_link: phy@3 {
12661274
reg = <3>;
12671275
cdns,num-lanes = <1>;
@@ -1386,23 +1394,6 @@
13861394
phys = <&transceiver3>;
13871395
};
13881396

1389-
&serdes0 {
1390-
status = "okay";
1391-
1392-
serdes0_pcie1_link: phy@0 {
1393-
reg = <0>;
1394-
cdns,num-lanes = <4>;
1395-
#phy-cells = <0>;
1396-
cdns,phy-type = <PHY_TYPE_PCIE>;
1397-
resets = <&serdes_wiz0 1>, <&serdes_wiz0 2>,
1398-
<&serdes_wiz0 3>, <&serdes_wiz0 4>;
1399-
};
1400-
};
1401-
1402-
&serdes_wiz0 {
1403-
status = "okay";
1404-
};
1405-
14061397
&pcie1_rc {
14071398
status = "okay";
14081399
num-lanes = <2>;

arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2755,7 +2755,7 @@
27552755
interrupts = <GIC_SPI 550 IRQ_TYPE_LEVEL_HIGH>,
27562756
<GIC_SPI 551 IRQ_TYPE_LEVEL_HIGH>;
27572757
interrupt-names = "tx", "rx";
2758-
dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
2758+
dmas = <&main_udmap 0xc403>, <&main_udmap 0x4403>;
27592759
dma-names = "tx", "rx";
27602760
clocks = <&k3_clks 268 0>;
27612761
clock-names = "fck";
@@ -2773,7 +2773,7 @@
27732773
interrupts = <GIC_SPI 552 IRQ_TYPE_LEVEL_HIGH>,
27742774
<GIC_SPI 553 IRQ_TYPE_LEVEL_HIGH>;
27752775
interrupt-names = "tx", "rx";
2776-
dmas = <&main_udmap 0xc501>, <&main_udmap 0x4501>;
2776+
dmas = <&main_udmap 0xc404>, <&main_udmap 0x4404>;
27772777
dma-names = "tx", "rx";
27782778
clocks = <&k3_clks 269 0>;
27792779
clock-names = "fck";

drivers/platform/cznic/Kconfig

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,65 @@ config TURRIS_OMNIA_MCU
1616
tristate "Turris Omnia MCU driver"
1717
depends on MACH_ARMADA_38X || COMPILE_TEST
1818
depends on I2C
19-
depends on OF
20-
depends on WATCHDOG
21-
depends on GPIOLIB
22-
depends on HW_RANDOM
23-
depends on RTC_CLASS
24-
depends on WATCHDOG_CORE
25-
select GPIOLIB_IRQCHIP
2619
help
2720
Say Y here to add support for the features implemented by the
2821
microcontroller on the CZ.NIC's Turris Omnia SOHO router.
29-
The features include:
30-
- board poweroff into true low power mode (with voltage regulators
31-
disabled) and the ability to configure wake up from this mode (via
32-
rtcwake)
33-
- true random number generator (if available on the MCU)
34-
- MCU watchdog
35-
- GPIO pins
36-
- to get front button press events (the front button can be
37-
configured either to generate press events to the CPU or to change
38-
front LEDs panel brightness)
39-
- to enable / disable USB port voltage regulators and to detect
40-
USB overcurrent
41-
- to detect MiniPCIe / mSATA card presence in MiniPCIe port 0
42-
- to configure resets of various peripherals on board revisions 32+
43-
- to enable / disable the VHV voltage regulator to the SOC in order
44-
to be able to program SOC's OTP on board revisions 32+
45-
- to get input from the LED output pins of the WAN ethernet PHY, LAN
46-
switch and MiniPCIe ports
22+
This option only enables the core part of the driver. Specific
23+
features can be enabled by subsequent config options.
4724
To compile this driver as a module, choose M here; the module will be
4825
called turris-omnia-mcu.
4926

27+
if TURRIS_OMNIA_MCU
28+
29+
config TURRIS_OMNIA_MCU_GPIO
30+
bool "Turris Omnia MCU GPIOs"
31+
default y
32+
depends on GPIOLIB
33+
depends on OF
34+
select GPIOLIB_IRQCHIP
35+
help
36+
Say Y here to add support for controlling MCU GPIO pins and receiving
37+
MCU interrupts on CZ.NIC's Turris Omnia.
38+
This enables you to
39+
- get front button press events (the front button can be configured
40+
either to generate press events to the CPU or to change front LEDs
41+
panel brightness),
42+
- enable / disable USB port voltage regulators and to detect USB
43+
overcurrent,
44+
- detect MiniPCIe / mSATA card presence in MiniPCIe port 0,
45+
- configure resets of various peripherals on board revisions 32+,
46+
- enable / disable the VHV voltage regulator to the SOC in order to be
47+
able to program SOC's OTP on board revisions 32+,
48+
- get input from the LED output pins of the WAN ethernet PHY, LAN
49+
switch and MiniPCIe ports.
50+
51+
config TURRIS_OMNIA_MCU_SYSOFF_WAKEUP
52+
bool "Turris Omnia MCU system off and RTC wakeup"
53+
default y
54+
depends on RTC_CLASS
55+
help
56+
Say Y here to add support for CZ.NIC's Turris Omnia board poweroff
57+
into true low power mode (with voltage regulators disabled) and the
58+
ability to configure wake up from this mode (via rtcwake).
59+
60+
config TURRIS_OMNIA_MCU_WATCHDOG
61+
bool "Turris Omnia MCU watchdog"
62+
default y
63+
depends on WATCHDOG
64+
select WATCHDOG_CORE
65+
help
66+
Say Y here to add support for watchdog provided by CZ.NIC's Turris
67+
Omnia MCU.
68+
69+
config TURRIS_OMNIA_MCU_TRNG
70+
bool "Turris Omnia MCU true random number generator"
71+
default y
72+
depends on TURRIS_OMNIA_MCU_GPIO
73+
depends on HW_RANDOM
74+
help
75+
Say Y here to add support for the true random number generator
76+
provided by CZ.NIC's Turris Omnia MCU.
77+
78+
endif # TURRIS_OMNIA_MCU
79+
5080
endif # CZNIC_PLATFORMS

0 commit comments

Comments
 (0)