Unverified Commit a393bda1 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'reset-for-v6.20' of https://git.pengutronix.de/git/pza/linux into soc/drivers

Reset controller updates for v6.20

* Add a compatible to the reset-gpio driver, suppress the sysfs bind
  attributes, and propagate GPIO API errors.
* Add support for the i.MX8ULP SIM LPAV reset controller.
* Add RZ/G3S USBPHY suspend/resume support.
* Enable reset-k230 by default on ARCH_CANAAN
* Add support for the SpacemiT K3 SoC reset controller.
* Merge the 'spacemit-clkrst-v6.20-3' tag, shared with the clk tree,
  as a dependency for the SpacemiT changes.

* tag 'reset-for-v6.20' of https://git.pengutronix.de/git/pza/linux

:
  reset: spacemit: Add SpacemiT K3 reset driver
  reset: spacemit: Extract common K1 reset code
  reset: Create subdirectory for SpacemiT drivers
  dt-bindings: soc: spacemit: Add K3 reset support and IDs
  reset: canaan: k230: drop OF dependency and enable by default
  reset: rzg2l-usbphy-ctrl: Add suspend/resume support
  reset: rzg2l-usbphy-ctrl: Propagate the return value of regmap_field_update_bits()
  reset: gpio: check the return value of gpiod_set_value_cansleep()
  reset: imx8mp-audiomix: Support i.MX8ULP SIM LPAV
  reset: imx8mp-audiomix: Extend the driver usage
  reset: imx8mp-audiomix: Switch to using regmap API
  reset: imx8mp-audiomix: Drop unneeded macros
  reset: gpio: suppress bind attributes in sysfs
  clk: spacemit: k3: extract common header
  reset: spacemit: fix auxiliary device id
  clk: spacemit: prepare common ccu header
  reset: gpio: add the "compatible" property

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents 5b303a02 938ce3b1
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ maintainers:
  - Haylen Chu <heylenay@4d2.org>

description:
  System controllers found on SpacemiT K1 SoC, which are capable of
  System controllers found on SpacemiT K1/K3 SoC, which are capable of
  clock, reset and power-management functions.

properties:
@@ -46,6 +46,12 @@ properties:

  "#reset-cells":
    const: 1
    description: |
      ID of the reset controller line. Valid IDs are defined in corresponding
      files:

      For SpacemiT K1, see include/dt-bindings/clock/spacemit,k1-syscon.h
      For SpacemiT K3, see include/dt-bindings/reset/spacemit,k3-resets.h

required:
  - compatible
+3 −11
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ config RESET_K210
config RESET_K230
	tristate "Reset controller driver for Canaan Kendryte K230 SoC"
	depends on ARCH_CANAAN || COMPILE_TEST
	depends on OF
	default ARCH_CANAAN
	help
	  Support for the Canaan Kendryte K230 RISC-V SoC reset controller.
	  Say Y if you want to control reset signals provided by this
@@ -299,15 +299,6 @@ config RESET_SOCFPGA
	  This enables the reset driver for the SoCFPGA ARMv7 platforms. This
	  driver gets initialized early during platform init calls.

config RESET_SPACEMIT
	tristate "SpacemiT reset driver"
	depends on ARCH_SPACEMIT || COMPILE_TEST
	select AUXILIARY_BUS
	default ARCH_SPACEMIT
	help
	  This enables the reset controller driver for SpacemiT SoCs,
	  including the K1.

config RESET_SUNPLUS
	bool "Sunplus SoCs Reset Driver" if COMPILE_TEST
	default ARCH_SUNPLUS
@@ -406,9 +397,10 @@ config RESET_ZYNQMP
	  This enables the reset controller driver for Xilinx ZynqMP SoCs.

source "drivers/reset/amlogic/Kconfig"
source "drivers/reset/hisilicon/Kconfig"
source "drivers/reset/spacemit/Kconfig"
source "drivers/reset/starfive/Kconfig"
source "drivers/reset/sti/Kconfig"
source "drivers/reset/hisilicon/Kconfig"
source "drivers/reset/tegra/Kconfig"

endif
+1 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
obj-y += core.o
obj-y += amlogic/
obj-y += hisilicon/
obj-y += spacemit/
obj-y += starfive/
obj-y += sti/
obj-y += tegra/
@@ -38,7 +39,6 @@ obj-$(CONFIG_RESET_RZV2H_USB2PHY) += reset-rzv2h-usb2phy.o
obj-$(CONFIG_RESET_SCMI) += reset-scmi.o
obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o
obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o
obj-$(CONFIG_RESET_SPACEMIT) += reset-spacemit.o
obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o
obj-$(CONFIG_RESET_SUNXI) += reset-sunxi.o
obj-$(CONFIG_RESET_TH1520) += reset-th1520.o
+4 −3
Original line number Diff line number Diff line
@@ -868,11 +868,11 @@ static int reset_add_gpio_aux_device(struct device *parent,
 */
static int __reset_add_reset_gpio_device(const struct of_phandle_args *args)
{
	struct property_entry properties[2] = { };
	struct property_entry properties[3] = { };
	unsigned int offset, of_flags, lflags;
	struct reset_gpio_lookup *rgpio_dev;
	struct device *parent;
	int id, ret;
	int id, ret, prop = 0;

	/*
	 * Currently only #gpio-cells=2 is supported with the meaning of:
@@ -923,7 +923,8 @@ static int __reset_add_reset_gpio_device(const struct of_phandle_args *args)

	lflags = GPIO_PERSISTENT | (of_flags & GPIO_ACTIVE_LOW);
	parent = gpio_device_to_device(gdev);
	properties[0] = PROPERTY_ENTRY_GPIO("reset-gpios", parent->fwnode, offset, lflags);
	properties[prop++] = PROPERTY_ENTRY_STRING("compatible", "reset-gpio");
	properties[prop++] = PROPERTY_ENTRY_GPIO("reset-gpios", parent->fwnode, offset, lflags);

	id = ida_alloc(&reset_gpio_ida, GFP_KERNEL);
	if (id < 0)
+3 −6
Original line number Diff line number Diff line
@@ -22,9 +22,7 @@ static int reset_gpio_assert(struct reset_controller_dev *rc, unsigned long id)
{
	struct reset_gpio_priv *priv = rc_to_reset_gpio(rc);

	gpiod_set_value_cansleep(priv->reset, 1);

	return 0;
	return gpiod_set_value_cansleep(priv->reset, 1);
}

static int reset_gpio_deassert(struct reset_controller_dev *rc,
@@ -32,9 +30,7 @@ static int reset_gpio_deassert(struct reset_controller_dev *rc,
{
	struct reset_gpio_priv *priv = rc_to_reset_gpio(rc);

	gpiod_set_value_cansleep(priv->reset, 0);

	return 0;
	return gpiod_set_value_cansleep(priv->reset, 0);
}

static int reset_gpio_status(struct reset_controller_dev *rc, unsigned long id)
@@ -111,6 +107,7 @@ static struct auxiliary_driver reset_gpio_driver = {
	.id_table	= reset_gpio_ids,
	.driver	= {
		.name = "reset-gpio",
		.suppress_bind_attrs = true,
	},
};
module_auxiliary_driver(reset_gpio_driver);
Loading