mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
ARM: soc fixes for 6.11, part 1
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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAma2O9cACgkQYKtH/8kJ Uic5lxAAm+b0+LEFjs3YRJgb0EM6WIOYLG1MDoaHO/jvX4eQuTxvaTXTMBqpZlnU q2L+rMVG5G3u8y+ltw+v5BiOS9OaUYyad0isX/vjeNKa+O4ijbQTZ0+CSGXzsnI0 VaCgpyd0FmksHTsCLYg6/acb7rHJnOuDdPLWAB45+5ul4J574HFhE06R83kma4IH nDacY4UZjMB9+o8Dpd3ZU61ifYCwWGrrGobZtVyevqpC2wFsKkRb8O7Ygp8AENzQ 3PEeEnorwTXvxnV3tLIZnDDhCXesxBZz0Jk/Z27vPTvGZ+fx+TTPtmQiH1oeR272 1oI1cHB23XVeai2rung4mt8GfhXFWd9t8Jto/wM1+vIqeWkyBw/9J2sUfKPeAWIT SwtmYksziAhdG4huWvA7ANOxOQoVWD5DoczkIoJ+wbV7x9OsByZz//y5PrAo0F6q THrlvPYM1UyMhudKmFUV6yg93HFH8oLqNt0Llet/5XsCFjB6oQY1OSEur9b5aRDl 24UgQICqvfWXkFUUnqRpYP4x06bglUZS28+33Za91oA8QVmT8W9uE4IjemIKqPN7 +FZrqnfFdflDGpFUHsnSqFqfF+62EUXvwvzuLagJT6QLp1skhiyFSIlI+22FPcJx ooa403e9moZcKKKdgUwK75BjGZPnqHlrxS39qVMnKL89e/p97sc= =jBZN -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
0f135d3e30
@ -32,9 +32,9 @@ Description: (RW) The front button on the Turris Omnia router can be
|
||||
interrupt.
|
||||
|
||||
This file switches between these two modes:
|
||||
- "mcu" makes the button press event be handled by the MCU to
|
||||
change the LEDs panel intensity.
|
||||
- "cpu" makes the button press event be handled by the CPU.
|
||||
- ``mcu`` makes the button press event be handled by the MCU to
|
||||
change the LEDs panel intensity.
|
||||
- ``cpu`` makes the button press event be handled by the CPU.
|
||||
|
||||
Format: %s.
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/gpio/machine.h>
|
||||
#include <linux/gpio/property.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/clk.h>
|
||||
@ -40,6 +41,7 @@
|
||||
#include <linux/platform_data/mmc-pxamci.h>
|
||||
#include "udc.h"
|
||||
#include "gumstix.h"
|
||||
#include "devices.h"
|
||||
|
||||
#include "generic.h"
|
||||
|
||||
@ -99,8 +101,8 @@ static void __init gumstix_mmc_init(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_PXA25X
|
||||
static const struct property_entry spitz_mci_props[] __initconst = {
|
||||
#if IS_ENABLED(CONFIG_USB_PXA25X)
|
||||
static const struct property_entry gumstix_vbus_props[] __initconst = {
|
||||
PROPERTY_ENTRY_GPIO("vbus-gpios", &pxa2xx_gpiochip_node,
|
||||
GPIO_GUMSTIX_USB_GPIOn, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("pullup-gpios", &pxa2xx_gpiochip_node,
|
||||
@ -109,8 +111,9 @@ static const struct property_entry spitz_mci_props[] __initconst = {
|
||||
};
|
||||
|
||||
static const struct platform_device_info gumstix_gpio_vbus_info __initconst = {
|
||||
.name = "gpio-vbus",
|
||||
.id = PLATFORM_DEVID_NONE,
|
||||
.name = "gpio-vbus",
|
||||
.id = PLATFORM_DEVID_NONE,
|
||||
.properties = gumstix_vbus_props,
|
||||
};
|
||||
|
||||
static void __init gumstix_udc_init(void)
|
||||
|
@ -43,15 +43,6 @@ simple-audio-card,cpu {
|
||||
sound-dai = <&mcasp0>;
|
||||
};
|
||||
};
|
||||
|
||||
reg_usb_hub: regulator-usb-hub {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
/* Verdin CTRL_SLEEP_MOCI# (SODIMM 256) */
|
||||
gpio = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
|
||||
regulator-boot-on;
|
||||
regulator-name = "HUB_PWR_EN";
|
||||
};
|
||||
};
|
||||
|
||||
/* Verdin ETHs */
|
||||
@ -193,11 +184,6 @@ &ospi0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* Do not force CTRL_SLEEP_MOCI# always enabled */
|
||||
®_force_sleep_moci {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
/* Verdin SD_1 */
|
||||
&sdhci1 {
|
||||
status = "okay";
|
||||
@ -218,15 +204,7 @@ &usbss1 {
|
||||
};
|
||||
|
||||
&usb1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
usb-hub@1 {
|
||||
compatible = "usb424,2744";
|
||||
reg = <1>;
|
||||
vdd-supply = <®_usb_hub>;
|
||||
};
|
||||
};
|
||||
|
||||
/* Verdin CTRL_WAKE1_MICO# */
|
||||
|
@ -138,12 +138,6 @@ reg_1v8_eth: regulator-1v8-eth {
|
||||
vin-supply = <®_1v8>;
|
||||
};
|
||||
|
||||
/*
|
||||
* By default we enable CTRL_SLEEP_MOCI#, this is required to have
|
||||
* peripherals on the carrier board powered.
|
||||
* If more granularity or power saving is required this can be disabled
|
||||
* in the carrier board device tree files.
|
||||
*/
|
||||
reg_force_sleep_moci: regulator-force-sleep-moci {
|
||||
compatible = "regulator-fixed";
|
||||
enable-active-high;
|
||||
|
@ -146,6 +146,8 @@ mcu_gpio0: gpio@4201000 {
|
||||
power-domains = <&k3_pds 79 TI_SCI_PD_EXCLUSIVE>;
|
||||
clocks = <&k3_clks 79 0>;
|
||||
clock-names = "gpio";
|
||||
gpio-ranges = <&mcu_pmx0 0 0 21>, <&mcu_pmx0 21 23 1>,
|
||||
<&mcu_pmx0 22 32 2>;
|
||||
};
|
||||
|
||||
mcu_rti0: watchdog@4880000 {
|
||||
|
@ -45,7 +45,8 @@ &inta_main_dmss {
|
||||
&main_pmx0 {
|
||||
pinctrl-single,gpio-range =
|
||||
<&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 33 92 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 72 22 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 137 5 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 143 3 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 149 2 PIN_GPIO_RANGE_IOPAD>;
|
||||
|
@ -193,7 +193,8 @@ &inta_main_dmss {
|
||||
&main_pmx0 {
|
||||
pinctrl-single,gpio-range =
|
||||
<&main_pmx0_range 0 32 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 33 55 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 33 38 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 72 17 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 101 25 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 137 5 PIN_GPIO_RANGE_IOPAD>,
|
||||
<&main_pmx0_range 143 3 PIN_GPIO_RANGE_IOPAD>,
|
||||
|
@ -1262,6 +1262,14 @@ &dss {
|
||||
&serdes0 {
|
||||
status = "okay";
|
||||
|
||||
serdes0_pcie1_link: phy@0 {
|
||||
reg = <0>;
|
||||
cdns,num-lanes = <2>;
|
||||
#phy-cells = <0>;
|
||||
cdns,phy-type = <PHY_TYPE_PCIE>;
|
||||
resets = <&serdes_wiz0 1>, <&serdes_wiz0 2>;
|
||||
};
|
||||
|
||||
serdes0_usb_link: phy@3 {
|
||||
reg = <3>;
|
||||
cdns,num-lanes = <1>;
|
||||
@ -1386,23 +1394,6 @@ &main_mcan4 {
|
||||
phys = <&transceiver3>;
|
||||
};
|
||||
|
||||
&serdes0 {
|
||||
status = "okay";
|
||||
|
||||
serdes0_pcie1_link: phy@0 {
|
||||
reg = <0>;
|
||||
cdns,num-lanes = <4>;
|
||||
#phy-cells = <0>;
|
||||
cdns,phy-type = <PHY_TYPE_PCIE>;
|
||||
resets = <&serdes_wiz0 1>, <&serdes_wiz0 2>,
|
||||
<&serdes_wiz0 3>, <&serdes_wiz0 4>;
|
||||
};
|
||||
};
|
||||
|
||||
&serdes_wiz0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie1_rc {
|
||||
status = "okay";
|
||||
num-lanes = <2>;
|
||||
|
@ -2755,7 +2755,7 @@ mcasp3: mcasp@2b30000 {
|
||||
interrupts = <GIC_SPI 550 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 551 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "tx", "rx";
|
||||
dmas = <&main_udmap 0xc500>, <&main_udmap 0x4500>;
|
||||
dmas = <&main_udmap 0xc403>, <&main_udmap 0x4403>;
|
||||
dma-names = "tx", "rx";
|
||||
clocks = <&k3_clks 268 0>;
|
||||
clock-names = "fck";
|
||||
@ -2773,7 +2773,7 @@ mcasp4: mcasp@2b40000 {
|
||||
interrupts = <GIC_SPI 552 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<GIC_SPI 553 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "tx", "rx";
|
||||
dmas = <&main_udmap 0xc501>, <&main_udmap 0x4501>;
|
||||
dmas = <&main_udmap 0xc404>, <&main_udmap 0x4404>;
|
||||
dma-names = "tx", "rx";
|
||||
clocks = <&k3_clks 269 0>;
|
||||
clock-names = "fck";
|
||||
|
@ -16,35 +16,65 @@ config TURRIS_OMNIA_MCU
|
||||
tristate "Turris Omnia MCU driver"
|
||||
depends on MACH_ARMADA_38X || COMPILE_TEST
|
||||
depends on I2C
|
||||
depends on OF
|
||||
depends on WATCHDOG
|
||||
depends on GPIOLIB
|
||||
depends on HW_RANDOM
|
||||
depends on RTC_CLASS
|
||||
depends on WATCHDOG_CORE
|
||||
select GPIOLIB_IRQCHIP
|
||||
help
|
||||
Say Y here to add support for the features implemented by the
|
||||
microcontroller on the CZ.NIC's Turris Omnia SOHO router.
|
||||
The features include:
|
||||
- board poweroff into true low power mode (with voltage regulators
|
||||
disabled) and the ability to configure wake up from this mode (via
|
||||
rtcwake)
|
||||
- true random number generator (if available on the MCU)
|
||||
- MCU watchdog
|
||||
- GPIO pins
|
||||
- to get front button press events (the front button can be
|
||||
configured either to generate press events to the CPU or to change
|
||||
front LEDs panel brightness)
|
||||
- to enable / disable USB port voltage regulators and to detect
|
||||
USB overcurrent
|
||||
- to detect MiniPCIe / mSATA card presence in MiniPCIe port 0
|
||||
- to configure resets of various peripherals on board revisions 32+
|
||||
- to enable / disable the VHV voltage regulator to the SOC in order
|
||||
to be able to program SOC's OTP on board revisions 32+
|
||||
- to get input from the LED output pins of the WAN ethernet PHY, LAN
|
||||
switch and MiniPCIe ports
|
||||
This option only enables the core part of the driver. Specific
|
||||
features can be enabled by subsequent config options.
|
||||
To compile this driver as a module, choose M here; the module will be
|
||||
called turris-omnia-mcu.
|
||||
|
||||
if TURRIS_OMNIA_MCU
|
||||
|
||||
config TURRIS_OMNIA_MCU_GPIO
|
||||
bool "Turris Omnia MCU GPIOs"
|
||||
default y
|
||||
depends on GPIOLIB
|
||||
depends on OF
|
||||
select GPIOLIB_IRQCHIP
|
||||
help
|
||||
Say Y here to add support for controlling MCU GPIO pins and receiving
|
||||
MCU interrupts on CZ.NIC's Turris Omnia.
|
||||
This enables you to
|
||||
- get front button press events (the front button can be configured
|
||||
either to generate press events to the CPU or to change front LEDs
|
||||
panel brightness),
|
||||
- enable / disable USB port voltage regulators and to detect USB
|
||||
overcurrent,
|
||||
- detect MiniPCIe / mSATA card presence in MiniPCIe port 0,
|
||||
- configure resets of various peripherals on board revisions 32+,
|
||||
- enable / disable the VHV voltage regulator to the SOC in order to be
|
||||
able to program SOC's OTP on board revisions 32+,
|
||||
- get input from the LED output pins of the WAN ethernet PHY, LAN
|
||||
switch and MiniPCIe ports.
|
||||
|
||||
config TURRIS_OMNIA_MCU_SYSOFF_WAKEUP
|
||||
bool "Turris Omnia MCU system off and RTC wakeup"
|
||||
default y
|
||||
depends on RTC_CLASS
|
||||
help
|
||||
Say Y here to add support for CZ.NIC's Turris Omnia board poweroff
|
||||
into true low power mode (with voltage regulators disabled) and the
|
||||
ability to configure wake up from this mode (via rtcwake).
|
||||
|
||||
config TURRIS_OMNIA_MCU_WATCHDOG
|
||||
bool "Turris Omnia MCU watchdog"
|
||||
default y
|
||||
depends on WATCHDOG
|
||||
select WATCHDOG_CORE
|
||||
help
|
||||
Say Y here to add support for watchdog provided by CZ.NIC's Turris
|
||||
Omnia MCU.
|
||||
|
||||
config TURRIS_OMNIA_MCU_TRNG
|
||||
bool "Turris Omnia MCU true random number generator"
|
||||
default y
|
||||
depends on TURRIS_OMNIA_MCU_GPIO
|
||||
depends on HW_RANDOM
|
||||
help
|
||||
Say Y here to add support for the true random number generator
|
||||
provided by CZ.NIC's Turris Omnia MCU.
|
||||
|
||||
endif # TURRIS_OMNIA_MCU
|
||||
|
||||
endif # CZNIC_PLATFORMS
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
obj-$(CONFIG_TURRIS_OMNIA_MCU) += turris-omnia-mcu.o
|
||||
turris-omnia-mcu-y := turris-omnia-mcu-base.o
|
||||
turris-omnia-mcu-y += turris-omnia-mcu-gpio.o
|
||||
turris-omnia-mcu-y += turris-omnia-mcu-sys-off-wakeup.o
|
||||
turris-omnia-mcu-y += turris-omnia-mcu-trng.o
|
||||
turris-omnia-mcu-y += turris-omnia-mcu-watchdog.o
|
||||
turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_GPIO) += turris-omnia-mcu-gpio.o
|
||||
turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_SYSOFF_WAKEUP) += turris-omnia-mcu-sys-off-wakeup.o
|
||||
turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_TRNG) += turris-omnia-mcu-trng.o
|
||||
turris-omnia-mcu-$(CONFIG_TURRIS_OMNIA_MCU_WATCHDOG) += turris-omnia-mcu-watchdog.o
|
||||
|
@ -197,8 +197,12 @@ static const struct attribute_group omnia_mcu_base_group = {
|
||||
|
||||
static const struct attribute_group *omnia_mcu_groups[] = {
|
||||
&omnia_mcu_base_group,
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_GPIO
|
||||
&omnia_mcu_gpio_group,
|
||||
#endif
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_SYSOFF_WAKEUP
|
||||
&omnia_mcu_poweroff_group,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -33,6 +33,7 @@ struct omnia_mcu {
|
||||
u8 board_first_mac[ETH_ALEN];
|
||||
u8 board_revision;
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_GPIO
|
||||
/* GPIO chip */
|
||||
struct gpio_chip gc;
|
||||
struct mutex lock;
|
||||
@ -41,18 +42,25 @@ struct omnia_mcu {
|
||||
struct delayed_work button_release_emul_work;
|
||||
unsigned long last_status;
|
||||
bool button_pressed_emul;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_SYSOFF_WAKEUP
|
||||
/* RTC device for configuring wake-up */
|
||||
struct rtc_device *rtcdev;
|
||||
u32 rtc_alarm;
|
||||
bool front_button_poweron;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_WATCHDOG
|
||||
/* MCU watchdog */
|
||||
struct watchdog_device wdt;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_TRNG
|
||||
/* true random number generator */
|
||||
struct hwrng trng;
|
||||
struct completion trng_entropy_ready;
|
||||
#endif
|
||||
};
|
||||
|
||||
int omnia_cmd_write_read(const struct i2c_client *client,
|
||||
@ -182,13 +190,43 @@ static inline int omnia_cmd_read_u8(const struct i2c_client *client, u8 cmd,
|
||||
return omnia_cmd_read(client, cmd, reply, sizeof(*reply));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_GPIO
|
||||
extern const u8 omnia_int_to_gpio_idx[32];
|
||||
extern const struct attribute_group omnia_mcu_gpio_group;
|
||||
extern const struct attribute_group omnia_mcu_poweroff_group;
|
||||
|
||||
int omnia_mcu_register_gpiochip(struct omnia_mcu *mcu);
|
||||
#else
|
||||
static inline int omnia_mcu_register_gpiochip(struct omnia_mcu *mcu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_SYSOFF_WAKEUP
|
||||
extern const struct attribute_group omnia_mcu_poweroff_group;
|
||||
int omnia_mcu_register_sys_off_and_wakeup(struct omnia_mcu *mcu);
|
||||
#else
|
||||
static inline int omnia_mcu_register_sys_off_and_wakeup(struct omnia_mcu *mcu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_TRNG
|
||||
int omnia_mcu_register_trng(struct omnia_mcu *mcu);
|
||||
#else
|
||||
static inline int omnia_mcu_register_trng(struct omnia_mcu *mcu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TURRIS_OMNIA_MCU_WATCHDOG
|
||||
int omnia_mcu_register_watchdog(struct omnia_mcu *mcu);
|
||||
#else
|
||||
static inline int omnia_mcu_register_watchdog(struct omnia_mcu *mcu)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __TURRIS_OMNIA_MCU_H */
|
||||
|
Loading…
Reference in New Issue
Block a user