--- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
+++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
@@ -64,8 +64,6 @@ allOf:
- - description: scu base address
- - description: misc scu base address
+ reg:
+ minItems: 2
- '#reset-cells': false
-
- if:
properties:
compatible:
-@@ -89,6 +87,7 @@ examples:
+@@ -85,6 +83,7 @@ examples:
reg = <0x1fa20000 0x400>,
<0x1fb00000 0x1000>;
#clock-cells = <1>;
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -391,13 +391,13 @@ config MACH_DECSTATION
+@@ -392,13 +392,13 @@ config MACH_DECSTATION
config ECONET
bool "EcoNet MIPS family"
select BOOT_RAW
for_each_possible_cpu(i) {
struct clock_event_device *cd = &per_cpu(econet_timer_pcpu, i);
-- cd->rating = 310,
+- cd->rating = 310;
- cd->features = CLOCK_EVT_FEAT_ONESHOT |
- CLOCK_EVT_FEAT_C3STOP |
- CLOCK_EVT_FEAT_PERCPU;
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
-@@ -370,6 +370,12 @@ config SPI_DLN2
+@@ -404,6 +404,12 @@ config SPI_DLN2
This driver can also be built as a module. If so, the module
will be called spi-dln2.
depends on ARCH_EP93XX || COMPILE_TEST
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
-@@ -52,6 +52,7 @@ obj-$(CONFIG_SPI_DW_BT1) += spi-dw-bt1.
+@@ -56,6 +56,7 @@ obj-$(CONFIG_SPI_DW_BT1) += spi-dw-bt1.
obj-$(CONFIG_SPI_DW_MMIO) += spi-dw-mmio.o
obj-$(CONFIG_SPI_DW_PCI) += spi-dw-pci.o
obj-$(CONFIG_SPI_EP93XX) += spi-ep93xx.o
+ struct spi_controller *ctrl;
+ int err;
+
-+ ctrl = devm_spi_alloc_master(&pdev->dev, 0);
++ ctrl = devm_spi_alloc_host(&pdev->dev, 0);
+ if (!ctrl) {
+ dev_err(&pdev->dev, "Error allocating SPI controller\n");
+ return -ENOMEM;
---
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
-@@ -372,7 +372,7 @@ config SPI_DLN2
+@@ -406,7 +406,7 @@ config SPI_DLN2
config SPI_AIROHA_EN7523
bool "Airoha EN7523 SPI controller support"
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
-@@ -59,7 +59,7 @@ comment "SPI Master Controller Drivers"
+@@ -62,7 +62,7 @@ comment "SPI Master Controller Drivers"
config SPI_AIROHA_SNFI
tristate "Airoha SPI NAND Flash Interface"
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
-@@ -391,6 +391,7 @@ config MACH_DECSTATION
+@@ -392,6 +392,7 @@ config MACH_DECSTATION
config ECONET
bool "EcoNet MIPS family"
select BOOT_RAW
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
-@@ -271,7 +271,7 @@ config GPIO_EM
+@@ -293,7 +293,7 @@ config GPIO_EM
config GPIO_EN7523
tristate "Airoha GPIO support"
+EXPORT_SYMBOL_GPL(en7523_set_uart_baud_rate);
--- a/drivers/tty/serial/8250/8250_of.c
+++ b/drivers/tty/serial/8250/8250_of.c
-@@ -341,6 +341,7 @@ static const struct of_device_id of_plat
+@@ -353,6 +353,7 @@ static const struct of_device_id of_plat
{ .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, },
{ .compatible = "nuvoton,wpcm450-uart", .data = (void *)PORT_NPCM, },
{ .compatible = "nuvoton,npcm750-uart", .data = (void *)PORT_NPCM, },
MODULE_DEVICE_TABLE(of, of_platform_serial_table);
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
-@@ -319,6 +319,14 @@ static const struct serial8250_config ua
+@@ -311,6 +311,14 @@ static const struct serial8250_config ua
.rxtrig_bytes = {1, 8, 16, 30},
.flags = UART_CAP_FIFO | UART_CAP_AFE,
},
};
/* Uart divisor latch read */
-@@ -2841,6 +2849,12 @@ serial8250_do_set_termios(struct uart_po
-
- serial8250_set_divisor(port, baud, quot, frac);
-
+@@ -2782,6 +2790,11 @@ serial8250_do_set_termios(struct uart_po
+ serial8250_set_ier(port, termios);
+ serial8250_set_efr(port, termios);
+ serial8250_set_divisor(port, baud, quot, frac);
+#ifdef CONFIG_SERIAL_8250_AIROHA
-+ /* Airoha SoCs have custom registers for baud rate settings */
-+ if (port->type == PORT_AIROHA)
-+ en7523_set_uart_baud_rate(port, baud);
++ /* Airoha SoCs have custom registers for baud rate settings */
++ if (port->type == PORT_AIROHA)
++ en7523_set_uart_baud_rate(port, baud);
+#endif
-+
- /*
- * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR
- * is written without DLAB set, this mode will be disabled.
+ serial8250_set_fcr(port, termios);
+ serial8250_set_mctrl(port, port->mctrl);
+ }
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
-@@ -355,6 +355,16 @@ config SERIAL_8250_ACORN
+@@ -356,6 +356,16 @@ config SERIAL_8250_ACORN
system, say Y to this option. The driver can handle 1, 2, or 3 port
cards. If unsure, say N.
unsigned int quot);
int fsl8250_handle_irq(struct uart_port *port);
+int en7523_set_uart_baud_rate(struct uart_port *port, unsigned int baud);
+ void serial8250_handle_irq_locked(struct uart_port *port, unsigned int iir);
int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
u16 serial8250_rx_chars(struct uart_8250_port *up, u16 lsr);
- void serial8250_read_char(struct uart_8250_port *up, u16 lsr);
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
-@@ -357,7 +357,7 @@ config SERIAL_8250_ACORN
+@@ -358,7 +358,7 @@ config SERIAL_8250_ACORN
config SERIAL_8250_AIROHA
tristate "Airoha UART support"
obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
-obj-$(CONFIG_MTD_NAND_MTK_BMT) += mtk_bmt.o mtk_bmt_v2.o mtk_bmt_bbt.o mtk_bmt_nmbm.o
+obj-$(CONFIG_MTD_NAND_MTK_BMT) += mtk_bmt.o mtk_bmt_v2.o mtk_bmt_bbt.o mtk_bmt_nmbm.o en75_bmt.o
+ obj-$(CONFIG_MTD_NAND_ECC_REALTEK) += ecc-realtek.o
obj-$(CONFIG_SPI_QPIC_SNAND) += qpic_common.o
obj-$(CONFIG_MTD_NAND_QCOM) += qpic_common.o
- obj-y += onenand/
--- a/drivers/mtd/nand/mtk_bmt.h
+++ b/drivers/mtd/nand/mtk_bmt.h
@@ -77,6 +77,7 @@ extern struct bmt_desc bmtd;
#include <linux/spi/spi-mem.h>
+#include <linux/mtd/mtk_bmt.h>
- static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
+ int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
{
-@@ -1604,6 +1605,7 @@ static int spinand_probe(struct spi_mem
+@@ -1718,6 +1719,7 @@ static int spinand_probe(struct spi_mem
if (ret)
return ret;
ret = mtd_device_register(mtd, NULL, 0);
if (ret)
goto err_spinand_cleanup;
-@@ -1611,6 +1613,7 @@ static int spinand_probe(struct spi_mem
+@@ -1725,6 +1727,7 @@ static int spinand_probe(struct spi_mem
return 0;
err_spinand_cleanup:
spinand_cleanup(spinand);
return ret;
-@@ -1629,6 +1632,7 @@ static int spinand_remove(struct spi_mem
+@@ -1743,6 +1746,7 @@ static int spinand_remove(struct spi_mem
if (ret)
return ret;
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
-@@ -210,13 +210,13 @@ config COMMON_CLK_CS2000_CP
+@@ -218,13 +218,13 @@ config COMMON_CLK_CS2000_CP
If you say yes here you get support for the CS2000 clock multiplier.
config COMMON_CLK_EN7523
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
-@@ -187,7 +187,7 @@ config PCI_MVEBU
+@@ -193,7 +193,7 @@ config PCI_MVEBU
config PCIE_MEDIATEK
tristate "MediaTek PCIe controller"
+ depends on ARCH_AIROHA || ARCH_MEDIATEK || ECONET || COMPILE_TEST
depends on OF
depends on PCI_MSI
- help
+ select IRQ_MSI_LIB
--- a/arch/mips/econet/Kconfig
+++ b/arch/mips/econet/Kconfig
@@ -14,7 +14,9 @@ choice
select SYS_SUPPORTS_HIGHMEM
--- a/drivers/pci/controller/pcie-mediatek.c
+++ b/drivers/pci/controller/pcie-mediatek.c
-@@ -76,6 +76,7 @@
+@@ -77,6 +77,7 @@
#define PCIE_CONF_VEND_ID 0x100
#define PCIE_CONF_DEVICE_ID 0x102
#define PCIE_CONF_CLASS_ID 0x106
#define PCIE_INT_MASK 0x420
-@@ -88,6 +89,11 @@
+@@ -89,6 +90,11 @@
#define MSI_MASK BIT(23)
#define MTK_MSI_IRQS_NUM 32
#define PCIE_AHB_TRANS_BASE0_L 0x438
#define PCIE_AHB_TRANS_BASE0_H 0x43c
#define AHB2PCIE_SIZE(x) ((x) & GENMASK(4, 0))
-@@ -750,6 +756,86 @@ static int mtk_pcie_startup_port_v2(stru
+@@ -746,6 +752,86 @@ static int mtk_pcie_startup_port_v2(stru
return 0;
}
static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
unsigned int devfn, int where)
{
-@@ -1116,6 +1202,20 @@ static int mtk_pcie_probe(struct platfor
+@@ -1107,6 +1193,20 @@ static int mtk_pcie_probe(struct platfor
if (err)
goto put_resources;
return 0;
put_resources:
-@@ -1225,12 +1325,19 @@ static const struct mtk_pcie_soc mtk_pci
+@@ -1216,12 +1316,19 @@ static const struct mtk_pcie_soc mtk_pci
.setup_irq = mtk_pcie_setup_irq,
};
MODULE_DEVICE_TABLE(of, mtk_pcie_ids);
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
-@@ -82,6 +82,17 @@ config PHY_AIROHA_PCIE
- This driver create the basic PHY instance and provides initialize
- callback for PCIe GEN3 port.
+@@ -123,6 +123,17 @@ config PHY_NXP_PTN3222
+ schemes. It supports all three USB 2.0 data rates: Low Speed, Full
+ Speed and High Speed.
+config PHY_EN7528_PCIE
+ tristate "EcoNet EN7528 PCIe PHY Driver"
source "drivers/phy/broadcom/Kconfig"
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
-@@ -11,6 +11,7 @@ obj-$(CONFIG_PHY_XGENE) += phy-xgene.o
- obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-pistachio-usb.o
+@@ -14,6 +14,7 @@ obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-
+ obj-$(CONFIG_PHY_SNPS_EUSB2) += phy-snps-eusb2.o
obj-$(CONFIG_USB_LGM_PHY) += phy-lgm-usb.o
obj-$(CONFIG_PHY_AIROHA_PCIE) += phy-airoha-pcie.o
+obj-$(CONFIG_PHY_EN7528_PCIE) += phy-en7528-pcie.o
- obj-y += allwinner/ \
+ obj-$(CONFIG_PHY_NXP_PTN3222) += phy-nxp-ptn3222.o
+ obj-$(CONFIG_GENERIC_PHY) += allwinner/ \
amlogic/ \
- broadcom/ \
--- /dev/null
+++ b/drivers/phy/phy-en7528-pcie.c
@@ -0,0 +1,155 @@
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
-@@ -349,6 +349,9 @@ static void pci_read_bridge_io(struct pc
+@@ -396,6 +396,9 @@ static void pci_read_bridge_io(struct pc
unsigned long io_mask, io_granularity, base, limit;
struct pci_bus_region region;
io_mask = PCI_IO_RANGE_MASK;
io_granularity = 0x1000;
if (dev->io_window_1k) {
-@@ -410,6 +413,9 @@ static void pci_read_bridge_mmio_pref(st
+@@ -466,6 +469,9 @@ static void pci_read_bridge_mmio_pref(st
pci_bus_addr_t base, limit;
struct pci_bus_region region;
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
-@@ -93,6 +93,17 @@ config PHY_EN7528_PCIE
+@@ -134,6 +134,17 @@ config PHY_EN7528_PCIE
This driver provides PHY initialization for the two PCIe ports
on EN7528 SoC.
source "drivers/phy/broadcom/Kconfig"
--- a/drivers/phy/Makefile
+++ b/drivers/phy/Makefile
-@@ -12,6 +12,7 @@ obj-$(CONFIG_PHY_PISTACHIO_USB) += phy-
+@@ -15,6 +15,7 @@ obj-$(CONFIG_PHY_SNPS_EUSB2) += phy-snp
obj-$(CONFIG_USB_LGM_PHY) += phy-lgm-usb.o
obj-$(CONFIG_PHY_AIROHA_PCIE) += phy-airoha-pcie.o
obj-$(CONFIG_PHY_EN7528_PCIE) += phy-en7528-pcie.o
+obj-$(CONFIG_PHY_EN7528_USB) += phy-en7528-usb.o
- obj-y += allwinner/ \
+ obj-$(CONFIG_PHY_NXP_PTN3222) += phy-nxp-ptn3222.o
+ obj-$(CONFIG_GENERIC_PHY) += allwinner/ \
amlogic/ \
- broadcom/ \
--- /dev/null
+++ b/drivers/phy/phy-en7528-usb.c
@@ -0,0 +1,316 @@