u32 stat = HDMI_READ(HDMI_CEC_CPU_STATUS);
u32 cntrl1, cntrl5;
- if (!(stat & VC4_HDMI_CPU_CEC))
+ if (!(stat & vc4_hdmi->variant->cec_mask))
return IRQ_NONE;
vc4_hdmi->cec_rx_msg.len = 0;
cntrl1 = HDMI_READ(HDMI_CEC_CNTRL_1);
cntrl1 &= ~VC4_HDMI_CEC_START_XMIT_BEGIN;
}
HDMI_WRITE(HDMI_CEC_CNTRL_1, cntrl1);
- HDMI_WRITE(HDMI_CEC_CPU_CLEAR, VC4_HDMI_CPU_CEC);
+ HDMI_WRITE(HDMI_CEC_CPU_CLEAR, vc4_hdmi->variant->cec_mask);
return IRQ_WAKE_THREAD;
}
((3600 / usecs) << VC4_HDMI_CEC_CNT_TO_3600_US_SHIFT) |
((3500 / usecs) << VC4_HDMI_CEC_CNT_TO_3500_US_SHIFT));
- HDMI_WRITE(HDMI_CEC_CPU_MASK_CLEAR, VC4_HDMI_CPU_CEC);
+ HDMI_WRITE(HDMI_CEC_CPU_MASK_CLEAR, vc4_hdmi->variant->cec_mask);
} else {
- HDMI_WRITE(HDMI_CEC_CPU_MASK_SET, VC4_HDMI_CPU_CEC);
+ HDMI_WRITE(HDMI_CEC_CPU_MASK_SET, vc4_hdmi->variant->cec_mask);
HDMI_WRITE(HDMI_CEC_CNTRL_5, val |
VC4_HDMI_CEC_TX_SW_RESET | VC4_HDMI_CEC_RX_SW_RESET);
}
.get_hsm_clock = vc4_hdmi_get_hsm_clock,
.calc_hsm_clock = vc4_hdmi_calc_hsm_clock,
.channel_map = vc4_hdmi_channel_map,
+
+ .cec_mask = VC4_HDMI_CPU_CEC,
};
static const struct vc4_hdmi_variant bcm2711_hdmi0_variant = {
.get_hsm_clock = vc5_hdmi_get_hsm_clock,
.calc_hsm_clock = vc5_hdmi_calc_hsm_clock,
.channel_map = vc5_hdmi_channel_map,
+
+ .cec_mask = VC5_HDMI0_CPU_CEC_RX | VC5_HDMI0_CPU_CEC_TX,
};
static const struct vc4_hdmi_variant bcm2711_hdmi1_variant = {
.get_hsm_clock = vc5_hdmi_get_hsm_clock,
.calc_hsm_clock = vc5_hdmi_calc_hsm_clock,
.channel_map = vc5_hdmi_channel_map,
+
+ .cec_mask = VC5_HDMI1_CPU_CEC_RX | VC5_HDMI1_CPU_CEC_TX,
};
static const struct of_device_id vc4_hdmi_dt_match[] = {
# define VC4_HDMI_CPU_CEC BIT(6)
# define VC4_HDMI_CPU_HOTPLUG BIT(0)
+# define VC5_HDMI0_CPU_CEC_RX BIT(1)
+# define VC5_HDMI0_CPU_CEC_TX BIT(0)
+# define VC5_HDMI0_CPU_HOTPLUG_CONN BIT(4)
+# define VC5_HDMI0_CPU_HOTPLUG_REM BIT(5)
+# define VC5_HDMI1_CPU_CEC_RX BIT(7)
+# define VC5_HDMI1_CPU_CEC_TX BIT(6)
+# define VC5_HDMI1_CPU_HOTPLUG_CONN BIT(10)
+# define VC5_HDMI1_CPU_HOTPLUG_REM BIT(11)
+
/* Debug: Current receive value on the CEC pad. */
# define VC4_HD_CECRXD BIT(9)
/* Debug: Override CEC output to 0. */