€•ÅBŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ/translations/zh_CN/fb/sh7760fb”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/zh_TW/fb/sh7760fb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/it_IT/fb/sh7760fb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ja_JP/fb/sh7760fb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/ko_KR/fb/sh7760fb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/pt_BR/fb/sh7760fb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ/translations/sp_SP/fb/sh7760fb”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ0SH7760/SH7763 integrated LCDC Framebuffer driver”h]”hŒ0SH7760/SH7763 integrated LCDC Framebuffer driver”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³Œ9/var/lib/git/docbuild/linux/Documentation/fb/sh7760fb.rst”h´Kubh¶)”}”(hhh]”(h»)”}”(hŒ 0. Overview”h]”hŒ 0. Overview”…””}”(hhÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhhËh²hh³hÊh´KubhŒ paragraph”“”)”}”(hŒÒThe SH7760/SH7763 have an integrated LCD Display controller (LCDC) which supports (in theory) resolutions ranging from 1x1 to 1024x1024, with color depths ranging from 1 to 16 bits, on STN, DSTN and TFT Panels.”h]”hŒÒThe SH7760/SH7763 have an integrated LCD Display controller (LCDC) which supports (in theory) resolutions ranging from 1x1 to 1024x1024, with color depths ranging from 1 to 16 bits, on STN, DSTN and TFT Panels.”…””}”(hhÞh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhhËh²hubhÝ)”}”(hŒCaveats:”h]”hŒCaveats:”…””}”(hhìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K hhËh²hubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒùFramebuffer memory must be a large chunk allocated at the top of Area3 (HW requirement). Because of this requirement you should NOT make the driver a module since at runtime it may become impossible to get a large enough contiguous chunk of memory. ”h]”hÝ)”}”(hŒøFramebuffer memory must be a large chunk allocated at the top of Area3 (HW requirement). Because of this requirement you should NOT make the driver a module since at runtime it may become impossible to get a large enough contiguous chunk of memory.”h]”hŒøFramebuffer memory must be a large chunk allocated at the top of Area3 (HW requirement). Because of this requirement you should NOT make the driver a module since at runtime it may become impossible to get a large enough contiguous chunk of memory.”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhhüh²hh³hÊh´Nubj)”}”(hŒcThe driver does not support changing resolution while loaded (displays aren't hotpluggable anyway) ”h]”hÝ)”}”(hŒbThe driver does not support changing resolution while loaded (displays aren't hotpluggable anyway)”h]”hŒdThe driver does not support changing resolution while loaded (displays aren’t hotpluggable anyway)”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhhüh²hh³hÊh´Nubj)”}”(hŒšHeavy flickering may be observed a) if you're using 15/16bit color modes at >= 640x480 px resolutions, b) during PCMCIA (or any other slow bus) activity. ”h]”hÝ)”}”(hŒ™Heavy flickering may be observed a) if you're using 15/16bit color modes at >= 640x480 px resolutions, b) during PCMCIA (or any other slow bus) activity.”h]”hŒ›Heavy flickering may be observed a) if you’re using 15/16bit color modes at >= 640x480 px resolutions, b) during PCMCIA (or any other slow bus) activity.”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khj1ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhhüh²hh³hÊh´Nubj)”}”(hŒ]Rotation works only 90degress clockwise, and only if horizontal resolution is <= 320 pixels. ”h]”hÝ)”}”(hŒ\Rotation works only 90degress clockwise, and only if horizontal resolution is <= 320 pixels.”h]”hŒ\Rotation works only 90degress clockwise, and only if horizontal resolution is <= 320 pixels.”…””}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhjIubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhhüh²hh³hÊh´Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ*”uh1húh³hÊh´K hhËh²hubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ^Files: - drivers/video/sh7760fb.c - include/asm-sh/sh7760fb.h - Documentation/fb/sh7760fb.rst ”h]”(hŒterm”“”)”}”(hŒFiles:”h]”hŒFiles:”…””}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jth³hÊh´KhjpubhŒ definition”“”)”}”(hhh]”hû)”}”(hhh]”(j)”}”(hŒdrivers/video/sh7760fb.c”h]”hÝ)”}”(hjŽh]”hŒdrivers/video/sh7760fb.c”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KhjŒubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhj‰ubj)”}”(hŒinclude/asm-sh/sh7760fb.h”h]”hÝ)”}”(hj¥h]”hŒinclude/asm-sh/sh7760fb.h”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhj‰ubj)”}”(hŒDocumentation/fb/sh7760fb.rst ”h]”hÝ)”}”(hŒDocumentation/fb/sh7760fb.rst”h]”hŒDocumentation/fb/sh7760fb.rst”…””}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Khjºubah}”(h]”h ]”h"]”h$]”h&]”uh1hÿhj‰ubeh}”(h]”h ]”h"]”h$]”h&]”jgŒ-”uh1húh³hÊh´Khj†ubah}”(h]”h ]”h"]”h$]”h&]”uh1j„hjpubeh}”(h]”h ]”h"]”h$]”h&]”uh1jnh³hÊh´Khjkubah}”(h]”h ]”h"]”h$]”h&]”uh1jihhËh²hh³Nh´Nubeh}”(h]”Œoverview”ah ]”h"]”Œ 0. overview”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒ1. Platform setup”h]”hŒ1. Platform setup”…””}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjóh²hh³hÊh´K"ubjj)”}”(hhh]”jo)”}”(hXSH7760: Video data is fetched via the DMABRG DMA engine, so you have to configure the SH DMAC for DMABRG mode (write 0x94808080 to the DMARSRA register somewhere at boot). PFC registers PCCR and PCDR must be set to peripheral mode. (write zeros to both). ”h]”(ju)”}”(hŒSH7760:”h]”hŒSH7760:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jth³hÊh´K)hjubj…)”}”(hhh]”(hÝ)”}”(hŒ£Video data is fetched via the DMABRG DMA engine, so you have to configure the SH DMAC for DMABRG mode (write 0x94808080 to the DMARSRA register somewhere at boot).”h]”hŒ£Video data is fetched via the DMABRG DMA engine, so you have to configure the SH DMAC for DMABRG mode (write 0x94808080 to the DMARSRA register somewhere at boot).”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K$hjubhÝ)”}”(hŒRPFC registers PCCR and PCDR must be set to peripheral mode. (write zeros to both).”h]”hŒRPFC registers PCCR and PCDR must be set to peripheral mode. (write zeros to both).”…””}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K(hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1j„hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jnh³hÊh´K)hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjóh²hh³hÊh´NubhÝ)”}”(hŒaThe driver does NOT do the above for you since board setup is, well, job of the board setup code.”h]”hŒaThe driver does NOT do the above for you since board setup is, well, job of the board setup code.”…””}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K+hjóh²hubeh}”(h]”Œplatform-setup”ah ]”h"]”Œ1. platform setup”ah$]”h&]”uh1hµhh·h²hh³hÊh´K"ubh¶)”}”(hhh]”(h»)”}”(hŒ2. Panel definitions”h]”hŒ2. Panel definitions”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj`h²hh³hÊh´K/ubhÝ)”}”(hŒ§The LCDC must explicitly be told about the type of LCD panel attached. Data must be wrapped in a "struct sh7760fb_platdata" and passed to the driver as platform_data.”h]”hŒ«The LCDC must explicitly be told about the type of LCD panel attached. Data must be wrapped in a “struct sh7760fb_platdata†and passed to the driver as platform_data.”…””}”(hjqh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K0hj`h²hubhÝ)”}”(hŒŠSuggest you take a closer look at the SH7760 Manual, Section 30. (http://documentation.renesas.com/eng/products/mpumcu/e602291_sh7760.pdf)”h]”(hŒBSuggest you take a closer look at the SH7760 Manual, Section 30. (”…””}”(hjh²hh³Nh´NubhŒ reference”“”)”}”(hŒGhttp://documentation.renesas.com/eng/products/mpumcu/e602291_sh7760.pdf”h]”hŒGhttp://documentation.renesas.com/eng/products/mpumcu/e602291_sh7760.pdf”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j‹uh1j‡hjubhŒ)”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K4hj`h²hubhÝ)”}”(hŒfThe following code illustrates what needs to be done to get the framebuffer working on a 640x480 TFT::”h]”hŒeThe following code illustrates what needs to be done to get the framebuffer working on a 640x480 TFT:”…””}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K7hj`h²hubhŒ literal_block”“”)”}”(hXc #include #include /* * NEC NL6440bc26-01 640x480 TFT * dotclock 25175 kHz * Xres 640 Yres 480 * Htotal 800 Vtotal 525 * HsynStart 656 VsynStart 490 * HsynLenn 30 VsynLenn 2 * * The linux framebuffer layer does not use the syncstart/synclen * values but right/left/upper/lower margin values. The comments * for the x_margin explain how to calculate those from given * panel sync timings. */ static struct fb_videomode nl6448bc26 = { .name = "NL6448BC26", .refresh = 60, .xres = 640, .yres = 480, .pixclock = 39683, /* in picoseconds! */ .hsync_len = 30, .vsync_len = 2, .left_margin = 114, /* HTOT - (HSYNSLEN + HSYNSTART) */ .right_margin = 16, /* HSYNSTART - XRES */ .upper_margin = 33, /* VTOT - (VSYNLEN + VSYNSTART) */ .lower_margin = 10, /* VSYNSTART - YRES */ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, .vmode = FB_VMODE_NONINTERLACED, .flag = 0, }; static struct sh7760fb_platdata sh7760fb_nl6448 = { .def_mode = &nl6448bc26, .ldmtr = LDMTR_TFT_COLOR_16, /* 16bit TFT panel */ .lddfr = LDDFR_8BPP, /* we want 8bit output */ .ldpmmr = 0x0070, .ldpspr = 0x0500, .ldaclnr = 0, .ldickr = LDICKR_CLKSRC(LCDC_CLKSRC_EXTERNAL) | LDICKR_CLKDIV(1), .rotate = 0, .novsync = 1, .blank = NULL, }; /* SH7760: * 0xFE300800: 256 * 4byte xRGB palette ram * 0xFE300C00: 42 bytes ctrl registers */ static struct resource sh7760_lcdc_res[] = { [0] = { .start = 0xFE300800, .end = 0xFE300CFF, .flags = IORESOURCE_MEM, }, [1] = { .start = 65, .end = 65, .flags = IORESOURCE_IRQ, }, }; static struct platform_device sh7760_lcdc_dev = { .dev = { .platform_data = &sh7760fb_nl6448, }, .name = "sh7760-lcdc", .id = -1, .resource = sh7760_lcdc_res, .num_resources = ARRAY_SIZE(sh7760_lcdc_res), };”h]”hXc #include #include /* * NEC NL6440bc26-01 640x480 TFT * dotclock 25175 kHz * Xres 640 Yres 480 * Htotal 800 Vtotal 525 * HsynStart 656 VsynStart 490 * HsynLenn 30 VsynLenn 2 * * The linux framebuffer layer does not use the syncstart/synclen * values but right/left/upper/lower margin values. The comments * for the x_margin explain how to calculate those from given * panel sync timings. */ static struct fb_videomode nl6448bc26 = { .name = "NL6448BC26", .refresh = 60, .xres = 640, .yres = 480, .pixclock = 39683, /* in picoseconds! */ .hsync_len = 30, .vsync_len = 2, .left_margin = 114, /* HTOT - (HSYNSLEN + HSYNSTART) */ .right_margin = 16, /* HSYNSTART - XRES */ .upper_margin = 33, /* VTOT - (VSYNLEN + VSYNSTART) */ .lower_margin = 10, /* VSYNSTART - YRES */ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, .vmode = FB_VMODE_NONINTERLACED, .flag = 0, }; static struct sh7760fb_platdata sh7760fb_nl6448 = { .def_mode = &nl6448bc26, .ldmtr = LDMTR_TFT_COLOR_16, /* 16bit TFT panel */ .lddfr = LDDFR_8BPP, /* we want 8bit output */ .ldpmmr = 0x0070, .ldpspr = 0x0500, .ldaclnr = 0, .ldickr = LDICKR_CLKSRC(LCDC_CLKSRC_EXTERNAL) | LDICKR_CLKDIV(1), .rotate = 0, .novsync = 1, .blank = NULL, }; /* SH7760: * 0xFE300800: 256 * 4byte xRGB palette ram * 0xFE300C00: 42 bytes ctrl registers */ static struct resource sh7760_lcdc_res[] = { [0] = { .start = 0xFE300800, .end = 0xFE300CFF, .flags = IORESOURCE_MEM, }, [1] = { .start = 65, .end = 65, .flags = IORESOURCE_IRQ, }, }; static struct platform_device sh7760_lcdc_dev = { .dev = { .platform_data = &sh7760fb_nl6448, }, .name = "sh7760-lcdc", .id = -1, .resource = sh7760_lcdc_res, .num_resources = ARRAY_SIZE(sh7760_lcdc_res), };”…””}”hj²sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j°h³hÊh´K:hj`h²hubeh}”(h]”Œpanel-definitions”ah ]”h"]”Œ2. panel definitions”ah$]”h&]”uh1hµhh·h²hh³hÊh´K/ubeh}”(h]”Œ0sh7760-sh7763-integrated-lcdc-framebuffer-driver”ah ]”h"]”Œ0sh7760/sh7763 integrated lcdc framebuffer driver”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jõŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jÏjÌjðjíj]jZjÇjÄuŒ nametypes”}”(jωjð‰j]‰jljuh}”(jÌh·jíhËjZjójÄj`uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.