Lines Matching +full:hdmi +full:- +full:out
1 /*-
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * HDMI core module
50 #include <dev/hdmi/dwc_hdmi.h>
62 { "synopsys,dwc-hdmi", 1 },
73 if (sc->i2c_xref == 0) in dwc_hdmi_fdt_get_i2c_dev()
76 return (OF_device_from_xref(sc->i2c_xref)); in dwc_hdmi_fdt_get_i2c_dev()
86 if (sc->clk_ahb != NULL) in dwc_hdmi_fdt_detach()
87 clk_release(sc->clk_ahb); in dwc_hdmi_fdt_detach()
88 if (sc->clk_hdmi != NULL) in dwc_hdmi_fdt_detach()
89 clk_release(sc->clk_hdmi); in dwc_hdmi_fdt_detach()
91 if (sc->base.sc_mem_res != NULL) in dwc_hdmi_fdt_detach()
93 sc->base.sc_mem_rid, sc->base.sc_mem_res); in dwc_hdmi_fdt_detach()
107 sc->base.sc_dev = dev; in dwc_hdmi_fdt_attach()
108 sc->base.sc_get_i2c_dev = dwc_hdmi_fdt_get_i2c_dev; in dwc_hdmi_fdt_attach()
112 sc->base.sc_mem_rid = 0; in dwc_hdmi_fdt_attach()
113 sc->base.sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, in dwc_hdmi_fdt_attach()
114 &sc->base.sc_mem_rid, RF_ACTIVE); in dwc_hdmi_fdt_attach()
115 if (sc->base.sc_mem_res == NULL) { in dwc_hdmi_fdt_attach()
118 goto out; in dwc_hdmi_fdt_attach()
122 if (OF_getencprop(node, "ddc", &i2c_xref, sizeof(i2c_xref)) == -1) in dwc_hdmi_fdt_attach()
123 sc->i2c_xref = 0; in dwc_hdmi_fdt_attach()
125 sc->i2c_xref = i2c_xref; in dwc_hdmi_fdt_attach()
127 if (OF_getencprop(node, "reg-shift", &sc->base.sc_reg_shift, in dwc_hdmi_fdt_attach()
128 sizeof(sc->base.sc_reg_shift)) <= 0) in dwc_hdmi_fdt_attach()
129 sc->base.sc_reg_shift = 0; in dwc_hdmi_fdt_attach()
131 if (clk_get_by_ofw_name(dev, 0, "hdmi", &sc->clk_hdmi) != 0 || in dwc_hdmi_fdt_attach()
132 clk_get_by_ofw_name(dev, 0, "ahb", &sc->clk_ahb) != 0) { in dwc_hdmi_fdt_attach()
135 goto out; in dwc_hdmi_fdt_attach()
137 if (OF_getencprop(node, "clock-frequency", &freq, sizeof(freq)) > 0) { in dwc_hdmi_fdt_attach()
138 err = clk_set_freq(sc->clk_hdmi, freq, CLK_SET_ROUND_DOWN); in dwc_hdmi_fdt_attach()
141 "Cannot set HDMI clock frequency to %u Hz\n", freq); in dwc_hdmi_fdt_attach()
142 goto out; in dwc_hdmi_fdt_attach()
145 device_printf(dev, "HDMI clock frequency not specified\n"); in dwc_hdmi_fdt_attach()
146 if (clk_enable(sc->clk_hdmi) != 0) { in dwc_hdmi_fdt_attach()
147 device_printf(dev, "Cannot enable HDMI clock\n"); in dwc_hdmi_fdt_attach()
149 goto out; in dwc_hdmi_fdt_attach()
151 if (clk_enable(sc->clk_ahb) != 0) { in dwc_hdmi_fdt_attach()
154 goto out; in dwc_hdmi_fdt_attach()
159 out: in dwc_hdmi_fdt_attach()
170 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in dwc_hdmi_fdt_probe()
173 device_set_desc(dev, "Synopsys DesignWare HDMI Controller"); in dwc_hdmi_fdt_probe()
184 /* HDMI methods */