Skip to content

Commit 1e8f6db

Browse files
committed
Merge tag 'soc-arm-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
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
2 parents 0afd220 + 2fd7a3f commit 1e8f6db

File tree

6 files changed

+35
-14
lines changed

6 files changed

+35
-14
lines changed

arch/arm/configs/omap2plus_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ CONFIG_POWER_RESET_GPIO=y
428428
CONFIG_BATTERY_BQ27XXX=m
429429
CONFIG_CHARGER_ISP1704=m
430430
CONFIG_CHARGER_TWL4030=m
431+
CONFIG_CHARGER_TWL6030=m
431432
CONFIG_CHARGER_BQ2415X=m
432433
CONFIG_CHARGER_BQ24190=m
433434
CONFIG_CHARGER_BQ24735=m

arch/arm/mach-at91/Kconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ config SOC_SAMA5D4
5858
help
5959
Select this if you are using one of Microchip's SAMA5D4 family SoC.
6060

61+
config SOC_SAMA7D65
62+
bool "SAMA7D65 family"
63+
depends on ARCH_MULTI_V7
64+
select HAVE_AT91_GENERATED_CLK
65+
select HAVE_AT91_SAM9X60_PLL
66+
select HAVE_AT91_USB_CLK
67+
select HAVE_AT91_UTMI
68+
select SOC_SAMA7
69+
help
70+
Select this if you are using one of Microchip's SAMA7D65 family SoC.
71+
6172
config SOC_SAMA7G5
6273
bool "SAMA7G5 family"
6374
depends on ARCH_MULTI_V7

arch/arm/mach-at91/pm.c

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,21 @@ static int at91_suspend_finish(unsigned long val)
598598
return 0;
599599
}
600600

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

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

612-
/* Already on VBAT. */
613-
if (!(val & soc_pm.sfrbu_regs.pswbu.state))
626+
/* Already on auto/hardware. */
627+
if (!(val & soc_pm.sfrbu_regs.pswbu.ctrl))
614628
return;
615629

616-
val &= ~soc_pm.sfrbu_regs.pswbu.softsw;
617-
val |= soc_pm.sfrbu_regs.pswbu.key | soc_pm.sfrbu_regs.pswbu.ctrl;
630+
val &= ~soc_pm.sfrbu_regs.pswbu.ctrl;
631+
val |= soc_pm.sfrbu_regs.pswbu.key;
618632
writel(val, soc_pm.data.sfrbu + offset);
619-
620-
/* Wait for update. */
621-
val = readl(soc_pm.data.sfrbu + offset);
622-
while (val & soc_pm.sfrbu_regs.pswbu.state)
623-
val = readl(soc_pm.data.sfrbu + offset);
624633
}
625634

626635
static void at91_pm_suspend(suspend_state_t state)
627636
{
628637
if (soc_pm.data.mode == AT91_PM_BACKUP) {
629-
at91_pm_switch_ba_to_vbat();
638+
at91_pm_switch_ba_to_auto();
630639

631640
cpu_suspend(0, at91_suspend_finish);
632641

arch/arm/mach-omap1/board-nokia770.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static struct gpiod_lookup_table nokia770_irq_gpio_table = {
289289
GPIO_LOOKUP("gpio-0-15", 15, "ads7846_irq",
290290
GPIO_ACTIVE_HIGH),
291291
/* GPIO used for retu IRQ */
292-
GPIO_LOOKUP("gpio-48-63", 15, "retu_irq",
292+
GPIO_LOOKUP("gpio-48-63", 14, "retu_irq",
293293
GPIO_ACTIVE_HIGH),
294294
/* GPIO used for tahvo IRQ */
295295
GPIO_LOOKUP("gpio-32-47", 8, "tahvo_irq",

arch/arm/mach-omap2/powerdomain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ int pwrdm_get_mem_bank_count(struct powerdomain *pwrdm)
523523
* Set the powerdomain @pwrdm's next power state to @pwrst. The powerdomain
524524
* may not enter this state immediately if the preconditions for this state
525525
* have not been satisfied. Returns -EINVAL if the powerdomain pointer is
526-
* null or if the power state is invalid for the powerdomin, or returns 0
526+
* null or if the power state is invalid for the powerdomain, or returns 0
527527
* upon success.
528528
*/
529529
int pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst)

drivers/soc/atmel/soc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static const struct of_device_id at91_soc_allowed_list[] __initconst = {
399399

400400
static int __init atmel_soc_device_init(void)
401401
{
402-
struct device_node *np = of_find_node_by_path("/");
402+
struct device_node *np __free(device_node) = of_find_node_by_path("/");
403403

404404
if (!of_match_node(at91_soc_allowed_list, np))
405405
return 0;

0 commit comments

Comments
 (0)