-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: arm: sam: Add pinctrl info for gpio-keys
Add pinctrl configuration to enable wake-up sources for gpio-keys driver. After this the special function for some wake-up source will be enabled by default and can wake-up device from a power-off state. In addition it reorder pinctrl definitions to be ascendent. Signed-off-by: Gerson Fernando Budke <[email protected]>
- Loading branch information
Showing
8 changed files
with
102 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,33 @@ | ||
/* | ||
* Copyright (c) 2022, Gerson Fernando Budke <[email protected]> | ||
* Copyright (c) 2022-2023, Gerson Fernando Budke <[email protected]> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <dt-bindings/pinctrl/sam4sXc-pinctrl.h> | ||
|
||
&pinctrl { | ||
spi0_default: spi0_default { | ||
adc0_default: adc0_default { | ||
group1 { | ||
pinmux = <PA12A_SPI_MISO>, | ||
<PA13A_SPI_MOSI>, | ||
<PA14A_SPI_SPCK>, | ||
<PA31A_SPI_NPCS1>, | ||
<PA30B_SPI_NPCS2>; | ||
pinmux = <PB0X_ADC_AD4>, | ||
<PB1X_ADC_AD5>; | ||
}; | ||
}; | ||
|
||
twi0_default: twi0_default { | ||
gpio_keys_default: gpio_keys_default { | ||
group1 { | ||
pinmux = <PA4A_TWI0_TWCK>, | ||
<PA3A_TWI0_TWD>; | ||
pinmux = <PA5X_SUPC_WKUP4>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
|
||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <PA9A_UART0_RXD>, | ||
<PA10A_UART0_TXD>; | ||
}; | ||
}; | ||
uart1_default: uart1_default { | ||
group1 { | ||
pinmux = <PB2A_UART1_RXD>, | ||
<PB3A_UART1_TXD>; | ||
}; | ||
}; | ||
usart1_default: usart1_default { | ||
group1 { | ||
pinmux = <PA21A_USART1_RXD>, | ||
<PA22A_USART1_TXD>; | ||
}; | ||
}; | ||
pwm0_default: pwm0_default { | ||
group1 { | ||
pinmux = <PA12B_PWM_PWMH1>, | ||
<PA13B_PWM_PWMH2>, | ||
<PA14B_PWM_PWMH3>; | ||
}; | ||
}; | ||
adc0_default: adc0_default { | ||
group1 { | ||
pinmux = <PB0X_ADC_AD4>, | ||
<PB1X_ADC_AD5>; | ||
}; | ||
}; | ||
|
||
smc_default: smc_default { | ||
group1 { | ||
pinmux = <PC18A_EBI_A0>, | ||
|
@@ -89,4 +63,40 @@ | |
<PC8A_EBI_NWE>; | ||
}; | ||
}; | ||
|
||
spi0_default: spi0_default { | ||
group1 { | ||
pinmux = <PA12A_SPI_MISO>, | ||
<PA13A_SPI_MOSI>, | ||
<PA14A_SPI_SPCK>, | ||
<PA31A_SPI_NPCS1>, | ||
<PA30B_SPI_NPCS2>; | ||
}; | ||
}; | ||
|
||
twi0_default: twi0_default { | ||
group1 { | ||
pinmux = <PA4A_TWI0_TWCK>, | ||
<PA3A_TWI0_TWD>; | ||
}; | ||
}; | ||
|
||
uart0_default: uart0_default { | ||
group1 { | ||
pinmux = <PA9A_UART0_RXD>, | ||
<PA10A_UART0_TXD>; | ||
}; | ||
}; | ||
uart1_default: uart1_default { | ||
group1 { | ||
pinmux = <PB2A_UART1_RXD>, | ||
<PB3A_UART1_TXD>; | ||
}; | ||
}; | ||
usart1_default: usart1_default { | ||
group1 { | ||
pinmux = <PA21A_USART1_RXD>, | ||
<PA22A_USART1_TXD>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Copyright (c) 2017 Piotr Mienkowski | ||
* Copyright (c) 2017 Justin Watson | ||
* Copyright (c) 2020 Stephanos Ioannidis <[email protected]> | ||
* Copyright (c) 2020 Gerson Fernando Budke <[email protected]> | ||
* Copyright (c) 2020-2023 Gerson Fernando Budke <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
@@ -39,6 +39,9 @@ | |
gpio_keys { | ||
compatible = "gpio-keys"; | ||
|
||
pinctrl-0 = <&gpio_keys_default>; | ||
pinctrl-names = "default"; | ||
|
||
/* The switch is labeled SW300 in the schematic, and labeled | ||
* SW0 on the board, and labeld SW1 User Button on docs | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (c) 2022, Gerson Fernando Budke <[email protected]> | ||
* Copyright (c) 2022-2023, Gerson Fernando Budke <[email protected]> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
|
@@ -13,7 +13,6 @@ | |
<PA17X_AFE0_AD6>; | ||
}; | ||
}; | ||
|
||
afec1_default: afec1_default { /* ADCH - J504 */ | ||
group1 { | ||
pinmux = <PC31X_AFE1_AD6>; | ||
|
@@ -40,6 +39,13 @@ | |
}; | ||
}; | ||
|
||
gpio_keys_default: gpio_keys_default { | ||
group1 { | ||
pinmux = <PA11X_SUPC_WKUP7>; | ||
bias-pull-up; | ||
}; | ||
}; | ||
|
||
mdio_default: mdio_default { | ||
group1 { | ||
pinmux = <PD8A_GMAC_GMDC>, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Copyright (c) 2017 Piotr Mienkowski | ||
* Copyright (c) 2017 Justin Watson | ||
* Copyright (c) 2020 Stephanos Ioannidis <[email protected]> | ||
* Copyright (c) 2019-2022 Gerson Fernando Budke <[email protected]> | ||
* Copyright (c) 2019-2023 Gerson Fernando Budke <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
@@ -54,6 +54,9 @@ | |
gpio_keys { | ||
compatible = "gpio-keys"; | ||
|
||
pinctrl-0 = <&gpio_keys_default>; | ||
pinctrl-names = "default"; | ||
|
||
/* The switch is labeled SW300/301 in the schematic, and | ||
* labeled SW0 on the board, and labeled ERASE User Button | ||
* on docs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters