From 474130944d6309f3a3651de48b56a3d92cb68149 Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 13 May 2022 18:13:39 +0300 Subject: ARM: dts: sam9x60: fix compatible for qspi child node Change the compatible of the qspi child node to `jedec,spi-nor` so that it can be properly found when probing the bus. Signed-off-by: Sergiu Moga Reviewed-by: Tudor Ambarus --- arch/arm/dts/sam9x60ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/sam9x60ek.dts b/arch/arm/dts/sam9x60ek.dts index 32ffe93..4258e8e 100644 --- a/arch/arm/dts/sam9x60ek.dts +++ b/arch/arm/dts/sam9x60ek.dts @@ -49,7 +49,7 @@ status = "okay"; nor_flash: sst26vf064@0 { - compatible = "spi-flash"; + compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <80000000>; spi-rx-bus-width = <4>; -- cgit v1.1 From 76873c6f6df1c81fca107bad7bf75990ad64586c Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 13 May 2022 18:13:40 +0300 Subject: configs: at91: sam9x60ek: enable QSPI and SF command Add the configurations required for enabling QSPI and the SF command to allow changes to be made dynamically to serial flash devices from the command line interface. Signed-off-by: Sergiu Moga Reviewed-by: Tudor Ambarus --- configs/sam9x60ek_mmc_defconfig | 13 +++++++++++++ configs/sam9x60ek_nandflash_defconfig | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/configs/sam9x60ek_mmc_defconfig b/configs/sam9x60ek_mmc_defconfig index 9c9166c..718db00 100644 --- a/configs/sam9x60ek_mmc_defconfig +++ b/configs/sam9x60ek_mmc_defconfig @@ -37,6 +37,7 @@ CONFIG_CMD_DM=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y +CONFIG_CMD_SF_TEST=y CONFIG_CMD_NAND=y CONFIG_CMD_NAND_TRIMFFS=y # CONFIG_CMD_SETEXPR is not set @@ -67,6 +68,8 @@ CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ATMEL=y CONFIG_MTD=y CONFIG_MTD_RAW_NAND=y +CONFIG_SF_DEFAULT_MODE=0x0 +CONFIG_SF_DEFAULT_SPEED=50000000 CONFIG_NAND_ATMEL=y CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_PMECC_CAP=8 @@ -88,3 +91,13 @@ CONFIG_W1_GPIO=y CONFIG_W1_EEPROM=y CONFIG_W1_EEPROM_DS24XXX=y CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_SPI_FLASH=y +CONFIG_DM_SPI_FLASH=y +CONFIG_ATMEL_QSPI=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y +CONFIG_SPI_FLASH_MTD=y diff --git a/configs/sam9x60ek_nandflash_defconfig b/configs/sam9x60ek_nandflash_defconfig index f07725d..00ce9df 100644 --- a/configs/sam9x60ek_nandflash_defconfig +++ b/configs/sam9x60ek_nandflash_defconfig @@ -37,6 +37,7 @@ CONFIG_CMD_DM=y # CONFIG_CMD_FLASH is not set CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y +CONFIG_CMD_SF_TEST=y CONFIG_CMD_MMC=y CONFIG_CMD_NAND=y CONFIG_CMD_NAND_TRIMFFS=y @@ -73,6 +74,15 @@ CONFIG_ATMEL_NAND_HW_PMECC=y CONFIG_PMECC_CAP=8 CONFIG_SYS_NAND_ONFI_DETECTION=y CONFIG_PHY_MICREL=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SF_DEFAULT_BUS=0 +CONFIG_SF_DEFAULT_SPEED=50000000 +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_ATMEL=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y CONFIG_DM_ETH=y CONFIG_MACB=y CONFIG_PINCTRL=y @@ -82,6 +92,9 @@ CONFIG_DEBUG_UART_ANNOUNCE=y CONFIG_ATMEL_USART=y CONFIG_SYSRESET=y CONFIG_SYSRESET_AT91=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y CONFIG_ATMEL_PIT_TIMER=y CONFIG_W1=y -- cgit v1.1 From 92099e69a2943dc24675041222cfd8d6a43db44f Mon Sep 17 00:00:00 2001 From: Sergiu Moga Date: Fri, 13 May 2022 18:13:41 +0300 Subject: configs: at91: sama5d2_icp: enable QSPI and SF command Add the configurations required for enabling QSPI and the SF command to allow changes to be made dynamically to serial flash devices from the command line interface. Signed-off-by: Sergiu Moga Reviewed-by: Tudor Ambarus --- configs/sama5d2_icp_mmc_defconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configs/sama5d2_icp_mmc_defconfig b/configs/sama5d2_icp_mmc_defconfig index 688fa00..57b76c3 100644 --- a/configs/sama5d2_icp_mmc_defconfig +++ b/configs/sama5d2_icp_mmc_defconfig @@ -55,6 +55,7 @@ CONFIG_CMD_DM=y CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y # CONFIG_CMD_LOADS is not set +CONFIG_CMD_SF_TEST=y CONFIG_CMD_MMC=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y @@ -83,6 +84,15 @@ CONFIG_SYS_I2C_AT91=y CONFIG_I2C_EEPROM=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_ATMEL=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SF_DEFAULT_BUS=2 +CONFIG_SF_DEFAULT_SPEED=66000000 +CONFIG_SPI_FLASH_SFDP_SUPPORT=y +CONFIG_SPI_FLASH_ATMEL=y +CONFIG_SPI_FLASH_MACRONIX=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y CONFIG_DM_ETH=y CONFIG_MACB=y CONFIG_PINCTRL=y @@ -94,6 +104,9 @@ CONFIG_ATMEL_USART=y CONFIG_SYSRESET=y CONFIG_SPL_SYSRESET=y CONFIG_SYSRESET_AT91=y +CONFIG_SPI=y +CONFIG_DM_SPI=y +CONFIG_ATMEL_QSPI=y CONFIG_TIMER=y CONFIG_SPL_TIMER=y CONFIG_ATMEL_TCB_TIMER=y -- cgit v1.1 From 1535f1d19ca494c05733e53e4a31cd8799748687 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Tue, 24 May 2022 13:00:54 +0300 Subject: dt-bindings: sound: add microchip,pdmc.h Include microchip,pdmc.h from Linux. This file includes required defines for DT successful build. Signed-off-by: Eugen Hristev --- include/dt-bindings/sound/microchip,pdmc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 include/dt-bindings/sound/microchip,pdmc.h diff --git a/include/dt-bindings/sound/microchip,pdmc.h b/include/dt-bindings/sound/microchip,pdmc.h new file mode 100644 index 0000000..96cde94 --- /dev/null +++ b/include/dt-bindings/sound/microchip,pdmc.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __DT_BINDINGS_MICROCHIP_PDMC_H__ +#define __DT_BINDINGS_MICROCHIP_PDMC_H__ + +/* PDM microphone's pin placement */ +#define MCHP_PDMC_DS0 0 +#define MCHP_PDMC_DS1 1 + +/* PDM microphone clock edge sampling */ +#define MCHP_PDMC_CLK_POSITIVE 0 +#define MCHP_PDMC_CLK_NEGATIVE 1 + +#endif /* __DT_BINDINGS_MICROCHIP_PDMC_H__ */ -- cgit v1.1 From d4d3c33393d006c2970b63eb0b4cb6eac4a231ef Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Tue, 24 May 2022 13:01:44 +0300 Subject: ARM: dts: at91: sama7g5/sama7g5ek: sync with kernel at91 5.19 Sync with at91 maintainer tree for-5.19 branch. Signed-off-by: Eugen Hristev --- arch/arm/dts/at91-sama7g5ek.dts | 21 ++++++++++++++++++- arch/arm/dts/sama7g5.dtsi | 46 +++++++++++++++++++++++++++++++---------- 2 files changed, 55 insertions(+), 12 deletions(-) diff --git a/arch/arm/dts/at91-sama7g5ek.dts b/arch/arm/dts/at91-sama7g5ek.dts index ee46112..086ee45 100644 --- a/arch/arm/dts/at91-sama7g5ek.dts +++ b/arch/arm/dts/at91-sama7g5ek.dts @@ -14,6 +14,7 @@ #include #include #include +#include / { model = "Microchip SAMA7G5-EK"; @@ -468,7 +469,7 @@ &pinctrl_gmac1_mdio_default &pinctrl_gmac1_phy_irq>; phy-mode = "rmii"; - status = "okay"; + status = "okay"; /* Conflict with pdmc0. */ ethernet-phy@0 { reg = <0x0>; @@ -482,6 +483,17 @@ pinctrl-0 = <&pinctrl_i2s0_default>; }; +&pdmc0 { + #sound-dai-cells = <0>; + microchip,mic-pos = , /* MIC 1 */ + , /* MIC 2 */ + , /* MIC 3 */ + ; /* MIC 4 */ + status = "disabled"; /* Conflict with gmac1. */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pdmc0_default>; +}; + &pioA { pinctrl_can0_default: can0_default { @@ -651,6 +663,13 @@ bias-disable; }; + pinctrl_pdmc0_default: pdmc0_default { + pinmux = , + , + ; + bias_disable; + }; + pinctrl_qspi: qspi { pinmux = , , diff --git a/arch/arm/dts/sama7g5.dtsi b/arch/arm/dts/sama7g5.dtsi index 4efecdb..97400dc 100644 --- a/arch/arm/dts/sama7g5.dtsi +++ b/arch/arm/dts/sama7g5.dtsi @@ -33,6 +33,7 @@ reg = <0x0>; clocks = <&pmc PMC_TYPE_CORE 8>, <&pmc PMC_TYPE_CORE 22>, <&main_xtal>; clock-names = "cpu", "master", "xtal"; + operating-points-v2 = <&cpu_opp_table>; }; }; @@ -225,7 +226,7 @@ status = "disabled"; }; - rtt: rtt@e001d020 { + rtt: rtc@e001d020 { compatible = "microchip,sama7g5-rtt", "microchip,sam9x60-rtt", "atmel,at91sam9260-rtt"; reg = <0xe001d020 0x30>; interrupts = ; @@ -490,6 +491,30 @@ status = "disabled"; }; + pdmc0: sound@e1608000 { + compatible = "microchip,sama7g5-pdmc"; + reg = <0xe1608000 0x1000>; + interrupts = ; + #sound-dai-cells = <0>; + dmas = <&dma0 AT91_XDMAC_DT_PERID(37)>; + dma-names = "rx"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 68>, <&pmc PMC_TYPE_GCK 68>; + clock-names = "pclk", "gclk"; + status = "disabled"; + }; + + pdmc1: sound@e160c000 { + compatible = "microchip,sama7g5-pdmc"; + reg = <0xe160c000 0x1000>; + interrupts = ; + #sound-dai-cells = <0>; + dmas = <&dma0 AT91_XDMAC_DT_PERID(38)>; + dma-names = "rx"; + clocks = <&pmc PMC_TYPE_PERIPHERAL 69>, <&pmc PMC_TYPE_GCK 69>; + clock-names = "pclk", "gclk"; + status = "disabled"; + }; + spdifrx: spdifrx@e1614000 { #sound-dai-cells = <0>; compatible = "microchip,sama7g5-spdifrx"; @@ -628,9 +653,9 @@ #size-cells = <0>; clocks = <&pmc PMC_TYPE_PERIPHERAL 39>; atmel,fifo-size = <32>; - dmas = <&dma0 AT91_XDMAC_DT_PERID(7)>, - <&dma0 AT91_XDMAC_DT_PERID(8)>; - dma-names = "rx", "tx"; + dmas = <&dma0 AT91_XDMAC_DT_PERID(8)>, + <&dma0 AT91_XDMAC_DT_PERID(7)>; + dma-names = "tx", "rx"; status = "disabled"; }; }; @@ -814,9 +839,9 @@ #size-cells = <0>; clocks = <&pmc PMC_TYPE_PERIPHERAL 46>; atmel,fifo-size = <32>; - dmas = <&dma0 AT91_XDMAC_DT_PERID(21)>, - <&dma0 AT91_XDMAC_DT_PERID(22)>; - dma-names = "rx", "tx"; + dmas = <&dma0 AT91_XDMAC_DT_PERID(22)>, + <&dma0 AT91_XDMAC_DT_PERID(21)>; + dma-names = "tx", "rx"; status = "disabled"; }; }; @@ -838,9 +863,9 @@ #size-cells = <0>; clocks = <&pmc PMC_TYPE_PERIPHERAL 47>; atmel,fifo-size = <32>; - dmas = <&dma0 AT91_XDMAC_DT_PERID(23)>, - <&dma0 AT91_XDMAC_DT_PERID(24)>; - dma-names = "rx", "tx"; + dmas = <&dma0 AT91_XDMAC_DT_PERID(24)>, + <&dma0 AT91_XDMAC_DT_PERID(23)>; + dma-names = "tx", "rx"; status = "disabled"; }; }; @@ -885,7 +910,6 @@ #interrupt-cells = <3>; #address-cells = <0>; interrupt-controller; - interrupt-parent; reg = <0xe8c11000 0x1000>, <0xe8c12000 0x2000>; }; -- cgit v1.1 From 0d60a93053b20dfece6ed85fc2dc69e530c1c8d6 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Thu, 26 May 2022 17:04:54 +0300 Subject: ARM: dts: at91: replace microchip, 24aa02e48 with atmel, at24c02 microchip,24aa025e48 does not exist in the bindings of this driver. It can be replaced with atmel,at24c02 which is a standard compatible and the memory is compatible with this one, depending on the page size. microchip 24aa02e48 has a page size of 8, while 24aa025e48 has a page size of 16 bytes. Signed-off-by: Eugen Hristev Reviewed-by: Michael Walle Reviewed-by: Heiko Schocher --- arch/arm/dts/at91-sama5d2_icp.dts | 6 +++--- arch/arm/dts/at91-sama7g5ek.dts | 4 ++-- arch/arm/dts/sama5d27_som1.dtsi | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/dts/at91-sama5d2_icp.dts b/arch/arm/dts/at91-sama5d2_icp.dts index 4452219..0b0db1b 100644 --- a/arch/arm/dts/at91-sama5d2_icp.dts +++ b/arch/arm/dts/at91-sama5d2_icp.dts @@ -68,19 +68,19 @@ status = "okay"; eeprom@50 { - compatible = "microchip,24aa02e48"; + compatible = "atmel,24c02"; /* EEPROM is 2Kbits microchip 24aa025e48, an at24c02 with page size of 16 */ reg = <0x50>; pagesize = <16>; }; eeprom@52 { - compatible = "microchip,24aa02e48"; + compatible = "atmel,24c02"; /* EEPROM is 2Kbits microchip 24aa025e48, an at24c02 with page size of 16 */ reg = <0x52>; pagesize = <16>; }; eeprom@53 { - compatible = "microchip,24aa02e48"; + compatible = "atmel,24c02"; /* EEPROM is 2Kbits microchip 24aa025e48, an at24c02 with page size of 16 */ reg = <0x53>; pagesize = <16>; }; diff --git a/arch/arm/dts/at91-sama7g5ek.dts b/arch/arm/dts/at91-sama7g5ek.dts index 086ee45..eaba0de 100644 --- a/arch/arm/dts/at91-sama7g5ek.dts +++ b/arch/arm/dts/at91-sama7g5ek.dts @@ -405,13 +405,13 @@ status = "okay"; eeprom@52 { - compatible = "microchip,24aa02e48"; + compatible = "atmel,24c02"; /* EEPROM is 2Kbits microchip 24aa025e48, an at24c02 with page size of 16 */ reg = <0x52>; pagesize = <16>; }; eeprom@53 { - compatible = "microchip,24aa02e48"; + compatible = "atmel,24c02"; /* EEPROM is 2Kbits microchip 24aa025e48, an at24c02 with page size of 16 */ reg = <0x53>; pagesize = <16>; }; diff --git a/arch/arm/dts/sama5d27_som1.dtsi b/arch/arm/dts/sama5d27_som1.dtsi index ea7540b..db4fefa 100644 --- a/arch/arm/dts/sama5d27_som1.dtsi +++ b/arch/arm/dts/sama5d27_som1.dtsi @@ -92,7 +92,7 @@ status = "okay"; i2c_eeprom: i2c_eeprom@50 { - compatible = "microchip,24aa02e48"; + compatible = "atmel,24c02"; /* EEPROM is 2Kbits microchip 24aa02e48 */ reg = <0x50>; }; }; -- cgit v1.1 From 73a9616c211fd3c30d295ad526fbed04d5a17fa6 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Thu, 26 May 2022 17:04:55 +0300 Subject: misc: i2c_eeprom: remove 24aa02e48 This compatible does not exist in the bindings. All occurences in DT have been replaced by at24c02 which is equivalent. Fixes: 7264066707 ("misc: i2c_eeprom: Add compatible for 24AA02E48") Signed-off-by: Eugen Hristev Reviewed-by: Michael Walle Reviewed-by: Heiko Schocher --- drivers/misc/i2c_eeprom.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c index 4302e18..bdd7e01 100644 --- a/drivers/misc/i2c_eeprom.c +++ b/drivers/misc/i2c_eeprom.c @@ -170,13 +170,6 @@ static const struct i2c_eeprom_drv_data eeprom_data = { .offset_len = 1, }; -static const struct i2c_eeprom_drv_data mc24aa02e48_data = { - .size = 256, - .pagesize = 8, - .addr_offset_mask = 0, - .offset_len = 1, -}; - static const struct i2c_eeprom_drv_data atmel24c01a_data = { .size = 128, .pagesize = 8, @@ -264,7 +257,6 @@ static const struct i2c_eeprom_drv_data atmel24c512_data = { static const struct udevice_id i2c_eeprom_std_ids[] = { { .compatible = "i2c-eeprom", (ulong)&eeprom_data }, - { .compatible = "microchip,24aa02e48", (ulong)&mc24aa02e48_data }, { .compatible = "atmel,24c01", (ulong)&atmel24c01a_data }, { .compatible = "atmel,24c01a", (ulong)&atmel24c01a_data }, { .compatible = "atmel,24c02", (ulong)&atmel24c02_data }, -- cgit v1.1 From 5ae89b3cfe842ecbb5153a95e2e3ac404abe543c Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Thu, 26 May 2022 17:04:56 +0300 Subject: ARM: dts: at91: sam9x60ek: fix eeprom compatible The memory on this board is microchip 24aa025e48 which is compatible with at24c02 with a page size of 16. Fix the compatible accordingly. Reported-by: Sergiu Moga Signed-off-by: Eugen Hristev Tested-by: Sergiu Moga Reviewed-by: Heiko Schocher --- arch/arm/dts/sam9x60ek.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/sam9x60ek.dts b/arch/arm/dts/sam9x60ek.dts index 4258e8e..54c694b 100644 --- a/arch/arm/dts/sam9x60ek.dts +++ b/arch/arm/dts/sam9x60ek.dts @@ -72,7 +72,7 @@ status = "okay"; eeprom@53 { - compatible = "atmel,24c32"; + compatible = "atmel,24c02"; /* EEPROM is 2Kbits microchip 24aa025e48, an at24c02 with page size of 16 */ reg = <0x53>; pagesize = <16>; }; -- cgit v1.1 From 38200202997289c39454187da8f07c97eac70833 Mon Sep 17 00:00:00 2001 From: Eugen Hristev Date: Wed, 8 Jun 2022 17:49:29 +0300 Subject: board: atmel: remove calls to debug_uart_init Since 0dba45864b ("arm: Init the debug UART") , the debug_uart_init is now called from crt.S It's no longer required to call it from the board file. With the current code, the banned is printed twice: U-Boot 2022.07-rc4-00089-gee3d158fa8 (Jun 08 2022 - 17:39:29 +0300) Remove all calls from board_early_init_f . Suggested-by: Balamanikandan Gunasundar Signed-off-by: Eugen Hristev --- board/atmel/at91sam9260ek/at91sam9260ek.c | 3 --- board/atmel/at91sam9261ek/at91sam9261ek.c | 3 --- board/atmel/at91sam9263ek/at91sam9263ek.c | 3 --- board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c | 3 --- board/atmel/at91sam9n12ek/at91sam9n12ek.c | 3 --- board/atmel/at91sam9rlek/at91sam9rlek.c | 3 --- board/atmel/at91sam9x5ek/at91sam9x5ek.c | 3 --- board/atmel/sam9x60_curiosity/sam9x60_curiosity.c | 3 --- board/atmel/sam9x60ek/sam9x60ek.c | 3 --- board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c | 4 ---- board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c | 4 ---- board/atmel/sama5d2_icp/sama5d2_icp.c | 3 --- board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c | 3 --- board/atmel/sama5d2_xplained/sama5d2_xplained.c | 4 ---- board/atmel/sama5d3_xplained/sama5d3_xplained.c | 3 --- board/atmel/sama5d3xek/sama5d3xek.c | 3 --- board/atmel/sama5d4_xplained/sama5d4_xplained.c | 3 --- board/atmel/sama5d4ek/sama5d4ek.c | 3 --- board/atmel/sama7g5ek/sama7g5ek.c | 3 --- 19 files changed, 60 deletions(-) diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c index 38f97bc..a9ea9b5 100644 --- a/board/atmel/at91sam9260ek/at91sam9260ek.c +++ b/board/atmel/at91sam9260ek/at91sam9260ek.c @@ -74,9 +74,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index 0318eea..8a7a960 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -234,9 +234,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/at91sam9263ek/at91sam9263ek.c b/board/atmel/at91sam9263ek/at91sam9263ek.c index 3218e14..c3e1734 100644 --- a/board/atmel/at91sam9263ek/at91sam9263ek.c +++ b/board/atmel/at91sam9263ek/at91sam9263ek.c @@ -192,9 +192,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c index fcca892..347197a 100644 --- a/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c +++ b/board/atmel/at91sam9m10g45ek/at91sam9m10g45ek.c @@ -258,9 +258,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/at91sam9n12ek/at91sam9n12ek.c b/board/atmel/at91sam9n12ek/at91sam9n12ek.c index a3fc55b..018fed9 100644 --- a/board/atmel/at91sam9n12ek/at91sam9n12ek.c +++ b/board/atmel/at91sam9n12ek/at91sam9n12ek.c @@ -176,9 +176,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/at91sam9rlek/at91sam9rlek.c b/board/atmel/at91sam9rlek/at91sam9rlek.c index f427ee6..af59620 100644 --- a/board/atmel/at91sam9rlek/at91sam9rlek.c +++ b/board/atmel/at91sam9rlek/at91sam9rlek.c @@ -169,9 +169,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/at91sam9x5ek/at91sam9x5ek.c b/board/atmel/at91sam9x5ek/at91sam9x5ek.c index e0abe4a..8192824 100644 --- a/board/atmel/at91sam9x5ek/at91sam9x5ek.c +++ b/board/atmel/at91sam9x5ek/at91sam9x5ek.c @@ -105,9 +105,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c index 00de277..d8f32c9 100644 --- a/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c +++ b/board/atmel/sam9x60_curiosity/sam9x60_curiosity.c @@ -39,9 +39,6 @@ void board_debug_uart_init(void) int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } diff --git a/board/atmel/sam9x60ek/sam9x60ek.c b/board/atmel/sam9x60ek/sam9x60ek.c index 32e5a2b..7035fab 100644 --- a/board/atmel/sam9x60ek/sam9x60ek.c +++ b/board/atmel/sam9x60ek/sam9x60ek.c @@ -101,9 +101,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c index b69f1c8..65d0a75 100644 --- a/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c +++ b/board/atmel/sama5d27_som1_ek/sama5d27_som1_ek.c @@ -65,10 +65,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif - return 0; } #endif diff --git a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c index 67ada27..c38585c 100644 --- a/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c +++ b/board/atmel/sama5d27_wlsom1_ek/sama5d27_wlsom1_ek.c @@ -58,10 +58,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif - return 0; } #endif diff --git a/board/atmel/sama5d2_icp/sama5d2_icp.c b/board/atmel/sama5d2_icp/sama5d2_icp.c index da697a7..0207770 100644 --- a/board/atmel/sama5d2_icp/sama5d2_icp.c +++ b/board/atmel/sama5d2_icp/sama5d2_icp.c @@ -48,9 +48,6 @@ void board_debug_uart_init(void) int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } diff --git a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c index cca5bd1..16e9183 100644 --- a/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c +++ b/board/atmel/sama5d2_ptc_ek/sama5d2_ptc_ek.c @@ -108,9 +108,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index 4bbb05c..9e0f9c3 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -64,10 +64,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif - return 0; } #endif diff --git a/board/atmel/sama5d3_xplained/sama5d3_xplained.c b/board/atmel/sama5d3_xplained/sama5d3_xplained.c index c25bf42..a778f26 100644 --- a/board/atmel/sama5d3_xplained/sama5d3_xplained.c +++ b/board/atmel/sama5d3_xplained/sama5d3_xplained.c @@ -87,9 +87,6 @@ int board_late_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/sama5d3xek/sama5d3xek.c b/board/atmel/sama5d3xek/sama5d3xek.c index b6f8dcd..132e7fa 100644 --- a/board/atmel/sama5d3xek/sama5d3xek.c +++ b/board/atmel/sama5d3xek/sama5d3xek.c @@ -140,9 +140,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 2088b48..9fb7e6f 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -102,9 +102,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/sama5d4ek/sama5d4ek.c b/board/atmel/sama5d4ek/sama5d4ek.c index 46ec1eb..ba38533 100644 --- a/board/atmel/sama5d4ek/sama5d4ek.c +++ b/board/atmel/sama5d4ek/sama5d4ek.c @@ -100,9 +100,6 @@ void board_debug_uart_init(void) #ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { -#ifdef CONFIG_DEBUG_UART - debug_uart_init(); -#endif return 0; } #endif diff --git a/board/atmel/sama7g5ek/sama7g5ek.c b/board/atmel/sama7g5ek/sama7g5ek.c index ae18ed0..7d83e76 100644 --- a/board/atmel/sama7g5ek/sama7g5ek.c +++ b/board/atmel/sama7g5ek/sama7g5ek.c @@ -48,9 +48,6 @@ void board_debug_uart_init(void) int board_early_init_f(void) { -#if (IS_ENABLED(CONFIG_DEBUG_UART)) - debug_uart_init(); -#endif return 0; } -- cgit v1.1 From c1cadac7933cbc3f81e9096843bffff8751baff9 Mon Sep 17 00:00:00 2001 From: Mihai Sain Date: Wed, 25 May 2022 13:32:08 +0300 Subject: gpio: atmel_pio4: add support for PIO_PORTE Add support for gpio PORT E, which is available on e.g. sama7g5 SoC. Signed-off-by: Mihai Sain --- arch/arm/mach-at91/include/mach/atmel_pio4.h | 1 + drivers/gpio/atmel_pio4.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/arch/arm/mach-at91/include/mach/atmel_pio4.h b/arch/arm/mach-at91/include/mach/atmel_pio4.h index c3bd914..b712be8 100644 --- a/arch/arm/mach-at91/include/mach/atmel_pio4.h +++ b/arch/arm/mach-at91/include/mach/atmel_pio4.h @@ -74,6 +74,7 @@ struct atmel_pio4_port { #define AT91_PIO_PORTB 0x1 #define AT91_PIO_PORTC 0x2 #define AT91_PIO_PORTD 0x3 +#define AT91_PIO_PORTE 0x4 int atmel_pio4_set_gpio(u32 port, u32 pin, u32 config); int atmel_pio4_set_a_periph(u32 port, u32 pin, u32 config); diff --git a/drivers/gpio/atmel_pio4.c b/drivers/gpio/atmel_pio4.c index bea609d..77a76c1 100644 --- a/drivers/gpio/atmel_pio4.c +++ b/drivers/gpio/atmel_pio4.c @@ -36,6 +36,11 @@ static struct atmel_pio4_port *atmel_pio4_port_base(u32 port) case AT91_PIO_PORTD: base = (struct atmel_pio4_port *)ATMEL_BASE_PIOD; break; +#if (ATMEL_PIO_PORTS > 4) + case AT91_PIO_PORTE: + base = (struct atmel_pio4_port *)ATMEL_BASE_PIOE; + break; +#endif default: printf("Error: Atmel PIO4: Failed to get PIO base of port#%d!\n", port); -- cgit v1.1