From a6fce8a34c356d361b295348e44d2a63ce0c9251 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 27 Oct 2017 11:53:48 +0200 Subject: [PATCH] mt7603: add LED definition registers Signed-off-by: Felix Fietkau --- mt7603_regs.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mt7603_regs.h b/mt7603_regs.h index 876e6d24..5c1b1625 100644 --- a/mt7603_regs.h +++ b/mt7603_regs.h @@ -485,6 +485,24 @@ enum { #define MT_TX_HW_QUEUE_BCN 7 #define MT_TX_HW_QUEUE_BMC 8 +#define MT_LED_BASE_PHYS 0x80024000 +#define MT_LED_PHYS(_n) (MT_LED_BASE_PHYS + (_n)) + +#define MT_LED_CTRL MT_LED_PHYS(0x00) + +#define MT_LED_CTRL_REPLAY(_n) BIT(0 + (8 * (_n))) +#define MT_LED_CTRL_POLARITY(_n) BIT(1 + (8 * (_n))) +#define MT_LED_CTRL_TX_BLINK_MODE(_n) BIT(2 + (8 * (_n))) +#define MT_LED_CTRL_TX_MANUAL_BLINK(_n) BIT(3 + (8 * (_n))) +#define MT_LED_CTRL_TX_OVER_BLINK(_n) BIT(5 + (8 * (_n))) +#define MT_LED_CTRL_KICK(_n) BIT(7 + (8 * (_n))) + +#define MT_LED_STATUS_0(_n) MT_LED_PHYS(0x10 + ((_n) * 8)) +#define MT_LED_STATUS_1(_n) MT_LED_PHYS(0x14 + ((_n) * 8)) +#define MT_LED_STATUS_OFF GENMASK(31, 24) +#define MT_LED_STATUS_ON GENMASK(23, 16) +#define MT_LED_STATUS_DURATION GENMASK(15, 0) + #define MT_CLIENT_BASE_PHYS_ADDR 0x800c0000 #define MT_CLIENT_TMAC_INFO_TEMPLATE 0x040