Commit 1e8f6db9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull SoC arm platform code updates from Arnd Bergmann:
 "The updates here add code for the Microchip SAMA7D65 SoC, as well as
  minor bugfixes for OMAP"

* tag 'soc-arm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  ARM: omap1: Fix up the Retu IRQ on Nokia 770
  ARM: omap2plus_defconfig: enable charger of TWL603X
  ARM: at91: add new SoC sama7d65
  ARM: at91: pm: change BU Power Switch to automatic mode
  soc: atmel: fix device_node release in atmel_soc_device_init()
  ARM: OMAP2+: Fix a typo
parents 0afd2209 2fd7a3f2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -428,6 +428,7 @@ CONFIG_POWER_RESET_GPIO=y
CONFIG_BATTERY_BQ27XXX=m
CONFIG_CHARGER_ISP1704=m
CONFIG_CHARGER_TWL4030=m
CONFIG_CHARGER_TWL6030=m
CONFIG_CHARGER_BQ2415X=m
CONFIG_CHARGER_BQ24190=m
CONFIG_CHARGER_BQ24735=m
+11 −0
Original line number Diff line number Diff line
@@ -58,6 +58,17 @@ config SOC_SAMA5D4
	help
	  Select this if you are using one of Microchip's SAMA5D4 family SoC.

config SOC_SAMA7D65
	bool "SAMA7D65 family"
	depends on ARCH_MULTI_V7
	select HAVE_AT91_GENERATED_CLK
	select HAVE_AT91_SAM9X60_PLL
	select HAVE_AT91_USB_CLK
	select HAVE_AT91_UTMI
	select SOC_SAMA7
	help
	  Select this if you are using one of Microchip's SAMA7D65 family SoC.

config SOC_SAMA7G5
	bool "SAMA7G5 family"
	depends on ARCH_MULTI_V7
+20 −11
Original line number Diff line number Diff line
@@ -598,7 +598,21 @@ static int at91_suspend_finish(unsigned long val)
	return 0;
}

static void at91_pm_switch_ba_to_vbat(void)
/**
 * at91_pm_switch_ba_to_auto() - Configure Backup Unit Power Switch
 * to automatic/hardware mode.
 *
 * The Backup Unit Power Switch can be managed either by software or hardware.
 * Enabling hardware mode allows the automatic transition of power between
 * VDDANA (or VDDIN33) and VDDBU (or VBAT, respectively), based on the
 * availability of these power sources.
 *
 * If the Backup Unit Power Switch is already in automatic mode, no action is
 * required. If it is in software-controlled mode, it is switched to automatic
 * mode to enhance safety and eliminate the need for toggling between power
 * sources.
 */
static void at91_pm_switch_ba_to_auto(void)
{
	unsigned int offset = offsetof(struct at91_pm_sfrbu_regs, pswbu);
	unsigned int val;
@@ -609,24 +623,19 @@ static void at91_pm_switch_ba_to_vbat(void)

	val = readl(soc_pm.data.sfrbu + offset);

	/* Already on VBAT. */
	if (!(val & soc_pm.sfrbu_regs.pswbu.state))
	/* Already on auto/hardware. */
	if (!(val & soc_pm.sfrbu_regs.pswbu.ctrl))
		return;

	val &= ~soc_pm.sfrbu_regs.pswbu.softsw;
	val |= soc_pm.sfrbu_regs.pswbu.key | soc_pm.sfrbu_regs.pswbu.ctrl;
	val &= ~soc_pm.sfrbu_regs.pswbu.ctrl;
	val |= soc_pm.sfrbu_regs.pswbu.key;
	writel(val, soc_pm.data.sfrbu + offset);

	/* Wait for update. */
	val = readl(soc_pm.data.sfrbu + offset);
	while (val & soc_pm.sfrbu_regs.pswbu.state)
		val = readl(soc_pm.data.sfrbu + offset);
}

static void at91_pm_suspend(suspend_state_t state)
{
	if (soc_pm.data.mode == AT91_PM_BACKUP) {
		at91_pm_switch_ba_to_vbat();
		at91_pm_switch_ba_to_auto();

		cpu_suspend(0, at91_suspend_finish);

+1 −1
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ static struct gpiod_lookup_table nokia770_irq_gpio_table = {
		GPIO_LOOKUP("gpio-0-15", 15, "ads7846_irq",
			    GPIO_ACTIVE_HIGH),
		/* GPIO used for retu IRQ */
		GPIO_LOOKUP("gpio-48-63", 15, "retu_irq",
		GPIO_LOOKUP("gpio-48-63", 14, "retu_irq",
			    GPIO_ACTIVE_HIGH),
		/* GPIO used for tahvo IRQ */
		GPIO_LOOKUP("gpio-32-47", 8, "tahvo_irq",
+1 −1
Original line number Diff line number Diff line
@@ -523,7 +523,7 @@ int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm)
 * Set the powerdomain @pwrdm's next power state to @pwrst.  The powerdomain
 * may not enter this state immediately if the preconditions for this state
 * have not been satisfied.  Returns -EINVAL if the powerdomain pointer is
 * null or if the power state is invalid for the powerdomin, or returns 0
 * null or if the power state is invalid for the powerdomain, or returns 0
 * upon success.
 */
int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)
Loading