mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
Merge Official Source
This commit is contained in:
commit
234200937f
@ -33,6 +33,7 @@ xiaomi,miwifi-nano|\
|
||||
zbtlink,zbt-wg2626)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
|
||||
;;
|
||||
linksys,ea7500-v2|\
|
||||
xiaomi,mir3p|\
|
||||
xiaomi,mir3g)
|
||||
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
|
||||
|
@ -276,11 +276,7 @@ static int nct5104d_gpio_probe(struct platform_device *pdev)
|
||||
for (i = 0; i < data->nr_bank; i++) {
|
||||
struct nct5104d_gpio_bank *bank = &data->bank[i];
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
|
||||
bank->chip.dev = &pdev->dev;
|
||||
#else
|
||||
bank->chip.parent = &pdev->dev;
|
||||
#endif
|
||||
bank->data = data;
|
||||
|
||||
err = gpiochip_add(&bank->chip);
|
||||
@ -298,15 +294,7 @@ err_gpiochip:
|
||||
for (i = i - 1; i >= 0; i--) {
|
||||
struct nct5104d_gpio_bank *bank = &data->bank[i];
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
|
||||
int rm_err = gpiochip_remove(&bank->chip);
|
||||
if (rm_err < 0)
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to remove gpiochip %d: %d\n",
|
||||
i, rm_err);
|
||||
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
|
||||
gpiochip_remove (&bank->chip);
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
|
||||
}
|
||||
|
||||
return err;
|
||||
@ -320,17 +308,7 @@ static int nct5104d_gpio_remove(struct platform_device *pdev)
|
||||
for (i = 0; i < data->nr_bank; i++) {
|
||||
struct nct5104d_gpio_bank *bank = &data->bank[i];
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
|
||||
int err = gpiochip_remove(&bank->chip);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev,
|
||||
"Failed to remove GPIO gpiochip %d: %d\n",
|
||||
i, err);
|
||||
return err;
|
||||
}
|
||||
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
|
||||
gpiochip_remove (&bank->chip);
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -111,11 +111,7 @@ static inline long
|
||||
ugly_hack_sleep_on_timeout(wait_queue_head_t *q, long timeout)
|
||||
{
|
||||
unsigned long flags;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
|
||||
wait_queue_entry_t wait;
|
||||
#else
|
||||
wait_queue_t wait;
|
||||
#endif
|
||||
|
||||
init_waitqueue_entry(&wait, current);
|
||||
|
||||
@ -523,9 +519,7 @@ typedef struct DSL_DEV_Device
|
||||
#define IFX_DFEIR 0
|
||||
#define IFX_DYING_GASP 1
|
||||
DSL_DEV_MeiDebug_t lop_debugwr; /* dying gasp */
|
||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))
|
||||
struct module *owner;
|
||||
#endif
|
||||
} DSL_DEV_Device_t; /* ifx_adsl_device_t */
|
||||
|
||||
#define DSL_DEV_PRIVATE(dev) ((ifx_mei_device_private_t*)(dev->pPriv))
|
||||
|
@ -60,7 +60,6 @@
|
||||
|
||||
static inline void vr9_reset_ppe(struct platform_device *pdev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct reset_control *dsp;
|
||||
struct reset_control *dfe;
|
||||
@ -97,7 +96,6 @@ static inline void vr9_reset_ppe(struct platform_device *pdev)
|
||||
udelay(1000);
|
||||
*PP32_SRST |= 0x000303CF;
|
||||
udelay(1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int vr9_pp32_download_code(int pp32, u32 *code_src, unsigned int code_dword_len, u32 *data_src, unsigned int data_dword_len)
|
||||
|
@ -1809,11 +1809,7 @@ static int ltq_atm_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* register interrupt handler */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
|
||||
ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, 0, "atm_mailbox_isr", &g_atm_priv_data);
|
||||
#else
|
||||
ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, IRQF_DISABLED, "atm_mailbox_isr", &g_atm_priv_data);
|
||||
#endif
|
||||
if ( ret ) {
|
||||
if ( ret == -EBUSY ) {
|
||||
pr_err("IRQ may be occupied by other driver, please reconfig to disable it.\n");
|
||||
|
@ -895,18 +895,6 @@ int ifxdeu_init_aes (void)
|
||||
int ret = -ENOSYS;
|
||||
|
||||
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
|
||||
if (!disable_multiblock) {
|
||||
ifxdeu_aes_alg.cra_u.cipher.cia_max_nbytes = AES_BLOCK_SIZE; //(size_t)-1;
|
||||
ifxdeu_aes_alg.cra_u.cipher.cia_req_align = 16;
|
||||
ifxdeu_aes_alg.cra_u.cipher.cia_ecb = ifx_deu_aes_ecb;
|
||||
ifxdeu_aes_alg.cra_u.cipher.cia_cbc = ifx_deu_aes_cbc;
|
||||
ifxdeu_aes_alg.cra_u.cipher.cia_cfb = ifx_deu_aes_cfb;
|
||||
ifxdeu_aes_alg.cra_u.cipher.cia_ofb = ifx_deu_aes_ofb;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((ret = crypto_register_alg(&ifxdeu_aes_alg)))
|
||||
goto aes_err;
|
||||
|
||||
|
@ -100,11 +100,7 @@ extern char debug_level;
|
||||
|
||||
|
||||
static int disable_multiblock = 0;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
|
||||
module_param(disable_multiblock, int, 0);
|
||||
#else
|
||||
MODULE_PARM_DESC(disable_multiblock, "Disable encryption of whole multiblock buffers");
|
||||
#endif
|
||||
|
||||
static int disable_deudma = 1;
|
||||
|
||||
|
@ -117,11 +117,7 @@ struct des_ctx {
|
||||
|
||||
|
||||
static int disable_multiblock = 0;
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
|
||||
module_param(disable_multiblock, int, 0);
|
||||
#else
|
||||
MODULE_PARM_DESC(disable_multiblock, "Disable encryption of whole multiblock buffers");
|
||||
#endif
|
||||
|
||||
static int disable_deudma = 1;
|
||||
|
||||
@ -893,16 +889,6 @@ int __init lqdeu_async_des_init (void)
|
||||
{
|
||||
int i, j, ret = -EINVAL;
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
|
||||
if (!disable_multiblock) {
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_max_nbytes = DES_BLOCK_SIZE; //(size_t)-1;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_req_align = 16;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_ecb = ifx_deu_des_ecb;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_cbc = ifx_deu_des_cbc;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_cfb = ifx_deu_des_cfb;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_ofb = ifx_deu_des_ofb;
|
||||
}
|
||||
#endif
|
||||
for (i = 0; i < ARRAY_SIZE(des_drivers_alg); i++) {
|
||||
ret = crypto_register_alg(&des_drivers_alg[i].alg);
|
||||
//printk("driver: %s\n", des_drivers_alg[i].alg.cra_name);
|
||||
|
@ -691,17 +691,6 @@ int ifxdeu_init_des (void)
|
||||
int ret = -ENOSYS;
|
||||
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
|
||||
if (!disable_multiblock) {
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_max_nbytes = DES_BLOCK_SIZE; //(size_t)-1;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_req_align = 16;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_ecb = ifx_deu_des_ecb;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_cbc = ifx_deu_des_cbc;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_cfb = ifx_deu_des_cfb;
|
||||
ifxdeu_des_alg.cra_u.cipher.cia_ofb = ifx_deu_des_ofb;
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = crypto_register_alg(&ifxdeu_des_alg);
|
||||
if (ret < 0)
|
||||
goto des_err;
|
||||
|
@ -171,14 +171,8 @@ static int ltq_deu_remove(struct platform_device *pdev)
|
||||
|
||||
int disable_multiblock = 0;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
|
||||
module_param(disable_multiblock,int,0);
|
||||
|
||||
#else
|
||||
//MODULE_PARM (disable_multiblock, "i");
|
||||
MODULE_PARM_DESC (disable_multiblock,
|
||||
"Disable encryption of whole multiblock buffers.");
|
||||
#endif
|
||||
|
||||
static const struct of_device_id ltq_deu_match[] = {
|
||||
#ifdef CONFIG_DANUBE
|
||||
|
@ -54,11 +54,7 @@ typedef struct ifx_deu_device {
|
||||
int recv_count;
|
||||
int packet_size;
|
||||
int packet_num;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0))
|
||||
wait_queue_entry_t wait;
|
||||
#else
|
||||
wait_queue_t wait;
|
||||
#endif
|
||||
} _ifx_deu_device;
|
||||
|
||||
extern _ifx_deu_device ifx_deu[1];
|
||||
|
@ -61,12 +61,8 @@
|
||||
* Kernel Version Adaption
|
||||
* ####################################
|
||||
*/
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
|
||||
#define MODULE_PARM_ARRAY(a, b) module_param_array(a, int, NULL, 0)
|
||||
#define MODULE_PARM(a, b) module_param(a, int, 0)
|
||||
#else
|
||||
#define MODULE_PARM_ARRAY(a, b) MODULE_PARM(a, b)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -130,9 +126,6 @@ static int ptm_stop(struct net_device *);
|
||||
static unsigned int ptm_poll(int, unsigned int);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
|
||||
static int ptm_change_mtu(struct net_device *, int);
|
||||
#endif
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
|
||||
@ -243,7 +236,6 @@ static INLINE void init_tables(void);
|
||||
|
||||
static struct ptm_priv_data g_ptm_priv_data;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32)
|
||||
static struct net_device_ops g_ptm_netdev_ops = {
|
||||
.ndo_get_stats = ptm_get_stats,
|
||||
.ndo_open = ptm_open,
|
||||
@ -251,13 +243,9 @@ static struct net_device_ops g_ptm_netdev_ops = {
|
||||
.ndo_start_xmit = ptm_hard_start_xmit,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
|
||||
.ndo_change_mtu = ptm_change_mtu,
|
||||
#endif
|
||||
.ndo_do_ioctl = ptm_ioctl,
|
||||
.ndo_tx_timeout = ptm_tx_timeout,
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct net_device *g_net_dev[2] = {0};
|
||||
static char *g_net_dev_name[2] = {"dsl0", "dslfast0"};
|
||||
@ -291,10 +279,8 @@ static void ptm_setup(struct net_device *dev, int ndev)
|
||||
|
||||
/* hook network operations */
|
||||
dev->netdev_ops = &g_ptm_netdev_ops;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
|
||||
/* Allow up to 1508 bytes, for RFC4638 */
|
||||
dev->max_mtu = ETH_DATA_LEN + 8;
|
||||
#endif
|
||||
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
|
||||
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
|
||||
|
||||
@ -415,11 +401,7 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
/* allocate descriptor */
|
||||
desc_base = get_tx_desc(ndev, &f_full);
|
||||
if ( f_full ) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
|
||||
netif_trans_update(dev);
|
||||
#else
|
||||
dev->trans_start = jiffies;
|
||||
#endif
|
||||
netif_stop_queue(dev);
|
||||
|
||||
IFX_REG_W32_MASK(0, 1 << (ndev + 16), MBOX_IGU1_ISRC);
|
||||
@ -453,11 +435,7 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
g_ptm_priv_data.itf[ndev].stats.tx_packets++;
|
||||
g_ptm_priv_data.itf[ndev].stats.tx_bytes += reg_desc.datalen;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
|
||||
netif_trans_update(dev);
|
||||
#else
|
||||
dev->trans_start = jiffies;
|
||||
#endif
|
||||
mailbox_signal(ndev, 1);
|
||||
|
||||
adsl_led_flash();
|
||||
@ -469,16 +447,6 @@ PTM_HARD_START_XMIT_FAIL:
|
||||
g_ptm_priv_data.itf[ndev].stats.tx_dropped++;
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
|
||||
static int ptm_change_mtu(struct net_device *dev, int mtu)
|
||||
{
|
||||
/* Allow up to 1508 bytes, for RFC4638 */
|
||||
if (mtu < 68 || mtu > ETH_DATA_LEN + 8)
|
||||
return -EINVAL;
|
||||
dev->mtu = mtu;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
{
|
||||
@ -665,10 +633,6 @@ static INLINE int mailbox_rx_irq_handler(unsigned int ch) // return: < 0 - de
|
||||
skb->dev = g_net_dev[ndev];
|
||||
skb->protocol = eth_type_trans(skb, skb->dev);
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
|
||||
g_net_dev[ndev]->last_rx = jiffies;
|
||||
#endif
|
||||
|
||||
netif_rx_ret = netif_receive_skb(skb);
|
||||
|
||||
if ( netif_rx_ret != NET_RX_DROP ) {
|
||||
@ -1513,11 +1477,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* register interrupt handler */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
|
||||
ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, 0, "ptm_mailbox_isr", &g_ptm_priv_data);
|
||||
#else
|
||||
ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, IRQF_DISABLED, "ptm_mailbox_isr", &g_ptm_priv_data);
|
||||
#endif
|
||||
if ( ret ) {
|
||||
if ( ret == -EBUSY ) {
|
||||
err("IRQ may be occupied by other driver, please reconfig to disable it.");
|
||||
|
@ -76,9 +76,6 @@ static int ptm_stop(struct net_device *);
|
||||
static unsigned int ptm_poll(int, unsigned int);
|
||||
static int ptm_napi_poll(struct napi_struct *, int);
|
||||
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
|
||||
static int ptm_change_mtu(struct net_device *, int);
|
||||
#endif
|
||||
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
|
||||
static void ptm_tx_timeout(struct net_device *);
|
||||
|
||||
@ -119,9 +116,6 @@ static struct net_device_ops g_ptm_netdev_ops = {
|
||||
.ndo_start_xmit = ptm_hard_start_xmit,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
|
||||
.ndo_change_mtu = ptm_change_mtu,
|
||||
#endif
|
||||
.ndo_do_ioctl = ptm_ioctl,
|
||||
.ndo_tx_timeout = ptm_tx_timeout,
|
||||
};
|
||||
@ -147,10 +141,8 @@ static void ptm_setup(struct net_device *dev, int ndev)
|
||||
netif_carrier_off(dev);
|
||||
|
||||
dev->netdev_ops = &g_ptm_netdev_ops;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0))
|
||||
/* Allow up to 1508 bytes, for RFC4638 */
|
||||
dev->max_mtu = ETH_DATA_LEN + 8;
|
||||
#endif
|
||||
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
|
||||
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
|
||||
|
||||
@ -228,10 +220,6 @@ static unsigned int ptm_poll(int ndev, unsigned int work_to_do)
|
||||
skb->dev = g_net_dev[0];
|
||||
skb->protocol = eth_type_trans(skb, skb->dev);
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0))
|
||||
g_net_dev[0]->last_rx = jiffies;
|
||||
#endif
|
||||
|
||||
netif_receive_skb(skb);
|
||||
|
||||
g_ptm_priv_data.itf[0].stats.rx_packets++;
|
||||
@ -301,11 +289,7 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
/* allocate descriptor */
|
||||
desc_base = get_tx_desc(0, &f_full);
|
||||
if ( f_full ) {
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
|
||||
netif_trans_update(dev);
|
||||
#else
|
||||
dev->trans_start = jiffies;
|
||||
#endif
|
||||
netif_stop_queue(dev);
|
||||
|
||||
IFX_REG_W32_MASK(0, 1 << 17, MBOX_IGU1_ISRC);
|
||||
@ -367,11 +351,7 @@ static int ptm_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
wmb();
|
||||
*(volatile unsigned int *)desc = *(unsigned int *)®_desc;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
|
||||
netif_trans_update(dev);
|
||||
#else
|
||||
dev->trans_start = jiffies;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
@ -382,17 +362,6 @@ PTM_HARD_START_XMIT_FAIL:
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0))
|
||||
static int ptm_change_mtu(struct net_device *dev, int mtu)
|
||||
{
|
||||
/* Allow up to 1508 bytes, for RFC4638 */
|
||||
if (mtu < 68 || mtu > ETH_DATA_LEN + 8)
|
||||
return -EINVAL;
|
||||
dev->mtu = mtu;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
{
|
||||
ASSERT(dev == g_net_dev[0], "incorrect device");
|
||||
@ -1024,11 +993,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
/* register interrupt handler */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0)
|
||||
ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, 0, "ptm_mailbox_isr", &g_ptm_priv_data);
|
||||
#else
|
||||
ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, IRQF_DISABLED, "ptm_mailbox_isr", &g_ptm_priv_data);
|
||||
#endif
|
||||
if ( ret ) {
|
||||
if ( ret == -EBUSY ) {
|
||||
err("IRQ may be occupied by other driver, please reconfig to disable it.");
|
||||
|
@ -84,7 +84,6 @@ static inline void uninit_pmu(void)
|
||||
|
||||
static inline void reset_ppe(struct platform_device *pdev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
|
||||
struct device *dev = &pdev->dev;
|
||||
struct reset_control *dsp;
|
||||
struct reset_control *dfe;
|
||||
@ -121,7 +120,6 @@ static inline void reset_ppe(struct platform_device *pdev)
|
||||
udelay(1000);
|
||||
*PP32_SRST |= 0x000303CF;
|
||||
udelay(1000);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void init_pdma(void)
|
||||
|
@ -194,11 +194,7 @@ static int gpio_apu2_probe (struct platform_device *dev)
|
||||
}
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
|
||||
gpio_apu2_chip.dev = &dev->dev;
|
||||
#else
|
||||
gpio_apu2_chip.parent = &dev->dev;
|
||||
#endif
|
||||
ret = gpiochip_add (&gpio_apu2_chip);
|
||||
if (ret) {
|
||||
pr_err ("%s: adding gpiochip failed\n", DEVNAME);
|
||||
@ -209,12 +205,7 @@ static int gpio_apu2_probe (struct platform_device *dev)
|
||||
|
||||
static int gpio_apu2_remove (struct platform_device *dev)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)
|
||||
int ret;
|
||||
ret = gpiochip_remove (&gpio_apu2_chip);
|
||||
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
|
||||
gpiochip_remove (&gpio_apu2_chip);
|
||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -57,9 +57,6 @@
|
||||
#include <linux/uaccess.h>
|
||||
|
||||
#include <asm/current.h>
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)
|
||||
#include <asm/system.h>
|
||||
#endif
|
||||
|
||||
#include <bcm47xx.h>
|
||||
#include <linux/bcm47xx_nvram.h>
|
||||
|
@ -7,7 +7,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_RELEASE:=9
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_SOURCE_URL:=http://w1.fi/hostap.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
|
@ -0,0 +1,31 @@
|
||||
From 6a28c4dbc102de3fed9db44637f47a10e7adfb78 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 16 May 2020 21:01:51 +0300
|
||||
Subject: [PATCH 1/3] wolfssl: Fix compiler warnings on size_t printf format
|
||||
use
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
src/crypto/tls_wolfssl.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/src/crypto/tls_wolfssl.c
|
||||
+++ b/src/crypto/tls_wolfssl.c
|
||||
@@ -1741,7 +1741,7 @@ struct wpabuf * tls_connection_encrypt(v
|
||||
if (!conn)
|
||||
return NULL;
|
||||
|
||||
- wpa_printf(MSG_DEBUG, "SSL: encrypt: %ld bytes", wpabuf_len(in_data));
|
||||
+ wpa_printf(MSG_DEBUG, "SSL: encrypt: %zu bytes", wpabuf_len(in_data));
|
||||
|
||||
wolfssl_reset_out_data(&conn->output);
|
||||
|
||||
@@ -1792,7 +1792,7 @@ struct wpabuf * tls_connection_decrypt(v
|
||||
}
|
||||
wpabuf_put(buf, res);
|
||||
|
||||
- wpa_printf(MSG_DEBUG, "SSL: decrypt: %ld bytes", wpabuf_len(buf));
|
||||
+ wpa_printf(MSG_DEBUG, "SSL: decrypt: %zu bytes", wpabuf_len(buf));
|
||||
|
||||
return buf;
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
From eb595b3e3ab531645a5bde71cf6385335b7a4b95 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 16 May 2020 21:02:17 +0300
|
||||
Subject: [PATCH 2/3] wolfssl: Fix crypto_bignum_rand() implementation
|
||||
|
||||
The previous implementation used mp_rand_prime() to generate a random
|
||||
value in range 0..m. That is insanely slow way of generating a random
|
||||
value since mp_rand_prime() is for generating a random _prime_ which is
|
||||
not what is needed here. Replace that implementation with generationg of
|
||||
a random value in the requested range without doing any kind of prime
|
||||
number checks or loops to reject values that are not primes.
|
||||
|
||||
This speeds up SAE and EAP-pwd routines by couple of orders of
|
||||
magnitude..
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
src/crypto/crypto_wolfssl.c | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/src/crypto/crypto_wolfssl.c
|
||||
+++ b/src/crypto/crypto_wolfssl.c
|
||||
@@ -1084,19 +1084,21 @@ int crypto_bignum_rand(struct crypto_big
|
||||
{
|
||||
int ret = 0;
|
||||
WC_RNG rng;
|
||||
+ size_t len;
|
||||
+ u8 *buf;
|
||||
|
||||
if (TEST_FAIL())
|
||||
return -1;
|
||||
if (wc_InitRng(&rng) != 0)
|
||||
return -1;
|
||||
- if (mp_rand_prime((mp_int *) r,
|
||||
- (mp_count_bits((mp_int *) m) + 7) / 8 * 2,
|
||||
- &rng, NULL) != 0)
|
||||
- ret = -1;
|
||||
- if (ret == 0 &&
|
||||
+ len = (mp_count_bits((mp_int *) m) + 7) / 8;
|
||||
+ buf = os_malloc(len);
|
||||
+ if (!buf || wc_RNG_GenerateBlock(&rng, buf, len) != 0 ||
|
||||
+ mp_read_unsigned_bin((mp_int *) r, buf, len) != MP_OKAY ||
|
||||
mp_mod((mp_int *) r, (mp_int *) m, (mp_int *) r) != 0)
|
||||
ret = -1;
|
||||
wc_FreeRng(&rng);
|
||||
+ bin_clear_free(buf, len);
|
||||
return ret;
|
||||
}
|
||||
|
@ -0,0 +1,26 @@
|
||||
From 79488da576aeeb9400e1742fab7f463eed0fa7a1 Mon Sep 17 00:00:00 2001
|
||||
From: Jouni Malinen <j@w1.fi>
|
||||
Date: Sat, 16 May 2020 21:07:45 +0300
|
||||
Subject: [PATCH 3/3] wolfssl: Do not hardcode include directory in
|
||||
wpa_supplicant build
|
||||
|
||||
This is not really appropriate for any kind of cross compilations and is
|
||||
not really needed in general since system specific values can be set in
|
||||
.config.
|
||||
|
||||
Signed-off-by: Jouni Malinen <j@w1.fi>
|
||||
---
|
||||
wpa_supplicant/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/wpa_supplicant/Makefile
|
||||
+++ b/wpa_supplicant/Makefile
|
||||
@@ -1086,7 +1086,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_TLS), wolfssl)
|
||||
ifdef TLS_FUNCS
|
||||
-CFLAGS += -DWOLFSSL_DER_LOAD -I/usr/local/include/wolfssl
|
||||
+CFLAGS += -DWOLFSSL_DER_LOAD
|
||||
OBJS += ../src/crypto/tls_wolfssl.o
|
||||
endif
|
||||
OBJS += ../src/crypto/crypto_wolfssl.o
|
@ -14,7 +14,7 @@ obj.brcm = trx.o
|
||||
obj.bcm47xx = $(obj.brcm)
|
||||
obj.bcm53xx = $(obj.brcm) $(obj.seama)
|
||||
obj.bcm63xx = imagetag.o
|
||||
obj.ramips = $(obj.seama) $(obj.tpl) $(obj.wrg)
|
||||
obj.ramips = $(obj.seama) $(obj.tpl) $(obj.wrg) linksys_bootcount.o
|
||||
obj.mvebu = linksys_bootcount.o
|
||||
obj.kirkwood = linksys_bootcount.o
|
||||
obj.ipq806x = linksys_bootcount.o
|
||||
|
39
target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts
Normal file
39
target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts
Normal file
@ -0,0 +1,39 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/dts-v1/;
|
||||
|
||||
#include "qca955x_ubnt_xc.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "ubnt,powerbeam-5ac-500", "ubnt,xc", "qca,qca9558";
|
||||
model = "Ubiquiti PowerBeam 5AC 500";
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "Reset button";
|
||||
linux,code = <KEY_RESTART>;
|
||||
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
|
||||
debounce-interval = <60>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
|
||||
phy-mask = <4>;
|
||||
phy4: ethernet-phy@4 {
|
||||
phy-mode = "sgmii";
|
||||
reg = <4>;
|
||||
at803x-override-sgmii-link-check;
|
||||
};
|
||||
};
|
||||
|
||||
ð0 {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&art 0x0>;
|
||||
phy-mode = "sgmii";
|
||||
phy-handle = <&phy4>;
|
||||
};
|
67
target/linux/ath79/dts/qca955x_ubnt_xc.dtsi
Normal file
67
target/linux/ath79/dts/qca955x_ubnt_xc.dtsi
Normal file
@ -0,0 +1,67 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
#include "qca955x.dtsi"
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
bootargs = "console=ttyS0,115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&uart {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&spi {
|
||||
status = "okay";
|
||||
num-cs = <1>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <25000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x000000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x040000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x050000 0xf60000>;
|
||||
};
|
||||
|
||||
partition@fb0000 {
|
||||
label = "cfg";
|
||||
reg = <0xfb0000 0x040000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
art: partition@ff0000 {
|
||||
label = "art";
|
||||
reg = <0xff0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -53,6 +53,7 @@ ath79_setup_interfaces()
|
||||
ubnt,nanostation-loco-m|\
|
||||
ubnt,nanostation-loco-m-xw|\
|
||||
ubnt,picostation-m|\
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2|\
|
||||
ubnt,rocket-m|\
|
||||
ubnt,unifiac-lite|\
|
||||
@ -471,6 +472,7 @@ ath79_setup_macs()
|
||||
label_mac=$(cat /sys/class/ieee80211/phy0/macaddress)
|
||||
;;
|
||||
ubnt,litebeam-ac-gen2|\
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2)
|
||||
label_mac=$(mtd_get_mac_binary art 0x5006)
|
||||
;;
|
||||
|
@ -25,6 +25,7 @@ case "$FIRMWARE" in
|
||||
ubnt,nanobeam-ac|\
|
||||
ubnt,nanostation-ac|\
|
||||
ubnt,nanostation-ac-loco|\
|
||||
ubnt,powerbeam-5ac-500|\
|
||||
ubnt,powerbeam-5ac-gen2|\
|
||||
ubnt,unifiac-pro|\
|
||||
yuncore,a770)
|
||||
|
@ -69,6 +69,15 @@ define Device/ubnt-wa
|
||||
UBNT_VERSION := 8.5.0
|
||||
endef
|
||||
|
||||
define Device/ubnt-xc
|
||||
$(Device/ubnt)
|
||||
IMAGE_SIZE := 15744k
|
||||
UBNT_BOARD := XC
|
||||
UBNT_CHIP := qca955x
|
||||
UBNT_TYPE := XC
|
||||
UBNT_VERSION := 8.5.0
|
||||
endef
|
||||
|
||||
define Device/ubnt-xm
|
||||
$(Device/ubnt)
|
||||
DEVICE_VARIANT := XM
|
||||
@ -243,6 +252,15 @@ define Device/ubnt_picostation-m
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_picostation-m
|
||||
|
||||
define Device/ubnt_powerbeam-5ac-500
|
||||
$(Device/ubnt-xc)
|
||||
SOC := qca9558
|
||||
DEVICE_MODEL := PowerBeam 5AC
|
||||
DEVICE_VARIANT := 500
|
||||
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_powerbeam-5ac-500
|
||||
|
||||
define Device/ubnt_powerbeam-5ac-gen2
|
||||
$(Device/ubnt-wa)
|
||||
DEVICE_MODEL := PowerBeam 5AC
|
||||
|
@ -7658,7 +7658,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+}
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/dwc_common_port/dwc_common_linux.c
|
||||
@@ -0,0 +1,1409 @@
|
||||
@@ -0,0 +1,1405 @@
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/module.h>
|
||||
@ -7703,11 +7703,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
|
||||
+# include <linux/usb/gadget.h>
|
||||
+#else
|
||||
+# include <linux/usb_gadget.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/page.h>
|
||||
@ -15687,7 +15683,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+SEARCHENGINE = NO
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/dwc_otg/dummy_audio.c
|
||||
@@ -0,0 +1,1574 @@
|
||||
@@ -0,0 +1,1570 @@
|
||||
+/*
|
||||
+ * zero.c -- Gadget Zero, for USB development
|
||||
+ *
|
||||
@ -15774,11 +15770,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#include <asm/system.h>
|
||||
+#include <asm/unaligned.h>
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
|
||||
+# include <linux/usb/ch9.h>
|
||||
+#else
|
||||
+# include <linux/usb_ch9.h>
|
||||
+#endif
|
||||
+
|
||||
+#include <linux/usb_gadget.h>
|
||||
+
|
||||
@ -32906,7 +32898,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#endif
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_driver.c
|
||||
@@ -0,0 +1,1772 @@
|
||||
@@ -0,0 +1,1768 @@
|
||||
+/* ==========================================================================
|
||||
+ * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_driver.c $
|
||||
+ * $Revision: #92 $
|
||||
@ -33842,11 +33834,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#if defined(LM_INTERFACE) || defined(PLATFORM_INTERFACE)
|
||||
+ dev_dbg(&_dev->dev, "Calling set_irq_type\n");
|
||||
+ set_irq_type(devirq,
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
|
||||
+ IRQT_LOW
|
||||
+#else
|
||||
+ IRQ_TYPE_LEVEL_LOW
|
||||
+#endif
|
||||
+ );
|
||||
+#endif
|
||||
+#endif /*IRQF_TRIGGER_LOW*/
|
||||
@ -36683,7 +36671,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+END(_dwc_otg_fiq_stub)
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
|
||||
@@ -0,0 +1,4327 @@
|
||||
@@ -0,0 +1,4325 @@
|
||||
+
|
||||
+/* ==========================================================================
|
||||
+ * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd.c $
|
||||
@ -37368,7 +37356,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
|
||||
+int dwc_otg_hcd_endpoint_reset(dwc_otg_hcd_t * hcd, void *ep_handle)
|
||||
+{
|
||||
+ int retval = 0;
|
||||
@ -37379,7 +37366,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ qh->data_toggle = DWC_OTG_HC_PID_DATA0;
|
||||
+ return retval;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+/**
|
||||
+ * HCD Callback structure for handling mode switching.
|
||||
@ -46207,7 +46193,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#endif /* DWC_DEVICE_ONLY */
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
|
||||
@@ -0,0 +1,1083 @@
|
||||
@@ -0,0 +1,1034 @@
|
||||
+
|
||||
+/* ==========================================================================
|
||||
+ * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_hcd_linux.c $
|
||||
@ -46265,18 +46251,10 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#include <asm/fiq.h>
|
||||
+#endif
|
||||
+#include <linux/usb.h>
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)
|
||||
+#include <../drivers/usb/core/hcd.h>
|
||||
+#else
|
||||
+#include <linux/usb/hcd.h>
|
||||
+#endif
|
||||
+#include <asm/bug.h>
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
|
||||
+#define USB_URB_EP_LINKING 1
|
||||
+#else
|
||||
+#define USB_URB_EP_LINKING 0
|
||||
+#endif
|
||||
+
|
||||
+#include "dwc_otg_hcd_if.h"
|
||||
+#include "dwc_otg_dbg.h"
|
||||
@ -46307,24 +46285,13 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+/** @{ */
|
||||
+/* manage i/o requests, device state */
|
||||
+static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+ struct usb_host_endpoint *ep,
|
||||
+#endif
|
||||
+ struct urb *urb, gfp_t mem_flags);
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+static int dwc_otg_urb_dequeue(struct usb_hcd *hcd, struct urb *urb);
|
||||
+#endif
|
||||
+#else /* kernels at or post 2.6.30 */
|
||||
+static int dwc_otg_urb_dequeue(struct usb_hcd *hcd,
|
||||
+ struct urb *urb, int status);
|
||||
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) */
|
||||
+
|
||||
+static void endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *ep);
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
|
||||
+static void endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep);
|
||||
+#endif
|
||||
+static irqreturn_t dwc_otg_hcd_irq(struct usb_hcd *hcd);
|
||||
+extern int hcd_start(struct usb_hcd *hcd);
|
||||
+extern void hcd_stop(struct usb_hcd *hcd);
|
||||
@ -46359,9 +46326,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ .urb_enqueue = dwc_otg_urb_enqueue,
|
||||
+ .urb_dequeue = dwc_otg_urb_dequeue,
|
||||
+ .endpoint_disable = endpoint_disable,
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
|
||||
+ .endpoint_reset = endpoint_reset,
|
||||
+#endif
|
||||
+ .get_frame_number = get_frame_number,
|
||||
+
|
||||
+ .hub_status_data = hub_status_data,
|
||||
@ -46583,11 +46548,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#if USB_URB_EP_LINKING
|
||||
+ usb_hcd_unlink_urb_from_ep(dwc_otg_hcd_to_hcd(hcd), urb);
|
||||
+#endif
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+ usb_hcd_giveback_urb(dwc_otg_hcd_to_hcd(hcd), urb);
|
||||
+#else
|
||||
+ usb_hcd_giveback_urb(dwc_otg_hcd_to_hcd(hcd), urb, urb->status);
|
||||
+#endif
|
||||
+ } else {
|
||||
+ new_entry->urb = urb;
|
||||
+#if USB_URB_EP_LINKING
|
||||
@ -46787,14 +46748,10 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ * Allocate memory for the base HCD plus the DWC OTG HCD.
|
||||
+ * Initialize the base HCD.
|
||||
+ */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
|
||||
+ hcd = usb_create_hcd(&dwc_otg_hc_driver, &_dev->dev, _dev->dev.bus_id);
|
||||
+#else
|
||||
+ hcd = usb_create_hcd(&dwc_otg_hc_driver, &_dev->dev, dev_name(&_dev->dev));
|
||||
+ hcd->has_tt = 1;
|
||||
+// hcd->uses_new_polling = 1;
|
||||
+// hcd->poll_rh = 0;
|
||||
+#endif
|
||||
+ if (!hcd) {
|
||||
+ retval = -ENOMEM;
|
||||
+ goto error1;
|
||||
@ -46839,13 +46796,8 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#endif
|
||||
+
|
||||
+ hcd->self.otg_port = dwc_otg_hcd_otg_port(dwc_otg_hcd);
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33) //don't support for LM(with 2.6.20.1 kernel)
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) //version field absent later
|
||||
+ hcd->self.otg_version = dwc_otg_get_otg_version(otg_dev->core_if);
|
||||
+#endif
|
||||
+ /* Don't support SG list at this point */
|
||||
+ hcd->self.sg_tablesize = 0;
|
||||
+#endif
|
||||
+ /*
|
||||
+ * Finish generic HCD initialization and start the HCD. This function
|
||||
+ * allocates the DMA buffer pool, registers the USB bus, requests the
|
||||
@ -47007,15 +46959,10 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ * (URB). mem_flags indicates the type of memory allocation to use while
|
||||
+ * processing this URB. */
|
||||
+static int dwc_otg_urb_enqueue(struct usb_hcd *hcd,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+ struct usb_host_endpoint *ep,
|
||||
+#endif
|
||||
+ struct urb *urb, gfp_t mem_flags)
|
||||
+{
|
||||
+ int retval = 0;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
|
||||
+ struct usb_host_endpoint *ep = urb->ep;
|
||||
+#endif
|
||||
+ dwc_irqflags_t irqflags;
|
||||
+ void **ref_ep_hcpriv = &ep->hcpriv;
|
||||
+ dwc_otg_hcd_t *dwc_otg_hcd = hcd_to_dwc_otg_hcd(hcd);
|
||||
@ -47151,11 +47098,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+
|
||||
+/** Aborts/cancels a USB transfer request. Always returns 0 to indicate
|
||||
+ * success. */
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+static int dwc_otg_urb_dequeue(struct usb_hcd *hcd, struct urb *urb)
|
||||
+#else
|
||||
+static int dwc_otg_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status)
|
||||
+#endif
|
||||
+{
|
||||
+ dwc_irqflags_t flags;
|
||||
+ dwc_otg_hcd_t *dwc_otg_hcd;
|
||||
@ -47191,11 +47134,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags);
|
||||
+
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+ usb_hcd_giveback_urb(hcd, urb);
|
||||
+#else
|
||||
+ usb_hcd_giveback_urb(hcd, urb, status);
|
||||
+#endif
|
||||
+ if (CHK_DEBUG_LEVEL(DBG_HCDV | DBG_HCD_URB)) {
|
||||
+ DWC_PRINTF("Called usb_hcd_giveback_urb() \n");
|
||||
+ DWC_PRINTF(" 1urb->status = %d\n", urb->status);
|
||||
@ -47225,7 +47164,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ ep->hcpriv = NULL;
|
||||
+}
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
|
||||
+/* Resets endpoint specific parameter values, in current version used to reset
|
||||
+ * the data toggle(as a WA). This function can be called from usb_clear_halt routine */
|
||||
+static void endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep)
|
||||
@ -47241,7 +47179,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ }
|
||||
+ DWC_SPINUNLOCK_IRQRESTORE(dwc_otg_hcd->lock, flags);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+/** Handles host mode interrupts for the DWC_otg controller. Returns IRQ_NONE if
|
||||
+ * there was no interrupt to handle. Returns IRQ_HANDLED if there was a valid
|
||||
@ -48266,7 +48203,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#endif /* DWC_DEVICE_ONLY */
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_os_dep.h
|
||||
@@ -0,0 +1,199 @@
|
||||
@@ -0,0 +1,170 @@
|
||||
+#ifndef _DWC_OS_DEP_H_
|
||||
+#define _DWC_OS_DEP_H_
|
||||
+
|
||||
@ -48299,25 +48236,11 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
|
||||
+# include <linux/irq.h>
|
||||
+#endif
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
|
||||
+# include <linux/usb/ch9.h>
|
||||
+#else
|
||||
+# include <linux/usb_ch9.h>
|
||||
+#endif
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
|
||||
+# include <linux/usb/gadget.h>
|
||||
+#else
|
||||
+# include <linux/usb_gadget.h>
|
||||
+#endif
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
|
||||
+# include <asm/irq.h>
|
||||
+#endif
|
||||
+
|
||||
+#ifdef PCI_INTERFACE
|
||||
+# include <asm/io.h>
|
||||
@ -48328,19 +48251,12 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+# include <asm/sizes.h>
|
||||
+# include <asm/param.h>
|
||||
+# include <asm/io.h>
|
||||
+# if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30))
|
||||
+# include <asm/arch/hardware.h>
|
||||
+# include <asm/arch/lm.h>
|
||||
+# include <asm/arch/irqs.h>
|
||||
+# include <asm/arch/regs-irq.h>
|
||||
+# else
|
||||
+/* in 2.6.31, at least, we seem to have lost the generic LM infrastructure -
|
||||
+ here we assume that the machine architecture provides definitions
|
||||
+ in its own header
|
||||
+*/
|
||||
+# include <mach/lm.h>
|
||||
+# include <mach/hardware.h>
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
+#ifdef PLATFORM_INTERFACE
|
||||
@ -48353,14 +48269,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+/** The OS page size */
|
||||
+#define DWC_OS_PAGE_SIZE PAGE_SIZE
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
|
||||
+typedef int gfp_t;
|
||||
+#endif
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
|
||||
+# define IRQF_SHARED SA_SHIRQ
|
||||
+#endif
|
||||
+
|
||||
+typedef struct os_dependent {
|
||||
+ /** Base address returned from ioremap() */
|
||||
+ void *base;
|
||||
@ -56987,7 +56895,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+#endif /* DWC_HOST_ONLY */
|
||||
--- /dev/null
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_pcd_linux.c
|
||||
@@ -0,0 +1,1262 @@
|
||||
@@ -0,0 +1,1176 @@
|
||||
+ /* ==========================================================================
|
||||
+ * $File: //dwh/usb_iip/dev/software/otg/linux/drivers/dwc_otg_pcd_linux.c $
|
||||
+ * $Revision: #21 $
|
||||
@ -57231,67 +57139,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ kfree(req);
|
||||
+}
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+/**
|
||||
+ * This function allocates an I/O buffer to be used for a transfer
|
||||
+ * to/from the specified endpoint.
|
||||
+ *
|
||||
+ * @param usb_ep The endpoint to be used with with the request
|
||||
+ * @param bytes The desired number of bytes for the buffer
|
||||
+ * @param dma Pointer to the buffer's DMA address; must be valid
|
||||
+ * @param gfp_flags the GFP_* flags to use.
|
||||
+ * @return address of a new buffer or null is buffer could not be allocated.
|
||||
+ */
|
||||
+static void *dwc_otg_pcd_alloc_buffer(struct usb_ep *usb_ep, unsigned bytes,
|
||||
+ dma_addr_t * dma, gfp_t gfp_flags)
|
||||
+{
|
||||
+ void *buf;
|
||||
+ dwc_otg_pcd_t *pcd = 0;
|
||||
+
|
||||
+ pcd = gadget_wrapper->pcd;
|
||||
+
|
||||
+ DWC_DEBUGPL(DBG_PCDV, "%s(%p,%d,%p,%0x)\n", __func__, usb_ep, bytes,
|
||||
+ dma, gfp_flags);
|
||||
+
|
||||
+ /* Check dword alignment */
|
||||
+ if ((bytes & 0x3UL) != 0) {
|
||||
+ DWC_WARN("%s() Buffer size is not a multiple of"
|
||||
+ "DWORD size (%d)", __func__, bytes);
|
||||
+ }
|
||||
+
|
||||
+ buf = dma_alloc_coherent(NULL, bytes, dma, gfp_flags);
|
||||
+ WARN_ON(!buf);
|
||||
+
|
||||
+ /* Check dword alignment */
|
||||
+ if (((int)buf & 0x3UL) != 0) {
|
||||
+ DWC_WARN("%s() Buffer is not DWORD aligned (%p)",
|
||||
+ __func__, buf);
|
||||
+ }
|
||||
+
|
||||
+ return buf;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
+ * This function frees an I/O buffer that was allocated by alloc_buffer.
|
||||
+ *
|
||||
+ * @param usb_ep the endpoint associated with the buffer
|
||||
+ * @param buf address of the buffer
|
||||
+ * @param dma The buffer's DMA address
|
||||
+ * @param bytes The number of bytes of the buffer
|
||||
+ */
|
||||
+static void dwc_otg_pcd_free_buffer(struct usb_ep *usb_ep, void *buf,
|
||||
+ dma_addr_t dma, unsigned bytes)
|
||||
+{
|
||||
+ dwc_otg_pcd_t *pcd = 0;
|
||||
+
|
||||
+ pcd = gadget_wrapper->pcd;
|
||||
+
|
||||
+ DWC_DEBUGPL(DBG_PCDV, "%s(%p,%0x,%d)\n", __func__, buf, dma, bytes);
|
||||
+
|
||||
+ dma_free_coherent(NULL, bytes, buf, dma);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+/**
|
||||
+ * This function is used to submit an I/O Request to an EP.
|
||||
+ *
|
||||
@ -57347,9 +57194,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ is_isoc_ep = 0;
|
||||
+ else
|
||||
+ is_isoc_ep = (ep->dwc_ep.type == DWC_OTG_EP_TYPE_ISOC) ? 1 : 0;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+ dma_addr = usb_req->dma;
|
||||
+#else
|
||||
+ if (GET_CORE_IF(pcd)->dma_enable) {
|
||||
+ dwc_otg_device_t *otg_dev = gadget_wrapper->pcd->otg_dev;
|
||||
+ struct device *dev = NULL;
|
||||
@ -57366,7 +57210,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ DMA_FROM_DEVICE);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+#ifdef DWC_UTE_PER_IO
|
||||
+ if (is_isoc_ep == 1) {
|
||||
@ -57449,8 +57292,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ return retval;
|
||||
+}
|
||||
+
|
||||
+//#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30))
|
||||
+#if 0
|
||||
+/**
|
||||
+ * ep_wedge: sets the halt feature and ignores clear requests
|
||||
+ *
|
||||
@ -57483,7 +57324,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+
|
||||
+ return retval;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#ifdef DWC_EN_ISOC
|
||||
+/**
|
||||
@ -57589,11 +57429,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ .alloc_request = dwc_otg_pcd_alloc_request,
|
||||
+ .free_request = dwc_otg_pcd_free_request,
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+ .alloc_buffer = dwc_otg_pcd_alloc_buffer,
|
||||
+ .free_buffer = dwc_otg_pcd_free_buffer,
|
||||
+#endif
|
||||
+
|
||||
+ .queue = ep_queue,
|
||||
+ .dequeue = ep_dequeue,
|
||||
+
|
||||
@ -57633,13 +57468,8 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ .alloc_request = dwc_otg_pcd_alloc_request,
|
||||
+ .free_request = dwc_otg_pcd_free_request,
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
|
||||
+ .alloc_buffer = dwc_otg_pcd_alloc_buffer,
|
||||
+ .free_buffer = dwc_otg_pcd_free_buffer,
|
||||
+#else
|
||||
+ /* .set_wedge = ep_wedge, */
|
||||
+ .set_wedge = NULL, /* uses set_halt instead */
|
||||
+#endif
|
||||
+
|
||||
+ .queue = ep_queue,
|
||||
+ .dequeue = ep_dequeue,
|
||||
@ -57853,9 +57683,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ void *req_handle, int32_t status, uint32_t actual)
|
||||
+{
|
||||
+ struct usb_request *req = (struct usb_request *)req_handle;
|
||||
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)
|
||||
+ struct dwc_otg_pcd_ep *ep = NULL;
|
||||
+#endif
|
||||
+
|
||||
+ if (req && req->complete) {
|
||||
+ switch (status) {
|
||||
@ -57881,7 +57709,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ req->complete(ep_handle, req);
|
||||
+ DWC_SPINLOCK(pcd->lock);
|
||||
+ }
|
||||
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)
|
||||
+ ep = ep_from_handle(pcd, ep_handle);
|
||||
+ if (GET_CORE_IF(pcd)->dma_enable) {
|
||||
+ if (req->length != 0) {
|
||||
@ -57896,7 +57723,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ DMA_TO_DEVICE: DMA_FROM_DEVICE);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
@ -58147,11 +57973,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
+ d->gadget.name = pcd_name;
|
||||
+ d->pcd = otg_dev->pcd;
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
|
||||
+ strcpy(d->gadget.dev.bus_id, "gadget");
|
||||
+#else
|
||||
+ dev_set_name(&d->gadget.dev, "%s", "gadget");
|
||||
+#endif
|
||||
+
|
||||
+ d->gadget.dev.parent = &_dev->dev;
|
||||
+ d->gadget.dev.release = dwc_otg_pcd_gadget_release;
|
||||
|
@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
||||
|
||||
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
|
||||
@@ -138,7 +138,7 @@ static struct hc_driver dwc_otg_hc_drive
|
||||
@@ -119,7 +119,7 @@ static struct hc_driver dwc_otg_hc_drive
|
||||
|
||||
.irq = dwc_otg_hcd_irq,
|
||||
|
||||
|
@ -32,7 +32,7 @@ Signed-off-by: Hui Wang <hui.wang@canonical.com>
|
||||
|
||||
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd_linux.c
|
||||
@@ -821,10 +821,6 @@ static int dwc_otg_urb_enqueue(struct us
|
||||
@@ -782,10 +782,6 @@ static int dwc_otg_urb_enqueue(struct us
|
||||
dump_urb_info(urb, "dwc_otg_urb_enqueue");
|
||||
}
|
||||
#endif
|
||||
@ -43,7 +43,7 @@ Signed-off-by: Hui Wang <hui.wang@canonical.com>
|
||||
if ((usb_pipetype(urb->pipe) == PIPE_ISOCHRONOUS)
|
||||
|| (usb_pipetype(urb->pipe) == PIPE_INTERRUPT)) {
|
||||
if (!dwc_otg_hcd_is_bandwidth_allocated
|
||||
@@ -881,6 +877,13 @@ static int dwc_otg_urb_enqueue(struct us
|
||||
@@ -842,6 +838,13 @@ static int dwc_otg_urb_enqueue(struct us
|
||||
&urb->transfer_dma, buf);
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
|
||||
--- a/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
|
||||
+++ b/drivers/usb/host/dwc_otg/dwc_otg_hcd.c
|
||||
@@ -1813,7 +1813,7 @@ int fiq_fsm_queue_split_transaction(dwc_
|
||||
@@ -1811,7 +1811,7 @@ int fiq_fsm_queue_split_transaction(dwc_
|
||||
st->nr_errors = 0;
|
||||
|
||||
st->hcchar_copy.d32 = 0;
|
||||
@ -32,7 +32,7 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
|
||||
st->hcchar_copy.b.epdir = hc->ep_is_in;
|
||||
st->hcchar_copy.b.devaddr = hc->dev_addr;
|
||||
st->hcchar_copy.b.epnum = hc->ep_num;
|
||||
@@ -1858,7 +1858,7 @@ int fiq_fsm_queue_split_transaction(dwc_
|
||||
@@ -1856,7 +1856,7 @@ int fiq_fsm_queue_split_transaction(dwc_
|
||||
st->hctsiz_copy.b.pid = hc->data_pid_start;
|
||||
|
||||
if (hc->ep_is_in || (hc->xfer_len > hc->max_packet)) {
|
||||
|
@ -0,0 +1,12 @@
|
||||
--- a/drivers/irqchip/irq-bcm6345-periph.c
|
||||
+++ b/drivers/irqchip/irq-bcm6345-periph.c
|
||||
@@ -240,6 +240,9 @@ static int __init __bcm6345_periph_intc_
|
||||
/* route all interrupts to line 0 by default */
|
||||
if (i == 0)
|
||||
block->mask_cache[w] = 0xffffffff;
|
||||
+
|
||||
+ /* mask all interrupts */
|
||||
+ __raw_writel(0, block->en_reg[w]);
|
||||
}
|
||||
|
||||
irq_set_handler_data(block->parent_irq, data);
|
@ -245,19 +245,15 @@ mtdsplit_uimage_parse_generic(struct mtd_info *master,
|
||||
uimage_verify_default);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
static const struct of_device_id mtdsplit_uimage_of_match_table[] = {
|
||||
{ .compatible = "denx,uimage" },
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct mtd_part_parser uimage_generic_parser = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "uimage-fw",
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
.of_match_table = mtdsplit_uimage_of_match_table,
|
||||
#endif
|
||||
.parse_fn = mtdsplit_uimage_parse_generic,
|
||||
.type = MTD_PARSER_TYPE_FIRMWARE,
|
||||
};
|
||||
@ -312,19 +308,15 @@ mtdsplit_uimage_parse_netgear(struct mtd_info *master,
|
||||
uimage_verify_wndr3700);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
static const struct of_device_id mtdsplit_uimage_netgear_of_match_table[] = {
|
||||
{ .compatible = "netgear,uimage" },
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct mtd_part_parser uimage_netgear_parser = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "netgear-fw",
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
.of_match_table = mtdsplit_uimage_netgear_of_match_table,
|
||||
#endif
|
||||
.parse_fn = mtdsplit_uimage_parse_netgear,
|
||||
.type = MTD_PARSER_TYPE_FIRMWARE,
|
||||
};
|
||||
@ -364,19 +356,15 @@ mtdsplit_uimage_parse_edimax(struct mtd_info *master,
|
||||
uimage_find_edimax);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
static const struct of_device_id mtdsplit_uimage_edimax_of_match_table[] = {
|
||||
{ .compatible = "edimax,uimage" },
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct mtd_part_parser uimage_edimax_parser = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "edimax-fw",
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
.of_match_table = mtdsplit_uimage_edimax_of_match_table,
|
||||
#endif
|
||||
.parse_fn = mtdsplit_uimage_parse_edimax,
|
||||
.type = MTD_PARSER_TYPE_FIRMWARE,
|
||||
};
|
||||
@ -407,19 +395,15 @@ mtdsplit_uimage_parse_fonfxc(struct mtd_info *master,
|
||||
uimage_find_fonfxc);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
static const struct of_device_id mtdsplit_uimage_fonfxc_of_match_table[] = {
|
||||
{ .compatible = "fonfxc,uimage" },
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct mtd_part_parser uimage_fonfxc_parser = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "fonfxc-fw",
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
.of_match_table = mtdsplit_uimage_fonfxc_of_match_table,
|
||||
#endif
|
||||
.parse_fn = mtdsplit_uimage_parse_fonfxc,
|
||||
};
|
||||
|
||||
@ -464,19 +448,15 @@ mtdsplit_uimage_parse_okli(struct mtd_info *master,
|
||||
uimage_verify_okli);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
static const struct of_device_id mtdsplit_uimage_okli_of_match_table[] = {
|
||||
{ .compatible = "openwrt,okli" },
|
||||
{},
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct mtd_part_parser uimage_okli_parser = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "okli-fw",
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
||||
.of_match_table = mtdsplit_uimage_okli_of_match_table,
|
||||
#endif
|
||||
.parse_fn = mtdsplit_uimage_parse_okli,
|
||||
};
|
||||
|
||||
|
@ -314,9 +314,8 @@ static inline int b53_write64(struct b53_device *dev, u8 page, u8 reg,
|
||||
#endif
|
||||
|
||||
#include <linux/version.h>
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
#include <linux/bcm47xx_nvram.h>
|
||||
#endif
|
||||
|
||||
static inline int b53_switch_get_reset_gpio(struct b53_device *dev)
|
||||
{
|
||||
#ifdef CONFIG_BCM47XX
|
||||
@ -331,11 +330,7 @@ static inline int b53_switch_get_reset_gpio(struct b53_device *dev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||
return bcm47xx_nvram_gpio_pin("robo_reset");
|
||||
#else
|
||||
return -ENOENT;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1033,9 +1033,6 @@ rtl8306_read_status(struct phy_device *pdev)
|
||||
|
||||
static struct phy_driver rtl8306_driver = {
|
||||
.name = "Realtek RTL8306S",
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0))
|
||||
.flags = PHY_HAS_MAGICANEG,
|
||||
#endif
|
||||
.phy_id = RTL8306_MAGIC,
|
||||
.phy_id_mask = 0xffffffff,
|
||||
.features = PHY_BASIC_FEATURES,
|
||||
|
@ -1035,14 +1035,6 @@ static int rtl8366_smi_mii_init(struct rtl8366_smi *smi)
|
||||
dev_name(smi->parent));
|
||||
smi->mii_bus->parent = smi->parent;
|
||||
smi->mii_bus->phy_mask = ~(0x1f);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)
|
||||
{
|
||||
int i;
|
||||
smi->mii_bus->irq = smi->mii_irq;
|
||||
for (i = 0; i < PHY_MAX_ADDR; i++)
|
||||
smi->mii_irq[i] = PHY_POLL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
if (np)
|
||||
|
@ -594,12 +594,9 @@ swconfig_parse_ports(struct sk_buff *msg, struct nlattr *head,
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0)
|
||||
if (nla_parse_nested_deprecated(tb, SWITCH_PORT_ATTR_MAX, nla,
|
||||
port_policy, NULL))
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
|
||||
if (nla_parse_nested(tb, SWITCH_PORT_ATTR_MAX, nla,
|
||||
port_policy, NULL))
|
||||
#else
|
||||
if (nla_parse_nested(tb, SWITCH_PORT_ATTR_MAX, nla,
|
||||
port_policy))
|
||||
port_policy, NULL))
|
||||
#endif
|
||||
return -EINVAL;
|
||||
|
||||
@ -623,10 +620,8 @@ swconfig_parse_link(struct sk_buff *msg, struct nlattr *nla,
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,2,0)
|
||||
if (nla_parse_nested_deprecated(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy, NULL))
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
|
||||
if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy, NULL))
|
||||
#else
|
||||
if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy))
|
||||
if (nla_parse_nested(tb, SWITCH_LINK_ATTR_MAX, nla, link_policy, NULL))
|
||||
#endif
|
||||
return -EINVAL;
|
||||
|
||||
@ -1110,9 +1105,6 @@ static struct genl_ops swconfig_ops[] = {
|
||||
};
|
||||
|
||||
static struct genl_family switch_fam = {
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
|
||||
.id = GENL_ID_GENERATE,
|
||||
#endif
|
||||
.name = "switch",
|
||||
.hdrsize = 0,
|
||||
.version = 1,
|
||||
@ -1298,11 +1290,7 @@ swconfig_init(void)
|
||||
{
|
||||
INIT_LIST_HEAD(&swdevs);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
|
||||
return genl_register_family_with_ops(&switch_fam, swconfig_ops);
|
||||
#else
|
||||
return genl_register_family(&switch_fam);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void __exit
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
#include "routerboot.h"
|
||||
|
||||
#define RB_HARDCONFIG_VER "0.02"
|
||||
#define RB_HARDCONFIG_VER "0.03"
|
||||
#define RB_HC_PR_PFX "[rb_hardconfig] "
|
||||
|
||||
/* ID values for hardware settings */
|
||||
@ -484,16 +484,18 @@ static int hc_wlan_data_unpack_lzor(const u8 *inbuf, size_t inlen,
|
||||
void *outbuf, size_t *outlen)
|
||||
{
|
||||
u16 rle_ofs, rle_len;
|
||||
size_t templen;
|
||||
const u32 *needle;
|
||||
u8 *tempbuf;
|
||||
size_t templen, lzo_len;
|
||||
int ret;
|
||||
|
||||
templen = inlen + sizeof(hc_lzor_prefix);
|
||||
if (templen > *outlen)
|
||||
lzo_len = inlen + sizeof(hc_lzor_prefix);
|
||||
if (lzo_len > *outlen)
|
||||
return -EFBIG;
|
||||
|
||||
/* Temporary buffer same size as the outbuf */
|
||||
tempbuf = kmalloc(*outlen, GFP_KERNEL);
|
||||
templen = *outlen;
|
||||
tempbuf = kmalloc(templen, GFP_KERNEL);
|
||||
if (!outbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -501,41 +503,54 @@ static int hc_wlan_data_unpack_lzor(const u8 *inbuf, size_t inlen,
|
||||
memcpy(outbuf, hc_lzor_prefix, sizeof(hc_lzor_prefix));
|
||||
memcpy(outbuf + sizeof(hc_lzor_prefix), inbuf, inlen);
|
||||
|
||||
/* LZO-decompress templen bytes of outbuf into the tempbuf */
|
||||
ret = lzo1x_decompress_safe(outbuf, templen, tempbuf, outlen);
|
||||
/* LZO-decompress lzo_len bytes of outbuf into the tempbuf */
|
||||
ret = lzo1x_decompress_safe(outbuf, lzo_len, tempbuf, &templen);
|
||||
if (ret) {
|
||||
pr_debug(RB_HC_PR_PFX "LZO decompression error (%d)\n", ret);
|
||||
goto fail;
|
||||
if (LZO_E_INPUT_NOT_CONSUMED == ret) {
|
||||
/*
|
||||
* It is assumed that because the LZO payload is embedded
|
||||
* in a "root" RB_ID_WLAN_DATA tag, the tag length is aligned
|
||||
* and the payload is padded at the end, which triggers a
|
||||
* spurious error which we ignore here.
|
||||
*/
|
||||
pr_debug(RB_HC_PR_PFX "LZOR: LZO EOF before buffer end - this may be harmless\n");
|
||||
} else {
|
||||
pr_debug(RB_HC_PR_PFX "LZOR: LZO decompression error (%d)\n", ret);
|
||||
goto fail;
|
||||
}
|
||||
}
|
||||
templen = *outlen;
|
||||
|
||||
/*
|
||||
* Post decompression we have a blob (possibly byproduct of the lzo
|
||||
* dictionary). We need to find RB_MAGIC_ERD. The magic number seems to
|
||||
* be 32bit-aligned in the decompression output.
|
||||
*/
|
||||
|
||||
while (RB_MAGIC_ERD != *(u32 *)tempbuf) {
|
||||
tempbuf += 4;
|
||||
templen -= 4;
|
||||
}
|
||||
needle = (const u32 *)tempbuf;
|
||||
while (RB_MAGIC_ERD != *needle++) {
|
||||
if ((u8 *)needle >= tempbuf+templen) {
|
||||
pr_debug(RB_HC_PR_PFX "LZOR: ERD magic not found\n");
|
||||
goto fail;
|
||||
}
|
||||
};
|
||||
templen -= (u8 *)needle - tempbuf;
|
||||
|
||||
/* Past magic. Look for tag node */
|
||||
ret = routerboot_tag_find(tempbuf, templen, 0x1, &rle_ofs, &rle_len);
|
||||
ret = routerboot_tag_find((u8 *)needle, templen, 0x1, &rle_ofs, &rle_len);
|
||||
if (ret) {
|
||||
pr_debug(RB_HC_PR_PFX "RLE data not found\n");
|
||||
pr_debug(RB_HC_PR_PFX "LZOR: RLE data not found\n");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (rle_len > templen) {
|
||||
pr_debug(RB_HC_PR_PFX "Invalid RLE data length\n");
|
||||
pr_debug(RB_HC_PR_PFX "LZOR: Invalid RLE data length\n");
|
||||
ret = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* RLE-decode tempbuf back into the outbuf */
|
||||
ret = routerboot_rle_decode(tempbuf+rle_ofs, rle_len, outbuf, outlen);
|
||||
/* RLE-decode tempbuf from needle back into the outbuf */
|
||||
ret = routerboot_rle_decode((u8 *)needle+rle_ofs, rle_len, outbuf, outlen);
|
||||
if (ret)
|
||||
pr_debug(RB_HC_PR_PFX "RLE decoding error (%d)\n", ret);
|
||||
pr_debug(RB_HC_PR_PFX "LZOR: RLE decoding error (%d)\n", ret);
|
||||
|
||||
fail:
|
||||
kfree(tempbuf);
|
||||
|
@ -185,7 +185,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
}
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/pci/ifxmips_pci_common.h
|
||||
@@ -0,0 +1,57 @@
|
||||
@@ -0,0 +1,53 @@
|
||||
+/******************************************************************************
|
||||
+**
|
||||
+** FILE NAME : ifxmips_pci_common.h
|
||||
@ -226,11 +226,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ \ingroup IFX_PCI_COM
|
||||
+ \brief PCI/PCIe bus driver common OS header file
|
||||
+*/
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
|
||||
+#define IFX_PCI_CONST
|
||||
+#else
|
||||
+#define IFX_PCI_CONST const
|
||||
+#endif
|
||||
+#ifdef CONFIG_IFX_PCI
|
||||
+extern int ifx_pci_bios_map_irq(IFX_PCI_CONST struct pci_dev *dev, u8 slot, u8 pin);
|
||||
+extern int ifx_pci_bios_plat_dev_init(struct pci_dev *dev);
|
||||
@ -1340,7 +1336,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/pci/ifxmips_pcie.h
|
||||
@@ -0,0 +1,135 @@
|
||||
@@ -0,0 +1,131 @@
|
||||
+/******************************************************************************
|
||||
+**
|
||||
+** FILE NAME : ifxmips_pcie.h
|
||||
@ -1394,10 +1390,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ spin_unlock_irqrestore(&(lock), flags); \
|
||||
+} while (0)
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
|
||||
+#define IRQF_SHARED SA_SHIRQ
|
||||
+#endif
|
||||
+
|
||||
+#define PCIE_MSG_MSI 0x00000001
|
||||
+#define PCIE_MSG_ISR 0x00000002
|
||||
+#define PCIE_MSG_FIXUP 0x00000004
|
||||
@ -4174,7 +4166,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+EXPORT_SYMBOL(pcibios_1st_host_bus_nr);
|
||||
--- /dev/null
|
||||
+++ b/arch/mips/pci/pcie-lantiq.h
|
||||
@@ -0,0 +1,1305 @@
|
||||
@@ -0,0 +1,1301 @@
|
||||
+/******************************************************************************
|
||||
+**
|
||||
+** FILE NAME : ifxmips_pcie_reg.h
|
||||
@ -5185,10 +5177,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
|
||||
+ spin_unlock_irqrestore(&(lock), flags); \
|
||||
+} while (0)
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
|
||||
+#define IRQF_SHARED SA_SHIRQ
|
||||
+#endif
|
||||
+
|
||||
+#define PCIE_MSG_MSI 0x00000001
|
||||
+#define PCIE_MSG_ISR 0x00000002
|
||||
+#define PCIE_MSG_FIXUP 0x00000004
|
||||
|
@ -106,6 +106,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -80,10 +80,12 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
mediatek,portmap = "llllw";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
|
@ -1,9 +1,6 @@
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7620a.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include "mt7620a_asus_rt-ac5x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "asus,rt-ac51u", "ralink,mt7620a-soc";
|
||||
@ -36,93 +33,10 @@
|
||||
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <10000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xfb0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
enable-leds {
|
||||
gpio-hog;
|
||||
line-name = "enable-leds";
|
||||
output-low;
|
||||
gpios = <10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
ralink,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
|
||||
&state_default {
|
||||
@ -132,10 +46,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
|
61
target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts
Normal file
61
target/linux/ramips/dts/mt7620a_asus_rt-ac54u.dts
Normal file
@ -0,0 +1,61 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7620a_asus_rt-ac5x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "asus,rt-ac54u", "ralink,mt7620a-soc";
|
||||
model = "Asus RT-AC54U";
|
||||
|
||||
aliases {
|
||||
led-boot = &led_power;
|
||||
led-failsafe = &led_power;
|
||||
led-running = &led_power;
|
||||
led-upgrade = &led_power;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led_power: power {
|
||||
label = "rt-ac54u:blue:power";
|
||||
gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
|
||||
usb {
|
||||
label = "rt-ac54u:blue:usb";
|
||||
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
|
||||
trigger-sources = <&ohci_port1>, <&ehci_port1>;
|
||||
linux,default-trigger = "usbport";
|
||||
};
|
||||
|
||||
wifi2g {
|
||||
label = "rt-ac54u:blue:wifi2g";
|
||||
gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy1tpt";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x22>;
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "wled", "uartf";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
|
||||
led {
|
||||
led-sources = <2>;
|
||||
};
|
||||
};
|
||||
};
|
95
target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
Normal file
95
target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
Normal file
@ -0,0 +1,95 @@
|
||||
#include "mt7620a.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <10000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xfb0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&ehci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
enable-leds {
|
||||
gpio-hog;
|
||||
line-name = "enable-leds";
|
||||
output-low;
|
||||
gpios = <10 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
&gpio3 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
&wmac {
|
||||
ralink,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
@ -123,6 +123,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -140,7 +140,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -140,7 +140,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -126,6 +126,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -155,7 +155,6 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
|
@ -153,11 +153,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mediatek,portmap = "wllll";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
phy-handle = <&phy0>;
|
||||
|
@ -91,10 +91,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
|
||||
port@5 {
|
||||
|
@ -112,9 +112,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
|
||||
port@4 {
|
||||
|
@ -138,10 +138,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
|
||||
port@5 {
|
||||
|
@ -123,10 +123,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
|
||||
port@5 {
|
||||
|
@ -115,13 +115,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,mdio-mode = <1>;
|
||||
|
||||
phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||
|
@ -136,9 +136,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&iNIC_rf 0x4>;
|
||||
|
||||
port@5 {
|
||||
|
@ -138,6 +138,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4000>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -129,6 +129,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4000>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -133,6 +133,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4000>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -122,12 +122,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
port@4 {
|
||||
status = "okay";
|
||||
phy-handle = <&phy4>;
|
||||
|
@ -71,10 +71,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
|
||||
port@5 {
|
||||
|
@ -111,7 +111,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -139,6 +139,7 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
port@5 {
|
||||
|
@ -147,6 +147,7 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
port@5 {
|
||||
|
@ -110,7 +110,6 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
|
@ -93,11 +93,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
|
||||
port@5 {
|
||||
|
@ -54,6 +54,8 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
@ -78,10 +78,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
|
||||
port@4 {
|
||||
|
@ -105,11 +105,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
port@5 {
|
||||
status = "okay";
|
||||
mediatek,fixed-link = <1000 1 1 1>;
|
||||
|
@ -89,7 +89,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
161
target/linux/ramips/dts/mt7620a_netis_wf2770.dts
Normal file
161
target/linux/ramips/dts/mt7620a_netis_wf2770.dts
Normal file
@ -0,0 +1,161 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "mt7620a.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
|
||||
/ {
|
||||
compatible = "netis,wf2770", "ralink,mt7620a-soc";
|
||||
model = "NETIS WF2770";
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
wlan {
|
||||
label = "wf2770:blue:wlan";
|
||||
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "phy0tpt";
|
||||
};
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
reset {
|
||||
label = "reset";
|
||||
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
|
||||
wps {
|
||||
label = "wps";
|
||||
gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_WPS_BUTTON>;
|
||||
};
|
||||
|
||||
rfkill {
|
||||
label = "rfkill";
|
||||
gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RFKILL>;
|
||||
};
|
||||
|
||||
led-toggle {
|
||||
label = "led-toggle";
|
||||
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_LIGHTS_TOGGLE>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "u-boot";
|
||||
reg = <0x0 0x30000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "config";
|
||||
reg = <0x30000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
factory: partition@40000 {
|
||||
label = "factory";
|
||||
reg = <0x40000 0x10000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
compatible = "denx,uimage";
|
||||
label = "firmware";
|
||||
reg = <0x50000 0xfb0000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&state_default {
|
||||
gpio {
|
||||
groups = "i2c", "uartf";
|
||||
function = "gpio";
|
||||
};
|
||||
};
|
||||
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
port@5 {
|
||||
status = "okay";
|
||||
mediatek,fixed-link = <1000 1 1 1>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
mdio-bus {
|
||||
status = "okay";
|
||||
|
||||
ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
ethernet-phy@1 {
|
||||
reg = <1>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
ethernet-phy@2 {
|
||||
reg = <2>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
ethernet-phy@3 {
|
||||
reg = <3>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
ethernet-phy@4 {
|
||||
reg = <4>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
|
||||
ethernet-phy@1f {
|
||||
reg = <0x1f>;
|
||||
phy-mode = "rgmii";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pcie {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
wifi@0,0 {
|
||||
compatible = "mediatek,mt76";
|
||||
reg = <0x0000 0 0 0 0>;
|
||||
mediatek,mtd-eeprom = <&factory 0x8000>;
|
||||
ieee80211-freq-limit = <5000000 6000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&wmac {
|
||||
ralink,mtd-eeprom = <&factory 0x0>;
|
||||
};
|
@ -103,7 +103,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -103,7 +103,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
|
||||
port@5 {
|
||||
|
@ -99,7 +99,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -44,6 +44,8 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
@ -130,7 +130,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -110,7 +110,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -130,7 +130,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -135,7 +135,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -74,9 +74,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
|
||||
port@4 {
|
||||
|
@ -55,9 +55,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
|
||||
port@5 {
|
||||
|
@ -71,9 +71,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -68,9 +68,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
|
||||
port@4 {
|
||||
|
@ -170,6 +170,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -139,9 +139,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &mdio_pins>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
|
||||
port@4 {
|
||||
|
@ -129,11 +129,11 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
mtd-mac-address = <&rom 0xf100>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&rom 0xf100>;
|
||||
|
||||
port@5 {
|
||||
status = "okay";
|
||||
mediatek,fixed-link = <1000 1 1 1>;
|
||||
|
@ -91,7 +91,9 @@
|
||||
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
|
||||
mtd-mac-address = <&rom 0xf100>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -130,7 +130,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x28>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -119,7 +119,9 @@
|
||||
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -149,7 +149,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
@ -111,7 +111,9 @@
|
||||
ðernet {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -75,6 +75,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -98,6 +98,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -136,9 +136,9 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
status = "okay";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&rgmii2_pins &mdio_pins>;
|
||||
|
||||
mtd-mac-address = <&factory 0x00004>;
|
||||
|
||||
port@4 {
|
||||
|
@ -109,6 +109,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -122,6 +122,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -98,6 +98,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x4>;
|
||||
|
||||
mediatek,portmap = "wllll";
|
||||
};
|
||||
|
||||
|
@ -105,7 +105,8 @@
|
||||
};
|
||||
|
||||
ðernet {
|
||||
mediatek,portmap = "llllw";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&ephy_pins>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
@ -119,6 +119,7 @@
|
||||
|
||||
ðernet {
|
||||
mtd-mac-address = <&factory 0x2e>;
|
||||
|
||||
mediatek,portmap = "llllw";
|
||||
};
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user