Baseline update from LYNQ_SDK_ASR_T108_V05.03.01.00(kernel build error.)
Change-Id: I56fc72cd096e82c589920026553170e5cb9692eb
diff --git a/marvell/linux/include/dt-bindings/soc/mbtk_plat_irq.h b/marvell/linux/include/dt-bindings/soc/mbtk_plat_irq.h
new file mode 100755
index 0000000..45dce57
--- /dev/null
+++ b/marvell/linux/include/dt-bindings/soc/mbtk_plat_irq.h
@@ -0,0 +1,122 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (C)
+ *
+ * Author:
+ */
+
+#ifndef _DT_BINDINGS_SOC_ZX297520V3_IRQ_H
+#define _DT_BINDINGS_SOC_ZX297520V3_IRQ_H
+
+#include <linux/irq.h>
+
+//#define WDT_INT (0)
+#define UART1_MIX_INT (27)
+#define UART2_MIX_INT (59)
+#define UART3_MIX_INT (28)
+#define UART4_MIX_INT (19)
+
+#define SSP0_INT (3)
+#define RTC_ALARM_INT (6)
+#define RTC_TIMER_INT (5)
+//#define I2S0_INT (6)
+//#define I2S1_INT (7)
+#define I2C1_INT (15)
+#define I2C0_INT (7) /*pmic i2c*/
+#define I2C2_INT (54)
+#define I2C3_INT (67)
+
+#define KEYPAD_INT (9)
+
+#define SD1_INT (39)
+#define SD0_INT (39)
+
+//#define EX21_INT (gpio_to_irq(21))
+//#define EX22_INT (gpio_to_irq(22))
+//#define EX23_INT (gpio_to_irq(23))
+//#define EX24_INT (gpio_to_irq(24))
+#if 0
+
+#define ICP_PS2AP_INT (13)
+#define ICP_M02AP_INT (14)
+#define AP_TIMER0_INT (15)
+#define AP_TIMER1_INT (16)
+#define AP_TIMER2_INT (17)
+#define GSM_RFSSCR_INT (18)
+#define GSM_RFSSCT_INT (19)
+#define GSM_GP0_INT (20)
+#define GSM_T_INT (21)
+#define GSM_TL_INT (22)
+#define GPRS0_INT (23)
+#define GPRS1_INT (24)
+#define DSP0_INT (25)
+#define DSP1_INT (26)
+#define DSP2_INT (27)
+#define DSP3_INT (28)
+#define DSP4_INT (29)
+#define DSP6_INT (30)
+#define DSP7_INT (31)
+#define SPCU_PW_INT (32)
+#define ROUT1_INT (33)
+#define PS_DMA_INT (34)
+#define NAND_INT (35)
+#define USB_INT (36)
+#define USB_POWERDWN_UP_INT (37)
+#define USB_POWERDWN_DOWN_INT (38)
+#define HSIC_INT (39)
+#define HSIC_POWERDWN_UP_INT (40)
+#define HSIC_POWERDWN_DOWN_INT (41)
+#define LTE_LPM_TIMER5_INT (42)
+#define GSM_USIM_INT (43)
+
+
+
+#define EX8IN1_INT (44)
+#define EX0_INT (45)
+#define EX1_INT (46)
+#define EX2_INT (47)
+#define EX3_INT (48)
+#define EX4_INT (49)
+#define EX5_INT (50)
+#define EX6_INT (51)
+#define EX7_INT (52)
+#define SD1_DATA1_INT (53)
+#define UART0_RXD_INT (54)
+#define SPI_FC0_INT (55) /*spi nand*/
+#define SSP1_INT (56)
+#define SD0_DATA1_INT (57)
+#define EFUSE_INT (58)
+#define RSA_INT (59)
+#define HASH_INT (60)
+#define GMAC_INT (61)
+#define AP_TIMER3_INT (62)
+#define AP_TIMER4_INT (63)
+#define FRM_ARM_INT (64)
+#define WD_FRAME_INT (65)
+#define ICP_PHY2AP_INT (66)
+#define MCU_LCD_INT (67)
+#define VOU_OSD_INT (68)
+#define TDM_INT (69)
+#define RESERVED_INT (70)
+#define SYS_COUNTER_INT (71)
+#define PWM_INT (72)
+#define GMACPHY_WAKE_INT (73)
+#define GMACPHY_INT (74)
+#define USIM1_INT (75)
+
+
+#define IRQ_ZX297520V3_SPI_NUM (77)
+
+/* pcu ext8_1 */
+#define EX8_INT (0)
+#define EX9_INT (1)
+#define EX10_INT (2)
+#define EX11_INT (3)
+#define EX12_INT (4)
+#define EX13_INT (5)
+#define EX14_INT (6)
+#define EX15_INT (7)
+
+#endif
+
+#endif /* _DT_BINDINGS_SOC_ZX297520V3_IRQ_H */
diff --git a/marvell/linux/include/linux/phy.h b/marvell/linux/include/linux/phy.h
old mode 100644
new mode 100755
index 8f45d33..990a86c
--- a/marvell/linux/include/linux/phy.h
+++ b/marvell/linux/include/linux/phy.h
@@ -537,6 +537,9 @@
/* Enables or disables interrupts */
int (*config_intr)(struct phy_device *phydev);
+ /* add by zjl*/
+ int (*private_proc)(struct phy_device *phydev);
+
/*
* Checks if the PHY generated an interrupt.
* For multi-PHY devices with shared PHY interrupt pin
diff --git a/marvell/linux/include/uapi/linux/bsp_api.h b/marvell/linux/include/uapi/linux/bsp_api.h
new file mode 100755
index 0000000..f3ab959
--- /dev/null
+++ b/marvell/linux/include/uapi/linux/bsp_api.h
@@ -0,0 +1,53 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _UAPI_LINUX_BSPAPI_H
+#define _UAPI_LINUX_BSPAPI_H
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+struct sc_irq_info {
+ unsigned int line;
+ unsigned int type;
+};
+
+#define SC_IRQ_IOC_MAGIC 'I'
+
+/*ioctl cmd usd by device*/
+#define SC_IRQ_INSTALL _IOW(SC_IRQ_IOC_MAGIC, 1, char *)
+#define SC_IRQ_SET_TYPE _IOW(SC_IRQ_IOC_MAGIC, 2, char *)
+#define SC_IRQ_SET_WAKE _IOW(SC_IRQ_IOC_MAGIC, 3, char *)
+#define SC_IRQ_GET_WAKE _IOW(SC_IRQ_IOC_MAGIC, 4, char *)
+#define SC_IRQ_UNINSTALL _IOW(SC_IRQ_IOC_MAGIC, 5, char *)
+
+#define SC_IRQ_GET_STATUS _IOW(SC_IRQ_IOC_MAGIC, 6, char *)
+#define SC_IRQ_CLEAR_STATUS _IOW(SC_IRQ_IOC_MAGIC, 7, char *)
+
+#define SC_IRQ_DEV "/dev/sc_irq"
+
+
+
+/*----------------------------------------------------------*/
+struct sc_pm_info {
+ unsigned int sleep_time; /* ms */
+ unsigned int wake_event;
+};
+
+#define SC_PM_WL_EVENT_EXT0 ((unsigned int)1 << 0)
+#define SC_PM_WL_EVENT_EXT1 ((unsigned int)1 << 1)
+#define SC_PM_WL_EVENT_EXT2 ((unsigned int)1 << 2)
+#define SC_PM_WL_EVENT_EXT3 ((unsigned int)1 << 3)
+#define SC_PM_WL_EVENT_EXT4 ((unsigned int)1 << 4)
+#define SC_PM_WL_EVENT_EXT5 ((unsigned int)1 << 5)
+#define SC_PM_WL_EVENT_EXT6 ((unsigned int)1 << 6)
+#define SC_PM_WL_EVENT_EXT7 ((unsigned int)1 << 7)
+
+#define SC_PM_IOC_MAGIC 'P'
+
+/*ioctl cmd usd by device*/
+#define SC_PM_WL_SET _IOW(SC_PM_IOC_MAGIC, 1, char *)
+#define SC_PM_WL_CLEAR _IOW(SC_PM_IOC_MAGIC, 2, char *)
+#define SC_PM_WL_GET _IOW(SC_PM_IOC_MAGIC, 3, char *)
+
+#define SC_PM_DEV "/dev/sc_pm"
+
+#endif /* _UAPI_LINUX_BSPAPI_H */
diff --git a/marvell/linux/include/uapi/linux/reboot.h b/marvell/linux/include/uapi/linux/reboot.h
old mode 100644
new mode 100755
index 58e6439..f5a8880
--- a/marvell/linux/include/uapi/linux/reboot.h
+++ b/marvell/linux/include/uapi/linux/reboot.h
@@ -35,6 +35,61 @@
#define LINUX_REBOOT_CMD_SW_SUSPEND 0xD000FCE2
#define LINUX_REBOOT_CMD_KEXEC 0x45584543
+//mbtk wyq for reboot reason
+#define MBTK_REBOOT_RESULT_SUCCESS 0
+#define MBTK_REBOOT_RESULT_FAIL 1
+#define MBTK_DEV_INFO_NAME "device_info"
+#define MBTK_DEVICE_INFO_PARTITION_TAG 0x87878787
+#define MBTK_DEVICE_INFO_CURR_VERSION 1
+
+typedef unsigned int uint32; /* Unsigned 32 bit value */
+typedef unsigned char uint8; /* Unsigned 8 bit value */
+
+typedef enum {
+ MBTK_DEVICE_INFO_ITEM_BASIC = 0,
+ MBTK_DEVICE_INFO_ITEM_FOTA,
+ MBTK_DEVICE_INFO_ITEM_MODEM,
+ MBTK_DEVICE_INFO_ITEM_LOG,
+
+ MBTK_DEVICE_INFO_ITEM_NUM
+} mbtk_device_info_item_enum;
+
+typedef struct {
+ mbtk_device_info_item_enum item;
+ uint32 addr;
+} mbtk_device_info_item_header_t;
+
+typedef struct {
+ uint32 tag;
+ uint32 version; // Default : 0x01
+ uint32 item_count;
+ mbtk_device_info_item_header_t item_header[MBTK_DEVICE_INFO_ITEM_NUM];
+} mbtk_device_info_header_t;
+
+typedef enum {
+ MBTK_REBOOT_FLAG_NORMAL = 0,
+ MBTK_REBOOT_FLAG_DOWNLOAD,
+ MBTK_REBOOT_FLAG_POWER_OFF, //Power off and restart
+ MBTK_REBOOT_FLAG_HARDWARE, //Hardware restart
+ MBTK_REBOOT_FLAG_COMMAND, //"reboot" "reboot -f" Command restart
+ MBTK_REBOOT_FLAG_ABNORMAL, //Abnormal restart
+ MBTK_REBOOT_FLAG_UNKNOWN, //unknown restart
+} mbtk_device_info_reboot_flag_enum;
+
+typedef struct {
+ uint8 name[16];
+ uint32 version; // Default : 0x01
+ uint8 project[16]; // T108 / L508_X6
+ uint8 project_cust[16]; // T108_C1 / L508_X6_C1 (Refer to: Custom_Model in blf file.)
+ uint32 ab_support; // 1 for ab
+ mbtk_device_info_reboot_flag_enum reboot_flag;
+ uint8 revision_out[48]; // L508_X6v01.01b04.00
+ uint8 revision_in[64];
+ uint8 build_time[64];
+} mbtk_device_info_basic_t;
+
+int mbtk_reboot_reason_save(const char *mtd_name, mbtk_device_info_reboot_flag_enum reboot_flag);
+//mbtk wyq for reboot reason
#endif /* _UAPI_LINUX_REBOOT_H */