From 67ca805d336edce1c6ad37d11ccca089e81bae78 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Fri, 13 Jan 2023 15:34:30 +0100 Subject: [PATCH 001/183] mmc: pwrseq_sd8787: Allow being built-in irrespective of dependencies commit 18b84603a198e0bce9b8e4a2e1d93622a28ab57d upstream. pwrseq_sd8787 is forced to be built as a module if its dependencies are. That's unnecessary, it's perfectly fine for it to be built-in even though the wireless drivers that need it are modules. Relax the depends definition in Kconfig accordingly. Signed-off-by: Lukas Wunner Cc: Matt Ranostay Cc: Lubomir Rintel Cc: Claudiu Beznea --- drivers/mmc/core/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/Kconfig b/drivers/mmc/core/Kconfig index 6f25c34e4fecbf..e9e9d31b39b43e 100644 --- a/drivers/mmc/core/Kconfig +++ b/drivers/mmc/core/Kconfig @@ -15,7 +15,7 @@ config PWRSEQ_EMMC config PWRSEQ_SD8787 tristate "HW reset support for SD8787 BT + Wifi module" - depends on OF && (MWIFIEX || BT_MRVL_SDIO || LIBERTAS_SDIO || WILC1000_SDIO) + depends on OF && (MWIFIEX != n || BT_MRVL_SDIO != n || LIBERTAS_SDIO != n || WILC1000_SDIO != n) help This selects hardware reset support for the SD8787 BT + Wifi module. By default this option is set to n. From 05da8efe68ed012b62b7c15cf6e18ca01bf068ae Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Fri, 27 Jan 2023 15:02:00 +0100 Subject: [PATCH 002/183] wifi: mwifiex: Support SD8978 chipset commit bba047f15851c8b053221f1b276eb7682d59f755 upstream. The Marvell SD8978 (aka NXP IW416) uses identical registers as SD8987, so reuse the existing mwifiex_reg_sd8987 definition. Note that mwifiex_reg_sd8977 and mwifiex_reg_sd8997 are likewise identical, save for the fw_dump_ctrl register: They define it as 0xf0 whereas mwifiex_reg_sd8987 defines it as 0xf9. I've verified that 0xf9 is the correct value on SD8978. NXP's out-of-tree driver uses 0xf9 for all of them, so there's a chance that 0xf0 is not correct in the mwifiex_reg_sd8977 and mwifiex_reg_sd8997 definitions. I cannot test that for lack of hardware, hence am leaving it as is. NXP has only released a firmware which runs Bluetooth over UART. Perhaps Bluetooth over SDIO is unsupported by this chipset. Consequently, only an "sdiouart" firmware image is referenced, not an alternative "sdsd" image. Signed-off-by: Lukas Wunner Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/536b4f17a72ca460ad1b07045757043fb0778988.1674827105.git.lukas@wunner.de --- .../bindings/net/wireless/marvell-8xxx.txt | 4 ++- drivers/net/wireless/marvell/mwifiex/Kconfig | 5 ++-- drivers/net/wireless/marvell/mwifiex/sdio.c | 25 +++++++++++++++++-- drivers/net/wireless/marvell/mwifiex/sdio.h | 1 + include/linux/mmc/sdio_ids.h | 1 + 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt index 9bf9bbac16e250..cdc303caf5f45c 100644 --- a/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt +++ b/Documentation/devicetree/bindings/net/wireless/marvell-8xxx.txt @@ -1,4 +1,4 @@ -Marvell 8787/8897/8997 (sd8787/sd8897/sd8997/pcie8997) SDIO/PCIE devices +Marvell 8787/8897/8978/8997 (sd8787/sd8897/sd8978/sd8997/pcie8997) SDIO/PCIE devices ------ This node provides properties for controlling the Marvell SDIO/PCIE wireless device. @@ -10,7 +10,9 @@ Required properties: - compatible : should be one of the following: * "marvell,sd8787" * "marvell,sd8897" + * "marvell,sd8978" * "marvell,sd8997" + * "nxp,iw416" * "pci11ab,2b42" * "pci1b4b,2b42" diff --git a/drivers/net/wireless/marvell/mwifiex/Kconfig b/drivers/net/wireless/marvell/mwifiex/Kconfig index 2b4ff2b78a7e13..b182f7155d66fa 100644 --- a/drivers/net/wireless/marvell/mwifiex/Kconfig +++ b/drivers/net/wireless/marvell/mwifiex/Kconfig @@ -10,13 +10,14 @@ config MWIFIEX mwifiex. config MWIFIEX_SDIO - tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8987/SD8997" + tristate "Marvell WiFi-Ex Driver for SD8786/SD8787/SD8797/SD8887/SD8897/SD8977/SD8978/SD8987/SD8997" depends on MWIFIEX && MMC select FW_LOADER select WANT_DEV_COREDUMP help This adds support for wireless adapters based on Marvell - 8786/8787/8797/8887/8897/8977/8987/8997 chipsets with SDIO interface. + 8786/8787/8797/8887/8897/8977/8978/8987/8997 chipsets with + SDIO interface. SD8978 is also known as NXP IW416. If you choose to build it as a module, it will be called mwifiex_sdio. diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index ea1c1c2412e72d..a24bd40dd41ab8 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -263,7 +263,7 @@ static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8887 = { 0x68, 0x69, 0x6a}, }; -static const struct mwifiex_sdio_card_reg mwifiex_reg_sd8987 = { +static const struct mwifiex_sdio_card_reg mwifiex_reg_sd89xx = { .start_rd_port = 0, .start_wr_port = 0, .base_0_reg = 0xF8, @@ -394,6 +394,22 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8977 = { .can_ext_scan = true, }; +static const struct mwifiex_sdio_device mwifiex_sdio_sd8978 = { + .firmware_sdiouart = SD8978_SDIOUART_FW_NAME, + .reg = &mwifiex_reg_sd89xx, + .max_ports = 32, + .mp_agg_pkt_limit = 16, + .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_4K, + .mp_tx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_MAX, + .mp_rx_agg_buf_size = MWIFIEX_MP_AGGR_BUF_SIZE_MAX, + .supports_sdio_new_mode = true, + .has_control_mask = false, + .can_dump_fw = true, + .fw_dump_enh = true, + .can_auto_tdls = false, + .can_ext_scan = true, +}; + static const struct mwifiex_sdio_device mwifiex_sdio_sd8997 = { .firmware = SD8997_DEFAULT_FW_NAME, .firmware_sdiouart = SD8997_SDIOUART_FW_NAME, @@ -428,7 +444,7 @@ static const struct mwifiex_sdio_device mwifiex_sdio_sd8887 = { static const struct mwifiex_sdio_device mwifiex_sdio_sd8987 = { .firmware = SD8987_DEFAULT_FW_NAME, - .reg = &mwifiex_reg_sd8987, + .reg = &mwifiex_reg_sd89xx, .max_ports = 32, .mp_agg_pkt_limit = 16, .tx_buf_size = MWIFIEX_TX_DATA_BUF_SIZE_2K, @@ -482,7 +498,9 @@ static struct memory_type_mapping mem_type_mapping_tbl[] = { static const struct of_device_id mwifiex_sdio_of_match_table[] __maybe_unused = { { .compatible = "marvell,sd8787" }, { .compatible = "marvell,sd8897" }, + { .compatible = "marvell,sd8978" }, { .compatible = "marvell,sd8997" }, + { .compatible = "nxp,iw416" }, { } }; @@ -920,6 +938,8 @@ static const struct sdio_device_id mwifiex_ids[] = { .driver_data = (unsigned long)&mwifiex_sdio_sd8801}, {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8977_WLAN), .driver_data = (unsigned long)&mwifiex_sdio_sd8977}, + {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8978_WLAN), + .driver_data = (unsigned long)&mwifiex_sdio_sd8978}, {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8987_WLAN), .driver_data = (unsigned long)&mwifiex_sdio_sd8987}, {SDIO_DEVICE(SDIO_VENDOR_ID_MARVELL, SDIO_DEVICE_ID_MARVELL_8997_WLAN), @@ -3164,6 +3184,7 @@ MODULE_FIRMWARE(SD8797_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8897_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8887_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8977_DEFAULT_FW_NAME); +MODULE_FIRMWARE(SD8978_SDIOUART_FW_NAME); MODULE_FIRMWARE(SD8987_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8997_DEFAULT_FW_NAME); MODULE_FIRMWARE(SD8997_SDIOUART_FW_NAME); diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.h b/drivers/net/wireless/marvell/mwifiex/sdio.h index 3a24bb48b29962..ae94c172310ff5 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.h +++ b/drivers/net/wireless/marvell/mwifiex/sdio.h @@ -25,6 +25,7 @@ #define SD8887_DEFAULT_FW_NAME "mrvl/sd8887_uapsta.bin" #define SD8801_DEFAULT_FW_NAME "mrvl/sd8801_uapsta.bin" #define SD8977_DEFAULT_FW_NAME "mrvl/sdsd8977_combo_v2.bin" +#define SD8978_SDIOUART_FW_NAME "mrvl/sdiouartiw416_combo_v0.bin" #define SD8987_DEFAULT_FW_NAME "mrvl/sd8987_uapsta.bin" #define SD8997_DEFAULT_FW_NAME "mrvl/sdsd8997_combo_v4.bin" #define SD8997_SDIOUART_FW_NAME "mrvl/sdiouart8997_combo_v4.bin" diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h index 74f9d9a6d33076..0e4ef9c5127ad2 100644 --- a/include/linux/mmc/sdio_ids.h +++ b/include/linux/mmc/sdio_ids.h @@ -102,6 +102,7 @@ #define SDIO_DEVICE_ID_MARVELL_8977_BT 0x9146 #define SDIO_DEVICE_ID_MARVELL_8987_WLAN 0x9149 #define SDIO_DEVICE_ID_MARVELL_8987_BT 0x914a +#define SDIO_DEVICE_ID_MARVELL_8978_WLAN 0x9159 #define SDIO_VENDOR_ID_MEDIATEK 0x037a #define SDIO_DEVICE_ID_MEDIATEK_MT7663 0x7663 From 3c1ef94f2016b1210431c73ad6a41157fd15b88c Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Fri, 27 Jan 2023 15:03:00 +0100 Subject: [PATCH 003/183] wifi: mwifiex: Support firmware hotfix version in GET_HW_SPEC responses commit 7715d79553de553532219d82c0fea89fba5f7c79 upstream. Support the firmware hotfix version in GET_HW_SPEC responses to avoid an irritating "Unknown api_id: 5" message on probe. Based on this commit in NXP's GPLv2-licensed out-of-tree driver: https://github.com/nxp-imx/mwifiex/commit/27fd8ecca504 Signed-off-by: Lukas Wunner Cc: Sherry Sun Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/111c7ee895f12d951e95a2edcd06d87ca26a7d0f.1674827105.git.lukas@wunner.de --- drivers/net/wireless/marvell/mwifiex/cmdevt.c | 5 +++++ drivers/net/wireless/marvell/mwifiex/fw.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c index d3339d67e7a082..3756aa247e77d3 100644 --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c @@ -1607,6 +1607,11 @@ int mwifiex_ret_get_hw_spec(struct mwifiex_private *priv, api_rev->major_ver, api_rev->minor_ver); break; + case FW_HOTFIX_VER_ID: + mwifiex_dbg(adapter, INFO, + "Firmware hotfix version %d\n", + api_rev->major_ver); + break; default: mwifiex_dbg(adapter, FATAL, "Unknown api_id: %d\n", diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h index b4f945a549f71c..c32478dfe3574f 100644 --- a/drivers/net/wireless/marvell/mwifiex/fw.h +++ b/drivers/net/wireless/marvell/mwifiex/fw.h @@ -1048,6 +1048,7 @@ enum API_VER_ID { FW_API_VER_ID = 2, UAP_FW_API_VER_ID = 3, CHANRPT_API_VER_ID = 4, + FW_HOTFIX_VER_ID = 5, }; struct hw_spec_api_rev { From 58dc38c1419e481a8590a25c15cb85550256b5f4 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:25 +0100 Subject: [PATCH 004/183] tpm, tpm_tis: Avoid cache incoherency in test for interrupts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 858e8b792d06f45c427897bd90205a1d90bf430f upstream. The interrupt handler that sets the boolean variable irq_tested may run on another CPU as the thread that checks irq_tested as part of the irq test in tpm_tis_send(). Since nothing guarantees cache coherency between CPUs for unsynchronized accesses to boolean variables the testing thread might not perceive the value change done in the interrupt handler. Avoid this issue by setting the bit TPM_TIS_IRQ_TESTED in the flags field of the tpm_tis_data struct and by accessing this field with the bit manipulating functions that provide cache coherency. Also convert all other existing sites to use the proper macros when accessing this bitfield. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis.c | 2 +- drivers/char/tpm/tpm_tis_core.c | 21 +++++++++++---------- drivers/char/tpm/tpm_tis_core.h | 2 +- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 5d778ea926f3f9..77d121ed375360 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -252,7 +252,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info) irq = tpm_info->irq; if (itpm || is_itpm(ACPI_COMPANION(dev))) - phy->priv.flags |= TPM_TIS_ITPM_WORKAROUND; + set_bit(TPM_TIS_ITPM_WORKAROUND, &phy->priv.flags); return tpm_tis_core_init(dev, &phy->priv, irq, &tpm_tcg, ACPI_HANDLE(dev)); diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 3f98e587b3e849..57fd315a1d5083 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -351,7 +351,7 @@ static int tpm_tis_send_data(struct tpm_chip *chip, const u8 *buf, size_t len) struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); int rc, status, burstcnt; size_t count = 0; - bool itpm = priv->flags & TPM_TIS_ITPM_WORKAROUND; + bool itpm = test_bit(TPM_TIS_ITPM_WORKAROUND, &priv->flags); status = tpm_tis_status(chip); if ((status & TPM_STS_COMMAND_READY) == 0) { @@ -484,7 +484,8 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) int rc, irq; struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); - if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || priv->irq_tested) + if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || + test_bit(TPM_TIS_IRQ_TESTED, &priv->flags)) return tpm_tis_send_main(chip, buf, len); /* Verify receipt of the expected IRQ */ @@ -494,11 +495,11 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) rc = tpm_tis_send_main(chip, buf, len); priv->irq = irq; chip->flags |= TPM_CHIP_FLAG_IRQ; - if (!priv->irq_tested) + if (!test_bit(TPM_TIS_IRQ_TESTED, &priv->flags)) tpm_msleep(1); - if (!priv->irq_tested) + if (!test_bit(TPM_TIS_IRQ_TESTED, &priv->flags)) disable_interrupts(chip); - priv->irq_tested = true; + set_bit(TPM_TIS_IRQ_TESTED, &priv->flags); return rc; } @@ -641,7 +642,7 @@ static int probe_itpm(struct tpm_chip *chip) size_t len = sizeof(cmd_getticks); u16 vendor; - if (priv->flags & TPM_TIS_ITPM_WORKAROUND) + if (test_bit(TPM_TIS_ITPM_WORKAROUND, &priv->flags)) return 0; rc = tpm_tis_read16(priv, TPM_DID_VID(0), &vendor); @@ -661,13 +662,13 @@ static int probe_itpm(struct tpm_chip *chip) tpm_tis_ready(chip); - priv->flags |= TPM_TIS_ITPM_WORKAROUND; + set_bit(TPM_TIS_ITPM_WORKAROUND, &priv->flags); rc = tpm_tis_send_data(chip, cmd_getticks, len); if (rc == 0) dev_info(&chip->dev, "Detected an iTPM.\n"); else { - priv->flags &= ~TPM_TIS_ITPM_WORKAROUND; + clear_bit(TPM_TIS_ITPM_WORKAROUND, &priv->flags); rc = -EFAULT; } @@ -711,7 +712,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) if (interrupt == 0) return IRQ_NONE; - priv->irq_tested = true; + set_bit(TPM_TIS_IRQ_TESTED, &priv->flags); if (interrupt & TPM_INTF_DATA_AVAIL_INT) wake_up_interruptible(&priv->read_queue); if (interrupt & TPM_INTF_LOCALITY_CHANGE_INT) @@ -797,7 +798,7 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, if (rc < 0) return rc; - priv->irq_tested = false; + clear_bit(TPM_TIS_IRQ_TESTED, &priv->flags); /* Generate an interrupt by having the core call through to * tpm_tis_send diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h index b68479e0de10f3..57718f43cf6467 100644 --- a/drivers/char/tpm/tpm_tis_core.h +++ b/drivers/char/tpm/tpm_tis_core.h @@ -87,13 +87,13 @@ enum tpm_tis_flags { TPM_TIS_ITPM_WORKAROUND = BIT(0), TPM_TIS_INVALID_STATUS = BIT(1), TPM_TIS_DEFAULT_CANCELLATION = BIT(2), + TPM_TIS_IRQ_TESTED = BIT(3), }; struct tpm_tis_data { u16 manufacturer_id; int locality; int irq; - bool irq_tested; unsigned long flags; void __iomem *ilb_base_addr; u16 clkrun_enabled; From 77240a4f0733b45058514eba920572ca198d3532 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:26 +0100 Subject: [PATCH 005/183] tpm, tpm_tis: Claim locality before writing TPM_INT_ENABLE register MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 282657a8bd7fddcf511b834f43705001668b33a7 upstream. In disable_interrupts() the TPM_GLOBAL_INT_ENABLE bit is unset in the TPM_INT_ENABLE register to shut the interrupts off. However modifying the register is only possible with a held locality. So claim the locality before disable_interrupts() is called. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 57fd315a1d5083..3371304df3344c 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -1102,7 +1102,11 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, dev_err(&chip->dev, FW_BUG "TPM interrupt not working, polling instead\n"); + rc = request_locality(chip, 0); + if (rc < 0) + goto out_err; disable_interrupts(chip); + release_locality(chip, 0); } } else { tpm_tis_probe_irq(chip, intmask); From e82909322daf052632e5ac23af3ea10bce1531ed Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:27 +0100 Subject: [PATCH 006/183] tpm, tpm_tis: Disable interrupts if tpm_tis_probe_irq() failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 6d789ad726950e612a7f31044260337237c5b490 upstream. Both functions tpm_tis_probe_irq_single() and tpm_tis_probe_irq() may setup the interrupts and then return with an error. This case is indicated by a missing TPM_CHIP_FLAG_IRQ flag in chip->flags. Currently the interrupt setup is only undone if tpm_tis_probe_irq_single() fails. Undo the setup also if tpm_tis_probe_irq() fails. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 3371304df3344c..347af701039653 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -1095,21 +1095,21 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, goto out_err; } - if (irq) { + if (irq) tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED, irq); - if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) { - dev_err(&chip->dev, FW_BUG + else + tpm_tis_probe_irq(chip, intmask); + + if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) { + dev_err(&chip->dev, FW_BUG "TPM interrupt not working, polling instead\n"); - rc = request_locality(chip, 0); - if (rc < 0) - goto out_err; - disable_interrupts(chip); - release_locality(chip, 0); - } - } else { - tpm_tis_probe_irq(chip, intmask); + rc = request_locality(chip, 0); + if (rc < 0) + goto out_err; + disable_interrupts(chip); + release_locality(chip, 0); } } From 677b48fdd28e02a301e2402ba131bf109be8f24e Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:28 +0100 Subject: [PATCH 007/183] tpm, tpm_tis: Do not skip reset of original interrupt vector commit ed9be0e6c892a783800d77a41ca4c7255c6af8c5 upstream. If in tpm_tis_probe_irq_single() an error occurs after the original interrupt vector has been read, restore the interrupts before the error is returned. Since the caller does not check the error value, return -1 in any case that the TPM_CHIP_FLAG_IRQ flag is not set. Since the return value of function tpm_tis_gen_interrupt() is not longer used, make it a void function. Fixes: 1107d065fdf1 ("tpm_tis: Introduce intermediate layer for TPM access") Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 347af701039653..b5338e522a455e 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -733,7 +733,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) return IRQ_HANDLED; } -static int tpm_tis_gen_interrupt(struct tpm_chip *chip) +static void tpm_tis_gen_interrupt(struct tpm_chip *chip) { const char *desc = "attempting to generate an interrupt"; u32 cap2; @@ -742,7 +742,7 @@ static int tpm_tis_gen_interrupt(struct tpm_chip *chip) ret = request_locality(chip, 0); if (ret < 0) - return ret; + return; if (chip->flags & TPM_CHIP_FLAG_TPM2) ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc); @@ -750,8 +750,6 @@ static int tpm_tis_gen_interrupt(struct tpm_chip *chip) ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 0); release_locality(chip, 0); - - return ret; } /* Register the IRQ and issue a command that will cause an interrupt. If an @@ -781,42 +779,37 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, rc = tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality), irq); if (rc < 0) - return rc; + goto restore_irqs; rc = tpm_tis_read32(priv, TPM_INT_STATUS(priv->locality), &int_status); if (rc < 0) - return rc; + goto restore_irqs; /* Clear all existing */ rc = tpm_tis_write32(priv, TPM_INT_STATUS(priv->locality), int_status); if (rc < 0) - return rc; - + goto restore_irqs; /* Turn on */ rc = tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask | TPM_GLOBAL_INT_ENABLE); if (rc < 0) - return rc; + goto restore_irqs; clear_bit(TPM_TIS_IRQ_TESTED, &priv->flags); /* Generate an interrupt by having the core call through to * tpm_tis_send */ - rc = tpm_tis_gen_interrupt(chip); - if (rc < 0) - return rc; + tpm_tis_gen_interrupt(chip); +restore_irqs: /* tpm_tis_send will either confirm the interrupt is working or it * will call disable_irq which undoes all of the above. */ if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) { - rc = tpm_tis_write8(priv, original_int_vec, - TPM_INT_VECTOR(priv->locality)); - if (rc < 0) - return rc; - - return 1; + tpm_tis_write8(priv, original_int_vec, + TPM_INT_VECTOR(priv->locality)); + return -1; } return 0; From 72a4b8f8bfc8456fb34c141bd34dc0c2a0d72c0d Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:29 +0100 Subject: [PATCH 008/183] tpm, tpm_tis: Claim locality before writing interrupt registers commit 15d7aa4e46eba87242a320f39773aa16faddadee upstream. In tpm_tis_probe_single_irq() interrupt registers TPM_INT_VECTOR, TPM_INT_STATUS and TPM_INT_ENABLE are modified to setup the interrupts. Currently these modifications are done without holding a locality thus they have no effect. Fix this by claiming the (default) locality before the registers are written. Since now tpm_tis_gen_interrupt() is called with the locality already claimed remove locality request and release from this function. Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index b5338e522a455e..f70c1d95bc03a8 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -740,16 +740,10 @@ static void tpm_tis_gen_interrupt(struct tpm_chip *chip) cap_t cap; int ret; - ret = request_locality(chip, 0); - if (ret < 0) - return; - if (chip->flags & TPM_CHIP_FLAG_TPM2) ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc); else ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 0); - - release_locality(chip, 0); } /* Register the IRQ and issue a command that will cause an interrupt. If an @@ -772,10 +766,16 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, } priv->irq = irq; + rc = request_locality(chip, 0); + if (rc < 0) + return rc; + rc = tpm_tis_read8(priv, TPM_INT_VECTOR(priv->locality), &original_int_vec); - if (rc < 0) + if (rc < 0) { + release_locality(chip, priv->locality); return rc; + } rc = tpm_tis_write8(priv, TPM_INT_VECTOR(priv->locality), irq); if (rc < 0) @@ -809,10 +809,12 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) { tpm_tis_write8(priv, original_int_vec, TPM_INT_VECTOR(priv->locality)); - return -1; + rc = -1; } - return 0; + release_locality(chip, priv->locality); + + return rc; } /* Try to find the IRQ the TPM is using. This is for legacy x86 systems that From 3a280cfb7a1c942ee9a311d5c8e3d94e48eff37f Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:30 +0100 Subject: [PATCH 009/183] tpm, tpm_tis: Only handle supported interrupts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit e87fcf0dc2b47fac5b4824f00f74dfbcd4acd363 upstream. According to the TPM Interface Specification (TIS) support for "stsValid" and "commandReady" interrupts is only optional. This has to be taken into account when handling the interrupts in functions like wait_for_tpm_stat(). To determine the supported interrupts use the capability query. Also adjust wait_for_tpm_stat() to only wait for interrupt reported status changes. After that process all the remaining status changes by polling the status register. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 120 +++++++++++++++++++------------- drivers/char/tpm/tpm_tis_core.h | 1 + 2 files changed, 73 insertions(+), 48 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index f70c1d95bc03a8..e4ba4d5090be5a 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -53,41 +53,63 @@ static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, long rc; u8 status; bool canceled = false; + u8 sts_mask = 0; + int ret = 0; /* check current status */ status = chip->ops->status(chip); if ((status & mask) == mask) return 0; - stop = jiffies + timeout; + /* check what status changes can be handled by irqs */ + if (priv->int_mask & TPM_INTF_STS_VALID_INT) + sts_mask |= TPM_STS_VALID; - if (chip->flags & TPM_CHIP_FLAG_IRQ) { + if (priv->int_mask & TPM_INTF_DATA_AVAIL_INT) + sts_mask |= TPM_STS_DATA_AVAIL; + + if (priv->int_mask & TPM_INTF_CMD_READY_INT) + sts_mask |= TPM_STS_COMMAND_READY; + + sts_mask &= mask; + + stop = jiffies + timeout; + /* process status changes with irq support */ + if (sts_mask) { + ret = -ETIME; again: timeout = stop - jiffies; if ((long)timeout <= 0) return -ETIME; rc = wait_event_interruptible_timeout(*queue, - wait_for_tpm_stat_cond(chip, mask, check_cancel, + wait_for_tpm_stat_cond(chip, sts_mask, check_cancel, &canceled), timeout); if (rc > 0) { if (canceled) return -ECANCELED; - return 0; + ret = 0; } if (rc == -ERESTARTSYS && freezing(current)) { clear_thread_flag(TIF_SIGPENDING); goto again; } - } else { - do { - usleep_range(priv->timeout_min, - priv->timeout_max); - status = chip->ops->status(chip); - if ((status & mask) == mask) - return 0; - } while (time_before(jiffies, stop)); } + + if (ret) + return ret; + + mask &= ~sts_mask; + if (!mask) /* all done */ + return 0; + /* process status changes without irq support */ + do { + status = chip->ops->status(chip); + if ((status & mask) == mask) + return 0; + usleep_range(priv->timeout_min, + priv->timeout_max); + } while (time_before(jiffies, stop)); return -ETIME; } @@ -1005,8 +1027,40 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, if (rc < 0) goto out_err; - intmask |= TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT | - TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT; + /* Figure out the capabilities */ + rc = tpm_tis_read32(priv, TPM_INTF_CAPS(priv->locality), &intfcaps); + if (rc < 0) + goto out_err; + + dev_dbg(dev, "TPM interface capabilities (0x%x):\n", + intfcaps); + if (intfcaps & TPM_INTF_BURST_COUNT_STATIC) + dev_dbg(dev, "\tBurst Count Static\n"); + if (intfcaps & TPM_INTF_CMD_READY_INT) { + intmask |= TPM_INTF_CMD_READY_INT; + dev_dbg(dev, "\tCommand Ready Int Support\n"); + } + if (intfcaps & TPM_INTF_INT_EDGE_FALLING) + dev_dbg(dev, "\tInterrupt Edge Falling\n"); + if (intfcaps & TPM_INTF_INT_EDGE_RISING) + dev_dbg(dev, "\tInterrupt Edge Rising\n"); + if (intfcaps & TPM_INTF_INT_LEVEL_LOW) + dev_dbg(dev, "\tInterrupt Level Low\n"); + if (intfcaps & TPM_INTF_INT_LEVEL_HIGH) + dev_dbg(dev, "\tInterrupt Level High\n"); + if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT) { + intmask |= TPM_INTF_LOCALITY_CHANGE_INT; + dev_dbg(dev, "\tLocality Change Int Support\n"); + } + if (intfcaps & TPM_INTF_STS_VALID_INT) { + intmask |= TPM_INTF_STS_VALID_INT; + dev_dbg(dev, "\tSts Valid Int Support\n"); + } + if (intfcaps & TPM_INTF_DATA_AVAIL_INT) { + intmask |= TPM_INTF_DATA_AVAIL_INT; + dev_dbg(dev, "\tData Avail Int Support\n"); + } + intmask &= ~TPM_GLOBAL_INT_ENABLE; rc = request_locality(chip, 0); @@ -1040,32 +1094,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, goto out_err; } - /* Figure out the capabilities */ - rc = tpm_tis_read32(priv, TPM_INTF_CAPS(priv->locality), &intfcaps); - if (rc < 0) - goto out_err; - - dev_dbg(dev, "TPM interface capabilities (0x%x):\n", - intfcaps); - if (intfcaps & TPM_INTF_BURST_COUNT_STATIC) - dev_dbg(dev, "\tBurst Count Static\n"); - if (intfcaps & TPM_INTF_CMD_READY_INT) - dev_dbg(dev, "\tCommand Ready Int Support\n"); - if (intfcaps & TPM_INTF_INT_EDGE_FALLING) - dev_dbg(dev, "\tInterrupt Edge Falling\n"); - if (intfcaps & TPM_INTF_INT_EDGE_RISING) - dev_dbg(dev, "\tInterrupt Edge Rising\n"); - if (intfcaps & TPM_INTF_INT_LEVEL_LOW) - dev_dbg(dev, "\tInterrupt Level Low\n"); - if (intfcaps & TPM_INTF_INT_LEVEL_HIGH) - dev_dbg(dev, "\tInterrupt Level High\n"); - if (intfcaps & TPM_INTF_LOCALITY_CHANGE_INT) - dev_dbg(dev, "\tLocality Change Int Support\n"); - if (intfcaps & TPM_INTF_STS_VALID_INT) - dev_dbg(dev, "\tSts Valid Int Support\n"); - if (intfcaps & TPM_INTF_DATA_AVAIL_INT) - dev_dbg(dev, "\tData Avail Int Support\n"); - /* INTERRUPT Setup */ init_waitqueue_head(&priv->read_queue); init_waitqueue_head(&priv->int_queue); @@ -1096,7 +1124,9 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, else tpm_tis_probe_irq(chip, intmask); - if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) { + if (chip->flags & TPM_CHIP_FLAG_IRQ) { + priv->int_mask = intmask; + } else { dev_err(&chip->dev, FW_BUG "TPM interrupt not working, polling instead\n"); @@ -1143,13 +1173,7 @@ static void tpm_tis_reenable_interrupts(struct tpm_chip *chip) if (rc < 0) goto out; - rc = tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask); - if (rc < 0) - goto out; - - intmask |= TPM_INTF_CMD_READY_INT - | TPM_INTF_LOCALITY_CHANGE_INT | TPM_INTF_DATA_AVAIL_INT - | TPM_INTF_STS_VALID_INT | TPM_GLOBAL_INT_ENABLE; + intmask = priv->int_mask | TPM_GLOBAL_INT_ENABLE; tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask); diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h index 57718f43cf6467..19ef8c1a4142e3 100644 --- a/drivers/char/tpm/tpm_tis_core.h +++ b/drivers/char/tpm/tpm_tis_core.h @@ -94,6 +94,7 @@ struct tpm_tis_data { u16 manufacturer_id; int locality; int irq; + unsigned int int_mask; unsigned long flags; void __iomem *ilb_base_addr; u16 clkrun_enabled; From 1c6210c24e85f833acaa7d7725fab2ca734c18d2 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:31 +0100 Subject: [PATCH 010/183] tpm, tpm_tis: Move interrupt mask checks into own function commit 4303553bced7a1d84583dada552393f5ebd31e54 upstream. Clean up wait_for_tpm_stat() by moving multiple similar interrupt mask checks into an own function. Signed-off-by: Lino Sanfilippo Suggested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index e4ba4d5090be5a..8981433abb0ff4 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -44,6 +44,20 @@ static bool wait_for_tpm_stat_cond(struct tpm_chip *chip, u8 mask, return false; } +static u8 tpm_tis_filter_sts_mask(u8 int_mask, u8 sts_mask) +{ + if (!(int_mask & TPM_INTF_STS_VALID_INT)) + sts_mask &= ~TPM_STS_VALID; + + if (!(int_mask & TPM_INTF_DATA_AVAIL_INT)) + sts_mask &= ~TPM_STS_DATA_AVAIL; + + if (!(int_mask & TPM_INTF_CMD_READY_INT)) + sts_mask &= ~TPM_STS_COMMAND_READY; + + return sts_mask; +} + static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout, wait_queue_head_t *queue, bool check_cancel) @@ -53,7 +67,7 @@ static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, long rc; u8 status; bool canceled = false; - u8 sts_mask = 0; + u8 sts_mask; int ret = 0; /* check current status */ @@ -61,17 +75,10 @@ static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask, if ((status & mask) == mask) return 0; + sts_mask = mask & (TPM_STS_VALID | TPM_STS_DATA_AVAIL | + TPM_STS_COMMAND_READY); /* check what status changes can be handled by irqs */ - if (priv->int_mask & TPM_INTF_STS_VALID_INT) - sts_mask |= TPM_STS_VALID; - - if (priv->int_mask & TPM_INTF_DATA_AVAIL_INT) - sts_mask |= TPM_STS_DATA_AVAIL; - - if (priv->int_mask & TPM_INTF_CMD_READY_INT) - sts_mask |= TPM_STS_COMMAND_READY; - - sts_mask &= mask; + sts_mask = tpm_tis_filter_sts_mask(priv->int_mask, sts_mask); stop = jiffies + timeout; /* process status changes with irq support */ From e7f7bd5ccf2f6b193ccf203cc02304ab4c338de3 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:32 +0100 Subject: [PATCH 011/183] tpm, tpm_tis: do not check for the active locality in interrupt handler commit 35f621287ead686b66aa17aa605ed5d7c95883dc upstream. After driver initialization tpm_tis_data->locality may only be modified in case of a LOCALITY CHANGE interrupt. In this case the interrupt handler iterates over all localities only to assign the active one to tpm_tis_data->locality. However this information is never used any more, so the assignment is not needed. Furthermore without the assignment tpm_tis_data->locality cannot change any more at driver runtime, and thus no protection against concurrent modification is required when the variable is read at other places. So remove this iteration entirely. Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 8981433abb0ff4..717b81435cbd05 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -732,7 +732,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) struct tpm_chip *chip = dev_id; struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); u32 interrupt; - int i, rc; + int rc; rc = tpm_tis_read32(priv, TPM_INT_STATUS(priv->locality), &interrupt); if (rc < 0) @@ -744,10 +744,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) set_bit(TPM_TIS_IRQ_TESTED, &priv->flags); if (interrupt & TPM_INTF_DATA_AVAIL_INT) wake_up_interruptible(&priv->read_queue); - if (interrupt & TPM_INTF_LOCALITY_CHANGE_INT) - for (i = 0; i < 5; i++) - if (check_locality(chip, i)) - break; + if (interrupt & (TPM_INTF_LOCALITY_CHANGE_INT | TPM_INTF_STS_VALID_INT | TPM_INTF_CMD_READY_INT)) From 591f52954774c8d25693e4b8ea0625fd0f238047 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:33 +0100 Subject: [PATCH 012/183] tpm, tpm: Implement usage counter for locality MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 7a2f55d0be296c4e81fd782f3d6c43ed4ec7e265 upstream. Implement a usage counter for the (default) locality used by the TPM TIS driver: Request the locality from the TPM if it has not been claimed yet, otherwise only increment the counter. Also release the locality if the counter is 0 otherwise only decrement the counter. Since in case of SPI the register accesses are locked by means of the SPI bus mutex use a sleepable lock (i.e. also a mutex) to ensure thread-safety of the counter which may be accessed by both a userspace thread and the interrupt handler. By doing this refactor the names of the amended functions to use a more appropriate prefix. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 63 +++++++++++++++++++++++---------- drivers/char/tpm/tpm_tis_core.h | 2 ++ 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 717b81435cbd05..b05c1ed51dd3f3 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -165,16 +165,27 @@ static bool check_locality(struct tpm_chip *chip, int l) return false; } -static int release_locality(struct tpm_chip *chip, int l) +static int __tpm_tis_relinquish_locality(struct tpm_tis_data *priv, int l) +{ + tpm_tis_write8(priv, TPM_ACCESS(l), TPM_ACCESS_ACTIVE_LOCALITY); + + return 0; +} + +static int tpm_tis_relinquish_locality(struct tpm_chip *chip, int l) { struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); - tpm_tis_write8(priv, TPM_ACCESS(l), TPM_ACCESS_ACTIVE_LOCALITY); + mutex_lock(&priv->locality_count_mutex); + priv->locality_count--; + if (priv->locality_count == 0) + __tpm_tis_relinquish_locality(priv, l); + mutex_unlock(&priv->locality_count_mutex); return 0; } -static int request_locality(struct tpm_chip *chip, int l) +static int __tpm_tis_request_locality(struct tpm_chip *chip, int l) { struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); unsigned long stop, timeout; @@ -215,6 +226,20 @@ static int request_locality(struct tpm_chip *chip, int l) return -1; } +static int tpm_tis_request_locality(struct tpm_chip *chip, int l) +{ + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); + int ret = 0; + + mutex_lock(&priv->locality_count_mutex); + if (priv->locality_count == 0) + ret = __tpm_tis_request_locality(chip, l); + if (!ret) + priv->locality_count++; + mutex_unlock(&priv->locality_count_mutex); + return ret; +} + static u8 tpm_tis_status(struct tpm_chip *chip) { struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); @@ -682,7 +707,7 @@ static int probe_itpm(struct tpm_chip *chip) if (vendor != TPM_VID_INTEL) return 0; - if (request_locality(chip, 0) != 0) + if (tpm_tis_request_locality(chip, 0) != 0) return -EBUSY; rc = tpm_tis_send_data(chip, cmd_getticks, len); @@ -703,7 +728,7 @@ static int probe_itpm(struct tpm_chip *chip) out: tpm_tis_ready(chip); - release_locality(chip, priv->locality); + tpm_tis_relinquish_locality(chip, priv->locality); return rc; } @@ -792,14 +817,14 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, } priv->irq = irq; - rc = request_locality(chip, 0); + rc = tpm_tis_request_locality(chip, 0); if (rc < 0) return rc; rc = tpm_tis_read8(priv, TPM_INT_VECTOR(priv->locality), &original_int_vec); if (rc < 0) { - release_locality(chip, priv->locality); + tpm_tis_relinquish_locality(chip, priv->locality); return rc; } @@ -838,7 +863,7 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, rc = -1; } - release_locality(chip, priv->locality); + tpm_tis_relinquish_locality(chip, priv->locality); return rc; } @@ -954,8 +979,8 @@ static const struct tpm_class_ops tpm_tis = { .req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID, .req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID, .req_canceled = tpm_tis_req_canceled, - .request_locality = request_locality, - .relinquish_locality = release_locality, + .request_locality = tpm_tis_request_locality, + .relinquish_locality = tpm_tis_relinquish_locality, .clk_enable = tpm_tis_clkrun_enable, }; @@ -989,6 +1014,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, priv->timeout_min = TPM_TIMEOUT_USECS_MIN; priv->timeout_max = TPM_TIMEOUT_USECS_MAX; priv->phy_ops = phy_ops; + priv->locality_count = 0; + mutex_init(&priv->locality_count_mutex); dev_set_drvdata(&chip->dev, priv); @@ -1067,14 +1094,14 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, intmask &= ~TPM_GLOBAL_INT_ENABLE; - rc = request_locality(chip, 0); + rc = tpm_tis_request_locality(chip, 0); if (rc < 0) { rc = -ENODEV; goto out_err; } tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask); - release_locality(chip, 0); + tpm_tis_relinquish_locality(chip, 0); rc = tpm_chip_start(chip); if (rc) @@ -1108,13 +1135,13 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, * proper timeouts for the driver. */ - rc = request_locality(chip, 0); + rc = tpm_tis_request_locality(chip, 0); if (rc < 0) goto out_err; rc = tpm_get_timeouts(chip); - release_locality(chip, 0); + tpm_tis_relinquish_locality(chip, 0); if (rc) { dev_err(dev, "Could not get TPM timeouts and durations\n"); @@ -1134,11 +1161,11 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, dev_err(&chip->dev, FW_BUG "TPM interrupt not working, polling instead\n"); - rc = request_locality(chip, 0); + rc = tpm_tis_request_locality(chip, 0); if (rc < 0) goto out_err; disable_interrupts(chip); - release_locality(chip, 0); + tpm_tis_relinquish_locality(chip, 0); } } @@ -1205,13 +1232,13 @@ int tpm_tis_resume(struct device *dev) * an error code but for unknown reason it isn't handled. */ if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) { - ret = request_locality(chip, 0); + ret = tpm_tis_request_locality(chip, 0); if (ret < 0) return ret; tpm1_do_selftest(chip); - release_locality(chip, 0); + tpm_tis_relinquish_locality(chip, 0); } return 0; diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h index 19ef8c1a4142e3..e978f457fd4d4c 100644 --- a/drivers/char/tpm/tpm_tis_core.h +++ b/drivers/char/tpm/tpm_tis_core.h @@ -92,6 +92,8 @@ enum tpm_tis_flags { struct tpm_tis_data { u16 manufacturer_id; + struct mutex locality_count_mutex; + unsigned int locality_count; int locality; int irq; unsigned int int_mask; From 7d86c271274498a5f23722758992e516426af4e4 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:34 +0100 Subject: [PATCH 013/183] tpm, tpm_tis: Request threaded interrupt handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 0c7e66e5fd69bf21034c9a9b081d7de7c3eb2cea upstream. The TIS interrupt handler at least has to read and write the interrupt status register. In case of SPI both operations result in a call to tpm_tis_spi_transfer() which uses the bus_lock_mutex of the spi device and thus must only be called from a sleepable context. To ensure this request a threaded interrupt handler. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index b05c1ed51dd3f3..bd443cf5a9f0d1 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -809,8 +809,11 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, int rc; u32 int_status; - if (devm_request_irq(chip->dev.parent, irq, tis_int_handler, flags, - dev_name(&chip->dev), chip) != 0) { + + rc = devm_request_threaded_irq(chip->dev.parent, irq, NULL, + tis_int_handler, IRQF_ONESHOT | flags, + dev_name(&chip->dev), chip); + if (rc) { dev_info(&chip->dev, "Unable to request irq: %d for probe\n", irq); return -1; From a8bba85b9df33ce8858ab0699bff342df5eb4be1 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:35 +0100 Subject: [PATCH 014/183] tpm, tpm_tis: Claim locality in interrupt handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 0e069265bce5a40c4eee52e2364bbbd4dabee94a upstream. Writing the TPM_INT_STATUS register in the interrupt handler to clear the interrupts only has effect if a locality is held. Since this is not guaranteed at the time the interrupt is fired, claim the locality explicitly in the handler. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index bd443cf5a9f0d1..fda4ed61d0a4ff 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -776,7 +776,9 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) wake_up_interruptible(&priv->int_queue); /* Clear interrupts handled with TPM_EOI */ + tpm_tis_request_locality(chip, 0); rc = tpm_tis_write32(priv, TPM_INT_STATUS(priv->locality), interrupt); + tpm_tis_relinquish_locality(chip, 0); if (rc < 0) return IRQ_NONE; From 68a2ed22739c821a6f6971aa339be63063ddc495 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:36 +0100 Subject: [PATCH 015/183] tpm, tpm_tis: Claim locality when interrupts are reenabled on resume commit 955df4f87760b3bb2af253d3fbb12fb712b3ffa6 upstream. In tpm_tis_resume() make sure that the locality has been claimed when tpm_tis_reenable_interrupts() is called. Otherwise the writings to the register might not have any effect. Fixes: 45baa1d1fa39 ("tpm_tis: Re-enable interrupts upon (S3) resume") Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index fda4ed61d0a4ff..dfb622a1b6f7d9 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -1225,28 +1225,27 @@ int tpm_tis_resume(struct device *dev) struct tpm_chip *chip = dev_get_drvdata(dev); int ret; + ret = tpm_tis_request_locality(chip, 0); + if (ret < 0) + return ret; + if (chip->flags & TPM_CHIP_FLAG_IRQ) tpm_tis_reenable_interrupts(chip); ret = tpm_pm_resume(dev); if (ret) - return ret; + goto out; /* * TPM 1.2 requires self-test on resume. This function actually returns * an error code but for unknown reason it isn't handled. */ - if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) { - ret = tpm_tis_request_locality(chip, 0); - if (ret < 0) - return ret; - + if (!(chip->flags & TPM_CHIP_FLAG_TPM2)) tpm1_do_selftest(chip); +out: + tpm_tis_relinquish_locality(chip, 0); - tpm_tis_relinquish_locality(chip, 0); - } - - return 0; + return ret; } EXPORT_SYMBOL_GPL(tpm_tis_resume); #endif From 7e1a28b6e04c510ab52df63d97505c3017e4d87d Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:37 +0100 Subject: [PATCH 016/183] tpm, tpm_tis: startup chip before testing for interrupts commit 548eb516ec0f7a484a23a902835899341164b8ea upstream. In tpm_tis_gen_interrupt() a request for a property value is sent to the TPM to test if interrupts are generated. However after a power cycle the TPM responds with TPM_RC_INITIALIZE which indicates that the TPM is not yet properly initialized. Fix this by first starting the TPM up before the request is sent. For this the startup implementation is removed from tpm_chip_register() and put into the new function tpm_chip_startup() which is called before the interrupts are tested. Signed-off-by: Lino Sanfilippo Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm-chip.c | 38 +++++++++++++++++++++------------ drivers/char/tpm/tpm.h | 1 + drivers/char/tpm/tpm_tis_core.c | 5 +++++ 3 files changed, 30 insertions(+), 14 deletions(-) diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index 409682d0630987..6d7dea232fd097 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -601,6 +601,30 @@ static int tpm_get_pcr_allocation(struct tpm_chip *chip) return rc; } +/* + * tpm_chip_startup() - performs auto startup and allocates the PCRs + * @chip: TPM chip to use. + */ +int tpm_chip_startup(struct tpm_chip *chip) +{ + int rc; + + rc = tpm_chip_start(chip); + if (rc) + return rc; + + rc = tpm_auto_startup(chip); + if (rc) + goto stop; + + rc = tpm_get_pcr_allocation(chip); +stop: + tpm_chip_stop(chip); + + return rc; +} +EXPORT_SYMBOL_GPL(tpm_chip_startup); + /* * tpm_chip_register() - create a character device for the TPM chip * @chip: TPM chip to use. @@ -616,20 +640,6 @@ int tpm_chip_register(struct tpm_chip *chip) { int rc; - rc = tpm_chip_start(chip); - if (rc) - return rc; - rc = tpm_auto_startup(chip); - if (rc) { - tpm_chip_stop(chip); - return rc; - } - - rc = tpm_get_pcr_allocation(chip); - tpm_chip_stop(chip); - if (rc) - return rc; - tpm_sysfs_add_device(chip); tpm_bios_log_setup(chip); diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 830014a2660908..88d3bd76e0760d 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -263,6 +263,7 @@ static inline void tpm_msleep(unsigned int delay_msec) delay_msec * 1000); }; +int tpm_chip_startup(struct tpm_chip *chip); int tpm_chip_start(struct tpm_chip *chip); void tpm_chip_stop(struct tpm_chip *chip); struct tpm_chip *tpm_find_get_ops(struct tpm_chip *chip); diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index dfb622a1b6f7d9..5b01a3df65a61f 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -1133,6 +1133,11 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, /* INTERRUPT Setup */ init_waitqueue_head(&priv->read_queue); init_waitqueue_head(&priv->int_queue); + + rc = tpm_chip_startup(chip); + if (rc) + goto out_err; + if (irq != -1) { /* * Before doing irq testing issue a command to the TPM in polling mode From 98cc9c91ccb21c70dbb9d26ad4905df3b198d698 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 24 Nov 2022 14:55:38 +0100 Subject: [PATCH 017/183] tpm, tpm_tis: Enable interrupt test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit e644b2f498d297a928efcb7ff6f900c27f8b788e upstream. The test for interrupts in tpm_tis_send() is skipped if the flag TPM_CHIP_FLAG_IRQ is not set. Since the current code never sets the flag initially the test is never executed. Fix this by setting the flag in tpm_tis_gen_interrupt() right after interrupts have been enabled and before the test is executed. Signed-off-by: Lino Sanfilippo Tested-by: Michael Niewöhner Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_tis_core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 5b01a3df65a61f..c2421162cf3457 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -793,10 +793,15 @@ static void tpm_tis_gen_interrupt(struct tpm_chip *chip) cap_t cap; int ret; + chip->flags |= TPM_CHIP_FLAG_IRQ; + if (chip->flags & TPM_CHIP_FLAG_TPM2) ret = tpm2_get_tpm_pt(chip, 0x100, &cap2, desc); else ret = tpm1_getcap(chip, TPM_CAP_PROP_TIS_TIMEOUT, &cap, desc, 0); + + if (ret) + chip->flags &= ~TPM_CHIP_FLAG_IRQ; } /* Register the IRQ and issue a command that will cause an interrupt. If an From 898b48ae8e88624ae9a23f8ea702d9c7165c5bc1 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Wed, 26 Apr 2023 21:49:37 +0300 Subject: [PATCH 018/183] tpm: Re-enable TPM chip boostrapping non-tpm_tis TPM drivers commit 0c8862de05c1a087795ee0a87bf61a6394306cc0 upstream. TPM chip bootstrapping was removed from tpm_chip_register(), and it was relocated to tpm_tis_core. This breaks all drivers which are not based on tpm_tis because the chip will not get properly initialized. Take the corrective steps: 1. Rename tpm_chip_startup() as tpm_chip_bootstrap() and make it one-shot. 2. Call tpm_chip_bootstrap() in tpm_chip_register(), which reverts the things as tehy used to be. Cc: Lino Sanfilippo Fixes: 548eb516ec0f ("tpm, tpm_tis: startup chip before testing for interrupts") Reported-by: Pengfei Xu Link: https://lore.kernel.org/all/ZEjqhwHWBnxcaRV5@xpf.sh.intel.com/ Tested-by: Pengfei Xu Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm-chip.c | 22 +++++++++++++++++++--- drivers/char/tpm/tpm.h | 2 +- drivers/char/tpm/tpm_tis_core.c | 2 +- include/linux/tpm.h | 13 +++++++------ 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c index 6d7dea232fd097..69cf349c1bf2a0 100644 --- a/drivers/char/tpm/tpm-chip.c +++ b/drivers/char/tpm/tpm-chip.c @@ -602,13 +602,19 @@ static int tpm_get_pcr_allocation(struct tpm_chip *chip) } /* - * tpm_chip_startup() - performs auto startup and allocates the PCRs + * tpm_chip_bootstrap() - Boostrap TPM chip after power on * @chip: TPM chip to use. + * + * Initialize TPM chip after power on. This a one-shot function: subsequent + * calls will have no effect. */ -int tpm_chip_startup(struct tpm_chip *chip) +int tpm_chip_bootstrap(struct tpm_chip *chip) { int rc; + if (chip->flags & TPM_CHIP_FLAG_BOOTSTRAPPED) + return 0; + rc = tpm_chip_start(chip); if (rc) return rc; @@ -621,9 +627,15 @@ int tpm_chip_startup(struct tpm_chip *chip) stop: tpm_chip_stop(chip); + /* + * Unconditionally set, as driver initialization should cease, when the + * boostrapping process fails. + */ + chip->flags |= TPM_CHIP_FLAG_BOOTSTRAPPED; + return rc; } -EXPORT_SYMBOL_GPL(tpm_chip_startup); +EXPORT_SYMBOL_GPL(tpm_chip_bootstrap); /* * tpm_chip_register() - create a character device for the TPM chip @@ -640,6 +652,10 @@ int tpm_chip_register(struct tpm_chip *chip) { int rc; + rc = tpm_chip_bootstrap(chip); + if (rc) + return rc; + tpm_sysfs_add_device(chip); tpm_bios_log_setup(chip); diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 88d3bd76e0760d..f6c99b3f004589 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -263,7 +263,7 @@ static inline void tpm_msleep(unsigned int delay_msec) delay_msec * 1000); }; -int tpm_chip_startup(struct tpm_chip *chip); +int tpm_chip_bootstrap(struct tpm_chip *chip); int tpm_chip_start(struct tpm_chip *chip); void tpm_chip_stop(struct tpm_chip *chip); struct tpm_chip *tpm_find_get_ops(struct tpm_chip *chip); diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index c2421162cf3457..02945d53fcefaf 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -1139,7 +1139,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, init_waitqueue_head(&priv->read_queue); init_waitqueue_head(&priv->int_queue); - rc = tpm_chip_startup(chip); + rc = tpm_chip_bootstrap(chip); if (rc) goto out_err; diff --git a/include/linux/tpm.h b/include/linux/tpm.h index dfeb25a0362dee..cea64d58ef9f70 100644 --- a/include/linux/tpm.h +++ b/include/linux/tpm.h @@ -273,13 +273,14 @@ enum tpm2_cc_attrs { #define TPM_VID_ATML 0x1114 enum tpm_chip_flags { - TPM_CHIP_FLAG_TPM2 = BIT(1), - TPM_CHIP_FLAG_IRQ = BIT(2), - TPM_CHIP_FLAG_VIRTUAL = BIT(3), - TPM_CHIP_FLAG_HAVE_TIMEOUTS = BIT(4), - TPM_CHIP_FLAG_ALWAYS_POWERED = BIT(5), + TPM_CHIP_FLAG_BOOTSTRAPPED = BIT(0), + TPM_CHIP_FLAG_TPM2 = BIT(1), + TPM_CHIP_FLAG_IRQ = BIT(2), + TPM_CHIP_FLAG_VIRTUAL = BIT(3), + TPM_CHIP_FLAG_HAVE_TIMEOUTS = BIT(4), + TPM_CHIP_FLAG_ALWAYS_POWERED = BIT(5), TPM_CHIP_FLAG_FIRMWARE_POWER_MANAGED = BIT(6), - TPM_CHIP_FLAG_FIRMWARE_UPGRADE = BIT(7), + TPM_CHIP_FLAG_FIRMWARE_UPGRADE = BIT(7), }; #define to_tpm_chip(d) container_of(d, struct tpm_chip, dev) From 55c0114ca5cac99c8dce100da20b5bf651160316 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 16 Apr 2021 11:32:33 +0200 Subject: [PATCH 019/183] Revert "amba_pl011: Add cts-event-workaround DT property" This reverts commit 39ec3b8d17c6b3b1785be42e225d13b12a216bb0. Signed-off-by: Philipp Rosenberger Signed-off-by: Lukas Wunner --- Documentation/devicetree/bindings/serial/pl011.yaml | 6 ------ drivers/tty/serial/amba-pl011.c | 5 ----- 2 files changed, 11 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/pl011.yaml b/Documentation/devicetree/bindings/serial/pl011.yaml index 116ebba0bb3766..80af728598764a 100644 --- a/Documentation/devicetree/bindings/serial/pl011.yaml +++ b/Documentation/devicetree/bindings/serial/pl011.yaml @@ -100,12 +100,6 @@ properties: on the device. enum: [1, 4] - cts-event-workaround: - description: - Enables the (otherwise vendor-specific) workaround for the - CTS-induced TX lockup. - type: boolean - required: - compatible - reg diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index e90087292c79ad..5c64d3734225bf 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2814,11 +2814,6 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) if (IS_ERR(uap->clk)) return PTR_ERR(uap->clk); - if (of_property_read_bool(dev->dev.of_node, "cts-event-workaround")) { - vendor->cts_event_workaround = true; - dev_info(&dev->dev, "cts_event_workaround enabled\n"); - } - uap->reg_offset = vendor->reg_offset; uap->vendor = vendor; uap->fifosize = vendor->get_fifosize(dev); From 89d3f6ef0ccc9aa007fb2216f9dffec571b505a7 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 16 Apr 2021 11:31:34 +0200 Subject: [PATCH 020/183] Revert "amba_pl011: Insert mb() for correct FIFO handling" This reverts commit 5915ff691c6443d04c0524835ddaec532c499615. Signed-off-by: Philipp Rosenberger Signed-off-by: Lukas Wunner --- drivers/tty/serial/amba-pl011.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 5c64d3734225bf..fe7d0762565eb4 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1430,7 +1430,6 @@ static bool pl011_tx_char(struct uart_amba_port *uap, unsigned char c, return false; /* unable to transmit character */ pl011_write(c, uap, REG_DR); - mb(); uap->port.icount.tx++; return true; From 3c6dd7ba5c4c18e8086ce917e0aef4c41e315865 Mon Sep 17 00:00:00 2001 From: Oussama Ghorbel Date: Sun, 6 Nov 2016 00:16:02 +0100 Subject: [PATCH 021/183] usb: dwc_otg: fix system lockup when interrupts are threaded Fix lockup in dwc_otg driver that leads to a system freeze of the 4-core Raspberry Pi board when RT Preempt kernel is in use or when interrupts are threaded in general. The lockup occurs when the irq handler thread gets preempted while it holds the fiq spin lock. The patch makes sure to disable local irq while fiq spin lock is held irrespective of whether the interrupt is threaded or not. The patch also unifies the use of the fiq spin lock outside the fiq handler by introducing two function-like macros fiq_fsm_spin_lock_irqsave and fiq_fsm_spin_unlock_irqrestore. Under RT kernel, the bug can be reproduced in a few minutes by running hackbench and cyclictest in this way $ ( while true; do nice hackbench 30 >/dev/null; done )& $ echo "run 'kill $!' to stop hackbench" $ cyclictest -a -t -n -p 80 Signed-off-by: Oussama Ghorbel Signed-off-by: Lukas Wunner --- drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h | 14 +++++++ drivers/usb/host/dwc_otg/dwc_otg_hcd.c | 40 +++++++++----------- drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c | 39 ++++++++----------- drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c | 14 +++---- 4 files changed, 52 insertions(+), 55 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h index 86b4aaf977fb58..d5439c91416790 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h +++ b/drivers/usb/host/dwc_otg/dwc_otg_fiq_fsm.h @@ -396,4 +396,18 @@ extern void dwc_otg_fiq_fsm(struct fiq_state *state, int num_channels); extern void dwc_otg_fiq_nop(struct fiq_state *state); +#define fiq_fsm_spin_lock_irqsave(lock, flags) \ + do { \ + local_fiq_disable(); \ + local_irq_save(flags); \ + fiq_fsm_spin_lock(lock); \ + } while (0) + +#define fiq_fsm_spin_unlock_irqrestore(lock, flags) \ + do { \ + fiq_fsm_spin_unlock(lock); \ + local_irq_restore(flags); \ + local_fiq_enable(); \ + } while (0) + #endif /* DWC_OTG_FIQ_FSM_H_ */ diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c index e42d8ca89c0136..6280e4f11c5b76 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c @@ -1463,12 +1463,11 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) dwc_otg_hc_init(hcd->core_if, hc); - local_irq_save(flags); - if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); - } + if (fiq_enable) + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); + else + local_irq_save(flags); /* Enable the top level host channel interrupt. */ intr_enable = (1 << hc->hc_num); @@ -1478,12 +1477,10 @@ static void assign_and_init_hc(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) gintmsk.b.hcintr = 1; DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, 0, gintmsk.d32); - if (fiq_enable) { - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); - } - - local_irq_restore(flags); + if (fiq_enable) + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); + else + local_irq_restore(flags); hc->qh = qh; } @@ -1708,6 +1705,7 @@ int fiq_fsm_queue_isoc_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) int xfer_len, nrpackets; hcdma_data_t hcdma; hfnum_data_t hfnum; + unsigned long flags; if (st->fsm != FIQ_PASSTHROUGH) return 0; @@ -1783,8 +1781,7 @@ int fiq_fsm_queue_isoc_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hctsiz_copy.d32); fiq_print(FIQDBG_INT, hcd->fiq_state, "%08x", st->hcdma_copy.d32); hfnum.d32 = DWC_READ_REG32(&hcd->core_if->host_if->host_global_regs->hfnum); - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); DWC_WRITE_REG32(&hc_regs->hctsiz, st->hctsiz_copy.d32); DWC_WRITE_REG32(&hc_regs->hcsplt, st->hcsplt_copy.d32); DWC_WRITE_REG32(&hc_regs->hcdma, st->hcdma_copy.d32); @@ -1804,8 +1801,7 @@ int fiq_fsm_queue_isoc_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) } mb(); st->hcchar_copy.b.chen = 0; - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); return 0; } @@ -1831,6 +1827,7 @@ int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) /* Program HC registers, setup FIQ_state, examine FIQ if periodic, start transfer (not if uframe 5) */ int hub_addr, port_addr, frame, uframe; struct fiq_channel_state *st = &hcd->fiq_state->channel[hc->hc_num]; + unsigned long flags; /* * Non-periodic channel assignments stay in the non_periodic_active queue. @@ -1951,8 +1948,7 @@ int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) DWC_WRITE_REG32(&hc_regs->hcchar, st->hcchar_copy.d32); DWC_WRITE_REG32(&hc_regs->hcintmsk, st->hcintmsk_copy.d32); - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); if (hc->ep_type & 0x1) { hfnum.d32 = DWC_READ_REG32(&hcd->core_if->host_if->host_global_regs->hfnum); @@ -2061,8 +2057,7 @@ int fiq_fsm_queue_split_transaction(dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) DWC_WRITE_REG32(&hc_regs->hcchar, st->hcchar_copy.d32); } mb(); - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); return 0; } @@ -2543,6 +2538,7 @@ static void process_non_periodic_channels(dwc_otg_hcd_t * hcd) void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, dwc_otg_transaction_type_e tr_type) { + unsigned long flags; #ifdef DEBUG_SOF DWC_DEBUGPL(DBG_HCD, "Queue Transactions\n"); #endif @@ -2568,11 +2564,9 @@ void dwc_otg_hcd_queue_transactions(dwc_otg_hcd_t * hcd, gintmsk.b.nptxfempty = 1; if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, gintmsk.d32, 0); - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); } else { DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, gintmsk.d32, 0); } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c index 9d49b2b332276f..753fd6f1b6e91c 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c @@ -83,6 +83,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) gintmsk_data_t gintmsk; hfnum_data_t hfnum; haintmsk_data_t haintmsk; + unsigned long flags; #ifdef DEBUG dwc_otg_core_global_regs_t *global_regs = core_if->core_global_regs; @@ -100,8 +101,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) /* Check if HOST Mode */ if (dwc_otg_is_host_mode(core_if)) { if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&dwc_otg_hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&dwc_otg_hcd->fiq_state->lock, flags); /* Pull in from the FIQ's disabled mask */ gintmsk.d32 = gintmsk.d32 | ~(dwc_otg_hcd->fiq_state->gintmsk_saved.d32); dwc_otg_hcd->fiq_state->gintmsk_saved.d32 = ~0; @@ -118,8 +118,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) gintsts.d32 &= gintmsk.d32; if (fiq_enable) { - fiq_fsm_spin_unlock(&dwc_otg_hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&dwc_otg_hcd->fiq_state->lock, flags); } if (!gintsts.d32) { @@ -166,11 +165,9 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) gintmsk_data_t gintmsk = { .b.portintr = 1}; retval |= dwc_otg_hcd_handle_port_intr(dwc_otg_hcd); if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&dwc_otg_hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&dwc_otg_hcd->fiq_state->lock, flags); DWC_MODIFY_REG32(&dwc_otg_hcd->core_if->core_global_regs->gintmsk, 0, gintmsk.d32); - fiq_fsm_spin_unlock(&dwc_otg_hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&dwc_otg_hcd->fiq_state->lock, flags); } else { DWC_MODIFY_REG32(&dwc_otg_hcd->core_if->core_global_regs->gintmsk, 0, gintmsk.d32); } @@ -210,8 +207,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) if (fiq_enable) { gintmsk_data_t gintmsk_new; haintmsk_data_t haintmsk_new; - local_fiq_disable(); - fiq_fsm_spin_lock(&dwc_otg_hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&dwc_otg_hcd->fiq_state->lock, flags); gintmsk_new.d32 = *(volatile uint32_t *)&dwc_otg_hcd->fiq_state->gintmsk_saved.d32; if(fiq_fsm_enable) haintmsk_new.d32 = *(volatile uint32_t *)&dwc_otg_hcd->fiq_state->haintmsk_saved.d32; @@ -238,8 +234,7 @@ int32_t dwc_otg_hcd_handle_intr(dwc_otg_hcd_t * dwc_otg_hcd) haintmsk.d32 = DWC_READ_REG32(&core_if->host_if->host_global_regs->haintmsk); /* Re-enable interrupts that the FIQ masked (first time round) */ FIQ_WRITE(dwc_otg_hcd->fiq_state->dwc_regs_base + GINTMSK, gintmsk.d32); - fiq_fsm_spin_unlock(&dwc_otg_hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&dwc_otg_hcd->fiq_state->lock, flags); if ((jiffies / HZ) > last_time) { //dwc_otg_qh_t *qh; @@ -641,6 +636,7 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_otg_hcd_t * dwc_otg_hcd) { int i; int retval = 0; + unsigned long flags; haint_data_t haint = { .d32 = 0 } ; /* Clear appropriate bits in HCINTn to clear the interrupt bit in @@ -653,12 +649,10 @@ int32_t dwc_otg_hcd_handle_hc_intr(dwc_otg_hcd_t * dwc_otg_hcd) if(fiq_fsm_enable) { /* check the mask? */ - local_fiq_disable(); - fiq_fsm_spin_lock(&dwc_otg_hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&dwc_otg_hcd->fiq_state->lock, flags); haint.b2.chint |= ~(dwc_otg_hcd->fiq_state->haintmsk_saved.b2.chint); dwc_otg_hcd->fiq_state->haintmsk_saved.b2.chint = ~0; - fiq_fsm_spin_unlock(&dwc_otg_hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&dwc_otg_hcd->fiq_state->lock, flags); } for (i = 0; i < dwc_otg_hcd->core_if->core_params->host_channels; i++) { @@ -1065,6 +1059,7 @@ static void halt_channel(dwc_otg_hcd_t * hcd, dwc_hc_t * hc, dwc_otg_qtd_t * qtd, dwc_otg_halt_status_e halt_status) { + unsigned long flags; if (hcd->core_if->dma_enable) { release_channel(hcd, hc, qtd, halt_status); return; @@ -1087,11 +1082,9 @@ static void halt_channel(dwc_otg_hcd_t * hcd, */ gintmsk.b.nptxfempty = 1; if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); DWC_MODIFY_REG32(&global_regs->gintmsk, 0, gintmsk.d32); - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); } else { DWC_MODIFY_REG32(&global_regs->gintmsk, 0, gintmsk.d32); } @@ -1112,11 +1105,9 @@ static void halt_channel(dwc_otg_hcd_t * hcd, */ gintmsk.b.ptxfempty = 1; if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); DWC_MODIFY_REG32(&global_regs->gintmsk, 0, gintmsk.d32); - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); } else { DWC_MODIFY_REG32(&global_regs->gintmsk, 0, gintmsk.d32); } diff --git a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c index f51fad1e6b70af..bc980445b3aa52 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_queue.c @@ -675,6 +675,7 @@ static int schedule_periodic(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) { int status = 0; + unsigned long flags; gintmsk_data_t intr_mask = {.d32 = 0 }; if (!DWC_LIST_EMPTY(&qh->qh_list_entry)) { @@ -697,11 +698,9 @@ int dwc_otg_hcd_qh_add(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) if ( !hcd->periodic_qh_count ) { intr_mask.b.sofintr = 1; if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, intr_mask.d32, intr_mask.d32); - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); } else { DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, intr_mask.d32, intr_mask.d32); } @@ -745,6 +744,7 @@ static void deschedule_periodic(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) * @param qh QH to remove from schedule. */ void dwc_otg_hcd_qh_remove(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) { + unsigned long flags; gintmsk_data_t intr_mask = {.d32 = 0 }; if (DWC_LIST_EMPTY(&qh->qh_list_entry)) { @@ -766,11 +766,9 @@ void dwc_otg_hcd_qh_remove(dwc_otg_hcd_t * hcd, dwc_otg_qh_t * qh) if( !hcd->periodic_qh_count && !fiq_fsm_enable ) { intr_mask.b.sofintr = 1; if (fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, intr_mask.d32, 0); - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); } else { DWC_MODIFY_REG32(&hcd->core_if->core_global_regs->gintmsk, intr_mask.d32, 0); } From 9ffb1f8e977edf5f72a0a056cee8922e437c60ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sat, 16 Nov 2019 12:32:07 +0100 Subject: [PATCH 022/183] Fix USB/FIQ lock-ups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What I did - no rocket science [1]: * Applied RT-patches 4.19.72-rt26 on top of rpi-4.19.y / 4.19.79 (most recent version applying rt-patch properly) * Applied a slightly rebased version of the original (4.14) fiq-patch [2] * grepped for 'fiq_fsm_spin_lock(' and 'fiq_fsm_spin_unlock(' and added missing rt-specific replacements * rebased changes back to rpi-4.19.y-rt What this patch does: * add one missing pair of fiq_fsm_spin_lock/fiq_fsm_spin_unlock replacements With builds of [1] Rapsi3 is running without a singe issue for two weeks now and it was stressed by * moving gigabytes from USB-Stick to SDCard * several usb-midi-keyboard jam sessions Addresses [3] [1] https://github.com/schnitzeltony/meta-raspi-light/tree/master/recipes-kernel/linux [2] https://github.com/raspberrypi/linux/commit/05dd5c4368b56661786da5822d745818d8545d58 [3] https://github.com/raspberrypi/linux/issues/2943 Signed-off-by: Andreas Müller Signed-off-by: Lukas Wunner --- drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c index e1c1e380409531..51af9f5d8bef78 100644 --- a/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c +++ b/drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c @@ -1322,6 +1322,7 @@ static int32_t dwc_otg_handle_lpm_intr(dwc_otg_core_if_t * core_if) */ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if, gintmsk_data_t *reenable_gintmsk, dwc_otg_hcd_t *hcd) { + unsigned long flags; gahbcfg_data_t gahbcfg = {.d32 = 0 }; gintsts_data_t gintsts; gintmsk_data_t gintmsk; @@ -1345,8 +1346,7 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if, gin gintmsk_common.b.portintr = 1; } if(fiq_enable) { - local_fiq_disable(); - fiq_fsm_spin_lock(&hcd->fiq_state->lock); + fiq_fsm_spin_lock_irqsave(&hcd->fiq_state->lock, flags); gintsts.d32 = DWC_READ_REG32(&core_if->core_global_regs->gintsts); gintmsk.d32 = DWC_READ_REG32(&core_if->core_global_regs->gintmsk); /* Pull in the interrupts that the FIQ has masked */ @@ -1354,8 +1354,7 @@ static inline uint32_t dwc_otg_read_common_intr(dwc_otg_core_if_t * core_if, gin gintmsk.d32 |= gintmsk_common.d32; /* for the upstairs function to reenable - have to read it here in case FIQ triggers again */ reenable_gintmsk->d32 = gintmsk.d32; - fiq_fsm_spin_unlock(&hcd->fiq_state->lock); - local_fiq_enable(); + fiq_fsm_spin_unlock_irqrestore(&hcd->fiq_state->lock, flags); } else { gintsts.d32 = DWC_READ_REG32(&core_if->core_global_regs->gintsts); gintmsk.d32 = DWC_READ_REG32(&core_if->core_global_regs->gintmsk); From 66b4425be367f2c074b5f07e90ced0b0115986ac Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 6 Aug 2020 10:33:22 +0200 Subject: [PATCH 023/183] kbuild: Cross-compile binaries to build modules on target To build external modules, one needs executables such as fixdep and modpost. But when cross-compiling the kernel, those executables are only generated for the host arch, not the target arch. Distributions ship packages which users need to install in order to build external modules. These packages contain headers and Makefiles from the kernel source tree as well as fixdep & friends. Usually the packages are cross-built on a single host arch for the multitude of arches supported by the distribution. But because fixdep & friends are only compiled for the host arch, distributions are forced to duplicate these executables' Makefiles in order to cross-compile them. For instance, these are Debian's duplicated Makefiles: https://salsa.debian.org/kernel-team/linux/-/tree/master/debian/rules.d/scripts Make distribution maintainers' lives easier by providing a new target "make kbuild_install" which cross-compiles the required executables for the target arch and installs them below $(INSTALL_KBUILD_PATH). To avoid wasting compile time and disk space, compile only programs which are essential for building external modules. They are declared essential by adding them to extmodprogs. For now, these are: recordmcount sign-file fixdep genksyms modpost The rules to cross-compile the executables reside in Makefile.kbuildinst. They are similar to the rules in Makefile.host, but I've left out rules for C++ executables and shared libraries as they're not necessary. The host versions of the executables are generated in $(obj) whereas the cross-compiled versions are generated in $(obj)/.cross/ . This necessitates a modification of Makefile.lib because the multi_depend macro creates rules which assume that the target and its dependencies always reside in $(obj). Refactor the macro to use $(dir $1) in lieu of $(obj). Likewise, the target-stem macro strips $(obj)/ instead of $(obj)/.cross/. Refactor it to use $(notdir $@). In a future step, Makefile.kbuildinst may be extended to also install headers and other bits necessary for building external modules. Signed-off-by: Lukas Wunner --- Documentation/kbuild/kbuild.rst | 9 ++++ Documentation/kbuild/makefiles.rst | 15 ++++++ Makefile | 25 ++++++++- scripts/Makefile | 3 ++ scripts/Makefile.build | 7 +++ scripts/Makefile.clean | 4 ++ scripts/Makefile.kbuildinst | 81 ++++++++++++++++++++++++++++++ scripts/Makefile.lib | 4 +- scripts/basic/Makefile | 1 + scripts/genksyms/Makefile | 1 + scripts/mod/Makefile | 1 + 11 files changed, 148 insertions(+), 3 deletions(-) create mode 100644 scripts/Makefile.kbuildinst diff --git a/Documentation/kbuild/kbuild.rst b/Documentation/kbuild/kbuild.rst index 08f575e6236c71..9b900f4d5da938 100644 --- a/Documentation/kbuild/kbuild.rst +++ b/Documentation/kbuild/kbuild.rst @@ -237,6 +237,15 @@ The output directory is often set using "O=..." on the commandline. The value can be overridden in which case the default value is ignored. +INSTALL_KBUILD_PATH +------------------- +INSTALL_KBUILD_PATH specifies where to install a build environment for +external modules. + +The default value is:: + + /usr/src/linux-headers-$(KERNELVERSION) + KBUILD_ABS_SRCTREE -------------------------------------------------- Kbuild uses a relative path to point to the tree when possible. For instance, diff --git a/Documentation/kbuild/makefiles.rst b/Documentation/kbuild/makefiles.rst index 6b7368d1f51639..79ad6ffe362e56 100644 --- a/Documentation/kbuild/makefiles.rst +++ b/Documentation/kbuild/makefiles.rst @@ -913,6 +913,21 @@ Both possibilities are described in the following. This will tell kbuild to build lxdialog even if not referenced in any rule. +4.6 Host programs necessary to build external modules +----------------------------------------------------- + + If a host program is necessary to build external modules, + it shall be added to extmodprogs in addition to hostprogs. + + Example:: + + hostprogs := fixdep + extmodprogs := fixdep + + This ensures that the host program is installed to a module build + environment with "make kbuild_install". It will be cross-compiled + for the target architecture if necessary. + 5 Userspace Program support =========================== diff --git a/Makefile b/Makefile index a5cfcd0a85a9e2..258bc785d90eab 100644 --- a/Makefile +++ b/Makefile @@ -744,6 +744,11 @@ endif export KBUILD_MODULES KBUILD_BUILTIN +# Decide whether to install the build environment for external modules. +ifneq ($(filter kbuild_install,$(MAKECMDGOALS)),) + export KBUILD_INSTALL=y +endif + ifdef need-config include include/config/auto.conf endif @@ -1160,6 +1165,12 @@ export INSTALL_PATH ?= /boot # export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE) +# +# INSTALL_KBUILD_PATH specifies where to install the build environment for +# external modules. Can be overridden by passing it as an argument. +# +export INSTALL_KBUILD_PATH = /usr/src/linux-headers-$(KERNELVERSION) + # # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory # relocations required by build roots. This is not defined in the @@ -1694,7 +1705,9 @@ help: @echo ' kernelversion - Output the version stored in Makefile (use with make -s)' @echo ' image_name - Output the image name (use with make -s)' @echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \ - echo ' (default: $(INSTALL_HDR_PATH))'; \ + echo ' (default: $(INSTALL_HDR_PATH))' + @echo ' kbuild_install - Install module build environment to INSTALL_KBUILD_PATH'; \ + echo ' (default: $(INSTALL_KBUILD_PATH))'; \ echo '' @echo 'Static analysers:' @echo ' checkstack - Generate a list of stack hogs' @@ -1856,6 +1869,16 @@ PHONY += rust-analyzer rust-analyzer: $(Q)$(MAKE) $(build)=rust $@ + +# Module build environment target +# --------------------------------------------------------------------------- +PHONY += kbuild_install +kbuild_install: asm-generic + $(Q)$(MAKE) $(build)=scripts/basic + $(Q)$(MAKE) $(build)=scripts/mod + $(Q)$(MAKE) $(build)=scripts + + # Misc # --------------------------------------------------------------------------- diff --git a/scripts/Makefile b/scripts/Makefile index 1575af84d557bd..8fd19df0ba3b33 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -38,6 +38,9 @@ hostprogs += unifdef # The module linker script is preprocessed on demand targets += module.lds +extmodprogs += recordmcount +extmodprogs += sign-file + subdir-$(CONFIG_GCC_PLUGINS) += gcc-plugins subdir-$(CONFIG_MODVERSIONS) += genksyms subdir-$(CONFIG_SECURITY_SELINUX) += selinux diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 41f3602fc8de75..0c357b13e2119f 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -59,6 +59,13 @@ ifneq ($(userprogs),) include $(srctree)/scripts/Makefile.userprogs endif +# Do not include kbuild install rules unless needed. +ifneq ($(KBUILD_INSTALL),) +ifneq ($(extmodprogs),) +include scripts/Makefile.kbuildinst +endif +endif + ifndef obj $(warning kbuild: Makefile.build is included improperly) endif diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 878cec64895953..e7c81b2f18dbe5 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -34,6 +34,10 @@ __clean-files := \ $(hostprogs-always-y) $(hostprogs-always-m) $(hostprogs-always-) \ $(userprogs-always-y) $(userprogs-always-m) $(userprogs-always-) +ifneq ($(extmodprogs),) +__clean-files += .cross +endif + __clean-files := $(filter-out $(no-clean-files), $(__clean-files)) __clean-files := $(wildcard $(addprefix $(obj)/, $(__clean-files))) diff --git a/scripts/Makefile.kbuildinst b/scripts/Makefile.kbuildinst new file mode 100644 index 00000000000000..0b5825f9787e87 --- /dev/null +++ b/scripts/Makefile.kbuildinst @@ -0,0 +1,81 @@ +# SPDX-License-Identifier: GPL-2.0 + +# only install extmodprogs whose hostprogs counterpart is enabled +extmodprogs := $(sort $(filter $(extmodprogs),$(notdir $(always-y) $(always-m)))) + +ifneq ($(extmodprogs),) + +extmodprogs-install := $(addprefix $(INSTALL_KBUILD_PATH)/$(obj)/, $(extmodprogs)) + +ifneq ($(CROSS_COMPILE),) + +# ========================================================================== +# Cross-build binaries necessary to build modules on the target + +# C executables compiled from a single .c file +cross-csingle := $(foreach m,$(extmodprogs),$(if $($(m)-objs),,$(m))) + +# C executables linked from several .o files +cross-cmulti := $(foreach m,$(extmodprogs),$(if $($(m)-objs),$(m))) + +# Object .o files compiled from .c files +cross-cobjs := $(sort $(foreach m,$(cross-cmulti),$($(m)-objs))) + +cross-csingle := $(addprefix $(obj)/.cross/,$(cross-csingle)) +cross-cmulti := $(addprefix $(obj)/.cross/,$(cross-cmulti)) +cross-cobjs := $(addprefix $(obj)/.cross/,$(cross-cobjs)) + +# Create executable from a single .c file +# cross-csingle -> executable +quiet_cmd_cross-csingle = CC $@ + cmd_cross-csingle = $(CC) $(hostc_flags) $(KBUILD_HOSTLDFLAGS) -o $@ $< \ + $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) +$(cross-csingle): $(obj)/.cross/%: $(src)/%.c FORCE + $(call if_changed_dep,cross-csingle) + +# Link executable based on list of .o files, all plain C +# cross-cmulti -> executable +quiet_cmd_cross-cmulti = LD $@ + cmd_cross-cmulti = $(CC) $(KBUILD_HOSTLDFLAGS) -o $@ \ + $(addprefix $(obj)/.cross/, $($(target-stem)-objs)) \ + $(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(target-stem)) +$(cross-cmulti): FORCE + $(call if_changed,cross-cmulti) +$(call multi_depend, $(cross-cmulti), , -objs) + +# Create .o file from a single .c file +# cross-cobjs -> .o +# +# Some host-cobjs have special prerequisites. Apply them to cross-cobjs +# by letting the cross .o file depend on the host .o file. +quiet_cmd_cross-cobjs = CC $@ + cmd_cross-cobjs = $(CC) $(hostc_flags) -c -o $@ $< +$(cross-cobjs): $(obj)/.cross/%.o: $(src)/%.c $(obj)/%.o FORCE + $(call if_changed_dep,cross-cobjs) + +# ========================================================================== +# Install module build environment to $(INSTALL_KBUILD_PATH) +# +# When cross-compiling, install cross-compiled versions of the hostprogs. +# Else install the hostprogs directly. + +targets += $(cross-csingle) $(cross-cmulti) $(cross-cobjs) +always-y += $(cross-csingle) $(cross-cmulti) $(cross-cobjs) + +$(extmodprogs-install): $(INSTALL_KBUILD_PATH)/$(obj)/%: $(obj)/.cross/% + $(call cmd,extmodprogs_install,$(dir $@)) + +else # !CROSS_COMPILE + +$(extmodprogs-install): $(INSTALL_KBUILD_PATH)/$(obj)/%: $(obj)/% + $(call cmd,extmodprogs_install,$(dir $@)) + +endif # !CROSS_COMPILE + +quiet_cmd_extmodprogs_install = INSTALL $< + cmd_extmodprogs_install = mkdir -p $(2); cp $< $(2) + +targets += $(extmodprogs-install) +always-y += $(extmodprogs-install) + +endif # extmodprogs diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 8e90c3c38a83e0..2575235e0c189c 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -115,7 +115,7 @@ modname = $(subst $(space),:,$(__modname)) modfile = $(addprefix $(obj)/,$(__modname)) # target with $(obj)/ and its suffix stripped -target-stem = $(basename $(patsubst $(obj)/%,%,$@)) +target-stem = $(basename $(notdir $@)) # These flags are needed for modversions and compiling, so we define them here # $(modname_flags) defines KBUILD_MODNAME as the name of the module it will @@ -282,7 +282,7 @@ endif # CONFIG_OBJTOOL define multi_depend $(foreach m, $1, \ $(eval $m: \ - $(addprefix $(obj)/, $(call suffix-search, $(patsubst $(obj)/%,%,$m), $2, $3)))) + $(addprefix $(dir $m), $(call suffix-search, $(notdir $m), $2, $3)))) endef # Copy a file diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile index dd289a6725aca6..e590684568493d 100644 --- a/scripts/basic/Makefile +++ b/scripts/basic/Makefile @@ -3,6 +3,7 @@ # fixdep: used to generate dependency information during build process hostprogs-always-y += fixdep +extmodprogs += fixdep # randstruct: the seed is needed before building the gcc-plugin or # before running a Clang kernel build. diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index d6a422a63b6ad8..e689ac00fa2122 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 hostprogs-always-y += genksyms +extmodprogs += genksyms genksyms-objs := genksyms.o parse.tab.o lex.lex.o diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index c9e38ad937fd45..cd89384496069b 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -3,6 +3,7 @@ OBJECT_FILES_NON_STANDARD := y CFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO) hostprogs-always-y += modpost mk_elfconfig +extmodprogs += modpost always-y += empty.o modpost-objs := modpost.o file2alias.o sumversion.o From ec8708e2e211fc2649253d4162f693107db41fb4 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Wed, 13 Sep 2017 20:11:11 +0200 Subject: [PATCH 024/183] mux: Support settling time Muxes never switch from one stable state to another instantaneously. If a driver switches the mux, it needs to delay until the mux has settled or else the mux will be in an undefined state. The delay is specific to the hardware, so support setting a per-mux delay in the core and amend the gpio-mux driver to allow specifying the delay in the devicetree. Signed-off-by: Lukas Wunner --- Documentation/devicetree/bindings/mux/gpio-mux.yaml | 5 +++++ drivers/mux/core.c | 5 +++++ drivers/mux/gpio.c | 3 +++ include/linux/mux/driver.h | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/mux/gpio-mux.yaml b/Documentation/devicetree/bindings/mux/gpio-mux.yaml index ee4de9fbaf4d62..9af7691574c2bb 100644 --- a/Documentation/devicetree/bindings/mux/gpio-mux.yaml +++ b/Documentation/devicetree/bindings/mux/gpio-mux.yaml @@ -34,6 +34,11 @@ properties: idle-state: default: -1 + settling-time-us: + description: + Time required to switch from one stable mux state to another + (in microseconds). + required: - compatible - mux-gpios diff --git a/drivers/mux/core.c b/drivers/mux/core.c index 49bedbe6316c8a..3cffebb4a10b02 100644 --- a/drivers/mux/core.c +++ b/drivers/mux/core.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -144,6 +145,10 @@ static int mux_control_set(struct mux_control *mux, int state) { int ret = mux->chip->ops->set(mux, state); + if (mux->chip->settling_time) + usleep_range(mux->chip->settling_time, + mux->chip->settling_time + 50); + mux->cached_state = ret < 0 ? MUX_CACHE_UNKNOWN : state; if (ret >= 0) mux->last_change = ktime_get(); diff --git a/drivers/mux/gpio.c b/drivers/mux/gpio.c index cc5f2c1861d4a2..2ebe08a19c7759 100644 --- a/drivers/mux/gpio.c +++ b/drivers/mux/gpio.c @@ -82,6 +82,9 @@ static int mux_gpio_probe(struct platform_device *pdev) mux_chip->mux->idle_state = idle_state; } + device_property_read_u32(dev, "settling-time-us", + &mux_chip->settling_time); + ret = devm_mux_chip_register(dev, mux_chip); if (ret < 0) return ret; diff --git a/include/linux/mux/driver.h b/include/linux/mux/driver.h index 18824064f8c081..42ccf2505347ad 100644 --- a/include/linux/mux/driver.h +++ b/include/linux/mux/driver.h @@ -60,6 +60,9 @@ struct mux_control { * @dev: Device structure. * @id: Used to identify the device internally. * @ops: Mux controller operations. + * @settling_time: Usecs required to switch from one stable mux controller + * state to another. If nonzero the mux state may only be + * changed from process context. */ struct mux_chip { unsigned int controllers; @@ -68,6 +71,7 @@ struct mux_chip { int id; const struct mux_control_ops *ops; + u32 settling_time; }; #define to_mux_chip(x) container_of((x), struct mux_chip, dev) From 8faf260e831906078da356ccc890aa2bd8f620b2 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 9 Jan 2020 11:50:39 +0100 Subject: [PATCH 025/183] serial: pl011: Add console rs485 support Signed-off-by: Lukas Wunner --- drivers/tty/serial/amba-pl011.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index fe7d0762565eb4..29035ea1b6aac6 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -2323,6 +2323,7 @@ static void pl011_console_write(struct console *co, const char *s, unsigned int count) { struct uart_amba_port *uap = amba_ports[co->index]; + bool rs485_enabled = uap->port.rs485.flags & SER_RS485_ENABLED; unsigned int old_cr = 0, new_cr; unsigned long flags = 0; int locked = 1; @@ -2350,7 +2351,17 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) old_cr = pl011_read(uap, REG_CR); new_cr = old_cr & ~UART011_CR_CTSEN; new_cr |= UART01x_CR_UARTEN | UART011_CR_TXE; + if (rs485_enabled) { + if (uap->port.rs485.flags & SER_RS485_RTS_ON_SEND) + new_cr &= ~UART011_CR_RTS; + else + new_cr |= UART011_CR_RTS; + } + pl011_write(new_cr, uap, REG_CR); + + if (rs485_enabled) + mdelay(uap->port.rs485.delay_rts_before_send); } uart_console_write(&uap->port, s, count, pl011_console_putchar); @@ -2363,8 +2374,13 @@ pl011_console_write(struct console *co, const char *s, unsigned int count) while ((pl011_read(uap, REG_FR) ^ uap->vendor->inv_fr) & uap->vendor->fr_busy) cpu_relax(); - if (!uap->vendor->always_enabled) + + if (!uap->vendor->always_enabled) { + if (rs485_enabled) + mdelay(uap->port.rs485.delay_rts_after_send); + pl011_write(old_cr, uap, REG_CR); + } if (locked) spin_unlock_irqrestore(&uap->port.lock, flags); From d897daff1b79470ff087f31cc27ab54c5e6d0ff8 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Fri, 10 Jan 2020 16:55:33 +0100 Subject: [PATCH 026/183] printk: Unregister boot consoles on register of 1st real console The code comment preceding register_console() claims that: "There are two types of consoles - bootconsoles (early_printk) and "real" consoles (everything which is not a bootconsole) which are handled differently. [...] As soon as a "real" console is registered, all bootconsoles will be unregistered automatically." But that's not what the code does: The code unregisters bootconsoles only when the *preferred* console registers, i.e. the last one on the command line. If that console's driver never registers (e.g. because it is disabled in the kernel config), bootconsoles stay around indefinitely. Should the command line contain both a bootconsole as well as a real console on the same serial port, all messages are logged twice once the real console registers. Moreover, the log buffer is replayed once the real console registers even though the messages were already emitted by the bootconsole. Amend the code to be congruent with the above-quoted code comment and thereby avoid these issues. Signed-off-by: Lukas Wunner --- kernel/printk/printk.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 581f92acf05ace..efa728623b8996 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -3626,10 +3626,8 @@ void register_console(struct console *newcon) * the real console are the same physical device, it's annoying to * see the beginning boot messages twice */ - if (bootcon_enabled && - ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV)) { + if (bootcon_enabled && !(newcon->flags & CON_BOOT)) newcon->flags &= ~CON_PRINTBUFFER; - } /* * Put this console in the list - keep the @@ -3680,9 +3678,7 @@ void register_console(struct console *newcon) * went to the bootconsole (that they do not see on the real console) */ con_printk(KERN_INFO, newcon, "enabled\n"); - if (bootcon_enabled && - ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) && - !keep_bootcon) { + if (bootcon_enabled && !(newcon->flags & CON_BOOT) && !keep_bootcon) { for_each_console(con) if (con->flags & CON_BOOT) unregister_console(con); From 2a6bf28747afc2cf41e499e50f860ab6e294fb17 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Wed, 5 Jun 2019 15:30:01 +0200 Subject: [PATCH 027/183] tpm: Silence self test error if uninitialized If a TPM 2.0 chip has not been initialized by the platform firmware, a message "A TPM error (256) occurred attempting the self test" is emitted with KERN_ERR severity in addition to a KERN_INFO message "starting up the TPM manually". The former message is caused by tpm_transmit_cmd() misinterpreting the (expected) TPM2_RC_INITIALIZE response code as an error. The error message is particularly inappropriate on TPMs which are not used for integrity measurements but merely to store key material and which are hence not touched by the firmware. (In our case, a TPM attached to a Raspberry Pi.) Silence the error by adding the response code in question to the existing whitelist of allowed response codes. Signed-off-by: Lukas Wunner --- drivers/char/tpm/tpm-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index 7e513b7718320c..d4c2d3374ddb81 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -223,7 +223,7 @@ ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_buf *buf, err = be32_to_cpu(header->return_code); if (err != 0 && err != TPM_ERR_DISABLED && err != TPM_ERR_DEACTIVATED - && err != TPM2_RC_TESTING && desc) + && err != TPM2_RC_TESTING && err != TPM2_RC_INITIALIZE && desc) dev_err(&chip->dev, "A TPM error (%d) occurred %s\n", err, desc); if (err) From 90c95e253b02745df11ce55c8faa4e49e0dee0c3 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 21 Jun 2018 11:28:27 +0200 Subject: [PATCH 028/183] net: ks8851: Support interrupt polling On the first revision of the "RevPi Core" open source PLC, the ks8851 interrupt pin is not connected. Work around by polling the interrupt once per millisecond. Cc: Ben Dooks Cc: Tristram Ha Cc: David J. Choi Signed-off-by: Lukas Wunner --- drivers/net/ethernet/micrel/ks8851.h | 3 ++ drivers/net/ethernet/micrel/ks8851_common.c | 52 +++++++++++++++++---- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/micrel/ks8851.h b/drivers/net/ethernet/micrel/ks8851.h index fecd43754cead1..3afe7656060db6 100644 --- a/drivers/net/ethernet/micrel/ks8851.h +++ b/drivers/net/ethernet/micrel/ks8851.h @@ -368,6 +368,7 @@ union ks8851_tx_hdr { * @start_xmit: start_xmit() implementation callback * @rx_skb: rx_skb() implementation callback * @flush_tx_work: flush_tx_work() implementation callback + * @irqpoll: Optional kthread to poll for interrupts if IRQ is not connected * * The @statelock is used to protect information in the structure which may * need to be accessed via several sources, such as the network driver layer @@ -423,6 +424,8 @@ struct ks8851_net { void (*rx_skb)(struct ks8851_net *ks, struct sk_buff *skb); void (*flush_tx_work)(struct ks8851_net *ks); + + struct task_struct *irqpoll; }; int ks8851_probe_common(struct net_device *netdev, struct device *dev, diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethernet/micrel/ks8851_common.c index cfbc900d4aeb9e..235bca5b09c5e4 100644 --- a/drivers/net/ethernet/micrel/ks8851_common.c +++ b/drivers/net/ethernet/micrel/ks8851_common.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -347,6 +348,11 @@ static irqreturn_t ks8851_irq(int irq, void *_ks) netif_dbg(ks, intr, ks->netdev, "%s: status 0x%04x\n", __func__, status); + if (!status) { + ks8851_unlock(ks, &flags); + return IRQ_NONE; + } + if (status & IRQ_LCI) handled |= IRQ_LCI; @@ -420,6 +426,18 @@ static irqreturn_t ks8851_irq(int irq, void *_ks) return IRQ_HANDLED; } +static int ks8851_irqpoll(void *data) +{ + struct ks8851_net *ks = data; + + while (!kthread_should_stop()) { + ks8851_irq(IRQ_NOTCONNECTED, ks); + usleep_range(800, 1000); + } + + return 0; +} + /** * ks8851_flush_tx_work - flush outstanding TX work * @ks: The device state @@ -443,12 +461,23 @@ static int ks8851_net_open(struct net_device *dev) unsigned long flags; int ret; - ret = request_threaded_irq(dev->irq, NULL, ks8851_irq, - IRQF_TRIGGER_LOW | IRQF_ONESHOT, - dev->name, ks); - if (ret < 0) { - netdev_err(dev, "failed to get irq\n"); - return ret; + if (dev->irq > 0) { + ret = request_threaded_irq(dev->irq, NULL, ks8851_irq, + IRQF_TRIGGER_LOW | IRQF_ONESHOT, + dev->name, ks); + if (ret < 0) { + netdev_err(dev, "failed to get irq\n"); + return ret; + } + } else { + ks->irqpoll = kthread_create(&ks8851_irqpoll, ks, "irqpoll/%s", + dev->name); + if (IS_ERR(ks->irqpoll)) { + netdev_err(dev, "failed to create irqpoll thread\n"); + return PTR_ERR(ks->irqpoll); + } + + sched_set_fifo(ks->irqpoll); } /* lock the card, even if we may not actually be doing anything @@ -500,6 +529,9 @@ static int ks8851_net_open(struct net_device *dev) ks8851_wrreg16(ks, KS_ISR, ks->rc_ier); ks8851_wrreg16(ks, KS_IER, ks->rc_ier); + if (ks->irqpoll) + wake_up_process(ks->irqpoll); + netif_start_queue(ks->netdev); netif_dbg(ks, ifup, ks->netdev, "network device up\n"); @@ -557,7 +589,10 @@ static int ks8851_net_stop(struct net_device *dev) dev_kfree_skb(txb); } - free_irq(dev->irq, ks); + if (dev->irq > 0) + free_irq(dev->irq, ks); + else + kthread_stop(ks->irqpoll); return 0; } @@ -1228,8 +1263,9 @@ int ks8851_probe_common(struct net_device *netdev, struct device *dev, goto err_id; } - netdev_info(netdev, "revision %d, MAC %pM, IRQ %d, %s EEPROM\n", + netdev_info(netdev, "revision %d, MAC %pM, IRQ %d%s, %s EEPROM\n", CIDER_REV_GET(cider), netdev->dev_addr, netdev->irq, + netdev->irq <= 0 ? " (polling)" : "", ks->rc_ccr & CCR_EEPROM ? "has" : "no"); return 0; From a5f00489b2755f708848a0032f02052b8f536aa4 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 2 Dec 2018 16:18:47 +0100 Subject: [PATCH 029/183] net: ks8851: Transmit packets in dedicated kthread Transmission of packets is initiated in softirq context, hence cannot sleep. Because sleeping is required for use of the SPI bus, the ks8851 driver defers transmission to the work item ks8851_tx_work(). Communication with RevPi Gates should happen with realtime priority to keep packet latency low. That is cumbersome to implement with a work item because it shares the worker thread with other work items and thus would have to raise the worker thread's RT priority at the beginning and lower it at the end of ks8851_tx_work(). Migrate the driver to a dedicated kthread for transmission of packets to avoid this overhead by letting the kthread stay at RT priority for consecutive packets sent to a RevPi Gate. Signed-off-by: Lukas Wunner --- drivers/net/ethernet/micrel/ks8851.h | 3 +- drivers/net/ethernet/micrel/ks8851_common.c | 29 +++++++++-- drivers/net/ethernet/micrel/ks8851_spi.c | 58 ++++++++++++++++----- 3 files changed, 70 insertions(+), 20 deletions(-) diff --git a/drivers/net/ethernet/micrel/ks8851.h b/drivers/net/ethernet/micrel/ks8851.h index 3afe7656060db6..d0f7424a11f4f3 100644 --- a/drivers/net/ethernet/micrel/ks8851.h +++ b/drivers/net/ethernet/micrel/ks8851.h @@ -423,7 +423,8 @@ struct ks8851_net { struct net_device *dev); void (*rx_skb)(struct ks8851_net *ks, struct sk_buff *skb); - void (*flush_tx_work)(struct ks8851_net *ks); + int (*start_tx_thread)(struct ks8851_net *ks); + void (*stop_tx_thread)(struct ks8851_net *ks); struct task_struct *irqpoll; }; diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethernet/micrel/ks8851_common.c index 235bca5b09c5e4..54e0a11f94cf69 100644 --- a/drivers/net/ethernet/micrel/ks8851_common.c +++ b/drivers/net/ethernet/micrel/ks8851_common.c @@ -438,14 +438,22 @@ static int ks8851_irqpoll(void *data) return 0; } +static int ks8851_start_tx_thread(struct ks8851_net *ks) +{ + if (ks->start_tx_thread) + return ks->start_tx_thread(ks); + + return 0; +} + /** - * ks8851_flush_tx_work - flush outstanding TX work + * ks8851_stop_tx_thread - stop TX kthread * @ks: The device state */ -static void ks8851_flush_tx_work(struct ks8851_net *ks) +static void ks8851_stop_tx_thread(struct ks8851_net *ks) { - if (ks->flush_tx_work) - ks->flush_tx_work(ks); + if (ks->stop_tx_thread) + ks->stop_tx_thread(ks); } /** @@ -480,6 +488,10 @@ static int ks8851_net_open(struct net_device *dev) sched_set_fifo(ks->irqpoll); } + ret = ks8851_start_tx_thread(ks); + if (ret) + goto err_tx_thread; + /* lock the card, even if we may not actually be doing anything * else at the moment */ ks8851_lock(ks, &flags); @@ -539,6 +551,13 @@ static int ks8851_net_open(struct net_device *dev) ks8851_unlock(ks, &flags); mii_check_link(&ks->mii); return 0; + +err_tx_thread: + if (dev->irq > 0) + free_irq(dev->irq, ks); + else + kthread_stop(ks->irqpoll); + return ret; } /** @@ -565,7 +584,7 @@ static int ks8851_net_stop(struct net_device *dev) ks8851_unlock(ks, &flags); /* stop any outstanding work */ - ks8851_flush_tx_work(ks); + ks8851_stop_tx_thread(ks); flush_work(&ks->rxctrl_work); ks8851_lock(ks, &flags); diff --git a/drivers/net/ethernet/micrel/ks8851_spi.c b/drivers/net/ethernet/micrel/ks8851_spi.c index 70bc7253454f6b..0a0b7032f75930 100644 --- a/drivers/net/ethernet/micrel/ks8851_spi.c +++ b/drivers/net/ethernet/micrel/ks8851_spi.c @@ -31,7 +31,7 @@ static int msg_enable; /** * struct ks8851_net_spi - KS8851 SPI driver private data * @lock: Lock to ensure that the device is not accessed when busy. - * @tx_work: Work queue for tx packets + * @tx_thread: Thread for sending TX packets. * @ks8851: KS8851 driver common private data * @spidev: The spi device we're bound to. * @spi_msg1: pre-setup SPI transfer with one message, @spi_xfer1. @@ -47,7 +47,7 @@ static int msg_enable; struct ks8851_net_spi { struct ks8851_net ks8851; struct mutex lock; - struct work_struct tx_work; + struct task_struct *tx_thread; struct spi_device *spidev; struct spi_message spi_msg1; struct spi_message spi_msg2; @@ -298,21 +298,17 @@ static void ks8851_rx_skb_spi(struct ks8851_net *ks, struct sk_buff *skb) /** * ks8851_tx_work - process tx packet(s) - * @work: The work strucutre what was scheduled. + * @ks: The device state. * * This is called when a number of packets have been scheduled for * transmission and need to be sent to the device. */ -static void ks8851_tx_work(struct work_struct *work) +static void ks8851_tx_work(struct ks8851_net *ks) { - struct ks8851_net_spi *kss; - struct ks8851_net *ks; unsigned long flags; struct sk_buff *txb; bool last; - kss = container_of(work, struct ks8851_net_spi, tx_work); - ks = &kss->ks8851; last = skb_queue_empty(&ks->txq); ks8851_lock_spi(ks, &flags); @@ -335,15 +331,49 @@ static void ks8851_tx_work(struct work_struct *work) ks8851_unlock_spi(ks, &flags); } +static int ks8851_tx_thread(void *data) +{ + struct ks8851_net *ks = data; + + while (true) { + ks8851_tx_work(ks); + set_current_state(TASK_IDLE); + if (kthread_should_stop()) { + __set_current_state(TASK_RUNNING); + break; + } + if (!skb_queue_empty(&ks->txq)) { + __set_current_state(TASK_RUNNING); + continue; + } + schedule(); + } + + return 0; +} + +static int ks8851_start_tx_thread_spi(struct ks8851_net *ks) +{ + struct ks8851_net_spi *kss = to_ks8851_spi(ks); + + kss->tx_thread = kthread_run(&ks8851_tx_thread, ks, "ks8851_tx"); + if (IS_ERR(kss->tx_thread)) { + netdev_err(ks->netdev, "failed to create tx thread\n"); + return PTR_ERR(kss->tx_thread); + } + + return 0; +} + /** - * ks8851_flush_tx_work_spi - flush outstanding TX work + * ks8851_stop_tx_thread_spi - stop TX kthread * @ks: The device state */ -static void ks8851_flush_tx_work_spi(struct ks8851_net *ks) +static void ks8851_stop_tx_thread_spi(struct ks8851_net *ks) { struct ks8851_net_spi *kss = to_ks8851_spi(ks); - flush_work(&kss->tx_work); + kthread_stop(kss->tx_thread); } /** @@ -395,7 +425,7 @@ static netdev_tx_t ks8851_start_xmit_spi(struct sk_buff *skb, } spin_unlock(&ks->statelock); - schedule_work(&kss->tx_work); + wake_up_process(kss->tx_thread); return ret; } @@ -424,7 +454,8 @@ static int ks8851_probe_spi(struct spi_device *spi) ks->wrfifo = ks8851_wrfifo_spi; ks->start_xmit = ks8851_start_xmit_spi; ks->rx_skb = ks8851_rx_skb_spi; - ks->flush_tx_work = ks8851_flush_tx_work_spi; + ks->start_tx_thread = ks8851_start_tx_thread_spi; + ks->stop_tx_thread = ks8851_stop_tx_thread_spi; #define STD_IRQ (IRQ_LCI | /* Link Change */ \ IRQ_TXI | /* TX done */ \ @@ -436,7 +467,6 @@ static int ks8851_probe_spi(struct spi_device *spi) kss->spidev = spi; mutex_init(&kss->lock); - INIT_WORK(&kss->tx_work, ks8851_tx_work); /* initialise pre-made spi transfer messages */ spi_message_init(&kss->spi_msg1); From d2559cb856f8931f6709e8f957aae7acba017ad4 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Mon, 3 Dec 2018 05:04:25 +0100 Subject: [PATCH 030/183] net: ks8851: Transmit packets with realtime priority Communication with RevPi Gates should happen with realtime priority to keep packet latency low. Switch the kthread for transmission of packets to RT priority or normal priority depending on a packet's priority. For consecutive packets of identical priority, minimize the overhead by leaving the kthread's priority untouched. Signed-off-by: Lukas Wunner --- drivers/net/ethernet/micrel/ks8851_spi.c | 13 +++++++++++++ include/uapi/linux/pkt_sched.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/net/ethernet/micrel/ks8851_spi.c b/drivers/net/ethernet/micrel/ks8851_spi.c index 0a0b7032f75930..77a6763169f754 100644 --- a/drivers/net/ethernet/micrel/ks8851_spi.c +++ b/drivers/net/ethernet/micrel/ks8851_spi.c @@ -296,6 +296,17 @@ static void ks8851_rx_skb_spi(struct ks8851_net *ks, struct sk_buff *skb) netif_rx(skb); } +static void ks8851_adjust_prio(struct sk_buff *txb) +{ + if (txb->priority == TC_PRIO_REALTIME) { + if (!current->rt_priority) + sched_set_fifo(current); + } else { + if (current->rt_priority) + sched_set_normal(current, 0); + } +} + /** * ks8851_tx_work - process tx packet(s) * @ks: The device state. @@ -318,6 +329,8 @@ static void ks8851_tx_work(struct ks8851_net *ks) last = skb_queue_empty(&ks->txq); if (txb) { + ks8851_adjust_prio(txb); + ks8851_wrreg16_spi(ks, KS_RXQCR, ks->rc_rxqcr | RXQCR_SDA); ks8851_wrfifo_spi(ks, txb, last); diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h index 000eec106856a4..36a61498986c0f 100644 --- a/include/uapi/linux/pkt_sched.h +++ b/include/uapi/linux/pkt_sched.h @@ -24,6 +24,7 @@ #define TC_PRIO_INTERACTIVE_BULK 4 #define TC_PRIO_INTERACTIVE 6 #define TC_PRIO_CONTROL 7 +#define TC_PRIO_REALTIME 8 #define TC_PRIO_MAX 15 From 3b986cb2fed77184e4660736fd49e0d5b32c06eb Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Tue, 27 Apr 2021 13:06:29 +0200 Subject: [PATCH 031/183] net: ks8851: Add delay after vdd regulator enable The reset gpio of KSZ8851 on the RevPi Core and RevPi Connect is inverted. The reset circuit also has a buffer which keeps the KSZ8851 upto 80ms in reset even if the reset pin was released. To workaround the issue without totally breaking the driver on other boards the reset is implemented as a fixed regulator. This makes it possible to workaround the inverted polarity and the 80ms of the buffer. The actuall reset of at least 10ms is not reached with this workaround. So we add an extra delay after the vdd regulator is enabled. Signed-off-by: Philipp Rosenberger Signed-off-by: Lukas Wunner --- drivers/net/ethernet/micrel/ks8851_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethernet/micrel/ks8851_common.c index 54e0a11f94cf69..527baf25f477c4 100644 --- a/drivers/net/ethernet/micrel/ks8851_common.c +++ b/drivers/net/ethernet/micrel/ks8851_common.c @@ -1205,6 +1205,8 @@ int ks8851_probe_common(struct net_device *netdev, struct device *dev, if (IS_ERR(ks->vdd_reg)) { ret = PTR_ERR(ks->vdd_reg); goto err_reg; + } else if (ks->vdd_reg) { + usleep_range(10000, 11000); } ret = regulator_enable(ks->vdd_reg); From 71e794b501fcfe81682a500d871c82054bfc133c Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 21 Mar 2022 13:43:31 +0100 Subject: [PATCH 032/183] Revert "sched: Remove sched_setscheduler*() EXPORTs" This reverts commit 616d91b68cd56bcb1954b6a5af7d542401fde772. PiControl needs to set the RT priority for some threads. Until we have a different solution for this we will revert this change. Signed-off-by: Philipp Rosenberger Signed-off-by: Lukas Wunner --- kernel/sched/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 8989559d3d3c22..b6d3f101b8056c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -7867,11 +7867,13 @@ int sched_setscheduler(struct task_struct *p, int policy, { return _sched_setscheduler(p, policy, param, true); } +EXPORT_SYMBOL_GPL(sched_setscheduler); int sched_setattr(struct task_struct *p, const struct sched_attr *attr) { return __sched_setscheduler(p, attr, true, true); } +EXPORT_SYMBOL_GPL(sched_setattr); int sched_setattr_nocheck(struct task_struct *p, const struct sched_attr *attr) { @@ -7897,6 +7899,7 @@ int sched_setscheduler_nocheck(struct task_struct *p, int policy, { return _sched_setscheduler(p, policy, param, false); } +EXPORT_SYMBOL_GPL(sched_setscheduler_nocheck); /* * SCHED_FIFO is a broken scheduler model; that is, it is fundamentally From 36add2b398f622bbb0192e981402b765a6a21f89 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Mon, 29 Jan 2018 09:17:13 +0100 Subject: [PATCH 033/183] kthread: Export kthreadd_task and tasklist_lock For piControl to be able to set the realtime priority of certain kthreads, it needs to acquire tasklist_lock and iterate over the children of kthreadd_task. Export both symbols to facilitate this. Signed-off-by: Lukas Wunner --- kernel/fork.c | 1 + kernel/kthread.c | 1 + 2 files changed, 2 insertions(+) diff --git a/kernel/fork.c b/kernel/fork.c index ec913b13c5edbb..bafff29ed2a36e 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -139,6 +139,7 @@ static const char * const resident_page_types[] = { DEFINE_PER_CPU(unsigned long, process_counts) = 0; __cacheline_aligned DEFINE_RWLOCK(tasklist_lock); /* outer */ +EXPORT_SYMBOL(tasklist_lock); #ifdef CONFIG_PROVE_RCU int lockdep_tasklist_lock_is_held(void) diff --git a/kernel/kthread.c b/kernel/kthread.c index f97fd01a29325f..d19dac77547f89 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -34,6 +34,7 @@ static DEFINE_SPINLOCK(kthread_create_lock); static LIST_HEAD(kthread_create_list); struct task_struct *kthreadd_task; +EXPORT_SYMBOL(kthreadd_task); struct kthread_create_info { From d590f4935c591d7c43fee21db23be4b91dcecca6 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Tue, 18 Jul 2017 12:07:16 +0200 Subject: [PATCH 034/183] driver core: Export device_is_bound() We're about to add the first module user of device_is_bound(), so export it. The module user is gpio-max3191x.c, a GPIO driver for Maxim MAX3191x industrial serializers. It offers an in-kernel API to change its operating mode and the API needs to ensure that the driver is bound to the device and has finished probing before accessing its data structures. Cc: Tomeu Vizoso Cc: Greg Kroah-Hartman Signed-off-by: Lukas Wunner --- drivers/base/dd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 97ab1468a87609..7372fffeadafb6 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -389,6 +389,7 @@ bool device_is_bound(struct device *dev) { return dev->p && klist_node_attached(&dev->p->knode_driver); } +EXPORT_SYMBOL_GPL(device_is_bound); static void driver_bound(struct device *dev) { From 210820a65e2217bc3ff84aef2226d5bc41b310ea Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Mon, 24 Jul 2017 17:01:22 +0200 Subject: [PATCH 035/183] gpio: max3191x: Allow in-kernel configuration of modesel pin Allow switching back and forth between 16-bit and 8-bit mode, prioritizing either safety or speed. Signed-off-by: Lukas Wunner --- drivers/gpio/gpio-max3191x.c | 62 +++++++++++++++++++++++++++++++++--- include/linux/spi/max3191x.h | 20 ++++++++++++ 2 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 include/linux/spi/max3191x.h diff --git a/drivers/gpio/gpio-max3191x.c b/drivers/gpio/gpio-max3191x.c index 161c4751c5f7a0..087a854b9605ae 100644 --- a/drivers/gpio/gpio-max3191x.c +++ b/drivers/gpio/gpio-max3191x.c @@ -36,13 +36,9 @@ #include #include #include +#include #include -enum max3191x_mode { - STATUS_BYTE_ENABLED, - STATUS_BYTE_DISABLED, -}; - /** * struct max3191x_chip - max3191x daisy-chain * @gpio: GPIO controller struct @@ -329,6 +325,62 @@ static void gpiod_set_array_single_value_cansleep(unsigned int ndescs, bitmap_free(values); } +/** + * max3191x_set_mode() - configure modesel pin of a max3191x daisy-chain + * @dev: device + * @mode: 0 for 16-bit mode, 1 for 8-bit mode + * + * Return 0 on success, + * -EAGAIN if the driver has not yet finished probing, + * -EINVAL if @mode argument is invalid or if the modesel pin is not + * configurable (hardwired and not specified in devicetree). + */ +int max3191x_set_mode(struct device *dev, enum max3191x_mode mode) +{ + struct max3191x_chip *max3191x; + struct spi_device *spi; + int ret = 0; + + if (mode != STATUS_BYTE_ENABLED && mode != STATUS_BYTE_DISABLED) + return -EINVAL; + + device_lock(dev); + if (!device_is_bound(dev)) { + ret = -EAGAIN; + goto out_unlock; + } + + spi = to_spi_device(dev); + max3191x = spi_get_drvdata(spi); + if (max3191x->mode == mode) + goto out_unlock; + if (!max3191x->modesel_pins) { + ret = -EINVAL; + goto out_unlock; + } + + mutex_lock(&max3191x->lock); + max3191x->mode = mode; + gpiod_set_array_single_value_cansleep(max3191x->modesel_pins->ndescs, + max3191x->modesel_pins->desc, + max3191x->modesel_pins->info, + mode); + max3191x->xfer.len = max3191x->nchips * max3191x_wordlen(max3191x); + if (mode == STATUS_BYTE_DISABLED) { + /* reset all bitmaps */ + bitmap_zero(max3191x->crc_error, max3191x->nchips); + bitmap_zero(max3191x->overtemp, max3191x->nchips); + bitmap_zero(max3191x->undervolt1, max3191x->nchips); + bitmap_zero(max3191x->undervolt2, max3191x->nchips); + } + mutex_unlock(&max3191x->lock); + +out_unlock: + device_unlock(dev); + return ret; +} +EXPORT_SYMBOL(max3191x_set_mode); + static struct gpio_descs *devm_gpiod_get_array_optional_count( struct device *dev, const char *con_id, enum gpiod_flags flags, unsigned int expected) diff --git a/include/linux/spi/max3191x.h b/include/linux/spi/max3191x.h new file mode 100644 index 00000000000000..3a0cc50add74c8 --- /dev/null +++ b/include/linux/spi/max3191x.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * max3191x.h - in-kernel API for Maxim MAX3191x industrial serializer + * + * Copyright (C) 2017 KUNBUS GmbH + */ + +#ifndef _MAX3191X_H_ +#define _MAX3191X_H_ + +#include + +enum max3191x_mode { + STATUS_BYTE_ENABLED, + STATUS_BYTE_DISABLED, +}; + +int max3191x_set_mode(struct device *dev, enum max3191x_mode mode); + +#endif From 83b723e93c083714fda0b7be67476c0aeb69501f Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 17 Sep 2017 21:38:09 +0200 Subject: [PATCH 036/183] gpio: max3191x: Allow in-kernel retrieval of chip status KUNBUS' out-of-tree picontrol.ko module polls all available max3191x chips and stores their input values as well as status bits in the process image. While the input values are retrievable using the GPIO consumer API, the status bits are inaccessible outside the max3191x driver. Add an in-kernel API to facilitate their retrieval. Signed-off-by: Lukas Wunner --- drivers/gpio/gpio-max3191x.c | 33 +++++++++++++++++++++++++++++++++ include/linux/spi/max3191x.h | 1 + 2 files changed, 34 insertions(+) diff --git a/drivers/gpio/gpio-max3191x.c b/drivers/gpio/gpio-max3191x.c index 087a854b9605ae..f0215191d421a9 100644 --- a/drivers/gpio/gpio-max3191x.c +++ b/drivers/gpio/gpio-max3191x.c @@ -381,6 +381,39 @@ int max3191x_set_mode(struct device *dev, enum max3191x_mode mode) } EXPORT_SYMBOL(max3191x_set_mode); +/** + * max3191x_get_status - retrieve chip status + * @dev: device + * + * Return 0 if chip is healthy, or a bitmask indicating fault conditions. + * Currently only the first chip in a daisy chain is considered, which is + * sufficient for the RevPi Compact. + */ +u8 max3191x_get_status(struct device *dev) +{ + struct max3191x_chip *max3191x; + struct spi_device *spi; + u8 ret; + + device_lock(dev); + if (!device_is_bound(dev)) { + ret = 0; + goto out_unlock; + } + + spi = to_spi_device(dev); + max3191x = spi_get_drvdata(spi); + + ret = test_bit(0, max3191x->crc_error) << 7 | + test_bit(0, max3191x->overtemp) << 4 | + test_bit(0, max3191x->fault); + +out_unlock: + device_unlock(dev); + return ret; +} +EXPORT_SYMBOL(max3191x_get_status); + static struct gpio_descs *devm_gpiod_get_array_optional_count( struct device *dev, const char *con_id, enum gpiod_flags flags, unsigned int expected) diff --git a/include/linux/spi/max3191x.h b/include/linux/spi/max3191x.h index 3a0cc50add74c8..f62146e579e2e3 100644 --- a/include/linux/spi/max3191x.h +++ b/include/linux/spi/max3191x.h @@ -16,5 +16,6 @@ enum max3191x_mode { }; int max3191x_set_mode(struct device *dev, enum max3191x_mode mode); +u8 max3191x_get_status(struct device *dev); #endif From 1807e340ecb021636537f21998857e691f809bd2 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 7 Sep 2020 13:24:02 +0200 Subject: [PATCH 037/183] usbnet: smsc95xx: Fix indentation of smsc95xx_is_macaddr_param() smsc95xx_is_macaddr_param() is incorrectly indented, it uses 7 spaces instead of tabs. Fix it. Fixes: aac7b105788e ("Allow mac address to be set in smsc95xx") Signed-off-by: Philipp Rosenberger [lukas: fix netif_dbg() indentation as well, wordsmith commit message] Signed-off-by: Lukas Wunner --- drivers/net/usb/smsc95xx.c | 82 +++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 1ad90b08e97d63..2776a568a63f43 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -814,47 +814,47 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) /* Check the macaddr module parameter for a MAC address */ static int smsc95xx_is_macaddr_param(struct usbnet *dev, struct net_device *nd) { - int i, j, got_num, num; - u8 mtbl[ETH_ALEN]; - - if (macaddr[0] == ':') - return 0; - - i = 0; - j = 0; - num = 0; - got_num = 0; - while (j < ETH_ALEN) { - if (macaddr[i] && macaddr[i] != ':') { - got_num++; - if ('0' <= macaddr[i] && macaddr[i] <= '9') - num = num * 16 + macaddr[i] - '0'; - else if ('A' <= macaddr[i] && macaddr[i] <= 'F') - num = num * 16 + 10 + macaddr[i] - 'A'; - else if ('a' <= macaddr[i] && macaddr[i] <= 'f') - num = num * 16 + 10 + macaddr[i] - 'a'; - else - break; - i++; - } else if (got_num == 2) { - mtbl[j++] = (u8) num; - num = 0; - got_num = 0; - i++; - } else { - break; - } - } - - if (j == ETH_ALEN) { - netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: " - "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], mtbl[2], - mtbl[3], mtbl[4], mtbl[5]); - dev_addr_mod(nd, 0, mtbl, ETH_ALEN); - return 1; - } else { - return 0; - } + int i, j, got_num, num; + u8 mtbl[ETH_ALEN]; + + if (macaddr[0] == ':') + return 0; + + i = 0; + j = 0; + num = 0; + got_num = 0; + while (j < ETH_ALEN) { + if (macaddr[i] && macaddr[i] != ':') { + got_num++; + if ('0' <= macaddr[i] && macaddr[i] <= '9') + num = num * 16 + macaddr[i] - '0'; + else if ('A' <= macaddr[i] && macaddr[i] <= 'F') + num = num * 16 + 10 + macaddr[i] - 'A'; + else if ('a' <= macaddr[i] && macaddr[i] <= 'f') + num = num * 16 + 10 + macaddr[i] - 'a'; + else + break; + i++; + } else if (got_num == 2) { + mtbl[j++] = (u8) num; + num = 0; + got_num = 0; + i++; + } else { + break; + } + } + + if (j == ETH_ALEN) { + netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: " + "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], + mtbl[2], mtbl[3], mtbl[4], mtbl[5]); + dev_addr_mod(nd, 0, mtbl, ETH_ALEN); + return 1; + } else { + return 0; + } } static void smsc95xx_init_mac_address(struct usbnet *dev) From c8c918453a93ed39ad00177e83c03168a5abe64a Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 20 Apr 2023 09:43:17 +0200 Subject: [PATCH 038/183] usbnet: smsc95xx: Simplify MAC address parsing Parsing the MAC address provided on the kernel command line can be simplified quite a bit by taking advantage of the kernel's built-in sscanf(). Signed-off-by: Lukas Wunner --- drivers/net/usb/smsc95xx.c | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 2776a568a63f43..4dada5fc3ce2d3 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -814,37 +814,11 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) /* Check the macaddr module parameter for a MAC address */ static int smsc95xx_is_macaddr_param(struct usbnet *dev, struct net_device *nd) { - int i, j, got_num, num; u8 mtbl[ETH_ALEN]; + int j; - if (macaddr[0] == ':') - return 0; - - i = 0; - j = 0; - num = 0; - got_num = 0; - while (j < ETH_ALEN) { - if (macaddr[i] && macaddr[i] != ':') { - got_num++; - if ('0' <= macaddr[i] && macaddr[i] <= '9') - num = num * 16 + macaddr[i] - '0'; - else if ('A' <= macaddr[i] && macaddr[i] <= 'F') - num = num * 16 + 10 + macaddr[i] - 'A'; - else if ('a' <= macaddr[i] && macaddr[i] <= 'f') - num = num * 16 + 10 + macaddr[i] - 'a'; - else - break; - i++; - } else if (got_num == 2) { - mtbl[j++] = (u8) num; - num = 0; - got_num = 0; - i++; - } else { - break; - } - } + j = sscanf(macaddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mtbl[0], &mtbl[1], + &mtbl[2], &mtbl[3], &mtbl[4], &mtbl[5]); if (j == ETH_ALEN) { netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: " From 339d542202fe0f45d7c4ef82f98363536f911292 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 7 Sep 2020 13:34:38 +0200 Subject: [PATCH 039/183] usbnet: smsc95xx: Fix style issues in smsc95xx_is_macaddr_param() It is bad practice to have a function named ..._is_...() which has side effects. So drop the 'is' from the name. Per kernel convention return 0 on success and a negative errno on failure. Validate the MAC address retrieved from the command line. Signed-off-by: Philipp Rosenberger [lukas: leave 2nd function parameter unchanged, wordsmith commit message] Signed-off-by: Lukas Wunner --- drivers/net/usb/smsc95xx.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 4dada5fc3ce2d3..2feb9b1dd602fe 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -812,7 +812,7 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) } /* Check the macaddr module parameter for a MAC address */ -static int smsc95xx_is_macaddr_param(struct usbnet *dev, struct net_device *nd) +static int smsc95xx_macaddr_param(struct usbnet *dev, struct net_device *nd) { u8 mtbl[ETH_ALEN]; int j; @@ -825,9 +825,9 @@ static int smsc95xx_is_macaddr_param(struct usbnet *dev, struct net_device *nd) "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], mtbl[2], mtbl[3], mtbl[4], mtbl[5]); dev_addr_mod(nd, 0, mtbl, ETH_ALEN); - return 1; - } else { return 0; + } else { + return -EINVAL; } } @@ -855,8 +855,12 @@ static void smsc95xx_init_mac_address(struct usbnet *dev) } /* Check module parameters */ - if (smsc95xx_is_macaddr_param(dev, dev->net)) - return; + if (smsc95xx_macaddr_param(dev, dev->net) == 0) { + if (is_valid_ether_addr(dev->net->dev_addr)) { + netif_dbg(dev, ifup, dev->net, "MAC address read from module parameter\n"); + return; + } + } /* no useful static MAC address found. generate a random one */ eth_hw_addr_random(dev->net); From 1697dc522b368f2f094a3baaa8eb23a1283d09b0 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Fri, 21 Apr 2023 08:16:43 +0200 Subject: [PATCH 040/183] usbnet: smsc95xx: Avoid duplicate MAC address from command line If a MAC address is specified on the command line via "smsc95xx.macaddr" and multiple smsc95xx network interfaces are attached, they all get the same MAC address. Avoid by incrementing the non-OUI portion of the MAC address with each additional interface. If this results in an invalid MAC address, the driver falls back to generating a random one. Inspired by the following commit by Philipp: https://github.com/RevolutionPi/linux/commit/bf7a050e4b50 Philipp recalls that this feature was added at the behest of EdF. Signed-off-by: Lukas Wunner Cc: Philipp Rosenberger --- drivers/net/usb/smsc95xx.c | 41 ++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index 2feb9b1dd602fe..b1dca40309dc90 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -91,6 +91,9 @@ static char *macaddr = ":"; module_param(macaddr, charp, 0); MODULE_PARM_DESC(macaddr, "MAC address"); +static u64 last_macaddr; +static DEFINE_MUTEX(macaddr_lock); + static int __must_check smsc95xx_read_reg(struct usbnet *dev, u32 index, u32 *data) { @@ -817,18 +820,36 @@ static int smsc95xx_macaddr_param(struct usbnet *dev, struct net_device *nd) u8 mtbl[ETH_ALEN]; int j; - j = sscanf(macaddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mtbl[0], &mtbl[1], - &mtbl[2], &mtbl[3], &mtbl[4], &mtbl[5]); + mutex_lock(&macaddr_lock); - if (j == ETH_ALEN) { - netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: " - "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], - mtbl[2], mtbl[3], mtbl[4], mtbl[5]); - dev_addr_mod(nd, 0, mtbl, ETH_ALEN); - return 0; - } else { - return -EINVAL; + /* First smsc95xx device probed gets address from command line */ + if (!last_macaddr) { + j = sscanf(macaddr, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mtbl[0], + &mtbl[1], &mtbl[2], &mtbl[3], &mtbl[4], &mtbl[5]); + if (j != ETH_ALEN) { + mutex_unlock(&macaddr_lock); + return -EINVAL; + } + + last_macaddr = ether_addr_to_u64(mtbl); + goto out; + } + + /* Can the non-OUI portion of the address be incremented? */ + if ((last_macaddr & 0xffffff) == 0xffffff) { + mutex_unlock(&macaddr_lock); + return -EOVERFLOW; } + + /* Additional smsc95xx devices each increase address by 1 */ + u64_to_ether_addr(++last_macaddr, mtbl); +out: + mutex_unlock(&macaddr_lock); + netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: " + "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], + mtbl[2], mtbl[3], mtbl[4], mtbl[5]); + dev_addr_mod(nd, 0, mtbl, ETH_ALEN); + return 0; } static void smsc95xx_init_mac_address(struct usbnet *dev) From af6cc2aa2e1fdaa5da3eae70650a700a5d38a986 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 1 May 2023 21:41:52 +0200 Subject: [PATCH 041/183] reset: Add Infineon SLB9670 TPM reset support Normally the platform firmware is responsible for taking a Trusted Platform Module out of reset on boot and storing measurements into it. However if the platform firmware is incapable of doing that -- as is the case on the Raspberry Pi -- then the onus is on the kernel to take the TPM out of reset before trying to attach a driver to it. Provide a reset driver for such platforms. The Infineon SLB9670 TPM requires a specific reset sequence which is documented in sections 5.4 and 5.5 of the datasheet: https://www.infineon.com/dgdl/Infineon-SLB%209670VQ2.0-DataSheet-v01_04-EN.pdf?fileId=5546d4626fc1ce0b016fc78270350cd6 The sequence with minimum wait intervals is as follows: deassert RST wait at least 60 ms assert RST wait at least 2 usecs deassert RST wait at least 60 ms assert RST wait at least 2 usecs deassert RST wait at least 60 ms before issuing the first TPM command Signed-off-by: Lino Sanfilippo [lukas: convert to reset driver] Signed-off-by: Lukas Wunner --- drivers/reset/Kconfig | 9 +++ drivers/reset/Makefile | 1 + drivers/reset/reset-slb9670.c | 132 ++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 drivers/reset/reset-slb9670.c diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig index 2a52c990d4fecb..37b5de3e92685f 100644 --- a/drivers/reset/Kconfig +++ b/drivers/reset/Kconfig @@ -224,6 +224,15 @@ config RESET_SIMPLE - Allwinner SoCs - SiFive FU740 SoCs +config RESET_SLB9670 + tristate "Infineon SLB9670 TPM Reset Driver" + depends on TCG_TIS_SPI + help + This enables the reset driver for the Infineon SLB9670 Trusted + Platform Module. Only say Y here if your platform firmware is + incapable of taking the TPM out of reset on boot, requiring the + kernel to do so. + config RESET_SOCFPGA bool "SoCFPGA Reset Driver" if COMPILE_TEST && (!ARM || !ARCH_INTEL_SOCFPGA) default ARM && ARCH_INTEL_SOCFPGA diff --git a/drivers/reset/Makefile b/drivers/reset/Makefile index 3e7e5fd633a8e9..9e6cfe7a3e179a 100644 --- a/drivers/reset/Makefile +++ b/drivers/reset/Makefile @@ -29,6 +29,7 @@ obj-$(CONFIG_RESET_RASPBERRYPI) += reset-raspberrypi.o obj-$(CONFIG_RESET_RZG2L_USBPHY_CTRL) += reset-rzg2l-usbphy-ctrl.o obj-$(CONFIG_RESET_SCMI) += reset-scmi.o obj-$(CONFIG_RESET_SIMPLE) += reset-simple.o +obj-$(CONFIG_RESET_SLB9670) += reset-slb9670.o obj-$(CONFIG_RESET_SOCFPGA) += reset-socfpga.o obj-$(CONFIG_RESET_STARFIVE_JH7100) += reset-starfive-jh7100.o obj-$(CONFIG_RESET_SUNPLUS) += reset-sunplus.o diff --git a/drivers/reset/reset-slb9670.c b/drivers/reset/reset-slb9670.c new file mode 100644 index 00000000000000..e873e1f46f092a --- /dev/null +++ b/drivers/reset/reset-slb9670.c @@ -0,0 +1,132 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Reset driver for Infineon SLB9670 Trusted Platform Module + * + * Copyright (C) 2022 KUNBUS GmbH + */ + +#include +#include +#include +#include +#include + +/* + * Time intervals used in the reset sequence: + * + * RSTIN: minimum time to hold the reset line deasserted. + * WRST: minimum time to hold the reset line asserted. + */ +#define SLB9670_TIME_RSTIN 60 /* msecs */ +#define SLB9670_TIME_WRST 2 /* usecs */ + +struct reset_slb9670 { + struct reset_controller_dev rcdev; + struct gpio_desc *gpio; +}; + +static inline struct reset_slb9670 * +to_reset_slb9670(struct reset_controller_dev *rcdev) +{ + return container_of(rcdev, struct reset_slb9670, rcdev); +} + +static int reset_slb9670_assert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct reset_slb9670 *reset_slb9670 = to_reset_slb9670(rcdev); + + gpiod_set_value(reset_slb9670->gpio, 1); + return 0; +} + +static int reset_slb9670_deassert(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct reset_slb9670 *reset_slb9670 = to_reset_slb9670(rcdev); + + /* + * Perform the reset sequence: Deassert and assert the reset line twice + * and wait the respective time intervals. After a last wait interval + * of RSTIN the chip is ready to receive the first command. + */ + gpiod_set_value(reset_slb9670->gpio, 0); + msleep(SLB9670_TIME_RSTIN); + gpiod_set_value(reset_slb9670->gpio, 1); + udelay(SLB9670_TIME_WRST); + gpiod_set_value(reset_slb9670->gpio, 0); + msleep(SLB9670_TIME_RSTIN); + gpiod_set_value(reset_slb9670->gpio, 1); + udelay(SLB9670_TIME_WRST); + gpiod_set_value(reset_slb9670->gpio, 0); + msleep(SLB9670_TIME_RSTIN); + + return 0; +} + +static int reset_slb9670_reset(struct reset_controller_dev *rcdev, + unsigned long id) +{ + int ret; + + ret = reset_slb9670_assert(rcdev, id); + if (ret) + return ret; + + return reset_slb9670_deassert(rcdev, id); +} + +static int reset_slb9670_status(struct reset_controller_dev *rcdev, + unsigned long id) +{ + struct reset_slb9670 *reset_slb9670 = to_reset_slb9670(rcdev); + + return gpiod_get_value(reset_slb9670->gpio); +} + +static const struct reset_control_ops reset_slb9670_ops = { + .assert = reset_slb9670_assert, + .deassert = reset_slb9670_deassert, + .reset = reset_slb9670_reset, + .status = reset_slb9670_status, +}; + +static int reset_slb9670_probe(struct platform_device *pdev) +{ + struct reset_slb9670 *reset_slb9670; + struct device *dev = &pdev->dev; + + reset_slb9670 = devm_kzalloc(dev, sizeof(*reset_slb9670), GFP_KERNEL); + if (!reset_slb9670) + return -ENOMEM; + + reset_slb9670->gpio = devm_gpiod_get(dev, "reset", GPIOD_ASIS); + if (IS_ERR(reset_slb9670->gpio)) + return PTR_ERR(reset_slb9670->gpio); + + reset_slb9670->rcdev.nr_resets = 1; + reset_slb9670->rcdev.owner = THIS_MODULE; + reset_slb9670->rcdev.of_node = dev->of_node; + reset_slb9670->rcdev.ops = &reset_slb9670_ops; + + return devm_reset_controller_register(dev, &reset_slb9670->rcdev); +} + +static const struct of_device_id reset_slb9670_dt_ids[] = { + { .compatible = "infineon,slb9670-reset" }, + { /* sentinel */ }, +}; + +static struct platform_driver reset_slb9670_driver = { + .probe = reset_slb9670_probe, + .driver = { + .name = "reset-slb9670", + .of_match_table = reset_slb9670_dt_ids, + }, +}; + +module_platform_driver(reset_slb9670_driver); + +MODULE_DESCRIPTION("Infineon SLB9670 TPM Reset Driver"); +MODULE_AUTHOR("Lino Sanfilippo "); +MODULE_LICENSE("GPL v2"); From 02e648d9822e07ba8fc35cd8b2782f0814597677 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sat, 6 May 2023 09:51:54 +0200 Subject: [PATCH 042/183] tpm, tpm_tis: Ensure reset is deasserted on probe The TPM may be held in a reset state on boot. Deassert reset to allow driver binding to the TPM. Signed-off-by: Lukas Wunner --- drivers/char/tpm/tpm_tis_core.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 02945d53fcefaf..a5b9bd564915a8 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "tpm.h" #include "tpm_tis_core.h" @@ -998,6 +999,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, const struct tpm_tis_phy_ops *phy_ops, acpi_handle acpi_dev_handle) { + struct reset_control *rstc; u32 vendor; u32 intfcaps; u32 intmask; @@ -1029,6 +1031,20 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, dev_set_drvdata(&chip->dev, priv); + rstc = reset_control_get_optional_exclusive(dev, NULL); + if (IS_ERR(rstc)) { + dev_err(dev, "Cannot get reset control: %ld\n", PTR_ERR(rstc)); + return PTR_ERR(rstc); + } + + rc = reset_control_deassert(rstc); + reset_control_put(rstc); + if (rc) { + dev_err(dev, "Cannot deassert reset control: %d\n", rc); + return rc; + } + + rc = tpm_tis_read32(priv, TPM_DID_VID(0), &vendor); if (rc < 0) return rc; From fc19d90330f77ffc1c94d7b9e17eed453b51da64 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 20 Oct 2021 09:08:01 +0200 Subject: [PATCH 043/183] arm/configs: Add revpi-v6_defconfig The revpi-v6_defconfig is based on the bcmrpi_defconfig and is intended for CM1 based devices. Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 1527 +++++++++++++++++++++++++++ 1 file changed, 1527 insertions(+) create mode 100644 arch/arm/configs/revpi-v6_defconfig diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig new file mode 100644 index 00000000000000..f2a474cdad5602 --- /dev/null +++ b/arch/arm/configs/revpi-v6_defconfig @@ -0,0 +1,1527 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_GENERIC_IRQ_DEBUGFS=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=m +CONFIG_IKCONFIG_PROC=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_ARCH_MULTI_V6=y +# CONFIG_ARCH_MULTI_V7 is not set +CONFIG_ARCH_BCM=y +CONFIG_ARCH_BCM2835=y +# CONFIG_CACHE_L2X0 is not set +# CONFIG_CPU_SW_DOMAIN_PAN is not set +CONFIG_UACCESS_WITH_MEMCPY=y +# CONFIG_ATAGS is not set +CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_RASPBERRYPI_CPUFREQ=y +CONFIG_VFP=y +# CONFIG_SUSPEND is not set +CONFIG_PM=y +CONFIG_RASPBERRYPI_FIRMWARE=y +CONFIG_CRYPTO_SHA1_ARM=m +CONFIG_CRYPTO_AES_ARM=m +CONFIG_OPROFILE=m +CONFIG_JUMP_LABEL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_MAC_PARTITION=y +CONFIG_BINFMT_MISC=m +CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y +CONFIG_CMA=y +CONFIG_ZSWAP=y +CONFIG_Z3FOLD=m +CONFIG_ZSMALLOC=m +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=m +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_NET_IPVTI=m +CONFIG_NET_FOU=m +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BBR=m +CONFIG_IPV6=m +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_ESP_OFFLOAD=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_ILA=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_GRE=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +CONFIG_NETFILTER=y +CONFIG_BRIDGE_NETFILTER=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_LOG_NETDEV=m +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y +CONFIG_NFT_NUMGEN=m +CONFIG_NFT_CT=m +CONFIG_NFT_FLOW_OFFLOAD=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_CONNLIMIT=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m +CONFIG_NFT_NAT=m +CONFIG_NFT_TUNNEL=m +CONFIG_NFT_OBJREF=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_QUOTA=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NFT_HASH=m +CONFIG_NFT_FIB_INET=m +CONFIG_NFT_SOCKET=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m +CONFIG_NFT_DUP_NETDEV=m +CONFIG_NFT_FWD_NETDEV=m +CONFIG_NFT_FIB_NETDEV=m +CONFIG_NF_FLOW_TABLE_INET=m +CONFIG_NF_FLOW_TABLE=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_PE_SIP=m +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NF_TABLES_ARP=y +CONFIG_NF_FLOW_TABLE_IPV4=m +CONFIG_NF_LOG_ARP=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_FLOW_TABLE_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_SRH=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NFT_BRIDGE_REJECT=m +CONFIG_NF_LOG_BRIDGE=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_ATM=m +CONFIG_L2TP=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_BRIDGE=m +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_ATALK=m +CONFIG_6LOWPAN=m +CONFIG_IEEE802154=m +CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_CAKE=m +CONFIG_NET_SCH_FQ=m +CONFIG_NET_SCH_HHF=m +CONFIG_NET_SCH_PIE=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +CONFIG_BATMAN_ADV=m +CONFIG_OPENVSWITCH=m +CONFIG_CGROUP_NET_PRIO=y +CONFIG_NET_PKTGEN=m +CONFIG_HAMRADIO=y +CONFIG_AX25=m +CONFIG_NETROM=m +CONFIG_ROSE=m +CONFIG_MKISS=m +CONFIG_6PACK=m +CONFIG_BPQETHER=m +CONFIG_BAYCOM_SER_FDX=m +CONFIG_BAYCOM_SER_HDX=m +CONFIG_YAM=m +CONFIG_CAN=m +CONFIG_CAN_J1939=m +CONFIG_CAN_ISOTP=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_EMS_USB=m +CONFIG_CAN_GS_USB=m +CONFIG_CAN_PEAK_USB=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_6LOWPAN=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_MAC80211_MESH=y +CONFIG_WIMAX=m +CONFIG_RFKILL=m +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +CONFIG_NFC=m +CONFIG_UEVENT_HELPER=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=m +CONFIG_MTD_BLOCK=m +CONFIG_MTD_BLOCK2MTD=m +CONFIG_MTD_SPI_NOR=m +CONFIG_MTD_UBI=m +CONFIG_OF_CONFIGFS=y +CONFIG_ZRAM=m +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_CDROM_PKTCDVD=m +CONFIG_ATA_OVER_ETH=m +CONFIG_EEPROM_AT24=m +CONFIG_TI_ST=m +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_BLK_DEV_SR=m +CONFIG_CHR_DEV_SG=m +CONFIG_SCSI_ISCSI_ATTRS=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +CONFIG_MD=y +CONFIG_MD_LINEAR=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m +CONFIG_DM_ZERO=m +CONFIG_DM_DELAY=m +CONFIG_NETDEVICES=y +CONFIG_BONDING=m +CONFIG_DUMMY=m +CONFIG_WIREGUARD=m +CONFIG_IFB=m +CONFIG_MACVLAN=m +CONFIG_IPVLAN=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_NET_VRF=m +CONFIG_ENC28J60=m +CONFIG_QCA7000_SPI=m +CONFIG_QCA7000_UART=m +CONFIG_WIZNET_W5100=m +CONFIG_WIZNET_W5100_SPI=m +CONFIG_MDIO_BITBANG=m +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_HUAWEI_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +CONFIG_USB_NET_SR9800=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +CONFIG_USB_NET_AQC111=m +CONFIG_ATH9K=m +CONFIG_ATH9K_HTC=m +CONFIG_CARL9170=m +CONFIG_ATH6KL=m +CONFIG_ATH6KL_USB=m +CONFIG_AR5523=m +CONFIG_AT76C50X_USB=m +CONFIG_B43=m +# CONFIG_B43_PHY_N is not set +CONFIG_B43LEGACY=m +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_USB=y +CONFIG_BRCMDBG=y +CONFIG_HOSTAP=m +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MT7601U=m +CONFIG_MT76x0U=m +CONFIG_MT76x2U=m +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RTL8187=m +CONFIG_RTL8192CU=m +CONFIG_RTL8XXXU=m +CONFIG_USB_ZD1201=m +CONFIG_ZD1211RW=m +CONFIG_MAC80211_HWSIM=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_IEEE802154_AT86RF230=m +CONFIG_IEEE802154_MRF24J40=m +CONFIG_IEEE802154_CC2520=m +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_TCA6416=m +CONFIG_KEYBOARD_TCA8418=m +CONFIG_KEYBOARD_MATRIX=m +CONFIG_KEYBOARD_CAP11XX=m +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_IFORCE=m +CONFIG_JOYSTICK_IFORCE_USB=m +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_JOYSTICK_PSXPAD_SPI=m +CONFIG_JOYSTICK_PSXPAD_SPI_FF=y +CONFIG_JOYSTICK_RPISENSE=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_EGALAX=m +CONFIG_TOUCHSCREEN_EXC3000=m +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_ILI210X=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_STMPE=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AD714X=m +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_CMA3000=m +CONFIG_SERIO=m +CONFIG_SERIO_RAW=m +CONFIG_GAMEPORT=m +CONFIG_GAMEPORT_NS558=m +CONFIG_GAMEPORT_L4=m +CONFIG_BRCM_CHAR_DRIVERS=y +CONFIG_BCM_VCIO=y +CONFIG_BCM2835_DEVGPIOMEM=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_DMA is not set +CONFIG_SERIAL_8250_NR_UARTS=1 +CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_BCM2835AUX=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_SC16IS7XX=m +CONFIG_SERIAL_SC16IS7XX_SPI=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_TTY_PRINTK=y +CONFIG_HW_RANDOM=y +CONFIG_RAW_DRIVER=y +CONFIG_TCG_TPM=m +CONFIG_TCG_TIS_SPI=m +CONFIG_RANDOM_TRUST_BOOTLOADER=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_MUX_GPMUX=m +CONFIG_I2C_MUX_PCA954x=m +CONFIG_I2C_MUX_PINCTRL=m +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2835=m +# CONFIG_I2C_BRCMSTB is not set +CONFIG_I2C_GPIO=m +CONFIG_I2C_ROBOTFUZZ_OSIF=m +CONFIG_I2C_TINY_USB=m +CONFIG_SPI=y +CONFIG_SPI_BCM2835=m +CONFIG_SPI_BCM2835AUX=m +CONFIG_SPI_GPIO=m +CONFIG_SPI_SPIDEV=m +CONFIG_SPI_SLAVE=y +CONFIG_PPS=m +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_GPIO=m +CONFIG_PINCTRL_MCP23S08=m +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=m +CONFIG_GPIO_ARIZONA=m +CONFIG_GPIO_FSM=m +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_MOCKUP=m +CONFIG_W1=m +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m +CONFIG_W1_MASTER_DS1WM=m +CONFIG_W1_MASTER_GPIO=m +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2408=m +CONFIG_W1_SLAVE_DS2413=m +CONFIG_W1_SLAVE_DS2406=m +CONFIG_W1_SLAVE_DS2423=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +CONFIG_W1_SLAVE_DS2438=m +CONFIG_W1_SLAVE_DS2780=m +CONFIG_W1_SLAVE_DS2781=m +CONFIG_W1_SLAVE_DS28E04=m +CONFIG_W1_SLAVE_DS28E17=m +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_RPI_POE_POWER=m +CONFIG_BATTERY_DS2760=m +CONFIG_BATTERY_MAX17040=m +CONFIG_BATTERY_GAUGE_LTC2941=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_GPIO_FAN=m +CONFIG_SENSORS_IIO_HWMON=m +CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_RASPBERRYPI_HWMON=m +CONFIG_SENSORS_RPI_POE_FAN=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHT3x=m +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_INA2XX=m +CONFIG_SENSORS_TMP102=m +CONFIG_THERMAL=y +CONFIG_BCM2835_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_GPIO_WATCHDOG=m +CONFIG_BCM2835_WDT=y +CONFIG_MFD_STMPE=y +CONFIG_STMPE_SPI=y +CONFIG_MFD_ARIZONA_I2C=m +CONFIG_MFD_ARIZONA_SPI=m +CONFIG_MFD_WM5102=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=m +CONFIG_REGULATOR_ARIZONA_LDO1=m +CONFIG_REGULATOR_ARIZONA_MICSUPP=m +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m +CONFIG_RC_CORE=y +CONFIG_LIRC=y +CONFIG_BPF_LIRC_MODE2=y +CONFIG_RC_DECODERS=y +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_SANYO_DECODER=m +CONFIG_IR_SHARP_DECODER=m +CONFIG_IR_MCE_KBD_DECODER=m +CONFIG_IR_XMP_DECODER=m +CONFIG_IR_IMON_DECODER=m +CONFIG_RC_DEVICES=y +CONFIG_RC_ATI_REMOTE=m +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_RC_LOOPBACK=m +CONFIG_IR_GPIO_CIR=m +CONFIG_IR_GPIO_TX=m +CONFIG_IR_PWM_TX=m +CONFIG_IR_TOY=m +CONFIG_MEDIA_CEC_RC=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_DTCS033=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STK1135=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_VIDEO_USBTV=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_STK1160_COMMON=m +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +CONFIG_VIDEO_GO7007_USB_S2250_BOARD=m +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_RC=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_TM6000_DVB=m +CONFIG_DVB_USB=m +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_PCTV452E=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +CONFIG_DVB_AS102=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_V4L2=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_RADIO_SI470X=m +CONFIG_USB_SI470X=m +CONFIG_I2C_SI470X=m +CONFIG_RADIO_SI4713=m +CONFIG_I2C_SI4713=m +CONFIG_USB_MR800=m +CONFIG_USB_DSBR=m +CONFIG_RADIO_SHARK=m +CONFIG_RADIO_SHARK2=m +CONFIG_USB_KEENE=m +CONFIG_USB_MA901=m +CONFIG_RADIO_TEA5764=m +CONFIG_RADIO_SAA7706H=m +CONFIG_RADIO_TEF6862=m +CONFIG_RADIO_WL1273=m +CONFIG_RADIO_WL128X=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_BCM2835_UNICAM=m +CONFIG_VIDEO_UDA1342=m +CONFIG_VIDEO_SONY_BTF_MPX=m +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_TC358743=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_TW2804=m +CONFIG_VIDEO_TW9903=m +CONFIG_VIDEO_TW9906=m +CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_IMX290=m +CONFIG_VIDEO_IMX477=m +CONFIG_VIDEO_IMX519=m +CONFIG_VIDEO_OV5647=m +CONFIG_VIDEO_OV7251=m +CONFIG_VIDEO_OV7640=m +CONFIG_VIDEO_OV9281=m +CONFIG_VIDEO_IRS1125=m +CONFIG_VIDEO_MT9V011=m +CONFIG_DRM=m +CONFIG_DRM_LOAD_EDID_FIRMWARE=y +CONFIG_DRM_UDL=m +CONFIG_DRM_PANEL_SIMPLE=m +CONFIG_DRM_PANEL_JDI_LT070ME05000=m +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m +CONFIG_DRM_DISPLAY_CONNECTOR=m +CONFIG_DRM_SIMPLE_BRIDGE=m +CONFIG_DRM_TOSHIBA_TC358762=m +CONFIG_DRM_VC4=m +CONFIG_DRM_VC4_HDMI_CEC=y +CONFIG_TINYDRM_ILI9225=m +CONFIG_TINYDRM_ILI9341=m +CONFIG_TINYDRM_MI0283QT=m +CONFIG_TINYDRM_REPAPER=m +CONFIG_TINYDRM_ST7586=m +CONFIG_TINYDRM_ST7735R=m +CONFIG_DRM_GUD=m +CONFIG_FB=y +CONFIG_FB_BCM2708=y +CONFIG_FB_UDL=m +CONFIG_FB_SIMPLE=y +CONFIG_FB_SSD1307=m +CONFIG_FB_RPISENSE=m +CONFIG_BACKLIGHT_RPI=m +CONFIG_BACKLIGHT_GPIO=m +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM_OSS=m +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_DUMMY=m +CONFIG_SND_ALOOP=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_USB_HIFACE=m +CONFIG_SND_USB_TONEPORT=m +CONFIG_SND_SOC=m +CONFIG_SND_BCM2835_SOC_I2S=m +CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m +CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m +CONFIG_SND_BCM2708_SOC_PIFI_40=m +CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m +CONFIG_SND_BCM2708_SOC_RPI_DAC=m +CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m +CONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m +CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m +CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m +CONFIG_SND_AUDIOSENSE_PI=m +CONFIG_SND_DIGIDAC1_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m +CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m +CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +CONFIG_SND_PISOUND=m +CONFIG_SND_SOC_AD193X_SPI=m +CONFIG_SND_SOC_AD193X_I2C=m +CONFIG_SND_SOC_ADAU1701=m +CONFIG_SND_SOC_ADAU7002=m +CONFIG_SND_SOC_AK4554=m +CONFIG_SND_SOC_CS4265=m +CONFIG_SND_SOC_ICS43432=m +CONFIG_SND_SOC_MA120X0P=m +CONFIG_SND_SOC_MAX98357A=m +CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_WM8804_I2C=m +CONFIG_SND_SOC_WM8960=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_APPLE=m +CONFIG_HID_ASUS=m +CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m +CONFIG_HID_BIGBEN_FF=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_ELO=m +CONFIG_HID_EZKEY=m +CONFIG_HID_GEMBIRD=m +CONFIG_HID_HOLTEK=m +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +CONFIG_HID_LOGITECH=m +CONFIG_HID_LOGITECH_DJ=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=m +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEAM=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_XINMO=m +CONFIG_HID_ZEROPLUS=m +CONFIG_HID_ZYDACRON=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y +CONFIG_I2C_HID=m +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=m +CONFIG_USB_DWCOTG=y +CONFIG_USB_PRINTER=m +CONFIG_USB_TMC=m +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_REALTEK=m +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=m +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_HOST=m +CONFIG_USBIP_VUDC=m +CONFIG_USB_DWC2=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_YUREX=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_USB_GADGET=m +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_HID=m +CONFIG_USB_G_WEBCAM=m +CONFIG_MMC=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BCM2835_MMC=y +CONFIG_MMC_BCM2835_DMA=y +CONFIG_MMC_BCM2835_SDHOST=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SPI=m +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_PCA9532=m +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PCA955X=m +CONFIG_LEDS_PCA963X=m +CONFIG_LEDS_PWM=y +CONFIG_LEDS_IS31FL32XX=m +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=m +CONFIG_LEDS_TRIGGER_CAMERA=m +CONFIG_LEDS_TRIGGER_INPUT=y +CONFIG_LEDS_TRIGGER_PANIC=y +CONFIG_LEDS_TRIGGER_NETDEV=m +CONFIG_LEDS_TRIGGER_PATTERN=m +CONFIG_LEDS_TRIGGER_ACTPWR=y +CONFIG_ACCESSIBILITY=y +CONFIG_SPEAKUP=m +CONFIG_SPEAKUP_SYNTH_SOFT=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_ABX80X=m +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_ISL12022=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8523=m +CONFIG_RTC_DRV_PCF85063=m +CONFIG_RTC_DRV_PCF85363=m +CONFIG_RTC_DRV_PCF8563=m +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m +CONFIG_RTC_DRV_EM3027=m +CONFIG_RTC_DRV_RV3028=m +CONFIG_RTC_DRV_SD3078=m +CONFIG_RTC_DRV_M41T93=m +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1302=m +CONFIG_RTC_DRV_DS1305=m +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RX4581=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_PCF2123=m +CONFIG_RTC_DRV_DS3232=m +CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_RV3029C2=m +CONFIG_DMADEVICES=y +CONFIG_DMA_BCM2835=y +CONFIG_DMA_BCM2708=y +CONFIG_DMABUF_HEAPS=y +CONFIG_DMABUF_HEAPS_SYSTEM=y +CONFIG_DMABUF_HEAPS_CMA=y +CONFIG_AUXDISPLAY=y +CONFIG_HD44780=m +CONFIG_UIO=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_STAGING=y +CONFIG_PRISM2_USB=m +CONFIG_R8712U=m +CONFIG_R8188EU=m +CONFIG_VT6656=m +CONFIG_STAGING_MEDIA=y +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_HX8357D=m +CONFIG_FB_TFT_ILI9163=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SH1106=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_BCM2835_VCHIQ=y +CONFIG_SND_BCM2835=m +CONFIG_VIDEO_BCM2835=m +CONFIG_VIDEO_CODEC_BCM2835=m +CONFIG_VIDEO_ISP_BCM2835=m +CONFIG_CLK_RASPBERRYPI=y +CONFIG_MAILBOX=y +CONFIG_BCM2835_MBOX=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_RASPBERRYPI_POWER=y +CONFIG_EXTCON=m +CONFIG_EXTCON_ARIZONA=m +CONFIG_IIO=m +CONFIG_IIO_BUFFER_CB=m +CONFIG_MCP320X=m +CONFIG_MCP3422=m +CONFIG_TI_ADS1015=m +CONFIG_BME680=m +CONFIG_CCS811=m +CONFIG_SENSIRION_SGP30=m +CONFIG_SPS30=m +CONFIG_DHT11=m +CONFIG_HDC100X=m +CONFIG_HTU21=m +CONFIG_INV_MPU6050_I2C=m +CONFIG_APDS9960=m +CONFIG_BH1750=m +CONFIG_TSL4531=m +CONFIG_VEML6070=m +CONFIG_BMP280=m +CONFIG_MAXIM_THERMOCOUPLE=m +CONFIG_MAX31856=m +CONFIG_PWM_BCM2835=m +CONFIG_PWM_PCA9685=m +CONFIG_RPI_AXIPERF=m +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_REISERFS_FS=m +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +CONFIG_JFS_STATISTICS=y +CONFIG_XFS_FS=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +CONFIG_GFS2_FS=m +CONFIG_OCFS2_FS=m +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_NILFS2_FS=m +CONFIG_F2FS_FS=y +CONFIG_F2FS_FS_SECURITY=y +CONFIG_FANOTIFY=y +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_OVERLAY_FS=m +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +CONFIG_CACHEFILES=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +CONFIG_EXFAT_FS=m +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_ECRYPT_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_SUMMARY=y +CONFIG_UBIFS_FS=m +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_SWAP=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_ROOT_NFS=y +CONFIG_NFS_FSCACHE=y +CONFIG_NFSD=m +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_CIFS=m +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_9P_FS=m +CONFIG_9P_FS_POSIX_ACL=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_DLM=m +CONFIG_SECURITY=y +CONFIG_SECURITY_APPARMOR=y +CONFIG_LSM="" +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_CHACHA20POLY1305=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_XTS=m +CONFIG_CRYPTO_ADIANTUM=m +CONFIG_CRYPTO_XCBC=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m +CONFIG_CRYPTO_USER_API_AEAD=m +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=5 +CONFIG_PRINTK_TIME=y +CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_KGDB=y +CONFIG_KGDB_KDB=y +CONFIG_KDB_KEYBOARD=y +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_LATENCYTOP=y +CONFIG_FUNCTION_PROFILER=y +CONFIG_STACK_TRACER=y +CONFIG_IRQSOFF_TRACER=y +CONFIG_SCHED_TRACER=y +CONFIG_BLK_DEV_IO_TRACE=y +# CONFIG_UPROBE_EVENTS is not set From 5a06a110a1e13ce7ed53b6c099bf885291c697d1 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 19 Apr 2021 13:02:08 +0200 Subject: [PATCH 044/183] arm/configs: Add revpi-v7_defconfig The revpi-v7_defconfig is based on the bcm2709_defconfig. It is inteded for CM3/CM3+ devices. Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v7_defconfig | 1532 +++++++++++++++++++++++++++ 1 file changed, 1532 insertions(+) create mode 100644 arch/arm/configs/revpi-v7_defconfig diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig new file mode 100644 index 00000000000000..04a38fe4c6d99f --- /dev/null +++ b/arch/arm/configs/revpi-v7_defconfig @@ -0,0 +1,1532 @@ +CONFIG_LOCALVERSION="-v7" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_GENERIC_IRQ_DEBUGFS=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=m +CONFIG_IKCONFIG_PROC=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_ARCH_BCM=y +CONFIG_ARCH_BCM2835=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_SMP=y +CONFIG_VMSPLIT_2G=y +# CONFIG_CPU_SW_DOMAIN_PAN is not set +CONFIG_UACCESS_WITH_MEMCPY=y +# CONFIG_ATAGS is not set +CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_RASPBERRYPI_CPUFREQ=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +# CONFIG_SUSPEND is not set +CONFIG_PM=y +CONFIG_RASPBERRYPI_FIRMWARE=y +CONFIG_CRYPTO_SHA1_ARM_NEON=m +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_AES_ARM_BS=m +CONFIG_OPROFILE=m +CONFIG_JUMP_LABEL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_MAC_PARTITION=y +CONFIG_BINFMT_MISC=m +CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y +CONFIG_CMA=y +CONFIG_ZSWAP=y +CONFIG_Z3FOLD=m +CONFIG_ZSMALLOC=m +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=m +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_NET_IPVTI=m +CONFIG_NET_FOU=m +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BBR=m +CONFIG_IPV6=m +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_ESP_OFFLOAD=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_ILA=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_GRE=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +CONFIG_NETFILTER=y +CONFIG_BRIDGE_NETFILTER=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_LOG_NETDEV=m +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y +CONFIG_NFT_NUMGEN=m +CONFIG_NFT_CT=m +CONFIG_NFT_FLOW_OFFLOAD=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_CONNLIMIT=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m +CONFIG_NFT_NAT=m +CONFIG_NFT_TUNNEL=m +CONFIG_NFT_OBJREF=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_QUOTA=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NFT_HASH=m +CONFIG_NFT_FIB_INET=m +CONFIG_NFT_SOCKET=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m +CONFIG_NFT_DUP_NETDEV=m +CONFIG_NFT_FWD_NETDEV=m +CONFIG_NFT_FIB_NETDEV=m +CONFIG_NF_FLOW_TABLE_INET=m +CONFIG_NF_FLOW_TABLE=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_PE_SIP=m +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NF_TABLES_ARP=y +CONFIG_NF_FLOW_TABLE_IPV4=m +CONFIG_NF_LOG_ARP=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_FLOW_TABLE_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_SRH=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NFT_BRIDGE_REJECT=m +CONFIG_NF_LOG_BRIDGE=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_ATM=m +CONFIG_L2TP=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_BRIDGE=m +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_ATALK=m +CONFIG_6LOWPAN=m +CONFIG_IEEE802154=m +CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_CAKE=m +CONFIG_NET_SCH_FQ=m +CONFIG_NET_SCH_HHF=m +CONFIG_NET_SCH_PIE=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +CONFIG_BATMAN_ADV=m +CONFIG_OPENVSWITCH=m +CONFIG_CGROUP_NET_PRIO=y +CONFIG_NET_PKTGEN=m +CONFIG_HAMRADIO=y +CONFIG_AX25=m +CONFIG_NETROM=m +CONFIG_ROSE=m +CONFIG_MKISS=m +CONFIG_6PACK=m +CONFIG_BPQETHER=m +CONFIG_BAYCOM_SER_FDX=m +CONFIG_BAYCOM_SER_HDX=m +CONFIG_YAM=m +CONFIG_CAN=m +CONFIG_CAN_J1939=m +CONFIG_CAN_ISOTP=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_EMS_USB=m +CONFIG_CAN_GS_USB=m +CONFIG_CAN_PEAK_USB=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_6LOWPAN=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_MAC80211_MESH=y +CONFIG_WIMAX=m +CONFIG_RFKILL=m +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +CONFIG_NFC=m +CONFIG_UEVENT_HELPER=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=m +CONFIG_MTD_BLOCK=m +CONFIG_MTD_BLOCK2MTD=m +CONFIG_MTD_SPI_NOR=m +CONFIG_MTD_UBI=m +CONFIG_OF_CONFIGFS=y +CONFIG_ZRAM=m +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_CDROM_PKTCDVD=m +CONFIG_ATA_OVER_ETH=m +CONFIG_EEPROM_AT24=m +CONFIG_TI_ST=m +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_BLK_DEV_SR=m +CONFIG_CHR_DEV_SG=m +CONFIG_SCSI_ISCSI_ATTRS=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +CONFIG_MD=y +CONFIG_MD_LINEAR=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m +CONFIG_DM_ZERO=m +CONFIG_DM_DELAY=m +CONFIG_NETDEVICES=y +CONFIG_BONDING=m +CONFIG_DUMMY=m +CONFIG_WIREGUARD=m +CONFIG_IFB=m +CONFIG_MACVLAN=m +CONFIG_IPVLAN=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_NET_VRF=m +CONFIG_ENC28J60=m +CONFIG_QCA7000_SPI=m +CONFIG_QCA7000_UART=m +CONFIG_WIZNET_W5100=m +CONFIG_WIZNET_W5100_SPI=m +CONFIG_MDIO_BITBANG=m +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_LAN78XX=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_HUAWEI_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +CONFIG_USB_NET_SR9800=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +CONFIG_USB_NET_AQC111=m +CONFIG_ATH9K=m +CONFIG_ATH9K_HTC=m +CONFIG_CARL9170=m +CONFIG_ATH6KL=m +CONFIG_ATH6KL_USB=m +CONFIG_AR5523=m +CONFIG_AT76C50X_USB=m +CONFIG_B43=m +# CONFIG_B43_PHY_N is not set +CONFIG_B43LEGACY=m +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_USB=y +CONFIG_BRCMDBG=y +CONFIG_HOSTAP=m +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MT7601U=m +CONFIG_MT76x0U=m +CONFIG_MT76x2U=m +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RTL8187=m +CONFIG_RTL8192CU=m +CONFIG_RTL8XXXU=m +CONFIG_USB_ZD1201=m +CONFIG_ZD1211RW=m +CONFIG_MAC80211_HWSIM=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_IEEE802154_AT86RF230=m +CONFIG_IEEE802154_MRF24J40=m +CONFIG_IEEE802154_CC2520=m +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_TCA6416=m +CONFIG_KEYBOARD_TCA8418=m +CONFIG_KEYBOARD_MATRIX=m +CONFIG_KEYBOARD_CAP11XX=m +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_IFORCE=m +CONFIG_JOYSTICK_IFORCE_USB=m +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_JOYSTICK_PSXPAD_SPI=m +CONFIG_JOYSTICK_PSXPAD_SPI_FF=y +CONFIG_JOYSTICK_RPISENSE=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_EGALAX=m +CONFIG_TOUCHSCREEN_EXC3000=m +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_ILI210X=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_STMPE=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AD714X=m +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_CMA3000=m +CONFIG_SERIO=m +CONFIG_SERIO_RAW=m +CONFIG_GAMEPORT=m +CONFIG_GAMEPORT_NS558=m +CONFIG_GAMEPORT_L4=m +CONFIG_BRCM_CHAR_DRIVERS=y +CONFIG_BCM_VCIO=y +CONFIG_BCM2835_DEVGPIOMEM=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_DMA is not set +CONFIG_SERIAL_8250_NR_UARTS=1 +CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_BCM2835AUX=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_SC16IS7XX=m +CONFIG_SERIAL_SC16IS7XX_SPI=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_TTY_PRINTK=y +CONFIG_HW_RANDOM=y +CONFIG_RAW_DRIVER=y +CONFIG_TCG_TPM=m +CONFIG_TCG_TIS_SPI=m +CONFIG_RANDOM_TRUST_BOOTLOADER=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_MUX_GPMUX=m +CONFIG_I2C_MUX_PCA954x=m +CONFIG_I2C_MUX_PINCTRL=m +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2835=m +# CONFIG_I2C_BRCMSTB is not set +CONFIG_I2C_GPIO=m +CONFIG_I2C_ROBOTFUZZ_OSIF=m +CONFIG_I2C_TINY_USB=m +CONFIG_SPI=y +CONFIG_SPI_BCM2835=m +CONFIG_SPI_BCM2835AUX=m +CONFIG_SPI_GPIO=m +CONFIG_SPI_SPIDEV=m +CONFIG_SPI_SLAVE=y +CONFIG_PPS=m +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_GPIO=m +CONFIG_PINCTRL_MCP23S08=m +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_BCM_VIRT=y +CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=m +CONFIG_GPIO_ARIZONA=m +CONFIG_GPIO_FSM=m +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_MOCKUP=m +CONFIG_W1=m +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m +CONFIG_W1_MASTER_DS1WM=m +CONFIG_W1_MASTER_GPIO=m +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2408=m +CONFIG_W1_SLAVE_DS2413=m +CONFIG_W1_SLAVE_DS2406=m +CONFIG_W1_SLAVE_DS2423=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +CONFIG_W1_SLAVE_DS2438=m +CONFIG_W1_SLAVE_DS2780=m +CONFIG_W1_SLAVE_DS2781=m +CONFIG_W1_SLAVE_DS28E04=m +CONFIG_W1_SLAVE_DS28E17=m +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_RPI_POE_POWER=m +CONFIG_BATTERY_DS2760=m +CONFIG_BATTERY_MAX17040=m +CONFIG_BATTERY_GAUGE_LTC2941=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_GPIO_FAN=m +CONFIG_SENSORS_IIO_HWMON=m +CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_RASPBERRYPI_HWMON=m +CONFIG_SENSORS_RPI_POE_FAN=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHT3x=m +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_INA2XX=m +CONFIG_SENSORS_TMP102=m +CONFIG_THERMAL=y +CONFIG_BCM2835_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_GPIO_WATCHDOG=m +CONFIG_BCM2835_WDT=y +CONFIG_MFD_STMPE=y +CONFIG_STMPE_SPI=y +CONFIG_MFD_ARIZONA_I2C=m +CONFIG_MFD_ARIZONA_SPI=m +CONFIG_MFD_WM5102=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=m +CONFIG_REGULATOR_ARIZONA_LDO1=m +CONFIG_REGULATOR_ARIZONA_MICSUPP=m +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m +CONFIG_RC_CORE=y +CONFIG_LIRC=y +CONFIG_BPF_LIRC_MODE2=y +CONFIG_RC_DECODERS=y +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_SANYO_DECODER=m +CONFIG_IR_SHARP_DECODER=m +CONFIG_IR_MCE_KBD_DECODER=m +CONFIG_IR_XMP_DECODER=m +CONFIG_IR_IMON_DECODER=m +CONFIG_RC_DEVICES=y +CONFIG_RC_ATI_REMOTE=m +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_RC_LOOPBACK=m +CONFIG_IR_GPIO_CIR=m +CONFIG_IR_GPIO_TX=m +CONFIG_IR_PWM_TX=m +CONFIG_IR_TOY=m +CONFIG_MEDIA_CEC_RC=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_DTCS033=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STK1135=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_VIDEO_USBTV=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_STK1160_COMMON=m +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +CONFIG_VIDEO_GO7007_USB_S2250_BOARD=m +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_RC=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_TM6000_DVB=m +CONFIG_DVB_USB=m +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_PCTV452E=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +CONFIG_DVB_AS102=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_V4L2=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_RADIO_SI470X=m +CONFIG_USB_SI470X=m +CONFIG_I2C_SI470X=m +CONFIG_RADIO_SI4713=m +CONFIG_I2C_SI4713=m +CONFIG_USB_MR800=m +CONFIG_USB_DSBR=m +CONFIG_RADIO_SHARK=m +CONFIG_RADIO_SHARK2=m +CONFIG_USB_KEENE=m +CONFIG_USB_MA901=m +CONFIG_RADIO_TEA5764=m +CONFIG_RADIO_SAA7706H=m +CONFIG_RADIO_TEF6862=m +CONFIG_RADIO_WL1273=m +CONFIG_RADIO_WL128X=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_BCM2835_UNICAM=m +CONFIG_VIDEO_UDA1342=m +CONFIG_VIDEO_SONY_BTF_MPX=m +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_TC358743=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_TW2804=m +CONFIG_VIDEO_TW9903=m +CONFIG_VIDEO_TW9906=m +CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_IMX290=m +CONFIG_VIDEO_IMX477=m +CONFIG_VIDEO_IMX519=m +CONFIG_VIDEO_OV5647=m +CONFIG_VIDEO_OV7251=m +CONFIG_VIDEO_OV7640=m +CONFIG_VIDEO_OV9281=m +CONFIG_VIDEO_IRS1125=m +CONFIG_VIDEO_MT9V011=m +CONFIG_DRM=m +CONFIG_DRM_LOAD_EDID_FIRMWARE=y +CONFIG_DRM_UDL=m +CONFIG_DRM_PANEL_SIMPLE=m +CONFIG_DRM_PANEL_JDI_LT070ME05000=m +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m +CONFIG_DRM_DISPLAY_CONNECTOR=m +CONFIG_DRM_SIMPLE_BRIDGE=m +CONFIG_DRM_TOSHIBA_TC358762=m +CONFIG_DRM_VC4=m +CONFIG_DRM_VC4_HDMI_CEC=y +CONFIG_TINYDRM_ILI9225=m +CONFIG_TINYDRM_ILI9341=m +CONFIG_TINYDRM_MI0283QT=m +CONFIG_TINYDRM_REPAPER=m +CONFIG_TINYDRM_ST7586=m +CONFIG_TINYDRM_ST7735R=m +CONFIG_DRM_GUD=m +CONFIG_FB=y +CONFIG_FB_BCM2708=y +CONFIG_FB_UDL=m +CONFIG_FB_SIMPLE=y +CONFIG_FB_SSD1307=m +CONFIG_FB_RPISENSE=m +CONFIG_BACKLIGHT_RPI=m +CONFIG_BACKLIGHT_GPIO=m +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM_OSS=m +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_DUMMY=m +CONFIG_SND_ALOOP=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_USB_HIFACE=m +CONFIG_SND_USB_TONEPORT=m +CONFIG_SND_SOC=m +CONFIG_SND_BCM2835_SOC_I2S=m +CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m +CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m +CONFIG_SND_BCM2708_SOC_PIFI_40=m +CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m +CONFIG_SND_BCM2708_SOC_RPI_DAC=m +CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m +CONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m +CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m +CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m +CONFIG_SND_AUDIOSENSE_PI=m +CONFIG_SND_DIGIDAC1_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m +CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m +CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +CONFIG_SND_PISOUND=m +CONFIG_SND_SOC_AD193X_SPI=m +CONFIG_SND_SOC_AD193X_I2C=m +CONFIG_SND_SOC_ADAU1701=m +CONFIG_SND_SOC_ADAU7002=m +CONFIG_SND_SOC_AK4554=m +CONFIG_SND_SOC_CS4265=m +CONFIG_SND_SOC_ICS43432=m +CONFIG_SND_SOC_MA120X0P=m +CONFIG_SND_SOC_MAX98357A=m +CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_WM8804_I2C=m +CONFIG_SND_SOC_WM8960=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_APPLE=m +CONFIG_HID_ASUS=m +CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m +CONFIG_HID_BIGBEN_FF=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_ELO=m +CONFIG_HID_EZKEY=m +CONFIG_HID_GEMBIRD=m +CONFIG_HID_HOLTEK=m +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +CONFIG_HID_LOGITECH=m +CONFIG_HID_LOGITECH_DJ=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=m +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEAM=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_XINMO=m +CONFIG_HID_ZEROPLUS=m +CONFIG_HID_ZYDACRON=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y +CONFIG_I2C_HID=m +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=m +CONFIG_USB_DWCOTG=y +CONFIG_USB_PRINTER=m +CONFIG_USB_TMC=m +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_REALTEK=m +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=m +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_HOST=m +CONFIG_USBIP_VUDC=m +CONFIG_USB_DWC2=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_YUREX=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_USB_GADGET=m +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_HID=m +CONFIG_USB_G_WEBCAM=m +CONFIG_MMC=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BCM2835_MMC=y +CONFIG_MMC_BCM2835_DMA=y +CONFIG_MMC_BCM2835_SDHOST=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SPI=m +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_PCA9532=m +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PCA955X=m +CONFIG_LEDS_PCA963X=m +CONFIG_LEDS_PWM=y +CONFIG_LEDS_IS31FL32XX=m +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=m +CONFIG_LEDS_TRIGGER_CAMERA=m +CONFIG_LEDS_TRIGGER_INPUT=y +CONFIG_LEDS_TRIGGER_PANIC=y +CONFIG_LEDS_TRIGGER_NETDEV=m +CONFIG_LEDS_TRIGGER_PATTERN=m +CONFIG_LEDS_TRIGGER_ACTPWR=y +CONFIG_ACCESSIBILITY=y +CONFIG_SPEAKUP=m +CONFIG_SPEAKUP_SYNTH_SOFT=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_ABX80X=m +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_ISL12022=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8523=m +CONFIG_RTC_DRV_PCF85063=m +CONFIG_RTC_DRV_PCF85363=m +CONFIG_RTC_DRV_PCF8563=m +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m +CONFIG_RTC_DRV_EM3027=m +CONFIG_RTC_DRV_RV3028=m +CONFIG_RTC_DRV_SD3078=m +CONFIG_RTC_DRV_M41T93=m +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1302=m +CONFIG_RTC_DRV_DS1305=m +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RX4581=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_PCF2123=m +CONFIG_RTC_DRV_DS3232=m +CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_RV3029C2=m +CONFIG_DMADEVICES=y +CONFIG_DMA_BCM2835=y +CONFIG_DMA_BCM2708=y +CONFIG_DMABUF_HEAPS=y +CONFIG_DMABUF_HEAPS_SYSTEM=y +CONFIG_DMABUF_HEAPS_CMA=y +CONFIG_AUXDISPLAY=y +CONFIG_HD44780=m +CONFIG_UIO=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_STAGING=y +CONFIG_PRISM2_USB=m +CONFIG_R8712U=m +CONFIG_R8188EU=m +CONFIG_VT6656=m +CONFIG_STAGING_MEDIA=y +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_HX8357D=m +CONFIG_FB_TFT_ILI9163=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SH1106=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_BCM2835_VCHIQ=y +CONFIG_SND_BCM2835=m +CONFIG_VIDEO_BCM2835=m +CONFIG_VIDEO_CODEC_BCM2835=m +CONFIG_VIDEO_ISP_BCM2835=m +CONFIG_CLK_RASPBERRYPI=y +CONFIG_MAILBOX=y +CONFIG_BCM2835_MBOX=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_RASPBERRYPI_POWER=y +CONFIG_EXTCON=m +CONFIG_EXTCON_ARIZONA=m +CONFIG_IIO=m +CONFIG_IIO_BUFFER_CB=m +CONFIG_MCP320X=m +CONFIG_MCP3422=m +CONFIG_TI_ADS1015=m +CONFIG_BME680=m +CONFIG_CCS811=m +CONFIG_SENSIRION_SGP30=m +CONFIG_SPS30=m +CONFIG_DHT11=m +CONFIG_HDC100X=m +CONFIG_HTU21=m +CONFIG_INV_MPU6050_I2C=m +CONFIG_APDS9960=m +CONFIG_BH1750=m +CONFIG_TSL4531=m +CONFIG_VEML6070=m +CONFIG_BMP280=m +CONFIG_MAXIM_THERMOCOUPLE=m +CONFIG_MAX31856=m +CONFIG_PWM_BCM2835=m +CONFIG_PWM_PCA9685=m +CONFIG_RPI_AXIPERF=m +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_REISERFS_FS=m +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +CONFIG_JFS_STATISTICS=y +CONFIG_XFS_FS=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +CONFIG_GFS2_FS=m +CONFIG_OCFS2_FS=m +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_NILFS2_FS=m +CONFIG_F2FS_FS=y +CONFIG_F2FS_FS_SECURITY=y +CONFIG_FS_ENCRYPTION=y +CONFIG_FANOTIFY=y +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_OVERLAY_FS=m +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +CONFIG_CACHEFILES=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +CONFIG_EXFAT_FS=m +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_ECRYPT_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_SUMMARY=y +CONFIG_UBIFS_FS=m +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_SWAP=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_ROOT_NFS=y +CONFIG_NFS_FSCACHE=y +CONFIG_NFSD=m +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_CIFS=m +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_9P_FS=m +CONFIG_9P_FS_POSIX_ACL=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_DLM=m +CONFIG_SECURITY=y +CONFIG_SECURITY_APPARMOR=y +CONFIG_LSM="" +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_CHACHA20POLY1305=m +CONFIG_CRYPTO_ADIANTUM=m +CONFIG_CRYPTO_XCBC=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m +CONFIG_CRYPTO_USER_API_AEAD=m +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=5 +CONFIG_PRINTK_TIME=y +CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_KGDB=y +CONFIG_KGDB_KDB=y +CONFIG_KDB_KEYBOARD=y +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_RCU_TRACE is not set +CONFIG_LATENCYTOP=y +CONFIG_FUNCTION_PROFILER=y +CONFIG_STACK_TRACER=y +CONFIG_IRQSOFF_TRACER=y +CONFIG_SCHED_TRACER=y +CONFIG_BLK_DEV_IO_TRACE=y +# CONFIG_UPROBE_EVENTS is not set From b3b66f2493281e8e25eac92a7e1b5097e34838a8 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 12 Jan 2022 16:52:36 +0100 Subject: [PATCH 045/183] arm/configs: Add revpi-v7l_defconfig The revpi-v7l_defconfig is based on the bcm2711_defconfig. It is intended for CM4/CM4S devices. Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v7l_defconfig | 1556 ++++++++++++++++++++++++++ 1 file changed, 1556 insertions(+) create mode 100644 arch/arm/configs/revpi-v7l_defconfig diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig new file mode 100644 index 00000000000000..77cccb33de2a5a --- /dev/null +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -0,0 +1,1556 @@ +CONFIG_LOCALVERSION="-v7l" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_GENERIC_IRQ_DEBUGFS=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=m +CONFIG_IKCONFIG_PROC=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_ARCH_BCM=y +CONFIG_ARCH_BCM2835=y +CONFIG_ARM_LPAE=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_SMP=y +CONFIG_HIGHMEM=y +CONFIG_UACCESS_WITH_MEMCPY=y +# CONFIG_ATAGS is not set +CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_RASPBERRYPI_CPUFREQ=y +CONFIG_VFP=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y +# CONFIG_SUSPEND is not set +CONFIG_PM=y +CONFIG_RASPBERRYPI_FIRMWARE=y +CONFIG_CRYPTO_SHA1_ARM_NEON=m +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_AES_ARM_BS=m +CONFIG_OPROFILE=m +CONFIG_JUMP_LABEL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_BLK_DEV_THROTTLING=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_MAC_PARTITION=y +CONFIG_BINFMT_MISC=m +CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y +CONFIG_CMA=y +CONFIG_ZSWAP=y +CONFIG_Z3FOLD=m +CONFIG_ZSMALLOC=m +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=m +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_NET_IPVTI=m +CONFIG_NET_FOU=m +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BBR=m +CONFIG_IPV6=m +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_ESP_OFFLOAD=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_ILA=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_GRE=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +CONFIG_NETFILTER=y +CONFIG_BRIDGE_NETFILTER=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_LOG_NETDEV=m +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y +CONFIG_NFT_NUMGEN=m +CONFIG_NFT_CT=m +CONFIG_NFT_FLOW_OFFLOAD=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_CONNLIMIT=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m +CONFIG_NFT_NAT=m +CONFIG_NFT_TUNNEL=m +CONFIG_NFT_OBJREF=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_QUOTA=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NFT_HASH=m +CONFIG_NFT_FIB_INET=m +CONFIG_NFT_SOCKET=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m +CONFIG_NFT_DUP_NETDEV=m +CONFIG_NFT_FWD_NETDEV=m +CONFIG_NFT_FIB_NETDEV=m +CONFIG_NF_FLOW_TABLE_INET=m +CONFIG_NF_FLOW_TABLE=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_PE_SIP=m +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NF_TABLES_ARP=y +CONFIG_NF_FLOW_TABLE_IPV4=m +CONFIG_NF_LOG_ARP=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_FLOW_TABLE_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_SRH=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NFT_BRIDGE_REJECT=m +CONFIG_NF_LOG_BRIDGE=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_ATM=m +CONFIG_L2TP=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_BRIDGE=m +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_ATALK=m +CONFIG_6LOWPAN=m +CONFIG_IEEE802154=m +CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_CAKE=m +CONFIG_NET_SCH_FQ=m +CONFIG_NET_SCH_HHF=m +CONFIG_NET_SCH_PIE=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +CONFIG_BATMAN_ADV=m +CONFIG_OPENVSWITCH=m +CONFIG_CGROUP_NET_PRIO=y +CONFIG_NET_PKTGEN=m +CONFIG_HAMRADIO=y +CONFIG_AX25=m +CONFIG_NETROM=m +CONFIG_ROSE=m +CONFIG_MKISS=m +CONFIG_6PACK=m +CONFIG_BPQETHER=m +CONFIG_BAYCOM_SER_FDX=m +CONFIG_BAYCOM_SER_HDX=m +CONFIG_YAM=m +CONFIG_CAN=m +CONFIG_CAN_J1939=m +CONFIG_CAN_ISOTP=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_EMS_USB=m +CONFIG_CAN_GS_USB=m +CONFIG_CAN_PEAK_USB=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_6LOWPAN=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_MAC80211_MESH=y +CONFIG_WIMAX=m +CONFIG_RFKILL=m +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +CONFIG_NFC=m +CONFIG_PCI=y +CONFIG_PCIEPORTBUS=y +# CONFIG_PCIEASPM is not set +CONFIG_PCI_MSI=y +CONFIG_PCIE_BRCMSTB=y +CONFIG_UEVENT_HELPER=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=m +CONFIG_MTD_BLOCK=m +CONFIG_MTD_BLOCK2MTD=m +CONFIG_MTD_SPI_NOR=m +CONFIG_MTD_UBI=m +CONFIG_OF_CONFIGFS=y +CONFIG_ZRAM=m +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_CDROM_PKTCDVD=m +CONFIG_ATA_OVER_ETH=m +CONFIG_BLK_DEV_NVME=y +CONFIG_EEPROM_AT24=m +CONFIG_TI_ST=m +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_BLK_DEV_SR=m +CONFIG_CHR_DEV_SG=m +CONFIG_SCSI_ISCSI_ATTRS=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +CONFIG_ATA=m +CONFIG_SATA_AHCI=m +CONFIG_SATA_MV=m +CONFIG_MD=y +CONFIG_MD_LINEAR=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m +CONFIG_DM_ZERO=m +CONFIG_DM_DELAY=m +CONFIG_NETDEVICES=y +CONFIG_BONDING=m +CONFIG_DUMMY=m +CONFIG_WIREGUARD=m +CONFIG_IFB=m +CONFIG_MACVLAN=m +CONFIG_IPVLAN=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_NET_VRF=m +CONFIG_BCMGENET=y +CONFIG_ENC28J60=m +CONFIG_QCA7000_SPI=m +CONFIG_QCA7000_UART=m +CONFIG_R8169=m +CONFIG_WIZNET_W5100=m +CONFIG_WIZNET_W5100_SPI=m +CONFIG_MICREL_PHY=y +CONFIG_MDIO_BITBANG=m +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=y +CONFIG_USB_LAN78XX=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_HUAWEI_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +CONFIG_USB_NET_SR9800=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +CONFIG_USB_NET_AQC111=m +CONFIG_ATH9K=m +CONFIG_ATH9K_HTC=m +CONFIG_CARL9170=m +CONFIG_ATH6KL=m +CONFIG_ATH6KL_USB=m +CONFIG_AR5523=m +CONFIG_AT76C50X_USB=m +CONFIG_B43=m +# CONFIG_B43_PHY_N is not set +CONFIG_B43LEGACY=m +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_USB=y +CONFIG_BRCMDBG=y +CONFIG_HOSTAP=m +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MT7601U=m +CONFIG_MT76x0U=m +CONFIG_MT76x2U=m +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RTL8187=m +CONFIG_RTL8192CU=m +CONFIG_RTL8XXXU=m +CONFIG_USB_ZD1201=m +CONFIG_ZD1211RW=m +CONFIG_MAC80211_HWSIM=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_IEEE802154_AT86RF230=m +CONFIG_IEEE802154_MRF24J40=m +CONFIG_IEEE802154_CC2520=m +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_TCA6416=m +CONFIG_KEYBOARD_TCA8418=m +CONFIG_KEYBOARD_MATRIX=m +CONFIG_KEYBOARD_CAP11XX=m +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_IFORCE=m +CONFIG_JOYSTICK_IFORCE_USB=m +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_JOYSTICK_PSXPAD_SPI=m +CONFIG_JOYSTICK_PSXPAD_SPI_FF=y +CONFIG_JOYSTICK_RPISENSE=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_EGALAX=m +CONFIG_TOUCHSCREEN_EXC3000=m +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_ILI210X=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_STMPE=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AD714X=m +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_CMA3000=m +CONFIG_SERIO=m +CONFIG_SERIO_RAW=m +CONFIG_GAMEPORT=m +CONFIG_GAMEPORT_NS558=m +CONFIG_GAMEPORT_L4=m +CONFIG_BRCM_CHAR_DRIVERS=y +CONFIG_BCM_VCIO=y +CONFIG_BCM2835_DEVGPIOMEM=y +CONFIG_RPIVID_MEM=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_DMA is not set +CONFIG_SERIAL_8250_NR_UARTS=1 +CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_BCM2835AUX=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_SC16IS7XX=m +CONFIG_SERIAL_SC16IS7XX_SPI=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_TTY_PRINTK=y +CONFIG_HW_RANDOM=y +CONFIG_RAW_DRIVER=y +CONFIG_TCG_TPM=m +CONFIG_TCG_TIS_SPI=m +CONFIG_RANDOM_TRUST_BOOTLOADER=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_MUX_GPMUX=m +CONFIG_I2C_MUX_PCA954x=m +CONFIG_I2C_MUX_PINCTRL=m +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2835=m +CONFIG_I2C_BRCMSTB=m +CONFIG_I2C_GPIO=m +CONFIG_I2C_ROBOTFUZZ_OSIF=m +CONFIG_I2C_TINY_USB=m +CONFIG_SPI=y +CONFIG_SPI_BCM2835=m +CONFIG_SPI_BCM2835AUX=m +CONFIG_SPI_GPIO=m +CONFIG_SPI_SPIDEV=m +CONFIG_SPI_SLAVE=y +CONFIG_PPS=m +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_GPIO=m +CONFIG_PINCTRL_MCP23S08=m +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_BCM_VIRT=y +CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=m +CONFIG_GPIO_ARIZONA=m +CONFIG_GPIO_FSM=m +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_MOCKUP=m +CONFIG_W1=m +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m +CONFIG_W1_MASTER_DS1WM=m +CONFIG_W1_MASTER_GPIO=m +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2408=m +CONFIG_W1_SLAVE_DS2413=m +CONFIG_W1_SLAVE_DS2406=m +CONFIG_W1_SLAVE_DS2423=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +CONFIG_W1_SLAVE_DS2438=m +CONFIG_W1_SLAVE_DS2780=m +CONFIG_W1_SLAVE_DS2781=m +CONFIG_W1_SLAVE_DS28E04=m +CONFIG_W1_SLAVE_DS28E17=m +CONFIG_POWER_RESET=y +CONFIG_POWER_RESET_GPIO=y +CONFIG_RPI_POE_POWER=m +CONFIG_BATTERY_DS2760=m +CONFIG_BATTERY_MAX17040=m +CONFIG_BATTERY_GAUGE_LTC2941=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_GPIO_FAN=m +CONFIG_SENSORS_IIO_HWMON=m +CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_RASPBERRYPI_HWMON=m +CONFIG_SENSORS_RPI_POE_FAN=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHT3x=m +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_INA2XX=m +CONFIG_SENSORS_TMP102=m +CONFIG_THERMAL=y +CONFIG_BCM2711_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_GPIO_WATCHDOG=m +CONFIG_BCM2835_WDT=y +CONFIG_MFD_STMPE=y +CONFIG_STMPE_SPI=y +CONFIG_MFD_ARIZONA_I2C=m +CONFIG_MFD_ARIZONA_SPI=m +CONFIG_MFD_WM5102=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ARIZONA_LDO1=m +CONFIG_REGULATOR_ARIZONA_MICSUPP=m +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m +CONFIG_RC_CORE=y +CONFIG_LIRC=y +CONFIG_BPF_LIRC_MODE2=y +CONFIG_RC_DECODERS=y +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_SANYO_DECODER=m +CONFIG_IR_SHARP_DECODER=m +CONFIG_IR_MCE_KBD_DECODER=m +CONFIG_IR_XMP_DECODER=m +CONFIG_IR_IMON_DECODER=m +CONFIG_RC_DEVICES=y +CONFIG_RC_ATI_REMOTE=m +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_RC_LOOPBACK=m +CONFIG_IR_GPIO_CIR=m +CONFIG_IR_GPIO_TX=m +CONFIG_IR_PWM_TX=m +CONFIG_IR_TOY=m +CONFIG_MEDIA_CEC_RC=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_DTCS033=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STK1135=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_VIDEO_USBTV=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_STK1160_COMMON=m +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +CONFIG_VIDEO_GO7007_USB_S2250_BOARD=m +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_RC=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_TM6000_DVB=m +CONFIG_DVB_USB=m +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_PCTV452E=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +CONFIG_DVB_AS102=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_V4L2=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_RADIO_SI470X=m +CONFIG_USB_SI470X=m +CONFIG_I2C_SI470X=m +CONFIG_RADIO_SI4713=m +CONFIG_I2C_SI4713=m +CONFIG_USB_MR800=m +CONFIG_USB_DSBR=m +CONFIG_RADIO_SHARK=m +CONFIG_RADIO_SHARK2=m +CONFIG_USB_KEENE=m +CONFIG_USB_MA901=m +CONFIG_RADIO_TEA5764=m +CONFIG_RADIO_SAA7706H=m +CONFIG_RADIO_TEF6862=m +CONFIG_RADIO_WL1273=m +CONFIG_RADIO_WL128X=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_BCM2835_UNICAM=m +CONFIG_VIDEO_UDA1342=m +CONFIG_VIDEO_SONY_BTF_MPX=m +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_TC358743=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_TW2804=m +CONFIG_VIDEO_TW9903=m +CONFIG_VIDEO_TW9906=m +CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_IMX290=m +CONFIG_VIDEO_IMX477=m +CONFIG_VIDEO_IMX519=m +CONFIG_VIDEO_OV5647=m +CONFIG_VIDEO_OV7251=m +CONFIG_VIDEO_OV7640=m +CONFIG_VIDEO_OV9281=m +CONFIG_VIDEO_IRS1125=m +CONFIG_VIDEO_MT9V011=m +CONFIG_DRM=m +CONFIG_DRM_LOAD_EDID_FIRMWARE=y +CONFIG_DRM_UDL=m +CONFIG_DRM_PANEL_SIMPLE=m +CONFIG_DRM_PANEL_ILITEK_ILI9881C=m +CONFIG_DRM_PANEL_JDI_LT070ME05000=m +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m +CONFIG_DRM_DISPLAY_CONNECTOR=m +CONFIG_DRM_SIMPLE_BRIDGE=m +CONFIG_DRM_TOSHIBA_TC358762=m +CONFIG_DRM_V3D=m +CONFIG_DRM_VC4=m +CONFIG_DRM_VC4_HDMI_CEC=y +CONFIG_TINYDRM_ILI9225=m +CONFIG_TINYDRM_ILI9341=m +CONFIG_TINYDRM_MI0283QT=m +CONFIG_TINYDRM_REPAPER=m +CONFIG_TINYDRM_ST7586=m +CONFIG_TINYDRM_ST7735R=m +CONFIG_DRM_GUD=m +CONFIG_FB=y +CONFIG_FB_BCM2708=y +CONFIG_FB_UDL=m +CONFIG_FB_SIMPLE=y +CONFIG_FB_SSD1307=m +CONFIG_FB_RPISENSE=m +CONFIG_BACKLIGHT_PWM=m +CONFIG_BACKLIGHT_RPI=m +CONFIG_BACKLIGHT_GPIO=m +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM_OSS=m +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_DUMMY=m +CONFIG_SND_ALOOP=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_USB_HIFACE=m +CONFIG_SND_USB_TONEPORT=m +CONFIG_SND_SOC=m +CONFIG_SND_BCM2835_SOC_I2S=m +CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m +CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m +CONFIG_SND_BCM2708_SOC_PIFI_40=m +CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m +CONFIG_SND_BCM2708_SOC_RPI_DAC=m +CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m +CONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m +CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m +CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m +CONFIG_SND_AUDIOSENSE_PI=m +CONFIG_SND_DIGIDAC1_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m +CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m +CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +CONFIG_SND_PISOUND=m +CONFIG_SND_SOC_AD193X_SPI=m +CONFIG_SND_SOC_AD193X_I2C=m +CONFIG_SND_SOC_ADAU1701=m +CONFIG_SND_SOC_ADAU7002=m +CONFIG_SND_SOC_AK4554=m +CONFIG_SND_SOC_CS4265=m +CONFIG_SND_SOC_ICS43432=m +CONFIG_SND_SOC_MA120X0P=m +CONFIG_SND_SOC_MAX98357A=m +CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_WM8804_I2C=m +CONFIG_SND_SOC_WM8960=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_APPLE=m +CONFIG_HID_ASUS=m +CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m +CONFIG_HID_BIGBEN_FF=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_ELO=m +CONFIG_HID_EZKEY=m +CONFIG_HID_GEMBIRD=m +CONFIG_HID_HOLTEK=m +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +CONFIG_HID_LOGITECH=m +CONFIG_HID_LOGITECH_DJ=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=m +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEAM=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_XINMO=m +CONFIG_HID_ZEROPLUS=m +CONFIG_HID_ZYDACRON=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y +CONFIG_I2C_HID=m +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=m +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_DWCOTG=y +CONFIG_USB_PRINTER=m +CONFIG_USB_TMC=m +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_REALTEK=m +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=y +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_HOST=m +CONFIG_USBIP_VUDC=m +CONFIG_USB_DWC2=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_YUREX=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_HID=m +CONFIG_USB_G_WEBCAM=m +CONFIG_MMC=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BCM2835_MMC=y +CONFIG_MMC_BCM2835_DMA=y +CONFIG_MMC_BCM2835_SDHOST=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_IPROC=y +CONFIG_MMC_SPI=m +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_PCA9532=m +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PCA955X=m +CONFIG_LEDS_PCA963X=m +CONFIG_LEDS_PWM=y +CONFIG_LEDS_IS31FL32XX=m +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=m +CONFIG_LEDS_TRIGGER_CAMERA=m +CONFIG_LEDS_TRIGGER_INPUT=y +CONFIG_LEDS_TRIGGER_PANIC=y +CONFIG_LEDS_TRIGGER_NETDEV=m +CONFIG_LEDS_TRIGGER_PATTERN=m +CONFIG_LEDS_TRIGGER_ACTPWR=y +CONFIG_ACCESSIBILITY=y +CONFIG_SPEAKUP=m +CONFIG_SPEAKUP_SYNTH_SOFT=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_ABX80X=m +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_ISL12022=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8523=m +CONFIG_RTC_DRV_PCF85063=m +CONFIG_RTC_DRV_PCF85363=m +CONFIG_RTC_DRV_PCF8563=m +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m +CONFIG_RTC_DRV_EM3027=m +CONFIG_RTC_DRV_RV3028=m +CONFIG_RTC_DRV_SD3078=m +CONFIG_RTC_DRV_M41T93=m +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1302=m +CONFIG_RTC_DRV_DS1305=m +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RX4581=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_PCF2123=m +CONFIG_RTC_DRV_DS3232=m +CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_RV3029C2=m +CONFIG_DMADEVICES=y +CONFIG_DMA_BCM2835=y +CONFIG_DMA_BCM2708=y +CONFIG_DMABUF_HEAPS=y +CONFIG_DMABUF_HEAPS_SYSTEM=y +CONFIG_DMABUF_HEAPS_CMA=y +CONFIG_AUXDISPLAY=y +CONFIG_HD44780=m +CONFIG_UIO=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_STAGING=y +CONFIG_PRISM2_USB=m +CONFIG_R8712U=m +CONFIG_R8188EU=m +CONFIG_VT6656=m +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_RPIVID=m +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_HX8357D=m +CONFIG_FB_TFT_ILI9163=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SH1106=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_BCM2835_VCHIQ=y +CONFIG_SND_BCM2835=m +CONFIG_VIDEO_BCM2835=m +CONFIG_VIDEO_CODEC_BCM2835=m +CONFIG_VIDEO_ISP_BCM2835=m +CONFIG_CLK_RASPBERRYPI=y +CONFIG_MAILBOX=y +CONFIG_BCM2835_MBOX=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_RASPBERRYPI_POWER=y +CONFIG_EXTCON_ARIZONA=m +CONFIG_IIO=m +CONFIG_IIO_BUFFER_CB=m +CONFIG_MCP320X=m +CONFIG_MCP3422=m +CONFIG_TI_ADS1015=m +CONFIG_BME680=m +CONFIG_CCS811=m +CONFIG_SENSIRION_SGP30=m +CONFIG_SPS30=m +CONFIG_DHT11=m +CONFIG_HDC100X=m +CONFIG_HTU21=m +CONFIG_INV_MPU6050_I2C=m +CONFIG_APDS9960=m +CONFIG_BH1750=m +CONFIG_TSL4531=m +CONFIG_VEML6070=m +CONFIG_BMP280=m +CONFIG_MAXIM_THERMOCOUPLE=m +CONFIG_MAX31856=m +CONFIG_PWM_BCM2835=m +CONFIG_PWM_PCA9685=m +CONFIG_RPI_AXIPERF=m +CONFIG_NVMEM_RMEM=m +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_REISERFS_FS=m +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +CONFIG_JFS_STATISTICS=y +CONFIG_XFS_FS=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +CONFIG_GFS2_FS=m +CONFIG_OCFS2_FS=m +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_NILFS2_FS=m +CONFIG_F2FS_FS=y +CONFIG_F2FS_FS_SECURITY=y +CONFIG_FS_ENCRYPTION=y +CONFIG_FANOTIFY=y +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_OVERLAY_FS=m +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +CONFIG_CACHEFILES=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +CONFIG_EXFAT_FS=m +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_ECRYPT_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_SUMMARY=y +CONFIG_UBIFS_FS=m +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_SWAP=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_ROOT_NFS=y +CONFIG_NFS_FSCACHE=y +CONFIG_NFSD=m +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_CIFS=m +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_9P_FS=m +CONFIG_9P_FS_POSIX_ACL=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_DLM=m +CONFIG_SECURITY=y +CONFIG_SECURITY_APPARMOR=y +CONFIG_LSM="" +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_CHACHA20POLY1305=m +CONFIG_CRYPTO_ADIANTUM=m +CONFIG_CRYPTO_XCBC=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m +CONFIG_CRYPTO_USER_API_AEAD=m +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=5 +CONFIG_PRINTK_TIME=y +CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_KGDB=y +CONFIG_KGDB_KDB=y +CONFIG_KDB_KEYBOARD=y +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_RCU_TRACE is not set +CONFIG_LATENCYTOP=y +CONFIG_FUNCTION_PROFILER=y +CONFIG_STACK_TRACER=y +CONFIG_IRQSOFF_TRACER=y +CONFIG_SCHED_TRACER=y +CONFIG_BLK_DEV_IO_TRACE=y +# CONFIG_UPROBE_EVENTS is not set From a5508c7bb8e7eeae6c58ebb39c9335f2ff028e15 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 19 Apr 2021 13:06:59 +0200 Subject: [PATCH 046/183] arm/configs/revpi-*: Enable PREEMPT_RT Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 6 ++---- arch/arm/configs/revpi-v7_defconfig | 5 +---- arch/arm/configs/revpi-v7l_defconfig | 5 +---- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index f2a474cdad5602..8c8a5ccd889de2 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -4,7 +4,7 @@ CONFIG_POSIX_MQUEUE=y CONFIG_GENERIC_IRQ_DEBUGFS=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_PREEMPT_RT=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASKSTATS=y @@ -54,8 +54,6 @@ CONFIG_PM=y CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_CRYPTO_SHA1_ARM=m CONFIG_CRYPTO_AES_ARM=m -CONFIG_OPROFILE=m -CONFIG_JUMP_LABEL=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y @@ -1242,7 +1240,6 @@ CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_LEDS_TRIGGER_TRANSIENT=m @@ -1518,6 +1515,7 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DETECT_HUNG_TASK=y +# CONFIG_RCU_TRACE is not set CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 04a38fe4c6d99f..82f3c7b3d9c4fb 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y CONFIG_GENERIC_IRQ_DEBUGFS=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_PREEMPT_RT=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASKSTATS=y @@ -60,8 +60,6 @@ CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_AES_ARM=m CONFIG_CRYPTO_AES_ARM_BS=m -CONFIG_OPROFILE=m -CONFIG_JUMP_LABEL=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y @@ -1249,7 +1247,6 @@ CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_LEDS_TRIGGER_TRANSIENT=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 77cccb33de2a5a..afd43b9d06b43e 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y CONFIG_GENERIC_IRQ_DEBUGFS=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT_VOLUNTARY=y +CONFIG_PREEMPT_RT=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASKSTATS=y @@ -60,8 +60,6 @@ CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_AES_ARM=m CONFIG_CRYPTO_AES_ARM_BS=m -CONFIG_OPROFILE=m -CONFIG_JUMP_LABEL=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODVERSIONS=y @@ -1271,7 +1269,6 @@ CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_LEDS_TRIGGER_TRANSIENT=m From 2ce1bb32a5f4b29196eca34079b860a1d93d0b82 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 19 Apr 2021 13:09:34 +0200 Subject: [PATCH 047/183] arm/configs/revpi-*: Enable lockdep debugging Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 1 + arch/arm/configs/revpi-v7_defconfig | 1 + arch/arm/configs/revpi-v7l_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 8c8a5ccd889de2..31256993dcba38 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -1515,6 +1515,7 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DETECT_HUNG_TASK=y +CONFIG_PROVE_LOCKING=y # CONFIG_RCU_TRACE is not set CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 82f3c7b3d9c4fb..8258b0f38fffe0 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -1519,6 +1519,7 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DETECT_HUNG_TASK=y +CONFIG_PROVE_LOCKING=y # CONFIG_RCU_TRACE is not set CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index afd43b9d06b43e..866e8519f4ad9f 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -1543,6 +1543,7 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DETECT_HUNG_TASK=y +CONFIG_PROVE_LOCKING=y # CONFIG_RCU_TRACE is not set CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y From d4af5d6ba52cc5bd840bca3f6fb7b284b5dd71dc Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 19 Apr 2021 13:13:48 +0200 Subject: [PATCH 048/183] arm/configs/revpi-*: Enable rt latency debugging options Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 2 ++ arch/arm/configs/revpi-v7_defconfig | 2 ++ arch/arm/configs/revpi-v7l_defconfig | 2 ++ 3 files changed, 6 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 31256993dcba38..e4f5e221b2a7c8 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -1521,6 +1521,8 @@ CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y CONFIG_IRQSOFF_TRACER=y +CONFIG_PREEMPT_TRACER=y CONFIG_SCHED_TRACER=y +CONFIG_HWLAT_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 8258b0f38fffe0..d24a31ced7a7b1 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -1525,6 +1525,8 @@ CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y CONFIG_IRQSOFF_TRACER=y +CONFIG_PREEMPT_TRACER=y CONFIG_SCHED_TRACER=y +CONFIG_HWLAT_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 866e8519f4ad9f..f6a0aabdae530b 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -1549,6 +1549,8 @@ CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y CONFIG_IRQSOFF_TRACER=y +CONFIG_PREEMPT_TRACER=y CONFIG_SCHED_TRACER=y +CONFIG_HWLAT_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set From 9eb0af53d084100c3e204a746110150711b66345 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 19 Apr 2021 13:16:49 +0200 Subject: [PATCH 049/183] arm/configs/revpi-*: Build kernel with debug info (Lauterbach support) Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 2 ++ arch/arm/configs/revpi-v7_defconfig | 2 ++ arch/arm/configs/revpi-v7l_defconfig | 2 ++ 3 files changed, 6 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index e4f5e221b2a7c8..2208cba3be8a5a 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -1510,6 +1510,8 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_PRINTK_TIME=y CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_COMPRESSED=y CONFIG_KGDB=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index d24a31ced7a7b1..d3897f679f3f70 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -1514,6 +1514,8 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_PRINTK_TIME=y CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_COMPRESSED=y CONFIG_KGDB=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index f6a0aabdae530b..1a772db3b965ee 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -1538,6 +1538,8 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_PRINTK_TIME=y CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_COMPRESSED=y CONFIG_KGDB=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y From 91a69f633c3f9393a95b0236ed656683125d6d3a Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 19 Apr 2021 13:17:51 +0200 Subject: [PATCH 050/183] arm/configs/revpi-*: Disable debug config options by default Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 5 ----- arch/arm/configs/revpi-v7_defconfig | 5 ----- arch/arm/configs/revpi-v7l_defconfig | 5 ----- 3 files changed, 15 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 2208cba3be8a5a..8c8a5ccd889de2 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -1510,21 +1510,16 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_PRINTK_TIME=y CONFIG_BOOT_PRINTK_DELAY=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_INFO_COMPRESSED=y CONFIG_KGDB=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DETECT_HUNG_TASK=y -CONFIG_PROVE_LOCKING=y # CONFIG_RCU_TRACE is not set CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y CONFIG_IRQSOFF_TRACER=y -CONFIG_PREEMPT_TRACER=y CONFIG_SCHED_TRACER=y -CONFIG_HWLAT_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index d3897f679f3f70..82f3c7b3d9c4fb 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -1514,21 +1514,16 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_PRINTK_TIME=y CONFIG_BOOT_PRINTK_DELAY=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_INFO_COMPRESSED=y CONFIG_KGDB=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DETECT_HUNG_TASK=y -CONFIG_PROVE_LOCKING=y # CONFIG_RCU_TRACE is not set CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y CONFIG_IRQSOFF_TRACER=y -CONFIG_PREEMPT_TRACER=y CONFIG_SCHED_TRACER=y -CONFIG_HWLAT_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 1a772db3b965ee..afd43b9d06b43e 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -1538,21 +1538,16 @@ CONFIG_DMA_CMA=y CONFIG_CMA_SIZE_MBYTES=5 CONFIG_PRINTK_TIME=y CONFIG_BOOT_PRINTK_DELAY=y -CONFIG_DEBUG_INFO=y -CONFIG_DEBUG_INFO_COMPRESSED=y CONFIG_KGDB=y CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DETECT_HUNG_TASK=y -CONFIG_PROVE_LOCKING=y # CONFIG_RCU_TRACE is not set CONFIG_LATENCYTOP=y CONFIG_FUNCTION_PROFILER=y CONFIG_STACK_TRACER=y CONFIG_IRQSOFF_TRACER=y -CONFIG_PREEMPT_TRACER=y CONFIG_SCHED_TRACER=y -CONFIG_HWLAT_TRACER=y CONFIG_BLK_DEV_IO_TRACE=y # CONFIG_UPROBE_EVENTS is not set From 671776ab331474aa1c77caf96a8ce1b2eee090fb Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 19 Apr 2021 13:22:08 +0200 Subject: [PATCH 051/183] arm/configs/revpi-*: Enable SECURITY_YAMA Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 1 + arch/arm/configs/revpi-v7_defconfig | 1 + arch/arm/configs/revpi-v7l_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 8c8a5ccd889de2..2d46647ba1a4f9 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -1485,6 +1485,7 @@ CONFIG_NLS_KOI8_U=m CONFIG_DLM=m CONFIG_SECURITY=y CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_YAMA=y CONFIG_LSM="" CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_CRYPTD=m diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 82f3c7b3d9c4fb..ab385fa5ef4e84 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -1493,6 +1493,7 @@ CONFIG_NLS_KOI8_U=m CONFIG_DLM=m CONFIG_SECURITY=y CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_YAMA=y CONFIG_LSM="" CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_CHACHA20POLY1305=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index afd43b9d06b43e..7a30734ac5a14a 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -1517,6 +1517,7 @@ CONFIG_NLS_KOI8_U=m CONFIG_DLM=m CONFIG_SECURITY=y CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_YAMA=y CONFIG_LSM="" CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_CHACHA20POLY1305=m From 685223aa6e431324bbd055a7627ae0d1f55ac5bc Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 14 Aug 2020 14:41:51 +0200 Subject: [PATCH 052/183] arm/configs/revpi-*: Enable user space wakeup sources interface suspend testing Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 2 -- arch/arm/configs/revpi-v7_defconfig | 2 -- arch/arm/configs/revpi-v7l_defconfig | 2 -- 3 files changed, 6 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 2d46647ba1a4f9..bc68afb10767d6 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -49,8 +49,6 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y CONFIG_CPUFREQ_DT=y CONFIG_ARM_RASPBERRYPI_CPUFREQ=y CONFIG_VFP=y -# CONFIG_SUSPEND is not set -CONFIG_PM=y CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_CRYPTO_SHA1_ARM=m CONFIG_CRYPTO_AES_ARM=m diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index ab385fa5ef4e84..b2ae28159c3b1b 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -54,8 +54,6 @@ CONFIG_ARM_RASPBERRYPI_CPUFREQ=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_KERNEL_MODE_NEON=y -# CONFIG_SUSPEND is not set -CONFIG_PM=y CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_AES_ARM=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 7a30734ac5a14a..1e735a0e7206ee 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -54,8 +54,6 @@ CONFIG_ARM_RASPBERRYPI_CPUFREQ=y CONFIG_VFP=y CONFIG_NEON=y CONFIG_KERNEL_MODE_NEON=y -# CONFIG_SUSPEND is not set -CONFIG_PM=y CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_AES_ARM=m From 62d58ecdbdfa022b141ec16d81aa377060302e46 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 14 Aug 2020 14:45:08 +0200 Subject: [PATCH 053/183] arm/configs/revpi-*: Sync time from i2c rtc to system time on boot As the RTC is on an i2c bus the i2c host drivers needs to be built in. The same aplies to the RTC driver. This seems to be fixed with: f9b2a4d6a5f1 ("rtc: class: support hctosys from modular RTC drivers") This commit might not be needed anymore but should only be removed after proper testing and verification that it is indeed superfluos. Signed-off-by: Lino Sanfilippo Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 6 +++--- arch/arm/configs/revpi-v7_defconfig | 6 +++--- arch/arm/configs/revpi-v7l_defconfig | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index bc68afb10767d6..3316dbf99dbbff 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -668,8 +668,8 @@ CONFIG_I2C_CHARDEV=m CONFIG_I2C_MUX_GPMUX=m CONFIG_I2C_MUX_PCA954x=m CONFIG_I2C_MUX_PINCTRL=m -CONFIG_I2C_BCM2708=m -CONFIG_I2C_BCM2835=m +CONFIG_I2C_BCM2708=y +CONFIG_I2C_BCM2835=y # CONFIG_I2C_BRCMSTB is not set CONFIG_I2C_GPIO=m CONFIG_I2C_ROBOTFUZZ_OSIF=m @@ -1285,7 +1285,7 @@ CONFIG_RTC_DRV_RS5C348=m CONFIG_RTC_DRV_MAX6902=m CONFIG_RTC_DRV_PCF2123=m CONFIG_RTC_DRV_DS3232=m -CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_PCF2127=y CONFIG_RTC_DRV_RV3029C2=m CONFIG_DMADEVICES=y CONFIG_DMA_BCM2835=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index b2ae28159c3b1b..6f6593cfdd6dff 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -674,8 +674,8 @@ CONFIG_I2C_CHARDEV=m CONFIG_I2C_MUX_GPMUX=m CONFIG_I2C_MUX_PCA954x=m CONFIG_I2C_MUX_PINCTRL=m -CONFIG_I2C_BCM2708=m -CONFIG_I2C_BCM2835=m +CONFIG_I2C_BCM2708=y +CONFIG_I2C_BCM2835=y # CONFIG_I2C_BRCMSTB is not set CONFIG_I2C_GPIO=m CONFIG_I2C_ROBOTFUZZ_OSIF=m @@ -1292,7 +1292,7 @@ CONFIG_RTC_DRV_RS5C348=m CONFIG_RTC_DRV_MAX6902=m CONFIG_RTC_DRV_PCF2123=m CONFIG_RTC_DRV_DS3232=m -CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_PCF2127=y CONFIG_RTC_DRV_RV3029C2=m CONFIG_DMADEVICES=y CONFIG_DMA_BCM2835=y diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 1e735a0e7206ee..d525bbe022e71e 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -688,8 +688,8 @@ CONFIG_I2C_CHARDEV=m CONFIG_I2C_MUX_GPMUX=m CONFIG_I2C_MUX_PCA954x=m CONFIG_I2C_MUX_PINCTRL=m -CONFIG_I2C_BCM2708=m -CONFIG_I2C_BCM2835=m +CONFIG_I2C_BCM2708=y +CONFIG_I2C_BCM2835=y CONFIG_I2C_BRCMSTB=m CONFIG_I2C_GPIO=m CONFIG_I2C_ROBOTFUZZ_OSIF=m From aa4b6a34a569d8c2bf6123f4331b8c395db1e4b5 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 14 Aug 2020 14:51:12 +0200 Subject: [PATCH 054/183] arm/configs/revpi-*: Add RevPi Compact support KS8851: eth1 74X164: dout MAX3191X: din DAC082S085: aout MUX_GPIO: ain mux IIO_MUX: ain mux Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 6 ++++++ arch/arm/configs/revpi-v7_defconfig | 6 ++++++ arch/arm/configs/revpi-v7l_defconfig | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 3316dbf99dbbff..ce28c1c148fdfa 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -490,6 +490,7 @@ CONFIG_NETCONSOLE=m CONFIG_TUN=m CONFIG_VETH=m CONFIG_NET_VRF=m +CONFIG_KS8851=m CONFIG_ENC28J60=m CONFIG_QCA7000_SPI=m CONFIG_QCA7000_UART=m @@ -691,6 +692,8 @@ CONFIG_GPIO_PCF857X=m CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_FSM=m CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=m +CONFIG_GPIO_MAX3191X=m CONFIG_GPIO_MOCKUP=m CONFIG_W1=m CONFIG_W1_MASTER_DS2490=m @@ -1354,6 +1357,7 @@ CONFIG_BME680=m CONFIG_CCS811=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m +CONFIG_TI_DAC082S085=m CONFIG_DHT11=m CONFIG_HDC100X=m CONFIG_HTU21=m @@ -1362,12 +1366,14 @@ CONFIG_APDS9960=m CONFIG_BH1750=m CONFIG_TSL4531=m CONFIG_VEML6070=m +CONFIG_IIO_MUX=m CONFIG_BMP280=m CONFIG_MAXIM_THERMOCOUPLE=m CONFIG_MAX31856=m CONFIG_PWM_BCM2835=m CONFIG_PWM_PCA9685=m CONFIG_RPI_AXIPERF=m +CONFIG_MUX_GPIO=m CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 6f6593cfdd6dff..9c82797135416a 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -496,6 +496,7 @@ CONFIG_NETCONSOLE=m CONFIG_TUN=m CONFIG_VETH=m CONFIG_NET_VRF=m +CONFIG_KS8851=m CONFIG_ENC28J60=m CONFIG_QCA7000_SPI=m CONFIG_QCA7000_UART=m @@ -698,6 +699,8 @@ CONFIG_GPIO_PCF857X=m CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_FSM=m CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=m +CONFIG_GPIO_MAX3191X=m CONFIG_GPIO_MOCKUP=m CONFIG_W1=m CONFIG_W1_MASTER_DS2490=m @@ -1361,6 +1364,7 @@ CONFIG_BME680=m CONFIG_CCS811=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m +CONFIG_TI_DAC082S085=m CONFIG_DHT11=m CONFIG_HDC100X=m CONFIG_HTU21=m @@ -1369,12 +1373,14 @@ CONFIG_APDS9960=m CONFIG_BH1750=m CONFIG_TSL4531=m CONFIG_VEML6070=m +CONFIG_IIO_MUX=m CONFIG_BMP280=m CONFIG_MAXIM_THERMOCOUPLE=m CONFIG_MAX31856=m CONFIG_PWM_BCM2835=m CONFIG_PWM_PCA9685=m CONFIG_RPI_AXIPERF=m +CONFIG_MUX_GPIO=m CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index d525bbe022e71e..2ace5254a87491 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -507,6 +507,7 @@ CONFIG_TUN=m CONFIG_VETH=m CONFIG_NET_VRF=m CONFIG_BCMGENET=y +CONFIG_KS8851=m CONFIG_ENC28J60=m CONFIG_QCA7000_SPI=m CONFIG_QCA7000_UART=m @@ -712,6 +713,8 @@ CONFIG_GPIO_PCF857X=m CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_FSM=m CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=m +CONFIG_GPIO_MAX3191X=m CONFIG_GPIO_MOCKUP=m CONFIG_W1=m CONFIG_W1_MASTER_DS2490=m @@ -1383,6 +1386,7 @@ CONFIG_BME680=m CONFIG_CCS811=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m +CONFIG_TI_DAC082S085=m CONFIG_DHT11=m CONFIG_HDC100X=m CONFIG_HTU21=m @@ -1391,6 +1395,7 @@ CONFIG_APDS9960=m CONFIG_BH1750=m CONFIG_TSL4531=m CONFIG_VEML6070=m +CONFIG_IIO_MUX=m CONFIG_BMP280=m CONFIG_MAXIM_THERMOCOUPLE=m CONFIG_MAX31856=m @@ -1398,6 +1403,7 @@ CONFIG_PWM_BCM2835=m CONFIG_PWM_PCA9685=m CONFIG_RPI_AXIPERF=m CONFIG_NVMEM_RMEM=m +CONFIG_MUX_GPIO=m CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y From 532c78e4f2812b06896f6cbf80a3b2bb72ea5fc1 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 14 Aug 2020 15:06:28 +0200 Subject: [PATCH 055/183] arm/configs/revpi-*: Add RevPi Connect CAN driver Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 1 + arch/arm/configs/revpi-v7_defconfig | 1 + arch/arm/configs/revpi-v7l_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index ce28c1c148fdfa..d0ed9d17a12ba9 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -405,6 +405,7 @@ CONFIG_CAN_J1939=m CONFIG_CAN_ISOTP=m CONFIG_CAN_VCAN=m CONFIG_CAN_SLCAN=m +CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m CONFIG_CAN_MCP251XFD=m CONFIG_CAN_EMS_USB=m diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 9c82797135416a..5b560773ed8c38 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -411,6 +411,7 @@ CONFIG_CAN_J1939=m CONFIG_CAN_ISOTP=m CONFIG_CAN_VCAN=m CONFIG_CAN_SLCAN=m +CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m CONFIG_CAN_MCP251XFD=m CONFIG_CAN_EMS_USB=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 2ace5254a87491..74c7826c7ed349 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -412,6 +412,7 @@ CONFIG_CAN_J1939=m CONFIG_CAN_ISOTP=m CONFIG_CAN_VCAN=m CONFIG_CAN_SLCAN=m +CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m CONFIG_CAN_MCP251XFD=m CONFIG_CAN_EMS_USB=m From 3f2d3efeaccc510972020f4f500843bbc11fcaec Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 14 Aug 2020 15:48:16 +0200 Subject: [PATCH 056/183] arm/configs/revpi-*: Use alternative to dwc_otg Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 2 +- arch/arm/configs/revpi-v7_defconfig | 2 +- arch/arm/configs/revpi-v7l_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index d0ed9d17a12ba9..4a9afb518e14e0 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -1119,7 +1119,7 @@ CONFIG_USBIP_CORE=m CONFIG_USBIP_VHCI_HCD=m CONFIG_USBIP_HOST=m CONFIG_USBIP_VUDC=m -CONFIG_USB_DWC2=m +CONFIG_USB_DWC2=y CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRCABLE=m diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 5b560773ed8c38..4156c78bcb7a4d 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -1126,7 +1126,7 @@ CONFIG_USBIP_CORE=m CONFIG_USBIP_VHCI_HCD=m CONFIG_USBIP_HOST=m CONFIG_USBIP_VUDC=m -CONFIG_USB_DWC2=m +CONFIG_USB_DWC2=y CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRCABLE=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 74c7826c7ed349..b455d6578b81ce 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -1146,7 +1146,7 @@ CONFIG_USBIP_CORE=m CONFIG_USBIP_VHCI_HCD=m CONFIG_USBIP_HOST=m CONFIG_USBIP_VUDC=m -CONFIG_USB_DWC2=m +CONFIG_USB_DWC2=y CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRCABLE=m From 7a8e6b5cd99164b45a623acd5259e166848c2580 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 17 Aug 2020 15:52:50 +0200 Subject: [PATCH 057/183] arm/configs/revpi-*: Add RevPi Flat support - PCA953X driver controlls the RS485-0/1 Term pins. Thus it should be loaded as early as possible. - AD5446 driver for TI DAC121S101 - UART1 support Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 5 +++-- arch/arm/configs/revpi-v7_defconfig | 5 +++-- arch/arm/configs/revpi-v7l_defconfig | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 4a9afb518e14e0..a90d4ecc2bfc9a 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -649,7 +649,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y # CONFIG_SERIAL_8250_DMA is not set CONFIG_SERIAL_8250_NR_UARTS=1 -CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_RUNTIME_UARTS=1 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_BCM2835AUX=y @@ -687,7 +687,7 @@ CONFIG_PPS_CLIENT_LDISC=m CONFIG_PPS_CLIENT_GPIO=m CONFIG_PINCTRL_MCP23S08=m CONFIG_GPIO_SYSFS=y -CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_PCF857X=m CONFIG_GPIO_ARIZONA=m @@ -1358,6 +1358,7 @@ CONFIG_BME680=m CONFIG_CCS811=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m +CONFIG_AD5446=m CONFIG_TI_DAC082S085=m CONFIG_DHT11=m CONFIG_HDC100X=m diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 4156c78bcb7a4d..146c5acb72fc7c 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -655,7 +655,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y # CONFIG_SERIAL_8250_DMA is not set CONFIG_SERIAL_8250_NR_UARTS=1 -CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_RUNTIME_UARTS=1 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_BCM2835AUX=y @@ -694,7 +694,7 @@ CONFIG_PPS_CLIENT_GPIO=m CONFIG_PINCTRL_MCP23S08=m CONFIG_GPIO_SYSFS=y CONFIG_GPIO_BCM_VIRT=y -CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_PCF857X=m CONFIG_GPIO_ARIZONA=m @@ -1365,6 +1365,7 @@ CONFIG_BME680=m CONFIG_CCS811=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m +CONFIG_AD5446=m CONFIG_TI_DAC082S085=m CONFIG_DHT11=m CONFIG_HDC100X=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index b455d6578b81ce..89443254a3fd21 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -669,7 +669,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y # CONFIG_SERIAL_8250_DMA is not set CONFIG_SERIAL_8250_NR_UARTS=1 -CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_RUNTIME_UARTS=1 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_BCM2835AUX=y @@ -708,7 +708,7 @@ CONFIG_PPS_CLIENT_GPIO=m CONFIG_PINCTRL_MCP23S08=m CONFIG_GPIO_SYSFS=y CONFIG_GPIO_BCM_VIRT=y -CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_PCF857X=m CONFIG_GPIO_ARIZONA=m @@ -1387,6 +1387,7 @@ CONFIG_BME680=m CONFIG_CCS811=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m +CONFIG_AD5446=m CONFIG_TI_DAC082S085=m CONFIG_DHT11=m CONFIG_HDC100X=m From 936e72ad16dcdc50bf73b35386f976b69992243d Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 17 Aug 2020 16:01:38 +0200 Subject: [PATCH 058/183] arm/configs/revpi-*: Set the performance gov. as default The powersave gov. changes the CPU clock to reduce power cuonsumption. This leads to higher latencies. The performance gov. let the CPU stay on the highest clockrate. This is perfered when running RT tasks. Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 3 +-- arch/arm/configs/revpi-v7_defconfig | 4 +--- arch/arm/configs/revpi-v7l_defconfig | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index a90d4ecc2bfc9a..87e6f83fd30cf1 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -41,8 +41,7 @@ CONFIG_UACCESS_WITH_MEMCPY=y CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 146c5acb72fc7c..1ca5d392969bec 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -43,12 +43,10 @@ CONFIG_UACCESS_WITH_MEMCPY=y CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y CONFIG_CPUFREQ_DT=y CONFIG_ARM_RASPBERRYPI_CPUFREQ=y CONFIG_VFP=y diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 89443254a3fd21..38b9fc0010ed35 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -43,8 +43,8 @@ CONFIG_UACCESS_WITH_MEMCPY=y CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y From 0be3fcb85c1546ab025c51d7d792f16c9fee01a3 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 21 Apr 2021 09:15:25 +0200 Subject: [PATCH 059/183] arm/configs/revpi-*: Enable USB CAN drivers Enable all available USB CAN drivers. Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 5 +++++ arch/arm/configs/revpi-v7_defconfig | 5 +++++ arch/arm/configs/revpi-v7l_defconfig | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 87e6f83fd30cf1..9ae962f1dfc3af 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -407,9 +407,14 @@ CONFIG_CAN_SLCAN=m CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_8DEV_USB=m CONFIG_CAN_EMS_USB=m +CONFIG_CAN_ESD_USB2=m CONFIG_CAN_GS_USB=m +CONFIG_CAN_KVASER_USB=m +CONFIG_CAN_MCBA_USB=m CONFIG_CAN_PEAK_USB=m +CONFIG_CAN_UCAN=m CONFIG_BT=m CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 1ca5d392969bec..49d74eb2c3ecac 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -412,9 +412,14 @@ CONFIG_CAN_SLCAN=m CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_8DEV_USB=m CONFIG_CAN_EMS_USB=m +CONFIG_CAN_ESD_USB2=m CONFIG_CAN_GS_USB=m +CONFIG_CAN_KVASER_USB=m +CONFIG_CAN_MCBA_USB=m CONFIG_CAN_PEAK_USB=m +CONFIG_CAN_UCAN=m CONFIG_BT=m CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 38b9fc0010ed35..d49f2426208681 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -415,9 +415,14 @@ CONFIG_CAN_SLCAN=m CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_8DEV_USB=m CONFIG_CAN_EMS_USB=m +CONFIG_CAN_ESD_USB2=m CONFIG_CAN_GS_USB=m +CONFIG_CAN_KVASER_USB=m +CONFIG_CAN_MCBA_USB=m CONFIG_CAN_PEAK_USB=m +CONFIG_CAN_UCAN=m CONFIG_BT=m CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y From 57618e36d264df318563c7e2759ab670441420ac Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 10 Mar 2022 10:12:05 +0100 Subject: [PATCH 060/183] arm/config/revpi-*: Disable /dev/gpiomem rootless GPIO access via mmap() The CONFIG_BCM2835_DEVGPIOMEM option rovides users with root-free access to the GPIO registers on the 2835. Calling mmap(/dev/gpiomem) will map the GPIO register page to the user's pointer. As this provides a way for unprivileged useres to change any h/w pin this is a direct threat for security and might possibly damage the hardware. To access GPIOs gpiod should be used. Disable this option on all RevPi kernels. Signed-off-by: Philipp Rosenberger --- arch/arm/configs/revpi-v6_defconfig | 2 +- arch/arm/configs/revpi-v7_defconfig | 2 +- arch/arm/configs/revpi-v7l_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 9ae962f1dfc3af..3a807f5faa8aa9 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -646,7 +646,7 @@ CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m CONFIG_BRCM_CHAR_DRIVERS=y CONFIG_BCM_VCIO=y -CONFIG_BCM2835_DEVGPIOMEM=y +# CONFIG_BCM2835_DEVGPIOMEM is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 49d74eb2c3ecac..42a9e91d8a4283 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -651,7 +651,7 @@ CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m CONFIG_BRCM_CHAR_DRIVERS=y CONFIG_BCM_VCIO=y -CONFIG_BCM2835_DEVGPIOMEM=y +# CONFIG_BCM2835_DEVGPIOMEM is not set # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=y # CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index d49f2426208681..d618045ebeb83a 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -666,7 +666,7 @@ CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m CONFIG_BRCM_CHAR_DRIVERS=y CONFIG_BCM_VCIO=y -CONFIG_BCM2835_DEVGPIOMEM=y +# CONFIG_BCM2835_DEVGPIOMEM is not set CONFIG_RPIVID_MEM=m # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=y From 4233152645fb96ff48f7622e9c2515cf5282f197 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Sat, 3 Sep 2022 21:39:47 +0200 Subject: [PATCH 061/183] arm64/configs: Create revpi-v8_defconfig from bcm2711_defconfig Signed-off-by: Nicolai Buchwitz --- arch/arm64/configs/revpi-v8_defconfig | 1566 +++++++++++++++++++++++++ 1 file changed, 1566 insertions(+) create mode 100644 arch/arm64/configs/revpi-v8_defconfig diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig new file mode 100644 index 00000000000000..75333e69ef741b --- /dev/null +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -0,0 +1,1566 @@ +CONFIG_LOCALVERSION="-v8" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SYSVIPC=y +CONFIG_POSIX_MQUEUE=y +CONFIG_GENERIC_IRQ_DEBUGFS=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_IKCONFIG=m +CONFIG_IKCONFIG_PROC=y +CONFIG_MEMCG=y +CONFIG_BLK_CGROUP=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_CGROUP_PIDS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CPUSETS=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_NAMESPACES=y +CONFIG_USER_NS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_BPF_SYSCALL=y +CONFIG_EMBEDDED=y +# CONFIG_COMPAT_BRK is not set +CONFIG_PROFILING=y +CONFIG_ARCH_BCM2835=y +# CONFIG_CAVIUM_ERRATUM_22375 is not set +# CONFIG_CAVIUM_ERRATUM_23154 is not set +# CONFIG_CAVIUM_ERRATUM_27456 is not set +CONFIG_COMPAT=y +CONFIG_ARMV8_DEPRECATED=y +CONFIG_SWP_EMULATION=y +CONFIG_CP15_BARRIER_EMULATION=y +CONFIG_SETEND_EMULATION=y +CONFIG_CMDLINE="console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +# CONFIG_SUSPEND is not set +CONFIG_PM=y +CONFIG_CPU_IDLE=y +CONFIG_ARM_CPUIDLE=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y +CONFIG_CPUFREQ_DT=y +CONFIG_ARM_RASPBERRYPI_CPUFREQ=y +CONFIG_RASPBERRYPI_FIRMWARE=y +CONFIG_VIRTUALIZATION=y +CONFIG_KVM=y +CONFIG_CRYPTO_AES_ARM64_BS=m +CONFIG_JUMP_LABEL=y +CONFIG_MODULES=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_BLK_DEV_THROTTLING=y +CONFIG_PARTITION_ADVANCED=y +CONFIG_MAC_PARTITION=y +CONFIG_BINFMT_MISC=m +CONFIG_CLEANCACHE=y +CONFIG_FRONTSWAP=y +CONFIG_CMA=y +CONFIG_ZSWAP=y +CONFIG_Z3FOLD=m +CONFIG_ZSMALLOC=m +CONFIG_NET=y +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM_USER=y +CONFIG_NET_KEY=m +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_NET_IPVTI=m +CONFIG_NET_FOU=m +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BBR=m +CONFIG_IPV6=m +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_ESP_OFFLOAD=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_ILA=m +CONFIG_IPV6_VTI=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_GRE=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +CONFIG_NETFILTER=y +CONFIG_BRIDGE_NETFILTER=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_LOG_NETDEV=m +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_TABLES=m +CONFIG_NF_TABLES_INET=y +CONFIG_NF_TABLES_NETDEV=y +CONFIG_NFT_NUMGEN=m +CONFIG_NFT_CT=m +CONFIG_NFT_FLOW_OFFLOAD=m +CONFIG_NFT_COUNTER=m +CONFIG_NFT_CONNLIMIT=m +CONFIG_NFT_LOG=m +CONFIG_NFT_LIMIT=m +CONFIG_NFT_MASQ=m +CONFIG_NFT_REDIR=m +CONFIG_NFT_NAT=m +CONFIG_NFT_TUNNEL=m +CONFIG_NFT_OBJREF=m +CONFIG_NFT_QUEUE=m +CONFIG_NFT_QUOTA=m +CONFIG_NFT_REJECT=m +CONFIG_NFT_COMPAT=m +CONFIG_NFT_HASH=m +CONFIG_NFT_FIB_INET=m +CONFIG_NFT_SOCKET=m +CONFIG_NFT_OSF=m +CONFIG_NFT_TPROXY=m +CONFIG_NFT_DUP_NETDEV=m +CONFIG_NFT_FWD_NETDEV=m +CONFIG_NFT_FIB_NETDEV=m +CONFIG_NF_FLOW_TABLE_INET=m +CONFIG_NF_FLOW_TABLE=m +CONFIG_NETFILTER_XT_SET=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_PE_SIP=m +CONFIG_NFT_DUP_IPV4=m +CONFIG_NFT_FIB_IPV4=m +CONFIG_NF_TABLES_ARP=y +CONFIG_NF_FLOW_TABLE_IPV4=m +CONFIG_NF_LOG_ARP=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_NFT_DUP_IPV6=m +CONFIG_NFT_FIB_IPV6=m +CONFIG_NF_FLOW_TABLE_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RPFILTER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_SRH=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_SYNPROXY=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_SECURITY=m +CONFIG_IP6_NF_NAT=m +CONFIG_IP6_NF_TARGET_MASQUERADE=m +CONFIG_IP6_NF_TARGET_NPT=m +CONFIG_NF_TABLES_BRIDGE=m +CONFIG_NFT_BRIDGE_REJECT=m +CONFIG_NF_LOG_BRIDGE=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_IP6=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +CONFIG_SCTP_COOKIE_HMAC_SHA1=y +CONFIG_ATM=m +CONFIG_L2TP=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_BRIDGE=m +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_ATALK=m +CONFIG_6LOWPAN=m +CONFIG_IEEE802154=m +CONFIG_IEEE802154_6LOWPAN=m +CONFIG_MAC802154=m +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_CAKE=m +CONFIG_NET_SCH_FQ=m +CONFIG_NET_SCH_HHF=m +CONFIG_NET_SCH_PIE=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +CONFIG_BATMAN_ADV=m +CONFIG_OPENVSWITCH=m +CONFIG_VSOCKETS=m +CONFIG_CGROUP_NET_PRIO=y +CONFIG_NET_PKTGEN=m +CONFIG_HAMRADIO=y +CONFIG_AX25=m +CONFIG_NETROM=m +CONFIG_ROSE=m +CONFIG_MKISS=m +CONFIG_6PACK=m +CONFIG_BPQETHER=m +CONFIG_BAYCOM_SER_FDX=m +CONFIG_BAYCOM_SER_HDX=m +CONFIG_YAM=m +CONFIG_CAN=m +CONFIG_CAN_J1939=m +CONFIG_CAN_ISOTP=m +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +CONFIG_CAN_MCP251X=m +CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_EMS_USB=m +CONFIG_CAN_GS_USB=m +CONFIG_CAN_PEAK_USB=m +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m +CONFIG_BT_6LOWPAN=m +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIUART_BCM=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +CONFIG_CFG80211=m +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=m +CONFIG_MAC80211_MESH=y +CONFIG_WIMAX=m +CONFIG_RFKILL=m +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +CONFIG_NFC=m +CONFIG_PCI=y +CONFIG_PCIE_BRCMSTB=y +CONFIG_UEVENT_HELPER=y +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_MTD=m +CONFIG_MTD_BLOCK=m +CONFIG_MTD_BLOCK2MTD=m +CONFIG_MTD_SPI_NOR=m +CONFIG_MTD_UBI=m +CONFIG_OF_CONFIGFS=y +CONFIG_ZRAM=m +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +CONFIG_BLK_DEV_DRBD=m +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=y +CONFIG_CDROM_PKTCDVD=m +CONFIG_ATA_OVER_ETH=m +CONFIG_BLK_DEV_NVME=y +CONFIG_EEPROM_AT24=m +CONFIG_TI_ST=m +CONFIG_SCSI=y +# CONFIG_SCSI_PROC_FS is not set +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +CONFIG_BLK_DEV_SR=m +CONFIG_CHR_DEV_SG=m +CONFIG_SCSI_ISCSI_ATTRS=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +CONFIG_ATA=m +CONFIG_SATA_AHCI=m +CONFIG_SATA_MV=m +CONFIG_MD=y +CONFIG_MD_LINEAR=m +CONFIG_BLK_DEV_DM=m +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_CACHE=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_RAID=m +CONFIG_DM_ZERO=m +CONFIG_DM_DELAY=m +CONFIG_NETDEVICES=y +CONFIG_BONDING=m +CONFIG_DUMMY=m +CONFIG_WIREGUARD=m +CONFIG_IFB=m +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +CONFIG_IPVLAN=m +CONFIG_VXLAN=m +CONFIG_NETCONSOLE=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_NET_VRF=m +CONFIG_VSOCKMON=m +CONFIG_BCMGENET=y +CONFIG_ENC28J60=m +CONFIG_QCA7000_SPI=m +CONFIG_QCA7000_UART=m +CONFIG_R8169=m +CONFIG_WIZNET_W5100=m +CONFIG_WIZNET_W5100_SPI=m +CONFIG_MICREL_PHY=y +CONFIG_MDIO_BITBANG=m +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPPOL2TP=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_SLIP=m +CONFIG_SLIP_COMPRESSED=y +CONFIG_SLIP_SMART=y +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=y +CONFIG_USB_LAN78XX=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_HUAWEI_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +CONFIG_USB_NET_SR9800=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +CONFIG_USB_NET_AQC111=m +CONFIG_ATH9K=m +CONFIG_ATH9K_HTC=m +CONFIG_CARL9170=m +CONFIG_ATH6KL=m +CONFIG_ATH6KL_USB=m +CONFIG_AR5523=m +CONFIG_AT76C50X_USB=m +CONFIG_B43=m +# CONFIG_B43_PHY_N is not set +CONFIG_B43LEGACY=m +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_USB=y +CONFIG_BRCMDBG=y +CONFIG_HOSTAP=m +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +CONFIG_LIBERTAS_THINFIRM=m +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_MWIFIEX=m +CONFIG_MWIFIEX_SDIO=m +CONFIG_MT7601U=m +CONFIG_MT76x0U=m +CONFIG_MT76x2U=m +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RTL8187=m +CONFIG_RTL8192CU=m +CONFIG_RTL8XXXU=m +CONFIG_USB_ZD1201=m +CONFIG_ZD1211RW=m +CONFIG_MAC80211_HWSIM=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_IEEE802154_AT86RF230=m +CONFIG_IEEE802154_MRF24J40=m +CONFIG_IEEE802154_CC2520=m +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_GPIO=m +CONFIG_KEYBOARD_TCA6416=m +CONFIG_KEYBOARD_TCA8418=m +CONFIG_KEYBOARD_MATRIX=m +CONFIG_KEYBOARD_CAP11XX=m +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_IFORCE=m +CONFIG_JOYSTICK_IFORCE_USB=m +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +CONFIG_JOYSTICK_PSXPAD_SPI=m +CONFIG_JOYSTICK_PSXPAD_SPI_FF=y +CONFIG_JOYSTICK_RPISENSE=m +CONFIG_INPUT_TOUCHSCREEN=y +CONFIG_TOUCHSCREEN_ADS7846=m +CONFIG_TOUCHSCREEN_EGALAX=m +CONFIG_TOUCHSCREEN_EXC3000=m +CONFIG_TOUCHSCREEN_GOODIX=m +CONFIG_TOUCHSCREEN_ILI210X=m +CONFIG_TOUCHSCREEN_EDT_FT5X06=m +CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=m +CONFIG_TOUCHSCREEN_USB_COMPOSITE=m +CONFIG_TOUCHSCREEN_STMPE=m +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AD714X=m +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_CMA3000=m +CONFIG_SERIO=m +CONFIG_SERIO_RAW=m +CONFIG_GAMEPORT=m +CONFIG_GAMEPORT_NS558=m +CONFIG_GAMEPORT_L4=m +CONFIG_BRCM_CHAR_DRIVERS=y +CONFIG_BCM_VCIO=y +CONFIG_BCM2835_DEVGPIOMEM=y +CONFIG_RPIVID_MEM=m +# CONFIG_LEGACY_PTYS is not set +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +# CONFIG_SERIAL_8250_DMA is not set +CONFIG_SERIAL_8250_NR_UARTS=1 +CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_BCM2835AUX=y +CONFIG_SERIAL_OF_PLATFORM=y +CONFIG_SERIAL_AMBA_PL011=y +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y +CONFIG_SERIAL_SC16IS7XX=m +CONFIG_SERIAL_SC16IS7XX_SPI=y +CONFIG_SERIAL_DEV_BUS=y +CONFIG_TTY_PRINTK=y +CONFIG_HW_RANDOM=y +CONFIG_RAW_DRIVER=y +CONFIG_TCG_TPM=m +CONFIG_TCG_TIS_SPI=m +CONFIG_RANDOM_TRUST_BOOTLOADER=y +CONFIG_I2C=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_MUX_GPMUX=m +CONFIG_I2C_MUX_PCA954x=m +CONFIG_I2C_MUX_PINCTRL=m +CONFIG_I2C_BCM2708=m +CONFIG_I2C_BCM2835=m +CONFIG_I2C_BRCMSTB=m +CONFIG_I2C_GPIO=m +CONFIG_I2C_ROBOTFUZZ_OSIF=m +CONFIG_I2C_TINY_USB=m +CONFIG_SPI=y +CONFIG_SPI_BCM2835=m +CONFIG_SPI_BCM2835AUX=m +CONFIG_SPI_GPIO=m +CONFIG_SPI_SPIDEV=m +CONFIG_SPI_SLAVE=y +CONFIG_PPS=m +CONFIG_PPS_CLIENT_LDISC=m +CONFIG_PPS_CLIENT_GPIO=m +CONFIG_PINCTRL_MCP23S08=m +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_BCM_VIRT=y +CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X_IRQ=y +CONFIG_GPIO_PCF857X=m +CONFIG_GPIO_ARIZONA=m +CONFIG_GPIO_FSM=m +CONFIG_GPIO_STMPE=y +CONFIG_GPIO_MOCKUP=m +CONFIG_W1=m +CONFIG_W1_MASTER_DS2490=m +CONFIG_W1_MASTER_DS2482=m +CONFIG_W1_MASTER_DS1WM=m +CONFIG_W1_MASTER_GPIO=m +CONFIG_W1_SLAVE_THERM=m +CONFIG_W1_SLAVE_SMEM=m +CONFIG_W1_SLAVE_DS2408=m +CONFIG_W1_SLAVE_DS2413=m +CONFIG_W1_SLAVE_DS2406=m +CONFIG_W1_SLAVE_DS2423=m +CONFIG_W1_SLAVE_DS2431=m +CONFIG_W1_SLAVE_DS2433=m +CONFIG_W1_SLAVE_DS2438=m +CONFIG_W1_SLAVE_DS2780=m +CONFIG_W1_SLAVE_DS2781=m +CONFIG_W1_SLAVE_DS28E04=m +CONFIG_W1_SLAVE_DS28E17=m +CONFIG_POWER_RESET_GPIO=y +CONFIG_RPI_POE_POWER=m +CONFIG_BATTERY_DS2760=m +CONFIG_BATTERY_MAX17040=m +CONFIG_BATTERY_GAUGE_LTC2941=m +CONFIG_SENSORS_DS1621=m +CONFIG_SENSORS_GPIO_FAN=m +CONFIG_SENSORS_IIO_HWMON=m +CONFIG_SENSORS_JC42=m +CONFIG_SENSORS_LM75=m +CONFIG_SENSORS_RASPBERRYPI_HWMON=m +CONFIG_SENSORS_RPI_POE_FAN=m +CONFIG_SENSORS_SHT21=m +CONFIG_SENSORS_SHT3x=m +CONFIG_SENSORS_SHTC1=m +CONFIG_SENSORS_INA2XX=m +CONFIG_SENSORS_TMP102=m +CONFIG_THERMAL=y +CONFIG_BCM2711_THERMAL=y +CONFIG_BCM2835_THERMAL=y +CONFIG_WATCHDOG=y +CONFIG_GPIO_WATCHDOG=m +CONFIG_BCM2835_WDT=y +CONFIG_MFD_STMPE=y +CONFIG_STMPE_SPI=y +CONFIG_MFD_SYSCON=y +CONFIG_MFD_ARIZONA_I2C=m +CONFIG_MFD_ARIZONA_SPI=m +CONFIG_MFD_WM5102=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_ARIZONA_LDO1=m +CONFIG_REGULATOR_ARIZONA_MICSUPP=m +CONFIG_REGULATOR_GPIO=y +CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=m +CONFIG_RC_CORE=y +CONFIG_LIRC=y +CONFIG_BPF_LIRC_MODE2=y +CONFIG_RC_DECODERS=y +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_SANYO_DECODER=m +CONFIG_IR_SHARP_DECODER=m +CONFIG_IR_MCE_KBD_DECODER=m +CONFIG_IR_XMP_DECODER=m +CONFIG_IR_IMON_DECODER=m +CONFIG_RC_DEVICES=y +CONFIG_RC_ATI_REMOTE=m +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_RC_LOOPBACK=m +CONFIG_IR_GPIO_CIR=m +CONFIG_IR_GPIO_TX=m +CONFIG_IR_PWM_TX=m +CONFIG_IR_TOY=m +CONFIG_MEDIA_CEC_RC=y +CONFIG_MEDIA_SUPPORT=m +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_DTCS033=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STK1135=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_VIDEO_USBTV=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_STK1160_COMMON=m +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +CONFIG_VIDEO_GO7007_USB_S2250_BOARD=m +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_RC=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_TM6000_DVB=m +CONFIG_DVB_USB=m +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_PCTV452E=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +CONFIG_DVB_AS102=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_V4L2=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_RADIO_SI470X=m +CONFIG_USB_SI470X=m +CONFIG_I2C_SI470X=m +CONFIG_RADIO_SI4713=m +CONFIG_I2C_SI4713=m +CONFIG_USB_MR800=m +CONFIG_USB_DSBR=m +CONFIG_RADIO_SHARK=m +CONFIG_RADIO_SHARK2=m +CONFIG_USB_KEENE=m +CONFIG_USB_MA901=m +CONFIG_RADIO_TEA5764=m +CONFIG_RADIO_SAA7706H=m +CONFIG_RADIO_TEF6862=m +CONFIG_RADIO_WL1273=m +CONFIG_RADIO_WL128X=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_BCM2835_UNICAM=m +CONFIG_V4L_TEST_DRIVERS=y +CONFIG_VIDEO_VIMC=m +CONFIG_VIDEO_VIVID=m +CONFIG_VIDEO_VIM2M=m +CONFIG_VIDEO_VICODEC=m +CONFIG_VIDEO_UDA1342=m +CONFIG_VIDEO_SONY_BTF_MPX=m +CONFIG_VIDEO_ADV7180=m +CONFIG_VIDEO_TC358743=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_TW2804=m +CONFIG_VIDEO_TW9903=m +CONFIG_VIDEO_TW9906=m +CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_IMX290=m +CONFIG_VIDEO_IMX477=m +CONFIG_VIDEO_IMX519=m +CONFIG_VIDEO_OV5647=m +CONFIG_VIDEO_OV7251=m +CONFIG_VIDEO_OV7640=m +CONFIG_VIDEO_OV9281=m +CONFIG_VIDEO_IRS1125=m +CONFIG_VIDEO_MT9V011=m +CONFIG_DRM=m +CONFIG_DRM_LOAD_EDID_FIRMWARE=y +CONFIG_DRM_UDL=m +CONFIG_DRM_PANEL_SIMPLE=m +CONFIG_DRM_PANEL_ILITEK_ILI9881C=m +CONFIG_DRM_PANEL_JDI_LT070ME05000=m +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=m +CONFIG_DRM_DISPLAY_CONNECTOR=m +CONFIG_DRM_SIMPLE_BRIDGE=m +CONFIG_DRM_TOSHIBA_TC358762=m +CONFIG_DRM_V3D=m +CONFIG_DRM_VC4=m +CONFIG_DRM_VC4_HDMI_CEC=y +CONFIG_TINYDRM_ILI9225=m +CONFIG_TINYDRM_ILI9341=m +CONFIG_TINYDRM_MI0283QT=m +CONFIG_TINYDRM_REPAPER=m +CONFIG_TINYDRM_ST7586=m +CONFIG_TINYDRM_ST7735R=m +CONFIG_DRM_GUD=m +CONFIG_FB=y +CONFIG_FB_BCM2708=y +CONFIG_FB_UDL=m +CONFIG_FB_SIMPLE=y +CONFIG_FB_SSD1307=m +CONFIG_FB_RPISENSE=m +CONFIG_BACKLIGHT_PWM=m +CONFIG_BACKLIGHT_RPI=m +CONFIG_BACKLIGHT_GPIO=m +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_SOUND=y +CONFIG_SND=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM_OSS=m +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_DUMMY=m +CONFIG_SND_ALOOP=m +CONFIG_SND_VIRMIDI=m +CONFIG_SND_MTPAV=m +CONFIG_SND_SERIAL_U16550=m +CONFIG_SND_MPU401=m +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_USB_HIFACE=m +CONFIG_SND_USB_TONEPORT=m +CONFIG_SND_SOC=m +CONFIG_SND_BCM2835_SOC_I2S=m +CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC=m +CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI=m +CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP=m +CONFIG_SND_BCM2708_SOC_PIFI_40=m +CONFIG_SND_BCM2708_SOC_RPI_CIRRUS=m +CONFIG_SND_BCM2708_SOC_RPI_DAC=m +CONFIG_SND_BCM2708_SOC_RPI_PROTO=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC=m +CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC=m +CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI=m +CONFIG_SND_BCM2708_SOC_I_SABRE_Q2M=m +CONFIG_SND_BCM2708_SOC_ADAU1977_ADC=m +CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD=m +CONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD=m +CONFIG_SND_AUDIOSENSE_PI=m +CONFIG_SND_DIGIDAC1_SOUNDCARD=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO=m +CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC=m +CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE=m +CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC=m +CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO=m +CONFIG_SND_PISOUND=m +CONFIG_SND_SOC_AD193X_SPI=m +CONFIG_SND_SOC_AD193X_I2C=m +CONFIG_SND_SOC_ADAU1701=m +CONFIG_SND_SOC_ADAU7002=m +CONFIG_SND_SOC_AK4554=m +CONFIG_SND_SOC_CS4265=m +CONFIG_SND_SOC_ICS43432=m +CONFIG_SND_SOC_MA120X0P=m +CONFIG_SND_SOC_MAX98357A=m +CONFIG_SND_SOC_SPDIF=m +CONFIG_SND_SOC_WM8804_I2C=m +CONFIG_SND_SOC_WM8960=m +CONFIG_SND_SIMPLE_CARD=m +CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=m +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_APPLE=m +CONFIG_HID_ASUS=m +CONFIG_HID_BELKIN=m +CONFIG_HID_BETOP_FF=m +CONFIG_HID_BIGBEN_FF=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_ELO=m +CONFIG_HID_EZKEY=m +CONFIG_HID_GEMBIRD=m +CONFIG_HID_HOLTEK=m +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +CONFIG_HID_LOGITECH=m +CONFIG_HID_LOGITECH_DJ=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=m +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEAM=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_XINMO=m +CONFIG_HID_ZEROPLUS=m +CONFIG_HID_ZYDACRON=m +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y +CONFIG_I2C_HID=m +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y +CONFIG_USB_MON=m +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +CONFIG_USB_DWCOTG=y +CONFIG_USB_PRINTER=m +CONFIG_USB_TMC=m +CONFIG_USB_STORAGE=y +CONFIG_USB_STORAGE_REALTEK=m +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=y +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_HOST=m +CONFIG_USBIP_VUDC=m +CONFIG_USB_DWC2=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +CONFIG_USB_SERIAL_DEBUG=m +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +CONFIG_USB_APPLEDISPLAY=m +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +CONFIG_USB_TEST=m +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_YUREX=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_USB_GADGET=y +CONFIG_USB_CONFIGFS=m +CONFIG_USB_CONFIGFS_SERIAL=y +CONFIG_USB_CONFIGFS_ACM=y +CONFIG_USB_CONFIGFS_OBEX=y +CONFIG_USB_CONFIGFS_NCM=y +CONFIG_USB_CONFIGFS_ECM=y +CONFIG_USB_CONFIGFS_ECM_SUBSET=y +CONFIG_USB_CONFIGFS_RNDIS=y +CONFIG_USB_CONFIGFS_EEM=y +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +CONFIG_USB_CONFIGFS_F_LB_SS=y +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_UAC1=y +CONFIG_USB_CONFIGFS_F_UAC2=y +CONFIG_USB_CONFIGFS_F_MIDI=y +CONFIG_USB_CONFIGFS_F_HID=y +CONFIG_USB_CONFIGFS_F_UVC=y +CONFIG_USB_CONFIGFS_F_PRINTER=y +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_HID=m +CONFIG_USB_G_WEBCAM=m +CONFIG_MMC=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BCM2835_MMC=y +CONFIG_MMC_BCM2835_DMA=y +CONFIG_MMC_BCM2835_SDHOST=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_IPROC=y +CONFIG_MMC_SPI=m +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_PCA9532=m +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_PCA955X=m +CONFIG_LEDS_PCA963X=m +CONFIG_LEDS_PWM=y +CONFIG_LEDS_IS31FL32XX=m +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=y +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y +CONFIG_LEDS_TRIGGER_TRANSIENT=m +CONFIG_LEDS_TRIGGER_CAMERA=m +CONFIG_LEDS_TRIGGER_INPUT=y +CONFIG_LEDS_TRIGGER_PANIC=y +CONFIG_LEDS_TRIGGER_NETDEV=m +CONFIG_LEDS_TRIGGER_PATTERN=m +CONFIG_LEDS_TRIGGER_ACTPWR=y +CONFIG_ACCESSIBILITY=y +CONFIG_SPEAKUP=m +CONFIG_SPEAKUP_SYNTH_SOFT=m +CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_ABX80X=m +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_ISL12022=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF8523=m +CONFIG_RTC_DRV_PCF85063=m +CONFIG_RTC_DRV_PCF85363=m +CONFIG_RTC_DRV_PCF8563=m +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m +CONFIG_RTC_DRV_EM3027=m +CONFIG_RTC_DRV_RV3028=m +CONFIG_RTC_DRV_SD3078=m +CONFIG_RTC_DRV_M41T93=m +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1302=m +CONFIG_RTC_DRV_DS1305=m +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RX4581=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_PCF2123=m +CONFIG_RTC_DRV_DS3232=m +CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_RV3029C2=m +CONFIG_DMADEVICES=y +CONFIG_DMA_BCM2835=y +CONFIG_DMA_BCM2708=y +CONFIG_DMABUF_HEAPS=y +CONFIG_DMABUF_HEAPS_SYSTEM=y +CONFIG_DMABUF_HEAPS_CMA=y +CONFIG_AUXDISPLAY=y +CONFIG_HD44780=m +CONFIG_UIO=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_VHOST_NET=m +CONFIG_VHOST_VSOCK=m +CONFIG_VHOST_CROSS_ENDIAN_LEGACY=y +CONFIG_STAGING=y +CONFIG_PRISM2_USB=m +CONFIG_R8712U=m +CONFIG_R8188EU=m +CONFIG_VT6656=m +CONFIG_STAGING_MEDIA=y +CONFIG_VIDEO_RPIVID=m +CONFIG_ASHMEM=y +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_HX8357D=m +CONFIG_FB_TFT_ILI9163=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SH1106=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_ST7789V=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_BCM2835_VCHIQ=y +CONFIG_SND_BCM2835=m +CONFIG_VIDEO_BCM2835=m +CONFIG_VIDEO_CODEC_BCM2835=m +CONFIG_VIDEO_ISP_BCM2835=m +CONFIG_CLK_RASPBERRYPI=y +CONFIG_MAILBOX=y +CONFIG_BCM2835_MBOX=y +# CONFIG_IOMMU_SUPPORT is not set +CONFIG_RASPBERRYPI_POWER=y +CONFIG_EXTCON_ARIZONA=m +CONFIG_IIO=m +CONFIG_IIO_BUFFER_CB=m +CONFIG_MCP320X=m +CONFIG_MCP3422=m +CONFIG_TI_ADS1015=m +CONFIG_BME680=m +CONFIG_CCS811=m +CONFIG_SENSIRION_SGP30=m +CONFIG_SPS30=m +CONFIG_MAX30102=m +CONFIG_DHT11=m +CONFIG_HDC100X=m +CONFIG_HTU21=m +CONFIG_INV_MPU6050_I2C=m +CONFIG_APDS9960=m +CONFIG_BH1750=m +CONFIG_TSL4531=m +CONFIG_VEML6070=m +CONFIG_BMP280=m +CONFIG_MAXIM_THERMOCOUPLE=m +CONFIG_MAX31856=m +CONFIG_PWM_BCM2835=m +CONFIG_PWM_PCA9685=m +CONFIG_RPI_AXIPERF=m +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_BINDERFS=y +CONFIG_NVMEM_RMEM=m +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_REISERFS_FS=m +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +CONFIG_JFS_STATISTICS=y +CONFIG_XFS_FS=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +CONFIG_GFS2_FS=m +CONFIG_OCFS2_FS=m +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_NILFS2_FS=m +CONFIG_F2FS_FS=y +CONFIG_F2FS_FS_SECURITY=y +CONFIG_FS_ENCRYPTION=y +CONFIG_FANOTIFY=y +CONFIG_QFMT_V1=m +CONFIG_QFMT_V2=m +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_OVERLAY_FS=m +CONFIG_FSCACHE=y +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +CONFIG_CACHEFILES=y +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +CONFIG_EXFAT_FS=m +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_ECRYPT_FS=m +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_JFFS2_FS=m +CONFIG_JFFS2_SUMMARY=y +CONFIG_UBIFS_FS=m +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_SWAP=y +CONFIG_NFS_V4_1=y +CONFIG_NFS_V4_2=y +CONFIG_ROOT_NFS=y +CONFIG_NFS_FSCACHE=y +CONFIG_NFSD=m +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_CIFS=m +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_9P_FS=m +CONFIG_9P_FS_POSIX_ACL=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=m +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_DLM=m +CONFIG_SECURITY=y +CONFIG_SECURITY_APPARMOR=y +CONFIG_LSM="" +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_CHACHA20POLY1305=m +CONFIG_CRYPTO_ADIANTUM=m +CONFIG_CRYPTO_XCBC=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_LZ4=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m +CONFIG_CRYPTO_USER_API_AEAD=m +# CONFIG_CRYPTO_HW is not set +CONFIG_CRC_ITU_T=y +CONFIG_LIBCRC32C=y +CONFIG_DMA_CMA=y +CONFIG_CMA_SIZE_MBYTES=5 +CONFIG_PRINTK_TIME=y +CONFIG_BOOT_PRINTK_DELAY=y +CONFIG_KGDB=y +CONFIG_KGDB_KDB=y +CONFIG_KDB_KEYBOARD=y +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DETECT_HUNG_TASK=y +CONFIG_LATENCYTOP=y +CONFIG_FUNCTION_PROFILER=y +CONFIG_STACK_TRACER=y +CONFIG_IRQSOFF_TRACER=y +CONFIG_SCHED_TRACER=y +CONFIG_BLK_DEV_IO_TRACE=y +# CONFIG_UPROBE_EVENTS is not set From 2b1a198e13e0d74850f59b9846c0e54d7170cccf Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Sat, 3 Sep 2022 21:48:05 +0200 Subject: [PATCH 062/183] arm64/configs/revpi-v8: Add RevPi specific configuration arm64/configs/revpi-v8_defconfig: Enable PREEMPT_RT arm64/configs/revpi-v8_defconfig: Set the performance gov. as default The powersave gov. changes the CPU clock to reduce power cuonsumption. This leads to higher latencies. The performance gov. let the CPU stay on the highest clockrate. This is perfered when running RT tasks. arm64/configs/revpi-v8_defconfig: Enable SECURITY_YAMA arm64/configs/revpi-v8_defconfig: Add RevPi Connect CAN driver arm64/configs/revpi-v8_defconfig: Enable USB CAN drivers Enable all available USB CAN drivers. arm64/configs/revpi-v8_defconfig: Add RevPi Compact support KS8851: eth1 74X164: dout MAX3191X: din DAC082S085: aout MUX_GPIO: ain mux IIO_MUX: ain mux arm64/configs/revpi-v8_defconfig: Add RevPi Flat support - PCA953X driver controlls the RS485-0/1 Term pins. Thus it should be loaded as early as possible. - AD5446 driver for TI DAC121S101 - UART1 support arm64/configs/revpi-v8_defconfig: Sync time from i2c rtc to system time on boot As the RTC is on an i2c bus the i2c host drivers needs to be built in. The same aplies to the RTC driver. This seems to be fixed with: f9b2a4d6a5f1 ("rtc: class: support hctosys from modular RTC drivers") This commit might not be needed anymore but should only be removed after proper testing and verification that it is indeed superfluos. arm64/configs/revpi-v8_defconfig: Use alternative to dwc_otg arm64/configs/revpi-v8_defconfig: Disable /dev/gpiomem rootless GPIO access via mmap() The CONFIG_BCM2835_DEVGPIOMEM option rovides users with root-free access to the GPIO registers on the 2835. Calling mmap(/dev/gpiomem) will map the GPIO register page to the user's pointer. As this provides a way for unprivileged useres to change any h/w pin this is a direct threat for security and might possibly damage the hardware. To access GPIOs gpiod should be used. Disable this option on all RevPi kernels. Signed-off-by: Nicolai Buchwitz --- arch/arm64/configs/revpi-v8_defconfig | 34 +++++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index 75333e69ef741b..6e2fccacc1c7d6 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -5,7 +5,7 @@ CONFIG_POSIX_MQUEUE=y CONFIG_GENERIC_IRQ_DEBUGFS=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y -CONFIG_PREEMPT=y +CONFIG_PREEMPT_RT=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASK_XACCT=y @@ -46,8 +46,8 @@ CONFIG_CPU_IDLE=y CONFIG_ARM_CPUIDLE=y CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y @@ -414,11 +414,17 @@ CONFIG_CAN_J1939=m CONFIG_CAN_ISOTP=m CONFIG_CAN_VCAN=m CONFIG_CAN_SLCAN=m +CONFIG_CAN_HI311X=m CONFIG_CAN_MCP251X=m CONFIG_CAN_MCP251XFD=m +CONFIG_CAN_8DEV_USB=m CONFIG_CAN_EMS_USB=m +CONFIG_CAN_ESD_USB2=m CONFIG_CAN_GS_USB=m +CONFIG_CAN_KVASER_USB=m +CONFIG_CAN_MCBA_USB=m CONFIG_CAN_PEAK_USB=m +CONFIG_CAN_UCAN=m CONFIG_BT=m CONFIG_BT_RFCOMM=m CONFIG_BT_RFCOMM_TTY=y @@ -508,6 +514,7 @@ CONFIG_VETH=m CONFIG_NET_VRF=m CONFIG_VSOCKMON=m CONFIG_BCMGENET=y +CONFIG_KS8851=m CONFIG_ENC28J60=m CONFIG_QCA7000_SPI=m CONFIG_QCA7000_UART=m @@ -660,7 +667,7 @@ CONFIG_GAMEPORT_NS558=m CONFIG_GAMEPORT_L4=m CONFIG_BRCM_CHAR_DRIVERS=y CONFIG_BCM_VCIO=y -CONFIG_BCM2835_DEVGPIOMEM=y +# CONFIG_BCM2835_DEVGPIOMEM is not set CONFIG_RPIVID_MEM=m # CONFIG_LEGACY_PTYS is not set CONFIG_SERIAL_8250=y @@ -668,7 +675,7 @@ CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y # CONFIG_SERIAL_8250_DMA is not set CONFIG_SERIAL_8250_NR_UARTS=1 -CONFIG_SERIAL_8250_RUNTIME_UARTS=0 +CONFIG_SERIAL_8250_RUNTIME_UARTS=1 CONFIG_SERIAL_8250_EXTENDED=y CONFIG_SERIAL_8250_SHARE_IRQ=y CONFIG_SERIAL_8250_BCM2835AUX=y @@ -689,8 +696,8 @@ CONFIG_I2C_CHARDEV=m CONFIG_I2C_MUX_GPMUX=m CONFIG_I2C_MUX_PCA954x=m CONFIG_I2C_MUX_PINCTRL=m -CONFIG_I2C_BCM2708=m -CONFIG_I2C_BCM2835=m +CONFIG_I2C_BCM2708=y +CONFIG_I2C_BCM2835=y CONFIG_I2C_BRCMSTB=m CONFIG_I2C_GPIO=m CONFIG_I2C_ROBOTFUZZ_OSIF=m @@ -707,12 +714,14 @@ CONFIG_PPS_CLIENT_GPIO=m CONFIG_PINCTRL_MCP23S08=m CONFIG_GPIO_SYSFS=y CONFIG_GPIO_BCM_VIRT=y -CONFIG_GPIO_PCA953X=m +CONFIG_GPIO_PCA953X=y CONFIG_GPIO_PCA953X_IRQ=y CONFIG_GPIO_PCF857X=m CONFIG_GPIO_ARIZONA=m CONFIG_GPIO_FSM=m CONFIG_GPIO_STMPE=y +CONFIG_GPIO_74X164=m +CONFIG_GPIO_MAX3191X=m CONFIG_GPIO_MOCKUP=m CONFIG_W1=m CONFIG_W1_MASTER_DS2490=m @@ -1149,7 +1158,7 @@ CONFIG_USBIP_CORE=m CONFIG_USBIP_VHCI_HCD=m CONFIG_USBIP_HOST=m CONFIG_USBIP_VUDC=m -CONFIG_USB_DWC2=m +CONFIG_USB_DWC2=y CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y CONFIG_USB_SERIAL_AIRCABLE=m @@ -1322,7 +1331,7 @@ CONFIG_RTC_DRV_RS5C348=m CONFIG_RTC_DRV_MAX6902=m CONFIG_RTC_DRV_PCF2123=m CONFIG_RTC_DRV_DS3232=m -CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_PCF2127=y CONFIG_RTC_DRV_RV3029C2=m CONFIG_DMADEVICES=y CONFIG_DMA_BCM2835=y @@ -1395,6 +1404,8 @@ CONFIG_BME680=m CONFIG_CCS811=m CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m +CONFIG_AD5446=m +CONFIG_TI_DAC082S085=m CONFIG_MAX30102=m CONFIG_DHT11=m CONFIG_HDC100X=m @@ -1404,6 +1415,7 @@ CONFIG_APDS9960=m CONFIG_BH1750=m CONFIG_TSL4531=m CONFIG_VEML6070=m +CONFIG_IIO_MUX=m CONFIG_BMP280=m CONFIG_MAXIM_THERMOCOUPLE=m CONFIG_MAX31856=m @@ -1414,6 +1426,7 @@ CONFIG_ANDROID=y CONFIG_ANDROID_BINDER_IPC=y CONFIG_ANDROID_BINDERFS=y CONFIG_NVMEM_RMEM=m +CONFIG_MUX_GPIO=m CONFIG_EXT4_FS=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_EXT4_FS_SECURITY=y @@ -1531,6 +1544,7 @@ CONFIG_NLS_KOI8_U=m CONFIG_DLM=m CONFIG_SECURITY=y CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_YAMA=y CONFIG_LSM="" CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_CHACHA20POLY1305=m From 3056395ed7802bf1ffa66fe8c446fa554869f862 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Sat, 3 Sep 2022 21:49:09 +0200 Subject: [PATCH 063/183] arm64/configs/revpi-v8: Disable CONFIG_KVM Set CONFIG_KVM=n as it will make CONFIG_PREEMPT_RT unusable on arm64. See HAVE_POSIX_CPU_TIMERS_TASK_WORK and https://blog.lazy-evaluation.net/posts/embedded/imx8mm-rt-preempt.html for more details. Signed-off-by: Nicolai Buchwitz --- arch/arm64/configs/revpi-v8_defconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index 6e2fccacc1c7d6..ea869102570508 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -8,8 +8,6 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_PREEMPT_RT=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y -CONFIG_TASK_XACCT=y -CONFIG_TASK_IO_ACCOUNTING=y CONFIG_IKCONFIG=m CONFIG_IKCONFIG_PROC=y CONFIG_MEMCG=y @@ -56,7 +54,6 @@ CONFIG_CPUFREQ_DT=y CONFIG_ARM_RASPBERRYPI_CPUFREQ=y CONFIG_RASPBERRYPI_FIRMWARE=y CONFIG_VIRTUALIZATION=y -CONFIG_KVM=y CONFIG_CRYPTO_AES_ARM64_BS=m CONFIG_JUMP_LABEL=y CONFIG_MODULES=y @@ -1283,7 +1280,6 @@ CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_ONESHOT=y CONFIG_LEDS_TRIGGER_HEARTBEAT=y CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_CPU=y CONFIG_LEDS_TRIGGER_GPIO=y CONFIG_LEDS_TRIGGER_DEFAULT_ON=y CONFIG_LEDS_TRIGGER_TRANSIENT=m From b49427282d3571a7a773fa02fc2025acbf6a6f8f Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Tue, 13 Sep 2022 12:43:38 +0200 Subject: [PATCH 064/183] arm64/configs/revpi-v8: Remove CONFIG_MAX30102 CONFIG_MAX30102 is not used in any of our products and can therefore be removed safely. Suggested-by: Simon Han Signed-off-by: Nicolai Buchwitz --- arch/arm64/configs/revpi-v8_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index ea869102570508..2bc665b185b00c 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -1402,7 +1402,6 @@ CONFIG_SENSIRION_SGP30=m CONFIG_SPS30=m CONFIG_AD5446=m CONFIG_TI_DAC082S085=m -CONFIG_MAX30102=m CONFIG_DHT11=m CONFIG_HDC100X=m CONFIG_HTU21=m From 41c242c2bc81a7df47dc8ac215eb9c5e48e2e79b Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Tue, 13 Sep 2022 12:46:32 +0200 Subject: [PATCH 065/183] arm64/configs/revpi-v8: Remove CONFIG_ANDROID CONFIG_ANDROID is not used in any of our products and can therefore be removed safely. It is also about to be removed from newer kernels (see https://lwn.net/Articles/899743/) Suggested-by: Simon Han Signed-off-by: Nicolai Buchwitz --- arch/arm64/configs/revpi-v8_defconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index 2bc665b185b00c..db4c1ae0a3ebb4 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -1349,7 +1349,6 @@ CONFIG_R8188EU=m CONFIG_VT6656=m CONFIG_STAGING_MEDIA=y CONFIG_VIDEO_RPIVID=m -CONFIG_ASHMEM=y CONFIG_FB_TFT=m CONFIG_FB_TFT_AGM1264K_FL=m CONFIG_FB_TFT_BD663474=m @@ -1417,9 +1416,6 @@ CONFIG_MAX31856=m CONFIG_PWM_BCM2835=m CONFIG_PWM_PCA9685=m CONFIG_RPI_AXIPERF=m -CONFIG_ANDROID=y -CONFIG_ANDROID_BINDER_IPC=y -CONFIG_ANDROID_BINDERFS=y CONFIG_NVMEM_RMEM=m CONFIG_MUX_GPIO=m CONFIG_EXT4_FS=y From c5bcd91db4a70592db0a170bf16e6e015f6e7619 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Sat, 31 Dec 2022 15:50:16 +0100 Subject: [PATCH 066/183] arm64/configs/revpi-v8: RANDOM_TRUST_BOOTLOADER defaults Since commit 4603a37f6eae ("random: credit cpu and bootloader seeds by default"), which appeared in v5.10.152-rt75, CONFIG_RANDOM_TRUST_BOOTLOADER defaults to yes, making it unnecessary to explicitly set it to yes in our defconfig. In mainline, the config option was removed entirely by commit b9b01a5625b5 ("random: use random.trust_{bootloader,cpu} command line option only"), which went into v6.2-rc1. That's another reason to get rid of it. Signed-off-by: Nicolai Buchwitz --- arch/arm64/configs/revpi-v8_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index db4c1ae0a3ebb4..d106ab4d5a14fc 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -687,7 +687,6 @@ CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y CONFIG_TCG_TPM=m CONFIG_TCG_TIS_SPI=m -CONFIG_RANDOM_TRUST_BOOTLOADER=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=m CONFIG_I2C_MUX_GPMUX=m From 32382977d7494ced4758bb4c9173e7268c78b8a0 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Sat, 31 Dec 2022 15:28:45 +0100 Subject: [PATCH 067/183] arm64/configs/revpi-v8: Enable tasks stats Tools like iotop cannot show IO utilization unless task stats are enabled. The options are present in our other revpi defconfigs, so the missing options in v8 are most likely related to 99ab277abdc289fd1e491e981687f0616479353d, which removed CONFIG KVM (depends on the task stat options). Signed-off-by: Nicolai Buchwitz --- arch/arm64/configs/revpi-v8_defconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index d106ab4d5a14fc..821477950dc554 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -8,6 +8,10 @@ CONFIG_HIGH_RES_TIMERS=y CONFIG_PREEMPT_RT=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y CONFIG_IKCONFIG=m CONFIG_IKCONFIG_PROC=y CONFIG_MEMCG=y From 92f09fcbc7d73d91d0628095bcc65ba8cb2171ac Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Fri, 13 Jan 2023 15:55:30 +0100 Subject: [PATCH 068/183] arm*/configs/revpi-*: Enable PWRSEQ_SD8787 for Flat S 2022 WiFi pwrseq_sd8787 allows proper handling of Reset and Powerdown GPIOs for the Maya WiFi module which is built into RevPi Flat S 2022. So enable that driver in all relevant configs. Signed-off-by: Lukas Wunner --- arch/arm/configs/revpi-v7_defconfig | 1 + arch/arm/configs/revpi-v7l_defconfig | 1 + arch/arm64/configs/revpi-v8_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 42a9e91d8a4283..7cb3de52199e66 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -582,6 +582,7 @@ CONFIG_LIBERTAS_THINFIRM=m CONFIG_LIBERTAS_THINFIRM_USB=m CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m +CONFIG_PWRSEQ_SD8787=y CONFIG_MT7601U=m CONFIG_MT76x0U=m CONFIG_MT76x2U=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index d618045ebeb83a..7e05e56d94de15 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -597,6 +597,7 @@ CONFIG_LIBERTAS_THINFIRM=m CONFIG_LIBERTAS_THINFIRM_USB=m CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m +CONFIG_PWRSEQ_SD8787=y CONFIG_MT7601U=m CONFIG_MT76x0U=m CONFIG_MT76x2U=m diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index 821477950dc554..7d5513a54765fc 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -599,6 +599,7 @@ CONFIG_LIBERTAS_THINFIRM=m CONFIG_LIBERTAS_THINFIRM_USB=m CONFIG_MWIFIEX=m CONFIG_MWIFIEX_SDIO=m +CONFIG_PWRSEQ_SD8787=y CONFIG_MT7601U=m CONFIG_MT76x0U=m CONFIG_MT76x2U=m From 1789cacb8e94f91e31cba7e1f51c2568788bdd98 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 7 May 2023 15:04:06 +0200 Subject: [PATCH 069/183] arm*/configs/revpi-*: Enable RESET_SLB9670 for Flat S 2022 TPM The Flat S 2022 holds the Trusted Platform Module in reset on boot, necessitating the kernel to take it out of reset by way of the reset-slb9670 driver. So enable that driver in all relevant configs. Signed-off-by: Lukas Wunner --- arch/arm/configs/revpi-v7_defconfig | 1 + arch/arm/configs/revpi-v7l_defconfig | 1 + arch/arm64/configs/revpi-v8_defconfig | 1 + 3 files changed, 3 insertions(+) diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 7cb3de52199e66..936095d1628d67 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -674,6 +674,7 @@ CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y CONFIG_TCG_TPM=m CONFIG_TCG_TIS_SPI=m +CONFIG_RESET_SLB9670=m CONFIG_RANDOM_TRUST_BOOTLOADER=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=m diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index 7e05e56d94de15..a97d58d28e9c7c 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -690,6 +690,7 @@ CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y CONFIG_TCG_TPM=m CONFIG_TCG_TIS_SPI=m +CONFIG_RESET_SLB9670=m CONFIG_RANDOM_TRUST_BOOTLOADER=y CONFIG_I2C=y CONFIG_I2C_CHARDEV=m diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index 7d5513a54765fc..8e1357babfc86f 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -692,6 +692,7 @@ CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y CONFIG_TCG_TPM=m CONFIG_TCG_TIS_SPI=m +CONFIG_RESET_SLB9670=m CONFIG_I2C=y CONFIG_I2C_CHARDEV=m CONFIG_I2C_MUX_GPMUX=m From 06f4ed2e6fe0a563fb4c0e95f18e709127e255f9 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 28 May 2020 10:08:34 +0200 Subject: [PATCH 070/183] ARM: dts: bcm283x: Increase default coherent pool size further Commit ec56ce88dd11 ("dts: Increase default coherent pool size") increased the default coherent pool size from 256 kByte to 1 MByte on all variants of the Raspberry Pi to address issues on 4.19 with multiple USB Ethernet adapters. However Simon Han reports that he's still seeing issues when attaching four USB Ethernet adapters to a RevPi Connect and that increasing to 4 MByte fixes them. Do so. Reported-by: Simon Han Signed-off-by: Lukas Wunner --- arch/arm/boot/dts/bcm270x.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm270x.dtsi b/arch/arm/boot/dts/bcm270x.dtsi index bb8e7a9d1b22ac..08043c268aca34 100644 --- a/arch/arm/boot/dts/bcm270x.dtsi +++ b/arch/arm/boot/dts/bcm270x.dtsi @@ -4,7 +4,7 @@ / { chosen: chosen { // Disable audio by default - bootargs = "coherent_pool=1M snd_bcm2835.enable_headphones=0"; + bootargs = "coherent_pool=4M snd_bcm2835.enable_headphones=0"; /delete-property/ stdout-path; }; From 62b16e371915266abb2bdfebd227b4201f55c0f2 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Wed, 6 Dec 2017 13:48:05 +0100 Subject: [PATCH 071/183] ARM: dts: Add overlays for Revolution Pi by KUNBUS Add a devicetree overlay and a dt-blob.bin source for each member of the Revolution Pi product family. The dt-blob.bin is installed on the /boot partition and loaded by the firmware to set up the initial GPIO pin configuration before powering up the system. See here for details: https://www.raspberrypi.org/documentation/configuration/pin-configuration.md To determine the specific changes we've made in a dt-blob.bin source, grep for "RevPi" or compare it to the original provided by the Foundation: https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts Briefly, the changes comprise: * Enable cameras on the RevPi Compact * Configure UART pins to support a serial early console * Raise drive strength to achieve higher SPI clock speeds (note this setting also affects all other pins in the same bank) * Set SPI Chip Select inactive on mcp3550-50 (analog input) to prevent the chip from going into continuous conversion mode (see datasheet and commit c1375d671a35 ("iio: adc: mcp320x: Add support for mcp3550/1/3") Zhi Han contributed portions of the RevPi Flat overlay. Signed-off-by: Zhi Han Signed-off-by: Lukas Wunner --- arch/arm/boot/dts/overlays/Makefile | 9 + arch/arm/boot/dts/overlays/README | 54 + .../revpi-compact-dt-blob-overlay.dts | 1772 +++++++++++++ .../dts/overlays/revpi-compact-overlay.dts | 326 +++ .../dts/overlays/revpi-con-can-overlay.dts | 50 + .../revpi-connect-dt-blob-overlay.dts | 1712 +++++++++++++ .../dts/overlays/revpi-connect-overlay.dts | 223 ++ .../overlays/revpi-core-dt-blob-overlay.dts | 1712 +++++++++++++ .../boot/dts/overlays/revpi-core-overlay.dts | 173 ++ .../overlays/revpi-flat-dt-blob-overlay.dts | 2256 +++++++++++++++++ .../boot/dts/overlays/revpi-flat-overlay.dts | 381 +++ 11 files changed, 8668 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-compact-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-connect-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-core-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-flat-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index b4fbefe77316ba..efcb2397acafcf 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -194,6 +194,15 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ qca7000-uart0.dtbo \ ramoops.dtbo \ ramoops-pi4.dtbo \ + revpi-compact.dtbo \ + revpi-compact-dt-blob.dtbo \ + revpi-connect.dtbo \ + revpi-connect-dt-blob.dtbo \ + revpi-con-can.dtbo \ + revpi-flat.dtbo \ + revpi-flat-dt-blob.dtbo \ + revpi-core.dtbo \ + revpi-core-dt-blob.dtbo \ rotary-encoder.dtbo \ rpi-backlight.dtbo \ rpi-codeczero.dtbo \ diff --git a/arch/arm/boot/dts/overlays/README b/arch/arm/boot/dts/overlays/README index a46cf8c6ed24d5..16c8c5e6c87aac 100644 --- a/arch/arm/boot/dts/overlays/README +++ b/arch/arm/boot/dts/overlays/README @@ -3441,6 +3441,60 @@ Params: base-addr Where to place the capture buffer (default console-size Size of non-panic dmesg captures (default 0) +Name: revpi-compact +Info: Overlay for RevPi Compact by KUNBUS +Load: dtoverlay=revpi-compact +Params: + + +Name: revpi-compact-dt-blob +Info: dt-blob.bin for RevPi Compact by KUNBUS +Load: dtoverlay=revpi-compact-dt-blob +Params: + + +Name: revpi-connect +Info: Overlay for RevPi Connect by KUNBUS +Load: dtoverlay=revpi-connect +Params: + + +Name: revpi-connect-dt-blob +Info: dt-blob.bin for RevPi Connect by KUNBUS +Load: dtoverlay=revpi-connect-dt-blob +Params: + + +Name: revpi-con-can +Info: Overlay for RevPi CON CAN by KUNBUS +Load: dtoverlay=revpi-con-can +Params: + + +Name: revpi-flat +Info: Overlay for RevPi Flat by KUNBUS +Load: dtoverlay=revpi-flat +Params: + + +Name: revpi-flat-dt-blob +Info: dt-blob.bin for RevPi Flat by KUNBUS +Load: dtoverlay=revpi-flat-dt-blob +Params: + + +Name: revpi-core +Info: Overlay for RevPi Core by KUNBUS +Load: dtoverlay=revpi-core +Params: + + +Name: revpi-core-dt-blob +Info: dt-blob.bin for RevPi Core by KUNBUS +Load: dtoverlay=revpi-core-dt-blob +Params: + + Name: rotary-encoder Info: Overlay for GPIO connected rotary encoder. Load: dtoverlay=rotary-encoder,= diff --git a/arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts new file mode 100644 index 00000000000000..27a12c41fc5726 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts @@ -0,0 +1,1772 @@ +/dts-v1/; + +/ { + videocore { + pins_rev1 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p2 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SDA + pin@p3 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p27 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <2>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <3>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <27>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <1>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <1>; + }; + }; // pin_defines + }; // pins_rev1 + + pins_rev2 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p0 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SDA + pin@p1 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN NRESET + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity = "active_low"; }; // activity LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <2>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <3>; + }; + }; // pin_defines + }; // pins + + pins_bplus1 { // Pi 1 Model B+ rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <31>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <35>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "internal"; + number = <38>; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_bplus2 { // Pi 1 Model B+ rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b1 { // Pi 2 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA / SMPS_SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL / SMPS_SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <28>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <29>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b2 { // Pi 2 Model B rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + // Communicate with the SMPS by "bit-bashing" the I2C protocol on GPIOs 42 and 43 + pin@p42 { function = "output"; termination = "pull_up"; }; // SMPS_SCL + pin@p43 { function = "input"; termination = "no_pulling"; }; // SMPS_SDA + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <42>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_3b1 { // Pi 3 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // Status LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <6>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <44>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <45>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3b2 { // Pi 3 Model B rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // ACT_LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "external"; + number = <2>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_cm3 { // Pi 3 CM3 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p0 { function = "input"; termination = "pull_up"; }; // RevPi Compact CAMERA_0_SDA_PIN + pin@p1 { function = "input"; termination = "pull_up"; }; // RevPi Compact CAMERA_0_SCL_PIN + pin@p5 { function = "output"; termination = "no_pulling"; }; // RevPi Compact CAMERA_0_LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // RevPi Compact CAMERA_0_SHUTDOWN + pin@p38 { function = "uart0"; termination = "no_pulling"; }; // RevPi Compact UART0 RTS + pin@p39 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "inactive"; }; // RevPi Compact UART0 TERM + pin@p42 { function = "spi2"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Compact SPI2 CLK + pin@p44 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // RevPi Compact AIN CS + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <0>; + }; + pin_define@EMMC_ENABLE { + type = "external"; + number = <1>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + }; // pin_defines + }; // pins + + pins_pi0 { // Pi zero + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0w { // Pi zero W + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <40>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "internal"; + number = <45>; + }; + pin_define@WL_ON { + type = "internal"; + number = <41>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_cm { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; }; // RX uart0 + pin@p47 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p0 { function = "input"; termination = "pull_up"; }; // RevPi Compact CAMERA_0_SDA_PIN + pin@p1 { function = "input"; termination = "pull_up"; }; // RevPi Compact CAMERA_0_SCL_PIN + pin@p5 { function = "output"; termination = "no_pulling"; }; // RevPi Compact CAMERA_0_LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // RevPi Compact CAMERA_0_SHUTDOWN + pin@p38 { function = "uart0"; termination = "no_pulling"; }; // RevPi Compact UART0 RTS + pin@p44 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // RevPi Compact AIN CS + }; // pin_config + + pin_defines { + pin_define@EMMC_ENABLE { + type = "internal"; + number = <47>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + }; // pin_defines + }; // pins_cm + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts new file mode 100644 index 00000000000000..fa8eb216c81d27 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts @@ -0,0 +1,326 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Compact + */ + +/dts-v1/; +/plugin/; +#include +#include +#include + +/{ + compatible = "brcm,bcm2837"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "brcm,bcm2837", "brcm,bcm2836", + "kunbus,revpi-compact"; + + aout_vref: fixedregulator_2v5x4 { + compatible = "regulator-fixed"; + regulator-name = "2v5_x4_amplified"; + regulator-min-microvolt = <10000000>; + regulator-max-microvolt = <10000000>; + regulator-always-on; + }; + + ain_vref: fixedregulator_2v5x5 { + compatible = "regulator-fixed"; + regulator-name = "2v5_x5_amplified"; + regulator-min-microvolt = <12500000>; + regulator-max-microvolt = <12500000>; + regulator-always-on; + }; + + ain_mux: ain_mux { + compatible = "gpio-mux"; + #mux-control-cells = <0>; + mux-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>, + <&gpio 12 GPIO_ACTIVE_HIGH>, + <&gpio 13 GPIO_ACTIVE_HIGH>, + <&gpio 16 GPIO_ACTIVE_HIGH>; + /* + * Switching the mux and turning on the RTD + * power source takes a while (< 20 msec). + * The power source should be disabled after + * a measurement to avoid heating up the RTD + * sensor, hence ain0 is used as idle state. + */ + settling-time-us = <20000>; + idle-state = <0>; + }; + + ain_muxed { + compatible = "io-channel-mux"; + io-channels = <&ain 0>; + io-channel-names = "parent"; + mux-controls = <&ain_mux>; + channels = "ain0", "ain1", "ain2", "ain3", + "ain4", "ain5", "ain6", "ain7", + "ain0_rtd", "ain1_rtd", "ain2_rtd", + "ain3_rtd", "ain4_rtd", "ain5_rtd", + "ain6_rtd", "ain7_rtd"; + }; + + leds { + compatible = "gpio-leds"; + power_red { + gpios = <&gpio 35 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "power_red"; + }; + a1_green { + gpios = <&gpio 30 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a1_green"; + }; + a1_red { + gpios = <&gpio 34 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a1_red"; + }; + a2_green { + gpios = <&gpio 32 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a2_green"; + }; + a2_red { + gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a2_red"; + }; + act { + status = "disabled"; + }; + }; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + spi0_cs_pins { + /* free free eth1 */ + brcm,pins = <8 7 17>; + brcm,function = ; + brcm,pull = ; + }; + eth1_int_pins { + brcm,pins = <18>; + brcm,function = ; + brcm,pull = ; + }; + spi2_pins: spi2_pins { + /* miso mosi clock */ + brcm,pins = <40 41 42>; + brcm,function = ; + brcm,pull = ; + }; + spi2_cs_pins: spi2_cs_pins { + /* aout ain dout din */ + brcm,pins = <43 44 45 36>; + brcm,function = ; + brcm,pull = ; + }; + ain_mux_pins { + /* sw_a0 sw_a1 sw_a2 cu_sw_en */ + brcm,pins = <6 12 13 16>; + brcm,function = ; + brcm,pull = ; + }; + dout_fault_pins: dout_fault_pins { + brcm,pins = <37>; + brcm,function = ; + brcm,pull = ; + }; + din_control_pins: din_control_pins { + /* db0 db1 modesel fault */ + brcm,pins = <19 20 26 28>; + brcm,function = ; + brcm,pull = ; + }; + leds_pins { + /* power_red a1_green a1_red a2_green a2_red */ + brcm,pins = <35 30 34 32 33>; + brcm,function = ; + brcm,pull = ; + }; + rs485_pins: rs485_pins { + /* tx rx rts term fault */ + brcm,pins = <14 15 38 39 22>; + brcm,function = ; + brcm,pull = ; + }; + }; + }; + + fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + eeprom@50 { + compatible = "microchip,47l16"; + reg = <0x50>; + status = "okay"; + pagesize = <32>; /* FIXME */ + }; + + rtc@51 { + compatible = "nxp,pcf2129"; + reg = <0x51>; + status = "okay"; + }; + + crypto@60 { + compatible = "atmel,atecc508a"; + reg = <0x60>; + status = "okay"; + }; + }; + }; + + fragment@3 { + target = <&spi0>; + __overlay__ { + cs-gpios = <&gpio 8 GPIO_ACTIVE_LOW>, + <&gpio 7 GPIO_ACTIVE_LOW>, + <&gpio 17 GPIO_ACTIVE_LOW>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + eth1: ethernet@2 { + compatible = "micrel,ks8851"; + reg = <2>; + /* + * RevPi Compact achieved 28.5 MHz in the lab, + * round down to 25 MHz for safety. + */ + spi-max-frequency = <25000000>; /* <= 40 MHz */ + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <18 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; + }; + }; + + fragment@4 { + target = <&spi2>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&spi2_pins &spi2_cs_pins>; + cs-gpios = <&gpio 43 GPIO_ACTIVE_LOW>, + <&gpio 44 GPIO_ACTIVE_LOW>, + <&gpio 45 GPIO_ACTIVE_LOW>, + <&gpio 36 GPIO_ACTIVE_LOW>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + aout: dac@0 { + compatible = "ti,dac082s085"; + reg = <0>; + spi-max-frequency = <5000000>; /* <= 40 MHz */ + spi-cpol; + vref-supply = <&aout_vref>; + status = "okay"; + }; + + ain: adc@1 { + compatible = "microchip,mcp3550-50"; + reg = <1>; + spi-max-frequency = <5000000>; /* <= 5 MHz */ + vref-supply = <&ain_vref>; + #io-channel-cells = <1>; + status = "okay"; + }; + + dout: gpio@2 { + compatible = "fairchild,74hc595"; + reg = <2>; + spi-max-frequency = <10000000>; /* <= 50 MHz */ + gpio-controller; + #gpio-cells = <2>; + registers-number = <1>; + kunbus,fault-gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&dout_fault_pins>; + status = "okay"; + }; + + din: gpio@3 { + compatible = "maxim,max31913"; + reg = <3>; + spi-max-frequency = <5000000>; /* <= 25 MHz */ + gpio-controller; + #gpio-cells = <2>; + maxim,ignore-undervoltage; + maxim,db0-gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; + maxim,db1-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + maxim,modesel-gpios = <&gpio 26 GPIO_ACTIVE_HIGH>; + maxim,fault-gpios = <&gpio 28 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&din_control_pins>; + status = "okay"; + }; + }; + }; + + fragment@5 { + target = <&aux>; + __overlay__ { + status = "okay"; + }; + }; + + fragment@6 { + target = <&uart0>; + __overlay__ { + linux,rs485-enabled-at-boot-time; + pinctrl-names = "default"; + pinctrl-0 = <&rs485_pins>; + rs485-term-gpios = <&gpio 39 GPIO_ACTIVE_LOW>; + }; + }; + + fragment@7 { + target = <&usb>; + __overlay__ { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + hub@1 { + compatible = "usb424,9514"; /* SMSC LAN9514 */ + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + eth0: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; + }; + }; + + __overrides__ { + eth0_mac_hi = <ð0>,"local-mac-address:0"; + eth0_mac_lo = <ð0>,"local-mac-address;4"; + eth1_mac_hi = <ð1>,"local-mac-address:0"; + eth1_mac_lo = <ð1>,"local-mac-address;4"; + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts b/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts new file mode 100644 index 00000000000000..41c75f0a6c12bc --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts @@ -0,0 +1,50 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi CON CAN + */ + +/dts-v1/; +/plugin/; +#include + +/{ + compatible = "brcm,bcm2837"; + + fragment@0 { + target = <&spidev0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@1 { + target-path = "/clocks"; + __overlay__ { + can0_osc: can0_osc { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32000000>; + }; + }; + }; + + fragment@2 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + can@0 { + compatible = "holt,hi3110"; + reg = <0>; + spi-max-frequency = <10000000>; /* <= 20 MHz */ + clocks = <&can0_osc>; + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <28 IRQ_TYPE_LEVEL_HIGH>; + status = "okay"; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts new file mode 100644 index 00000000000000..1dec30a004b3e0 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts @@ -0,0 +1,1712 @@ +/dts-v1/; + +/ { + videocore { + pins_rev1 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p2 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SDA + pin@p3 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p27 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <2>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <3>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <27>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <1>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <1>; + }; + }; // pin_defines + }; // pins_rev1 + + pins_rev2 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p0 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SDA + pin@p1 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN NRESET + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity = "active_low"; }; // activity LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <2>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <3>; + }; + }; // pin_defines + }; // pins + + pins_bplus1 { // Pi 1 Model B+ rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <31>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <35>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "internal"; + number = <38>; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_bplus2 { // Pi 1 Model B+ rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b1 { // Pi 2 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA / SMPS_SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL / SMPS_SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <28>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <29>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b2 { // Pi 2 Model B rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + // Communicate with the SMPS by "bit-bashing" the I2C protocol on GPIOs 42 and 43 + pin@p42 { function = "output"; termination = "pull_up"; }; // SMPS_SCL + pin@p43 { function = "input"; termination = "no_pulling"; }; // SMPS_SDA + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <42>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_3b1 { // Pi 3 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // Status LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <6>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <44>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <45>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3b2 { // Pi 3 Model B rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // ACT_LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "external"; + number = <2>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_cm3 { // Pi 3 CM3 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p4 { function = "output"; termination = "no_pulling"; startup_state = "inactive"; }; // RevPi Connect GPIO Mux + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Connect SPI0 CLK + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <0>; + }; + pin_define@EMMC_ENABLE { + type = "external"; + number = <1>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0 { // Pi zero + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0w { // Pi zero W + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <40>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "internal"; + number = <45>; + }; + pin_define@WL_ON { + type = "internal"; + number = <41>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_cm { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; }; // RX uart0 + pin@p47 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@EMMC_ENABLE { + type = "internal"; + number = <47>; + }; + }; // pin_defines + }; // pins_cm + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts new file mode 100644 index 00000000000000..a9ed411aca911d --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -0,0 +1,223 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Connect + */ + +/dts-v1/; +/plugin/; +#include +#include +#include + +/{ + compatible = "brcm,bcm2837"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "brcm,bcm2837", "brcm,bcm2836", + "kunbus,revpi-connect"; + + leds { + compatible = "gpio-leds"; + power_red { + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "power_red"; + }; + a1_green { + gpios = <&gpio 30 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a1_green"; + }; + a1_red { + gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a1_red"; + }; + a2_green { + gpios = <&gpio 32 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a2_green"; + }; + a2_red { + gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a2_red"; + }; + a3_green { + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a3_green"; + }; + a3_red { + gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a3_red"; + }; + act { + status = "disabled"; + }; + }; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + spi0_pins { + /* miso mosi clock */ + brcm,pins = <37 38 39>; + brcm,function = ; + brcm,pull = ; + }; + spi0_cs_pins { + brcm,pins = <36 35>; + brcm,function = ; + brcm,pull = ; + }; + eth2_int_pins { + brcm,pins = <8>; + brcm,function = ; + brcm,pull = ; + }; + eth2_reset_pins { + brcm,pins = <40>; + brcm,function = ; + brcm,pull = ; + }; + conbridge_int_pins { + brcm,pins = <28>; + brcm,function = ; + brcm,pull = ; + }; + i2c1 { + /* sda scl */ + brcm,pins = <44 45>; + brcm,function = ; + brcm,pull = ; + }; + rs485_pins: rs485_pins { + /* tx rx rts term */ + brcm,pins = <14 15 17 41>; + brcm,function = ; + brcm,pull = ; + }; + }; + }; + + fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + rtc@51 { + compatible = "nxp,pcf2129"; + reg = <0x51>; + status = "okay"; + }; + + crypto@60 { + compatible = "atmel,atecc508a"; + reg = <0x60>; + status = "okay"; + }; + }; + }; + + fragment@3 { + target = <&spidev1>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&spi0>; + __overlay__ { + cs-gpios = <&gpio 36 GPIO_ACTIVE_LOW>, + <&gpio 35 GPIO_ACTIVE_LOW>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + pileft: ethernet@1 { + /* PiBridge Ethernet left */ + compatible = "micrel,ks8851"; + reg = <1>; + spi-max-frequency = <10000000>; /* <= 40 MHz */ + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio 40 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + }; + + fragment@5 { + target = <&usb>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + hub@1 { + /* SMSC LAN9514 */ + compatible = "usb424,9514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + eth0: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + + hub@5 { + /* SMSC LAN9512 */ + compatible = "usb424,9512"; + reg = <5>; + #address-cells = <1>; + #size-cells = <0>; + + eth1: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + + uart@2 { + /* FTDI FT232R (front) */ + compatible = "usb403,6001"; + reg = <2>; + }; + + uart@3 { + /* FTDI FT232R (conbridge) */ + compatible = "usb403,6001"; + reg = <3>; + }; + }; + }; + }; + }; + + fragment@6 { + target = <&uart0>; + __overlay__ { + linux,rs485-enabled-at-boot-time; + pinctrl-names = "default"; + pinctrl-0 = <&rs485_pins>; + }; + }; + + __overrides__ { + eth0_mac_hi = <ð0>,"local-mac-address:0"; + eth0_mac_lo = <ð0>,"local-mac-address;4"; + eth1_mac_hi = <ð1>,"local-mac-address:0"; + eth1_mac_lo = <ð1>,"local-mac-address;4"; + pileft_mac_hi = <&pileft>,"local-mac-address:0"; + pileft_mac_lo = <&pileft>,"local-mac-address;4"; + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts new file mode 100644 index 00000000000000..2de324b4424fc1 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts @@ -0,0 +1,1712 @@ +/dts-v1/; + +/ { + videocore { + pins_rev1 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p2 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SDA + pin@p3 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p27 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <2>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <3>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <27>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <1>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <1>; + }; + }; // pin_defines + }; // pins_rev1 + + pins_rev2 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p0 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SDA + pin@p1 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN NRESET + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity = "active_low"; }; // activity LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <2>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <3>; + }; + }; // pin_defines + }; // pins + + pins_bplus1 { // Pi 1 Model B+ rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <31>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <35>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "internal"; + number = <38>; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_bplus2 { // Pi 1 Model B+ rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b1 { // Pi 2 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA / SMPS_SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL / SMPS_SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <28>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <29>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b2 { // Pi 2 Model B rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + // Communicate with the SMPS by "bit-bashing" the I2C protocol on GPIOs 42 and 43 + pin@p42 { function = "output"; termination = "pull_up"; }; // SMPS_SCL + pin@p43 { function = "input"; termination = "no_pulling"; }; // SMPS_SDA + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <42>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_3b1 { // Pi 3 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // Status LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <6>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <44>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <45>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3b2 { // Pi 3 Model B rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // ACT_LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "external"; + number = <2>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_cm3 { // Pi 3 CM3 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Core SPI0 CLK + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <0>; + }; + pin_define@EMMC_ENABLE { + type = "external"; + number = <1>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0 { // Pi zero + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0w { // Pi zero W + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <40>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "internal"; + number = <45>; + }; + pin_define@WL_ON { + type = "internal"; + number = <41>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_cm { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; }; // RX uart0 + pin@p47 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Core SPI0 CLK + }; // pin_config + + pin_defines { + pin_define@EMMC_ENABLE { + type = "internal"; + number = <47>; + }; + }; // pin_defines + }; // pins_cm + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts new file mode 100644 index 00000000000000..9bdffc25d4bdff --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -0,0 +1,173 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Core + * RevPi Core 3 + */ + +/dts-v1/; +/plugin/; +#include +#include + +/{ + compatible = "brcm,bcm2835", "brcm,bcm2837"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "brcm,bcm2837", "brcm,bcm2836", + "brcm,bcm2835", "kunbus,revpi-core"; + + leds { + compatible = "gpio-leds"; + power_red { + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "power_red"; + }; + a1_green { + gpios = <&gpio 30 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a1_green"; + }; + a1_red { + gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a1_red"; + }; + a2_green { + gpios = <&gpio 32 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a2_green"; + }; + a2_red { + gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "a2_red"; + }; + act { + status = "disabled"; + }; + }; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + spi0_pins { + /* miso mosi clock */ + brcm,pins = <37 38 39>; + brcm,function = ; + brcm,pull = ; + }; + spi0_cs_pins { + brcm,pins = <36 35>; + brcm,function = ; + brcm,pull = ; + }; + eth1_2_reset_pins { + /* resets both chips */ + brcm,pins = <40>; + brcm,function = ; + brcm,pull = ; + }; + i2c1 { + /* sda scl */ + brcm,pins = <44 45>; + brcm,function = ; + brcm,pull = ; + }; + }; + }; + + fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + rtc@51 { + compatible = "nxp,pcf2129"; + reg = <0x51>; + status = "okay"; + }; + + crypto@60 { + compatible = "atmel,atecc508a"; + reg = <0x60>; + status = "okay"; + }; + }; + }; + + fragment@3 { + target = <&spidev0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@4 { + target = <&spidev1>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@5 { + target = <&spi0>; + __overlay__ { + cs-gpios = <&gpio 36 GPIO_ACTIVE_LOW>, + <&gpio 35 GPIO_ACTIVE_LOW>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + pileft: ethernet@0 { + /* PiBridge Ethernet left */ + compatible = "micrel,ks8851"; + reg = <0>; + spi-max-frequency = <20000000>; /* <= 40 MHz */ + interrupts = <0x80000000>; /* not connected */ + status = "okay"; + }; + + piright: ethernet@1 { + /* PiBridge Ethernet right */ + compatible = "micrel,ks8851"; + reg = <1>; + spi-max-frequency = <20000000>; /* <= 40 MHz */ + interrupts = <0x80000000>; /* not connected */ + reset-gpios = <&gpio 40 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + }; + + fragment@6 { + target = <&usb>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + hub@1 { + compatible = "usb424,9514"; /* SMSC LAN9514 */ + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + eth0: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; + }; + }; + + __overrides__ { + eth0_mac_hi = <ð0>,"local-mac-address:0"; + eth0_mac_lo = <ð0>,"local-mac-address;4"; + pileft_mac_hi = <&pileft>,"local-mac-address:0"; + pileft_mac_lo = <&pileft>,"local-mac-address;4"; + piright_mac_hi = <&piright>,"local-mac-address:0"; + piright_mac_lo = <&piright>,"local-mac-address;4"; + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts new file mode 100644 index 00000000000000..2422a9d10f787e --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts @@ -0,0 +1,2256 @@ +/dts-v1/; + +/ { + videocore { + pins_rev1 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p2 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SDA + pin@p3 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p27 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <2>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <3>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <27>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <1>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <1>; + }; + }; // pin_defines + }; // pins_rev1 + + pins_rev2 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p0 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SDA + pin@p1 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN NRESET + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity = "active_low"; }; // activity LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <2>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <3>; + }; + }; // pin_defines + }; // pins + + pins_bplus1 { // Pi 1 Model B+ rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <31>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <35>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "internal"; + number = <38>; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_bplus2 { // Pi 1 Model B+ rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b1 { // Pi 2 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA / SMPS_SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL / SMPS_SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <28>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <29>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b2 { // Pi 2 Model B rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + // Communicate with the SMPS by "bit-bashing" the I2C protocol on GPIOs 42 and 43 + pin@p42 { function = "output"; termination = "pull_up"; }; // SMPS_SCL + pin@p43 { function = "input"; termination = "no_pulling"; }; // SMPS_SDA + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <42>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_3b1 { // Pi 3 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // Status LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <6>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <44>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <45>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3b2 { // Pi 3 Model B rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // ACT_LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "external"; + number = <2>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3bplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p29 { function = "output"; termination = "no_pulling"; }; // ACT_LED (GREEN) + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <28>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_PWR_OK { + type = "external"; + number = <2>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <29>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <30>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p29 { function = "output"; termination = "no_pulling"; }; // ACT_LED (GREEN) + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <28>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_PWR_OK { + type = "external"; + number = <2>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <29>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <30>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_cm3 { // Pi 3 CM3 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p17 { function = "uart0"; termination = "no_pulling"; }; // RevPi Flat UART0 RTS + pin@p31 { function = "uart1"; termination = "no_pulling"; }; // RevPi Flat UART1 RTS + pin@p32 { function = "uart1"; termination = "no_pulling"; }; // RevPi Flat UART1 TX + pin@p33 { function = "uart1"; termination = "no_pulling"; }; // RevPi Flat UART1 RX + pin@p44 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // RevPi Flat AIN CS + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <0>; + }; + pin_define@EMMC_ENABLE { + type = "external"; + number = <1>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0 { // Pi zero + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0w { // Pi zero W + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <40>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "internal"; + number = <45>; + }; + pin_define@WL_ON { + type = "internal"; + number = <41>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_cm { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; }; // RX uart0 + pin@p47 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@EMMC_ENABLE { + type = "internal"; + number = <47>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins_cm + + pins_4b { // Pi4 Model B + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "output"; termination = "pull_up"; }; // activity LED + pin@p43 { function = "input"; termination = "pull_up"; }; // SPIFLASH_CE_N + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; drive_strength_mA = < 14 >; }; // Dummy pin for HSTL drive on bank 2 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p132 { function = "output"; termination = "no_pulling"; }; // SD VDDIO + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "absent"; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "absent"; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_PWR_OK { + type = "external"; + number = <2>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <42>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "external"; + number = <4>; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts new file mode 100644 index 00000000000000..19982b7df8b707 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -0,0 +1,381 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Flat + */ + +/dts-v1/; +/plugin/; +#include +#include +#include + +/{ + compatible = "brcm,bcm2837"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "brcm,bcm2837", "brcm,bcm2836", + "kunbus,revpi-flat"; + + aout_vref: fixedregulator_2v5x4 { + compatible = "regulator-fixed"; + regulator-name = "2v5_x4_amplified"; + regulator-min-microvolt = <10000000>; + regulator-max-microvolt = <10000000>; + regulator-always-on; + }; + + ain_vref: fixedregulator_2v5x5 { + compatible = "regulator-fixed"; + regulator-name = "2v5_x5_amplified"; + regulator-min-microvolt = <12500000>; + regulator-max-microvolt = <12500000>; + regulator-always-on; + }; + + watchdog: watchdog { + compatible = "linux,wdt-gpio"; /* max6370 */ + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + hw_algo = "toggle"; + hw_margin_ms = <55000>; /* <= 60 s */ + always-running; + }; + + leds { + compatible = "gpio-leds"; + power_red { + gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "power_red"; + }; + a_green { + gpios = <&expander 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a_green"; + }; + a_red { + gpios = <&expander 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a_red"; + }; + b_green { + gpios = <&expander 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "b_green"; + }; + b_red { + gpios = <&expander 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "b_red"; + }; + c_green { + gpios = <&expander 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "c_green"; + }; + c_red { + gpios = <&expander 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "c_red"; + }; + d_green { + gpios = <&expander 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "d_green"; + }; + d_red { + gpios = <&expander 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "d_red"; + }; + e_green { + gpios = <&expander 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "e_green"; + }; + e_red { + gpios = <&expander 9 GPIO_ACTIVE_LOW>; + linux,default-trigger = "e_red"; + }; + act { + status = "disabled"; + }; + }; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + i2c0_gpio44: i2c0_gpio44 { + brcm,pins = <44 45>; + brcm,function = ; + }; + i2c1_gpio2: i2c1_gpio2 { + brcm,pins = <2 3>; + brcm,function = ; + }; + spi0_cs_pins: spi0_cs_pins { + /* aout ain mbus tpm */ + brcm,pins = <8 7 6 30>; + brcm,function = ; + brcm,pull = ; + }; + emmc_gpio34: emmc_gpio34 { + brcm,pins = <34 35 36 37 38 39>; + brcm,function = ; + brcm,pull = ; + }; + tpm_pins { + /* irq reset */ + brcm,pins = <0 1>; + brcm,function = ; + brcm,pull = ; + }; + mbus_pins { + /* irq */ + brcm,pins = <21>; + brcm,function = ; + brcm,pull = ; + }; + watchdog_pins { + /* enable ping */ + brcm,pins = <4 5>; + brcm,function = ; + brcm,pull = ; + }; + button_pins { + brcm,pins = <13>; + brcm,function = ; + brcm,pull = ; + }; + relais_pins { + brcm,pins = <19>; + brcm,function = ; + brcm,pull = ; + }; + rs485_0_pins: rs485_0_pins { + /* tx rx rts */ + brcm,pins = <14 15 17>; + brcm,function = ; + brcm,pull = ; + }; + rs485_1_pins: rs485_1_pins { + /* tx rx rts */ + brcm,pins = <32 33 31>; + brcm,function = ; + brcm,pull = ; + }; + }; + }; + + fragment@2 { + target = <&i2c0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_gpio44>; + status = "okay"; + + /* TODO: ksz8795 */ + }; + }; + + fragment@3 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_gpio2>; + status = "okay"; + + expander: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + status = "okay"; + }; + + rtc@51 { + compatible = "nxp,pcf2129"; + reg = <0x51>; + status = "okay"; + }; + }; + }; + + fragment@4 { + target = <&spi0>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpio 8 GPIO_ACTIVE_LOW>, + <&gpio 7 GPIO_ACTIVE_LOW>, + <&gpio 6 GPIO_ACTIVE_LOW>, + <&gpio 30 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins &spi0_cs_pins>; + status = "okay"; + + aout: dac@0 { + compatible = "ti,dac7512"; + reg = <0>; + spi-max-frequency = <5000000>; /* <= 30 MHz */ + spi-cpol; + vcc-supply = <&aout_vref>; + status = "okay"; + }; + + ain: adc@1 { + compatible = "microchip,mcp3550-50"; + reg = <1>; + spi-max-frequency = <5000000>; /* <= 5 MHz */ + vref-supply = <&ain_vref>; + status = "okay"; + }; + + mbus: rf@2 { + compatible = "spidev", "ti,cc1101"; + reg = <2>; + spi-max-frequency = <5000000>; /* <= 6.5 MHz */ + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; + status = "okay"; + }; + + tpm: tpm@3 { + compatible = "infineon,slb9670"; + reg = <3>; + spi-max-frequency = <1000000>; /* <= 43 MHz */ + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; + }; + }; + + fragment@5 { + target = <&spidev0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@6 { + target = <&spidev1>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@7 { + target = <&usb>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + hub@1 { + /* SMSC LAN9514 */ + compatible = "usb424,9514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + eth0: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + + eth1: ethernet@4 { + /* SMSC LAN9500, attached to KSZ8795 */ + compatible = "usb424,9500"; + reg = <4>; + }; + + uart@5 { + /* FTDI FT232R */ + compatible = "usb403,6001"; + reg = <5>; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + max-speed = <2000000>; + }; + }; + }; + }; + }; + + fragment@8 { + target = <&mmc>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_gpio34>; + status = "okay"; + bus-width = <4>; + non-removable; + brcm,overclock-50 = <20>; + + wlan0: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + status = "okay"; + }; + }; + }; + + fragment@9 { + target = <&uart0>; + __overlay__ { + linux,rs485-enabled-at-boot-time; + pinctrl-names = "default"; + pinctrl-0 = <&rs485_0_pins>; + rs485-term-gpios = <&expander 14 GPIO_ACTIVE_LOW>; + }; + }; + + fragment@10 { + target = <&uart1>; + __overlay__ { + linux,rs485-enabled-at-boot-time; + pinctrl-names = "default"; + pinctrl-0 = <&rs485_1_pins>; + rs485-term-gpios = <&expander 15 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + + fragment@11 { + target = <&fb>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@12 { + target-path = "/chosen"; + chosen_overlay: __overlay__ { + }; + }; + + __overrides__ { + eth0_mac_hi = <ð0>,"local-mac-address:0"; + eth0_mac_lo = <ð0>,"local-mac-address;4"; + eth1_mac_hi = <ð1>,"local-mac-address:0"; + eth1_mac_lo = <ð1>,"local-mac-address;4"; + bootargs = <&chosen_overlay>,"bootargs"; + }; +}; From b002356caf27772e35e195d2118e95ac33aa1f74 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 6 Feb 2020 16:32:53 +0100 Subject: [PATCH 072/183] ARM: dts: Add dt-blob.bin source for JTAG debugging Provide a dt-blob.bin source which configures GPIO pins 22 to 27 to JTAG mode. Intended to be used with a Raspberry Pi Compute Module 1 or 3 mounted in a CMIO board. Signed-off-by: Lukas Wunner Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/Makefile | 1 + .../overlays/cmio-jtag-dt-blob-overlay.dts | 1727 +++++++++++++++++ 2 files changed, 1728 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/cmio-jtag-dt-blob-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index efcb2397acafcf..0e0282088c31a8 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -203,6 +203,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-flat-dt-blob.dtbo \ revpi-core.dtbo \ revpi-core-dt-blob.dtbo \ + cmio-jtag-dt-blob.dtbo \ rotary-encoder.dtbo \ rpi-backlight.dtbo \ rpi-codeczero.dtbo \ diff --git a/arch/arm/boot/dts/overlays/cmio-jtag-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/cmio-jtag-dt-blob-overlay.dts new file mode 100644 index 00000000000000..24bf8304c88f63 --- /dev/null +++ b/arch/arm/boot/dts/overlays/cmio-jtag-dt-blob-overlay.dts @@ -0,0 +1,1727 @@ +/dts-v1/; + +/ { + videocore { + pins_rev1 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p2 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SDA + pin@p3 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p27 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <2>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <3>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <27>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <1>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <1>; + }; + }; // pin_defines + }; // pins_rev1 + + pins_rev2 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p0 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SDA + pin@p1 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN NRESET + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity = "active_low"; }; // activity LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <2>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <3>; + }; + }; // pin_defines + }; // pins + + pins_bplus1 { // Pi 1 Model B+ rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <31>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <35>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "internal"; + number = <38>; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_bplus2 { // Pi 1 Model B+ rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b1 { // Pi 2 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA / SMPS_SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL / SMPS_SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <28>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <29>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b2 { // Pi 2 Model B rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + // Communicate with the SMPS by "bit-bashing" the I2C protocol on GPIOs 42 and 43 + pin@p42 { function = "output"; termination = "pull_up"; }; // SMPS_SCL + pin@p43 { function = "input"; termination = "no_pulling"; }; // SMPS_SDA + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <42>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_3b1 { // Pi 3 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // Status LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <6>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <44>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <45>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3b2 { // Pi 3 Model B rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // ACT_LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "external"; + number = <2>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_cm3 { // Pi 3 CM3 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p22 { function = "arm_jtag"; termination = "pull_down"; drive_strength_mA = < 8 >; }; // ARM_TRST + pin@p23 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_RTCK + pin@p24 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_TDO + pin@p25 { function = "arm_jtag"; termination = "pull_down"; drive_strength_mA = < 8 >; }; // ARM_TCK + pin@p26 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_TDI + pin@p27 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_TMS + pin@p30 { function = "uart1"; termination = "no_pulling"; }; // RevPi Connect Flat UART1 CTS + pin@p31 { function = "uart1"; termination = "no_pulling"; }; // RevPi Connect Flat UART1 RTS + pin@p32 { function = "uart1"; termination = "no_pulling"; }; // RevPi Connect Flat UART1 TX + pin@p33 { function = "uart1"; termination = "no_pulling"; }; // RevPi Connect Flat UART1 RX + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <0>; + }; + pin_define@EMMC_ENABLE { + type = "external"; + number = <1>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0 { // Pi zero + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0w { // Pi zero W + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <40>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "internal"; + number = <45>; + }; + pin_define@WL_ON { + type = "internal"; + number = <41>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_cm { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; }; // RX uart0 + pin@p22 { function = "arm_jtag"; termination = "pull_down"; drive_strength_mA = < 8 >; }; // ARM_TRST + pin@p23 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_RTCK + pin@p24 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_TDO + pin@p25 { function = "arm_jtag"; termination = "pull_down"; drive_strength_mA = < 8 >; }; // ARM_TCK + pin@p26 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_TDI + pin@p27 { function = "arm_jtag"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // ARM_TMS + pin@p47 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Connect SPI0 CLK + }; // pin_config + + pin_defines { + pin_define@EMMC_ENABLE { + type = "internal"; + number = <47>; + }; + }; // pin_defines + }; // pins_cm + }; +}; From 76cbdcc6a973a9fcb1369b4998d31c26ec8cc3de Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Wed, 9 Feb 2022 19:09:29 +0100 Subject: [PATCH 073/183] ARM: dts: Add dt-blob cm4s support for RevPi Core Signed-off-by: Nicolai Buchwitz --- .../overlays/revpi-core-dt-blob-overlay.dts | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts index 2de324b4424fc1..2e7d074df187a6 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-dt-blob-overlay.dts @@ -1408,6 +1408,87 @@ }; // pin_defines }; // pins + pins_cm4s { // Pi 4 CM4S + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Core SPI0 CLK + pin@p46 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "internal"; + number = <49>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <46>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "absent"; + }; + pin_define@WL_ON { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + pins_pi0 { // Pi zero pin_config { pin@default { From 794ef4f0068addd56631a29f03f0035a23861257 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Wed, 9 Feb 2022 19:10:01 +0100 Subject: [PATCH 074/183] ARM: dts: Add dt-blob cm4s support for RevPi Connect Signed-off-by: Nicolai Buchwitz --- .../revpi-connect-dt-blob-overlay.dts | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts index 1dec30a004b3e0..fea6e17ea6c7c9 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-dt-blob-overlay.dts @@ -1409,6 +1409,88 @@ }; // pin_defines }; // pins + pins_cm4s { // Pi 4 CM4S + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p4 { function = "output"; termination = "no_pulling"; startup_state = "inactive"; }; // RevPi Connect GPIO Mux + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Connect SPI0 CLK + pin@p46 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "internal"; + number = <49>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <46>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "absent"; + }; + pin_define@WL_ON { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + pins_pi0 { // Pi zero pin_config { pin@default { From 8efd0b6d88dd2682a50d314acde738f90602730d Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Wed, 9 Feb 2022 19:14:55 +0100 Subject: [PATCH 075/183] ARM: dts: Add dt-blob cm4s support for RevPi Compact Signed-off-by: Nicolai Buchwitz --- .../revpi-compact-dt-blob-overlay.dts | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts index 27a12c41fc5726..21e6a54b2eed55 100644 --- a/arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-compact-dt-blob-overlay.dts @@ -1439,6 +1439,118 @@ }; // pin_defines }; // pins + pins_cm4s { // Pi 4 CM4S + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p0 { function = "input"; termination = "pull_up"; }; // RevPi Compact CAMERA_0_SDA_PIN + pin@p1 { function = "input"; termination = "pull_up"; }; // RevPi Compact CAMERA_0_SCL_PIN + pin@p5 { function = "output"; termination = "no_pulling"; }; // RevPi Compact CAMERA_0_LED + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p21 { function = "output"; termination = "no_pulling"; }; // RevPi Compact CAMERA_0_SHUTDOWN + pin@p38 { function = "uart0"; termination = "no_pulling"; }; // RevPi Compact UART0 RTS + pin@p39 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "inactive"; }; // RevPi Compact UART0 TERM + pin@p42 { function = "spi2"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // RevPi Compact SPI2 CLK + pin@p44 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // RevPi Compact AIN CS + pin@p46 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "internal"; + number = <49>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <46>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "absent"; + }; + pin_define@WL_ON { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + }; // pin_defines + }; // pins + pins_pi0 { // Pi zero pin_config { pin@default { From 8d1cd8eea825d0042b80a948ad9500d404b0a15c Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Wed, 9 Feb 2022 19:17:35 +0100 Subject: [PATCH 076/183] ARM: dts: Add dt-blob cm4s support for RevPi Flat Signed-off-by: Nicolai Buchwitz --- .../overlays/revpi-flat-dt-blob-overlay.dts | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts index 2422a9d10f787e..46932b2c82bd4a 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-dt-blob-overlay.dts @@ -1750,6 +1750,91 @@ }; // pin_defines }; // pins + pins_cm4s { // Pi 4 CM4S + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p17 { function = "uart0"; termination = "no_pulling"; }; // RevPi Flat UART0 RTS + pin@p31 { function = "uart1"; termination = "no_pulling"; }; // RevPi Flat UART1 RTS + pin@p32 { function = "uart1"; termination = "no_pulling"; }; // RevPi Flat UART1 TX + pin@p33 { function = "uart1"; termination = "no_pulling"; }; // RevPi Flat UART1 RX + pin@p44 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // RevPi Flat AIN CS + pin@p46 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "internal"; + number = <49>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <46>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "absent"; + }; + pin_define@WL_ON { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + pins_pi0 { // Pi zero pin_config { pin@default { From 47a1e90b4c7b3c79b3c8d67739a7637ee4498ebf Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 18 Sep 2020 11:55:27 +0200 Subject: [PATCH 077/183] dts/revpi-*: make kunbus compatible highest priority As the compatibles should be listed from specific to more general the kunbus, compatible should be listed first. This is the only way to match it with udev rules or to write a board/platform driver only for the matching board. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-compact-overlay.dts | 4 ++-- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 4 ++-- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 4 ++-- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts index fa8eb216c81d27..3e5b857f26983c 100644 --- a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts @@ -16,8 +16,8 @@ fragment@0 { target-path = "/"; __overlay__ { - compatible = "brcm,bcm2837", "brcm,bcm2836", - "kunbus,revpi-compact"; + compatible = "kunbus,revpi-compact", "brcm,bcm2837", + "brcm,bcm2836"; aout_vref: fixedregulator_2v5x4 { compatible = "regulator-fixed"; diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index a9ed411aca911d..dece4eaf70f5b3 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -16,8 +16,8 @@ fragment@0 { target-path = "/"; __overlay__ { - compatible = "brcm,bcm2837", "brcm,bcm2836", - "kunbus,revpi-connect"; + compatible = "kunbus,revpi-connect", "brcm,bcm2837", + "brcm,bcm2836"; leds { compatible = "gpio-leds"; diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 9bdffc25d4bdff..e4b8d8577ae51f 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -16,8 +16,8 @@ fragment@0 { target-path = "/"; __overlay__ { - compatible = "brcm,bcm2837", "brcm,bcm2836", - "brcm,bcm2835", "kunbus,revpi-core"; + compatible = "kunbus,revpi-core", "brcm,bcm2837", + "brcm,bcm2836", "brcm,bcm2835"; leds { compatible = "gpio-leds"; diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 19982b7df8b707..e3619aefdbb885 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -16,8 +16,8 @@ fragment@0 { target-path = "/"; __overlay__ { - compatible = "brcm,bcm2837", "brcm,bcm2836", - "kunbus,revpi-flat"; + compatible = "kunbus,revpi-flat", "brcm,bcm2837", + "brcm,bcm2836"; aout_vref: fixedregulator_2v5x4 { compatible = "regulator-fixed"; From a8ab66fb59fe5b2d6a9f5bd53e9dadca5b8f0782 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 22 Apr 2021 16:57:08 +0200 Subject: [PATCH 078/183] dts/revpi-core: Add KSZ8851 reset delay workaround The KSZ8851 on the RevPi Core has a circuit which will keep it for around 80ms in the reset when the reset gpio is released. The driver needs to wait this time after the reset gpio is released. The driver has no support for this. So we use a regulator with the approprieate delays as workaround. The startup-delay is set to 80ms. So The driver should wait for at least 80ms after enabling the regulator. The off-on-delay is set to 11.5ms. The data sheet of the KSZ8851 says it needs a 10ms reset and the circuit adds 1.5ms to drain the capacitor. Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-core-overlay.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index e4b8d8577ae51f..f59d365e87ad05 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -19,6 +19,21 @@ compatible = "kunbus,revpi-core", "brcm,bcm2837", "brcm,bcm2836", "brcm,bcm2835"; + /* + The reset of the KSZ8851 used for the pibridge has a + circuit, which keeps it pulled for up to 80ms. To + workaroud this issue, a regulator is used. The + circuit implements a reset instead of a n_reset. + */ + pb_rst: regulator_pbrst { + compatible = "regulator-fixed"; + regulator-name = "pb_rst"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio 40 GPIO_ACTIVE_LOW>; + startup-delay-us = <80000>; + }; + leds { compatible = "gpio-leds"; power_red { @@ -127,6 +142,7 @@ reg = <0>; spi-max-frequency = <20000000>; /* <= 40 MHz */ interrupts = <0x80000000>; /* not connected */ + vdd-supply = <&pb_rst>; status = "okay"; }; @@ -136,7 +152,7 @@ reg = <1>; spi-max-frequency = <20000000>; /* <= 40 MHz */ interrupts = <0x80000000>; /* not connected */ - reset-gpios = <&gpio 40 GPIO_ACTIVE_LOW>; + vdd-supply = <&pb_rst>; status = "okay"; }; }; From 41d5cd4354eec39dca98106a26760d696f3856a6 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 23 Apr 2021 08:59:38 +0200 Subject: [PATCH 079/183] dts/revpi-connect: Add KSZ8851 reset delay workaround The KSZ8851 on the RevPi Connect has a circuit which will keep it for around 80ms in the reset when the reset gpio is released. The driver needs to wait this time after the reset gpio is released. The driver has no support for this. So we use a regulator with the approprieate delays as workaround. The startup-delay is set to 80ms. So The driver should wait for at least 80ms after enabling the regulator. The off-on-delay is set to 11.5ms. The data sheet of the KSZ8851 says it needs a 10ms reset and the circuit adds 1.5ms to drain the capacitor. Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-connect-overlay.dts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index dece4eaf70f5b3..b5ddbbffefdfa1 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -19,6 +19,21 @@ compatible = "kunbus,revpi-connect", "brcm,bcm2837", "brcm,bcm2836"; + /* + The reset of the KSZ8851 used for the pibridge has a + circuit, which keeps it pulled for up to 80ms. To + workaroud this issue, a regulator is used. The + circuit implements a reset instead of a n_reset. + */ + pb_rst: regulator_pbrst { + compatible = "regulator-fixed"; + regulator-name = "pb_rst"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio 40 GPIO_ACTIVE_LOW>; + startup-delay-us = <80000>; + }; + leds { compatible = "gpio-leds"; power_red { @@ -151,7 +166,7 @@ interrupt-parent = <&gpio>; #interrupt-cells = <2>; interrupts = <8 IRQ_TYPE_LEVEL_LOW>; - reset-gpios = <&gpio 40 GPIO_ACTIVE_LOW>; + vdd-supply = <&pb_rst>; status = "okay"; }; }; From 053a87b7f5ab8aee74ad697077f5457e3747224d Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 14 Aug 2020 14:01:10 +0200 Subject: [PATCH 080/183] dts/revpi-flat: set led default-trigger to none The linux,default-trigger should be set to a desired trigger, which might be heartbeat or timer for example. The name of the led is no valide trigger. Setting the property to "none" and keep it for documentation purpose. Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-flat-overlay.dts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index e3619aefdbb885..ec2afbdf971c09 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -47,47 +47,47 @@ compatible = "gpio-leds"; power_red { gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "power_red"; + linux,default-trigger = "none"; }; a_green { gpios = <&expander 0 GPIO_ACTIVE_LOW>; - linux,default-trigger = "a_green"; + linux,default-trigger = "none"; }; a_red { gpios = <&expander 1 GPIO_ACTIVE_LOW>; - linux,default-trigger = "a_red"; + linux,default-trigger = "none"; }; b_green { gpios = <&expander 2 GPIO_ACTIVE_LOW>; - linux,default-trigger = "b_green"; + linux,default-trigger = "none"; }; b_red { gpios = <&expander 3 GPIO_ACTIVE_LOW>; - linux,default-trigger = "b_red"; + linux,default-trigger = "none"; }; c_green { gpios = <&expander 4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "c_green"; + linux,default-trigger = "none"; }; c_red { gpios = <&expander 5 GPIO_ACTIVE_LOW>; - linux,default-trigger = "c_red"; + linux,default-trigger = "none"; }; d_green { gpios = <&expander 6 GPIO_ACTIVE_LOW>; - linux,default-trigger = "d_green"; + linux,default-trigger = "none"; }; d_red { gpios = <&expander 7 GPIO_ACTIVE_LOW>; - linux,default-trigger = "d_red"; + linux,default-trigger = "none"; }; e_green { gpios = <&expander 8 GPIO_ACTIVE_LOW>; - linux,default-trigger = "e_green"; + linux,default-trigger = "none"; }; e_red { gpios = <&expander 9 GPIO_ACTIVE_LOW>; - linux,default-trigger = "e_red"; + linux,default-trigger = "none"; }; act { status = "disabled"; From 8e772c8b322e6c37c0b339853f24cf8b99251d2c Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Tue, 18 Aug 2020 17:04:19 +0200 Subject: [PATCH 081/183] dts/revpi-flat: Add top button support There is a button on the top of some variantes of the KUNBUS Flat. This button is free to use by the user. Configure this button as gpio-key with the keycode KEY_UNKNOWN (240). Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index ec2afbdf971c09..4f53c2743ed993 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -7,6 +7,7 @@ /dts-v1/; /plugin/; #include +#include #include #include @@ -93,6 +94,16 @@ status = "disabled"; }; }; + + gpio-keys { + compatible = "gpio-keys"; + + user-event { + label = "User event key"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; }; }; From 697e3a1c17fd12ac2d4688b0d57d16a75b430f9c Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 12 Aug 2020 13:12:01 +0200 Subject: [PATCH 082/183] dts/revpi-flat: set max-frequency for sdhci The muRata LBEE5HY1MW wifi module is connected to the sdhci controller. The modules max freqency in data transfer mode is 25MHz (SDR). It should be able to run at up to 50MHz (DDR). But with freqencys > 27,777 MHz the device can't be probed: mmc1: queuing unknown CIS tuple 0x80 (2 bytes) mmc1: queuing unknown CIS tuple 0x80 (3 bytes) mmc1: queuing unknown CIS tuple 0x80 (3 bytes) mmc1: queuing unknown CIS tuple 0x80 (7 bytes) mmc1: queuing unknown CIS tuple 0x80 (6 bytes) mmc0: sdhost-bcm2835 loaded - DMA enabled (>1) mmc1: error -110 whilst initialising SDIO card This might be a Problem with the bottom to top board connector. The base parent clock is 250MHz so the following frequencies are possible: 125MHz, 83.3MHz, 62.5MHz, 50MHz, 41.6MHz, 35.7MHz, 31.3MHz, 27.8MHZ, 25MHz, ... So we limit the mmc max-freqeuency to 28MHz. The MMC driver will then take the next slower freq (27.8MHz). The brcm,overclock-50 property is not suitable for this. It only effects overclocking with > 50MHz correctly. The correct way to limit the clock is to set the max-frequency of the mmc-host. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 4f53c2743ed993..c861c795aeeab6 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -338,7 +338,7 @@ status = "okay"; bus-width = <4>; non-removable; - brcm,overclock-50 = <20>; + max-frequency = <28000000>; wlan0: wifi@1 { reg = <1>; From 593e7befb42cbe6cd53f3e3772eda4b47e551c3e Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 7 Sep 2020 15:59:26 +0200 Subject: [PATCH 083/183] dts/revpi-flat: Change LED names to match the casing The schematics uses other names for the LEDs as the casing does. Use the names from the casing. Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-flat-overlay.dts | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index c861c795aeeab6..09de5055591c41 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -50,43 +50,43 @@ gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; linux,default-trigger = "none"; }; - a_green { + a1_green { gpios = <&expander 0 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - a_red { + a1_red { gpios = <&expander 1 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - b_green { + a2_green { gpios = <&expander 2 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - b_red { + a2_red { gpios = <&expander 3 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - c_green { + a3_green { gpios = <&expander 4 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - c_red { + a3_red { gpios = <&expander 5 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - d_green { + a4_green { gpios = <&expander 6 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - d_red { + a4_red { gpios = <&expander 7 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - e_green { + a5_green { gpios = <&expander 8 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; - e_red { + a5_red { gpios = <&expander 9 GPIO_ACTIVE_LOW>; linux,default-trigger = "none"; }; From 4eeec91dd9f786e6e022737bbb4d29e534fe954c Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 9 Sep 2020 11:01:15 +0200 Subject: [PATCH 084/183] dts/revpi-flat: wdt: remove always-running Give the userspace-application the full control over the watchdog. The application needs to trigger it and make sure it is allways triggered. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 09de5055591c41..e12ffafc1a3d5b 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -41,7 +41,6 @@ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; hw_algo = "toggle"; hw_margin_ms = <55000>; /* <= 60 s */ - always-running; }; leds { From 42bd03bdbe18841caf73b73ab8e68e5f20c4c779 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 9 Sep 2020 11:18:43 +0200 Subject: [PATCH 085/183] dts/revpi-flat: connect the watchdog pins to the device Connect the watchdog gpios to the device. This technically not needed as the pincontrol will set them regardles. But now it is clear that the pins are used for this device. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index e12ffafc1a3d5b..9fee3d7d83e1de 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -37,6 +37,8 @@ }; watchdog: watchdog { + pinctrl-names = "default"; + pinctrl-0 = <&watchdog_gpio4>; compatible = "linux,wdt-gpio"; /* max6370 */ gpios = <&gpio 5 GPIO_ACTIVE_LOW>; hw_algo = "toggle"; @@ -146,7 +148,7 @@ brcm,function = ; brcm,pull = ; }; - watchdog_pins { + watchdog_gpio4: watchdog_pins { /* enable ping */ brcm,pins = <4 5>; brcm,function = ; From 8af91dd8db5d454d35507680623dbb97314ff2a1 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Wed, 7 Oct 2020 10:49:57 +0200 Subject: [PATCH 086/183] dts/revpi-flat: remove already defined labels The application of the device tree overlay to the generic raspberry device-tree failed if applied via the command dtoverlay. The reason is that some node labels that were already defined in the generic device tree, were redefined by the flat-overlay. While the bootloader seems to tolerate those duplicates (i.e. if the overlay is applied by setting dtoverlay=revpi-flat in /boot/config.txt), dtoverlay failes with the error message "* Failed to apply overlay '0_revpi-flat' (kernel)" To fix this remove the duplicate labels which are: 2c0_gpio44: already defined in arch/arm/boot/dts/bcm283x.dtsi i2c1_gpio2: already defined in arch/arm/boot/dts/bcm283x.dtsi emmc_gpio34: already defined in arch/arm/boot/dts/bcm2710-rpi-cm3.dts spi0_cs_pins: already defined in arch/arm/boot/dts/bcm2710-rpi-cm3.dts Signed-off-by: Lino Sanfilippo Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-flat-overlay.dts | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 9fee3d7d83e1de..69fd2dd9442329 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -111,30 +111,12 @@ fragment@1 { target = <&gpio>; __overlay__ { - i2c0_gpio44: i2c0_gpio44 { - brcm,pins = <44 45>; - brcm,function = ; - }; - i2c1_gpio2: i2c1_gpio2 { - brcm,pins = <2 3>; - brcm,function = ; - }; - spi0_cs_pins: spi0_cs_pins { + spi0_cs_pins { /* aout ain mbus tpm */ brcm,pins = <8 7 6 30>; brcm,function = ; brcm,pull = ; }; - emmc_gpio34: emmc_gpio34 { - brcm,pins = <34 35 36 37 38 39>; - brcm,function = ; - brcm,pull = ; - }; tpm_pins { /* irq reset */ brcm,pins = <0 1>; From 95de726a76db1019c11af75fd82b5107e234cbfb Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Wed, 20 Jan 2021 17:24:26 +0100 Subject: [PATCH 087/183] dts/revpi-flat: Correct GPIO nr for TPM irq The TPM uses GPIO 1 for interrupts, not GPIO 2. Fix this. Signed-off-by: Lino Sanfilippo Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 69fd2dd9442329..5034e77ff85f88 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -253,7 +253,7 @@ spi-max-frequency = <1000000>; /* <= 43 MHz */ interrupt-parent = <&gpio>; #interrupt-cells = <2>; - interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupts = <1 IRQ_TYPE_LEVEL_LOW>; status = "okay"; }; }; From af4d20183983c67cdcfa8cc409517609b6be5ed3 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Wed, 20 Jan 2021 17:30:30 +0100 Subject: [PATCH 088/183] dts/revpi-flat: correct pin settings for GPIO 0 and 1 GPIO 0 is currently configured as "in" while GPIO 1 is configured as "out". However GPIO 0 is supposted to be used for TPM reset and thus has to be "out" while GPIO 1 is supposed to be used as the TPM irq and thus has to be "in". Fix this. Signed-off-by: Lino Sanfilippo Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 5034e77ff85f88..070b6b4dd64852 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -120,8 +120,8 @@ tpm_pins { /* irq reset */ brcm,pins = <0 1>; - brcm,function = ; + brcm,function = ; brcm,pull = ; }; mbus_pins { From 0470d52595f45a21f38b71b02aaf4808f40e8576 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 18 Sep 2020 16:47:10 +0200 Subject: [PATCH 089/183] dts/recpi-flat: Set default trigger for leds Make sure the leds use the led triggers which are provided by the piControl module as default. Signed-off-by: Lino Sanfilippo Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-flat-overlay.dts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 070b6b4dd64852..d8c6f349ee3751 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -49,47 +49,47 @@ compatible = "gpio-leds"; power_red { gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; - linux,default-trigger = "none"; + linux,default-trigger = "power_red"; }; a1_green { gpios = <&expander 0 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a1_green"; }; a1_red { gpios = <&expander 1 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a1_red"; }; a2_green { gpios = <&expander 2 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a2_green"; }; a2_red { gpios = <&expander 3 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a2_red"; }; a3_green { gpios = <&expander 4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a3_green"; }; a3_red { gpios = <&expander 5 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a3_red"; }; a4_green { gpios = <&expander 6 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a4_green"; }; a4_red { gpios = <&expander 7 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a4_red"; }; a5_green { gpios = <&expander 8 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a5_green"; }; a5_red { gpios = <&expander 9 GPIO_ACTIVE_LOW>; - linux,default-trigger = "none"; + linux,default-trigger = "a5_red"; }; act { status = "disabled"; From 318a7409c179ff2c9a7e1e657ad1fd934b3931aa Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 25 Jan 2022 00:48:42 +0100 Subject: [PATCH 090/183] dts/revpi-core: pull down sniff pin There is no pull-down resistor for the PB_SNIFF 2a (gpio28). So the pin is floating if no device is connected. During device detection piControl outputs a HIGH signal for 9ms and then configures the gpio as input again. The signal will then read as HIGH for some time after this as there is no pull-down attached. So when piControl actually reads the pin to determine if any module is connected to the left side it will falsely detect a device and then start the device configuration procedure. This results in an error due to the missing response of the falsely detected device. Fix this by configuring the internal (weak) pull down of the pin controller in the dt overlay. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index f59d365e87ad05..c679c996f1925e 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -66,6 +66,9 @@ fragment@1 { target = <&gpio>; __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&sniff_a_pins>; + spi0_pins { /* miso mosi clock */ brcm,pins = <37 38 39>; @@ -89,6 +92,12 @@ brcm,function = ; brcm,pull = ; }; + sniff_a_pins: pb_sniff_a_pins { + /* A2 */ + brcm,pins = <28>; + brcm,function = ; + brcm,pull = ; + }; }; }; From 86ae1b4b2f119504f6ee78855e809f4cf28d890d Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 15 Feb 2022 17:27:51 +0100 Subject: [PATCH 091/183] dts/revpi-*: correct name of mmc activity node With commit fc71d8df5807 the name of the node for the MMC activity LED has changed from "act" to "led-act". Adjust all revpi overlays to the new name. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-compact-overlay.dts | 2 +- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 2 +- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 2 +- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts index 3e5b857f26983c..e17fa5f21543b4 100644 --- a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts @@ -87,7 +87,7 @@ gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; linux,default-trigger = "a2_red"; }; - act { + led-act { status = "disabled"; }; }; diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index b5ddbbffefdfa1..9536a98ac76c71 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -64,7 +64,7 @@ gpios = <&gpio 3 GPIO_ACTIVE_HIGH>; linux,default-trigger = "a3_red"; }; - act { + led-act { status = "disabled"; }; }; diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index c679c996f1925e..1ae38f42acb023 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -56,7 +56,7 @@ gpios = <&gpio 33 GPIO_ACTIVE_HIGH>; linux,default-trigger = "a2_red"; }; - act { + led-act { status = "disabled"; }; }; diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index d8c6f349ee3751..2f5ba637b4619c 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -91,7 +91,7 @@ gpios = <&expander 9 GPIO_ACTIVE_LOW>; linux,default-trigger = "a5_red"; }; - act { + led-act { status = "disabled"; }; }; From fe0703890747bfa461ef241a6ed3379590b60e19 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 4 Feb 2022 13:45:50 +0100 Subject: [PATCH 092/183] dts/revpi-connect: add node for pibridge device Add a new node for a kunbus pibridge device that includes a list of the sniff gpios as well as the gpios X2DI, X2DO and WDTRIGGER. With this device tree entry the piControl module is able to retrieve the sniff gpios without having to know which gpio controller is in use. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 9536a98ac76c71..acc66d4dba7493 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -19,6 +19,16 @@ compatible = "kunbus,revpi-connect", "brcm,bcm2837", "brcm,bcm2836"; + pibridge { + compatible = "kunbus,pibridge"; + /* X2DI, X2DO, WDTrigger */ + connect-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>, + <&gpio 1 GPIO_ACTIVE_HIGH>, + <&gpio 42 GPIO_ACTIVE_HIGH>; + /* Sniff pins 1A and 2A */ + left-sniff-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>, + <&gpio 29 GPIO_ACTIVE_HIGH>; + }; /* The reset of the KSZ8851 used for the pibridge has a circuit, which keeps it pulled for up to 80ms. To From 7e22a582044357b7474d0514f82ea80a595a717c Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 31 Jan 2022 13:58:52 +0100 Subject: [PATCH 093/183] dts/revpi-core: add node for pibridge device Add a new node for a kunbus pibridge device that includes a list of the sniff gpios. With this device tree entry the piControl module is able to retrieve the sniff gpios without having to know which gpio controller is in use. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 1ae38f42acb023..f64832e03fb758 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -19,6 +19,15 @@ compatible = "kunbus,revpi-core", "brcm,bcm2837", "brcm,bcm2836", "brcm,bcm2835"; + pibridge { + compatible = "kunbus,pibridge"; + /* Sniff pins 1A and 2A */ + left-sniff-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>, + <&gpio 28 GPIO_ACTIVE_HIGH>; + /* Sniff pins 1B and 2B */ + right-sniff-gpios = <&gpio 43 GPIO_ACTIVE_HIGH>, + <&gpio 29 GPIO_ACTIVE_HIGH>; + }; /* The reset of the KSZ8851 used for the pibridge has a circuit, which keeps it pulled for up to 80ms. To From 17b5249f08f404a540640968727740303fdffee8 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 21 Feb 2022 12:52:04 +0100 Subject: [PATCH 094/183] dts/compact: assign unused pinmux The pinmux eth1_int_pins, ain_mux_pins and leds_pins are defined but not used. Assign them to the proper device nodes to make them effective. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-compact-overlay.dts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts index e17fa5f21543b4..ced57697532de4 100644 --- a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts @@ -37,6 +37,8 @@ ain_mux: ain_mux { compatible = "gpio-mux"; + pinctrl-names = "default"; + pinctrl-0 = <&ain_mux_pins>; #mux-control-cells = <0>; mux-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>, <&gpio 12 GPIO_ACTIVE_HIGH>, @@ -67,6 +69,8 @@ leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&leds_pins>; power_red { gpios = <&gpio 35 GPIO_ACTIVE_HIGH>; linux,default-trigger = "power_red"; @@ -103,7 +107,7 @@ brcm,function = ; brcm,pull = ; }; - eth1_int_pins { + eth1_int_pins: eth1_int_pins { brcm,pins = <18>; brcm,function = ; brcm,pull = ; @@ -120,7 +124,7 @@ brcm,function = ; brcm,pull = ; }; - ain_mux_pins { + ain_mux_pins: ain_mux_pins { /* sw_a0 sw_a1 sw_a2 cu_sw_en */ brcm,pins = <6 12 13 16>; brcm,function = ; @@ -140,7 +144,7 @@ BCM2835_FSEL_GPIO_IN>; brcm,pull = ; }; - leds_pins { + leds_pins: leds_pins { /* power_red a1_green a1_red a2_green a2_red */ brcm,pins = <35 30 34 32 33>; brcm,function = ; @@ -203,6 +207,8 @@ eth1: ethernet@2 { compatible = "micrel,ks8851"; + pinctrl-names = "default"; + pinctrl-0 = <ð1_int_pins>; reg = <2>; /* * RevPi Compact achieved 28.5 MHz in the lab, From c0621f5763e7dda87241d6bcc8a52a97959ccd59 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 21 Feb 2022 14:02:42 +0100 Subject: [PATCH 095/183] dts/connect: assign unused pinmux The pinmux eth2_int_pins, eth2_reset_pins and conbridg_int_pins are defined but not used. Assign them to the proper device nodes to make them effective. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts | 2 ++ arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts b/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts index 41c75f0a6c12bc..8f6183a209f7e0 100644 --- a/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts @@ -37,6 +37,8 @@ can@0 { compatible = "holt,hi3110"; + pinctrl-names = "default"; + pinctrl-0 = <&conbridge_int_pins>; reg = <0>; spi-max-frequency = <10000000>; /* <= 20 MHz */ clocks = <&can0_osc>; diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index acc66d4dba7493..87e9d07af4f823 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -37,6 +37,8 @@ */ pb_rst: regulator_pbrst { compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <ð2_reset_pins>; regulator-name = "pb_rst"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; @@ -95,17 +97,17 @@ brcm,function = ; brcm,pull = ; }; - eth2_int_pins { + eth2_int_pins: eth2_int_pins { brcm,pins = <8>; brcm,function = ; brcm,pull = ; }; - eth2_reset_pins { + eth2_reset_pins: eth2_reset_pins { brcm,pins = <40>; brcm,function = ; brcm,pull = ; }; - conbridge_int_pins { + conbridge_int_pins: conbridge_int_pins { brcm,pins = <28>; brcm,function = ; brcm,pull = ; @@ -171,6 +173,8 @@ pileft: ethernet@1 { /* PiBridge Ethernet left */ compatible = "micrel,ks8851"; + pinctrl-names = "default"; + pinctrl-0 = <ð2_int_pins>; reg = <1>; spi-max-frequency = <10000000>; /* <= 40 MHz */ interrupt-parent = <&gpio>; From ed4e2fdc7a9b7258fc2ca2687d1de00573a1bd99 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 21 Feb 2022 17:25:14 +0100 Subject: [PATCH 096/183] dts/core: assign unused pinmux The pinmux eth1_2_reset_pins is defined but not used. Assign it to the proper device node to make it effective. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index f64832e03fb758..cb529db9506e90 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -36,6 +36,8 @@ */ pb_rst: regulator_pbrst { compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <ð1_2_reset_pins>; regulator-name = "pb_rst"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; @@ -89,7 +91,7 @@ brcm,function = ; brcm,pull = ; }; - eth1_2_reset_pins { + eth1_2_reset_pins: eth1_2_reset_pins { /* resets both chips */ brcm,pins = <40>; brcm,function = ; From a9b58c119009ba8ce0bd31810a62e1a179c8282e Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 21 Feb 2022 19:22:20 +0100 Subject: [PATCH 097/183] dts/flat: assign unused pinmux The pinmux tpm_pins, mbus_pins, button_pins and relais_pins are defined but not used. Assign them to the proper device nodes to make them effective. While doing this also fix the comment for the tpm pins. Signed-off-by: Lino Sanfilippo --- .../boot/dts/overlays/revpi-flat-overlay.dts | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 2f5ba637b4619c..f331dcdeec1afe 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -98,7 +98,8 @@ gpio-keys { compatible = "gpio-keys"; - + pinctrl-names = "default"; + pinctrl-0 = <&button_pins>; user-event { label = "User event key"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; @@ -111,20 +112,23 @@ fragment@1 { target = <&gpio>; __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&relais_pins>; + spi0_cs_pins { /* aout ain mbus tpm */ brcm,pins = <8 7 6 30>; brcm,function = ; brcm,pull = ; }; - tpm_pins { - /* irq reset */ + tpm_pins: tpm_pins { + /* reset irq */ brcm,pins = <0 1>; brcm,function = ; brcm,pull = ; }; - mbus_pins { + mbus_pins: mbus_pins { /* irq */ brcm,pins = <21>; brcm,function = ; @@ -136,12 +140,12 @@ brcm,function = ; brcm,pull = ; }; - button_pins { + button_pins: button_pins { brcm,pins = <13>; brcm,function = ; brcm,pull = ; }; - relais_pins { + relais_pins: relais_pins { brcm,pins = <19>; brcm,function = ; brcm,pull = ; @@ -239,6 +243,8 @@ mbus: rf@2 { compatible = "spidev", "ti,cc1101"; + pinctrl-names = "default"; + pinctrl-0 = <&mbus_pins>; reg = <2>; spi-max-frequency = <5000000>; /* <= 6.5 MHz */ interrupt-parent = <&gpio>; @@ -249,6 +255,8 @@ tpm: tpm@3 { compatible = "infineon,slb9670"; + pinctrl-names = "default"; + pinctrl-0 = <&tpm_pins>; reg = <3>; spi-max-frequency = <1000000>; /* <= 43 MHz */ interrupt-parent = <&gpio>; From 50bca9646c9f36069a01da6fa42533660a766c76 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 8 Mar 2022 16:58:16 +0100 Subject: [PATCH 098/183] arm: dts: flat: add reset-gpio property to tpm node Add the property "reset-gpio" to the tpm node that specifies the gpio which is connected to the reset pin of the tpm chip. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index f331dcdeec1afe..e912f1e08075d8 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -259,6 +259,7 @@ pinctrl-0 = <&tpm_pins>; reg = <3>; spi-max-frequency = <1000000>; /* <= 43 MHz */ + reset-gpio = <&gpio 0 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio>; #interrupt-cells = <2>; interrupts = <1 IRQ_TYPE_LEVEL_LOW>; From c60cf300015696d1a366229001e2acb67914c160 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Mon, 28 Mar 2022 11:43:43 +0200 Subject: [PATCH 099/183] arm: dts: revpi-con-can: Move pincontrol references for can0 Remove pincontrol reference for <&conbridge_int_pins> from RevPi Connect overlay and move to con can overlay. The conbridge_int_pins was defined in revpi-connect-overlay.dts and therefore not exported to the symbols table. This results in the following error when the overlay is loaded: OF: resolver: node label 'conbridge_int_pins' not found in live devicetree symbols table Fixes commit 164a3d73bae2a Signed-off-by: Nicolai Buchwitz --- arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts | 12 ++++++++++++ arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 5 ----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts b/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts index 8f6183a209f7e0..7209e42adc7267 100644 --- a/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-con-can-overlay.dts @@ -7,6 +7,7 @@ /dts-v1/; /plugin/; #include +#include /{ compatible = "brcm,bcm2837"; @@ -30,6 +31,17 @@ }; fragment@2 { + target = <&gpio>; + __overlay__ { + conbridge_int_pins: conbridge_int_pins { + brcm,pins = <28>; + brcm,function = ; + brcm,pull = ; + }; + }; + }; + + fragment@3 { target = <&spi0>; __overlay__ { #address-cells = <1>; diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 87e9d07af4f823..48684a0b7b5004 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -107,11 +107,6 @@ brcm,function = ; brcm,pull = ; }; - conbridge_int_pins: conbridge_int_pins { - brcm,pins = <28>; - brcm,function = ; - brcm,pull = ; - }; i2c1 { /* sda scl */ brcm,pins = <44 45>; From f14b22086adfceca36ed260997d4b4e55275abfb Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 1 Apr 2022 11:09:07 +0200 Subject: [PATCH 100/183] dts/connect: Fix pibridge rs485 pulls The TX pin doesn't need any pull as it is driven by the controller. It makes more sense to have a pull-up at the RX pin, as the default on the line should be 3v3. The RTS pin is again an output pin and doesn't need any pull. This also applies to the TERM gpio. Also set status = "okay" in the rs485 node to make clear the uart0 is enabled. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 48684a0b7b5004..c5f2b44aa0eef7 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -120,10 +120,10 @@ BCM2835_FSEL_ALT0 BCM2835_FSEL_ALT3 BCM2835_FSEL_GPIO_OUT>; - brcm,pull = ; + brcm,pull = ; }; }; }; @@ -230,9 +230,10 @@ fragment@6 { target = <&uart0>; __overlay__ { - linux,rs485-enabled-at-boot-time; pinctrl-names = "default"; pinctrl-0 = <&rs485_pins>; + linux,rs485-enabled-at-boot-time; + status = "okay"; }; }; From d9ddafa09b74bd869d7acdb6e7e40e359d452164 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 1 Apr 2022 11:16:50 +0200 Subject: [PATCH 101/183] dts/connect: Assign missing unused pinmux Add the missing pinmuxes which where missed by commit 164a3d73bae2 ("dts/connect: assign unused pinmux"). Signed-off-by: Philipp Rosenberger --- .../dts/overlays/revpi-connect-overlay.dts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index c5f2b44aa0eef7..90e272f6e00749 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -48,6 +48,8 @@ leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins>; power_red { gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; linux,default-trigger = "power_red"; @@ -86,13 +88,13 @@ fragment@1 { target = <&gpio>; __overlay__ { - spi0_pins { + spi0_pins: spi0_pins { /* miso mosi clock */ brcm,pins = <37 38 39>; brcm,function = ; brcm,pull = ; }; - spi0_cs_pins { + spi0_cs_pins: spi0_cs_pins { brcm,pins = <36 35>; brcm,function = ; brcm,pull = ; @@ -107,12 +109,18 @@ brcm,function = ; brcm,pull = ; }; - i2c1 { + i2c1_pins: i2c1_pins { /* sda scl */ brcm,pins = <44 45>; brcm,function = ; brcm,pull = ; }; + led_pins: led_pins { + /* pwr_red a1_green a1_red a2_green a2_red a3_green a3_red */ + brcm,pins = <16 30 6 32 33 2 3>; + brcm,function = ; + brcm,pull = ; + }; rs485_pins: rs485_pins { /* tx rx rts term */ brcm,pins = <14 15 17 41>; @@ -131,6 +139,8 @@ fragment@2 { target = <&i2c1>; __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; #address-cells = <1>; #size-cells = <0>; status = "okay"; @@ -159,6 +169,8 @@ fragment@4 { target = <&spi0>; __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins &spi0_cs_pins>; cs-gpios = <&gpio 36 GPIO_ACTIVE_LOW>, <&gpio 35 GPIO_ACTIVE_LOW>; #address-cells = <1>; From 20b93d495d0221c2d5724180db2030f3d6e126cf Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Fri, 1 Apr 2022 13:31:35 +0200 Subject: [PATCH 102/183] dts/connect: Assign sniff and connect pins to the pibridge The sniff and connect (X2DI, X2DO, WDTrigger) pins should be muxed to a defined state. Assign these to the pinctrl (pibridge) node. Signed-off-by: Philipp Rosenberger --- .../dts/overlays/revpi-connect-overlay.dts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 90e272f6e00749..f5365ac32d108f 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -20,6 +20,9 @@ "brcm,bcm2836"; pibridge { + pinctrl-names = "default"; + pinctrl-0 = <&sniff_pins &connect_pins>; + compatible = "kunbus,pibridge"; /* X2DI, X2DO, WDTrigger */ connect-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>, @@ -115,6 +118,23 @@ brcm,function = ; brcm,pull = ; }; + sniff_pins: sniff_pins { + /* 1A 2A + * Note: In the schematics they are wrongly named + * PB_SNIFF1b and PB_SNIFF2b + */ + brcm,pins = <43 29>; + brcm,function = ; + brcm,pull = ; + }; + connect_pins: connect_pins { + /* X2DI, X2DO, WDTrigger */ + brcm,pins = <0 1 42>; + brcm,function = ; + brcm,pull = ; + }; led_pins: led_pins { /* pwr_red a1_green a1_red a2_green a2_red a3_green a3_red */ brcm,pins = <16 30 6 32 33 2 3>; From a73e16777cd4ac409a082d3eaa61f7e5d081eee8 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 31 Mar 2022 18:51:15 +0200 Subject: [PATCH 103/183] dts/revpi-core: Assign missing unused pinmux Add the missing pinmuxes which where missed by commit 7558f113a990 ("dts/core: assign unused pinmux"). Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index cb529db9506e90..bd2172a90b33f8 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -80,13 +80,13 @@ pinctrl-names = "default"; pinctrl-0 = <&sniff_a_pins>; - spi0_pins { + spi0_pins: spi0_pins { /* miso mosi clock */ brcm,pins = <37 38 39>; brcm,function = ; brcm,pull = ; }; - spi0_cs_pins { + spi0_cs_pins: spi0_cs_pins { brcm,pins = <36 35>; brcm,function = ; brcm,pull = ; @@ -97,7 +97,7 @@ brcm,function = ; brcm,pull = ; }; - i2c1 { + i2c1_pins: i2c1_pins { /* sda scl */ brcm,pins = <44 45>; brcm,function = ; @@ -115,6 +115,8 @@ fragment@2 { target = <&i2c1>; __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; #address-cells = <1>; #size-cells = <0>; status = "okay"; @@ -150,6 +152,8 @@ fragment@5 { target = <&spi0>; __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&spi0_pins>, <&spi0_cs_pins>; cs-gpios = <&gpio 36 GPIO_ACTIVE_LOW>, <&gpio 35 GPIO_ACTIVE_LOW>; #address-cells = <1>; From 3736cd7c1172e8e4fda723f9c94b91f93bf3f756 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 31 Mar 2022 19:32:55 +0200 Subject: [PATCH 104/183] dts/revpi-core: Add rs485 (uart0) node We intend to use the RTS line of uart0 to control the DE/RE of the RS485 transceiver. So we need to set the linux,rs485-enabled-at-boot-time flag for uart0. We also need to mux the pins. Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-core-overlay.dts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index bd2172a90b33f8..c85541f97b34ac 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -109,6 +109,19 @@ brcm,function = ; brcm,pull = ; }; + rs485_pins: rs485_pins { + /* tx rx rts term */ + brcm,pins = <14 15 17 41>; + brcm,function = ; + brcm,pull = ; + + }; }; }; @@ -202,6 +215,16 @@ }; }; + fragment@7 { + target = <&uart0>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&rs485_pins>; + linux,rs485-enabled-at-boot-time; + status = "okay"; + }; + }; + __overrides__ { eth0_mac_hi = <ð0>,"local-mac-address:0"; eth0_mac_lo = <ð0>,"local-mac-address;4"; From 7f1b66e4804f2bdcb46d8014a40480af6542ba22 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 31 Mar 2022 19:43:45 +0200 Subject: [PATCH 105/183] dts/revpi-core: Add missing pinmux for the all sniff pins Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-core-overlay.dts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index c85541f97b34ac..a2ffa44200f58b 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -21,6 +21,9 @@ pibridge { compatible = "kunbus,pibridge"; + pinctrl-names = "default"; + pinctrl-0 = <&sniff_pins>; + /* Sniff pins 1A and 2A */ left-sniff-gpios = <&gpio 42 GPIO_ACTIVE_HIGH>, <&gpio 28 GPIO_ACTIVE_HIGH>; @@ -77,9 +80,6 @@ fragment@1 { target = <&gpio>; __overlay__ { - pinctrl-names = "default"; - pinctrl-0 = <&sniff_a_pins>; - spi0_pins: spi0_pins { /* miso mosi clock */ brcm,pins = <37 38 39>; @@ -103,11 +103,14 @@ brcm,function = ; brcm,pull = ; }; - sniff_a_pins: pb_sniff_a_pins { - /* A2 */ - brcm,pins = <28>; + sniff_pins: sniff_pins { + /* 1A 2A 1B 2B */ + brcm,pins = <42 28 43 29>; brcm,function = ; - brcm,pull = ; + brcm,pull = ; }; rs485_pins: rs485_pins { /* tx rx rts term */ From 1a38c0eef8db002eb0fb9261c6dd908ce38f20c0 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 31 Mar 2022 19:44:53 +0200 Subject: [PATCH 106/183] dts/revpi-core: Add pinmux for the led gpios Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index a2ffa44200f58b..77b53d48a40cab 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -50,6 +50,9 @@ leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins>; + power_red { gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; linux,default-trigger = "power_red"; @@ -112,6 +115,12 @@ BCM2835_PUD_OFF BCM2835_PUD_OFF>; }; + led_pins: led_pins { + /* pwr_red a1_green a1_red a2_green a2_red */ + brcm,pins = <16 30 6 32 33>; + brcm,function = ; + brcm,pull = ; + }; rs485_pins: rs485_pins { /* tx rx rts term */ brcm,pins = <14 15 17 41>; From fdd85afbfaa38208de5453af869ff6617a96ba3b Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Fri, 8 Apr 2022 10:49:42 +0200 Subject: [PATCH 107/183] Add the device tree overlay for Connect SE The Connect SE comes without ethernet interface on pibridge by comparing with Connect, so based on the device tree overlay of Connect the following related configurations can be removed: * Configuration of the regulator_pbrst * Configuration of spi pins for ksz8851, and pileft Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/Makefile | 2 + .../revpi-connect-se-dt-blob-overlay.dts | 7 +++ .../dts/overlays/revpi-connect-se-overlay.dts | 46 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-connect-se-dt-blob-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index 0e0282088c31a8..4fffaf7f6d4a74 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -198,6 +198,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-compact-dt-blob.dtbo \ revpi-connect.dtbo \ revpi-connect-dt-blob.dtbo \ + revpi-connect-se.dtbo \ + revpi-connect-se-dt-blob.dtbo \ revpi-con-can.dtbo \ revpi-flat.dtbo \ revpi-flat-dt-blob.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-connect-se-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-se-dt-blob-overlay.dts new file mode 100644 index 00000000000000..c7d1785ffb508d --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-connect-se-dt-blob-overlay.dts @@ -0,0 +1,7 @@ +/* + * Device tree blob overlay for Revolution Pi by KUNBUS + * + * RevPi Connect SE + */ + +#include "revpi-connect-dt-blob-overlay.dts" diff --git a/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts new file mode 100644 index 00000000000000..2b1f98b659776e --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts @@ -0,0 +1,46 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Connect SE + */ + +#include "revpi-connect-overlay.dts" + +/{ + compatible = "brcm,bcm2837"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "kunbus,revpi-connect-se", "brcm,bcm2837", + "brcm,bcm2836"; + /delete-node/ regulator_pbrst; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + spi0_cs_pins: spi0_cs_pins { + brcm,pins = <36>; + brcm,function = ; + brcm,pull = ; + }; + /delete-node/ eth2_int_pins; + /delete-node/ eth2_reset_pins; + }; + }; + + fragment@4 { + target = <&spi0>; + __overlay__ { + cs-gpios = <&gpio 36 GPIO_ACTIVE_LOW>; + /delete-node/ ethernet@1; + }; + }; + + __overrides__ { + /delete-property/ pileft_mac_hi; + /delete-property/ pileft_mac_lo; + }; +}; From 5b2e7c0dcb61c86ddcea8c403d435aa9df9ce741 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Tue, 26 Apr 2022 09:28:47 +0200 Subject: [PATCH 108/183] dts/connect: Use own fragments to modify existing pinmuxes If we redefine muxes which are already defined in the devicetree we might get errors when loading the overlay at runtime. There is no usefull error message. It just says the loding of the overlay faild. The bootloader seems not so picky and loads the overlay. We move each pinmux which is already defined in bcm2708-rpi-cm.dts, bcm2710-rpi-cm3.dts or bcm2711-rpi-cm4s.dts, to its own fragment. And we modify the already defined pinmux instead of creating a new one. Signed-off-by: Philipp Rosenberger --- .../dts/overlays/revpi-connect-overlay.dts | 54 +++++++++++-------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index f5365ac32d108f..39756694412725 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -91,17 +91,6 @@ fragment@1 { target = <&gpio>; __overlay__ { - spi0_pins: spi0_pins { - /* miso mosi clock */ - brcm,pins = <37 38 39>; - brcm,function = ; - brcm,pull = ; - }; - spi0_cs_pins: spi0_cs_pins { - brcm,pins = <36 35>; - brcm,function = ; - brcm,pull = ; - }; eth2_int_pins: eth2_int_pins { brcm,pins = <8>; brcm,function = ; @@ -112,12 +101,6 @@ brcm,function = ; brcm,pull = ; }; - i2c1_pins: i2c1_pins { - /* sda scl */ - brcm,pins = <44 45>; - brcm,function = ; - brcm,pull = ; - }; sniff_pins: sniff_pins { /* 1A 2A * Note: In the schematics they are wrongly named @@ -157,6 +140,16 @@ }; fragment@2 { + target = <&i2c1_pins>; + __overlay__ { + /* sda scl */ + brcm,pins = <44 45>; + brcm,function = ; + brcm,pull = ; + }; + }; + + fragment@3 { target = <&i2c1>; __overlay__ { pinctrl-names = "default"; @@ -179,14 +172,33 @@ }; }; - fragment@3 { + fragment@4 { target = <&spidev1>; __overlay__ { status = "disabled"; }; }; - fragment@4 { + fragment@5 { + target = <&spi0_pins>; + __overlay__ { + /* miso mosi clock */ + brcm,pins = <37 38 39>; + brcm,function = ; + brcm,pull = ; + }; + }; + + fragment@6 { + target = <&spi0_cs_pins>; + __overlay__ { + brcm,pins = <36 35>; + brcm,function = ; + brcm,pull = ; + }; + }; + + fragment@7 { target = <&spi0>; __overlay__ { pinctrl-names = "default"; @@ -213,7 +225,7 @@ }; }; - fragment@5 { + fragment@8 { target = <&usb>; __overlay__ { #address-cells = <1>; @@ -259,7 +271,7 @@ }; }; - fragment@6 { + fragment@9 { target = <&uart0>; __overlay__ { pinctrl-names = "default"; From b2a05a261b532541cfa639c9dd6ca9a595ea4c9e Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Wed, 27 Apr 2022 11:13:36 +0200 Subject: [PATCH 109/183] dts/connect-se: Amend compatible string for CM4S The Connect SE will only be delivered with CM4S SoC, it is proper to use "brcm,bcm2711" in the compatible string for a CM4S based device. Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts index 2b1f98b659776e..40684e0fdcca7a 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts @@ -12,8 +12,7 @@ fragment@0 { target-path = "/"; __overlay__ { - compatible = "kunbus,revpi-connect-se", "brcm,bcm2837", - "brcm,bcm2836"; + compatible = "kunbus,revpi-connect-se", "brcm,bcm2711"; /delete-node/ regulator_pbrst; }; }; From 9d8151daca2f5d6ca90e82a382d84f7cd08a9559 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Wed, 27 Apr 2022 11:17:48 +0200 Subject: [PATCH 110/183] dts/connect-se: Use own fragments to modify existing pinmuxes See commit 76f23a4d5e2a Signed-off-by: Zhi Han --- .../dts/overlays/revpi-connect-se-overlay.dts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts index 40684e0fdcca7a..05e4d031b172a3 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-se-overlay.dts @@ -17,20 +17,16 @@ }; }; - fragment@1 { - target = <&gpio>; + fragment@6 { + target = <&spi0_cs_pins>; __overlay__ { - spi0_cs_pins: spi0_cs_pins { - brcm,pins = <36>; - brcm,function = ; - brcm,pull = ; - }; - /delete-node/ eth2_int_pins; - /delete-node/ eth2_reset_pins; + brcm,pins = <36 35>; + brcm,function = ; + brcm,pull = ; }; }; - fragment@4 { + fragment@7 { target = <&spi0>; __overlay__ { cs-gpios = <&gpio 36 GPIO_ACTIVE_LOW>; From a1a519da358f13bb2752c9cb1fc259949cff3e9a Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 28 Apr 2022 15:20:40 +0200 Subject: [PATCH 111/183] dts/core: Use own fragments to modify existing pinmuxes If we redefine muxes which are already defined in the devicetree we might get errors when loading the overlay at runtime. There is no usefull error message. It just says the loding of the overlay faild. The bootloader seems not so picky and loads the overlay. We move each pinmux which is already defined in bcm2708-rpi-cm.dts, bcm2710-rpi-cm3.dts or bcm2711-rpi-cm4s.dts, to its own fragment. And we modify the already defined pinmux instead of creating a new one. Signed-off-by: Philipp Rosenberger --- .../boot/dts/overlays/revpi-core-overlay.dts | 56 +++++++++++-------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 77b53d48a40cab..2c94291b305a77 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -83,29 +83,12 @@ fragment@1 { target = <&gpio>; __overlay__ { - spi0_pins: spi0_pins { - /* miso mosi clock */ - brcm,pins = <37 38 39>; - brcm,function = ; - brcm,pull = ; - }; - spi0_cs_pins: spi0_cs_pins { - brcm,pins = <36 35>; - brcm,function = ; - brcm,pull = ; - }; eth1_2_reset_pins: eth1_2_reset_pins { /* resets both chips */ brcm,pins = <40>; brcm,function = ; brcm,pull = ; }; - i2c1_pins: i2c1_pins { - /* sda scl */ - brcm,pins = <44 45>; - brcm,function = ; - brcm,pull = ; - }; sniff_pins: sniff_pins { /* 1A 2A 1B 2B */ brcm,pins = <42 28 43 29>; @@ -138,6 +121,16 @@ }; fragment@2 { + target = <&i2c1_pins>; + __overlay__ { + /* sda scl */ + brcm,pins = <44 45>; + brcm,function = ; + brcm,pull = ; + }; + }; + + fragment@3 { target = <&i2c1>; __overlay__ { pinctrl-names = "default"; @@ -160,21 +153,40 @@ }; }; - fragment@3 { + fragment@4 { target = <&spidev0>; __overlay__ { status = "disabled"; }; }; - fragment@4 { + fragment@5 { target = <&spidev1>; __overlay__ { status = "disabled"; }; }; - fragment@5 { + fragment@6 { + target = <&spi0_pins>; + __overlay__ { + /* miso mosi clock */ + brcm,pins = <37 38 39>; + brcm,function = ; + brcm,pull = ; + }; + }; + + fragment@7 { + target = <&spi0_cs_pins>; + __overlay__ { + brcm,pins = <36 35>; + brcm,function = ; + brcm,pull = ; + }; + }; + + frgment@8 { target = <&spi0>; __overlay__ { pinctrl-names = "default"; @@ -207,7 +219,7 @@ }; }; - fragment@6 { + fragment@9 { target = <&usb>; __overlay__ { #address-cells = <1>; @@ -227,7 +239,7 @@ }; }; - fragment@7 { + fragment@10 { target = <&uart0>; __overlay__ { pinctrl-names = "default"; From c7397e53a71788dab3485a7395223617d8073e64 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Mon, 2 May 2022 09:24:29 +0200 Subject: [PATCH 112/183] dts/core: Fix typo in the spi0 fragment Commit 5dba555f0606 ("dts/core: Use own fragments to modify existing pinmuxes") introduced a typo: "frgment@8". It must say "fragment@8". With this typo the fragment is not applied. Thus leads to the situation that spi0 is not enabled. And picontrol won't even load because the spi0 thread is missing. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 2c94291b305a77..19fbfdf7a01fbe 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -186,7 +186,7 @@ }; }; - frgment@8 { + fragment@8 { target = <&spi0>; __overlay__ { pinctrl-names = "default"; From e846c56a502a22b8a8f54650abe6ebe00557d2b9 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Thu, 19 May 2022 15:10:20 +0200 Subject: [PATCH 113/183] dts/revpi-*: Switch to dwc2 USB driver With the 5.10 kernel we see issues with the USB based network interface. Some times the USB interface seems to be stalled and communication is susspended. The received packages are processed after some time. The delay can go up to several 10th seconds. The issue seems to be with the usb_otg driver in combination with piControl. Balancing the priorities (increase the dwc-otg irq threads priorities or decreasing the piControl threads priorities) reduces the problems, but doesn't solve them. The dwc2 driver has been developed further while the development of the dwc-otg driver stagnated. So it seems that the dwc2 driver doesn't suffer from these issues. So switching to the dwc2 driver seems the obvious solution. The issue can reproduced by running iperf in receive mode (iperf3 -R -c ...or iperf -s ...). Pings to the target might get lost and will be received with a huge delay (up to 30 seconds and more). Also the bandwith will be reduced some times. It might even drop to zero. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-compact-overlay.dts | 11 ++++++++--- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 12 +++++++++--- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 12 +++++++++--- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 12 +++++++++--- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts index ced57697532de4..d2cfd5a10b6574 100644 --- a/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-compact-overlay.dts @@ -304,10 +304,15 @@ fragment@7 { target = <&usb>; - __overlay__ { + #address-cells = <1>; + #size-cells = <1>; + dwc2_usb: __overlay__ { + compatible = "brcm,bcm2835-usb"; dr_mode = "host"; - #address-cells = <1>; - #size-cells = <0>; + g-np-tx-fifo-size = <32>; + g-rx-fifo-size = <558>; + g-tx-fifo-size = <512 512 512 512 512 256 256>; + status = "okay"; hub@1 { compatible = "usb424,9514"; /* SMSC LAN9514 */ diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 39756694412725..4033f20ebe4b6a 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -227,9 +227,15 @@ fragment@8 { target = <&usb>; - __overlay__ { - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <1>; + #size-cells = <1>; + dwc2_usb: __overlay__ { + compatible = "brcm,bcm2835-usb"; + dr_mode = "host"; + g-np-tx-fifo-size = <32>; + g-rx-fifo-size = <558>; + g-tx-fifo-size = <512 512 512 512 512 256 256>; + status = "okay"; hub@1 { /* SMSC LAN9514 */ diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 19fbfdf7a01fbe..533aea05174573 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -221,9 +221,15 @@ fragment@9 { target = <&usb>; - __overlay__ { - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <1>; + #size-cells = <1>; + dwc2_usb: __overlay__ { + compatible = "brcm,bcm2835-usb"; + dr_mode = "host"; + g-np-tx-fifo-size = <32>; + g-rx-fifo-size = <558>; + g-tx-fifo-size = <512 512 512 512 512 256 256>; + status = "okay"; hub@1 { compatible = "usb424,9514"; /* SMSC LAN9514 */ diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index e912f1e08075d8..b9c2cb607b624e 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -284,9 +284,15 @@ fragment@7 { target = <&usb>; - __overlay__ { - #address-cells = <1>; - #size-cells = <0>; + #address-cells = <1>; + #size-cells = <1>; + dwc2_usb: __overlay__ { + compatible = "brcm,bcm2835-usb"; + dr_mode = "host"; + g-np-tx-fifo-size = <32>; + g-rx-fifo-size = <558>; + g-tx-fifo-size = <512 512 512 512 512 256 256>; + status = "okay"; hub@1 { /* SMSC LAN9514 */ From 47ac0ba44fddada0234a4c06beb5c657d2de8a6e Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Wed, 22 Jun 2022 13:30:44 +0200 Subject: [PATCH 114/183] dts/core: Add comment for the spi-max-frequency Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 533aea05174573..ed7cd021820744 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -197,6 +197,13 @@ #size-cells = <0>; status = "okay"; + /* + The spi-max-frequency is set to 20MHz because of hardware limitations. + The KSZ8851 support up to 40MHz, but because of the poor signal quality of the + SPI on the BCM28xx/BCM27xx only ~29MHz can be achieved. To be on the safe + side we limit the spi-max-frequency to 20MHz. + Even for this the drive strength needs to be at least 8mA. + */ pileft: ethernet@0 { /* PiBridge Ethernet left */ compatible = "micrel,ks8851"; From 4fb97578c00fc69d0a09d2c265641941f3aaf3f6 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Tue, 10 May 2022 11:53:26 +0200 Subject: [PATCH 115/183] dts: Add RevPi Core 3/3+ (2022) overlay This overlay is based on the original RevPi Core overlay. As the RevPi Core (2022) introduces some changes to the hardware the following changes have been made to the overlay. * Both network phys on the PiBridge now have there own reset line. Also the polarity of the resets are now as expected by the driver. And the delay circuit has also been removed. We can now remove the the pbrst regulator. * Also the interrupt line of the phys are now connected to gpios on the compute module. * The USB network interfaces has its own eeprom to store the MAC address. Thus we don't need to set the MAC address from this overlay any more. Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/Makefile | 1 + .../dts/overlays/revpi-core-2022-overlay.dts | 82 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index 4fffaf7f6d4a74..eed90c2e6b9987 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -205,6 +205,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-flat-dt-blob.dtbo \ revpi-core.dtbo \ revpi-core-dt-blob.dtbo \ + revpi-core-2022.dtbo \ cmio-jtag-dt-blob.dtbo \ rotary-encoder.dtbo \ rpi-backlight.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts new file mode 100644 index 00000000000000..23aebaa944ea80 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts @@ -0,0 +1,82 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Core 3 (2022) + * RevPi Core 3+ (2022) + */ + +#include "revpi-core-overlay.dts" +#include + +/{ + compatible = "brcm,bcm2837"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "kunbus,revpi-core-2022", "brcm,bcm2837"; + /delete-node/ regulator_pbrst; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + /delete-node/ eth1_2_reset_pins; + + pileft_pins: pileft_pins { + brcm,pins = <13 21>; + brcm,function = ; + brcm,pull = ; + }; + + piright_pins: piright_pins { + brcm,pins = <12 20>; + brcm,function = ; + brcm,pull = ; + }; + }; + }; + + fragment@8 { + target = <&spi0>; + __overlay__ { + /delete-node/ ethernet@0; + /delete-node/ ethernet@1; + + /* The setting of spi-max-frequency refers description in revpi-core-2022. */ + pileft: ethernet@0 { + /* PiBridge Ethernet left */ + compatible = "micrel,ks8851"; + reg = <0>; + spi-max-frequency = <20000000>; + pinctrl-names = "default"; + pinctrl-0 = <&pileft_pins>; + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <13 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + + piright: ethernet@1 { + /* PiBridge Ethernet right */ + compatible = "micrel,ks8851"; + reg = <1>; + spi-max-frequency = <20000000>; + pinctrl-names = "default"; + pinctrl-0 = <&piright_pins>; + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <12 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + status = "okay"; + }; + }; + }; + + __overrides__ { + /delete-property/ eth0_mac_hi; + /delete-property/ eth0_mac_lo; + }; +}; From d3e5987ec1cbfde63cc6797826230a1fe0af93e0 Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 20 Oct 2021 12:08:38 +0200 Subject: [PATCH 116/183] dts/revpi-flat: Add WLAN enable Newer RevPi Flat have a dedicated enable signal to take the CYW43455 wlan module out of reset. The signal is accessible through the GPIO expander (gpio10/P1_2) on the top board. Signed-off-by: Philipp Rosenberger Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index b9c2cb607b624e..1f97f60bd55645 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -36,6 +36,11 @@ regulator-always-on; }; + wl_on: reg_wl { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&expander 10 GPIO_ACTIVE_LOW>; + }; + watchdog: watchdog { pinctrl-names = "default"; pinctrl-0 = <&watchdog_gpio4>; @@ -337,6 +342,7 @@ bus-width = <4>; non-removable; max-frequency = <28000000>; + mmc-pwrseq = <&wl_on>; wlan0: wifi@1 { reg = <1>; From d973a581d3ca7c55cdd5b485f85d645814a4607e Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Wed, 29 Jun 2022 16:31:44 +0200 Subject: [PATCH 117/183] dts/core-2022: Add revpi-core compatible To maintain piControl compatibility add the kunbus,revpi-core compatible as well. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts index 23aebaa944ea80..367e415a909b4e 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-2022-overlay.dts @@ -14,7 +14,8 @@ fragment@0 { target-path = "/"; __overlay__ { - compatible = "kunbus,revpi-core-2022", "brcm,bcm2837"; + compatible = "kunbus,revpi-core-2022", + "kunbus,revpi-core", "brcm,bcm2837"; /delete-node/ regulator_pbrst; }; }; From e3a0b7fb63fc6516864cdd1a079dd9d3b408c00c Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Tue, 21 Jun 2022 17:57:48 +0200 Subject: [PATCH 118/183] dts: Add RevPi Core S (2022) overlay The RevPi Core S (2022) is the same as the RevPi Core 3 (2022) but uses a CM4S module and thus a BCM2711 SoC. Keep the kunbus,revpi-core compatible string to maintain compatibility with piControl. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/Makefile | 1 + .../overlays/revpi-core-s-2022-overlay.dts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-core-s-2022-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index eed90c2e6b9987..5c760c9bd5236c 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -206,6 +206,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-core.dtbo \ revpi-core-dt-blob.dtbo \ revpi-core-2022.dtbo \ + revpi-core-s-2022.dtbo \ cmio-jtag-dt-blob.dtbo \ rotary-encoder.dtbo \ rpi-backlight.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-core-s-2022-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-s-2022-overlay.dts new file mode 100644 index 00000000000000..35289f397e0292 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-core-s-2022-overlay.dts @@ -0,0 +1,19 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Core S (2022) + */ + + #include "revpi-core-2022-overlay.dts" + +/{ + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "kunbus,revpi-core-s-2022", + "kunbus,revpi-core", "brcm,bcm2711"; + }; + }; +}; From ffba040ba15e1dc8d8a4a98eba5961f54a36ef9c Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Thu, 31 Mar 2022 15:15:03 +0200 Subject: [PATCH 119/183] dts: Add RevPi Core SE (2022) overlay The Core SE is based on Core S (revpi-core-s-2022-overlay.dts), but without eth chip in the pribridge, so the device tree overlay comes with following changes: * Configuration of pileft, piright are removed * The overrided properties for mac address are removed Signed-off-by: Zhi Han Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/Makefile | 1 + .../overlays/revpi-core-se-2022-overlay.dts | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-core-se-2022-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index 5c760c9bd5236c..a3092589c2421f 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -207,6 +207,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-core-dt-blob.dtbo \ revpi-core-2022.dtbo \ revpi-core-s-2022.dtbo \ + revpi-core-se-2022.dtbo \ cmio-jtag-dt-blob.dtbo \ rotary-encoder.dtbo \ rpi-backlight.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-core-se-2022-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-se-2022-overlay.dts new file mode 100644 index 00000000000000..3ce69309f56a83 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-core-se-2022-overlay.dts @@ -0,0 +1,40 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Core SE (2022) + */ + + #include "revpi-core-s-2022-overlay.dts" + +/{ + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "kunbus,revpi-core-se-2022", + "kunbus,revpi-core-se", "brcm,bcm2711"; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + /delete-node/ pileft_pins; + /delete-node/ piright_pins; + }; + }; + + fragment@8 { + target = <&spi0>; + __overlay__ { + /delete-node/ ethernet@0; + /delete-node/ ethernet@1; + }; + }; + + __overrides__ { + /delete-property/ pileft_mac_hi; + /delete-property/ pileft_mac_lo; + /delete-property/ piright_mac_hi; + /delete-property/ piright_mac_lo; + }; +}; From 66b9607cf9826c08205037d2c89aedbab3ea7bb0 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Mon, 18 Jul 2022 10:43:10 +0200 Subject: [PATCH 120/183] dts: Import from RPI as the base of revpi's dt-blob From following URI the dt-blob.dts get copied here as the base of dt-blob of RevPi devices. https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts It's intend that to update original dt-blob from RPi, only this file should be replaced or patched. Signed-off-by: Zhi Han --- .../boot/dts/overlays/rpi-dt-blob-overlay.dts | 2731 +++++++++++++++++ 1 file changed, 2731 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/rpi-dt-blob-overlay.dts diff --git a/arch/arm/boot/dts/overlays/rpi-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/rpi-dt-blob-overlay.dts new file mode 100644 index 00000000000000..6f438541f770c6 --- /dev/null +++ b/arch/arm/boot/dts/overlays/rpi-dt-blob-overlay.dts @@ -0,0 +1,2731 @@ +/dts-v1/; + +/ { + videocore { + pins_rev1 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p2 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SDA + pin@p3 { function = "i2c1"; termination = "pull_up"; }; // I2C 1 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p27 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <2>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <3>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <27>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <1>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <1>; + }; + }; // pin_defines + }; // pins_rev1 + + pins_rev2 { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p0 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SDA + pin@p1 { function = "i2c0"; termination = "pull_up"; }; // I2C 0 SCL + pin@p5 { function = "output"; termination = "pull_down"; }; // CAM_LED + pin@p6 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN NRESET + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p16 { function = "output"; termination = "pull_up"; polarity = "active_low"; }; // activity LED + pin@p21 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p46 { function = "input"; termination = "no_pulling"; }; // Hotplug + pin@p47 { function = "input"; termination = "no_pulling"; }; // SD_CARD_DETECT + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <21>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <16>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <6>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <40>; + }; + pin_define@PWMR { + type = "internal"; + number = <45>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "internal"; + number = <47>; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <2>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <3>; + }; + }; // pin_defines + }; // pins + + pins_bplus1 { // Pi 1 Model B+ rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <31>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <35>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "internal"; + number = <38>; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_bplus2 { // Pi 1 Model B+ rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b1 { // Pi 2 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA / SMPS_SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL / SMPS_SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <28>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <29>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_2b2 { // Pi 2 Model B rev 1.1 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p31 { function = "output"; termination = "pull_down"; startup_state = "active"; }; // LAN_RUN + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p35 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + pin@p38 { function = "output"; termination = "no_pulling"; }; // USB current limit (0=600mA, 1=1200mA) + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + // Communicate with the SMPS by "bit-bashing" the I2C protocol on GPIOs 42 and 43 + pin@p42 { function = "output"; termination = "pull_up"; }; // SMPS_SCL + pin@p43 { function = "input"; termination = "no_pulling"; }; // SMPS_SDA + pin@p44 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p45 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "internal"; + number = <35>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "internal"; + number = <31>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <42>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <44>; + }; + pin_define@USB_LIMIT_1A2 { + type = "internal"; + number = <38>; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <45>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "internal"; + number = <3>; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <28>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <29>; + }; + }; // pin_defines + }; // pins + + pins_3b1 { // Pi 3 Model B rev 1.0 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p47 { function = "output"; termination = "pull_down"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // Status LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <6>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <5>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <44>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <45>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3b2 { // Pi 3 Model B rev 1.2 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; }; // ACT_LED + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p132 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + pin@p135 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Power low + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <4>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "external"; + number = <7>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "external"; + number = <2>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <29>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3bplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p29 { function = "output"; termination = "no_pulling"; }; // ACT_LED (GREEN) + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "gp_clk"; termination = "pull_down"; }; // ETH_CLK - Ethernet 25MHz output + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p131 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // LAN_RUN + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <28>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_PWR_OK { + type = "external"; + number = <2>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <29>; + }; + pin_define@LAN_RUN { + type = "external"; + number = <3>; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <30>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "internal"; + number = <42>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_3aplus { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p29 { function = "output"; termination = "no_pulling"; }; // ACT_LED (GREEN) + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; }; // Camera LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <28>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "external"; + number = <6>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_PWR_OK { + type = "external"; + number = <2>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <29>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@LAN_RUN_BOOT { + type = "internal"; + number = <30>; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_cm3 { // Pi 3 CM3 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p129 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "external"; + number = <0>; + }; + pin_define@EMMC_ENABLE { + type = "external"; + number = <1>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_cm4 { // Pi 4 CM4 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p131 { function = "output"; termination = "no_pulling"; }; // ANT1 + pin@p132 { function = "output"; termination = "no_pulling"; }; // SD VDDIO + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // SD_PWR_ON + pin@p135 { function = "output"; termination = "no_pulling"; }; // ANT2 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "absent"; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "external"; + number = <4>; + }; + pin_define@SD_PWR_ON { + type = "external"; + number = <6>; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + }; // pin_defines + }; // pins + + pins_cm4s { // Pi 4 CM4S + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p46 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "internal"; + number = <49>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <46>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "absent"; + }; + pin_define@WL_ON { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0 { // Pi zero + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p32 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <41>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <32>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi0w { // Pi zero W + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p29 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "output"; termination = "pull_down"; }; // Camera LED + pin@p41 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p45 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p46 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p47 { function = "output"; termination = "pull_up"; polarity="active_low"; }; // activity LED + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <46>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <28>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <29>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "internal"; + number = <40>; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <47>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "internal"; + number = <45>; + }; + pin_define@WL_ON { + type = "internal"; + number = <41>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_pi02w { // Pi Zero 2 W + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p28 { function = "input"; termination = "no_pulling"; polarity = "active_low"; }; // Hotplug + pin@p29 { function = "output"; termination = "pull_up"; }; // ACT_LED (GREEN) + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p41 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p42 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p43 { function = "gp_clk"; termination = "pull_down"; }; // WIFI_CLK - Wifi 32kHz output + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; }; // SMPS_SCL + pin@p47 { function = "input"; termination = "pull_up"; }; // SMPS_SDA + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "internal"; + number = <28>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "internal"; + number = <40>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "absent"; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <29>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@LAN_RUN_BOOT { + type = "absent"; + }; + pin_define@BT_ON { + type = "internal"; + number = <42>; + }; + pin_define@WL_ON { + type = "internal"; + number = <41>; + }; + pin_define@WL_LPO_CLK { + type = "internal"; + number = <43>; + }; + pin_define@SMPS_SDA { + type = "internal"; + number = <46>; + }; + pin_define@SMPS_SCL { + type = "internal"; + number = <47>; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "absent"; + }; + pin_define@DISPLAY_SDA { + type = "absent"; + }; + pin_define@DISPLAY_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins + + pins_cm { + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; }; // RX uart0 + pin@p47 { function = "output"; termination = "no_pulling"; polarity = "active_low"; }; // EMMC_ENABLE_N + pin@p48 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CLK + pin@p49 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD CMD + pin@p50 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D0 + pin@p51 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D1 + pin@p52 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D2 + pin@p53 { function = "sdcard"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // SD D3 + }; // pin_config + + pin_defines { + pin_define@EMMC_ENABLE { + type = "internal"; + number = <47>; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "absent"; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "absent"; + }; + pin_define@ID_SCL { + type = "absent"; + }; + }; // pin_defines + }; // pins_cm + + pins_4b { // Pi4 Model B + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Right audio + pin@p41 { function = "pwm"; termination = "no_pulling"; drive_strength_mA = < 16 >; }; // Left audio + pin@p42 { function = "output"; termination = "pull_up"; }; // activity LED + pin@p43 { function = "input"; termination = "pull_up"; }; // SPIFLASH_CE_N + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; drive_strength_mA = < 14 >; }; // Dummy pin for HSTL drive on bank 2 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p131 { function = "output"; termination = "no_pulling"; }; // GLOBAL_RESET + pin@p132 { function = "output"; termination = "no_pulling"; }; // SD VDDIO + pin@p133 { function = "output"; termination = "no_pulling"; }; // Camera shutdown + pin@p134 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // SD_PWR_ON + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "absent"; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@CAMERA_0_SDA_PIN { + type = "internal"; + number = <44>; + }; + pin_define@CAMERA_0_SCL_PIN { + type = "internal"; + number = <45>; + }; + pin_define@CAMERA_0_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@CAMERA_0_UNICAM_PORT { + type = "internal"; + number = <1>; + }; + pin_define@CAMERA_0_LED { + type = "absent"; + }; + pin_define@FLASH_0_ENABLE { + type = "absent"; + }; + pin_define@FLASH_0_INDICATOR { + type = "absent"; + }; + pin_define@FLASH_1_ENABLE { + type = "absent"; + }; + pin_define@FLASH_1_INDICATOR { + type = "absent"; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_PWR_OK { + type = "external"; + number = <2>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "internal"; + number = <42>; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@GLOBAL_RESET { + type = "external"; + number = <3>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "external"; + number = <4>; + }; + pin_define@SD_PWR_ON { + type = "external"; + number = <6>; + }; + pin_define@PWML { + type = "internal"; + number = <41>; + }; + pin_define@PWMR { + type = "internal"; + number = <40>; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + + pins_400 { // Pi400 + pin_config { + pin@default { + polarity = "active_high"; + termination = "pull_down"; + startup_state = "inactive"; + function = "input"; + }; // pin + pin@p14 { function = "uart0"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // TX uart0 + pin@p15 { function = "uart0"; termination = "pull_up"; drive_strength_mA = < 8 >; }; // RX uart0 + pin@p34 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p35 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p36 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p37 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p38 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p39 { function = "input"; termination = "pull_up"; drive_strength_mA = < 8 >; }; + pin@p40 { function = "input"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // Used for SPI flash + pin@p41 { function = "input"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; // Used for SPI flash + pin@p42 { function = "output"; termination = "pull_up"; polarity = "active_high"; startup_state = "active"; }; // power LED + pin@p43 { function = "input"; termination = "pull_up"; }; // SPIFLASH_CE_N + pin@p44 { function = "input"; termination = "pull_up"; }; // I2C 0 SDA + pin@p45 { function = "input"; termination = "pull_up"; }; // I2C 0 SCL + pin@p46 { function = "input"; termination = "pull_up"; drive_strength_mA = < 14 >; }; // Dummy pin for HSTL drive on bank 2 + pin@p128 { function = "output"; termination = "no_pulling"; }; // BT_ON + pin@p129 { function = "output"; termination = "no_pulling"; }; // WL_ON + pin@p130 { function = "output"; termination = "no_pulling"; polarity = "active_low"; startup_state = "active"; }; // PWR_LED (RED) + pin@p131 { function = "output"; termination = "no_pulling"; }; // GLOBAL_RESET + pin@p132 { function = "output"; termination = "no_pulling"; }; // SD VDDIO + pin@p133 { function = "output"; termination = "no_pulling"; }; // GLOBAL_SHUTDOWN + pin@p134 { function = "output"; termination = "no_pulling"; startup_state = "active"; }; // SD_PWR_ON + }; // pin_config + + pin_defines { + pin_define@HDMI_CONTROL_ATTACHED { + type = "absent"; + }; + pin_define@EMMC_ENABLE { + type = "absent"; + }; + pin_define@NUM_CAMERAS { + type = "internal"; + number = <0>; + }; + pin_define@POWER_LOW { + type = "absent"; + }; + pin_define@LEDS_PWR_OK { + type = "external"; + number = <2>; + }; + pin_define@LEDS_DISK_ACTIVITY { + type = "absent"; + }; + pin_define@LAN_RUN { + type = "absent"; + }; + pin_define@BT_ON { + type = "external"; + number = <0>; + }; + pin_define@WL_ON { + type = "external"; + number = <1>; + }; + pin_define@GLOBAL_RESET { + type = "external"; + number = <3>; + }; + pin_define@GLOBAL_SHUTDOWN { + type = "external"; + number = <5>; + }; + pin_define@SHUTDOWN_REQUEST { + type = "external"; + number = <7>; + }; + pin_define@SMPS_SDA { + type = "absent"; + }; + pin_define@SMPS_SCL { + type = "absent"; + }; + pin_define@ETH_CLK { + type = "absent"; + }; + pin_define@WL_LPO_CLK { + type = "absent"; + }; + pin_define@USB_LIMIT_1A2 { + type = "absent"; + }; + pin_define@SIO_1V8_SEL { + type = "external"; + number = <4>; + }; + pin_define@SD_PWR_ON { + type = "external"; + number = <6>; + }; + pin_define@PWML { + type = "absent"; + }; + pin_define@PWMR { + type = "absent"; + }; + pin_define@SAFE_MODE { + type = "absent"; + }; + pin_define@SD_CARD_DETECT { + type = "absent"; + }; + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; + pin_define@DISPLAY_I2C_PORT { + type = "internal"; + number = <0>; + }; + pin_define@DISPLAY_SDA { + type = "internal"; + number = <44>; + }; + pin_define@DISPLAY_SCL { + type = "internal"; + number = <45>; + }; + }; // pin_defines + }; // pins + }; +}; \ No newline at end of file From aa4f561437c02fbec1797d9577a007c1a1ea516e Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Tue, 19 Jul 2022 10:59:39 +0200 Subject: [PATCH 121/183] dts: Add overlay to amend dt-blob from RPi The revpi-dt-blob includes the dt-blob from RPi and to be used for all the Revpi devices with HAT EEPROM Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/Makefile | 1 + .../dts/overlays/revpi-dt-blob-overlay.dts | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index a3092589c2421f..53ec949636f88e 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -194,6 +194,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ qca7000-uart0.dtbo \ ramoops.dtbo \ ramoops-pi4.dtbo \ + revpi-dt-blob.dtbo \ revpi-compact.dtbo \ revpi-compact-dt-blob.dtbo \ revpi-connect.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts new file mode 100644 index 00000000000000..f14d87bf04d522 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts @@ -0,0 +1,26 @@ +/* + * Device tree blob overlay for Revolution Pi by KUNBUS + * + * For all RevPi models with a HAT EEEPROM + */ + +#include "rpi-dt-blob-overlay.dts" + + +/ { + videocore { + pins_cm3 { + pin_config { + }; // pin_config + pin_defines { + }; // pin_defines + }; + + pins_cm4s { + pin_config { + }; // pin_config + pin_defines { + }; // pin_defines + }; + }; +}; From 6ef01110844e33171279c010282abc9ef916b838 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Tue, 19 Jul 2022 11:44:54 +0200 Subject: [PATCH 122/183] dts/dt-blob: Add configs of pin 0,1 for HATs on CM3 On redesigned Core and Connect, the pin 0,1 are used for HATs. Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts index f14d87bf04d522..c1633429f8d0cb 100644 --- a/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts @@ -13,6 +13,15 @@ pin_config { }; // pin_config pin_defines { + /* For redesigned Core and Connect with HATs */ + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; }; // pin_defines }; From 6ae55a0d0e658fc107a604ab3849191020829037 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Tue, 19 Jul 2022 11:46:19 +0200 Subject: [PATCH 123/183] dts/dt-blob: Add configs of pin 0,1 for HATs on CM4S On Core S/SE and Connect S/SE, the pin 0,1 are used for HATs. Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts index c1633429f8d0cb..e7c28419867eed 100644 --- a/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts @@ -29,6 +29,15 @@ pin_config { }; // pin_config pin_defines { + /* For Core S/SE and Connect S/SE with HATs */ + pin_define@ID_SDA { + type = "internal"; + number = <0>; + }; + pin_define@ID_SCL { + type = "internal"; + number = <1>; + }; }; // pin_defines }; }; From 588a8ac7b96c7f057632daa2aa74bb14906262b7 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Tue, 19 Jul 2022 11:43:37 +0200 Subject: [PATCH 124/183] dts/dt-blob: Configure drive strength for pins on Core/connect Set the value on pin 39 to configure the drive strength of Bank 1. https://github.com/raspberrypi/documentation/blob/develop/documentation/asciidoc/computers/configuration/pin-configuration.adoc#sections-of-the-dt-blob As this pin is located in GPIO Bank 1 of CM modules, on which only Bank 0 (pin 0 ~ 27) can be configured with HATs, so it should be configured in dt-blob. Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts index e7c28419867eed..120f650852f40a 100644 --- a/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-dt-blob-overlay.dts @@ -11,6 +11,10 @@ videocore { pins_cm3 { pin_config { + /* Increase drive strength in order to improve the signal quality (eg. SPI CLK on Core 3 and Connect) + * NOTE: This will increase the drive strength for the whole GPIO bank 1 and not only pin 39 + */ + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; }; // pin_config pin_defines { /* For redesigned Core and Connect with HATs */ @@ -27,6 +31,10 @@ pins_cm4s { pin_config { + /* Increase drive strength in order to improve the signal quality (eg. SPI CLK on Core S and Connect S) + * NOTE: This will increase the drive strength for the whole GPIO bank 1 and not only pin 39 + */ + pin@p39 { function = "spi"; termination = "no_pulling"; drive_strength_mA = < 8 >; }; }; // pin_config pin_defines { /* For Core S/SE and Connect S/SE with HATs */ From 4e633589a8caff5bd67799093ce4d8320e16c7d4 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Fri, 19 Aug 2022 11:21:24 +0200 Subject: [PATCH 125/183] dts: Add dt overlay for Core (cm1) This dtoverlay inherits configurations from dtoverlay of Core 3, and added with modification of using dwc_otg (instead of dwc2) on CM1 for better performance. Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/Makefile | 1 + .../dts/overlays/revpi-core-cm1-overlay.dts | 31 +++++++++++++++++++ .../boot/dts/overlays/revpi-core-overlay.dts | 1 - 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/overlays/revpi-core-cm1-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index 53ec949636f88e..06e9e736a1226c 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -205,6 +205,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-flat.dtbo \ revpi-flat-dt-blob.dtbo \ revpi-core.dtbo \ + revpi-core-cm1.dtbo \ revpi-core-dt-blob.dtbo \ revpi-core-2022.dtbo \ revpi-core-s-2022.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-core-cm1-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-cm1-overlay.dts new file mode 100644 index 00000000000000..f94ee194712986 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-core-cm1-overlay.dts @@ -0,0 +1,31 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Core + */ + +#include "revpi-core-overlay.dts" + +/{ + /delete-node/ fragment@9; + fragment@9 { + target = <&usb>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + + /* Use dwc_otg (instead of dwc2) on CM1 for better performance. */ + hub@1 { + compatible = "usb424,9514"; /* SMSC LAN9514 */ + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + eth0: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + }; + }; + }; +}; diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index ed7cd021820744..8495a3866342df 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -1,7 +1,6 @@ /* * Device tree overlay for Revolution Pi by KUNBUS * - * RevPi Core * RevPi Core 3 */ From 18adf187149c6ed426153e21d0e734f3c86456dd Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 12 Sep 2022 13:00:29 +0200 Subject: [PATCH 126/183] arm: dts: flat: correct relais pin Correct relais pin from GPIO 19 to GPIO 28. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 1f97f60bd55645..44881e3c346a40 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -151,7 +151,7 @@ brcm,pull = ; }; relais_pins: relais_pins { - brcm,pins = <19>; + brcm,pins = <28>; brcm,function = ; brcm,pull = ; }; From a92406830543080126c9b4a4da8476d6bb8cdd2f Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Wed, 7 Sep 2022 17:47:19 +0200 Subject: [PATCH 127/183] arm: dts: Add overlay for revpi flat 2022 Add the device overlay for the RevPi Flat 2022. Differences to the RevPi Flat comprise the following: - based on bcm2711 - changed gpio layout - ublox MAYA-W1 module for WLAN and bluetooth (the concerning node is located under device tree root instead of the UART node). - RS485 interface on UART 3 and 4 - EEPROM connected to SDA0 - use RTC watchdog instead of max6370 watchdog module - TPM reset connected to system reset - no FTDI uart any more - mac address not set in device tree any more (read from EEPROM instead) - use XHCI instead of DWC2 - disable HDMI Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/Makefile | 1 + .../overlays/revpi-flat-s-2022-overlay.dts | 416 ++++++++++++++++++ 2 files changed, 417 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index 06e9e736a1226c..d34a1f78ae2e21 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -203,6 +203,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-connect-se-dt-blob.dtbo \ revpi-con-can.dtbo \ revpi-flat.dtbo \ + revpi-flat-s-2022.dtbo \ revpi-flat-dt-blob.dtbo \ revpi-core.dtbo \ revpi-core-cm1.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts new file mode 100644 index 00000000000000..574d09fcbca414 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts @@ -0,0 +1,416 @@ +/* + * Device tree overlay for Revolution Pi by KUNBUS + * + * RevPi Flat S (2022) + */ + +/dts-v1/; +/plugin/; +#include +#include +#include +#include + +/{ + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "kunbus,revpi-flat-s-2022", + "kunbus,revpi-flat", "brcm,bcm2711"; + + aout_vref: fixedregulator_2v5x4 { + compatible = "regulator-fixed"; + regulator-name = "2v5_x4_amplified"; + regulator-min-microvolt = <10000000>; + regulator-max-microvolt = <10000000>; + regulator-always-on; + }; + + ain_vref: fixedregulator_2v5x5 { + compatible = "regulator-fixed"; + regulator-name = "2v5_x5_amplified"; + regulator-min-microvolt = <12500000>; + regulator-max-microvolt = <12500000>; + regulator-always-on; + }; + + wlan_pwrseq: wlan_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&expander 12 GPIO_ACTIVE_LOW>; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_led_pins>; + + power_red { + gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "power_red"; + }; + a1_green { + gpios = <&expander 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a1_green"; + }; + a1_red { + gpios = <&expander 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a1_red"; + }; + a2_green { + gpios = <&expander 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a2_green"; + }; + a2_red { + gpios = <&expander 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a2_red"; + }; + a3_green { + gpios = <&expander 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a3_green"; + }; + a3_red { + gpios = <&expander 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a3_red"; + }; + a4_green { + gpios = <&expander 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a4_green"; + }; + a4_red { + gpios = <&expander 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a4_red"; + }; + a5_green { + gpios = <&expander 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a5_green"; + }; + a5_red { + gpios = <&expander 9 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a5_red"; + }; + led-act { + status = "disabled"; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&button_pins>; + user-event { + label = "User event key"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + }; + }; + + fragment@1 { + target = <&gpio>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&relais_pins>; + + pwr_led_pins: pwr_led_pins { + brcm,pins = <24>; + brcm,function = ; + }; + spi_5_pins: spi_5_pins { + brcm,pins = <13 14 15>; + brcm,function = ; + }; + spi_5_cs_pins: spi_5_cs_pins { + /* tpm ksz*/ + brcm,pins = <17 18>; + brcm,function = ; + brcm,pull = ; + }; + spi_6_pins: spi_6_pins { + brcm,pins = <19 20 21>; + brcm,function = ; + }; + spi_6_cs_pins: spi_6_cs_pins { + /* aout ain mbus */ + brcm,pins = <6 10 27>; + brcm,function = ; + brcm,pull = ; + }; + tpm_pins: tpm_pins { + /* irq */ + brcm,pins = <22>; + brcm,function = ; + // TODO: ask HW about external pull up + brcm,pull = ; + }; + mbus_pins: mbus_pins { + /* irq */ + brcm,pins = <45>; + brcm,function = ; + brcm,pull = ; + }; + button_pins: button_pins { + brcm,pins = <23>; + brcm,function = ; + brcm,pull = ; + }; + relais_pins: relais_pins { + brcm,pins = <28>; + brcm,function = ; + brcm,pull = ; + }; + rs485_0_pins: rs485_0_pins { + /* tx rx rts */ + brcm,pins = <4 5 7>; + brcm,function = ; + // TODO: ask HW about external pulls + brcm,pull = ; + }; + rs485_1_pins: rs485_1_pins { + /* tx rx rts */ + brcm,pins = <8 9 11>; + brcm,function = ; + // TODO: ask HW about external pulls + brcm,pull = ; + }; + i2c_1_pins: i2c_1_pins { + brcm,pins = <2 3>; + brcm,function = ; + }; + sdhci_pins: sdhci_pins { + brcm,pins = <34 35 36 37 38 39>; + brcm,function = ; + brcm,pull = ; + }; + bluetooth_pins: bluetooth_pins { + brcm,pins = <30 31 32 33>; + brcm,function = ; + brcm,pull = ; + }; + + }; + }; + + fragment@2 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c_1_pins>; + clock-frequency = <400000>; + status = "okay"; + + expander: gpio@20 { + compatible = "ti,tca6416"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + status = "okay"; + }; + + rtc@51 { + compatible = "nxp,pcf2129"; + reg = <0x51>; + reset-source; + status = "okay"; + }; + }; + }; + + fragment@3 { + target = <&spi5>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpio 17 GPIO_ACTIVE_LOW>, + <&gpio 18 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_5_pins &spi_5_cs_pins>; + status = "okay"; + + tpm: tpm@0 { + compatible = "infineon,slb9670"; + pinctrl-names = "default"; + pinctrl-0 = <&tpm_pins>; + reg = <0>; + spi-max-frequency = <1000000>; + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <22 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; + + ksz8795: switch@1 { + // TODO: use DSA? + compatible = "microchip,ksz8795"; + // NOTE: reduce this if device is not working properly + spi-max-frequency = <20000000>; + reg = <1>; + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <44 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; + }; + }; + + fragment@4 { + target = <&spi6>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + cs-gpios = <&gpio 6 GPIO_ACTIVE_LOW>, + <&gpio 10 GPIO_ACTIVE_LOW>, + <&gpio 27 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&spi_6_pins &spi_6_cs_pins>; + status = "okay"; + + aout: dac@0 { + compatible = "ti,dac7512"; + reg = <0>; + spi-max-frequency = <20000000>; + spi-cpol; + vcc-supply = <&aout_vref>; + status = "okay"; + }; + + ain: adc@1 { + compatible = "microchip,mcp3550-50"; + reg = <1>; + spi-max-frequency = <5000000>; + vref-supply = <&ain_vref>; + status = "okay"; + }; + + mbus: rf@2 { + compatible = "spidev", "ti,cc1101"; + pinctrl-names = "default"; + pinctrl-0 = <&mbus_pins>; + reg = <2>; + spi-max-frequency = <5000000>; + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <45 IRQ_TYPE_LEVEL_HIGH>; + status = "okay"; + }; + }; + }; + + fragment@5 { + target = <&xhci>; + #address-cells = <1>; + #size-cells = <1>; + xhci_usb: __overlay__ { + status = "okay"; + + hub@1 { + /* SMSC LAN9514 */ + compatible = "usb424,9514"; + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + eth0: ethernet@1 { + compatible = "usb424,ec00"; + reg = <1>; + }; + + eth1: ethernet@4 { + /* SMSC LAN9500, attached to KSZ8795 */ + compatible = "usb424,9500"; + reg = <4>; + }; + }; + }; + }; + + fragment@6 { + target = <&sdhci>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&sdhci_pins>; + bus-width = <4>; + non-removable; + max-frequency = <28000000>; + mmc-pwrseq = <&wlan_pwrseq>; + status = "okay"; + + sdxxx-wlan { + cfg80211_wext = <0xf>; + cal_data_cfg = "none"; + max_vir_bss=<1>; + ps_mode=<1>; + auto_ds=<1>; + host_mlme=<1>; + fw_name="nxp/sdiouartiw416_combo_v0.bin"; + }; + }; + }; + + fragment@7 { + target = <&uart0>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&bluetooth_pins>; + status = "okay"; + }; + }; + + fragment@8 { + target = <&uart3>; + __overlay__ { + linux,rs485-enabled-at-boot-time; + rs485-rts-active-low; + pinctrl-names = "default"; + pinctrl-0 = <&rs485_0_pins>; + rs485-term-gpios = <&expander 14 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + + fragment@9 { + target = <&uart4>; + __overlay__ { + linux,rs485-enabled-at-boot-time; + rs485-rts-active-low; + pinctrl-names = "default"; + pinctrl-0 = <&rs485_1_pins>; + rs485-term-gpios = <&expander 15 GPIO_ACTIVE_LOW>; + status = "okay"; + }; + }; + + fragment@10 { + target = <&hdmi0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@11 { + target = <&ddc0>; + __overlay__ { + status = "disabled"; + }; + }; + + fragment@12 { + target-path = "/chosen"; + chosen_overlay: __overlay__ { + }; + }; + + __overrides__ { + bootargs = <&chosen_overlay>,"bootargs"; + }; +}; From ecd5511cdbe31d9b6770221f8f1971ed876e6eef Mon Sep 17 00:00:00 2001 From: Philipp Rosenberger Date: Tue, 4 Oct 2022 17:40:23 +0200 Subject: [PATCH 128/183] arm/dts: Add overlay for RevPi HAT EEPROMs This overlay can be used to make the RevPi HAT EEPROM available. The overlay should only be used to flash the HAT EEPROM. Loading this overlay by default might have undesired side effects. The HAT EEPROM is attached to the i2c0 which is shared with the video core. On some RevPi devices it might trigger a reset of the periphery if the reset is not actively disabled. How the reset is disabled is board specific. Signed-off-by: Philipp Rosenberger --- arch/arm/boot/dts/overlays/Makefile | 1 + .../dts/overlays/revpi-hat-eeprom-overlay.dts | 44 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-hat-eeprom-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index d34a1f78ae2e21..11adc1a9520113 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -205,6 +205,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-flat.dtbo \ revpi-flat-s-2022.dtbo \ revpi-flat-dt-blob.dtbo \ + revpi-hat-eeprom.dtbo \ revpi-core.dtbo \ revpi-core-cm1.dtbo \ revpi-core-dt-blob.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-hat-eeprom-overlay.dts b/arch/arm/boot/dts/overlays/revpi-hat-eeprom-overlay.dts new file mode 100644 index 00000000000000..e18b9b50208a62 --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-hat-eeprom-overlay.dts @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2022 KUNBUS GmbH + */ + +/dts-v1/; +/plugin/; + +/{ + compatible = "brcm,bcm2835"; + + fragment@0 { + target = <&i2c0if>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&i2c0_pins>; + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <400000>; + status = "okay"; + + eeprom: eeprom@50 { + compatible = "atmel,24c256"; + reg = <0x50>; + pagesize = <64>; + status = "okay"; + }; + }; + }; + + fragment@1 { + target-path = "/aliases"; + __overlay__ { + i2c0 = "/soc/i2c@7e205000"; + }; + }; + + fragment@2 { + target-path = "/__symbols__"; + __overlay__ { + i2c0 = "/soc/i2c@7e205000"; + }; + }; +}; From 5aaac5ab46f2e347a59a88f0b8d6ff7335d86e7e Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Thu, 6 Oct 2022 09:57:29 +0200 Subject: [PATCH 129/183] dts: Add dtoverlay for connect4 Add the device overlay for RevPi Connect 4, following pin configurations are contained: * Digital Input and Output * LEDs * I2C1 (on which IO expanders and RTC connected) * SPI1 (on which TPM chip connected) * UART3 (Pibridge serial) * UART5 (RS485) Signed-off-by: Zhi Han --- arch/arm/boot/dts/overlays/Makefile | 1 + .../dts/overlays/revpi-connect4-overlay.dts | 298 ++++++++++++++++++ 2 files changed, 299 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/revpi-connect4-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile index 11adc1a9520113..8a191fb939581d 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile @@ -201,6 +201,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ revpi-connect-dt-blob.dtbo \ revpi-connect-se.dtbo \ revpi-connect-se-dt-blob.dtbo \ + revpi-connect4.dtbo \ revpi-con-can.dtbo \ revpi-flat.dtbo \ revpi-flat-s-2022.dtbo \ diff --git a/arch/arm/boot/dts/overlays/revpi-connect4-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect4-overlay.dts new file mode 100644 index 00000000000000..5536a7bd6d1f2a --- /dev/null +++ b/arch/arm/boot/dts/overlays/revpi-connect4-overlay.dts @@ -0,0 +1,298 @@ +// SPDX-License-Identifier: GPL-2.0-only +/dts-v1/; +/plugin/; +#include +#include +#include + +/ { + compatible = "brcm,bcm2711"; + + fragment@0 { + target-path = "/"; + __overlay__ { + compatible = "kunbus,revpi-connect4", "brcm,bcm2711"; + + pibridge { + pinctrl-names = "default"; + compatible = "kunbus,pibridge"; + pinctrl-0 = <&digital_io_pins>; + + /* digital IN, digital OUT */ + connect-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>, + <&gpio 16 GPIO_ACTIVE_HIGH>; + + left-sniff-gpios = <&expander_core 8 GPIO_ACTIVE_HIGH>, + <&expander_core 9 GPIO_ACTIVE_HIGH>; + right-sniff-gpios = <&expander_core 11 GPIO_ACTIVE_HIGH>, + <&expander_core 12 GPIO_ACTIVE_HIGH>; + }; + + leds { + compatible = "gpio-leds"; + power_red { + label = "power:1:fault"; + gpios = <&expander_core 0 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "power_red"; + }; + a1_red { + label = "a1:red:status"; + gpios = <&expander_core 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a1_red"; + }; + a1_green { + label = "a1:green:status"; + gpios = <&expander_core 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a1_green"; + }; + a1_blue { + label = "a1:blue:status"; + gpios = <&expander_core 3 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a1_blue"; + }; + a2_red { + label = "a2:red:status"; + gpios = <&expander_core 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a2_red"; + }; + a2_green { + label = "a2:green:status"; + gpios = <&expander_core 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a2_green"; + }; + a2_blue { + label = "a2:blue:status"; + gpios = <&expander_core 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a2_blue"; + }; + a3_red { + label = "a3:red:status"; + gpios = <&expander_power 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a3_red"; + }; + a3_green { + label = "a3:green:status"; + gpios = <&expander_power 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a3_green"; + }; + a3_blue { + label = "a3:blue:status"; + gpios = <&expander_power 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a3_blue"; + }; + a4_red { + label = "a4:red:status"; + gpios = <&expander_power 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a4_red"; + }; + a4_green { + label = "a4:green:status"; + gpios = <&expander_power 9 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a4_green"; + }; + a4_blue { + label = "a4:blue:status"; + gpios = <&expander_power 10 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a4_blue"; + }; + a5_red { + label = "a5:red:status"; + gpios = <&expander_power 11 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a5_red"; + }; + a5_green { + label = "a5:green:status"; + gpios = <&expander_power 12 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a5_green"; + }; + a5_blue { + label = "a5:blue:status"; + gpios = <&expander_power 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "a5_blue"; + }; + }; + }; + }; + + /* PINMUX */ + fragment@1 { + target = <&gpio>; + __overlay__ { + pb_uart_pins: pb_uart_pins { + /* TX RX TX_EN */ + brcm,pins = <4 5 7>; + brcm,function = ; + brcm,pull = ; + }; + digital_io_pins: digital_io_pins { + /* digital IN digital OUT */ + brcm,pins = <6 16>; + brcm,function = ; + brcm,pull = ; + }; + exp_core_pins: exp_core_pins { + /* IRQ */ + brcm,pins = <8>; + brcm,function = ; + brcm,pull = ; + }; + exp_power_pins: exp_power_pins { + /* IRQ */ + brcm,pins = <9>; + brcm,function = ; + brcm,pull = ; + }; + rs485_pins: rs485_pins { + /* TX RX TX_EN */ + brcm,pins = <12 13 15>; + brcm,function = ; + brcm,pull = ; + }; + spi1_cs_pins: spi1_cs_pins { + /* tpm (SPI1_CE0_N) */ + brcm,pins = <18>; + brcm,function = ; + brcm,pull = ; + }; + spi1_pins: spi1_pins { + /* MISO MOSI SCLK */ + brcm,pins = <19 20 21>; + brcm,function = ; + brcm,pull = ; + }; + tpm_pins: tpm_pins { + /* IRQ */ + brcm,pins = <10>; + brcm,function = ; + brcm,pull = ; + }; + }; + }; + + fragment@2 { + target = <&i2c1_pins>; + __overlay__ { + /* SDA SCL */ + brcm,pins = <2 3>; + brcm,function = ; + brcm,pull = ; + }; + }; + + /* I2C1 */ + fragment@3 { + target = <&i2c1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins>; + clock-frequency = <400000>; + status = "okay"; + + expander_power: gpio@21 { + /* 100kHz, 400kHz */ + compatible = "nxp,pcal6416"; + pinctrl-names = "default"; + pinctrl-0 = <&exp_power_pins>; + reg = <0x21>; + gpio-controller; + #gpio-cells = <2>; + status = "okay"; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + interrupts = <9 IRQ_TYPE_LEVEL_LOW>; + }; + + expander_core: gpio@22 { + /* 100kHz, 400kHz */ + compatible = "nxp,pcal6524"; + pinctrl-names = "default"; + pinctrl-0 = <&exp_core_pins>; + reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; + status = "okay"; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio>; + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; + }; + + rtc@51 { + /* 100kHz, 400kHz */ + compatible = "nxp,pcf2129"; + reg = <0x51>; + status = "okay"; + reset-source; + }; + + /* For system management of PCIe device, not used for now*/ + pcie@38 { + reg = <0x38>; + status = "disabled"; + }; + }; + }; + + /* SPI1 */ + fragment@4 { + target = <&spi1>; + __overlay__ { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins>, <&spi1_cs_pins>; + cs-gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + status = "okay"; + + tpm: tpm@0 { + compatible = "infineon,slb9670"; + pinctrl-names = "default"; + pinctrl-0 = <&tpm_pins>; + reg = <0>; + spi-max-frequency = <1000000>; + interrupt-parent = <&gpio>; + #interrupt-cells = <2>; + interrupts = <10 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + }; + }; + }; + + /* UART5 (RS485)*/ + fragment@5 { + target = <&uart5>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&rs485_pins>; + status = "okay"; + linux,rs485-enabled-at-boot-time; + rs485-term-gpios = <&expander_power 4 GPIO_ACTIVE_LOW>; + }; + }; + + /* UART3 (PB_SERIAL) */ + fragment@6 { + target = <&uart3>; + __overlay__ { + pinctrl-names = "default"; + pinctrl-0 = <&pb_uart_pins>; + status = "okay"; + linux,rs485-enabled-at-boot-time; + }; + }; + + /* PCIe0 */ + fragment@7 { + target = <&pcie0>; + __overlay__ { + /* No configuration till now*/ + }; + }; +}; From 2d91c2d7258df2138de387167cf09a41d57b37f8 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Mon, 9 Jan 2023 23:55:16 +0100 Subject: [PATCH 130/183] ARM: dts: revpi-flat-s-2022: Use mainline driver for WiFi We've just amended the mwifiex mainline driver to support IW416, the chipset on which Maya WiFi modules are based. So use the mainline driver instead of NXP's out-of-tree driver in the RevPi Flat S 2022 devicetree overlay. While at it, take advantage of the existing SD8787 power sequencing driver in the mainline kernel. Signed-off-by: Lukas Wunner --- .../dts/overlays/revpi-flat-s-2022-overlay.dts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts index 574d09fcbca414..85e825f4c1bb12 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-s-2022-overlay.dts @@ -37,8 +37,9 @@ }; wlan_pwrseq: wlan_pwrseq { - compatible = "mmc-pwrseq-simple"; - reset-gpios = <&expander 12 GPIO_ACTIVE_LOW>; + compatible = "mmc-pwrseq-sd8787"; + reset-gpios = <&expander 10 GPIO_ACTIVE_HIGH>; + powerdown-gpios = <&expander 12 GPIO_ACTIVE_HIGH>; }; leds { @@ -345,14 +346,10 @@ mmc-pwrseq = <&wlan_pwrseq>; status = "okay"; - sdxxx-wlan { - cfg80211_wext = <0xf>; - cal_data_cfg = "none"; - max_vir_bss=<1>; - ps_mode=<1>; - auto_ds=<1>; - host_mlme=<1>; - fw_name="nxp/sdiouartiw416_combo_v0.bin"; + wlan0: wifi@1 { + compatible = "nxp,iw416"; + reg = <1>; + status = "okay"; }; }; }; From cad2f1e38ae4e2959290e31cef66da6a7a9c310a Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Mon, 8 May 2023 16:18:51 +0200 Subject: [PATCH 131/183] ARM: dts: revpi-flat: Use reset driver for TPM We've just refactored taking the TPM out of reset on boot: Instead of amending TPM code to toggle a reset GPIO, the TPM code now uses high level functions to request reset control and deassert reset. The actual toggling of the GPIO is handled by a separate reset driver. The previous approach ran afoul with TPM upstream maintainers: https://lore.kernel.org/all/YlgPxX3xCPUyR2F6@kernel.org/ They will hopefully find the new approach more acceptable as it is much less intrusive. Should they still dislike it, we may alternatively try to upstream support for generically deasserting specific reset controllers on boot, thus bypassing TPM code completely. Change the RevPi Flat's devicetree overlay to take advantage of the new approach. Signed-off-by: Lukas Wunner --- arch/arm/boot/dts/overlays/revpi-flat-overlay.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts index 44881e3c346a40..4334b1c7dc150a 100644 --- a/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-flat-overlay.dts @@ -41,6 +41,12 @@ reset-gpios = <&expander 10 GPIO_ACTIVE_LOW>; }; + tpm_reset: tpm_reset { + compatible = "infineon,slb9670-reset"; + #reset-cells = <0>; + reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + watchdog: watchdog { pinctrl-names = "default"; pinctrl-0 = <&watchdog_gpio4>; @@ -264,10 +270,10 @@ pinctrl-0 = <&tpm_pins>; reg = <3>; spi-max-frequency = <1000000>; /* <= 43 MHz */ - reset-gpio = <&gpio 0 GPIO_ACTIVE_LOW>; interrupt-parent = <&gpio>; #interrupt-cells = <2>; interrupts = <1 IRQ_TYPE_LEVEL_LOW>; + resets = <&tpm_reset>; status = "okay"; }; }; From b227ddf655f5c51982282680ef0e08887d21c2a3 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Sun, 28 Nov 2021 12:08:57 +0100 Subject: [PATCH 132/183] ci: Introduce snapshold builds and linter Run linter (checkpatch) against every PR to enforce some sort of code quality. Also shapshot builds can be triggered in a PR by adding the label 'snapshot-packages'. With every merge into the revpi-5.10 branch snapshot builds are generated automatically Signed-off-by: Nicolai Buchwitz --- .github/workflows/linter.yml | 14 +++++++++ .github/workflows/merge-packages.yml | 12 ++++++++ .github/workflows/snapshot-packages.yml | 40 +++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 .github/workflows/linter.yml create mode 100644 .github/workflows/merge-packages.yml create mode 100644 .github/workflows/snapshot-packages.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000000000..cdb825adef0d02 --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,14 @@ +name: Linter +on: + #- push + - pull_request +jobs: + checkpatch_linter: + name: checkpatch + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Run checkpatch linter + uses: webispy/checkpatch-action@master diff --git a/.github/workflows/merge-packages.yml b/.github/workflows/merge-packages.yml new file mode 100644 index 00000000000000..8ab3f0153f9b5f --- /dev/null +++ b/.github/workflows/merge-packages.yml @@ -0,0 +1,12 @@ +name: Build +on: + push: + branches: + - revpi-5.10 +jobs: + kernelbakery_snapshot: + name: snapshot + uses: RevolutionPi/ci-workflows/.github/workflows/kernel-snapshot.yml@main + with: + kernelbakery_branch: master + picontrol_branch: master diff --git a/.github/workflows/snapshot-packages.yml b/.github/workflows/snapshot-packages.yml new file mode 100644 index 00000000000000..8c0022916d582d --- /dev/null +++ b/.github/workflows/snapshot-packages.yml @@ -0,0 +1,40 @@ +name: Build +on: + pull_request: + types: + - labeled +jobs: + kernelbakery_snapshot: + name: snapshot + if: ${{ github.event_name == 'pull_request' && github.event.label.name == 'snapshot-packages'}} + uses: RevolutionPi/ci-workflows/.github/workflows/kernel-snapshot.yml@main + with: + kernelbakery_branch: master + picontrol_branch: master + build_commit: ${{ github.event.pull_request.head.sha }} + link_artifacts: + name: link artifacts in PR + if: ${{ (github.event_name == 'pull_request' && github.event.label.name == 'snapshot-packages') }} + needs: kernelbakery_snapshot + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '📦 Your snapshot packages are ready! https://github.com/RevolutionPi/linux/actions/runs/${{github.run_id}}' + }) + - uses: actions/github-script@v5 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: 'snapshot-packages' + }) From 02f2b027f4e01ec33c15853d845ef7dde1a49dbb Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Wed, 5 Oct 2022 12:23:46 +0200 Subject: [PATCH 133/183] CI: Disable artifacts notification There are some problems with the artifacts notifications from forks. This results in a failed action and needs to be disabled (at least for now). Signed-off-by: Nicolai Buchwitz --- .github/workflows/snapshot-packages.yml | 52 ++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/snapshot-packages.yml b/.github/workflows/snapshot-packages.yml index 8c0022916d582d..a949313801089a 100644 --- a/.github/workflows/snapshot-packages.yml +++ b/.github/workflows/snapshot-packages.yml @@ -12,29 +12,29 @@ jobs: kernelbakery_branch: master picontrol_branch: master build_commit: ${{ github.event.pull_request.head.sha }} - link_artifacts: - name: link artifacts in PR - if: ${{ (github.event_name == 'pull_request' && github.event.label.name == 'snapshot-packages') }} - needs: kernelbakery_snapshot - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v5 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: '📦 Your snapshot packages are ready! https://github.com/RevolutionPi/linux/actions/runs/${{github.run_id}}' - }) - - uses: actions/github-script@v5 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: 'snapshot-packages' - }) + # link_artifacts: + # name: link artifacts in PR + # if: ${{ (github.event_name == 'pull_request' && github.event.label.name == 'snapshot-packages') }} + # needs: kernelbakery_snapshot + # runs-on: ubuntu-latest + # steps: + # - uses: actions/github-script@v5 + # with: + # github-token: ${{secrets.GITHUB_TOKEN}} + # script: | + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: '📦 Your snapshot packages are ready! https://github.com/RevolutionPi/linux/actions/runs/${{github.run_id}}' + # }) + # - uses: actions/github-script@v5 + # with: + # github-token: ${{secrets.GITHUB_TOKEN}} + # script: | + # github.rest.issues.removeLabel({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # name: 'snapshot-packages' + # }) From 8fef75c8acfdeb8367fdbbc56e54f4d1867123af Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Wed, 5 Oct 2022 12:28:25 +0200 Subject: [PATCH 134/183] CI: Introduce arm64 snapshot builds From now on there will be also arm64 snapshot packages, if the label `snapshot-packages` is specified in a PR . In order to build only `arm` or `arm64` snapshot packages, the labels `snapshot-packages-arm` or `snapshot-packages-arm64` can be used. Signed-off-by: Nicolai Buchwitz --- .github/workflows/snapshot-packages.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snapshot-packages.yml b/.github/workflows/snapshot-packages.yml index a949313801089a..b4f9ecd2bf2c38 100644 --- a/.github/workflows/snapshot-packages.yml +++ b/.github/workflows/snapshot-packages.yml @@ -4,14 +4,28 @@ on: types: - labeled jobs: - kernelbakery_snapshot: - name: snapshot - if: ${{ github.event_name == 'pull_request' && github.event.label.name == 'snapshot-packages'}} + kernelbakery_snapshot_arm: + name: Snapshot Packages ARM + if: | + github.event_name == 'pull_request' && + (github.event.label.name == 'snapshot-packages' || github.event.label.name == 'snapshot-packages-arm') uses: RevolutionPi/ci-workflows/.github/workflows/kernel-snapshot.yml@main with: kernelbakery_branch: master picontrol_branch: master build_commit: ${{ github.event.pull_request.head.sha }} + arch: arm + kernelbakery_snapshot_arm64: + name: Snapshot Packages ARM64 + if: | + github.event_name == 'pull_request' && + (github.event.label.name == 'snapshot-packages' || github.event.label.name == 'snapshot-packages-arm64') + uses: RevolutionPi/ci-workflows/.github/workflows/kernel-snapshot.yml@main + with: + kernelbakery_branch: master + picontrol_branch: master + build_commit: ${{ github.event.pull_request.head.sha }} + arch: arm64 # link_artifacts: # name: link artifacts in PR # if: ${{ (github.event_name == 'pull_request' && github.event.label.name == 'snapshot-packages') }} From eb56dd81e16db2b5772c29b486b9b0b81ae40e20 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Thu, 27 Oct 2022 12:27:33 +0200 Subject: [PATCH 135/183] CI: Build arm/arm64 snapshot packages on merge With the introduction of arm64 builds we should also build arm64 packages on successfull merge and not only arm. Signed-off-by: Nicolai Buchwitz --- .github/workflows/merge-packages.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge-packages.yml b/.github/workflows/merge-packages.yml index 8ab3f0153f9b5f..8ae5cd15ad7cc8 100644 --- a/.github/workflows/merge-packages.yml +++ b/.github/workflows/merge-packages.yml @@ -4,9 +4,19 @@ on: branches: - revpi-5.10 jobs: - kernelbakery_snapshot: - name: snapshot + kernelbakery_snapshot_arm: + name: Snapshot Packages ARM uses: RevolutionPi/ci-workflows/.github/workflows/kernel-snapshot.yml@main with: kernelbakery_branch: master picontrol_branch: master + build_commit: ${{ github.event.pull_request.head.sha }} + arch: arm + kernelbakery_snapshot_arm64: + name: Snapshot Packages ARM64 + uses: RevolutionPi/ci-workflows/.github/workflows/kernel-snapshot.yml@main + with: + kernelbakery_branch: master + picontrol_branch: master + build_commit: ${{ github.event.pull_request.head.sha }} + arch: arm64 \ No newline at end of file From 1144d132c5ea8f841213ee61a1419d4cbc09ca84 Mon Sep 17 00:00:00 2001 From: Zhi Han Date: Mon, 29 Apr 2019 14:53:21 +0200 Subject: [PATCH 136/183] serdev: Add serdev device driver pibridge. The functions was located in out-of-tree kernel module piControl (github.com/RevolutionPi/piControl). To make the further refactoring of the piControl easier, a serdev device driver is needed for the serial port access, replacing the kernel_write/rev interfaces. Signed-off-by: Lukas Wunner Signed-off-by: Zhi Han --- .../dts/overlays/revpi-connect-overlay.dts | 4 + .../boot/dts/overlays/revpi-core-overlay.dts | 5 + drivers/tty/serdev/Kconfig | 10 + drivers/tty/serdev/Makefile | 1 + drivers/tty/serdev/pibridge.c | 409 ++++++++++++++++++ include/linux/pibridge_comm.h | 16 + 6 files changed, 445 insertions(+) create mode 100644 drivers/tty/serdev/pibridge.c create mode 100644 include/linux/pibridge_comm.h diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 4033f20ebe4b6a..ab93132d6894db 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -284,6 +284,10 @@ pinctrl-0 = <&rs485_pins>; linux,rs485-enabled-at-boot-time; status = "okay"; + pibridge { + compatible = "kunbus,pibridge"; + current-speed = <115200>; + }; }; }; diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 8495a3866342df..b8ba64b202026a 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -258,6 +258,11 @@ pinctrl-0 = <&rs485_pins>; linux,rs485-enabled-at-boot-time; status = "okay"; + + pibridge { + compatible = "kunbus,pibridge"; + current-speed = <115200>; + }; }; }; diff --git a/drivers/tty/serdev/Kconfig b/drivers/tty/serdev/Kconfig index 46ae732bfc68ab..4c4720c39a7192 100644 --- a/drivers/tty/serdev/Kconfig +++ b/drivers/tty/serdev/Kconfig @@ -22,4 +22,14 @@ config SERIAL_DEV_CTRL_TTYPORT depends on SERIAL_DEV_BUS != m default y +config SERIAL_DEV_MUX_PIBRIDGE + tristate "PiBridge" + help + Say Y here if you want to use the PiBridge bus. + + If unsure, say N. + depends on TTY + depends on SERIAL_DEV_BUS != m + default n + endif diff --git a/drivers/tty/serdev/Makefile b/drivers/tty/serdev/Makefile index 078417e5b06860..fb5b9ed39dbae9 100644 --- a/drivers/tty/serdev/Makefile +++ b/drivers/tty/serdev/Makefile @@ -4,3 +4,4 @@ serdev-objs := core.o obj-$(CONFIG_SERIAL_DEV_BUS) += serdev.o obj-$(CONFIG_SERIAL_DEV_CTRL_TTYPORT) += serdev-ttyport.o +obj-$(CONFIG_SERIAL_DEV_MUX_PIBRIDGE) += pibridge.o diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c new file mode 100644 index 00000000000000..2b7312117ac6b3 --- /dev/null +++ b/drivers/tty/serdev/pibridge.c @@ -0,0 +1,409 @@ +#include +#include +#include +#include +#include +#include +#include + +#define REV_PI_IO_TIMEOUT 10 // msec +#define REV_PI_RECV_BUFFER_SIZE 100 + +#define pb_err(n, fmt, ...) \ + do {\ + static int cc = 0;\ + if (cc < n && pibridge_s ){\ + dev_err(&pibridge_s->serdev->dev, fmt, ##__VA_ARGS__);\ + cc ++;\ + }\ + } while (0) + +struct pibridge { + struct serdev_device *serdev; + + struct mutex lock; + struct kfifo read_fifo; + wait_queue_head_t read_queue; +}; + +static struct pibridge *pibridge_s; /* unique instance of the pibridge */ + +static int pibridge_receive_buf(struct serdev_device *serdev, + const unsigned char *buf, size_t count) +{ + struct pibridge *pi = serdev_device_get_drvdata(serdev); + int ret; + + mutex_lock(&pi->lock); + ret = kfifo_in(&pi->read_fifo, buf, count); + mutex_unlock(&pi->lock); + + wake_up_interruptible(&pi->read_queue); + + if (ret < count) + pb_err(25, "put received buffer to fifo error(count:%d, ret:%d)\n", count, ret); + return ret; +} + +static const struct serdev_device_ops pibridge_serdev_ops = { + .receive_buf = pibridge_receive_buf, + .write_wakeup = serdev_device_write_wakeup, +}; + +static int pibridge_parse_dt(struct serdev_device *serdev) +{ + struct device_node *node = serdev->dev.of_node; + u32 speed = 115200; + + of_property_read_u32(node, "current-speed", &speed); + serdev_device_set_baudrate(serdev, speed); + + /* RTS is used to drive Transmit Enable pin, hence no flow control */ + serdev_device_set_flow_control(serdev, false); + + return serdev_device_set_parity(serdev, SERDEV_PARITY_EVEN); +} + + +static int pibridge_probe(struct serdev_device *serdev) +{ + struct device *dev = &serdev->dev; + struct pibridge *pi; + int ret; + + pi = devm_kzalloc(dev, sizeof(*pi), GFP_KERNEL); + if (!pi) + return -ENOMEM; + + pibridge_s = pi; + pi->serdev = serdev; + + serdev_device_set_drvdata(serdev, pi); + serdev_device_set_client_ops(serdev, &pibridge_serdev_ops); + + mutex_init(&pi->lock); + init_waitqueue_head(&pi->read_queue); + + ret = kfifo_alloc(&pi->read_fifo, REV_PI_RECV_BUFFER_SIZE, GFP_KERNEL); + if (ret) + return ret; + + ret = serdev_device_open(serdev); + if (ret) + goto err_kfifo_free; + + ret = pibridge_parse_dt(serdev); + if (ret) + goto err_serdev_close; + + return 0; + +err_serdev_close: + serdev_device_close(serdev); +err_kfifo_free: + kfifo_free(&pi->read_fifo); + return ret; +} + +static void pibridge_remove(struct serdev_device *serdev) +{ + struct pibridge *pi = serdev_device_get_drvdata(serdev); + + serdev_device_close(serdev); + + kfifo_free(&pi->read_fifo); +}; + +#ifdef CONFIG_OF +static const struct of_device_id pibridge_of_match[] = { + { .compatible = "kunbus,pibridge" }, + {}, +}; +MODULE_DEVICE_TABLE(of, pibridge_of_match); +#endif + +static struct serdev_device_driver pibridge_driver = { + .driver = { + .name = "pibridge", + .of_match_table = of_match_ptr(pibridge_of_match), + }, + .probe = pibridge_probe, + .remove = pibridge_remove, +}; +module_serdev_device_driver(pibridge_driver); + + +/*****************/ + +int pibridge_send(u8 *buf, u16 len) +{ + struct pibridge *pi = pibridge_s; + struct serdev_device *serdev = pi->serdev; + int ret; + + ret = serdev_device_write(serdev, buf, len, MAX_SCHEDULE_TIMEOUT); + if (ret < 0) + pb_err(25, "write to serdev error(len:%d)\n", len); + + /* read fifo may contain stale bytes */ + mutex_lock(&pi->lock); + kfifo_reset(&pi->read_fifo); + mutex_unlock(&pi->lock); + + serdev_device_wait_until_sent(serdev, 0); + + return ret; +} + +int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) +{ + struct pibridge *pi = pibridge_s; + int jiffies; + int ret; + + jiffies = wait_event_timeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, + msecs_to_jiffies(timeout)); + mutex_lock(&pi->lock); + if (jiffies){ + ret = kfifo_out(&pi->read_fifo, buf, len); + } else { + ret = 0; + } + mutex_unlock(&pi->lock); + if (ret < len) + pb_err(25, "receive message error(len:%d, ret:%d, jiffies:%d, fifo:%d)\n", + len, ret, jiffies, kfifo_len(&pi->read_fifo)); + return ret; +} + +int pibridge_recv(u8 *buf, u16 len) +{ + /* using default timeout REV_PI_IO_TIMEOUT */ + return pibridge_recv_timeout(buf, len, REV_PI_IO_TIMEOUT); +} + +#pragma pack(1) +struct pibridge_pkthdr_gate{ + u8 dst; + u8 src; + u16 cmd; + u16 seq; + u8 len; +}; + +u8 pibridge_crc8(u8 base, u8 *data, u16 len) +{ + u8 ret = base; + + while (len--) { + ret = ret ^ data[len]; + } + return ret; +} + +int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) +{ + struct pibridge_pkthdr_gate pkthdr; + u8 crc; + + pkthdr.dst = dst; + pkthdr.src = 0; + pkthdr.cmd = cmd; + pkthdr.seq = 0; + pkthdr.len = snd_len; + + if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr))){ + pb_err(25, "send head error in gate-send\n"); + return -EIO; + } + if (snd_len != 0){ + if (pibridge_send(snd_buf, snd_len)){ + pb_err(25, "send data error in gate-send(len:%d)\n", + snd_len); + return -EIO; + } + + } + + crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); + if (snd_len != 0){ + crc = pibridge_crc8(crc, snd_buf, snd_len); + } + + if (pibridge_send(&crc, sizeof(u8))){ + pb_err(25, "send crc error in gate-send\n"); + return -EIO; + } + + return 0; +} +EXPORT_SYMBOL(pibridge_req_send_gate); + +#define PIBRIDGE_RESP_CMD 0x3fff +#define PIBRIDGE_RESP_OK 0x4000 +#define PIBRIDGE_RESP_ERR 0x8000 + +int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, + u8 *rcv_buf, u16 rcv_len, u16 tmt) +{ + struct pibridge_pkthdr_gate pkthdr; + u8 crc_rcv; + u8 crc; + + + if (pibridge_req_send_gate(dst, cmd, snd_buf, snd_len)){ + pb_err(25, "send message error in gate-req(dst:%d, cmd:%d, len:%d)\n", + dst, cmd, snd_len); + return -EIO; + } + + if (sizeof(pkthdr) != pibridge_recv_timeout((u8 *)&pkthdr, sizeof(pkthdr), tmt)){ + pb_err(25, "receive head error in gate-req(hdr_len:%d, timeout:%d, data0:%c)\n", + sizeof(pkthdr), tmt, snd_buf?snd_buf[0]:0); + return -EIO; + } + + if (rcv_len != 0) { + if (rcv_len != pibridge_recv(rcv_buf, rcv_len)){ + pb_err(25, "receive data error in gate-req(len:%d)\n", rcv_len); + return -EIO; + } + } + + if (sizeof(u8) != pibridge_recv(&crc_rcv, sizeof(u8))){ + pb_err(25, "receive crc error in gate-req\n"); + return -EIO; + } + + crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); + + if (rcv_len != 0){ + crc = pibridge_crc8(crc, rcv_buf, rcv_len); + } + if (crc != crc_rcv){ + return -EBADMSG; + } + + if (!(pkthdr.cmd & PIBRIDGE_RESP_OK)){ + pb_err(25, "bad responsed OK code in gate-req(cmd:%d)\n", + pkthdr.cmd); + return -EBADMSG; + } + + if (pkthdr.cmd & PIBRIDGE_RESP_ERR){ + pb_err(25, "bad responsed ERR code in gate-req(cmd:%d)\n", + pkthdr.cmd); + return -EBADMSG; + } + + if ((pkthdr.cmd & PIBRIDGE_RESP_CMD) != cmd ){ + pb_err(25, "bad responsed CMD code in gate-req(cmd:%d)\n", + pkthdr.cmd); + return -EBADMSG; + } + + if (rcv_len != pkthdr.len) + pb_err(25, "received len is not as expected in gate-req(received:%d, expected:%d)\n", + pkthdr.len, rcv_len); + + return 0; +} +EXPORT_SYMBOL(pibridge_req_gate_tmt); + +int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, + u8 *rcv_buf, u16 rcv_len) +{ + return pibridge_req_gate_tmt(dst, cmd, snd_buf, snd_len, + rcv_buf, rcv_len, REV_PI_IO_TIMEOUT); +} +EXPORT_SYMBOL(pibridge_req_gate); +struct pibridge_pkthdr_io +{ + u8 addr :6; + u8 typ :1; /* 0 for unicast, 1 for broadcast */ + u8 rsp :1; /*always be 0 for sending, might be 1 for receiving*/ + + u8 len :5; + u8 cmd :3; /* 0 for broadcast*/ +}; + +int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) +{ + struct pibridge_pkthdr_io pkthdr; + u8 crc; + + pkthdr.addr = addr; + pkthdr.typ = (addr == 0x3f) ? 1 : 0; /* 0 for unicast, 1 for broadcast */ + pkthdr.cmd = cmd; + pkthdr.len = snd_len; + + if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr))){ + pb_err(25, "send head error in io-send(len:%d)\n", + sizeof(pkthdr)); + return -EIO; + } + + if (snd_len != 0){ + if (pibridge_send(snd_buf, snd_len)){ + pb_err(25, "send data error in io-send(len:%d)\n", + snd_len); + return -EIO; + } + } + crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(crc, snd_buf, snd_len); + if (pibridge_send(&crc, sizeof(u8))){ + pb_err(25, "send crc error in io-send\n"); + return -EIO; + } + + return 0; +} +EXPORT_SYMBOL(pibridge_req_send_io); + +int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 rcv_len) +{ + struct pibridge_pkthdr_io pkthdr; + u8 crc_rcv; + u8 crc; + + if (pibridge_req_send_io(addr, cmd, snd_buf, snd_len)) { + pb_err(25, "send message error in io-req(addr:%d, cmd:%d, len:%d)\n", + addr, cmd, snd_len); + return -EIO; + } + + if (sizeof(pkthdr) != pibridge_recv((u8 *)&pkthdr, sizeof(pkthdr))) { + pb_err(25, "receive head error in io-req\n"); + return -EIO; + } + + if(rcv_len != 0){ + if (rcv_len != pibridge_recv(rcv_buf, rcv_len)) { + pb_err(25, "receive data error in io-req\n"); + return -EBADMSG; + } + } + if (sizeof(u8) != pibridge_recv(&crc_rcv, sizeof(u8))) { + pb_err(25, "receive crc error in io-req\n"); + return -EIO; + } + + crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(crc, rcv_buf, rcv_len); + if (crc != crc_rcv) { + pb_err(25, "check crc error in io-req\n"); + return -EBADMSG; + } + + /*received header check is not performed in io mode*/ + + if (rcv_len != pkthdr.len) + pb_err(25, "received len is not as expected in io-req(received:%d, expected:%d)\n", + pkthdr.len, rcv_len); + + return 0; +} +EXPORT_SYMBOL(pibridge_req_io); + +MODULE_LICENSE("GPL"); diff --git a/include/linux/pibridge_comm.h b/include/linux/pibridge_comm.h new file mode 100644 index 00000000000000..37fedb16480d09 --- /dev/null +++ b/include/linux/pibridge_comm.h @@ -0,0 +1,16 @@ + +#ifndef _PIBRIDGE_COMM_H +#define _PIBRIDGE_COMM_H + +int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, + u16 rcv_len); +int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len); +int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, + u16 rcv_len); +int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, + u8 *rcv_buf, u16 rcv_len, u16 tmt); +int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len); +int pibridge_recv(u8 *buf, u16 len); +int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout); +int pibridge_send(u8 *buf, u16 len); +#endif /* _PIBRIDGE_COMM_H */ From b070e2984177622a8b4b6deb11aac151fe2eb0a2 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 2 Aug 2022 15:53:07 +0200 Subject: [PATCH 137/183] pibridge-serdev: remove superfluous configuration settings Remove "default n" for config option SERIAL_DEV_MUX_PIBRIDGE since "disabled" is already the default state for config options. Also dependencies "TTY" and "SERIAL_DEV_BUS != m" are not required. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/tty/serdev/Kconfig b/drivers/tty/serdev/Kconfig index 4c4720c39a7192..7c3972e9914740 100644 --- a/drivers/tty/serdev/Kconfig +++ b/drivers/tty/serdev/Kconfig @@ -28,8 +28,5 @@ config SERIAL_DEV_MUX_PIBRIDGE Say Y here if you want to use the PiBridge bus. If unsure, say N. - depends on TTY - depends on SERIAL_DEV_BUS != m - default n endif From 1ddbe3aaea05d4f738b814432134e168e7e32559 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 15 Jul 2022 18:08:47 +0200 Subject: [PATCH 138/183] pibridge-serdev: Adjust driver name and compatible string The compatible name "kunbus,pibridge" collides with the name used by the current piControl kernel module. So instead (temporarily) use the name "kunbus,pi-bridge" instead. Also adjust the driver name accordingly. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 2b7312117ac6b3..e62a51665bd10d 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -116,7 +116,7 @@ static void pibridge_remove(struct serdev_device *serdev) #ifdef CONFIG_OF static const struct of_device_id pibridge_of_match[] = { - { .compatible = "kunbus,pibridge" }, + { .compatible = "kunbus,pi-bridge" }, {}, }; MODULE_DEVICE_TABLE(of, pibridge_of_match); @@ -124,7 +124,7 @@ MODULE_DEVICE_TABLE(of, pibridge_of_match); static struct serdev_device_driver pibridge_driver = { .driver = { - .name = "pibridge", + .name = "pi-bridge", .of_match_table = of_match_ptr(pibridge_of_match), }, .probe = pibridge_probe, From 9271e9b84a0a792d52f3d8a0164c8b0705c80fc4 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 15 Jul 2022 18:01:59 +0200 Subject: [PATCH 139/183] dts/revpi-core,connect: rename pibridge serdev compatible The compatible name "kunbus,pibridge" is already used for the pibridge node that is used by the piControl kernel module. To avoid naming collision in the device tree use the compatible "kunbus,pi-bridge" instead. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 4 ++-- arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index ab93132d6894db..17c5df8753668a 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -284,8 +284,8 @@ pinctrl-0 = <&rs485_pins>; linux,rs485-enabled-at-boot-time; status = "okay"; - pibridge { - compatible = "kunbus,pibridge"; + pi_bridge { + compatible = "kunbus,pi-bridge"; current-speed = <115200>; }; }; diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index b8ba64b202026a..1ce95778857474 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -259,8 +259,8 @@ linux,rs485-enabled-at-boot-time; status = "okay"; - pibridge { - compatible = "kunbus,pibridge"; + pi_bridge { + compatible = "kunbus,pi-bridge"; current-speed = <115200>; }; }; From 53e680b1652c47856c2b96f8e78cd72b07910a6a Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 15 Jul 2022 18:54:50 +0200 Subject: [PATCH 140/183] pibridge-serdev: export functions Export the following functions and thus make them available for users of the pibridge serdev device: - pibridge_send() - pibridge_recv_timeout() - pibridge_recv() Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index e62a51665bd10d..def306554b94bc 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -154,6 +154,7 @@ int pibridge_send(u8 *buf, u16 len) return ret; } +EXPORT_SYMBOL(pibridge_send); int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) { @@ -175,12 +176,14 @@ int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) len, ret, jiffies, kfifo_len(&pi->read_fifo)); return ret; } +EXPORT_SYMBOL(pibridge_recv_timeout); int pibridge_recv(u8 *buf, u16 len) { /* using default timeout REV_PI_IO_TIMEOUT */ return pibridge_recv_timeout(buf, len, REV_PI_IO_TIMEOUT); } +EXPORT_SYMBOL(pibridge_recv); #pragma pack(1) struct pibridge_pkthdr_gate{ From 5ef290c1380980aa2ddf5b97628d849136c9a4ac Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 15 Jul 2022 19:14:36 +0200 Subject: [PATCH 141/183] pibridge-serdev: do not wait for response for bc gateway frames There is no response for broadcast gateway frames. So in this case return immediately in pibridge_req_gate_tmt(). Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index def306554b94bc..3945c645e0b4b3 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -8,6 +8,7 @@ #define REV_PI_IO_TIMEOUT 10 // msec #define REV_PI_RECV_BUFFER_SIZE 100 +#define REV_PI_BC_ADDR 0xff #define pb_err(n, fmt, ...) \ do {\ @@ -259,6 +260,9 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, dst, cmd, snd_len); return -EIO; } + /* Do not wait for a response in case of a broadcast address */ + if (dst == REV_PI_BC_ADDR) + return 0; if (sizeof(pkthdr) != pibridge_recv_timeout((u8 *)&pkthdr, sizeof(pkthdr), tmt)){ pb_err(25, "receive head error in gate-req(hdr_len:%d, timeout:%d, data0:%c)\n", From e5238d5f94aac3962dbfd5b744ac814c17c13f14 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 18 Jul 2022 12:55:44 +0200 Subject: [PATCH 142/183] pibridge-serdev: fix check for return value of pibridge_send() The function pibridge_send() returns a positive value when sending one or more bytes was successful. So do not treat this as an error. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 3945c645e0b4b3..414809df531c70 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -216,12 +216,12 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) pkthdr.seq = 0; pkthdr.len = snd_len; - if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr))){ + if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr)) < 0){ pb_err(25, "send head error in gate-send\n"); return -EIO; } if (snd_len != 0){ - if (pibridge_send(snd_buf, snd_len)){ + if (pibridge_send(snd_buf, snd_len) < 0){ pb_err(25, "send data error in gate-send(len:%d)\n", snd_len); return -EIO; @@ -234,7 +234,7 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) crc = pibridge_crc8(crc, snd_buf, snd_len); } - if (pibridge_send(&crc, sizeof(u8))){ + if (pibridge_send(&crc, sizeof(u8)) < 0){ pb_err(25, "send crc error in gate-send\n"); return -EIO; } @@ -344,14 +344,14 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) pkthdr.cmd = cmd; pkthdr.len = snd_len; - if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr))){ + if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr)) < 0){ pb_err(25, "send head error in io-send(len:%d)\n", sizeof(pkthdr)); return -EIO; } if (snd_len != 0){ - if (pibridge_send(snd_buf, snd_len)){ + if (pibridge_send(snd_buf, snd_len) < 0){ pb_err(25, "send data error in io-send(len:%d)\n", snd_len); return -EIO; @@ -359,7 +359,7 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) } crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); crc = pibridge_crc8(crc, snd_buf, snd_len); - if (pibridge_send(&crc, sizeof(u8))){ + if (pibridge_send(&crc, sizeof(u8)) < 0){ pb_err(25, "send crc error in io-send\n"); return -EIO; } From 5ca41102fbd05dd2bad6230e7669b76ba79dec95 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 18 Jul 2022 13:30:46 +0200 Subject: [PATCH 143/183] pibridge-serdev: Instead of pragma directive use packed attribute Instead of a pragma(1) use the more common packed attribute to make sure that structs pibridge_pkthdr_gate and pibridge_pkthdr_io are packed. This is more explicit and also eliminates the danger that other structures that are added in future get accidently packet when defined below the pragma directive. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 414809df531c70..92a4c84f8aa87a 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -186,14 +186,13 @@ int pibridge_recv(u8 *buf, u16 len) } EXPORT_SYMBOL(pibridge_recv); -#pragma pack(1) -struct pibridge_pkthdr_gate{ +struct pibridge_pkthdr_gate { u8 dst; u8 src; u16 cmd; u16 seq; u8 len; -}; +} __attribute__((packed)); u8 pibridge_crc8(u8 base, u8 *data, u16 len) { @@ -324,6 +323,7 @@ int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, rcv_buf, rcv_len, REV_PI_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_req_gate); + struct pibridge_pkthdr_io { u8 addr :6; @@ -332,7 +332,7 @@ struct pibridge_pkthdr_io u8 len :5; u8 cmd :3; /* 0 for broadcast*/ -}; +} __attribute__((packed)); int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) { From af9458c6b7b5a99b3579d6b7cfef5960bf004b99 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 2 Aug 2022 17:20:30 +0200 Subject: [PATCH 144/183] pibridge-serdev: Declare pibridge_crc8() static Function pibridge_crc8() is supposed to be only used internally, so declare it as "static". Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 92a4c84f8aa87a..ff0f0cd4d107d7 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -194,7 +194,7 @@ struct pibridge_pkthdr_gate { u8 len; } __attribute__((packed)); -u8 pibridge_crc8(u8 base, u8 *data, u16 len) +static u8 pibridge_crc8(u8 base, u8 *data, u16 len) { u8 ret = base; From 1abed7f77669010eeb35029b5465a0cb6079249f Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 18 Jul 2022 13:12:51 +0200 Subject: [PATCH 145/183] pibridge-serdev: Fix various formatting issues Fix formatting issues like - missing spaces - superfluous spaces and lines - unaligned code - first evaluate functions in comparisons Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 129 ++++++++++++++++------------------ 1 file changed, 62 insertions(+), 67 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index ff0f0cd4d107d7..7a81aaf8dde1e3 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -1,10 +1,10 @@ #include +#include +#include +#include #include #include #include -#include -#include -#include #define REV_PI_IO_TIMEOUT 10 // msec #define REV_PI_RECV_BUFFER_SIZE 100 @@ -30,7 +30,7 @@ struct pibridge { static struct pibridge *pibridge_s; /* unique instance of the pibridge */ static int pibridge_receive_buf(struct serdev_device *serdev, - const unsigned char *buf, size_t count) + const unsigned char *buf, size_t count) { struct pibridge *pi = serdev_device_get_drvdata(serdev); int ret; @@ -111,7 +111,6 @@ static void pibridge_remove(struct serdev_device *serdev) struct pibridge *pi = serdev_device_get_drvdata(serdev); serdev_device_close(serdev); - kfifo_free(&pi->read_fifo); }; @@ -133,7 +132,6 @@ static struct serdev_device_driver pibridge_driver = { }; module_serdev_device_driver(pibridge_driver); - /*****************/ int pibridge_send(u8 *buf, u16 len) @@ -163,10 +161,11 @@ int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) int jiffies; int ret; - jiffies = wait_event_timeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout)); + jiffies = wait_event_timeout(pi->read_queue, + kfifo_len(&pi->read_fifo) >= len, + msecs_to_jiffies(timeout)); mutex_lock(&pi->lock); - if (jiffies){ + if (jiffies) { ret = kfifo_out(&pi->read_fifo, buf, len); } else { ret = 0; @@ -174,7 +173,7 @@ int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) mutex_unlock(&pi->lock); if (ret < len) pb_err(25, "receive message error(len:%d, ret:%d, jiffies:%d, fifo:%d)\n", - len, ret, jiffies, kfifo_len(&pi->read_fifo)); + len, ret, jiffies, kfifo_len(&pi->read_fifo)); return ret; } EXPORT_SYMBOL(pibridge_recv_timeout); @@ -198,9 +197,8 @@ static u8 pibridge_crc8(u8 base, u8 *data, u16 len) { u8 ret = base; - while (len--) { + while (len--) ret = ret ^ data[len]; - } return ret; } @@ -215,25 +213,24 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) pkthdr.seq = 0; pkthdr.len = snd_len; - if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr)) < 0){ + if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { pb_err(25, "send head error in gate-send\n"); return -EIO; } - if (snd_len != 0){ - if (pibridge_send(snd_buf, snd_len) < 0){ + if (snd_len != 0) { + if (pibridge_send(snd_buf, snd_len) < 0) { pb_err(25, "send data error in gate-send(len:%d)\n", - snd_len); + snd_len); return -EIO; } } - crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); - if (snd_len != 0){ + crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); + if (snd_len != 0) crc = pibridge_crc8(crc, snd_buf, snd_len); - } - if (pibridge_send(&crc, sizeof(u8)) < 0){ + if (pibridge_send(&crc, sizeof(u8)) < 0) { pb_err(25, "send crc error in gate-send\n"); return -EIO; } @@ -253,64 +250,64 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 crc_rcv; u8 crc; - - if (pibridge_req_send_gate(dst, cmd, snd_buf, snd_len)){ + if (pibridge_req_send_gate(dst, cmd, snd_buf, snd_len)) { pb_err(25, "send message error in gate-req(dst:%d, cmd:%d, len:%d)\n", - dst, cmd, snd_len); + dst, cmd, snd_len); return -EIO; } /* Do not wait for a response in case of a broadcast address */ if (dst == REV_PI_BC_ADDR) return 0; - if (sizeof(pkthdr) != pibridge_recv_timeout((u8 *)&pkthdr, sizeof(pkthdr), tmt)){ + if (pibridge_recv_timeout((u8 *) &pkthdr, sizeof(pkthdr), tmt) != + sizeof(pkthdr)) { pb_err(25, "receive head error in gate-req(hdr_len:%d, timeout:%d, data0:%c)\n", - sizeof(pkthdr), tmt, snd_buf?snd_buf[0]:0); + sizeof(pkthdr), tmt, snd_buf ? snd_buf[0] : 0); return -EIO; } if (rcv_len != 0) { - if (rcv_len != pibridge_recv(rcv_buf, rcv_len)){ - pb_err(25, "receive data error in gate-req(len:%d)\n", rcv_len); + if (pibridge_recv(rcv_buf, rcv_len) != rcv_len) { + pb_err(25, "receive data error in gate-req(len:%d)\n", + rcv_len); return -EIO; } } - if (sizeof(u8) != pibridge_recv(&crc_rcv, sizeof(u8))){ + if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { pb_err(25, "receive crc error in gate-req\n"); return -EIO; } - crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); - if (rcv_len != 0){ + if (rcv_len != 0) crc = pibridge_crc8(crc, rcv_buf, rcv_len); - } - if (crc != crc_rcv){ + + if (crc != crc_rcv) return -EBADMSG; - } - if (!(pkthdr.cmd & PIBRIDGE_RESP_OK)){ - pb_err(25, "bad responsed OK code in gate-req(cmd:%d)\n", - pkthdr.cmd); + if (!(pkthdr.cmd & PIBRIDGE_RESP_OK)) { + pb_err(25, "bad responded OK code in gate-req(cmd:%d)\n", + pkthdr.cmd); return -EBADMSG; } - if (pkthdr.cmd & PIBRIDGE_RESP_ERR){ - pb_err(25, "bad responsed ERR code in gate-req(cmd:%d)\n", - pkthdr.cmd); + if (pkthdr.cmd & PIBRIDGE_RESP_ERR) { + pb_err(25, "bad responded ERR code in gate-req(cmd:%d)\n", + pkthdr.cmd); return -EBADMSG; } - if ((pkthdr.cmd & PIBRIDGE_RESP_CMD) != cmd ){ - pb_err(25, "bad responsed CMD code in gate-req(cmd:%d)\n", - pkthdr.cmd); + if ((pkthdr.cmd & PIBRIDGE_RESP_CMD) != cmd) { + pb_err(25, "bad responded CMD code in gate-req(cmd:%d)\n", + pkthdr.cmd); return -EBADMSG; } if (rcv_len != pkthdr.len) pb_err(25, "received len is not as expected in gate-req(received:%d, expected:%d)\n", - pkthdr.len, rcv_len); + pkthdr.len, rcv_len); return 0; } @@ -319,17 +316,15 @@ EXPORT_SYMBOL(pibridge_req_gate_tmt); int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 rcv_len) { - return pibridge_req_gate_tmt(dst, cmd, snd_buf, snd_len, - rcv_buf, rcv_len, REV_PI_IO_TIMEOUT); + return pibridge_req_gate_tmt(dst, cmd, snd_buf, snd_len, rcv_buf, + rcv_len, REV_PI_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_req_gate); -struct pibridge_pkthdr_io -{ +struct pibridge_pkthdr_io { u8 addr :6; - u8 typ :1; /* 0 for unicast, 1 for broadcast */ + u8 type :1; /* 0 for unicast, 1 for broadcast */ u8 rsp :1; /*always be 0 for sending, might be 1 for receiving*/ - u8 len :5; u8 cmd :3; /* 0 for broadcast*/ } __attribute__((packed)); @@ -340,26 +335,27 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) u8 crc; pkthdr.addr = addr; - pkthdr.typ = (addr == 0x3f) ? 1 : 0; /* 0 for unicast, 1 for broadcast */ + pkthdr.type = (addr == 0x3f) ? 1 : 0; /* 0 for unicast, 1 for broadcast */ pkthdr.cmd = cmd; pkthdr.len = snd_len; - if (pibridge_send((u8 *)&pkthdr, sizeof(pkthdr)) < 0){ + if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { pb_err(25, "send head error in io-send(len:%d)\n", - sizeof(pkthdr)); + sizeof(pkthdr)); return -EIO; } - if (snd_len != 0){ - if (pibridge_send(snd_buf, snd_len) < 0){ + if (snd_len != 0) { + if (pibridge_send(snd_buf, snd_len) < 0) { pb_err(25, "send data error in io-send(len:%d)\n", - snd_len); + snd_len); return -EIO; } } - crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); crc = pibridge_crc8(crc, snd_buf, snd_len); - if (pibridge_send(&crc, sizeof(u8)) < 0){ + + if (pibridge_send(&crc, sizeof(u8)) < 0) { pb_err(25, "send crc error in io-send\n"); return -EIO; } @@ -376,39 +372,38 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 if (pibridge_req_send_io(addr, cmd, snd_buf, snd_len)) { pb_err(25, "send message error in io-req(addr:%d, cmd:%d, len:%d)\n", - addr, cmd, snd_len); + addr, cmd, snd_len); return -EIO; } - if (sizeof(pkthdr) != pibridge_recv((u8 *)&pkthdr, sizeof(pkthdr))) { + if (pibridge_recv((u8 *) &pkthdr, sizeof(pkthdr)) != sizeof(pkthdr)) { pb_err(25, "receive head error in io-req\n"); return -EIO; } - if(rcv_len != 0){ - if (rcv_len != pibridge_recv(rcv_buf, rcv_len)) { + if (rcv_len != 0) { + if (pibridge_recv(rcv_buf, rcv_len) != rcv_len) { pb_err(25, "receive data error in io-req\n"); return -EBADMSG; } } - if (sizeof(u8) != pibridge_recv(&crc_rcv, sizeof(u8))) { + + if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { pb_err(25, "receive crc error in io-req\n"); return -EIO; } - crc = pibridge_crc8(0, (u8 *)&pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); crc = pibridge_crc8(crc, rcv_buf, rcv_len); + if (crc != crc_rcv) { pb_err(25, "check crc error in io-req\n"); return -EBADMSG; } - /*received header check is not performed in io mode*/ - if (rcv_len != pkthdr.len) pb_err(25, "received len is not as expected in io-req(received:%d, expected:%d)\n", - pkthdr.len, rcv_len); - + pkthdr.len, rcv_len); return 0; } EXPORT_SYMBOL(pibridge_req_io); From 182b16ced7836a89e511dee04c233b84f43f379d Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 2 Aug 2022 18:55:38 +0200 Subject: [PATCH 146/183] dt-bindings: vendor-prefixes: Add KUNBUS GmbH vendor prefix Add prefix for KUNBUS GmbH. Signed-off-by: Lino Sanfilippo --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 8e61f905d79cc7..963890849ba1ac 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -689,6 +689,8 @@ patternProperties: description: Sutajio Ko-Usagi PTE Ltd. "^kvg,.*": description: Kverneland Group + "^kunbus,.*": + description: KUNBUS GmbH "^kyo,.*": description: Kyocera Corporation "^lacie,.*": From cf50aa30c3cda490b5e63d338abf92ee789f03a2 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Wed, 3 Aug 2022 13:00:44 +0200 Subject: [PATCH 147/183] pibridge-serdev: Remove custom function to print eror messages Instead of the custom implementation to print ratelimited messages, use the functions provided by the kernel. Also use only message level "warning" instead of "error" to let the caller decide if the exceptional condition is an error or not. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 101 ++++++++++++++++++---------------- 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 7a81aaf8dde1e3..8663395f738c1f 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -10,15 +10,6 @@ #define REV_PI_RECV_BUFFER_SIZE 100 #define REV_PI_BC_ADDR 0xff -#define pb_err(n, fmt, ...) \ - do {\ - static int cc = 0;\ - if (cc < n && pibridge_s ){\ - dev_err(&pibridge_s->serdev->dev, fmt, ##__VA_ARGS__);\ - cc ++;\ - }\ - } while (0) - struct pibridge { struct serdev_device *serdev; @@ -42,7 +33,9 @@ static int pibridge_receive_buf(struct serdev_device *serdev, wake_up_interruptible(&pi->read_queue); if (ret < count) - pb_err(25, "put received buffer to fifo error(count:%d, ret:%d)\n", count, ret); + dev_warn_ratelimited(&serdev->dev, + "failed to fill receive fifo (received: %d, filled: %d)\n", + count, ret); return ret; } @@ -141,9 +134,6 @@ int pibridge_send(u8 *buf, u16 len) int ret; ret = serdev_device_write(serdev, buf, len, MAX_SCHEDULE_TIMEOUT); - if (ret < 0) - pb_err(25, "write to serdev error(len:%d)\n", len); - /* read fifo may contain stale bytes */ mutex_lock(&pi->lock); kfifo_reset(&pi->read_fifo); @@ -172,8 +162,9 @@ int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) } mutex_unlock(&pi->lock); if (ret < len) - pb_err(25, "receive message error(len:%d, ret:%d, jiffies:%d, fifo:%d)\n", - len, ret, jiffies, kfifo_len(&pi->read_fifo)); + dev_warn_ratelimited(&pi->serdev->dev, + "receive message error(len:%d, ret:%d, jiffies:%d, fifo:%d)\n", + len, ret, jiffies, kfifo_len(&pi->read_fifo)); return ret; } EXPORT_SYMBOL(pibridge_recv_timeout); @@ -214,13 +205,14 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) pkthdr.len = snd_len; if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { - pb_err(25, "send head error in gate-send\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send head error in gate-send\n"); return -EIO; } if (snd_len != 0) { if (pibridge_send(snd_buf, snd_len) < 0) { - pb_err(25, "send data error in gate-send(len:%d)\n", - snd_len); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send data error in gate-send(len:%d)\n", snd_len); return -EIO; } @@ -231,7 +223,8 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) crc = pibridge_crc8(crc, snd_buf, snd_len); if (pibridge_send(&crc, sizeof(u8)) < 0) { - pb_err(25, "send crc error in gate-send\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send crc error in gate-send\n"); return -EIO; } @@ -251,8 +244,9 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 crc; if (pibridge_req_send_gate(dst, cmd, snd_buf, snd_len)) { - pb_err(25, "send message error in gate-req(dst:%d, cmd:%d, len:%d)\n", - dst, cmd, snd_len); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send message error in gate-req(dst:%d, cmd:%d, len:%d)\n", + dst, cmd, snd_len); return -EIO; } /* Do not wait for a response in case of a broadcast address */ @@ -261,21 +255,24 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, if (pibridge_recv_timeout((u8 *) &pkthdr, sizeof(pkthdr), tmt) != sizeof(pkthdr)) { - pb_err(25, "receive head error in gate-req(hdr_len:%d, timeout:%d, data0:%c)\n", + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "receive head error in gate-req(hdr_len:%d, timeout:%d, data0:%c)\n", sizeof(pkthdr), tmt, snd_buf ? snd_buf[0] : 0); return -EIO; } if (rcv_len != 0) { if (pibridge_recv(rcv_buf, rcv_len) != rcv_len) { - pb_err(25, "receive data error in gate-req(len:%d)\n", - rcv_len); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "receive data error in gate-req(len:%d)\n", + rcv_len); return -EIO; } } if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { - pb_err(25, "receive crc error in gate-req\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "receive crc error in gate-req\n"); return -EIO; } @@ -288,26 +285,30 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, return -EBADMSG; if (!(pkthdr.cmd & PIBRIDGE_RESP_OK)) { - pb_err(25, "bad responded OK code in gate-req(cmd:%d)\n", - pkthdr.cmd); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "bad responded OK code in gate-req(cmd:%d)\n", + pkthdr.cmd); return -EBADMSG; } if (pkthdr.cmd & PIBRIDGE_RESP_ERR) { - pb_err(25, "bad responded ERR code in gate-req(cmd:%d)\n", - pkthdr.cmd); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "bad responded ERR code in gate-req(cmd:%d)\n", + pkthdr.cmd); return -EBADMSG; } if ((pkthdr.cmd & PIBRIDGE_RESP_CMD) != cmd) { - pb_err(25, "bad responded CMD code in gate-req(cmd:%d)\n", - pkthdr.cmd); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "bad responded CMD code in gate-req(cmd:%d)\n", + pkthdr.cmd); return -EBADMSG; } if (rcv_len != pkthdr.len) - pb_err(25, "received len is not as expected in gate-req(received:%d, expected:%d)\n", - pkthdr.len, rcv_len); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "received len is not as expected in gate-req(received:%d, expected:%d)\n", + pkthdr.len, rcv_len); return 0; } @@ -340,15 +341,16 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) pkthdr.len = snd_len; if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { - pb_err(25, "send head error in io-send(len:%d)\n", - sizeof(pkthdr)); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send head error in io-send(len:%d)\n", sizeof(pkthdr)); return -EIO; } if (snd_len != 0) { if (pibridge_send(snd_buf, snd_len) < 0) { - pb_err(25, "send data error in io-send(len:%d)\n", - snd_len); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send data error in io-send(len:%d)\n", + snd_len); return -EIO; } } @@ -356,7 +358,8 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) crc = pibridge_crc8(crc, snd_buf, snd_len); if (pibridge_send(&crc, sizeof(u8)) < 0) { - pb_err(25, "send crc error in io-send\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send crc error in io-send\n"); return -EIO; } @@ -371,25 +374,29 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 u8 crc; if (pibridge_req_send_io(addr, cmd, snd_buf, snd_len)) { - pb_err(25, "send message error in io-req(addr:%d, cmd:%d, len:%d)\n", - addr, cmd, snd_len); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "send message error in io-req(addr:%d, cmd:%d, len:%d)\n", + addr, cmd, snd_len); return -EIO; } if (pibridge_recv((u8 *) &pkthdr, sizeof(pkthdr)) != sizeof(pkthdr)) { - pb_err(25, "receive head error in io-req\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "receive head error in io-req\n"); return -EIO; } if (rcv_len != 0) { if (pibridge_recv(rcv_buf, rcv_len) != rcv_len) { - pb_err(25, "receive data error in io-req\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "receive data error in io-req\n"); return -EBADMSG; } } if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { - pb_err(25, "receive crc error in io-req\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "receive crc error in io-req\n"); return -EIO; } @@ -397,13 +404,15 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 crc = pibridge_crc8(crc, rcv_buf, rcv_len); if (crc != crc_rcv) { - pb_err(25, "check crc error in io-req\n"); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "check crc error in io-req\n"); return -EBADMSG; } /*received header check is not performed in io mode*/ if (rcv_len != pkthdr.len) - pb_err(25, "received len is not as expected in io-req(received:%d, expected:%d)\n", - pkthdr.len, rcv_len); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "received len is not as expected in io-req(received:%d, expected:%d)\n", + pkthdr.len, rcv_len); return 0; } EXPORT_SYMBOL(pibridge_req_io); From 48f7d7a32d3d1bd5e58da2cb9c48a6d49be4e89c Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Wed, 3 Aug 2022 15:00:18 +0200 Subject: [PATCH 148/183] pibridge-serdev: add function to clear receive fifo Add function pibridge_clear_fifo() that clears the receive fifo. This is supposed to be used prior to requesting data to make sure that old data is not intermixed with new received data. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 8 ++++++++ include/linux/pibridge_comm.h | 1 + 2 files changed, 9 insertions(+) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 8663395f738c1f..2b0f43e601dea5 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -145,6 +145,14 @@ int pibridge_send(u8 *buf, u16 len) } EXPORT_SYMBOL(pibridge_send); +void pibridge_clear_fifo(void) +{ + mutex_lock(&pibridge_s->lock); + kfifo_reset(&pibridge_s->read_fifo); + mutex_unlock(&pibridge_s->lock); +} +EXPORT_SYMBOL(pibridge_clear_fifo); + int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) { struct pibridge *pi = pibridge_s; diff --git a/include/linux/pibridge_comm.h b/include/linux/pibridge_comm.h index 37fedb16480d09..5cb15682614ad2 100644 --- a/include/linux/pibridge_comm.h +++ b/include/linux/pibridge_comm.h @@ -13,4 +13,5 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len); int pibridge_recv(u8 *buf, u16 len); int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout); int pibridge_send(u8 *buf, u16 len); +void pibridge_clear_fifo(void); #endif /* _PIBRIDGE_COMM_H */ From 48d868cc7d1fd6562e1fe510adc765f47082285e Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Wed, 3 Aug 2022 20:06:00 +0200 Subject: [PATCH 149/183] pibridge-serdev: do not clear receive fifo in pibridge_send() In pibridge_send() the receive fifo is cleared to make sure that stale data is not intermixed with newly requested data. However Clearing the fifo after the data request is sent to the hardware modules is unsafe: In case that the data arrives too fast, also the new data may be erased. Furthermore as a low level function pibridge_send() should not clear() any data at all but only do a single task, namely send data. For these reasons remove the concerning code from the function and instead clear the data in the higher-level functions pibridge_req_gate_tmt() and pibridge_req_io() which implement complete transactions. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 2b0f43e601dea5..81a9a911d23ed4 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -134,11 +134,6 @@ int pibridge_send(u8 *buf, u16 len) int ret; ret = serdev_device_write(serdev, buf, len, MAX_SCHEDULE_TIMEOUT); - /* read fifo may contain stale bytes */ - mutex_lock(&pi->lock); - kfifo_reset(&pi->read_fifo); - mutex_unlock(&pi->lock); - serdev_device_wait_until_sent(serdev, 0); return ret; @@ -251,6 +246,9 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 crc_rcv; u8 crc; + /* Read fifo may contain stale data, so clear it first */ + pibridge_clear_fifo(); + if (pibridge_req_send_gate(dst, cmd, snd_buf, snd_len)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send message error in gate-req(dst:%d, cmd:%d, len:%d)\n", @@ -381,6 +379,9 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 u8 crc_rcv; u8 crc; + /* Read fifo may contain stale data, so clear it first */ + pibridge_clear_fifo(); + if (pibridge_req_send_io(addr, cmd, snd_buf, snd_len)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send message error in io-req(addr:%d, cmd:%d, len:%d)\n", From a4d83e516094a0518d11798785b784e8a13f28ff Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 4 Aug 2022 11:17:42 +0200 Subject: [PATCH 150/183] pibridge-serdev: improve error check in pibridge_recv_timeout() Instead of checking the jiffies returned by wait_event_timeout() check directly if the requested number of bytes is available in the read queue. This has the advantage to cover the case when the timeout specified in wait_event_timeout() has expired before the requested data has arrived but then the data arrives immediately after the function returns. By doing this remove superfluous brackets in the if-statement. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 81a9a911d23ed4..0eebf984fed3e0 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -158,12 +158,12 @@ int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) kfifo_len(&pi->read_fifo) >= len, msecs_to_jiffies(timeout)); mutex_lock(&pi->lock); - if (jiffies) { + if (kfifo_len(&pi->read_fifo) >= len) ret = kfifo_out(&pi->read_fifo, buf, len); - } else { + else ret = 0; - } mutex_unlock(&pi->lock); + if (ret < len) dev_warn_ratelimited(&pi->serdev->dev, "receive message error(len:%d, ret:%d, jiffies:%d, fifo:%d)\n", From cef3afeac7f0500ee276fc2c0d68749888faa576 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 29 Aug 2022 17:10:56 +0200 Subject: [PATCH 151/183] pibridge-serdev: include pibridge_comm header file Include the pibridge_comm header file in pibridge.c Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 0eebf984fed3e0..b69266da004f10 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #define REV_PI_IO_TIMEOUT 10 // msec From 453f380b175cfd76074016e7aa4373b28eaca5a8 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 1 Sep 2022 18:10:26 +0200 Subject: [PATCH 152/183] pibridge-serdev: Add a function to discard a given number of bytes Add function pibridge_discard_timeout() which waits for a given number of bytes to be received and then discards them. This helper can be used to get rid of received bytes that do not fit into a provided receive buffer. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index b69266da004f10..115e1702c17056 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -108,6 +108,25 @@ static void pibridge_remove(struct serdev_device *serdev) kfifo_free(&pi->read_fifo); }; +static int pibridge_discard_timeout(u16 len, u16 timeout) +{ + struct pibridge *pi = pibridge_s; + int ret; + + ret = wait_event_timeout(pi->read_queue, + kfifo_len(&pi->read_fifo) >= len, + msecs_to_jiffies(timeout)); + mutex_lock(&pi->lock); + if (kfifo_len(&pi->read_fifo) >= len) + ret = 0; + else + ret = -1; + kfifo_reset(&pi->read_fifo);; + mutex_unlock(&pi->lock); + + return ret; +} + #ifdef CONFIG_OF static const struct of_device_id pibridge_of_match[] = { { .compatible = "kunbus,pi-bridge" }, From db9f68b63307d250de8d443e9a345c6cc6edbf70 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 2 Sep 2022 22:37:17 +0200 Subject: [PATCH 153/183] pibridge-serdev: Handle unexpected data length in reponse packet In pibridge_req_gate_tmt() handle the case that the response packet contains more data than expected (i.e. the provided buffer is too small): Fill the receive buffer and then discard the rest of the packet including the following CRC. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 67 +++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 27 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 115e1702c17056..dd4ff648156526 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -113,9 +113,10 @@ static int pibridge_discard_timeout(u16 len, u16 timeout) struct pibridge *pi = pibridge_s; int ret; - ret = wait_event_timeout(pi->read_queue, - kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout)); + wait_event_timeout(pi->read_queue, + kfifo_len(&pi->read_fifo) >= len, + msecs_to_jiffies(timeout)); + mutex_lock(&pi->lock); if (kfifo_len(&pi->read_fifo) >= len) ret = 0; @@ -263,6 +264,8 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 rcv_len, u16 tmt) { struct pibridge_pkthdr_gate pkthdr; + u16 to_receive; + u16 to_discard; u8 crc_rcv; u8 crc; @@ -287,28 +290,50 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, return -EIO; } - if (rcv_len != 0) { - if (pibridge_recv(rcv_buf, rcv_len) != rcv_len) { + crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); + + to_receive = min((u16) pkthdr.len, rcv_len); + to_discard = pkthdr.len - to_receive; + + if (to_receive) { + if (pibridge_recv(rcv_buf, to_receive) != to_receive) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "receive data error in gate-req(len:%d)\n", - rcv_len); + to_receive); return -EIO; } } - if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { + if (to_discard) { + /* The provided buffer was too small. Discard the rest of the + received data as well as the following CRC checksum byte. */ + if (pibridge_discard_timeout(to_discard + 1, tmt)) + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "failed to discard %u bytes within timeout\n", + to_discard); dev_warn_ratelimited(&pibridge_s->serdev->dev, - "receive crc error in gate-req\n"); - return -EIO; - } - - crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); + "received packet truncated (%u bytes missing)\n", + to_discard); + return -EBADMSG; + } else { + /* We got the whole data, now get the CRC */ + if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "failed to receive CRC in gate-req\n"); + return -EIO; + } + crc = pibridge_crc8(crc, rcv_buf, pkthdr.len); - if (rcv_len != 0) - crc = pibridge_crc8(crc, rcv_buf, rcv_len); + if (crc != crc_rcv) + return -EBADMSG; + } - if (crc != crc_rcv) + if ((pkthdr.cmd & PIBRIDGE_RESP_CMD) != cmd) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "bad responded CMD code in gate-req(cmd:%d)\n", + pkthdr.cmd); return -EBADMSG; + } if (!(pkthdr.cmd & PIBRIDGE_RESP_OK)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, @@ -324,18 +349,6 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, return -EBADMSG; } - if ((pkthdr.cmd & PIBRIDGE_RESP_CMD) != cmd) { - dev_warn_ratelimited(&pibridge_s->serdev->dev, - "bad responded CMD code in gate-req(cmd:%d)\n", - pkthdr.cmd); - return -EBADMSG; - } - - if (rcv_len != pkthdr.len) - dev_warn_ratelimited(&pibridge_s->serdev->dev, - "received len is not as expected in gate-req(received:%d, expected:%d)\n", - pkthdr.len, rcv_len); - return 0; } EXPORT_SYMBOL(pibridge_req_gate_tmt); From 66fb0c0e06f9bdb5bb6247c31902e99238bc75fa Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 5 Sep 2022 09:35:42 +0200 Subject: [PATCH 154/183] pibridge-serdev: remove superflous assignment in pibridge_recv_timeout() Do not store the return value of wait_event_timeout() in function pibridge_recv_timeout(), since the value is not evaluated anyway. Also we can get rid of the local variable named "jiffies" which due to the same name like the kernel global variable that tracks the number of ticks since system startup may lead to confusion or even issues if in future code changes the local declaration is accidentally removed. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index dd4ff648156526..e77376af2df875 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -172,12 +172,12 @@ EXPORT_SYMBOL(pibridge_clear_fifo); int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) { struct pibridge *pi = pibridge_s; - int jiffies; int ret; - jiffies = wait_event_timeout(pi->read_queue, - kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout)); + wait_event_timeout(pi->read_queue, + kfifo_len(&pi->read_fifo) >= len, + msecs_to_jiffies(timeout)); + mutex_lock(&pi->lock); if (kfifo_len(&pi->read_fifo) >= len) ret = kfifo_out(&pi->read_fifo, buf, len); @@ -185,10 +185,6 @@ int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) ret = 0; mutex_unlock(&pi->lock); - if (ret < len) - dev_warn_ratelimited(&pi->serdev->dev, - "receive message error(len:%d, ret:%d, jiffies:%d, fifo:%d)\n", - len, ret, jiffies, kfifo_len(&pi->read_fifo)); return ret; } EXPORT_SYMBOL(pibridge_recv_timeout); From e1794f46bf14faaf33698abce756a6fc26e988d9 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 5 Sep 2022 10:57:02 +0200 Subject: [PATCH 155/183] pibridge-serdev: Do not read baudrate from device tree The hardware modules connected to the pi-bridge always use a communication speed of 115200 baud. So set this value in the driver instead of reading it from the device tree. Also rename function pibridge_parse_dt() to the now more appropriate name pibridge_set_serial(). Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index e77376af2df875..d7c71f04581390 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -7,6 +7,7 @@ #include #include +#define PIBRIDGE_BAUDRATE 115200 #define REV_PI_IO_TIMEOUT 10 // msec #define REV_PI_RECV_BUFFER_SIZE 100 #define REV_PI_BC_ADDR 0xff @@ -45,17 +46,11 @@ static const struct serdev_device_ops pibridge_serdev_ops = { .write_wakeup = serdev_device_write_wakeup, }; -static int pibridge_parse_dt(struct serdev_device *serdev) +static int pibridge_set_serial(struct serdev_device *serdev) { - struct device_node *node = serdev->dev.of_node; - u32 speed = 115200; - - of_property_read_u32(node, "current-speed", &speed); - serdev_device_set_baudrate(serdev, speed); - + serdev_device_set_baudrate(serdev, PIBRIDGE_BAUDRATE); /* RTS is used to drive Transmit Enable pin, hence no flow control */ serdev_device_set_flow_control(serdev, false); - return serdev_device_set_parity(serdev, SERDEV_PARITY_EVEN); } @@ -87,7 +82,7 @@ static int pibridge_probe(struct serdev_device *serdev) if (ret) goto err_kfifo_free; - ret = pibridge_parse_dt(serdev); + ret = pibridge_set_serial(serdev); if (ret) goto err_serdev_close; From dd7af864f15f9157e0699eb1704210263d7c2807 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 5 Sep 2022 10:23:22 +0200 Subject: [PATCH 156/183] dts/revpi-core,connect: remove serial device speed property The pibridge speed is always 115200 baud and set in the driver. So remove the 'current-speed' device tree property. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 1 - arch/arm/boot/dts/overlays/revpi-core-overlay.dts | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 17c5df8753668a..30421426a48aa3 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -286,7 +286,6 @@ status = "okay"; pi_bridge { compatible = "kunbus,pi-bridge"; - current-speed = <115200>; }; }; }; diff --git a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts index 1ce95778857474..983a1037bd2e4e 100644 --- a/arch/arm/boot/dts/overlays/revpi-core-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-core-overlay.dts @@ -261,7 +261,6 @@ pi_bridge { compatible = "kunbus,pi-bridge"; - current-speed = <115200>; }; }; }; From 2503c5d27caa79d314fe53fb9db034e58b59a42f Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 5 Sep 2022 11:05:03 +0200 Subject: [PATCH 157/183] pibridge-serdev: rename constants Replace the REV_PI_* prefix with the more appropriate PIBRIDGE_ prefix in makro names. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index d7c71f04581390..5bad8b993a926f 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -8,9 +8,9 @@ #include #define PIBRIDGE_BAUDRATE 115200 -#define REV_PI_IO_TIMEOUT 10 // msec -#define REV_PI_RECV_BUFFER_SIZE 100 -#define REV_PI_BC_ADDR 0xff +#define PIBRIDGE_IO_TIMEOUT 10 // msec +#define PIBRIDGE_RECV_BUFFER_SIZE 100 +#define PIBRIDGE_BC_ADDR 0xff struct pibridge { struct serdev_device *serdev; @@ -74,7 +74,7 @@ static int pibridge_probe(struct serdev_device *serdev) mutex_init(&pi->lock); init_waitqueue_head(&pi->read_queue); - ret = kfifo_alloc(&pi->read_fifo, REV_PI_RECV_BUFFER_SIZE, GFP_KERNEL); + ret = kfifo_alloc(&pi->read_fifo, PIBRIDGE_RECV_BUFFER_SIZE, GFP_KERNEL); if (ret) return ret; @@ -186,8 +186,8 @@ EXPORT_SYMBOL(pibridge_recv_timeout); int pibridge_recv(u8 *buf, u16 len) { - /* using default timeout REV_PI_IO_TIMEOUT */ - return pibridge_recv_timeout(buf, len, REV_PI_IO_TIMEOUT); + /* using default timeout PIBRIDGE_IO_TIMEOUT */ + return pibridge_recv_timeout(buf, len, PIBRIDGE_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_recv); @@ -270,7 +270,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, return -EIO; } /* Do not wait for a response in case of a broadcast address */ - if (dst == REV_PI_BC_ADDR) + if (dst == PIBRIDGE_BC_ADDR) return 0; if (pibridge_recv_timeout((u8 *) &pkthdr, sizeof(pkthdr), tmt) != @@ -348,7 +348,7 @@ int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 rcv_len) { return pibridge_req_gate_tmt(dst, cmd, snd_buf, snd_len, rcv_buf, - rcv_len, REV_PI_IO_TIMEOUT); + rcv_len, PIBRIDGE_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_req_gate); From df524ab8bc57161325f6a2e3f7e5abd8aed16e57 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 5 Sep 2022 11:49:29 +0200 Subject: [PATCH 158/183] pibridge-serdev: relocate parts of the code Move all structs and makros to the beginning and the initial functions to the end of the file. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 139 +++++++++++++++++----------------- 1 file changed, 70 insertions(+), 69 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 5bad8b993a926f..59612a09813797 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -12,6 +12,10 @@ #define PIBRIDGE_RECV_BUFFER_SIZE 100 #define PIBRIDGE_BC_ADDR 0xff +#define PIBRIDGE_RESP_CMD 0x3fff +#define PIBRIDGE_RESP_OK 0x4000 +#define PIBRIDGE_RESP_ERR 0x8000 + struct pibridge { struct serdev_device *serdev; @@ -20,8 +24,33 @@ struct pibridge { wait_queue_head_t read_queue; }; +struct pibridge_pkthdr_gate { + u8 dst; + u8 src; + u16 cmd; + u16 seq; + u8 len; +} __attribute__((packed)); + +struct pibridge_pkthdr_io { + u8 addr :6; + u8 type :1; /* 0 for unicast, 1 for broadcast */ + u8 rsp :1; /*always be 0 for sending, might be 1 for receiving*/ + u8 len :5; + u8 cmd :3; /* 0 for broadcast*/ +} __attribute__((packed)); + static struct pibridge *pibridge_s; /* unique instance of the pibridge */ +static u8 pibridge_crc8(u8 base, u8 *data, u16 len) +{ + u8 ret = base; + + while (len--) + ret = ret ^ data[len]; + return ret; +} + static int pibridge_receive_buf(struct serdev_device *serdev, const unsigned char *buf, size_t count) { @@ -54,6 +83,25 @@ static int pibridge_set_serial(struct serdev_device *serdev) return serdev_device_set_parity(serdev, SERDEV_PARITY_EVEN); } +static int pibridge_discard_timeout(u16 len, u16 timeout) +{ + struct pibridge *pi = pibridge_s; + int ret; + + wait_event_timeout(pi->read_queue, + kfifo_len(&pi->read_fifo) >= len, + msecs_to_jiffies(timeout)); + + mutex_lock(&pi->lock); + if (kfifo_len(&pi->read_fifo) >= len) + ret = 0; + else + ret = -1; + kfifo_reset(&pi->read_fifo);; + mutex_unlock(&pi->lock); + + return ret; +} static int pibridge_probe(struct serdev_device *serdev) { @@ -74,7 +122,8 @@ static int pibridge_probe(struct serdev_device *serdev) mutex_init(&pi->lock); init_waitqueue_head(&pi->read_queue); - ret = kfifo_alloc(&pi->read_fifo, PIBRIDGE_RECV_BUFFER_SIZE, GFP_KERNEL); + ret = kfifo_alloc(&pi->read_fifo, PIBRIDGE_RECV_BUFFER_SIZE, + GFP_KERNEL); if (ret) return ret; @@ -103,44 +152,6 @@ static void pibridge_remove(struct serdev_device *serdev) kfifo_free(&pi->read_fifo); }; -static int pibridge_discard_timeout(u16 len, u16 timeout) -{ - struct pibridge *pi = pibridge_s; - int ret; - - wait_event_timeout(pi->read_queue, - kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout)); - - mutex_lock(&pi->lock); - if (kfifo_len(&pi->read_fifo) >= len) - ret = 0; - else - ret = -1; - kfifo_reset(&pi->read_fifo);; - mutex_unlock(&pi->lock); - - return ret; -} - -#ifdef CONFIG_OF -static const struct of_device_id pibridge_of_match[] = { - { .compatible = "kunbus,pi-bridge" }, - {}, -}; -MODULE_DEVICE_TABLE(of, pibridge_of_match); -#endif - -static struct serdev_device_driver pibridge_driver = { - .driver = { - .name = "pi-bridge", - .of_match_table = of_match_ptr(pibridge_of_match), - }, - .probe = pibridge_probe, - .remove = pibridge_remove, -}; -module_serdev_device_driver(pibridge_driver); - /*****************/ int pibridge_send(u8 *buf, u16 len) @@ -191,23 +202,6 @@ int pibridge_recv(u8 *buf, u16 len) } EXPORT_SYMBOL(pibridge_recv); -struct pibridge_pkthdr_gate { - u8 dst; - u8 src; - u16 cmd; - u16 seq; - u8 len; -} __attribute__((packed)); - -static u8 pibridge_crc8(u8 base, u8 *data, u16 len) -{ - u8 ret = base; - - while (len--) - ret = ret ^ data[len]; - return ret; -} - int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) { struct pibridge_pkthdr_gate pkthdr; @@ -247,10 +241,6 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) } EXPORT_SYMBOL(pibridge_req_send_gate); -#define PIBRIDGE_RESP_CMD 0x3fff -#define PIBRIDGE_RESP_OK 0x4000 -#define PIBRIDGE_RESP_ERR 0x8000 - int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 rcv_len, u16 tmt) { @@ -352,14 +342,6 @@ int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, } EXPORT_SYMBOL(pibridge_req_gate); -struct pibridge_pkthdr_io { - u8 addr :6; - u8 type :1; /* 0 for unicast, 1 for broadcast */ - u8 rsp :1; /*always be 0 for sending, might be 1 for receiving*/ - u8 len :5; - u8 cmd :3; /* 0 for broadcast*/ -} __attribute__((packed)); - int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) { struct pibridge_pkthdr_io pkthdr; @@ -397,7 +379,8 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) } EXPORT_SYMBOL(pibridge_req_send_io); -int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 rcv_len) +int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, + u16 rcv_len) { struct pibridge_pkthdr_io pkthdr; u8 crc_rcv; @@ -450,4 +433,22 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 } EXPORT_SYMBOL(pibridge_req_io); +#ifdef CONFIG_OF +static const struct of_device_id pibridge_of_match[] = { + { .compatible = "kunbus,pi-bridge" }, + {}, +}; +MODULE_DEVICE_TABLE(of, pibridge_of_match); +#endif + +static struct serdev_device_driver pibridge_driver = { + .driver = { + .name = "pi-bridge", + .of_match_table = of_match_ptr(pibridge_of_match), + }, + .probe = pibridge_probe, + .remove = pibridge_remove, +}; +module_serdev_device_driver(pibridge_driver); + MODULE_LICENSE("GPL"); From 452e402b8ed744aaaae822bc15e5e038d2927262 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 8 Sep 2022 12:26:00 +0200 Subject: [PATCH 159/183] dts/revpi-connect: fix minor formatting issue Make the formatting consistent with the revpi-core overlay by inserting a blank line before the "pi_bridge" node. Signed-off-by: Lino Sanfilippo --- arch/arm/boot/dts/overlays/revpi-connect-overlay.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts index 30421426a48aa3..c7b62acaec9245 100644 --- a/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts +++ b/arch/arm/boot/dts/overlays/revpi-connect-overlay.dts @@ -284,6 +284,7 @@ pinctrl-0 = <&rs485_pins>; linux,rs485-enabled-at-boot-time; status = "okay"; + pi_bridge { compatible = "kunbus,pi-bridge"; }; From afea3db30b3ab5c12eb63a6b14d3c7fc728e7f7e Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 8 Sep 2022 12:28:48 +0200 Subject: [PATCH 160/183] pibridge-serdev: fix minor formatting issues Add missing spaces and remove superfluous blank line and semicolon. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 59612a09813797..dfab01f98a7178 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -18,7 +18,6 @@ struct pibridge { struct serdev_device *serdev; - struct mutex lock; struct kfifo read_fifo; wait_queue_head_t read_queue; @@ -35,7 +34,7 @@ struct pibridge_pkthdr_gate { struct pibridge_pkthdr_io { u8 addr :6; u8 type :1; /* 0 for unicast, 1 for broadcast */ - u8 rsp :1; /*always be 0 for sending, might be 1 for receiving*/ + u8 rsp :1; /* 0 for request, 1 for response */ u8 len :5; u8 cmd :3; /* 0 for broadcast*/ } __attribute__((packed)); @@ -97,7 +96,7 @@ static int pibridge_discard_timeout(u16 len, u16 timeout) ret = 0; else ret = -1; - kfifo_reset(&pi->read_fifo);; + kfifo_reset(&pi->read_fifo); mutex_unlock(&pi->lock); return ret; @@ -424,7 +423,7 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, "check crc error in io-req\n"); return -EBADMSG; } - /*received header check is not performed in io mode*/ + /* received header check is not performed in io mode */ if (rcv_len != pkthdr.len) dev_warn_ratelimited(&pibridge_s->serdev->dev, "received len is not as expected in io-req(received:%d, expected:%d)\n", From 2d7e2a7446d7c3da4fe10a27f377ddcbe040a3dd Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 20 Sep 2022 09:23:17 +0200 Subject: [PATCH 161/183] pibridge-serdev: Handle unexpected response length in pibridge_req_io() As already done in pibridge_req_gate_tmt() handle also in pibridge_req_io() the case that the response packet contains more data than expected (i.e. the provided buffer is too small): Fill the receive buffer and then discard the rest of the packet including the following CRC. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 47 +++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index dfab01f98a7178..7cf4d82e987cb8 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -382,6 +382,8 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, u16 rcv_len) { struct pibridge_pkthdr_io pkthdr; + u16 to_receive; + u16 to_discard; u8 crc_rcv; u8 crc; @@ -400,34 +402,47 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, "receive head error in io-req\n"); return -EIO; } + crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); - if (rcv_len != 0) { - if (pibridge_recv(rcv_buf, rcv_len) != rcv_len) { + to_receive = min((u16) pkthdr.len, rcv_len); + to_discard = pkthdr.len - to_receive; + + if (to_receive) { + if (pibridge_recv(rcv_buf, to_receive) != to_receive) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "receive data error in io-req\n"); - return -EBADMSG; + "receive data error in io-req(len:%d)\n", + to_receive); + return -EIO; } } + if (to_discard) { + /* + * The provided buffer was too small. Discard the rest of the + * received data as well as the following CRC checksum byte. + */ + if (pibridge_discard_timeout(to_discard + 1, + PIBRIDGE_IO_TIMEOUT)) + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "failed to discard %u bytes within timeout\n", + to_discard); + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "received packet truncated (%u bytes missing)\n", + to_discard); + return -EBADMSG; + } + /* We got the whole data, now get the CRC */ if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "receive crc error in io-req\n"); return -EIO; } + crc = pibridge_crc8(crc, rcv_buf, pkthdr.len); - crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); - crc = pibridge_crc8(crc, rcv_buf, rcv_len); - - if (crc != crc_rcv) { - dev_warn_ratelimited(&pibridge_s->serdev->dev, - "check crc error in io-req\n"); + if (crc != crc_rcv) return -EBADMSG; - } - /* received header check is not performed in io mode */ - if (rcv_len != pkthdr.len) - dev_warn_ratelimited(&pibridge_s->serdev->dev, - "received len is not as expected in io-req(received:%d, expected:%d)\n", - pkthdr.len, rcv_len); + /* Done (received header check is not performed in io mode) */ + return 0; } EXPORT_SYMBOL(pibridge_req_io); From 0974e56fde3a3e0221fb60eaa87a7e96beff5ecf Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 22 Sep 2022 16:58:47 +0200 Subject: [PATCH 162/183] pibridge-serdev: clear header struct before sending io message Clear the packet header for the io message before sending the message. This fixes a bug in which the communication with the device fails, due to an invalid message message type (response instead of request) specified by the response flag in the message header. The set flag is data garbage which may be a leftover of a packet that has been received before (note that the same data structure is also used to receive the header of response messages). Although this is not an issue when sending gate messages, also clear the gate message header for consistency. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 7cf4d82e987cb8..e725ce933e3334 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -206,10 +206,10 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) struct pibridge_pkthdr_gate pkthdr; u8 crc; + memset(&pkthdr, 0, sizeof(pkthdr)); + pkthdr.dst = dst; - pkthdr.src = 0; pkthdr.cmd = cmd; - pkthdr.seq = 0; pkthdr.len = snd_len; if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { @@ -346,6 +346,8 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) struct pibridge_pkthdr_io pkthdr; u8 crc; + memset(&pkthdr, 0, sizeof(pkthdr)); + pkthdr.addr = addr; pkthdr.type = (addr == 0x3f) ? 1 : 0; /* 0 for unicast, 1 for broadcast */ pkthdr.cmd = cmd; From 681f812bebf174d145ef79b3850dcceadf767d1f Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 22 Sep 2022 17:20:56 +0200 Subject: [PATCH 163/183] pibridge-serdev: add sanity check for received io message header Add some sanity checks for a received io message by checking for the correct address and packet type in the header. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index e725ce933e3334..d1dd9cbfa41e28 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -440,10 +440,24 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, return -EIO; } crc = pibridge_crc8(crc, rcv_buf, pkthdr.len); + if (crc != crc_rcv) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "invalid checksum (expected: 0x%02x, got 0x%02x\n", + crc_rcv, crc); + return -EBADMSG; + } - if (crc != crc_rcv) + if (pkthdr.addr != addr) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "unexpected response addr 0x%02x\n", pkthdr.addr); return -EBADMSG; - /* Done (received header check is not performed in io mode) */ + } + + if (!pkthdr.rsp) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "response flag not set in received packet\n"); + return -EBADMSG; + } return 0; } From 30b238ab265e4817688f3aa118cf9b566ebb53d8 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 23 Sep 2022 16:49:59 +0200 Subject: [PATCH 164/183] pibridge-serdev: in pibridge_req_io() handle case that rcv_len is 0 Some response packets (e.g. response to configuration data) do not contain any data. So no receive buffer has to be provided and rcv_len can be 0. In this case skip CRC calculation for the receive buffer. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index d1dd9cbfa41e28..22205db439eb96 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -416,6 +416,7 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, to_receive); return -EIO; } + crc = pibridge_crc8(crc, rcv_buf, to_receive); } if (to_discard) { @@ -439,7 +440,7 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, "receive crc error in io-req\n"); return -EIO; } - crc = pibridge_crc8(crc, rcv_buf, pkthdr.len); + if (crc != crc_rcv) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "invalid checksum (expected: 0x%02x, got 0x%02x\n", From 51de4f5b9235d9d6118a3f21a91366beaadef6d0 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 7 Oct 2022 13:22:47 +0200 Subject: [PATCH 165/183] pibridge-serdev: correct size of len parameter There is no need to use a u16 data type for variables that hold the length of IO or GATEWAY packets (this is since the length of an IO packet can be at max 256 and the length of a GATEWAY at max 32 bytes). So adjust the data types of local variables as well as variables in the function parameter lists. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 34 +++++++++++++++++----------------- include/linux/pibridge_comm.h | 22 +++++++++++----------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 22205db439eb96..830916dd766a81 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -153,7 +153,7 @@ static void pibridge_remove(struct serdev_device *serdev) /*****************/ -int pibridge_send(u8 *buf, u16 len) +int pibridge_send(u8 *buf, u8 len) { struct pibridge *pi = pibridge_s; struct serdev_device *serdev = pi->serdev; @@ -174,7 +174,7 @@ void pibridge_clear_fifo(void) } EXPORT_SYMBOL(pibridge_clear_fifo); -int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) +int pibridge_recv_timeout(u8 *buf, u8 len, u16 timeout) { struct pibridge *pi = pibridge_s; int ret; @@ -194,14 +194,14 @@ int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout) } EXPORT_SYMBOL(pibridge_recv_timeout); -int pibridge_recv(u8 *buf, u16 len) +int pibridge_recv(u8 *buf, u8 len) { /* using default timeout PIBRIDGE_IO_TIMEOUT */ return pibridge_recv_timeout(buf, len, PIBRIDGE_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_recv); -int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) +int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len) { struct pibridge_pkthdr_gate pkthdr; u8 crc; @@ -240,12 +240,12 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len) } EXPORT_SYMBOL(pibridge_req_send_gate); -int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, - u8 *rcv_buf, u16 rcv_len, u16 tmt) +int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, + u8 *rcv_buf, u8 rcv_len, u16 tmt) { struct pibridge_pkthdr_gate pkthdr; - u16 to_receive; - u16 to_discard; + u8 to_receive; + u8 to_discard; u8 crc_rcv; u8 crc; @@ -272,7 +272,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); - to_receive = min((u16) pkthdr.len, rcv_len); + to_receive = min(pkthdr.len, rcv_len); to_discard = pkthdr.len - to_receive; if (to_receive) { @@ -333,15 +333,15 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, } EXPORT_SYMBOL(pibridge_req_gate_tmt); -int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, - u8 *rcv_buf, u16 rcv_len) +int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, + u8 *rcv_buf, u8 rcv_len) { return pibridge_req_gate_tmt(dst, cmd, snd_buf, snd_len, rcv_buf, rcv_len, PIBRIDGE_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_req_gate); -int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) +int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len) { struct pibridge_pkthdr_io pkthdr; u8 crc; @@ -380,12 +380,12 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len) } EXPORT_SYMBOL(pibridge_req_send_io); -int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, - u16 rcv_len) +int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, + u8 rcv_len) { struct pibridge_pkthdr_io pkthdr; - u16 to_receive; - u16 to_discard; + u8 to_receive; + u8 to_discard; u8 crc_rcv; u8 crc; @@ -406,7 +406,7 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, } crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); - to_receive = min((u16) pkthdr.len, rcv_len); + to_receive = min((u8) pkthdr.len, rcv_len); to_discard = pkthdr.len - to_receive; if (to_receive) { diff --git a/include/linux/pibridge_comm.h b/include/linux/pibridge_comm.h index 5cb15682614ad2..e5fdc195b62bbe 100644 --- a/include/linux/pibridge_comm.h +++ b/include/linux/pibridge_comm.h @@ -2,16 +2,16 @@ #ifndef _PIBRIDGE_COMM_H #define _PIBRIDGE_COMM_H -int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, - u16 rcv_len); -int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u16 snd_len); -int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, u8 *rcv_buf, - u16 rcv_len); -int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len, - u8 *rcv_buf, u16 rcv_len, u16 tmt); -int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u16 snd_len); -int pibridge_recv(u8 *buf, u16 len); -int pibridge_recv_timeout(u8 *buf, u16 len, u16 timeout); -int pibridge_send(u8 *buf, u16 len); +int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, + u8 rcv_len); +int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len); +int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, + u8 *rcv_buf, u8 rcv_len); +int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, + u8 *rcv_buf, u8 rcv_len, u16 tmt); +int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len); +int pibridge_recv(u8 *buf, u8 len); +int pibridge_recv_timeout(u8 *buf, u8 len, u16 timeout); +int pibridge_send(u8 *buf, u8 len); void pibridge_clear_fifo(void); #endif /* _PIBRIDGE_COMM_H */ From a46a3d34af68ac1a36ed90d7ab05a5b112c83574 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 14 Oct 2022 14:57:56 +0200 Subject: [PATCH 166/183] pibridge-serdev: adjust pibridge_req_gate_tmt() to pibridge_req_io() Both functions pibridge_req_gate_tmt() and pibridge_req_io() do similar tasks but the implementation differs even for the code parts with the same functionality. Bring the implementation of those code parts in pibridge_req_gate_tmt() into line with the implementation in pibridge_req_io(). Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 830916dd766a81..cbd4681874eb99 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -282,11 +282,14 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, to_receive); return -EIO; } + crc = pibridge_crc8(crc, rcv_buf, to_receive); } if (to_discard) { - /* The provided buffer was too small. Discard the rest of the - received data as well as the following CRC checksum byte. */ + /* + * The provided buffer was too small. Discard the rest of the + * received data as well as the following CRC checksum byte. + */ if (pibridge_discard_timeout(to_discard + 1, tmt)) dev_warn_ratelimited(&pibridge_s->serdev->dev, "failed to discard %u bytes within timeout\n", @@ -295,16 +298,18 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, "received packet truncated (%u bytes missing)\n", to_discard); return -EBADMSG; - } else { - /* We got the whole data, now get the CRC */ - if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { - dev_warn_ratelimited(&pibridge_s->serdev->dev, - "failed to receive CRC in gate-req\n"); - return -EIO; - } - crc = pibridge_crc8(crc, rcv_buf, pkthdr.len); + } + /* We got the whole data, now get the CRC */ + if (pibridge_recv(&crc_rcv, sizeof(u8)) != sizeof(u8)) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "failed to receive CRC in gate-req\n"); + return -EIO; + } - if (crc != crc_rcv) + if (crc != crc_rcv) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "invalid checksum (expected: 0x%02x, got 0x%02x\n", + crc_rcv, crc); return -EBADMSG; } From 3b542494837378417baeab305d2e63c72a441614 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Thu, 20 Oct 2022 15:52:04 +0200 Subject: [PATCH 167/183] pibridge-serdev: fix wait for event Both functions pibridge_recv_timeout() and pibridge_discard_timeout() are waiting uninterruptibly for events. However in the waker function pibridge_receive_buf() only interruptible tasks are woken up. As a consequence the waiters are sleeping until the timeout expires which leads to long delays in the communcation with the RevPi hardware modules. Fix this by calling wake_up() instead of wake_up_interruptible() and thus waking up uninterruptible instead of interruptible tasks. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index cbd4681874eb99..03f05919d88f8a 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -60,7 +60,7 @@ static int pibridge_receive_buf(struct serdev_device *serdev, ret = kfifo_in(&pi->read_fifo, buf, count); mutex_unlock(&pi->lock); - wake_up_interruptible(&pi->read_queue); + wake_up(&pi->read_queue); if (ret < count) dev_warn_ratelimited(&serdev->dev, From 07ea515fcb80e3649169da09a76f87b2b7ecd90e Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Mon, 31 Oct 2022 17:28:17 +0100 Subject: [PATCH 168/183] arm*/configs/revpi-v*: Enable PiBridge driver arm/configs/revpi-v6: Enable PiBridge driver arm/configs/revpi-v7: Enable PiBridge driver arm/configs/revpi-v7l: Enable PiBridge driver arm64/configs/revpi-v8: Enable PiBridge driver Signed-off-by: Nicolai Buchwitz --- arch/arm/configs/revpi-v6_defconfig | 1 + arch/arm/configs/revpi-v7_defconfig | 1 + arch/arm/configs/revpi-v7l_defconfig | 1 + arch/arm64/configs/revpi-v8_defconfig | 1 + 4 files changed, 4 insertions(+) diff --git a/arch/arm/configs/revpi-v6_defconfig b/arch/arm/configs/revpi-v6_defconfig index 3a807f5faa8aa9..150153b6b70d35 100644 --- a/arch/arm/configs/revpi-v6_defconfig +++ b/arch/arm/configs/revpi-v6_defconfig @@ -663,6 +663,7 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_SERIAL_SC16IS7XX=m CONFIG_SERIAL_SC16IS7XX_SPI=y CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_MUX_PIBRIDGE=y CONFIG_TTY_PRINTK=y CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y diff --git a/arch/arm/configs/revpi-v7_defconfig b/arch/arm/configs/revpi-v7_defconfig index 936095d1628d67..cef380daccd43e 100644 --- a/arch/arm/configs/revpi-v7_defconfig +++ b/arch/arm/configs/revpi-v7_defconfig @@ -669,6 +669,7 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_SERIAL_SC16IS7XX=m CONFIG_SERIAL_SC16IS7XX_SPI=y CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_MUX_PIBRIDGE=y CONFIG_TTY_PRINTK=y CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y diff --git a/arch/arm/configs/revpi-v7l_defconfig b/arch/arm/configs/revpi-v7l_defconfig index a97d58d28e9c7c..f6d9c07fd470b5 100644 --- a/arch/arm/configs/revpi-v7l_defconfig +++ b/arch/arm/configs/revpi-v7l_defconfig @@ -685,6 +685,7 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_SERIAL_SC16IS7XX=m CONFIG_SERIAL_SC16IS7XX_SPI=y CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_MUX_PIBRIDGE=y CONFIG_TTY_PRINTK=y CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y diff --git a/arch/arm64/configs/revpi-v8_defconfig b/arch/arm64/configs/revpi-v8_defconfig index 8e1357babfc86f..6ce79cdfadb36b 100644 --- a/arch/arm64/configs/revpi-v8_defconfig +++ b/arch/arm64/configs/revpi-v8_defconfig @@ -687,6 +687,7 @@ CONFIG_SERIAL_AMBA_PL011_CONSOLE=y CONFIG_SERIAL_SC16IS7XX=m CONFIG_SERIAL_SC16IS7XX_SPI=y CONFIG_SERIAL_DEV_BUS=y +CONFIG_SERIAL_DEV_MUX_PIBRIDGE=y CONFIG_TTY_PRINTK=y CONFIG_HW_RANDOM=y CONFIG_RAW_DRIVER=y From 79c3184e9e785f065e85ef13fdb16eaa98ad04b6 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 22 Nov 2022 19:46:45 +0100 Subject: [PATCH 169/183] pibridge-serdev: add sanity check for received packet size In functions pibridge_req_io() and pibridge_req_gate_tmt() return an error if the size of the received packet does not match the expected size (as specified by the passed parameter "rcv_len"). Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 03f05919d88f8a..5bd253f07edd33 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -334,6 +334,13 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, return -EBADMSG; } + if (pkthdr.len < rcv_len) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "received packet smaller than expected (size: %u, expected: %u)\n", + pkthdr.len, rcv_len); + return -EBADMSG; + } + return 0; } EXPORT_SYMBOL(pibridge_req_gate_tmt); @@ -465,6 +472,13 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, return -EBADMSG; } + if (pkthdr.len < rcv_len) { + dev_warn_ratelimited(&pibridge_s->serdev->dev, + "received packet smaller than expected (size: %u, expected: %u)\n", + pkthdr.len, rcv_len); + return -EBADMSG; + } + return 0; } EXPORT_SYMBOL(pibridge_req_io); From 27286db5481e84ef966e13c619920ecd00121125 Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Fri, 25 Nov 2022 15:21:18 +0100 Subject: [PATCH 170/183] pibridge-serdev: fix format chars for arm64 Silence compiler warning for implicit casts on arm64 builds, by prefix them with z. Signed-off-by: Nicolai Buchwitz --- drivers/tty/serdev/pibridge.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 5bd253f07edd33..81ba5cb475636c 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -64,7 +64,7 @@ static int pibridge_receive_buf(struct serdev_device *serdev, if (ret < count) dev_warn_ratelimited(&serdev->dev, - "failed to fill receive fifo (received: %d, filled: %d)\n", + "failed to fill receive fifo (received: %zd, filled: %d)\n", count, ret); return ret; } @@ -265,7 +265,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, if (pibridge_recv_timeout((u8 *) &pkthdr, sizeof(pkthdr), tmt) != sizeof(pkthdr)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "receive head error in gate-req(hdr_len:%d, timeout:%d, data0:%c)\n", + "receive head error in gate-req(hdr_len:%zd, timeout:%d, data0:%c)\n", sizeof(pkthdr), tmt, snd_buf ? snd_buf[0] : 0); return -EIO; } @@ -367,7 +367,7 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len) if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "send head error in io-send(len:%d)\n", sizeof(pkthdr)); + "send head error in io-send(len:%zd)\n", sizeof(pkthdr)); return -EIO; } From 14aca7fc91047be1c8e6adfc2bfe778f3e42073c Mon Sep 17 00:00:00 2001 From: Nicolai Buchwitz Date: Fri, 25 Nov 2022 18:41:00 +0100 Subject: [PATCH 171/183] pibridge-serdev: Fix missing space in messages Add missing space between text and format specifiers in log output. Signed-off-by: Nicolai Buchwitz --- drivers/tty/serdev/pibridge.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 81ba5cb475636c..4619d971f697ac 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -220,7 +220,7 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len) if (snd_len != 0) { if (pibridge_send(snd_buf, snd_len) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "send data error in gate-send(len:%d)\n", snd_len); + "send data error in gate-send(len: %d)\n", snd_len); return -EIO; } @@ -254,7 +254,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, if (pibridge_req_send_gate(dst, cmd, snd_buf, snd_len)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "send message error in gate-req(dst:%d, cmd:%d, len:%d)\n", + "send message error in gate-req(dst: %d, cmd: %d, len: %d)\n", dst, cmd, snd_len); return -EIO; } @@ -265,7 +265,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, if (pibridge_recv_timeout((u8 *) &pkthdr, sizeof(pkthdr), tmt) != sizeof(pkthdr)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "receive head error in gate-req(hdr_len:%zd, timeout:%d, data0:%c)\n", + "receive head error in gate-req(hdr_len: %zd, timeout: %d, data0: %c)\n", sizeof(pkthdr), tmt, snd_buf ? snd_buf[0] : 0); return -EIO; } @@ -278,7 +278,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, if (to_receive) { if (pibridge_recv(rcv_buf, to_receive) != to_receive) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "receive data error in gate-req(len:%d)\n", + "receive data error in gate-req(len: %d)\n", to_receive); return -EIO; } @@ -315,21 +315,21 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, if ((pkthdr.cmd & PIBRIDGE_RESP_CMD) != cmd) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "bad responded CMD code in gate-req(cmd:%d)\n", + "bad responded CMD code in gate-req(cmd: %d)\n", pkthdr.cmd); return -EBADMSG; } if (!(pkthdr.cmd & PIBRIDGE_RESP_OK)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "bad responded OK code in gate-req(cmd:%d)\n", + "bad responded OK code in gate-req(cmd: %d)\n", pkthdr.cmd); return -EBADMSG; } if (pkthdr.cmd & PIBRIDGE_RESP_ERR) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "bad responded ERR code in gate-req(cmd:%d)\n", + "bad responded ERR code in gate-req(cmd: %d)\n", pkthdr.cmd); return -EBADMSG; } @@ -367,14 +367,14 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len) if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "send head error in io-send(len:%zd)\n", sizeof(pkthdr)); + "send head error in io-send(len: %zd)\n", sizeof(pkthdr)); return -EIO; } if (snd_len != 0) { if (pibridge_send(snd_buf, snd_len) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "send data error in io-send(len:%d)\n", + "send data error in io-send(len: %d)\n", snd_len); return -EIO; } @@ -406,7 +406,7 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, if (pibridge_req_send_io(addr, cmd, snd_buf, snd_len)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "send message error in io-req(addr:%d, cmd:%d, len:%d)\n", + "send message error in io-req(addr: %d, cmd: %d, len: %d)\n", addr, cmd, snd_len); return -EIO; } @@ -424,7 +424,7 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, if (to_receive) { if (pibridge_recv(rcv_buf, to_receive) != to_receive) { dev_warn_ratelimited(&pibridge_s->serdev->dev, - "receive data error in io-req(len:%d)\n", + "receive data error in io-req(len: %d)\n", to_receive); return -EIO; } From 5f9162bbf06c54931123f25ac6aed8fe1bde7982 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Thu, 1 Dec 2022 08:37:51 +0100 Subject: [PATCH 172/183] pibridge-serdev: Relax data type of send and receive buffers Forcing callers to pass u8 * pointers to the pibridge API is cumbersome as it results in plenty of type casts. Avoid by switching to void * pointers. Signed-off-by: Lukas Wunner --- drivers/tty/serdev/pibridge.c | 42 +++++++++++++++++------------------ include/linux/pibridge_comm.h | 20 ++++++++--------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 4619d971f697ac..7103696120bada 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -41,12 +41,12 @@ struct pibridge_pkthdr_io { static struct pibridge *pibridge_s; /* unique instance of the pibridge */ -static u8 pibridge_crc8(u8 base, u8 *data, u16 len) +static u8 pibridge_crc8(u8 base, void *data, u16 len) { u8 ret = base; while (len--) - ret = ret ^ data[len]; + ret = ret ^ ((u8 *)data)[len]; return ret; } @@ -153,7 +153,7 @@ static void pibridge_remove(struct serdev_device *serdev) /*****************/ -int pibridge_send(u8 *buf, u8 len) +int pibridge_send(void *buf, u8 len) { struct pibridge *pi = pibridge_s; struct serdev_device *serdev = pi->serdev; @@ -174,7 +174,7 @@ void pibridge_clear_fifo(void) } EXPORT_SYMBOL(pibridge_clear_fifo); -int pibridge_recv_timeout(u8 *buf, u8 len, u16 timeout) +int pibridge_recv_timeout(void *buf, u8 len, u16 timeout) { struct pibridge *pi = pibridge_s; int ret; @@ -194,14 +194,14 @@ int pibridge_recv_timeout(u8 *buf, u8 len, u16 timeout) } EXPORT_SYMBOL(pibridge_recv_timeout); -int pibridge_recv(u8 *buf, u8 len) +int pibridge_recv(void *buf, u8 len) { /* using default timeout PIBRIDGE_IO_TIMEOUT */ return pibridge_recv_timeout(buf, len, PIBRIDGE_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_recv); -int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len) +int pibridge_req_send_gate(u8 dst, u16 cmd, void *snd_buf, u8 snd_len) { struct pibridge_pkthdr_gate pkthdr; u8 crc; @@ -212,7 +212,7 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len) pkthdr.cmd = cmd; pkthdr.len = snd_len; - if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { + if (pibridge_send(&pkthdr, sizeof(pkthdr)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send head error in gate-send\n"); return -EIO; @@ -226,7 +226,7 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len) } - crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(0, &pkthdr, sizeof(pkthdr)); if (snd_len != 0) crc = pibridge_crc8(crc, snd_buf, snd_len); @@ -240,8 +240,8 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len) } EXPORT_SYMBOL(pibridge_req_send_gate); -int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, - u8 *rcv_buf, u8 rcv_len, u16 tmt) +int pibridge_req_gate_tmt(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, + void *rcv_buf, u8 rcv_len, u16 tmt) { struct pibridge_pkthdr_gate pkthdr; u8 to_receive; @@ -262,15 +262,15 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, if (dst == PIBRIDGE_BC_ADDR) return 0; - if (pibridge_recv_timeout((u8 *) &pkthdr, sizeof(pkthdr), tmt) != + if (pibridge_recv_timeout(&pkthdr, sizeof(pkthdr), tmt) != sizeof(pkthdr)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "receive head error in gate-req(hdr_len: %zd, timeout: %d, data0: %c)\n", - sizeof(pkthdr), tmt, snd_buf ? snd_buf[0] : 0); + sizeof(pkthdr), tmt, snd_buf ? ((u8 *)snd_buf)[0] : 0); return -EIO; } - crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(0, &pkthdr, sizeof(pkthdr)); to_receive = min(pkthdr.len, rcv_len); to_discard = pkthdr.len - to_receive; @@ -345,15 +345,15 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, } EXPORT_SYMBOL(pibridge_req_gate_tmt); -int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, - u8 *rcv_buf, u8 rcv_len) +int pibridge_req_gate(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, + void *rcv_buf, u8 rcv_len) { return pibridge_req_gate_tmt(dst, cmd, snd_buf, snd_len, rcv_buf, rcv_len, PIBRIDGE_IO_TIMEOUT); } EXPORT_SYMBOL(pibridge_req_gate); -int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len) +int pibridge_req_send_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len) { struct pibridge_pkthdr_io pkthdr; u8 crc; @@ -365,7 +365,7 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len) pkthdr.cmd = cmd; pkthdr.len = snd_len; - if (pibridge_send((u8 *) &pkthdr, sizeof(pkthdr)) < 0) { + if (pibridge_send(&pkthdr, sizeof(pkthdr)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send head error in io-send(len: %zd)\n", sizeof(pkthdr)); return -EIO; @@ -379,7 +379,7 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len) return -EIO; } } - crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(0, &pkthdr, sizeof(pkthdr)); crc = pibridge_crc8(crc, snd_buf, snd_len); if (pibridge_send(&crc, sizeof(u8)) < 0) { @@ -392,7 +392,7 @@ int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len) } EXPORT_SYMBOL(pibridge_req_send_io); -int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, +int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf, u8 rcv_len) { struct pibridge_pkthdr_io pkthdr; @@ -411,12 +411,12 @@ int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, return -EIO; } - if (pibridge_recv((u8 *) &pkthdr, sizeof(pkthdr)) != sizeof(pkthdr)) { + if (pibridge_recv(&pkthdr, sizeof(pkthdr)) != sizeof(pkthdr)) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "receive head error in io-req\n"); return -EIO; } - crc = pibridge_crc8(0, (u8 *) &pkthdr, sizeof(pkthdr)); + crc = pibridge_crc8(0, &pkthdr, sizeof(pkthdr)); to_receive = min((u8) pkthdr.len, rcv_len); to_discard = pkthdr.len - to_receive; diff --git a/include/linux/pibridge_comm.h b/include/linux/pibridge_comm.h index e5fdc195b62bbe..ec19e85c9278d4 100644 --- a/include/linux/pibridge_comm.h +++ b/include/linux/pibridge_comm.h @@ -2,16 +2,16 @@ #ifndef _PIBRIDGE_COMM_H #define _PIBRIDGE_COMM_H -int pibridge_req_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len, u8 *rcv_buf, +int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf, u8 rcv_len); -int pibridge_req_send_io(u8 addr, u8 cmd, u8 *snd_buf, u8 snd_len); -int pibridge_req_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, - u8 *rcv_buf, u8 rcv_len); -int pibridge_req_gate_tmt(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len, - u8 *rcv_buf, u8 rcv_len, u16 tmt); -int pibridge_req_send_gate(u8 dst, u16 cmd, u8 *snd_buf, u8 snd_len); -int pibridge_recv(u8 *buf, u8 len); -int pibridge_recv_timeout(u8 *buf, u8 len, u16 timeout); -int pibridge_send(u8 *buf, u8 len); +int pibridge_req_send_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len); +int pibridge_req_gate(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, + void *rcv_buf, u8 rcv_len); +int pibridge_req_gate_tmt(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, + void *rcv_buf, u8 rcv_len, u16 tmt); +int pibridge_req_send_gate(u8 dst, u16 cmd, void *snd_buf, u8 snd_len); +int pibridge_recv(void *buf, u8 len); +int pibridge_recv_timeout(void *buf, u8 len, u16 timeout); +int pibridge_send(void *buf, u8 len); void pibridge_clear_fifo(void); #endif /* _PIBRIDGE_COMM_H */ From 77f085dd3f275c421e99ec609e1f003757723234 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 6 Dec 2022 22:17:38 +0100 Subject: [PATCH 173/183] pibridge-serdev: Fix premature timeout while waiting for event Using a MIO module with a connect produces lots of error messages like the following in the log file. piControl: recv len from pibridge err(got:0, exp:20) piControl: talk with mio for aio data error(addr:31, ret:-70) piControl: crc for dio data err(got:0, expect:103) piControl: recv len from pibridge err(got:0, exp:20) piControl: talk with mio for aio data error(addr:31, ret:-70) piControl: recv len from pibridge err(got:0, exp:20) piControl: talk with mio for dio data error(addr:31, ret:-70) The reason for these messages are repeated incomplete datagram receptions for sent data requests. Turning the tracing on in the pibridge module showed that the receiving process does not wait long enough to receive all data: piControl I/O-1579 [003] ....... 81000.509144: pibridge_send_begin: datalen=12 data:{0x1f,0x9,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x16} piControl I/O-1579 [003] ....... 81000.510308: pibridge_send_end: datalen=12 piControl I/O-1579 [003] ....... 81000.510309: pibridge_receive_begin: datalen=20 piControl I/O-1579 [003] ....... 81000.512038: pibridge_receive_timeout: len=16 timeout=10 piControl I/O-1579 [003] ....... 81000.512038: pibridge_receive_end: datalen=16 data:{0x9f,0x11,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0} kworker/u8:0-507 [003] ....... 81000.512059: pibridge_wakeup_receive_buffer: Wakeup 0 In the case shown above the process starts waiting for the response packet at 81000.510309 but at 81000.512038 (i.e. only 1,73 ms later) the wait already ends with a timeout. This is odd since the implementation uses wait_event_timeout() with a 10 ms timeout. However the timeout is expected as jiffies by this function and for a kernel that uses 100 jiffies per HZ 10 ms are converted into only 1 jiffy. So the timeout happens after the next timer tick, which may be significantly shorter than the full jiffy period (10 ms) in case that the waiting starts in the middle of a jiffy period. Fix this issue by waiting at least one additional jiffy to make sure that the timeout does not happen before at least one full jiffy period of 10 ms. (See also this thread in which a similar issue for the use of wait_event_timeout() with a 1 jiffy timeout has been reported: https://lore.kernel.org/lkml/529CA42A.3040504@freebox.fr/) Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 7103696120bada..14913563e69e92 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -89,7 +89,7 @@ static int pibridge_discard_timeout(u16 len, u16 timeout) wait_event_timeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout)); + msecs_to_jiffies(timeout) + 1); mutex_lock(&pi->lock); if (kfifo_len(&pi->read_fifo) >= len) @@ -181,7 +181,7 @@ int pibridge_recv_timeout(void *buf, u8 len, u16 timeout) wait_event_timeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout)); + msecs_to_jiffies(timeout) + 1); mutex_lock(&pi->lock); if (kfifo_len(&pi->read_fifo) >= len) From f3350d722bdd1a7fe01ebb73ddac3993ca8035bf Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 12 Dec 2022 19:32:38 +0100 Subject: [PATCH 174/183] pibridge-serdev: Add missing include file In pibridge_comm.h add missing include file for linux data types. Signed-off-by: Lino Sanfilippo --- include/linux/pibridge_comm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/pibridge_comm.h b/include/linux/pibridge_comm.h index ec19e85c9278d4..262614a1d8828a 100644 --- a/include/linux/pibridge_comm.h +++ b/include/linux/pibridge_comm.h @@ -1,7 +1,8 @@ - #ifndef _PIBRIDGE_COMM_H #define _PIBRIDGE_COMM_H +#include + int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf, u8 rcv_len); int pibridge_req_send_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len); From bff34417633abeee91182b208b44d713e8c49011 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 12 Dec 2022 19:40:59 +0100 Subject: [PATCH 175/183] pibridge-serdev: Move definitions in new header file pibridge.h Move structure definitions for GATE and IO packet headers as well as the macro for the fifo size into the new header file pibridge.h. By doing this extend the fifo size to a power of 2 since this is what the kfifo API will extend the fifo to, anyway. Also rename the macro from PIBRIDGE_RECV_BUFFER_SIZE to the more appropriate PIBRIDGE_RECV_FIFO_SIZE. This is in preparation of implementing tracing macros which are defined in a seperate header file but need access to the definitions mentioned above. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 22 +++------------------- drivers/tty/serdev/pibridge.h | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 drivers/tty/serdev/pibridge.h diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 14913563e69e92..7520bfd8ced1e7 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -7,9 +7,10 @@ #include #include +#include "pibridge.h" + #define PIBRIDGE_BAUDRATE 115200 #define PIBRIDGE_IO_TIMEOUT 10 // msec -#define PIBRIDGE_RECV_BUFFER_SIZE 100 #define PIBRIDGE_BC_ADDR 0xff #define PIBRIDGE_RESP_CMD 0x3fff @@ -23,22 +24,6 @@ struct pibridge { wait_queue_head_t read_queue; }; -struct pibridge_pkthdr_gate { - u8 dst; - u8 src; - u16 cmd; - u16 seq; - u8 len; -} __attribute__((packed)); - -struct pibridge_pkthdr_io { - u8 addr :6; - u8 type :1; /* 0 for unicast, 1 for broadcast */ - u8 rsp :1; /* 0 for request, 1 for response */ - u8 len :5; - u8 cmd :3; /* 0 for broadcast*/ -} __attribute__((packed)); - static struct pibridge *pibridge_s; /* unique instance of the pibridge */ static u8 pibridge_crc8(u8 base, void *data, u16 len) @@ -121,8 +106,7 @@ static int pibridge_probe(struct serdev_device *serdev) mutex_init(&pi->lock); init_waitqueue_head(&pi->read_queue); - ret = kfifo_alloc(&pi->read_fifo, PIBRIDGE_RECV_BUFFER_SIZE, - GFP_KERNEL); + ret = kfifo_alloc(&pi->read_fifo, PIBRIDGE_RECV_FIFO_SIZE, GFP_KERNEL); if (ret) return ret; diff --git a/drivers/tty/serdev/pibridge.h b/drivers/tty/serdev/pibridge.h new file mode 100644 index 00000000000000..073480df911209 --- /dev/null +++ b/drivers/tty/serdev/pibridge.h @@ -0,0 +1,24 @@ +#ifndef DRIVERS_PIBRIDGE_H +#define DRIVERS_PIBRIDGE_H + +#include + +#define PIBRIDGE_RECV_FIFO_SIZE 128 + +struct pibridge_pkthdr_gate { + u8 dst; + u8 src; + u16 cmd; + u16 seq; + u8 len; +} __attribute__((packed)); + +struct pibridge_pkthdr_io { + u8 addr :6; + u8 type :1; /* 0 for unicast, 1 for broadcast */ + u8 rsp :1; /* 0 for request, 1 for response */ + u8 len :5; + u8 cmd :3; /* 0 for broadcast*/ +} __attribute__((packed)); + +#endif /* DRIVERS_PIBRIDGE_H */ From 07db67ee7a28db0fd6a69bc501f7b65bcf61c2a3 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 12 Dec 2022 20:04:10 +0100 Subject: [PATCH 176/183] pibridge-serdev: Add tracing macros Add pibridge_trace.h with macros that provide tracing information about - IO and GATEWAY packet headers and data - CRC - expired timeouts - wakeup callback Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/Makefile | 2 + drivers/tty/serdev/pibridge_trace.h | 317 ++++++++++++++++++++++++++++ 2 files changed, 319 insertions(+) create mode 100644 drivers/tty/serdev/pibridge_trace.h diff --git a/drivers/tty/serdev/Makefile b/drivers/tty/serdev/Makefile index fb5b9ed39dbae9..3323ec25e93c11 100644 --- a/drivers/tty/serdev/Makefile +++ b/drivers/tty/serdev/Makefile @@ -5,3 +5,5 @@ obj-$(CONFIG_SERIAL_DEV_BUS) += serdev.o obj-$(CONFIG_SERIAL_DEV_CTRL_TTYPORT) += serdev-ttyport.o obj-$(CONFIG_SERIAL_DEV_MUX_PIBRIDGE) += pibridge.o + +CFLAGS_pibridge.o = -I$(src) diff --git a/drivers/tty/serdev/pibridge_trace.h b/drivers/tty/serdev/pibridge_trace.h new file mode 100644 index 00000000000000..d3b15f0e8d52b6 --- /dev/null +++ b/drivers/tty/serdev/pibridge_trace.h @@ -0,0 +1,317 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM pibridge + +#if !defined(_PIBRIDGE_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) +#define _PIBRIDGE_TRACE_H + +#include +#include +#include + +#include "pibridge.h" + +#define PIBRIDGE_TRACE_MAX_FIFO_DUMP 128 +#define PIBRIDGE_TRACE_MAX_PACKET_DATA_LEN 256 + +/* Header */ +DECLARE_EVENT_CLASS(pibridge_gate_header_class, + TP_PROTO(struct pibridge_pkthdr_gate *hdr), + TP_ARGS(hdr), + TP_STRUCT__entry( + __field(u8, dst) + __field(u8, src) + __field(u16, cmd) + __field(u16, seq) + __field(u8, len) + ), + TP_fast_assign( + __entry->dst = hdr->dst; + __entry->src = hdr->src; + __entry->cmd = hdr->cmd; + __entry->seq = hdr->seq; + __entry->len = hdr->len; + ), + TP_printk( + "dst=%u src=%u cmd=%u seq=%u len=%u", + __entry->dst, + __entry->src, + __entry->cmd, + __entry->seq, + __entry->len + ) +); + +DEFINE_EVENT(pibridge_gate_header_class, pibridge_send_gate_header, + TP_PROTO(struct pibridge_pkthdr_gate *hdr), + TP_ARGS(hdr) +); + +DEFINE_EVENT(pibridge_gate_header_class, pibridge_receive_gate_header, + TP_PROTO(struct pibridge_pkthdr_gate *hdr), + TP_ARGS(hdr) +); + +DECLARE_EVENT_CLASS(pibridge_io_header_class, + TP_PROTO(struct pibridge_pkthdr_io *hdr), + TP_ARGS(hdr), + TP_STRUCT__entry( + __field(u8, addr) + __field(u8, type) + __field(u8, rsp) + __field(u8, len) + __field(u8, cmd) + ), + TP_fast_assign( + __entry->addr = hdr->addr; + __entry->type = hdr->type; + __entry->rsp = hdr->rsp; + __entry->len = hdr->len; + __entry->cmd = hdr->cmd; + ), + TP_printk( + "addr=%u type=%u rsp=%u len=%u cmd=%u", + __entry->addr, + __entry->type, + __entry->rsp, + __entry->len, + __entry->cmd) +); + +DEFINE_EVENT(pibridge_io_header_class, pibridge_send_io_header, + TP_PROTO(struct pibridge_pkthdr_io *hdr), + TP_ARGS(hdr) +); + +DEFINE_EVENT(pibridge_io_header_class, pibridge_receive_io_header, + TP_PROTO(struct pibridge_pkthdr_io *hdr), + TP_ARGS(hdr) +); + +/* CRC */ +DECLARE_EVENT_CLASS(pibridge_send_crc_class, + TP_PROTO(u8 crc), + TP_ARGS(crc), + TP_STRUCT__entry( + __field(u8, crc) + ), + TP_fast_assign( + __entry->crc = crc; + ), + TP_printk( + "crc=0x%02x", + __entry->crc + ) +); + +DEFINE_EVENT(pibridge_send_crc_class, pibridge_send_io_crc, + TP_PROTO(u8 crc), + TP_ARGS(crc) +); + +DEFINE_EVENT(pibridge_send_crc_class, pibridge_send_gate_crc, + TP_PROTO(u8 crc), + TP_ARGS(crc) +); + +DECLARE_EVENT_CLASS(pibridge_receive_crc_class, + TP_PROTO(u8 crc, u8 exp_crc), + TP_ARGS(crc, exp_crc), + TP_STRUCT__entry( + __field(u8, crc) + __field(u8, exp_crc) + ), + TP_fast_assign( + __entry->crc = crc; + __entry->exp_crc = exp_crc; + ), + TP_printk( + "crc=0x%02x (exp=0x%02x)", + __entry->crc, + __entry->exp_crc + ) +); + +DEFINE_EVENT(pibridge_receive_crc_class, pibridge_receive_io_crc, + TP_PROTO(u8 crc, u8 exp_crc), + TP_ARGS(crc, exp_crc) +); + +DEFINE_EVENT(pibridge_receive_crc_class, pibridge_receive_gate_crc, + TP_PROTO(u8 crc, u8 exp_crc), + TP_ARGS(crc, exp_crc) +); + +/* packet data */ +DECLARE_EVENT_CLASS(pibridge_buffer_data_class, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len), + TP_STRUCT__entry( + __array(const unsigned char *, buffer, + PIBRIDGE_TRACE_MAX_PACKET_DATA_LEN) + __field(unsigned int, len) + ), + TP_fast_assign( + memcpy(__entry->buffer, buffer, len); + __entry->len= len; + ), + TP_printk( + "datalen=%d data:%s", + __entry->len, + __print_array(__entry->buffer, __entry->len, + sizeof(unsigned char)) + ) +); + +DEFINE_EVENT(pibridge_buffer_data_class, pibridge_receive_io_data, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len) +); + +DEFINE_EVENT(pibridge_buffer_data_class, pibridge_receive_gate_data, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len) +); + +DEFINE_EVENT(pibridge_buffer_data_class, pibridge_send_io_data, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len) +); + +DEFINE_EVENT(pibridge_buffer_data_class, pibridge_send_gate_data, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len) +); + +DEFINE_EVENT(pibridge_buffer_data_class, pibridge_send_begin, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len) +); + +DEFINE_EVENT(pibridge_buffer_data_class, pibridge_receive_end, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len) +); + +DEFINE_EVENT(pibridge_buffer_data_class, pibridge_wakeup_receive_buffer, + TP_PROTO(const unsigned char *buffer, unsigned int len), + TP_ARGS(buffer, len) +); + +/* Timeout */ +DECLARE_EVENT_CLASS(pibridge_timeout_class, + TP_PROTO(unsigned int received, unsigned int expected, + unsigned int timeout), + TP_ARGS(received, expected, timeout), + TP_STRUCT__entry( + __field(unsigned int, received) + __field(unsigned int, expected) + __field(unsigned int, timeout) + ), + TP_fast_assign( + __entry->received = received; + __entry->expected = expected; + __entry->timeout = timeout; + ), + TP_printk( + "received: %u, expected: %u, timeout: %u", + __entry->received, + __entry->expected, + __entry->timeout + ) +); + +DEFINE_EVENT(pibridge_timeout_class, pibridge_receive_timeout, + TP_PROTO(unsigned int received, unsigned int expected, + unsigned int timeout), + TP_ARGS(received, expected, timeout) +); + +DEFINE_EVENT(pibridge_timeout_class, pibridge_discard_timeout, + TP_PROTO(unsigned int received, unsigned int expected, + unsigned int timeout), + TP_ARGS(received, expected, timeout) +); + +/* Serdev name */ +DECLARE_EVENT_CLASS(pibridge_serdev_name_class, + TP_PROTO(struct serdev_device *serdev), + TP_ARGS(serdev), + TP_STRUCT__entry( + __string(name, dev_name(&serdev->dev)) + ), + TP_fast_assign( + __assign_str(name, dev_name(&serdev->dev)); + ), + TP_printk( + "Serdev %s", + __get_str(name) + ) +); + +DEFINE_EVENT(pibridge_serdev_name_class, pibridge_wakeup_write, + TP_PROTO(struct serdev_device *serdev), + TP_ARGS(serdev) +); + +/* packet data len */ +DECLARE_EVENT_CLASS(pibridge_data_len_class, + TP_PROTO(unsigned int len), + TP_ARGS(len), + TP_STRUCT__entry( + __field(unsigned int, len) + ), + TP_fast_assign( + __entry->len = len; + ), + TP_printk( + "datalen=%d", + __entry->len + ) +); + +DEFINE_EVENT(pibridge_data_len_class, pibridge_send_end, + TP_PROTO(unsigned int len), + TP_ARGS(len) +); + +DEFINE_EVENT(pibridge_data_len_class, pibridge_receive_begin, + TP_PROTO(unsigned int len), + TP_ARGS(len) +); + + +/* kfifo data */ +DECLARE_EVENT_CLASS(pibridge_kfifo_data_class, + TP_PROTO(struct kfifo *fifo), + TP_ARGS(fifo), + TP_STRUCT__entry( + __field(unsigned int, len) + __array(unsigned char *, buffer, PIBRIDGE_RECV_FIFO_SIZE) + ), + TP_fast_assign( + __entry->len = kfifo_out_peek(fifo, __entry->buffer, + PIBRIDGE_RECV_FIFO_SIZE) + ), + TP_printk( + "fifo (len=%u) data=%s", + __entry->len, + __print_array(__entry->buffer, + __entry->len > PIBRIDGE_RECV_FIFO_SIZE ? + PIBRIDGE_RECV_FIFO_SIZE : __entry->len, + sizeof(unsigned char)) + ) +); + +DEFINE_EVENT(pibridge_kfifo_data_class, pibridge_discard_data, + TP_PROTO(struct kfifo *fifo), + TP_ARGS(fifo) +); + +#endif /* _PIBRIDGE_TRACE_H */ + +/* This part must be outside protection */ +#undef TRACE_INCLUDE_PATH +#define TRACE_INCLUDE_PATH . +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_FILE pibridge_trace +#include From e04ca445d7c74a6f41dbcfd5078ecdd3b6bb40a7 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 12 Dec 2022 20:13:46 +0100 Subject: [PATCH 177/183] pibridge-serdev: Use tracing macros in pibridge implementation Use the pibridge tracing macros to trace - packet headers - packet data - CRC - expired timeouts - wakeup For this reason slightly modify the implemenation in pibridge_discard_timeout() and pibridge_recv_timeout(). Furthermore use a wrapper function around serdev_device_write_wakeup() that allows placing a tracepoint for a wakeup-write event. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 73 ++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 7520bfd8ced1e7..1dcd490275d707 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -9,6 +9,9 @@ #include "pibridge.h" +#define CREATE_TRACE_POINTS +#include "pibridge_trace.h" + #define PIBRIDGE_BAUDRATE 115200 #define PIBRIDGE_IO_TIMEOUT 10 // msec #define PIBRIDGE_BC_ADDR 0xff @@ -45,6 +48,7 @@ static int pibridge_receive_buf(struct serdev_device *serdev, ret = kfifo_in(&pi->read_fifo, buf, count); mutex_unlock(&pi->lock); + trace_pibridge_wakeup_receive_buffer(buf, count); wake_up(&pi->read_queue); if (ret < count) @@ -54,9 +58,15 @@ static int pibridge_receive_buf(struct serdev_device *serdev, return ret; } +static void pibridge_write_wakeup(struct serdev_device *serdev) +{ + trace_pibridge_wakeup_write(serdev); + serdev_device_write_wakeup(serdev); +} + static const struct serdev_device_ops pibridge_serdev_ops = { .receive_buf = pibridge_receive_buf, - .write_wakeup = serdev_device_write_wakeup, + .write_wakeup = pibridge_write_wakeup, }; static int pibridge_set_serial(struct serdev_device *serdev) @@ -70,20 +80,24 @@ static int pibridge_set_serial(struct serdev_device *serdev) static int pibridge_discard_timeout(u16 len, u16 timeout) { struct pibridge *pi = pibridge_s; - int ret; + unsigned int discarded; + int ret = 0; wait_event_timeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, msecs_to_jiffies(timeout) + 1); mutex_lock(&pi->lock); - if (kfifo_len(&pi->read_fifo) >= len) - ret = 0; - else - ret = -1; + discarded = kfifo_len(&pi->read_fifo); + trace_pibridge_discard_data(&pi->read_fifo); kfifo_reset(&pi->read_fifo); mutex_unlock(&pi->lock); + if (discarded < len) { + trace_pibridge_discard_timeout(discarded, len, timeout); + ret = -1; + } + return ret; } @@ -143,9 +157,13 @@ int pibridge_send(void *buf, u8 len) struct serdev_device *serdev = pi->serdev; int ret; + trace_pibridge_send_begin(buf, len); + ret = serdev_device_write(serdev, buf, len, MAX_SCHEDULE_TIMEOUT); serdev_device_wait_until_sent(serdev, 0); + trace_pibridge_send_end(ret); + return ret; } EXPORT_SYMBOL(pibridge_send); @@ -161,19 +179,25 @@ EXPORT_SYMBOL(pibridge_clear_fifo); int pibridge_recv_timeout(void *buf, u8 len, u16 timeout) { struct pibridge *pi = pibridge_s; - int ret; + unsigned int received; + int ret = len; - wait_event_timeout(pi->read_queue, - kfifo_len(&pi->read_fifo) >= len, + trace_pibridge_receive_begin(len); + + wait_event_timeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, msecs_to_jiffies(timeout) + 1); mutex_lock(&pi->lock); - if (kfifo_len(&pi->read_fifo) >= len) - ret = kfifo_out(&pi->read_fifo, buf, len); - else - ret = 0; + received = kfifo_out(&pi->read_fifo, buf, len); mutex_unlock(&pi->lock); + trace_pibridge_receive_end(buf, received); + + if (received != len) { + trace_pibridge_receive_timeout(received, len, timeout); + ret = 0; + } + return ret; } EXPORT_SYMBOL(pibridge_recv_timeout); @@ -196,12 +220,16 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, void *snd_buf, u8 snd_len) pkthdr.cmd = cmd; pkthdr.len = snd_len; + trace_pibridge_send_gate_header(&pkthdr); + if (pibridge_send(&pkthdr, sizeof(pkthdr)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send head error in gate-send\n"); return -EIO; } if (snd_len != 0) { + trace_pibridge_send_gate_data(snd_buf, snd_len); + if (pibridge_send(snd_buf, snd_len) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send data error in gate-send(len: %d)\n", snd_len); @@ -214,6 +242,8 @@ int pibridge_req_send_gate(u8 dst, u16 cmd, void *snd_buf, u8 snd_len) if (snd_len != 0) crc = pibridge_crc8(crc, snd_buf, snd_len); + trace_pibridge_send_gate_crc(crc); + if (pibridge_send(&crc, sizeof(u8)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send crc error in gate-send\n"); @@ -254,6 +284,8 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, return -EIO; } + trace_pibridge_receive_gate_header(&pkthdr); + crc = pibridge_crc8(0, &pkthdr, sizeof(pkthdr)); to_receive = min(pkthdr.len, rcv_len); @@ -266,6 +298,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, to_receive); return -EIO; } + trace_pibridge_receive_gate_data(rcv_buf, to_receive); crc = pibridge_crc8(crc, rcv_buf, to_receive); } @@ -290,6 +323,8 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, return -EIO; } + trace_pibridge_receive_gate_crc(crc_rcv, crc); + if (crc != crc_rcv) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "invalid checksum (expected: 0x%02x, got 0x%02x\n", @@ -349,6 +384,8 @@ int pibridge_req_send_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len) pkthdr.cmd = cmd; pkthdr.len = snd_len; + trace_pibridge_send_io_header(&pkthdr); + if (pibridge_send(&pkthdr, sizeof(pkthdr)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send head error in io-send(len: %zd)\n", sizeof(pkthdr)); @@ -356,6 +393,8 @@ int pibridge_req_send_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len) } if (snd_len != 0) { + trace_pibridge_send_io_data(snd_buf, snd_len); + if (pibridge_send(snd_buf, snd_len) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send data error in io-send(len: %d)\n", @@ -366,6 +405,8 @@ int pibridge_req_send_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len) crc = pibridge_crc8(0, &pkthdr, sizeof(pkthdr)); crc = pibridge_crc8(crc, snd_buf, snd_len); + trace_pibridge_send_io_crc(crc); + if (pibridge_send(&crc, sizeof(u8)) < 0) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "send crc error in io-send\n"); @@ -400,6 +441,9 @@ int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf, "receive head error in io-req\n"); return -EIO; } + + trace_pibridge_receive_io_header(&pkthdr); + crc = pibridge_crc8(0, &pkthdr, sizeof(pkthdr)); to_receive = min((u8) pkthdr.len, rcv_len); @@ -412,6 +456,7 @@ int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf, to_receive); return -EIO; } + trace_pibridge_receive_io_data(rcv_buf, to_receive); crc = pibridge_crc8(crc, rcv_buf, to_receive); } @@ -437,6 +482,8 @@ int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf, return -EIO; } + trace_pibridge_receive_io_crc(crc_rcv, crc); + if (crc != crc_rcv) { dev_warn_ratelimited(&pibridge_s->serdev->dev, "invalid checksum (expected: 0x%02x, got 0x%02x\n", From ec5400f4bc3ed67b6972f1099449a6999aa7a7c3 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Mon, 19 Dec 2022 17:36:56 +0100 Subject: [PATCH 178/183] pibridge-serdev: add comments for tracing macros Add comments to the tracing macros that describe which information each event provides and when the event is triggered. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge_trace.h | 227 ++++++++++++++++++++++++++-- 1 file changed, 217 insertions(+), 10 deletions(-) diff --git a/drivers/tty/serdev/pibridge_trace.h b/drivers/tty/serdev/pibridge_trace.h index d3b15f0e8d52b6..9b97415f2fc4be 100644 --- a/drivers/tty/serdev/pibridge_trace.h +++ b/drivers/tty/serdev/pibridge_trace.h @@ -13,7 +13,17 @@ #define PIBRIDGE_TRACE_MAX_FIFO_DUMP 128 #define PIBRIDGE_TRACE_MAX_PACKET_DATA_LEN 256 -/* Header */ +/* + * pibridge_gate_header_class + * + * Print the elements of a gateway header. + * + * dst: destination address. Specifies to which RevPi device the packet is sent. + * src: source address of the sending device. + * cmd: command issued by this header. + * seq: sequence number of this packet. + * len: packet length. + */ DECLARE_EVENT_CLASS(pibridge_gate_header_class, TP_PROTO(struct pibridge_pkthdr_gate *hdr), TP_ARGS(hdr), @@ -32,7 +42,7 @@ DECLARE_EVENT_CLASS(pibridge_gate_header_class, __entry->len = hdr->len; ), TP_printk( - "dst=%u src=%u cmd=%u seq=%u len=%u", + "dst=%u src=%u cmd=0x%04x seq=%u len=%u", __entry->dst, __entry->src, __entry->cmd, @@ -41,16 +51,40 @@ DECLARE_EVENT_CLASS(pibridge_gate_header_class, ) ); +/* + * pibridge_send_gate_header + * + * Info: the header of a gateway packet to be sent. + * Time: before the gate packet header is sent on the wire. + */ DEFINE_EVENT(pibridge_gate_header_class, pibridge_send_gate_header, TP_PROTO(struct pibridge_pkthdr_gate *hdr), TP_ARGS(hdr) ); +/* + * pibridge_receive_gate_header + * + * Info: the header of a received gateway packet. + * Time: after the gate packet header was received from the wire. + */ DEFINE_EVENT(pibridge_gate_header_class, pibridge_receive_gate_header, TP_PROTO(struct pibridge_pkthdr_gate *hdr), TP_ARGS(hdr) ); +/* + * pibridge_io_header_class + * + * Print the elements of an IO packet header. + * + * addr: destination address. Specifies to which RevPi device the packet is + * sent. + * type: packet type (unicast or broadcast). + * rsp: specifies if this message is a request or a response. + * len: packet length. + * cmd: command issued by this header. + */ DECLARE_EVENT_CLASS(pibridge_io_header_class, TP_PROTO(struct pibridge_pkthdr_io *hdr), TP_ARGS(hdr), @@ -77,17 +111,35 @@ DECLARE_EVENT_CLASS(pibridge_io_header_class, __entry->cmd) ); +/* + * pibridge_send_io_header + * + * Info: the header of an IO packet to be sent. + * Time: before the IO packet header is sent on the wire. + */ DEFINE_EVENT(pibridge_io_header_class, pibridge_send_io_header, TP_PROTO(struct pibridge_pkthdr_io *hdr), TP_ARGS(hdr) ); +/* + * pibridge_receive_io_header + * + * Info: the header of a received IO packet. + * Time: after the header of an IO response packet has been received. + */ DEFINE_EVENT(pibridge_io_header_class, pibridge_receive_io_header, TP_PROTO(struct pibridge_pkthdr_io *hdr), TP_ARGS(hdr) ); -/* CRC */ +/* + * pibridge_send_crc_class + * + * Print the CRC. + * + * crc: the CRC that is part of the sent packet. + */ DECLARE_EVENT_CLASS(pibridge_send_crc_class, TP_PROTO(u8 crc), TP_ARGS(crc), @@ -103,16 +155,37 @@ DECLARE_EVENT_CLASS(pibridge_send_crc_class, ) ); +/* + * pibridge_send_io_crc + * + * Info: the CRC of an IO packet to be sent. + * Time: before the CRC of an IO packet is sent on the wire. + */ DEFINE_EVENT(pibridge_send_crc_class, pibridge_send_io_crc, TP_PROTO(u8 crc), TP_ARGS(crc) ); +/* + * pibridge_send_gate_crc + * + * Info: the CRC to send for the gateway packet. + * Time: before the CRC of a gateway packet is sent on the wire. + */ DEFINE_EVENT(pibridge_send_crc_class, pibridge_send_gate_crc, TP_PROTO(u8 crc), TP_ARGS(crc) ); +/* + * pibridge_receive_crc_class + * + * Print the CRC that is part of a received packet as well as the expected CRC + * that has been calculated for this packet. + * + * crc: CRC received with the packet + * exp_crc: expected CRC as calculated for the received packet. + */ DECLARE_EVENT_CLASS(pibridge_receive_crc_class, TP_PROTO(u8 crc, u8 exp_crc), TP_ARGS(crc, exp_crc), @@ -131,17 +204,36 @@ DECLARE_EVENT_CLASS(pibridge_receive_crc_class, ) ); +/* + * pibridge_receive_io_crc + * + * Info: the CRC that is part of the received IO packet. + * Time: after the CRC of an IO packet has been received. + */ DEFINE_EVENT(pibridge_receive_crc_class, pibridge_receive_io_crc, TP_PROTO(u8 crc, u8 exp_crc), TP_ARGS(crc, exp_crc) ); +/* + * pibridge_receive_gate_crc + * + * Info: the CRC that is part of the received gateway packet. + * Time: after the CRC of a gateway packet has been received. + */ DEFINE_EVENT(pibridge_receive_crc_class, pibridge_receive_gate_crc, TP_PROTO(u8 crc, u8 exp_crc), TP_ARGS(crc, exp_crc) ); -/* packet data */ +/* + * pibridge_buffer_data_class + * + * Print a data buffer and the buffer length. + * + * buffer: data bytes. + * len: number of data bytes. + */ DECLARE_EVENT_CLASS(pibridge_buffer_data_class, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len), @@ -152,7 +244,7 @@ DECLARE_EVENT_CLASS(pibridge_buffer_data_class, ), TP_fast_assign( memcpy(__entry->buffer, buffer, len); - __entry->len= len; + __entry->len = len; ), TP_printk( "datalen=%d data:%s", @@ -162,42 +254,101 @@ DECLARE_EVENT_CLASS(pibridge_buffer_data_class, ) ); +/* + * pibridge_receive_io_data + * + * Info: the payload data received with an IO response packet. If the packet is + * larger than expected, only the expected number of bytes is emitted. + * Excess bytes are discarded, see pibridge_discard_data and + * pibridge_discard_timeout events. + * Time: after the data bytes of an IO response packet have been received. + */ DEFINE_EVENT(pibridge_buffer_data_class, pibridge_receive_io_data, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len) ); +/* + * pibridge_receive_gate_data + * + * Info: the payload data received with a gateway response packet. If the packet + * is larger than expected, only the expected number of bytes is emitted. + * Excess bytes are discarded, see pibridge_discard_data and + * pibridge_discard_timeout events. + * Time: after the data bytes of a gateway response packet have been received. + */ DEFINE_EVENT(pibridge_buffer_data_class, pibridge_receive_gate_data, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len) ); +/* + * pibridge_send_io_data + * + * Info: the data sent with an IO request packet. + * Time: before the data portion of an IO packet is sent on the wire. + */ DEFINE_EVENT(pibridge_buffer_data_class, pibridge_send_io_data, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len) ); +/* + * pibridge_send_gate_data + * + * Info: the data sent with a gateway request packet. + * Time: before the data portion of a gateway packet is sent on the wire. + */ DEFINE_EVENT(pibridge_buffer_data_class, pibridge_send_gate_data, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len) ); +/* + * pibridge_send_begin + * + * Info: the bytes to send in raw format. + * Time: before the bytes are sent on the wire. + */ DEFINE_EVENT(pibridge_buffer_data_class, pibridge_send_begin, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len) ); +/* + * pibridge_receive_end + * + * Info: received bytes in raw format. + * Time: after the expected number of bytes has been received or a timeout + * occurred. + */ DEFINE_EVENT(pibridge_buffer_data_class, pibridge_receive_end, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len) ); +/* + * pibridge_wakeup_receive_buffer + * + * Info: received bytes in raw format. + * Time: after a chunk of bytes has been received from the serial line following + * a notification by the serdev layer. + */ DEFINE_EVENT(pibridge_buffer_data_class, pibridge_wakeup_receive_buffer, TP_PROTO(const unsigned char *buffer, unsigned int len), TP_ARGS(buffer, len) ); -/* Timeout */ +/* + * pibridge_timeout_class + * + * Print the number of bytes received within a timeout. Also print the timeout + * itself and the number of bytes that were expected to be received. + * + * received: number of received bytes when the timeout occurred. + * expected: number of bytes expected before timeout expiration. + * timeout: timespan until the timeout. + */ DECLARE_EVENT_CLASS(pibridge_timeout_class, TP_PROTO(unsigned int received, unsigned int expected, unsigned int timeout), @@ -220,19 +371,38 @@ DECLARE_EVENT_CLASS(pibridge_timeout_class, ) ); +/* + * pibridge_receive_timeout + * + * Info: timeout occurred while waiting for data reception. + * Time: after the timeout occurred. + */ DEFINE_EVENT(pibridge_timeout_class, pibridge_receive_timeout, TP_PROTO(unsigned int received, unsigned int expected, unsigned int timeout), TP_ARGS(received, expected, timeout) ); +/* + * pibridge_discard_timeout + + * Info: a timeout occurred while waiting for excess data (of a larger than + * expected packet) that was to be discarded. + * Time: after the timeout occurred. + */ DEFINE_EVENT(pibridge_timeout_class, pibridge_discard_timeout, TP_PROTO(unsigned int received, unsigned int expected, unsigned int timeout), TP_ARGS(received, expected, timeout) ); -/* Serdev name */ +/* + * pibridge_serdev_name_class + * + * Print the serdev device name. + * + * serdev: serdev device to print the name for. + */ DECLARE_EVENT_CLASS(pibridge_serdev_name_class, TP_PROTO(struct serdev_device *serdev), TP_ARGS(serdev), @@ -248,12 +418,23 @@ DECLARE_EVENT_CLASS(pibridge_serdev_name_class, ) ); +/* + * pibridge_wakeup_write + * + * Info: the serdev device that is notified by the serdev subsystem that it is + * ready to write more data. + * Time: at notification by the serdev subsystem. + */ DEFINE_EVENT(pibridge_serdev_name_class, pibridge_wakeup_write, TP_PROTO(struct serdev_device *serdev), TP_ARGS(serdev) ); -/* packet data len */ +/* + * pibridge_data_len_class + * + * len: the number of bytes. + */ DECLARE_EVENT_CLASS(pibridge_data_len_class, TP_PROTO(unsigned int len), TP_ARGS(len), @@ -269,18 +450,36 @@ DECLARE_EVENT_CLASS(pibridge_data_len_class, ) ); +/* + * pibridge_send_end + * + * Info: the number of bytes sent. + * Time: after the bytes have been sent. + */ DEFINE_EVENT(pibridge_data_len_class, pibridge_send_end, TP_PROTO(unsigned int len), TP_ARGS(len) ); +/* + * pibridge_receive_begin + * + * Info: the number of bytes expected to be received. + * Time: before waiting for data reception. + */ DEFINE_EVENT(pibridge_data_len_class, pibridge_receive_begin, TP_PROTO(unsigned int len), TP_ARGS(len) ); - -/* kfifo data */ +/* + * pibridge_kfifo_data_class + * + * Print the data contained in the receive fifo and its size in bytes. + * + * len: number of bytes stored in the receive fifo. + * data: data stored in the receive fifo. + */ DECLARE_EVENT_CLASS(pibridge_kfifo_data_class, TP_PROTO(struct kfifo *fifo), TP_ARGS(fifo), @@ -302,6 +501,14 @@ DECLARE_EVENT_CLASS(pibridge_kfifo_data_class, ) ); +/* + * pibridge_discard_data + * + * Info: the bytes contained in the receive fifo being discarded. + * Time: after the excess bytes of a larger than expected packet have been + * discarded or a timeout occurred while waiting for the data which + * was going to be discarded. + */ DEFINE_EVENT(pibridge_kfifo_data_class, pibridge_discard_data, TP_PROTO(struct kfifo *fifo), TP_ARGS(fifo) From 5849e2d306d48fb153f8ef12f068fc4a7b7b50b6 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 21 Feb 2023 15:23:08 +0100 Subject: [PATCH 179/183] pibridge-serdev: fix bad cycle times Use wait_event_hrtimeout() instead of wait_event_timeout() to wait for more data. The latter uses jiffies to specify the timeout which requires a minimum of 2 jiffies (which equals 20 msecs) to avoid a timeout before the the IO timeout interval used by the pibridge module (10 msecs) have passed. With wait_event_hrtimeout() it is possible to specify the exact 10 msecs as a timeout so we do not have to wait up to 20 msecs in case that no more data arrives. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 1dcd490275d707..4d36b4d56458f0 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -83,9 +83,9 @@ static int pibridge_discard_timeout(u16 len, u16 timeout) unsigned int discarded; int ret = 0; - wait_event_timeout(pi->read_queue, - kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout) + 1); + wait_event_hrtimeout(pi->read_queue, + kfifo_len(&pi->read_fifo) >= len, + ms_to_ktime(timeout)); mutex_lock(&pi->lock); discarded = kfifo_len(&pi->read_fifo); @@ -184,8 +184,8 @@ int pibridge_recv_timeout(void *buf, u8 len, u16 timeout) trace_pibridge_receive_begin(len); - wait_event_timeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, - msecs_to_jiffies(timeout) + 1); + wait_event_hrtimeout(pi->read_queue, kfifo_len(&pi->read_fifo) >= len, + ms_to_ktime(timeout)); mutex_lock(&pi->lock); received = kfifo_out(&pi->read_fifo, buf, len); From 9b89ca2694ca32747f626925d59a49eb9265ba6f Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 21 Mar 2023 18:19:20 +0100 Subject: [PATCH 180/183] pibridge-serdev: change semantic of pibridge_recv_timeout() In function pibridge_recv_timeout() do not return 0 if the number of received bytes is smaller than the size of the provided receive buffer. Instead return the number of received bytes. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 4d36b4d56458f0..1cbd964a4c71dc 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -180,7 +180,6 @@ int pibridge_recv_timeout(void *buf, u8 len, u16 timeout) { struct pibridge *pi = pibridge_s; unsigned int received; - int ret = len; trace_pibridge_receive_begin(len); @@ -193,12 +192,10 @@ int pibridge_recv_timeout(void *buf, u8 len, u16 timeout) trace_pibridge_receive_end(buf, received); - if (received != len) { + if (received != len) trace_pibridge_receive_timeout(received, len, timeout); - ret = 0; - } - return ret; + return received; } EXPORT_SYMBOL(pibridge_recv_timeout); From 39259ac3872fd02ba7863035fc61438006762873 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 21 Mar 2023 18:29:33 +0100 Subject: [PATCH 181/183] pibridge-serdev: change semantic of pibridge_req_io() In function pibridge_req_io() do not return 0 in case of success but instead return the number of received bytes. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index 1cbd964a4c71dc..ce26ad43b31b66 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -500,14 +500,7 @@ int pibridge_req_io(u8 addr, u8 cmd, void *snd_buf, u8 snd_len, void *rcv_buf, return -EBADMSG; } - if (pkthdr.len < rcv_len) { - dev_warn_ratelimited(&pibridge_s->serdev->dev, - "received packet smaller than expected (size: %u, expected: %u)\n", - pkthdr.len, rcv_len); - return -EBADMSG; - } - - return 0; + return to_receive; } EXPORT_SYMBOL(pibridge_req_io); From c8b54bcc41a3637fdc8fe7c7af1fe87514e259ea Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Tue, 21 Mar 2023 18:56:00 +0100 Subject: [PATCH 182/183] pibridge-serdev: change semantic of pibridge_req_gate_tmt() In function pibridge_req_gate_tmt() do not return 0 in case of success but instead return the number of received bytes. Signed-off-by: Lino Sanfilippo --- drivers/tty/serdev/pibridge.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/tty/serdev/pibridge.c b/drivers/tty/serdev/pibridge.c index ce26ad43b31b66..cc54d4ba4c4b8f 100644 --- a/drivers/tty/serdev/pibridge.c +++ b/drivers/tty/serdev/pibridge.c @@ -350,14 +350,7 @@ int pibridge_req_gate_tmt(u8 dst, u16 cmd, void *snd_buf, u8 snd_len, return -EBADMSG; } - if (pkthdr.len < rcv_len) { - dev_warn_ratelimited(&pibridge_s->serdev->dev, - "received packet smaller than expected (size: %u, expected: %u)\n", - pkthdr.len, rcv_len); - return -EBADMSG; - } - - return 0; + return to_receive; } EXPORT_SYMBOL(pibridge_req_gate_tmt); From 8a2d7ee640f7c1d54c55068ee48a0a50969a642e Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo Date: Fri, 26 May 2023 18:39:51 +0200 Subject: [PATCH 183/183] tpm,tpm_tis: Handle interrupt storm After activation of interrupts for TPM TIS drivers 0-day reports an interrupt storm on an Intel(R) Xeon(R) Gold 6346. Fix this by detecting the storm and falling back to polling: Count the number of unhandled interrupts within a 10 ms time interval. In case that more than 1000 were unhandled deactivate interrupts entirely, deregister the handler and use polling instead. The storm detection logic equals the implementation in note_interrupt() which uses timestamps and counters stored in struct irq_desc. Since this structure is private to the generic interrupt core the TPM TIS core uses its own timestamps and counters. Furthermore the TPM interrupt handler always returns IRQ_HANDLED to prevent the generic interrupt core from processing the interrupt storm. Since the interrupt deregistration function devm_free_irq() waits for all interrupt handlers to finish, only trigger a worker in the interrupt handler and do the unregistration in the worker to avoid a deadlock. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202305041325.ae8b0c43-yujie.liu@intel.com/ Suggested-by: Lukas Wunner Signed-off-by: Lino Sanfilippo --- drivers/char/tpm/tpm_tis_core.c | 94 ++++++++++++++++++++++++++++----- drivers/char/tpm/tpm_tis_core.h | 4 ++ 2 files changed, 85 insertions(+), 13 deletions(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index a5b9bd564915a8..8d791ebcd6f030 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -469,25 +469,32 @@ static int tpm_tis_send_data(struct tpm_chip *chip, const u8 *buf, size_t len) return rc; } +static void __tpm_tis_disable_interrupts(struct tpm_chip *chip) +{ + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); + u32 intmask = 0; + + tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask); + intmask &= ~TPM_GLOBAL_INT_ENABLE; + + tpm_tis_request_locality(chip, 0); + tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask); + tpm_tis_relinquish_locality(chip, 0); + + chip->flags &= ~TPM_CHIP_FLAG_IRQ; +} + static void disable_interrupts(struct tpm_chip *chip) { struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); - u32 intmask; - int rc; if (priv->irq == 0) return; - rc = tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask); - if (rc < 0) - intmask = 0; - - intmask &= ~TPM_GLOBAL_INT_ENABLE; - rc = tpm_tis_write32(priv, TPM_INT_ENABLE(priv->locality), intmask); + __tpm_tis_disable_interrupts(chip); devm_free_irq(chip->dev.parent, priv->irq, chip); priv->irq = 0; - chip->flags &= ~TPM_CHIP_FLAG_IRQ; } /* @@ -753,6 +760,52 @@ static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status) return status == TPM_STS_COMMAND_READY; } +static void tpm_tis_reenable_polling(struct tpm_chip *chip) +{ + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); + + dev_warn(&chip->dev, HW_ERR + "TPM interrupt storm detected, polling instead\n"); + + __tpm_tis_disable_interrupts(chip); + + /* + * devm_free_irq() must not be called from within the interrupt handler, + * since this function waits for running handlers to finish and thus it + * would deadlock. Instead trigger a worker that takes care of the + * unregistration. + */ + schedule_work(&priv->free_irq_work); +} + +static irqreturn_t tpm_tis_check_for_interrupt_storm(struct tpm_chip *chip) +{ + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); + const unsigned int MAX_UNHANDLED_IRQS = 1000; + + /* + * The worker to free the TPM interrupt (free_irq_work) may already + * be scheduled, so make sure it is not scheduled again. + */ + if (!(chip->flags & TPM_CHIP_FLAG_IRQ)) + return IRQ_HANDLED; + + if (time_after(jiffies, priv->last_unhandled_irq + HZ/10)) + priv->unhandled_irqs = 1; + else + priv->unhandled_irqs++; + + priv->last_unhandled_irq = jiffies; + + if (priv->unhandled_irqs > MAX_UNHANDLED_IRQS) + tpm_tis_reenable_polling(chip); + /* + * Prevent the genirq code from starting its own interrupt storm + * handling by always reporting that the interrupt was handled. + */ + return IRQ_HANDLED; +} + static irqreturn_t tis_int_handler(int dummy, void *dev_id) { struct tpm_chip *chip = dev_id; @@ -762,10 +815,12 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) rc = tpm_tis_read32(priv, TPM_INT_STATUS(priv->locality), &interrupt); if (rc < 0) - return IRQ_NONE; + goto unhandled; - if (interrupt == 0) - return IRQ_NONE; + if (interrupt == 0) { + rc = -1; + goto unhandled; + } set_bit(TPM_TIS_IRQ_TESTED, &priv->flags); if (interrupt & TPM_INTF_DATA_AVAIL_INT) @@ -780,8 +835,9 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) tpm_tis_request_locality(chip, 0); rc = tpm_tis_write32(priv, TPM_INT_STATUS(priv->locality), interrupt); tpm_tis_relinquish_locality(chip, 0); +unhandled: if (rc < 0) - return IRQ_NONE; + return tpm_tis_check_for_interrupt_storm(chip); tpm_tis_read32(priv, TPM_INT_STATUS(priv->locality), &interrupt); return IRQ_HANDLED; @@ -805,6 +861,15 @@ static void tpm_tis_gen_interrupt(struct tpm_chip *chip) chip->flags &= ~TPM_CHIP_FLAG_IRQ; } +static void tpm_tis_free_irq_func(struct work_struct *work) +{ + struct tpm_tis_data *priv = container_of(work, typeof(*priv), free_irq_work); + struct tpm_chip *chip = priv->chip; + + devm_free_irq(chip->dev.parent, priv->irq, chip); + priv->irq = 0; +} + /* Register the IRQ and issue a command that will cause an interrupt. If an * irq is seen then leave the chip setup for IRQ operation, otherwise reverse * everything and leave in polling mode. Returns 0 on success. @@ -817,6 +882,7 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, int rc; u32 int_status; + INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func); rc = devm_request_threaded_irq(chip->dev.parent, irq, NULL, tis_int_handler, IRQF_ONESHOT | flags, @@ -919,6 +985,7 @@ void tpm_tis_remove(struct tpm_chip *chip) interrupt = 0; tpm_tis_write32(priv, reg, ~TPM_GLOBAL_INT_ENABLE & interrupt); + flush_work(&priv->free_irq_work); tpm_tis_clkrun_enable(chip, false); @@ -1023,6 +1090,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq, chip->timeout_b = msecs_to_jiffies(TIS_TIMEOUT_B_MAX); chip->timeout_c = msecs_to_jiffies(TIS_TIMEOUT_C_MAX); chip->timeout_d = msecs_to_jiffies(TIS_TIMEOUT_D_MAX); + priv->chip = chip; priv->timeout_min = TPM_TIMEOUT_USECS_MIN; priv->timeout_max = TPM_TIMEOUT_USECS_MAX; priv->phy_ops = phy_ops; diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h index e978f457fd4d4c..b1fa423670528c 100644 --- a/drivers/char/tpm/tpm_tis_core.h +++ b/drivers/char/tpm/tpm_tis_core.h @@ -91,11 +91,15 @@ enum tpm_tis_flags { }; struct tpm_tis_data { + struct tpm_chip *chip; u16 manufacturer_id; struct mutex locality_count_mutex; unsigned int locality_count; int locality; int irq; + struct work_struct free_irq_work; + unsigned long last_unhandled_irq; + unsigned int unhandled_irqs; unsigned int int_mask; unsigned long flags; void __iomem *ilb_base_addr;