*/
};
};
+
+ aocec: aocec {
+ compatible = "amlogic, aocec-g12a";
+ device_name = "aocec";
+ status = "okay";
+ vendor_name = "Amlogic"; /* Max Chars: 8 */
+ /* Refer to the following URL at:
+ * http://standards.ieee.org/develop/regauth/oui/oui.txt
+ */
+ vendor_id = <0x000000>;
+ product_desc = "G12A"; /* Max Chars: 16 */
+ cec_osd_string = "AML_MBOX"; /* Max Chars: 14 */
+ port_num = <1>;
+ ee_cec;
+ arc_port_mask = <0x2>;
+ interrupts = <0 203 1>;
+ interrupt-names = "hdmi_aocecb";
+ pinctrl-names = "default";
+ pinctrl-0=<&eecec_b>;
+ reg = <0x0 0xFF80023c 0x0 0x4
+ 0x0 0xFF800000 0x0 0x400>;
+ };
+
canvas{
compatible = "amlogic, meson, canvas";
dev_name = "amlogic-canvas";
pinctrl-0 = <&c_uart_pins>;
};
+ aocec: aocec {
+ compatible = "amlogic, aocec-g12a";
+ device_name = "aocec";
+ status = "okay";
+ vendor_name = "Amlogic"; /* Max Chars: 8 */
+ /* Refer to the following URL at:
+ * http://standards.ieee.org/develop/regauth/oui/oui.txt
+ */
+ vendor_id = <0x000000>;
+ product_desc = "G12A"; /* Max Chars: 16 */
+ cec_osd_string = "AML_MBOX"; /* Max Chars: 14 */
+ port_num = <1>;
+ ee_cec;
+ arc_port_mask = <0x2>;
+ interrupts = <0 203 1>;
+ interrupt-names = "hdmi_aocecb";
+ pinctrl-names = "default";
+ pinctrl-0=<&eecec_b>;
+ reg = <0x0 0xFF80023c 0x0 0x4
+ 0x0 0xFF800000 0x0 0x400>;
+ };
+
dwc3: dwc3@ff500000 {
compatible = "synopsys, dwc3";
status = "okay";
function = "i2c_ao_slave";
};
};
+
+ aocec_a: ao_ceca {
+ mux {
+ groups = "cec_ao_a";
+ function = "cec_ao";
+ };
+ };
+
+ aocec_b: ao_cecb {
+ mux {
+ groups = "cec_ao_b";
+ function = "cec_ao";
+ };
+ };
};
&pinctrl_periphs {
function = "pwm_e";
};
};
+
+ c_i2c_master_pin1:c_i2c_pin1 {
+ mux {
+ groups = "i2c3_sck_a",
+ "i2c3_sda_a";
+ function = "i2c3";
+ };
+ };
+
+ eecec_a: ee_ceca {
+ mux {
+ groups = "cec_ao_a_ee";
+ function = "cec_ao_ee";
+ };
+ };
+
+ eecec_b: ee_cecb {
+ mux {
+ groups = "cec_ao_b_ee";
+ function = "cec_ao_ee";
+ };
+ };
};
&pinctrl_aobus {
writel(reg, cec_dev->cec_reg + AO_CECB_CLK_CNTL_REG0);
reg = readl(cec_dev->cec_reg + AO_RTI_PWR_CNTL_REG0);
- reg |= (0x01 << 6); /* xtal gate */
+ reg |= (0x01 << 14); /* xtal gate */
writel(reg, cec_dev->cec_reg + AO_RTI_PWR_CNTL_REG0);
data32 = 0;
if (kstrtouint(buf, 16, &addr) != 1)
return -EINVAL;
-
if (addr > 0xffff || addr < 0) {
CEC_ERR("invalid input:%s\n", buf);
phy_addr_test = 0;
.ee_to_ao = 1,
};
+static const struct cec_platform_data_s cec_g12a_data = {
+ .line_bit = 7,
+ .ee_to_ao = 1,
+};
+
static const struct of_device_id aml_cec_dt_match[] = {
{
.compatible = "amlogic, amlogic-aocec",
.compatible = "amlogic, aocec-txlx",
.data = &cec_txlx_data,
},
+ {
+ .compatible = "amlogic, aocec-g12a",
+ .data = &cec_g12a_data,
+ },
};
#endif
struct device_node *node = pdev->dev.of_node;
int irq_idx = 0, r;
const char *irq_name = NULL;
- /*struct pinctrl *p;*/
+ struct pinctrl *p;
struct vendor_info_data *vend;
struct resource *res;
resource_size_t *base;
else
ee_cec = 0;
CEC_INFO("using EE cec:%d\n", ee_cec);
+ /* pinmux set */
+ if (of_get_property(node, "pinctrl-names", NULL)) {
+ r = of_property_read_string(node,
+ "pinctrl-names",
+ &cec_dev->pin_name);
+ if ((!r) && strcmp(cec_dev->pin_name, "default")) {
+ CEC_INFO("%s pin name:%s\n", __func__,
+ cec_dev->pin_name);
+ p = devm_pinctrl_get_select(&pdev->dev,
+ cec_dev->pin_name);
+ }
+ }
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res) {
base = ioremap(res->start, res->end - res->start);
cec_pre_init();
queue_delayed_work(cec_dev->cec_thread, &cec_dev->cec_work, 0);
+ CEC_ERR("%s success end\n", __func__);
+
return 0;
tag_cec_msg_alloc_err:
input_free_device(cec_dev->cec_info.remote_cec_dev);
#define AO_DEBUG_REG1 ((0x29 << 2))
#define AO_DEBUG_REG2 ((0x2a << 2))
#define AO_DEBUG_REG3 ((0x2b << 2))
+#define AO_CEC_STICKY_DATA0 ((0xca << 2))
+#define AO_CEC_STICKY_DATA1 ((0xcb << 2))
+#define AO_CEC_STICKY_DATA2 ((0xcc << 2))
+#define AO_CEC_STICKY_DATA3 ((0xcd << 2))
+#define AO_CEC_STICKY_DATA4 ((0xce << 2))
+#define AO_CEC_STICKY_DATA5 ((0xcf << 2))
+#define AO_CEC_STICKY_DATA6 ((0xd0 << 2))
+#define AO_CEC_STICKY_DATA7 ((0xd1 << 2))
/*
* AOCEC_B