€•âAŒ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Œ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.”…””}”(hhñhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K hhíubah}”(h]”h ]”h"]”h$]”h&]”uh1hëhhèhžhhŸh¶h Nubhì)”}”(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)”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hëhhèhžhhŸh¶h Nubhì)”}”(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.”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hëhhèhžhhŸh¶h Nubhì)”}”(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.”…””}”(hj9hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khj5ubah}”(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:”…””}”(hjbhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j`hŸh¶h Khj\ubhŒ definition”“”)”}”(hhh]”hç)”}”(hhh]”(hì)”}”(hŒdrivers/video/sh7760fb.c”h]”hÉ)”}”(hjzh]”hŒdrivers/video/sh7760fb.c”…””}”(hj|hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khjxubah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjuubhì)”}”(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 Khjubah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjuubhì)”}”(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ëhjuubeh}”(h]”h ]”h"]”h$]”h&]”jSŒ-”uh1hæhŸh¶h Khjrubah}”(h]”h ]”h"]”h$]”h&]”uh1jphj\ubeh}”(h]”h ]”h"]”h$]”h&]”uh1jZhŸh¶h KhjWubah}”(h]”h ]”h"]”h$]”h&]”uh1jUhh·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"ubjV)”}”(hhh]”j[)”}”(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]”(ja)”}”(hŒSH7760:”h]”hŒSH7760:”…””}”(hj÷hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j`hŸh¶h K)hjóubjq)”}”(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).”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K(hjubeh}”(h]”h ]”h"]”h$]”h&]”uh1jphjóubeh}”(h]”h ]”h"]”h$]”h&]”uh1jZhŸh¶h K)hjðubah}”(h]”h ]”h"]”h$]”h&]”uh1jUhjß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.”…””}”(hj6hž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”…””}”(hjOhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjLhž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.”…””}”(hj]hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K0hjLhž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. (”…””}”(hjkhž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”…””}”(hjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jwuh1jshjkubhŒ)”…””}”(hjkhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K4hjLhž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 K7hjLhž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:hjLhž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ÙjIjFj³j°uŒ nametypes”}”(j»‰j܉jI‰j³‰uh}”(j¸h£jÙh·jFjßj°jLuŒ 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.