1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010 |
- // SPDX-License-Identifier: GPL-2.0
- // Copyright (c) 2022 Intel Corporation.
- #include <asm/unaligned.h>
- #include <linux/acpi.h>
- #include <linux/delay.h>
- #include <linux/i2c.h>
- #include <linux/module.h>
- #include <linux/pm_runtime.h>
- #include <media/v4l2-ctrls.h>
- #include <media/v4l2-device.h>
- #include <media/v4l2-fwnode.h>
- #define HI847_REG_VALUE_08BIT 1
- #define HI847_REG_VALUE_16BIT 2
- #define HI847_REG_VALUE_24BIT 3
- #define HI847_LINK_FREQ_400MHZ 400000000ULL
- #define HI847_LINK_FREQ_200MHZ 200000000ULL
- #define HI847_SCLK 72000000ULL
- #define HI847_MCLK 19200000
- #define HI847_DATA_LANES 4
- #define HI847_RGB_DEPTH 10
- #define HI847_REG_CHIP_ID 0x0716
- #define HI847_CHIP_ID 0x0847
- #define HI847_REG_MODE_SELECT 0x0B00
- #define HI847_MODE_STANDBY 0x0000
- #define HI847_MODE_STREAMING 0x0100
- #define HI847_REG_MODE_TG 0x027E
- #define HI847_REG_MODE_TG_ENABLE 0x0100
- #define HI847_REG_MODE_TG_DISABLE 0x0000
- /* vertical-timings from sensor */
- #define HI847_REG_FLL 0x020E
- #define HI847_FLL_30FPS 0x0B51
- #define HI847_FLL_30FPS_MIN 0x0B51
- #define HI847_FLL_60FPS 0x05A9
- #define HI847_FLL_60FPS_MIN 0x05A9
- #define HI847_FLL_MAX 0x7fff
- /* horizontal-timings from sensor */
- #define HI847_REG_LLP 0x0206
- /* Exposure controls from sensor */
- #define HI847_REG_EXPOSURE 0x020A
- #define HI847_EXPOSURE_MIN 4
- #define HI847_EXPOSURE_MAX_MARGIN 4
- #define HI847_EXPOSURE_STEP 1
- /* Analog gain controls from sensor */
- #define HI847_REG_ANALOG_GAIN 0x0212
- #define HI847_ANAL_GAIN_MIN 0
- #define HI847_ANAL_GAIN_MAX 240
- #define HI847_ANAL_GAIN_STEP 1
- /* Digital gain controls from sensor */
- #define HI847_REG_MWB_GR_GAIN 0x0214
- #define HI847_REG_MWB_GB_GAIN 0x0216
- #define HI847_REG_MWB_R_GAIN 0x0218
- #define HI847_REG_MWB_B_GAIN 0x021A
- #define HI847_DGTL_GAIN_MIN 1
- #define HI847_DGTL_GAIN_MAX 8191
- #define HI847_DGTL_GAIN_STEP 1
- #define HI847_DGTL_GAIN_DEFAULT 512
- /* Test Pattern Control */
- #define HI847_REG_ISP 0X0B04
- #define HI847_REG_ISP_TPG_EN 0x0001
- #define HI847_REG_TEST_PATTERN 0x0C0A
- /* Flip Mirror Controls from sensor */
- #define HI847_REG_MIRROR_FLIP 0x0202
- #define HI847_REG_FORMAT_X 0x0F04
- #define HI847_REG_FORMAT_Y 0x0F06
- enum {
- HI847_LINK_FREQ_400MHZ_INDEX,
- HI847_LINK_FREQ_200MHZ_INDEX,
- };
- struct hi847_reg {
- u16 address;
- u16 val;
- };
- struct hi847_reg_list {
- u32 num_of_regs;
- const struct hi847_reg *regs;
- };
- struct hi847_link_freq_config {
- const struct hi847_reg_list reg_list;
- };
- struct hi847_mode {
- /* Frame width in pixels */
- u32 width;
- /* Frame height in pixels */
- u32 height;
- /* Horizontal timining size */
- u32 llp;
- /* Default vertical timining size */
- u32 fll_def;
- /* Min vertical timining size */
- u32 fll_min;
- /* Link frequency needed for this resolution */
- u32 link_freq_index;
- /* Sensor register settings for this resolution */
- const struct hi847_reg_list reg_list;
- };
- #define to_hi847(_sd) container_of(_sd, struct hi847, sd)
- //SENSOR_INITIALIZATION
- static const struct hi847_reg mipi_data_rate_lane_4[] = {
- {0x0790, 0x0100},
- {0x2000, 0x0000},
- {0x2002, 0x0058},
- {0x2006, 0x40B2},
- {0x2008, 0xB05C},
- {0x200A, 0x8446},
- {0x200C, 0x40B2},
- {0x200E, 0xB082},
- {0x2010, 0x8450},
- {0x2012, 0x40B2},
- {0x2014, 0xB0AE},
- {0x2016, 0x84C6},
- {0x2018, 0x40B2},
- {0x201A, 0xB11A},
- {0x201C, 0x84BC},
- {0x201E, 0x40B2},
- {0x2020, 0xB34A},
- {0x2022, 0x84B4},
- {0x2024, 0x40B2},
- {0x2026, 0xB386},
- {0x2028, 0x84B0},
- {0x202A, 0x40B2},
- {0x202C, 0xB3B4},
- {0x202E, 0x84B8},
- {0x2030, 0x40B2},
- {0x2032, 0xB0F4},
- {0x2034, 0x8470},
- {0x2036, 0x40B2},
- {0x2038, 0xB3EA},
- {0x203A, 0x847C},
- {0x203C, 0x40B2},
- {0x203E, 0xB658},
- {0x2040, 0x8478},
- {0x2042, 0x40B2},
- {0x2044, 0xB67E},
- {0x2046, 0x847E},
- {0x2048, 0x40B2},
- {0x204A, 0xB78E},
- {0x204C, 0x843A},
- {0x204E, 0x40B2},
- {0x2050, 0xB980},
- {0x2052, 0x845C},
- {0x2054, 0x40B2},
- {0x2056, 0xB9B0},
- {0x2058, 0x845E},
- {0x205A, 0x4130},
- {0x205C, 0x1292},
- {0x205E, 0xD016},
- {0x2060, 0xB3D2},
- {0x2062, 0x0B00},
- {0x2064, 0x2002},
- {0x2066, 0xD2E2},
- {0x2068, 0x0381},
- {0x206A, 0x93C2},
- {0x206C, 0x0263},
- {0x206E, 0x2001},
- {0x2070, 0x4130},
- {0x2072, 0x422D},
- {0x2074, 0x403E},
- {0x2076, 0x888E},
- {0x2078, 0x403F},
- {0x207A, 0x192A},
- {0x207C, 0x1292},
- {0x207E, 0x843E},
- {0x2080, 0x3FF7},
- {0x2082, 0x422D},
- {0x2084, 0x403E},
- {0x2086, 0x192A},
- {0x2088, 0x403F},
- {0x208A, 0x888E},
- {0x208C, 0x1292},
- {0x208E, 0x843E},
- {0x2090, 0xB3D2},
- {0x2092, 0x0267},
- {0x2094, 0x2403},
- {0x2096, 0xD0F2},
- {0x2098, 0x0040},
- {0x209A, 0x0381},
- {0x209C, 0x90F2},
- {0x209E, 0x0010},
- {0x20A0, 0x0260},
- {0x20A2, 0x2002},
- {0x20A4, 0x1292},
- {0x20A6, 0x84BC},
- {0x20A8, 0x1292},
- {0x20AA, 0xD020},
- {0x20AC, 0x4130},
- {0x20AE, 0x1292},
- {0x20B0, 0x8470},
- {0x20B2, 0x1292},
- {0x20B4, 0x8452},
- {0x20B6, 0x0900},
- {0x20B8, 0x7118},
- {0x20BA, 0x1292},
- {0x20BC, 0x848E},
- {0x20BE, 0x0900},
- {0x20C0, 0x7112},
- {0x20C2, 0x0800},
- {0x20C4, 0x7A20},
- {0x20C6, 0x4292},
- {0x20C8, 0x87DE},
- {0x20CA, 0x7334},
- {0x20CC, 0x0F00},
- {0x20CE, 0x7304},
- {0x20D0, 0x421F},
- {0x20D2, 0x8718},
- {0x20D4, 0x1292},
- {0x20D6, 0x846E},
- {0x20D8, 0x1292},
- {0x20DA, 0x8488},
- {0x20DC, 0x0B00},
- {0x20DE, 0x7114},
- {0x20E0, 0x0002},
- {0x20E2, 0x1292},
- {0x20E4, 0x848C},
- {0x20E6, 0x1292},
- {0x20E8, 0x8454},
- {0x20EA, 0x43C2},
- {0x20EC, 0x86EE},
- {0x20EE, 0x1292},
- {0x20F0, 0x8444},
- {0x20F2, 0x4130},
- {0x20F4, 0x4392},
- {0x20F6, 0x7360},
- {0x20F8, 0xB3D2},
- {0x20FA, 0x0B00},
- {0x20FC, 0x2402},
- {0x20FE, 0xC2E2},
- {0x2100, 0x0381},
- {0x2102, 0x0900},
- {0x2104, 0x732C},
- {0x2106, 0x4382},
- {0x2108, 0x7360},
- {0x210A, 0x422D},
- {0x210C, 0x403E},
- {0x210E, 0x87F0},
- {0x2110, 0x403F},
- {0x2112, 0x87E8},
- {0x2114, 0x1292},
- {0x2116, 0x843E},
- {0x2118, 0x4130},
- {0x211A, 0x120B},
- {0x211C, 0x120A},
- {0x211E, 0x4392},
- {0x2120, 0x87FA},
- {0x2122, 0x4392},
- {0x2124, 0x760E},
- {0x2126, 0x0900},
- {0x2128, 0x760C},
- {0x212A, 0x421B},
- {0x212C, 0x760A},
- {0x212E, 0x903B},
- {0x2130, 0x0201},
- {0x2132, 0x2408},
- {0x2134, 0x903B},
- {0x2136, 0x0102},
- {0x2138, 0x2405},
- {0x213A, 0x4292},
- {0x213C, 0x030A},
- {0x213E, 0x87F8},
- {0x2140, 0x1292},
- {0x2142, 0x849A},
- {0x2144, 0x903B},
- {0x2146, 0x0020},
- {0x2148, 0x2010},
- {0x214A, 0x403B},
- {0x214C, 0x8498},
- {0x214E, 0x422F},
- {0x2150, 0x12AB},
- {0x2152, 0x403F},
- {0x2154, 0x0028},
- {0x2156, 0x12AB},
- {0x2158, 0x403B},
- {0x215A, 0x84C4},
- {0x215C, 0x407F},
- {0x215E, 0xFFAA},
- {0x2160, 0x12AB},
- {0x2162, 0x407F},
- {0x2164, 0x0055},
- {0x2166, 0x12AB},
- {0x2168, 0x3FDC},
- {0x216A, 0x903B},
- {0x216C, 0x0021},
- {0x216E, 0x2890},
- {0x2170, 0x903B},
- {0x2172, 0x0100},
- {0x2174, 0x200D},
- {0x2176, 0x403F},
- {0x2178, 0x0028},
- {0x217A, 0x1292},
- {0x217C, 0x8498},
- {0x217E, 0x425F},
- {0x2180, 0x0306},
- {0x2182, 0x1292},
- {0x2184, 0x84C4},
- {0x2186, 0x4FC2},
- {0x2188, 0x0318},
- {0x218A, 0x0261},
- {0x218C, 0x0000},
- {0x218E, 0x3FC9},
- {0x2190, 0x903B},
- {0x2192, 0x0101},
- {0x2194, 0x2858},
- {0x2196, 0x903B},
- {0x2198, 0x0200},
- {0x219A, 0x2450},
- {0x219C, 0x903B},
- {0x219E, 0x0201},
- {0x21A0, 0x2C47},
- {0x21A2, 0x903B},
- {0x21A4, 0x0102},
- {0x21A6, 0x2041},
- {0x21A8, 0x93E2},
- {0x21AA, 0x0262},
- {0x21AC, 0x240A},
- {0x21AE, 0x425F},
- {0x21B0, 0x0306},
- {0x21B2, 0x1292},
- {0x21B4, 0x84C4},
- {0x21B6, 0x4F4E},
- {0x21B8, 0x4EC2},
- {0x21BA, 0x0318},
- {0x21BC, 0x0260},
- {0x21BE, 0x0000},
- {0x21C0, 0x3FB0},
- {0x21C2, 0x403A},
- {0x21C4, 0x8030},
- {0x21C6, 0x4382},
- {0x21C8, 0x0326},
- {0x21CA, 0x4382},
- {0x21CC, 0x0328},
- {0x21CE, 0x421B},
- {0x21D0, 0x030C},
- {0x21D2, 0x930B},
- {0x21D4, 0x2420},
- {0x21D6, 0x4A5F},
- {0x21D8, 0x0001},
- {0x21DA, 0x1292},
- {0x21DC, 0x84C4},
- {0x21DE, 0x4F4E},
- {0x21E0, 0x4A5F},
- {0x21E2, 0x0001},
- {0x21E4, 0x9F0E},
- {0x21E6, 0x2402},
- {0x21E8, 0x5392},
- {0x21EA, 0x0326},
- {0x21EC, 0x4ECA},
- {0x21EE, 0x0001},
- {0x21F0, 0x533B},
- {0x21F2, 0x2411},
- {0x21F4, 0x4A6F},
- {0x21F6, 0x1292},
- {0x21F8, 0x84C4},
- {0x21FA, 0x4F4E},
- {0x21FC, 0x4A6F},
- {0x21FE, 0x9F0E},
- {0x2200, 0x2402},
- {0x2202, 0x5392},
- {0x2204, 0x0326},
- {0x2206, 0x4ECA},
- {0x2208, 0x0000},
- {0x220A, 0x533B},
- {0x220C, 0x532A},
- {0x220E, 0x0260},
- {0x2210, 0x0000},
- {0x2212, 0x930B},
- {0x2214, 0x23E0},
- {0x2216, 0x40B2},
- {0x2218, 0xAA55},
- {0x221A, 0x0328},
- {0x221C, 0xB0F2},
- {0x221E, 0x0040},
- {0x2220, 0x0381},
- {0x2222, 0x277F},
- {0x2224, 0xD3D2},
- {0x2226, 0x0267},
- {0x2228, 0x3F7C},
- {0x222A, 0x0261},
- {0x222C, 0x0000},
- {0x222E, 0x3F79},
- {0x2230, 0x903B},
- {0x2232, 0x0201},
- {0x2234, 0x23FA},
- {0x2236, 0x1292},
- {0x2238, 0x84C0},
- {0x223A, 0x3F73},
- {0x223C, 0x1292},
- {0x223E, 0x84C0},
- {0x2240, 0x0261},
- {0x2242, 0x0000},
- {0x2244, 0x3F6E},
- {0x2246, 0x903B},
- {0x2248, 0x0040},
- {0x224A, 0x2018},
- {0x224C, 0x422F},
- {0x224E, 0x1292},
- {0x2250, 0x8498},
- {0x2252, 0x12B0},
- {0x2254, 0xF0EA},
- {0x2256, 0x907F},
- {0x2258, 0xFFAA},
- {0x225A, 0x240D},
- {0x225C, 0x5392},
- {0x225E, 0x0312},
- {0x2260, 0x12B0},
- {0x2262, 0xF0EA},
- {0x2264, 0x907F},
- {0x2266, 0x0055},
- {0x2268, 0x2403},
- {0x226A, 0x5392},
- {0x226C, 0x0312},
- {0x226E, 0x3F59},
- {0x2270, 0x5392},
- {0x2272, 0x0310},
- {0x2274, 0x3F56},
- {0x2276, 0x5392},
- {0x2278, 0x0310},
- {0x227A, 0x3FF2},
- {0x227C, 0x903B},
- {0x227E, 0x0080},
- {0x2280, 0x23D4},
- {0x2282, 0x4382},
- {0x2284, 0x0312},
- {0x2286, 0x4382},
- {0x2288, 0x0310},
- {0x228A, 0x0261},
- {0x228C, 0x0000},
- {0x228E, 0x3F49},
- {0x2290, 0x932B},
- {0x2292, 0x2005},
- {0x2294, 0x403F},
- {0x2296, 0x0028},
- {0x2298, 0x1292},
- {0x229A, 0x8498},
- {0x229C, 0x3F42},
- {0x229E, 0x903B},
- {0x22A0, 0x0003},
- {0x22A2, 0x284B},
- {0x22A4, 0x923B},
- {0x22A6, 0x2015},
- {0x22A8, 0x403F},
- {0x22AA, 0x0023},
- {0x22AC, 0x1292},
- {0x22AE, 0x8498},
- {0x22B0, 0x421B},
- {0x22B2, 0x87F8},
- {0x22B4, 0x421F},
- {0x22B6, 0x030C},
- {0x22B8, 0x9F0B},
- {0x22BA, 0x2F33},
- {0x22BC, 0x1292},
- {0x22BE, 0x84BA},
- {0x22C0, 0x930F},
- {0x22C2, 0x2004},
- {0x22C4, 0x5392},
- {0x22C6, 0x0312},
- {0x22C8, 0x531B},
- {0x22CA, 0x3FF4},
- {0x22CC, 0x5392},
- {0x22CE, 0x0310},
- {0x22D0, 0x3FFB},
- {0x22D2, 0x903B},
- {0x22D4, 0x0009},
- {0x22D6, 0x2818},
- {0x22D8, 0x903B},
- {0x22DA, 0x0010},
- {0x22DC, 0x23A6},
- {0x22DE, 0x403F},
- {0x22E0, 0x0027},
- {0x22E2, 0x1292},
- {0x22E4, 0x8498},
- {0x22E6, 0x421B},
- {0x22E8, 0x87F8},
- {0x22EA, 0x421F},
- {0x22EC, 0x030C},
- {0x22EE, 0x9F0B},
- {0x22F0, 0x2F18},
- {0x22F2, 0x1292},
- {0x22F4, 0x84BA},
- {0x22F6, 0x930F},
- {0x22F8, 0x2004},
- {0x22FA, 0x5392},
- {0x22FC, 0x0312},
- {0x22FE, 0x531B},
- {0x2300, 0x3FF4},
- {0x2302, 0x5392},
- {0x2304, 0x0310},
- {0x2306, 0x3FFB},
- {0x2308, 0x922B},
- {0x230A, 0x238F},
- {0x230C, 0x421B},
- {0x230E, 0x87F8},
- {0x2310, 0x421F},
- {0x2312, 0x030C},
- {0x2314, 0x9F0B},
- {0x2316, 0x2C0B},
- {0x2318, 0x1292},
- {0x231A, 0x84C2},
- {0x231C, 0x934F},
- {0x231E, 0x240A},
- {0x2320, 0x5392},
- {0x2322, 0x0312},
- {0x2324, 0x531B},
- {0x2326, 0x421F},
- {0x2328, 0x030C},
- {0x232A, 0x9F0B},
- {0x232C, 0x2BF5},
- {0x232E, 0x0261},
- {0x2330, 0x0000},
- {0x2332, 0x3EF7},
- {0x2334, 0x5392},
- {0x2336, 0x0310},
- {0x2338, 0x3FF5},
- {0x233A, 0x930B},
- {0x233C, 0x277F},
- {0x233E, 0x931B},
- {0x2340, 0x277A},
- {0x2342, 0x3F73},
- {0x2344, 0x413A},
- {0x2346, 0x413B},
- {0x2348, 0x4130},
- {0x234A, 0x4F0C},
- {0x234C, 0x403F},
- {0x234E, 0x0267},
- {0x2350, 0xF0FF},
- {0x2352, 0xFFDF},
- {0x2354, 0x0000},
- {0x2356, 0xF0FF},
- {0x2358, 0xFFEF},
- {0x235A, 0x0000},
- {0x235C, 0x421D},
- {0x235E, 0x84B0},
- {0x2360, 0x403E},
- {0x2362, 0x06F9},
- {0x2364, 0x4C0F},
- {0x2366, 0x1292},
- {0x2368, 0x84AC},
- {0x236A, 0x4F4E},
- {0x236C, 0xB31E},
- {0x236E, 0x2403},
- {0x2370, 0xD0F2},
- {0x2372, 0x0020},
- {0x2374, 0x0267},
- {0x2376, 0xB32E},
- {0x2378, 0x2403},
- {0x237A, 0xD0F2},
- {0x237C, 0x0010},
- {0x237E, 0x0267},
- {0x2380, 0xC3E2},
- {0x2382, 0x0267},
- {0x2384, 0x4130},
- {0x2386, 0x120B},
- {0x2388, 0x120A},
- {0x238A, 0x403A},
- {0x238C, 0x1140},
- {0x238E, 0x1292},
- {0x2390, 0xD080},
- {0x2392, 0x430B},
- {0x2394, 0x4A0F},
- {0x2396, 0x532A},
- {0x2398, 0x1292},
- {0x239A, 0x84A4},
- {0x239C, 0x4F0E},
- {0x239E, 0x430F},
- {0x23A0, 0x5E82},
- {0x23A2, 0x87FC},
- {0x23A4, 0x6F82},
- {0x23A6, 0x87FE},
- {0x23A8, 0x531B},
- {0x23AA, 0x923B},
- {0x23AC, 0x2BF3},
- {0x23AE, 0x413A},
- {0x23B0, 0x413B},
- {0x23B2, 0x4130},
- {0x23B4, 0xF0F2},
- {0x23B6, 0x007F},
- {0x23B8, 0x0267},
- {0x23BA, 0x421D},
- {0x23BC, 0x84B6},
- {0x23BE, 0x403E},
- {0x23C0, 0x01F9},
- {0x23C2, 0x1292},
- {0x23C4, 0x84AC},
- {0x23C6, 0x4F4E},
- {0x23C8, 0xF35F},
- {0x23CA, 0x2403},
- {0x23CC, 0xD0F2},
- {0x23CE, 0xFF80},
- {0x23D0, 0x0267},
- {0x23D2, 0xB36E},
- {0x23D4, 0x2404},
- {0x23D6, 0xD0F2},
- {0x23D8, 0x0040},
- {0x23DA, 0x0267},
- {0x23DC, 0x3C03},
- {0x23DE, 0xF0F2},
- {0x23E0, 0xFFBF},
- {0x23E2, 0x0267},
- {0x23E4, 0xC2E2},
- {0x23E6, 0x0267},
- {0x23E8, 0x4130},
- {0x23EA, 0x120B},
- {0x23EC, 0x120A},
- {0x23EE, 0x8231},
- {0x23F0, 0x430B},
- {0x23F2, 0x93C2},
- {0x23F4, 0x0C0A},
- {0x23F6, 0x2404},
- {0x23F8, 0xB3D2},
- {0x23FA, 0x0B05},
- {0x23FC, 0x2401},
- {0x23FE, 0x431B},
- {0x2400, 0x422D},
- {0x2402, 0x403E},
- {0x2404, 0x192A},
- {0x2406, 0x403F},
- {0x2408, 0x888E},
- {0x240A, 0x1292},
- {0x240C, 0x843E},
- {0x240E, 0x930B},
- {0x2410, 0x20F4},
- {0x2412, 0x93E2},
- {0x2414, 0x0241},
- {0x2416, 0x24EB},
- {0x2418, 0x403A},
- {0x241A, 0x0292},
- {0x241C, 0x4AA2},
- {0x241E, 0x0A00},
- {0x2420, 0xB2E2},
- {0x2422, 0x0361},
- {0x2424, 0x2405},
- {0x2426, 0x4A2F},
- {0x2428, 0x1292},
- {0x242A, 0x8474},
- {0x242C, 0x4F82},
- {0x242E, 0x0A1C},
- {0x2430, 0x93C2},
- {0x2432, 0x0360},
- {0x2434, 0x34CD},
- {0x2436, 0x430C},
- {0x2438, 0x4C0F},
- {0x243A, 0x5F0F},
- {0x243C, 0x4F0D},
- {0x243E, 0x510D},
- {0x2440, 0x4F0E},
- {0x2442, 0x5A0E},
- {0x2444, 0x4E1E},
- {0x2446, 0x0002},
- {0x2448, 0x4F1F},
- {0x244A, 0x192A},
- {0x244C, 0x1202},
- {0x244E, 0xC232},
- {0x2450, 0x4303},
- {0x2452, 0x4E82},
- {0x2454, 0x0130},
- {0x2456, 0x4F82},
- {0x2458, 0x0138},
- {0x245A, 0x421E},
- {0x245C, 0x013A},
- {0x245E, 0x421F},
- {0x2460, 0x013C},
- {0x2462, 0x4132},
- {0x2464, 0x108E},
- {0x2466, 0x108F},
- {0x2468, 0xEF4E},
- {0x246A, 0xEF0E},
- {0x246C, 0xF37F},
- {0x246E, 0xC312},
- {0x2470, 0x100F},
- {0x2472, 0x100E},
- {0x2474, 0x4E8D},
- {0x2476, 0x0000},
- {0x2478, 0x531C},
- {0x247A, 0x922C},
- {0x247C, 0x2BDD},
- {0x247E, 0xB3D2},
- {0x2480, 0x1921},
- {0x2482, 0x2403},
- {0x2484, 0x410F},
- {0x2486, 0x1292},
- {0x2488, 0x847E},
- {0x248A, 0x403B},
- {0x248C, 0x843E},
- {0x248E, 0x422D},
- {0x2490, 0x410E},
- {0x2492, 0x403F},
- {0x2494, 0x1908},
- {0x2496, 0x12AB},
- {0x2498, 0x403D},
- {0x249A, 0x0005},
- {0x249C, 0x403E},
- {0x249E, 0x0292},
- {0x24A0, 0x403F},
- {0x24A2, 0x86E4},
- {0x24A4, 0x12AB},
- {0x24A6, 0x421F},
- {0x24A8, 0x060E},
- {0x24AA, 0x9F82},
- {0x24AC, 0x8720},
- {0x24AE, 0x288D},
- {0x24B0, 0x9382},
- {0x24B2, 0x060E},
- {0x24B4, 0x248A},
- {0x24B6, 0x90BA},
- {0x24B8, 0x0010},
- {0x24BA, 0x0000},
- {0x24BC, 0x2C0B},
- {0x24BE, 0x93C2},
- {0x24C0, 0x86EE},
- {0x24C2, 0x2008},
- {0x24C4, 0x403F},
- {0x24C6, 0x06A7},
- {0x24C8, 0xD0FF},
- {0x24CA, 0x0007},
- {0x24CC, 0x0000},
- {0x24CE, 0xF0FF},
- {0x24D0, 0xFFF8},
- {0x24D2, 0x0000},
- {0x24D4, 0x4392},
- {0x24D6, 0x8720},
- {0x24D8, 0x403F},
- {0x24DA, 0x06A7},
- {0x24DC, 0xD2EF},
- {0x24DE, 0x0000},
- {0x24E0, 0xC2EF},
- {0x24E2, 0x0000},
- {0x24E4, 0x93C2},
- {0x24E6, 0x87D3},
- {0x24E8, 0x2068},
- {0x24EA, 0xB0F2},
- {0x24EC, 0x0040},
- {0x24EE, 0x0B05},
- {0x24F0, 0x2461},
- {0x24F2, 0xD3D2},
- {0x24F4, 0x0410},
- {0x24F6, 0xB3E2},
- {0x24F8, 0x0381},
- {0x24FA, 0x2089},
- {0x24FC, 0x90B2},
- {0x24FE, 0x0030},
- {0x2500, 0x0A00},
- {0x2502, 0x2C52},
- {0x2504, 0x93C2},
- {0x2506, 0x86EE},
- {0x2508, 0x204F},
- {0x250A, 0x430E},
- {0x250C, 0x430C},
- {0x250E, 0x4C0F},
- {0x2510, 0x5F0F},
- {0x2512, 0x5F0F},
- {0x2514, 0x5F0F},
- {0x2516, 0x4F1F},
- {0x2518, 0x8668},
- {0x251A, 0xF03F},
- {0x251C, 0x07FF},
- {0x251E, 0x903F},
- {0x2520, 0x0400},
- {0x2522, 0x343E},
- {0x2524, 0x5F0E},
- {0x2526, 0x531C},
- {0x2528, 0x923C},
- {0x252A, 0x2BF1},
- {0x252C, 0x4E0F},
- {0x252E, 0x930E},
- {0x2530, 0x3834},
- {0x2532, 0x110F},
- {0x2534, 0x110F},
- {0x2536, 0x110F},
- {0x2538, 0x9382},
- {0x253A, 0x86EE},
- {0x253C, 0x2023},
- {0x253E, 0x5F82},
- {0x2540, 0x87D6},
- {0x2542, 0x403B},
- {0x2544, 0x87D6},
- {0x2546, 0x4B2F},
- {0x2548, 0x12B0},
- {0x254A, 0xB624},
- {0x254C, 0x4F8B},
- {0x254E, 0x0000},
- {0x2550, 0x430C},
- {0x2552, 0x4C0D},
- {0x2554, 0x5D0D},
- {0x2556, 0x5D0D},
- {0x2558, 0x5D0D},
- {0x255A, 0x403A},
- {0x255C, 0x87D8},
- {0x255E, 0x421B},
- {0x2560, 0x87D6},
- {0x2562, 0x4B0F},
- {0x2564, 0x8A2F},
- {0x2566, 0x4F0E},
- {0x2568, 0x4E0F},
- {0x256A, 0x5F0F},
- {0x256C, 0x7F0F},
- {0x256E, 0xE33F},
- {0x2570, 0x8E8D},
- {0x2572, 0x8668},
- {0x2574, 0x7F8D},
- {0x2576, 0x866A},
- {0x2578, 0x531C},
- {0x257A, 0x923C},
- {0x257C, 0x2BEA},
- {0x257E, 0x4B8A},
- {0x2580, 0x0000},
- {0x2582, 0x3C45},
- {0x2584, 0x9382},
- {0x2586, 0x86F0},
- {0x2588, 0x2005},
- {0x258A, 0x4382},
- {0x258C, 0x87D6},
- {0x258E, 0x4382},
- {0x2590, 0x87D8},
- {0x2592, 0x3FD7},
- {0x2594, 0x4F82},
- {0x2596, 0x87D6},
- {0x2598, 0x3FD4},
- {0x259A, 0x503F},
- {0x259C, 0x0007},
- {0x259E, 0x3FC9},
- {0x25A0, 0x5F0E},
- {0x25A2, 0x503E},
- {0x25A4, 0xF800},
- {0x25A6, 0x3FBF},
- {0x25A8, 0x430F},
- {0x25AA, 0x12B0},
- {0x25AC, 0xB624},
- {0x25AE, 0x4382},
- {0x25B0, 0x87D6},
- {0x25B2, 0x3C2D},
- {0x25B4, 0xC3D2},
- {0x25B6, 0x0410},
- {0x25B8, 0x3F9E},
- {0x25BA, 0x430D},
- {0x25BC, 0x403E},
- {0x25BE, 0x0050},
- {0x25C0, 0x403F},
- {0x25C2, 0x85C8},
- {0x25C4, 0x1292},
- {0x25C6, 0x844E},
- {0x25C8, 0x3F90},
- {0x25CA, 0x5392},
- {0x25CC, 0x8720},
- {0x25CE, 0x3F84},
- {0x25D0, 0x403B},
- {0x25D2, 0x843E},
- {0x25D4, 0x4A0F},
- {0x25D6, 0x532F},
- {0x25D8, 0x422D},
- {0x25DA, 0x4F0E},
- {0x25DC, 0x403F},
- {0x25DE, 0x0E08},
- {0x25E0, 0x12AB},
- {0x25E2, 0x422D},
- {0x25E4, 0x403E},
- {0x25E6, 0x192A},
- {0x25E8, 0x410F},
- {0x25EA, 0x12AB},
- {0x25EC, 0x3F48},
- {0x25EE, 0x93C2},
- {0x25F0, 0x86EE},
- {0x25F2, 0x2312},
- {0x25F4, 0x403A},
- {0x25F6, 0x86E4},
- {0x25F8, 0x3F11},
- {0x25FA, 0x403D},
- {0x25FC, 0x0200},
- {0x25FE, 0x422E},
- {0x2600, 0x403F},
- {0x2602, 0x192A},
- {0x2604, 0x1292},
- {0x2606, 0x844E},
- {0x2608, 0xC3D2},
- {0x260A, 0x1921},
- {0x260C, 0x3F02},
- {0x260E, 0x422D},
- {0x2610, 0x403E},
- {0x2612, 0x888E},
- {0x2614, 0x403F},
- {0x2616, 0x192A},
- {0x2618, 0x1292},
- {0x261A, 0x843E},
- {0x261C, 0x5231},
- {0x261E, 0x413A},
- {0x2620, 0x413B},
- {0x2622, 0x4130},
- {0x2624, 0x4382},
- {0x2626, 0x052C},
- {0x2628, 0x4F0D},
- {0x262A, 0x930D},
- {0x262C, 0x3402},
- {0x262E, 0xE33D},
- {0x2630, 0x531D},
- {0x2632, 0xF03D},
- {0x2634, 0x07F0},
- {0x2636, 0x4D0E},
- {0x2638, 0xC312},
- {0x263A, 0x100E},
- {0x263C, 0x110E},
- {0x263E, 0x110E},
- {0x2640, 0x110E},
- {0x2642, 0x930F},
- {0x2644, 0x3803},
- {0x2646, 0x4EC2},
- {0x2648, 0x052C},
- {0x264A, 0x3C04},
- {0x264C, 0x4EC2},
- {0x264E, 0x052D},
- {0x2650, 0xE33D},
- {0x2652, 0x531D},
- {0x2654, 0x4D0F},
- {0x2656, 0x4130},
- {0x2658, 0x1292},
- {0x265A, 0xD048},
- {0x265C, 0x93C2},
- {0x265E, 0x86EE},
- {0x2660, 0x200D},
- {0x2662, 0xB0F2},
- {0x2664, 0x0020},
- {0x2666, 0x0381},
- {0x2668, 0x2407},
- {0x266A, 0x9292},
- {0x266C, 0x8722},
- {0x266E, 0x0384},
- {0x2670, 0x2C03},
- {0x2672, 0xD3D2},
- {0x2674, 0x0649},
- {0x2676, 0x4130},
- {0x2678, 0xC3D2},
- {0x267A, 0x0649},
- {0x267C, 0x4130},
- {0x267E, 0x120B},
- {0x2680, 0x120A},
- {0x2682, 0x1209},
- {0x2684, 0x1208},
- {0x2686, 0x1207},
- {0x2688, 0x1206},
- {0x268A, 0x1205},
- {0x268C, 0x1204},
- {0x268E, 0x8231},
- {0x2690, 0x4F81},
- {0x2692, 0x0000},
- {0x2694, 0x4381},
- {0x2696, 0x0002},
- {0x2698, 0x4304},
- {0x269A, 0x411C},
- {0x269C, 0x0002},
- {0x269E, 0x5C0C},
- {0x26A0, 0x4C0F},
- {0x26A2, 0x5F0F},
- {0x26A4, 0x5F0F},
- {0x26A6, 0x5F0F},
- {0x26A8, 0x5F0F},
- {0x26AA, 0x5F0F},
- {0x26AC, 0x503F},
- {0x26AE, 0x1980},
- {0x26B0, 0x440D},
- {0x26B2, 0x5D0D},
- {0x26B4, 0x4D0E},
- {0x26B6, 0x5F0E},
- {0x26B8, 0x4E2E},
- {0x26BA, 0x4D05},
- {0x26BC, 0x5505},
- {0x26BE, 0x5F05},
- {0x26C0, 0x4516},
- {0x26C2, 0x0008},
- {0x26C4, 0x4517},
- {0x26C6, 0x000A},
- {0x26C8, 0x460A},
- {0x26CA, 0x470B},
- {0x26CC, 0xF30A},
- {0x26CE, 0xF32B},
- {0x26D0, 0x4A81},
- {0x26D2, 0x0004},
- {0x26D4, 0x4B81},
- {0x26D6, 0x0006},
- {0x26D8, 0xB03E},
- {0x26DA, 0x2000},
- {0x26DC, 0x2404},
- {0x26DE, 0xF03E},
- {0x26E0, 0x1FFF},
- {0x26E2, 0xE33E},
- {0x26E4, 0x531E},
- {0x26E6, 0xF317},
- {0x26E8, 0x503E},
- {0x26EA, 0x2000},
- {0x26EC, 0x4E0F},
- {0x26EE, 0x5F0F},
- {0x26F0, 0x7F0F},
- {0x26F2, 0xE33F},
- {0x26F4, 0x512C},
- {0x26F6, 0x4C28},
- {0x26F8, 0x4309},
- {0x26FA, 0x4E0A},
- {0x26FC, 0x4F0B},
- {0x26FE, 0x480C},
- {0x2700, 0x490D},
- {0x2702, 0x1202},
- {0x2704, 0xC232},
- {0x2706, 0x12B0},
- {0x2708, 0xFFC0},
- {0x270A, 0x4132},
- {0x270C, 0x108E},
- {0x270E, 0x108F},
- {0x2710, 0xEF4E},
- {0x2712, 0xEF0E},
- {0x2714, 0xF37F},
- {0x2716, 0xC312},
- {0x2718, 0x100F},
- {0x271A, 0x100E},
- {0x271C, 0x4E85},
- {0x271E, 0x0018},
- {0x2720, 0x4F85},
- {0x2722, 0x001A},
- {0x2724, 0x480A},
- {0x2726, 0x490B},
- {0x2728, 0x460C},
- {0x272A, 0x470D},
- {0x272C, 0x1202},
- {0x272E, 0xC232},
- {0x2730, 0x12B0},
- {0x2732, 0xFFC0},
- {0x2734, 0x4132},
- {0x2736, 0x4E0C},
- {0x2738, 0x4F0D},
- {0x273A, 0x108C},
- {0x273C, 0x108D},
- {0x273E, 0xED4C},
- {0x2740, 0xED0C},
- {0x2742, 0xF37D},
- {0x2744, 0xC312},
- {0x2746, 0x100D},
- {0x2748, 0x100C},
- {0x274A, 0x411E},
- {0x274C, 0x0004},
- {0x274E, 0x411F},
- {0x2750, 0x0006},
- {0x2752, 0x5E0E},
- {0x2754, 0x6F0F},
- {0x2756, 0x5E0E},
- {0x2758, 0x6F0F},
- {0x275A, 0x5E0E},
- {0x275C, 0x6F0F},
- {0x275E, 0xDE0C},
- {0x2760, 0xDF0D},
- {0x2762, 0x4C85},
- {0x2764, 0x002C},
- {0x2766, 0x4D85},
- {0x2768, 0x002E},
- {0x276A, 0x5314},
- {0x276C, 0x9224},
- {0x276E, 0x2B95},
- {0x2770, 0x5391},
- {0x2772, 0x0002},
- {0x2774, 0x92A1},
- {0x2776, 0x0002},
- {0x2778, 0x2B8F},
- {0x277A, 0x5231},
- {0x277C, 0x4134},
- {0x277E, 0x4135},
- {0x2780, 0x4136},
- {0x2782, 0x4137},
- {0x2784, 0x4138},
- {0x2786, 0x4139},
- {0x2788, 0x413A},
- {0x278A, 0x413B},
- {0x278C, 0x4130},
- {0x278E, 0x120B},
- {0x2790, 0x120A},
- {0x2792, 0x1209},
- {0x2794, 0x8031},
- {0x2796, 0x000C},
- {0x2798, 0x425F},
- {0x279A, 0x0205},
- {0x279C, 0xC312},
- {0x279E, 0x104F},
- {0x27A0, 0x114F},
- {0x27A2, 0x114F},
- {0x27A4, 0x114F},
- {0x27A6, 0x114F},
- {0x27A8, 0x114F},
- {0x27AA, 0xF37F},
- {0x27AC, 0x4F0B},
- {0x27AE, 0xF31B},
- {0x27B0, 0x5B0B},
- {0x27B2, 0x5B0B},
- {0x27B4, 0x5B0B},
- {0x27B6, 0x503B},
- {0x27B8, 0xD194},
- {0x27BA, 0x4219},
- {0x27BC, 0x0508},
- {0x27BE, 0xF039},
- {0x27C0, 0x2000},
- {0x27C2, 0x4F0A},
- {0x27C4, 0xC312},
- {0x27C6, 0x100A},
- {0x27C8, 0xE31A},
- {0x27CA, 0x421F},
- {0x27CC, 0x87DE},
- {0x27CE, 0x503F},
- {0x27D0, 0xFF60},
- {0x27D2, 0x903F},
- {0x27D4, 0x00C8},
- {0x27D6, 0x2C02},
- {0x27D8, 0x403F},
- {0x27DA, 0x00C8},
- {0x27DC, 0x4F82},
- {0x27DE, 0x7322},
- {0x27E0, 0xB3D2},
- {0x27E2, 0x0381},
- {0x27E4, 0x2009},
- {0x27E6, 0x421F},
- {0x27E8, 0x86F0},
- {0x27EA, 0xD21F},
- {0x27EC, 0x86EE},
- {0x27EE, 0x930F},
- {0x27F0, 0x24B9},
- {0x27F2, 0x40F2},
- {0x27F4, 0xFF80},
- {0x27F6, 0x0619},
- {0x27F8, 0x1292},
- {0x27FA, 0xD00A},
- {0x27FC, 0xB3D2},
- {0x27FE, 0x0385},
- {0x2800, 0x2405},
- {0x2802, 0x421F},
- {0x2804, 0x880A},
- {0x2806, 0x4F92},
- {0x2808, 0x0002},
- {0x280A, 0x8714},
- {0x280C, 0x430D},
- {0x280E, 0x93C2},
- {0x2810, 0x87D0},
- {0x2812, 0x2003},
- {0x2814, 0xB2F2},
- {0x2816, 0x0360},
- {0x2818, 0x2001},
- {0x281A, 0x431D},
- {0x281C, 0x425F},
- {0x281E, 0x87D3},
- {0x2820, 0xD25F},
- {0x2822, 0x87D2},
- {0x2824, 0xF37F},
- {0x2826, 0x5F0F},
- {0x2828, 0x425E},
- {0x282A, 0x87CD},
- {0x282C, 0xDE0F},
- {0x282E, 0x5F0F},
- {0x2830, 0x5B0F},
- {0x2832, 0x4FA2},
- {0x2834, 0x0402},
- {0x2836, 0x930D},
- {0x2838, 0x2007},
- {0x283A, 0x930A},
- {0x283C, 0x248E},
- {0x283E, 0x4F5F},
- {0x2840, 0x0001},
- {0x2842, 0xF37F},
- {0x2844, 0x4FC2},
- {0x2846, 0x0403},
- {0x2848, 0x93C2},
- {0x284A, 0x87CD},
- {0x284C, 0x2483},
- {0x284E, 0xC2F2},
- {0x2850, 0x0400},
- {0x2852, 0xB2E2},
- {0x2854, 0x0265},
- {0x2856, 0x2407},
- {0x2858, 0x421F},
- {0x285A, 0x0508},
- {0x285C, 0xF03F},
- {0x285E, 0xFFDF},
- {0x2860, 0xD90F},
- {0x2862, 0x4F82},
- {0x2864, 0x0508},
- {0x2866, 0xB3D2},
- {0x2868, 0x0383},
- {0x286A, 0x2484},
- {0x286C, 0x403F},
- {0x286E, 0x0508},
- {0x2870, 0x4FB1},
- {0x2872, 0x0000},
- {0x2874, 0x4FB1},
- {0x2876, 0x0002},
- {0x2878, 0x4FB1},
- {0x287A, 0x0004},
- {0x287C, 0x403F},
- {0x287E, 0x0500},
- {0x2880, 0x4FB1},
- {0x2882, 0x0006},
- {0x2884, 0x4FB1},
- {0x2886, 0x0008},
- {0x2888, 0x4FB1},
- {0x288A, 0x000A},
- {0x288C, 0xB3E2},
- {0x288E, 0x0383},
- {0x2890, 0x2412},
- {0x2892, 0xC2E1},
- {0x2894, 0x0002},
- {0x2896, 0xB2E2},
- {0x2898, 0x0383},
- {0x289A, 0x434F},
- {0x289C, 0x634F},
- {0x289E, 0xF37F},
- {0x28A0, 0x4F4E},
- {0x28A2, 0x114E},
- {0x28A4, 0x434E},
- {0x28A6, 0x104E},
- {0x28A8, 0x415F},
- {0x28AA, 0x0007},
- {0x28AC, 0xF07F},
- {0x28AE, 0x007F},
- {0x28B0, 0xDE4F},
- {0x28B2, 0x4FC1},
- {0x28B4, 0x0007},
- {0x28B6, 0xB2F2},
- {0x28B8, 0x0383},
- {0x28BA, 0x2415},
- {0x28BC, 0xF0F1},
- {0x28BE, 0xFFBF},
- {0x28C0, 0x0000},
- {0x28C2, 0xB0F2},
- {0x28C4, 0x0010},
- {0x28C6, 0x0383},
- {0x28C8, 0x434E},
- {0x28CA, 0x634E},
- {0x28CC, 0x5E4E},
- {0x28CE, 0x5E4E},
- {0x28D0, 0x5E4E},
- {0x28D2, 0x5E4E},
- {0x28D4, 0x5E4E},
- {0x28D6, 0x5E4E},
- {0x28D8, 0x415F},
- {0x28DA, 0x0006},
- {0x28DC, 0xF07F},
- {0x28DE, 0xFFBF},
- {0x28E0, 0xDE4F},
- {0x28E2, 0x4FC1},
- {0x28E4, 0x0006},
- {0x28E6, 0xB0F2},
- {0x28E8, 0x0020},
- {0x28EA, 0x0383},
- {0x28EC, 0x2410},
- {0x28EE, 0xF0F1},
- {0x28F0, 0xFFDF},
- {0x28F2, 0x0002},
- {0x28F4, 0xB0F2},
- {0x28F6, 0x0040},
- {0x28F8, 0x0383},
- {0x28FA, 0x434E},
- {0x28FC, 0x634E},
- {0x28FE, 0x5E4E},
- {0x2900, 0x5E4E},
- {0x2902, 0x415F},
- {0x2904, 0x0008},
- {0x2906, 0xC26F},
- {0x2908, 0xDE4F},
- {0x290A, 0x4FC1},
- {0x290C, 0x0008},
- {0x290E, 0x93C2},
- {0x2910, 0x0383},
- {0x2912, 0x3412},
- {0x2914, 0xF0F1},
- {0x2916, 0xFFDF},
- {0x2918, 0x0000},
- {0x291A, 0x425E},
- {0x291C, 0x0382},
- {0x291E, 0xF35E},
- {0x2920, 0x5E4E},
- {0x2922, 0x5E4E},
- {0x2924, 0x5E4E},
- {0x2926, 0x5E4E},
- {0x2928, 0x5E4E},
- {0x292A, 0x415F},
- {0x292C, 0x0006},
- {0x292E, 0xF07F},
- {0x2930, 0xFFDF},
- {0x2932, 0xDE4F},
- {0x2934, 0x4FC1},
- {0x2936, 0x0006},
- {0x2938, 0x410F},
- {0x293A, 0x4FB2},
- {0x293C, 0x0508},
- {0x293E, 0x4FB2},
- {0x2940, 0x050A},
- {0x2942, 0x4FB2},
- {0x2944, 0x050C},
- {0x2946, 0x4FB2},
- {0x2948, 0x0500},
- {0x294A, 0x4FB2},
- {0x294C, 0x0502},
- {0x294E, 0x4FB2},
- {0x2950, 0x0504},
- {0x2952, 0x3C10},
- {0x2954, 0xD2F2},
- {0x2956, 0x0400},
- {0x2958, 0x3F7C},
- {0x295A, 0x4F6F},
- {0x295C, 0xF37F},
- {0x295E, 0x4FC2},
- {0x2960, 0x0402},
- {0x2962, 0x3F72},
- {0x2964, 0x90F2},
- {0x2966, 0x0011},
- {0x2968, 0x0619},
- {0x296A, 0x2B46},
- {0x296C, 0x50F2},
- {0x296E, 0xFFF0},
- {0x2970, 0x0619},
- {0x2972, 0x3F42},
- {0x2974, 0x5031},
- {0x2976, 0x000C},
- {0x2978, 0x4139},
- {0x297A, 0x413A},
- {0x297C, 0x413B},
- {0x297E, 0x4130},
- {0x2980, 0x0900},
- {0x2982, 0x7312},
- {0x2984, 0x421F},
- {0x2986, 0x0A08},
- {0x2988, 0xF03F},
- {0x298A, 0xF7FF},
- {0x298C, 0x4F82},
- {0x298E, 0x0A88},
- {0x2990, 0x0900},
- {0x2992, 0x7312},
- {0x2994, 0x421F},
- {0x2996, 0x0A0E},
- {0x2998, 0xF03F},
- {0x299A, 0x7FFF},
- {0x299C, 0x4F82},
- {0x299E, 0x0A8E},
- {0x29A0, 0x0900},
- {0x29A2, 0x7312},
- {0x29A4, 0x421F},
- {0x29A6, 0x0A1E},
- {0x29A8, 0xC31F},
- {0x29AA, 0x4F82},
- {0x29AC, 0x0A9E},
- {0x29AE, 0x4130},
- {0x29B0, 0x4292},
- {0x29B2, 0x0A08},
- {0x29B4, 0x0A88},
- {0x29B6, 0x0900},
- {0x29B8, 0x7312},
- {0x29BA, 0x4292},
- {0x29BC, 0x0A0E},
- {0x29BE, 0x0A8E},
- {0x29C0, 0x0900},
- {0x29C2, 0x7312},
- {0x29C4, 0x4292},
- {0x29C6, 0x0A1E},
- {0x29C8, 0x0A9E},
- {0x29CA, 0x4130},
- {0x29CC, 0x7400},
- {0x29CE, 0x8058},
- {0x29D0, 0x1807},
- {0x29D2, 0x00E0},
- {0x29D4, 0x7002},
- {0x29D6, 0x17C7},
- {0x29D8, 0x0045},
- {0x29DA, 0x0006},
- {0x29DC, 0x17CC},
- {0x29DE, 0x0015},
- {0x29E0, 0x1512},
- {0x29E2, 0x216F},
- {0x29E4, 0x005B},
- {0x29E6, 0x005D},
- {0x29E8, 0x00DE},
- {0x29EA, 0x00DD},
- {0x29EC, 0x5023},
- {0x29EE, 0x00DE},
- {0x29F0, 0x005B},
- {0x29F2, 0x0410},
- {0x29F4, 0x0091},
- {0x29F6, 0x0015},
- {0x29F8, 0x0040},
- {0x29FA, 0x7023},
- {0x29FC, 0x1653},
- {0x29FE, 0x0156},
- {0x2A00, 0x0001},
- {0x2A02, 0x2081},
- {0x2A04, 0x7020},
- {0x2A06, 0x2F99},
- {0x2A08, 0x005C},
- {0x2A0A, 0x0000},
- {0x2A0C, 0x5040},
- {0x2A0E, 0x0045},
- {0x2A10, 0x213A},
- {0x2A12, 0x0303},
- {0x2A14, 0x0148},
- {0x2A16, 0x0049},
- {0x2A18, 0x0045},
- {0x2A1A, 0x0046},
- {0x2A1C, 0x05DD},
- {0x2A1E, 0x00DE},
- {0x2A20, 0x00DD},
- {0x2A22, 0x00DC},
- {0x2A24, 0x00DE},
- {0x2A26, 0x04D6},
- {0x2A28, 0x2014},
- {0x2A2A, 0x2081},
- {0x2A2C, 0x7087},
- {0x2A2E, 0x2F99},
- {0x2A30, 0x005C},
- {0x2A32, 0x0002},
- {0x2A34, 0x5060},
- {0x2A36, 0x31C0},
- {0x2A38, 0x2122},
- {0x2A3A, 0x7800},
- {0x2A3C, 0xC08C},
- {0x2A3E, 0x0001},
- {0x2A40, 0x9038},
- {0x2A42, 0x59F7},
- {0x2A44, 0x907A},
- {0x2A46, 0x03D8},
- {0x2A48, 0x8D90},
- {0x2A4A, 0x01C0},
- {0x2A4C, 0x7400},
- {0x2A4E, 0x8058},
- {0x2A50, 0x1807},
- {0x2A52, 0x00E0},
- {0x2A54, 0x7002},
- {0x2A56, 0x17C7},
- {0x2A58, 0x0045},
- {0x2A5A, 0x0006},
- {0x2A5C, 0x17CC},
- {0x2A5E, 0x0015},
- {0x2A60, 0x1512},
- {0x2A62, 0x216F},
- {0x2A64, 0x005B},
- {0x2A66, 0x005D},
- {0x2A68, 0x00DE},
- {0x2A6A, 0x00DD},
- {0x2A6C, 0x5023},
- {0x2A6E, 0x00DE},
- {0x2A70, 0x005B},
- {0x2A72, 0x0410},
- {0x2A74, 0x0091},
- {0x2A76, 0x0015},
- {0x2A78, 0x0040},
- {0x2A7A, 0x7023},
- {0x2A7C, 0x1653},
- {0x2A7E, 0x0156},
- {0x2A80, 0x0001},
- {0x2A82, 0x2081},
- {0x2A84, 0x7020},
- {0x2A86, 0x2F99},
- {0x2A88, 0x005C},
- {0x2A8A, 0x0000},
- {0x2A8C, 0x5040},
- {0x2A8E, 0x0045},
- {0x2A90, 0x213A},
- {0x2A92, 0x0303},
- {0x2A94, 0x0148},
- {0x2A96, 0x0049},
- {0x2A98, 0x0045},
- {0x2A9A, 0x0046},
- {0x2A9C, 0x05DD},
- {0x2A9E, 0x00DE},
- {0x2AA0, 0x00DD},
- {0x2AA2, 0x00DC},
- {0x2AA4, 0x00DE},
- {0x2AA6, 0x0296},
- {0x2AA8, 0x2014},
- {0x2AAA, 0x2081},
- {0x2AAC, 0x7087},
- {0x2AAE, 0x2F99},
- {0x2AB0, 0x005C},
- {0x2AB2, 0x0002},
- {0x2AB4, 0x5060},
- {0x2AB6, 0x31C0},
- {0x2AB8, 0x2122},
- {0x2ABA, 0x7800},
- {0x2ABC, 0xC08C},
- {0x2ABE, 0x0001},
- {0x2AC0, 0x9038},
- {0x2AC2, 0x59F7},
- {0x2AC4, 0x907A},
- {0x2AC6, 0x03D8},
- {0x2AC8, 0x8D90},
- {0x2ACA, 0x01C0},
- {0x2ACC, 0x7400},
- {0x2ACE, 0x2002},
- {0x2AD0, 0x70DF},
- {0x2AD2, 0x2F21},
- {0x2AD4, 0x04C1},
- {0x2AD6, 0x0D80},
- {0x2AD8, 0x7800},
- {0x2ADA, 0x0041},
- {0x2ADC, 0x7400},
- {0x2ADE, 0x2004},
- {0x2AE0, 0x70DF},
- {0x2AE2, 0x2F21},
- {0x2AE4, 0x04C2},
- {0x2AE6, 0x0D80},
- {0x2AE8, 0x7800},
- {0x2AEA, 0x7400},
- {0x2AEC, 0x2008},
- {0x2AEE, 0x70DF},
- {0x2AF0, 0x2F21},
- {0x2AF2, 0x04C3},
- {0x2AF4, 0x0D80},
- {0x2AF6, 0x7800},
- {0x2AF8, 0x7400},
- {0x2AFA, 0x0004},
- {0x2AFC, 0x70DF},
- {0x2AFE, 0x2F22},
- {0x2B00, 0x7008},
- {0x2B02, 0x2F1F},
- {0x2B04, 0x7021},
- {0x2B06, 0x2F01},
- {0x2B08, 0x7800},
- {0x2B0A, 0x7400},
- {0x2B0C, 0x0002},
- {0x2B0E, 0x70DF},
- {0x2B10, 0x3F5F},
- {0x2B12, 0x703A},
- {0x2B14, 0x2F01},
- {0x2B16, 0x7800},
- {0x2B18, 0x7400},
- {0x2B1A, 0x2010},
- {0x2B1C, 0x70DF},
- {0x2B1E, 0x3F40},
- {0x2B20, 0x700A},
- {0x2B22, 0x0FC0},
- {0x2B24, 0x7800},
- {0x2B26, 0x7400},
- {0x2B28, 0x2004},
- {0x2B2A, 0x70DF},
- {0x2B2C, 0x2F21},
- {0x2B2E, 0x04C2},
- {0x2B30, 0x0D80},
- {0x2B32, 0x7800},
- {0x2B34, 0x0041},
- {0x2B36, 0x7400},
- {0x2B38, 0x2002},
- {0x2B3A, 0x70DF},
- {0x2B3C, 0x2F22},
- {0x2B3E, 0x04C1},
- {0x2B40, 0x0D80},
- {0x2B42, 0x7800},
- {0x2B44, 0x7400},
- {0x2B46, 0x0001},
- {0x2B48, 0x70DF},
- {0x2B4A, 0x3F5F},
- {0x2B4C, 0x703A},
- {0x2B4E, 0x2F01},
- {0x2B50, 0x7800},
- {0x2B52, 0x7400},
- {0x2B54, 0x200A},
- {0x2B56, 0x70DF},
- {0x2B58, 0x3F40},
- {0x2B5A, 0x700A},
- {0x2B5C, 0x0FC0},
- {0x2B5E, 0x7800},
- {0x2B60, 0x7400},
- {0x2B62, 0x2015},
- {0x2B64, 0x70DF},
- {0x2B66, 0x3F5F},
- {0x2B68, 0x703A},
- {0x2B6A, 0x2F01},
- {0x2B6C, 0x7800},
- {0x2B6E, 0x7400},
- {0x2B70, 0x7800},
- {0x2B72, 0x007F},
- {0x2B74, 0x0000},
- {0x2B76, 0xB9CC},
- {0x2B78, 0x0000},
- {0x2B7A, 0xB9CC},
- {0x2B7C, 0xBA3C},
- {0x2B7E, 0x0002},
- {0x2B80, 0x0000},
- {0x2B82, 0xBA4C},
- {0x2B84, 0x0000},
- {0x2B86, 0xBA4C},
- {0x2B88, 0xBABC},
- {0x2B8A, 0x0002},
- {0x2B8C, 0x0063},
- {0x2B8E, 0xBB26},
- {0x2B90, 0x0063},
- {0x2B92, 0xBB36},
- {0x2B94, 0x0063},
- {0x2B96, 0xBAEA},
- {0x2B98, 0x0063},
- {0x2B9A, 0xBAF8},
- {0x2B9C, 0xBADA},
- {0x2B9E, 0x0004},
- {0x2BA0, 0x0063},
- {0x2BA2, 0xBAEA},
- {0x2BA4, 0x0063},
- {0x2BA6, 0xBB18},
- {0x2BA8, 0x0063},
- {0x2BAA, 0xBB26},
- {0x2BAC, 0x0063},
- {0x2BAE, 0xBB44},
- {0x2BB0, 0xBADA},
- {0x2BB2, 0x0004},
- {0x2BB4, 0x0063},
- {0x2BB6, 0xBACC},
- {0x2BB8, 0x0063},
- {0x2BBA, 0xBADC},
- {0x2BBC, 0x0063},
- {0x2BBE, 0xBAEA},
- {0x2BC0, 0x0063},
- {0x2BC2, 0xBAF8},
- {0x2BC4, 0xBADA},
- {0x2BC6, 0x0004},
- {0x2BC8, 0x0063},
- {0x2BCA, 0xBAEA},
- {0x2BCC, 0x0063},
- {0x2BCE, 0xBB18},
- {0x2BD0, 0x0063},
- {0x2BD2, 0xBACC},
- {0x2BD4, 0x0063},
- {0x2BD6, 0xBB0A},
- {0x2BD8, 0xBADA},
- {0x2BDA, 0x0004},
- {0x2BDC, 0x0063},
- {0x2BDE, 0xBACC},
- {0x2BE0, 0x0063},
- {0x2BE2, 0xBADC},
- {0x2BE4, 0x0063},
- {0x2BE6, 0xBAEA},
- {0x2BE8, 0x0063},
- {0x2BEA, 0xBB18},
- {0x2BEC, 0xBADA},
- {0x2BEE, 0x0004},
- {0x2BF0, 0xFFFF},
- {0x2BF2, 0xBB6E},
- {0x2BF4, 0x0000},
- {0x2BF6, 0x0000},
- {0x2BF8, 0x0000},
- {0x2BFA, 0x0000},
- {0x2BFC, 0x0000},
- {0x2BFE, 0x0000},
- {0x2C00, 0xBB72},
- {0x2C02, 0x0001},
- {0x2C04, 0x0063},
- {0x2C06, 0xBB52},
- {0x2C08, 0x0063},
- {0x2C0A, 0xBB60},
- {0x2C0C, 0x0000},
- {0x2C0E, 0x0000},
- {0x2C10, 0x0000},
- {0x2C12, 0x0000},
- {0x2C14, 0xBADA},
- {0x2C16, 0x0002},
- {0x2C18, 0x0066},
- {0x2C1A, 0x0067},
- {0x2C1C, 0x00AF},
- {0x2C1E, 0x01CF},
- {0x2C20, 0x0087},
- {0x2C22, 0x0083},
- {0x2C24, 0x011B},
- {0x2C26, 0x035A},
- {0x2C28, 0x00FA},
- {0x2C2A, 0x00F2},
- {0x2C2C, 0x00A6},
- {0x2C2E, 0x00A4},
- {0x2C30, 0xFFFF},
- {0x2C32, 0x002C},
- {0x2C34, 0x0058},
- {0x2C36, 0x0000},
- {0x2C38, 0x0000},
- {0x2C3A, 0xBC18},
- {0x2C3C, 0xBB74},
- {0x2C3E, 0xBB80},
- {0x2C40, 0xBC32},
- {0x2C42, 0xBB8C},
- {0x2C44, 0xBBA0},
- {0x2C46, 0xBB8C},
- {0x2C48, 0xBBA0},
- {0x2C4A, 0xBC04},
- {0x2C4C, 0xBC04},
- {0x2C4E, 0xBBF0},
- {0x2C50, 0xBBF0},
- {0x2C52, 0xBBB4},
- {0x2C54, 0xBBC8},
- {0x2C56, 0xBBB4},
- {0x2C58, 0xBBC8},
- {0x2C5A, 0xBC04},
- {0x2C5C, 0xBC04},
- {0x2C5E, 0xBBF0},
- {0x2C60, 0xBBF0},
- {0x2C62, 0xBB8C},
- {0x2C64, 0xBBA0},
- {0x2C66, 0xBB8C},
- {0x2C68, 0xBBA0},
- {0x2C6A, 0xBC04},
- {0x2C6C, 0xBC04},
- {0x2C6E, 0xBBF0},
- {0x2C70, 0xBBF0},
- {0x2C72, 0xBBB4},
- {0x2C74, 0xBBC8},
- {0x2C76, 0xBBB4},
- {0x2C78, 0xBBC8},
- {0x2C7A, 0xBC04},
- {0x2C7C, 0xBC04},
- {0x2C7E, 0xBBF0},
- {0x2C80, 0xBBF0},
- {0x3800, 0x880E},
- {0x3802, 0xBC62},
- {0x3804, 0xBC40},
- {0x3806, 0xD13E},
- {0x3808, 0xBC42},
- {0x380A, 0xBC3C},
- {0x380C, 0x0000},
- {0x380E, 0x0040},
- {0x3810, 0x0040},
- {0x3812, 0x0040},
- {0x3814, 0x0043},
- {0x3816, 0x0046},
- {0x3818, 0x004B},
- {0x381A, 0x004D},
- {0x381C, 0x0051},
- {0x381E, 0x0055},
- {0x3820, 0x005A},
- {0x3822, 0x005E},
- {0x3824, 0x0062},
- {0x3826, 0x0067},
- {0x3828, 0x006C},
- {0x382A, 0x0070},
- {0x382C, 0x0078},
- {0x382E, 0x0086},
- {0x3830, 0x0090},
- {0x3832, 0x0096},
- {0x3834, 0x009D},
- {0x3836, 0x00A5},
- {0x3838, 0x00AD},
- {0x383A, 0x00B4},
- {0x383C, 0x00B9},
- {0x383E, 0x00BE},
- {0x3840, 0x00C3},
- {0x3842, 0x00C8},
- {0x3844, 0x00CD},
- {0x3846, 0x00D2},
- {0x3848, 0x00D7},
- {0x384A, 0x00DC},
- {0x384C, 0x00DC},
- {0x384E, 0x0000},
- {0x3850, 0x0000},
- {0x3852, 0x0000},
- {0x3854, 0x0000},
- {0x3856, 0x0000},
- {0x3858, 0x0000},
- {0x385A, 0x0000},
- {0x385C, 0x0000},
- {0x385E, 0x0000},
- {0x3860, 0x0000},
- {0x3862, 0x0000},
- {0x3864, 0x0000},
- {0x3866, 0x0000},
- {0x3868, 0x0000},
- {0x386A, 0x0000},
- {0x386C, 0x0000},
- {0x386E, 0x0000},
- {0x3870, 0x0000},
- {0x3872, 0x0000},
- {0x3874, 0x0000},
- {0x3876, 0x0000},
- {0x3878, 0x0000},
- {0x387A, 0x0000},
- {0x387C, 0x0000},
- {0x387E, 0x0000},
- {0x3880, 0x0000},
- {0x3882, 0x0000},
- {0x3884, 0x0000},
- {0x3886, 0x0000},
- {0x3888, 0x0000},
- {0x388A, 0x0000},
- {0x388C, 0x0000},
- {0x026A, 0xFFFF},
- {0x026C, 0x00FF},
- {0x026E, 0x0000},
- {0x0360, 0x1E8E},
- {0x040E, 0x01EB},
- {0x0600, 0x1130},
- {0x0602, 0x3112},
- {0x0604, 0x8048},
- {0x0606, 0x00E9},
- {0x067A, 0x0404},
- {0x067C, 0x0404},
- {0x06A8, 0x0240},
- {0x06AA, 0x00CA},
- {0x06AC, 0x0041},
- {0x06B4, 0x3FFF},
- {0x06DE, 0x0404},
- {0x06E0, 0x0404},
- {0x06E2, 0xFF00},
- {0x06E4, 0x8333},
- {0x06E6, 0x8333},
- {0x06E8, 0x8333},
- {0x06EA, 0x8333},
- {0x052A, 0x0000},
- {0x052C, 0x0000},
- {0x0F06, 0x0002},
- {0x0A04, 0xB4C5},
- {0x0A06, 0xC400},
- {0x0A08, 0x988A},
- {0x0A0A, 0xA387},
- {0x0A0E, 0xEEC0},
- {0x0A12, 0x0000},
- {0x0A18, 0x0010},
- {0x0A1C, 0x0040},
- {0x0A20, 0x0015},
- {0x0C00, 0x0021},
- {0x0C16, 0x0002},
- {0x0708, 0x6FC0},
- {0x070C, 0x0000},
- {0x120C, 0x1428},
- {0x121A, 0x0000},
- {0x121C, 0x1896},
- {0x121E, 0x0032},
- {0x1220, 0x0000},
- {0x1222, 0x96FF},
- {0x1244, 0x0000},
- {0x105C, 0x0F0B},
- {0x1958, 0x0000},
- {0x195A, 0x004C},
- {0x195C, 0x0097},
- {0x195E, 0x0221},
- {0x1960, 0x03FE},
- {0x1980, 0x00E0},
- {0x1982, 0x0010},
- {0x1984, 0x2018},
- {0x1986, 0x0008},
- {0x1988, 0x0000},
- {0x198A, 0x0000},
- {0x198C, 0x0880},
- {0x198E, 0x0000},
- {0x1990, 0x1A00},
- {0x1992, 0x0000},
- {0x1994, 0x2800},
- {0x1996, 0x0002},
- {0x1962, 0x0000},
- {0x1964, 0x004C},
- {0x1966, 0x0097},
- {0x1968, 0x0221},
- {0x196A, 0x03FE},
- {0x19C0, 0x00E0},
- {0x19C2, 0x0010},
- {0x19C4, 0x2018},
- {0x19C6, 0x0008},
- {0x19C8, 0x0000},
- {0x19CA, 0x0000},
- {0x19CC, 0x0880},
- {0x19CE, 0x0000},
- {0x19D0, 0x1A00},
- {0x19D2, 0x0000},
- {0x19D4, 0x2800},
- {0x19D6, 0x0002},
- {0x196C, 0x0000},
- {0x196E, 0x004C},
- {0x1970, 0x0097},
- {0x1972, 0x0221},
- {0x1974, 0x03FE},
- {0x1A00, 0x00E0},
- {0x1A02, 0x0010},
- {0x1A04, 0x2018},
- {0x1A06, 0x0008},
- {0x1A08, 0x0000},
- {0x1A0A, 0x0000},
- {0x1A0C, 0x0880},
- {0x1A0E, 0x0000},
- {0x1A10, 0x1A00},
- {0x1A12, 0x0000},
- {0x1A14, 0x2800},
- {0x1A16, 0x0002},
- {0x1976, 0x0000},
- {0x1978, 0x004C},
- {0x197A, 0x0097},
- {0x197C, 0x0221},
- {0x197E, 0x03FE},
- {0x1A40, 0x00E0},
- {0x1A42, 0x0010},
- {0x1A44, 0x2018},
- {0x1A46, 0x0008},
- {0x1A48, 0x0000},
- {0x1A4A, 0x0000},
- {0x1A4C, 0x0880},
- {0x1A4E, 0x0000},
- {0x1A50, 0x1A00},
- {0x1A52, 0x0000},
- {0x1A54, 0x2800},
- {0x1A56, 0x0002},
- {0x192A, 0x0201},
- {0x0384, 0x0001},
- {0x027E, 0x0100},
- };
- static const struct hi847_reg mode_3264x2448_regs[] = {
- {0x0B00, 0x0000},
- {0x0204, 0x0000},
- {0x0206, 0x033C},
- {0x020A, 0x0B4D},
- {0x020E, 0x0B51},
- {0x0214, 0x0200},
- {0x0216, 0x0200},
- {0x0218, 0x0200},
- {0x021A, 0x0200},
- {0x0224, 0x002E},
- {0x022A, 0x0017},
- {0x022C, 0x0E1F},
- {0x022E, 0x09C1},
- {0x0234, 0x1111},
- {0x0236, 0x1111},
- {0x0238, 0x1111},
- {0x023A, 0x1111},
- {0x0250, 0x0000},
- {0x0252, 0x0006},
- {0x0254, 0x0000},
- {0x0256, 0x0000},
- {0x0258, 0x0000},
- {0x025A, 0x0000},
- {0x025C, 0x0000},
- {0x025E, 0x0202},
- {0x0268, 0x00CD},
- {0x0440, 0x0002},
- {0x0F00, 0x0000},
- {0x0F04, 0x0008},
- {0x0F06, 0x0002},
- {0x0B02, 0x0100},
- {0x0B04, 0x00DC},
- {0x0B12, 0x0CC0},
- {0x0B14, 0x0990},
- {0x0B20, 0x0100},
- {0x1100, 0x1100},
- {0x1102, 0x0008},
- {0x1108, 0x0202},
- {0x1118, 0x0000},
- {0x0A10, 0xB040},
- {0x0C14, 0x0008},
- {0x0C18, 0x0CC0},
- {0x0C1A, 0x0990},
- {0x0730, 0x0001},
- {0x0732, 0x0000},
- {0x0734, 0x0300},
- {0x0736, 0x004B},
- {0x0738, 0x0001},
- {0x073C, 0x0900},
- {0x0740, 0x0000},
- {0x0742, 0x0000},
- {0x0744, 0x0300},
- {0x0746, 0x007D},
- {0x0748, 0x0002},
- {0x074A, 0x0900},
- {0x074C, 0x0000},
- {0x074E, 0x0100},
- {0x0750, 0x0000},
- {0x1200, 0x0946},
- {0x1202, 0x1A00},
- {0x120E, 0x6027},
- {0x1210, 0x8027},
- {0x1246, 0x0105},
- {0x1000, 0x0300},
- {0x1002, 0xC311},
- {0x1004, 0x2BB0},
- {0x1010, 0x087B},
- {0x1012, 0x0040},
- {0x1014, 0x0020},
- {0x1016, 0x0020},
- {0x101A, 0x0020},
- {0x1020, 0xC107},
- {0x1022, 0x081E},
- {0x1024, 0x0509},
- {0x1026, 0x0B0A},
- {0x1028, 0x1409},
- {0x102A, 0x0B05},
- {0x102C, 0x1400},
- {0x1038, 0x0000},
- {0x103E, 0x0001},
- {0x1040, 0x0000},
- {0x1042, 0x0008},
- {0x1044, 0x0120},
- {0x1046, 0x01B0},
- {0x1048, 0x0090},
- {0x1066, 0x089C},
- {0x1600, 0x0000},
- {0x1608, 0x0028},
- {0x160A, 0x0C80},
- {0x160C, 0x001A},
- {0x160E, 0x0960},
- {0x0252, 0x0009},
- {0x0202, 0x0000},
- };
- static const struct hi847_reg mode_1632x1224_regs[] = {
- {0x0B00, 0x0000},
- {0x0204, 0x0200},
- {0x0206, 0x033C},
- {0x020A, 0x05A5},
- {0x020E, 0x05A9},
- {0x0214, 0x0200},
- {0x0216, 0x0200},
- {0x0218, 0x0200},
- {0x021A, 0x0200},
- {0x0224, 0x002C},
- {0x022A, 0x0015},
- {0x022C, 0x0E2D},
- {0x022E, 0x09C1},
- {0x0234, 0x3311},
- {0x0236, 0x3311},
- {0x0238, 0x3311},
- {0x023A, 0x2222},
- {0x0250, 0x0000},
- {0x0252, 0x0006},
- {0x0254, 0x0000},
- {0x0256, 0x0000},
- {0x0258, 0x0000},
- {0x025A, 0x0000},
- {0x025C, 0x0000},
- {0x025E, 0x0202},
- {0x0268, 0x00CD},
- {0x0440, 0x0002},
- {0x0F00, 0x0400},
- {0x0F04, 0x0004},
- {0x0F06, 0x0002},
- {0x0B02, 0x0100},
- {0x0B04, 0x00FC},
- {0x0B12, 0x0660},
- {0x0B14, 0x04C8},
- {0x0B20, 0x0200},
- {0x1100, 0x1100},
- {0x1102, 0x0008},
- {0x1108, 0x0402},
- {0x1118, 0x0000},
- {0x0A10, 0xB060},
- {0x0C14, 0x0008},
- {0x0C18, 0x0CC0},
- {0x0C1A, 0x04C8},
- {0x0730, 0x0001},
- {0x0732, 0x0000},
- {0x0734, 0x0300},
- {0x0736, 0x004B},
- {0x0738, 0x0001},
- {0x073C, 0x0900},
- {0x0740, 0x0000},
- {0x0742, 0x0000},
- {0x0744, 0x0300},
- {0x0746, 0x007D},
- {0x0748, 0x0002},
- {0x074A, 0x0900},
- {0x074C, 0x0100},
- {0x074E, 0x0100},
- {0x0750, 0x0000},
- {0x1200, 0x0946},
- {0x1202, 0x1A00},
- {0x120E, 0x6027},
- {0x1210, 0x8027},
- {0x1246, 0x0105},
- {0x1000, 0x0300},
- {0x1002, 0xC311},
- {0x1004, 0x2BB0},
- {0x1010, 0x042B},
- {0x1012, 0x0012},
- {0x1014, 0x0020},
- {0x1016, 0x0020},
- {0x101A, 0x0020},
- {0x1020, 0xC103},
- {0x1022, 0x040F},
- {0x1024, 0x0304},
- {0x1026, 0x0607},
- {0x1028, 0x0D06},
- {0x102A, 0x0605},
- {0x102C, 0x0C00},
- {0x1038, 0x0000},
- {0x103E, 0x0101},
- {0x1040, 0x0000},
- {0x1042, 0x0008},
- {0x1044, 0x0120},
- {0x1046, 0x01B0},
- {0x1048, 0x0090},
- {0x1066, 0x043B},
- {0x1600, 0x0400},
- {0x1608, 0x0028},
- {0x160A, 0x0C80},
- {0x160C, 0x001A},
- {0x160E, 0x0960},
- {0x0252, 0x0009},
- {0x0202, 0x0000},
- };
- static const char * const hi847_test_pattern_menu[] = {
- "No Pattern",
- "Solid Colour",
- "100% Colour Bars",
- "Fade To Grey Colour Bars",
- "PN9",
- "Horizontal Gradient Pattern",
- "Vertical Gradient Pattern",
- "Check Board",
- "Slant Pattern",
- };
- static const s64 link_freq_menu_items[] = {
- HI847_LINK_FREQ_400MHZ,
- HI847_LINK_FREQ_200MHZ,
- };
- static const struct hi847_link_freq_config link_freq_configs[] = {
- [HI847_LINK_FREQ_400MHZ_INDEX] = {
- .reg_list = {
- .num_of_regs = ARRAY_SIZE(mipi_data_rate_lane_4),
- .regs = mipi_data_rate_lane_4,
- }
- },
- [HI847_LINK_FREQ_200MHZ_INDEX] = {
- .reg_list = {
- .num_of_regs = ARRAY_SIZE(mipi_data_rate_lane_4),
- .regs = mipi_data_rate_lane_4,
- }
- }
- };
- static const struct hi847_mode supported_modes[] = {
- {
- .width = 3264,
- .height = 2448,
- .fll_def = HI847_FLL_30FPS,
- .fll_min = HI847_FLL_30FPS_MIN,
- .llp = 0x033C,
- .reg_list = {
- .num_of_regs = ARRAY_SIZE(mode_3264x2448_regs),
- .regs = mode_3264x2448_regs,
- },
- .link_freq_index = HI847_LINK_FREQ_400MHZ_INDEX,
- },
- {
- .width = 1632,
- .height = 1224,
- .fll_def = HI847_FLL_60FPS,
- .fll_min = HI847_FLL_60FPS_MIN,
- .llp = 0x033C,
- .reg_list = {
- .num_of_regs = ARRAY_SIZE(mode_1632x1224_regs),
- .regs = mode_1632x1224_regs,
- },
- .link_freq_index = HI847_LINK_FREQ_200MHZ_INDEX,
- }
- };
- struct hi847 {
- struct v4l2_subdev sd;
- struct media_pad pad;
- struct v4l2_ctrl_handler ctrl_handler;
- /* V4L2 Controls */
- struct v4l2_ctrl *link_freq;
- struct v4l2_ctrl *pixel_rate;
- struct v4l2_ctrl *vblank;
- struct v4l2_ctrl *hblank;
- struct v4l2_ctrl *exposure;
- struct v4l2_ctrl *vflip;
- struct v4l2_ctrl *hflip;
- /* Current mode */
- const struct hi847_mode *cur_mode;
- /* To serialize asynchronus callbacks */
- struct mutex mutex;
- /* Streaming on/off */
- bool streaming;
- };
- static u64 to_pixel_rate(u32 f_index)
- {
- u64 pixel_rate = link_freq_menu_items[f_index] * 2 * HI847_DATA_LANES;
- do_div(pixel_rate, HI847_RGB_DEPTH);
- return pixel_rate;
- }
- static int hi847_read_reg(struct hi847 *hi847, u16 reg, u16 len, u32 *val)
- {
- struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
- struct i2c_msg msgs[2];
- u8 addr_buf[2];
- u8 data_buf[4] = {0};
- int ret;
- if (len > 4)
- return -EINVAL;
- put_unaligned_be16(reg, addr_buf);
- msgs[0].addr = client->addr;
- msgs[0].flags = 0;
- msgs[0].len = sizeof(addr_buf);
- msgs[0].buf = addr_buf;
- msgs[1].addr = client->addr;
- msgs[1].flags = I2C_M_RD;
- msgs[1].len = len;
- msgs[1].buf = &data_buf[4 - len];
- ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
- if (ret != ARRAY_SIZE(msgs))
- return -EIO;
- *val = get_unaligned_be32(data_buf);
- return 0;
- }
- static int hi847_write_reg(struct hi847 *hi847, u16 reg, u16 len, u32 val)
- {
- struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
- u8 buf[6];
- if (len > 4)
- return -EINVAL;
- put_unaligned_be16(reg, buf);
- put_unaligned_be32(val << 8 * (4 - len), buf + 2);
- if (i2c_master_send(client, buf, len + 2) != len + 2)
- return -EIO;
- return 0;
- }
- static int hi847_write_reg_list(struct hi847 *hi847,
- const struct hi847_reg_list *r_list)
- {
- struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
- unsigned int i;
- int ret;
- for (i = 0; i < r_list->num_of_regs; i++) {
- ret = hi847_write_reg(hi847, r_list->regs[i].address,
- HI847_REG_VALUE_16BIT,
- r_list->regs[i].val);
- if (ret) {
- dev_err_ratelimited(&client->dev,
- "failed to write reg 0x%4.4x. error = %d",
- r_list->regs[i].address, ret);
- return ret;
- }
- }
- return 0;
- }
- static int hi847_update_digital_gain(struct hi847 *hi847, u32 d_gain)
- {
- int ret;
- ret = hi847_write_reg(hi847, HI847_REG_MWB_GR_GAIN,
- HI847_REG_VALUE_16BIT, d_gain);
- if (ret)
- return ret;
- ret = hi847_write_reg(hi847, HI847_REG_MWB_GB_GAIN,
- HI847_REG_VALUE_16BIT, d_gain);
- if (ret)
- return ret;
- ret = hi847_write_reg(hi847, HI847_REG_MWB_R_GAIN,
- HI847_REG_VALUE_16BIT, d_gain);
- if (ret)
- return ret;
- return hi847_write_reg(hi847, HI847_REG_MWB_B_GAIN,
- HI847_REG_VALUE_16BIT, d_gain);
- }
- static int hi847_test_pattern(struct hi847 *hi847, u32 pattern)
- {
- int ret;
- u32 val;
- if (pattern) {
- ret = hi847_read_reg(hi847, HI847_REG_ISP,
- HI847_REG_VALUE_16BIT, &val);
- if (ret)
- return ret;
- ret = hi847_write_reg(hi847, HI847_REG_ISP,
- HI847_REG_VALUE_16BIT,
- val | HI847_REG_ISP_TPG_EN);
- if (ret)
- return ret;
- }
- ret = hi847_read_reg(hi847, HI847_REG_TEST_PATTERN,
- HI847_REG_VALUE_16BIT, &val);
- if (ret)
- return ret;
- return hi847_write_reg(hi847, HI847_REG_TEST_PATTERN,
- HI847_REG_VALUE_16BIT, val | pattern << 8);
- }
- static int hi847_grbg_shift(struct hi847 *hi847)
- {
- int ret;
- int hflip, vflip;
- /* regs shift for full size */
- static const u32 FORMAT_X_SHIFT_1[2][2] = {
- { 0x0008, 0x0007, },
- { 0x0008, 0x0007, },
- };
- static const u32 FORMAT_Y_SHIFT_1[2][2] = {
- { 0x0002, 0x0002, },
- { 0x0001, 0x0001, },
- };
- /* regs shift for binning size */
- static const u32 FORMAT_X_SHIFT_2[2][2] = {
- { 0x0004, 0x0003, },
- { 0x0004, 0x0003, },
- };
- static const u32 FORMAT_Y_SHIFT_2[2][2] = {
- { 0x0002, 0x0002, },
- { 0x0001, 0x0001, },
- };
- hflip = hi847->hflip->val;
- vflip = hi847->vflip->val;
- if (hi847->cur_mode->width == 3264) {
- ret = hi847_write_reg(hi847, HI847_REG_FORMAT_X,
- HI847_REG_VALUE_16BIT,
- FORMAT_X_SHIFT_1[vflip][hflip]);
- if (ret)
- return ret;
- return hi847_write_reg(hi847, HI847_REG_FORMAT_Y,
- HI847_REG_VALUE_16BIT,
- FORMAT_Y_SHIFT_1[vflip][hflip]);
- } else {
- ret = hi847_write_reg(hi847, HI847_REG_FORMAT_X,
- HI847_REG_VALUE_16BIT,
- FORMAT_X_SHIFT_2[vflip][hflip]);
- if (ret)
- return ret;
- return hi847_write_reg(hi847, HI847_REG_FORMAT_Y,
- HI847_REG_VALUE_16BIT,
- FORMAT_Y_SHIFT_2[vflip][hflip]);
- }
- }
- static int hi847_set_ctrl_hflip(struct hi847 *hi847, u32 ctrl_val)
- {
- int ret;
- u32 val;
- ret = hi847_read_reg(hi847, HI847_REG_MIRROR_FLIP,
- HI847_REG_VALUE_16BIT, &val);
- if (ret)
- return ret;
- ret = hi847_grbg_shift(hi847);
- if (ret)
- return ret;
- return hi847_write_reg(hi847, HI847_REG_MIRROR_FLIP,
- HI847_REG_VALUE_16BIT,
- ctrl_val ? val | BIT(8) : val & ~BIT(8));
- }
- static int hi847_set_ctrl_vflip(struct hi847 *hi847, u8 ctrl_val)
- {
- int ret;
- u32 val;
- ret = hi847_read_reg(hi847, HI847_REG_MIRROR_FLIP,
- HI847_REG_VALUE_16BIT, &val);
- if (ret)
- return ret;
- ret = hi847_grbg_shift(hi847);
- if (ret)
- return ret;
- return hi847_write_reg(hi847, HI847_REG_MIRROR_FLIP,
- HI847_REG_VALUE_16BIT,
- ctrl_val ? val | BIT(9) : val & ~BIT(9));
- }
- static int hi847_set_ctrl(struct v4l2_ctrl *ctrl)
- {
- struct hi847 *hi847 = container_of(ctrl->handler,
- struct hi847, ctrl_handler);
- struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
- s64 exposure_max;
- int ret = 0;
- /* Propagate change of current control to all related controls */
- if (ctrl->id == V4L2_CID_VBLANK) {
- /* Update max exposure while meeting expected vblanking */
- exposure_max = hi847->cur_mode->height + ctrl->val -
- HI847_EXPOSURE_MAX_MARGIN;
- __v4l2_ctrl_modify_range(hi847->exposure,
- hi847->exposure->minimum,
- exposure_max, hi847->exposure->step,
- exposure_max);
- }
- /* V4L2 controls values will be applied only when power is already up */
- if (!pm_runtime_get_if_in_use(&client->dev))
- return 0;
- switch (ctrl->id) {
- case V4L2_CID_ANALOGUE_GAIN:
- ret = hi847_write_reg(hi847, HI847_REG_ANALOG_GAIN,
- HI847_REG_VALUE_16BIT, ctrl->val);
- break;
- case V4L2_CID_DIGITAL_GAIN:
- ret = hi847_update_digital_gain(hi847, ctrl->val);
- break;
- case V4L2_CID_EXPOSURE:
- ret = hi847_write_reg(hi847, HI847_REG_EXPOSURE,
- HI847_REG_VALUE_16BIT, ctrl->val);
- break;
- case V4L2_CID_VBLANK:
- /* Update FLL that meets expected vertical blanking */
- ret = hi847_write_reg(hi847, HI847_REG_FLL,
- HI847_REG_VALUE_16BIT,
- hi847->cur_mode->height + ctrl->val);
- break;
- case V4L2_CID_TEST_PATTERN:
- ret = hi847_test_pattern(hi847, ctrl->val);
- break;
- case V4L2_CID_HFLIP:
- hi847_set_ctrl_hflip(hi847, ctrl->val);
- break;
- case V4L2_CID_VFLIP:
- hi847_set_ctrl_vflip(hi847, ctrl->val);
- break;
- default:
- ret = -EINVAL;
- break;
- }
- pm_runtime_put(&client->dev);
- return ret;
- }
- static const struct v4l2_ctrl_ops hi847_ctrl_ops = {
- .s_ctrl = hi847_set_ctrl,
- };
- static int hi847_init_controls(struct hi847 *hi847)
- {
- struct v4l2_ctrl_handler *ctrl_hdlr;
- s64 exposure_max, h_blank;
- int ret;
- ctrl_hdlr = &hi847->ctrl_handler;
- ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
- if (ret)
- return ret;
- ctrl_hdlr->lock = &hi847->mutex;
- hi847->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_LINK_FREQ,
- ARRAY_SIZE(link_freq_menu_items) - 1,
- 0, link_freq_menu_items);
- if (hi847->link_freq)
- hi847->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
- hi847->pixel_rate = v4l2_ctrl_new_std
- (ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_PIXEL_RATE, 0,
- to_pixel_rate(HI847_LINK_FREQ_400MHZ_INDEX),
- 1,
- to_pixel_rate(HI847_LINK_FREQ_400MHZ_INDEX));
- hi847->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_VBLANK,
- hi847->cur_mode->fll_min -
- hi847->cur_mode->height,
- HI847_FLL_MAX -
- hi847->cur_mode->height, 1,
- hi847->cur_mode->fll_def -
- hi847->cur_mode->height);
- h_blank = hi847->cur_mode->llp - hi847->cur_mode->width;
- hi847->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_HBLANK, h_blank, h_blank, 1,
- h_blank);
- if (hi847->hblank)
- hi847->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
- v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
- HI847_ANAL_GAIN_MIN, HI847_ANAL_GAIN_MAX,
- HI847_ANAL_GAIN_STEP, HI847_ANAL_GAIN_MIN);
- v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops, V4L2_CID_DIGITAL_GAIN,
- HI847_DGTL_GAIN_MIN, HI847_DGTL_GAIN_MAX,
- HI847_DGTL_GAIN_STEP, HI847_DGTL_GAIN_DEFAULT);
- exposure_max = hi847->cur_mode->fll_def - HI847_EXPOSURE_MAX_MARGIN;
- hi847->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_EXPOSURE,
- HI847_EXPOSURE_MIN, exposure_max,
- HI847_EXPOSURE_STEP,
- exposure_max);
- v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_TEST_PATTERN,
- ARRAY_SIZE(hi847_test_pattern_menu) - 1,
- 0, 0, hi847_test_pattern_menu);
- hi847->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_HFLIP, 0, 1, 1, 0);
- hi847->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &hi847_ctrl_ops,
- V4L2_CID_VFLIP, 0, 1, 1, 0);
- if (ctrl_hdlr->error)
- return ctrl_hdlr->error;
- hi847->sd.ctrl_handler = ctrl_hdlr;
- return 0;
- }
- static void hi847_assign_pad_format(const struct hi847_mode *mode,
- struct v4l2_mbus_framefmt *fmt)
- {
- fmt->width = mode->width;
- fmt->height = mode->height;
- fmt->code = MEDIA_BUS_FMT_SGRBG10_1X10;
- fmt->field = V4L2_FIELD_NONE;
- }
- static int hi847_start_streaming(struct hi847 *hi847)
- {
- struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
- const struct hi847_reg_list *reg_list;
- int link_freq_index, ret;
- link_freq_index = hi847->cur_mode->link_freq_index;
- reg_list = &link_freq_configs[link_freq_index].reg_list;
- ret = hi847_write_reg_list(hi847, reg_list);
- if (ret) {
- dev_err(&client->dev, "failed to set plls");
- return ret;
- }
- reg_list = &hi847->cur_mode->reg_list;
- ret = hi847_write_reg_list(hi847, reg_list);
- if (ret) {
- dev_err(&client->dev, "failed to set mode");
- return ret;
- }
- ret = __v4l2_ctrl_handler_setup(hi847->sd.ctrl_handler);
- if (ret)
- return ret;
- ret = hi847_write_reg(hi847, HI847_REG_MODE_TG,
- HI847_REG_VALUE_16BIT, HI847_REG_MODE_TG_ENABLE);
- ret = hi847_write_reg(hi847, HI847_REG_MODE_SELECT,
- HI847_REG_VALUE_16BIT, HI847_MODE_STREAMING);
- if (ret) {
- dev_err(&client->dev, "failed to set stream");
- return ret;
- }
- return 0;
- }
- static void hi847_stop_streaming(struct hi847 *hi847)
- {
- struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
- if (hi847_write_reg(hi847, HI847_REG_MODE_TG,
- HI847_REG_VALUE_16BIT, HI847_REG_MODE_TG_DISABLE))
- dev_err(&client->dev, "failed to set stream 0x%x",
- HI847_REG_MODE_TG);
- if (hi847_write_reg(hi847, HI847_REG_MODE_SELECT,
- HI847_REG_VALUE_16BIT, HI847_MODE_STANDBY))
- dev_err(&client->dev, "failed to set stream 0x%x",
- HI847_REG_MODE_SELECT);
- }
- static int hi847_set_stream(struct v4l2_subdev *sd, int enable)
- {
- struct hi847 *hi847 = to_hi847(sd);
- struct i2c_client *client = v4l2_get_subdevdata(sd);
- int ret = 0;
- if (hi847->streaming == enable)
- return 0;
- mutex_lock(&hi847->mutex);
- if (enable) {
- ret = pm_runtime_get_sync(&client->dev);
- if (ret < 0) {
- pm_runtime_put_noidle(&client->dev);
- mutex_unlock(&hi847->mutex);
- return ret;
- }
- ret = hi847_start_streaming(hi847);
- if (ret) {
- enable = 0;
- hi847_stop_streaming(hi847);
- pm_runtime_put(&client->dev);
- }
- } else {
- hi847_stop_streaming(hi847);
- pm_runtime_put(&client->dev);
- }
- hi847->streaming = enable;
- mutex_unlock(&hi847->mutex);
- return ret;
- }
- static int __maybe_unused hi847_suspend(struct device *dev)
- {
- struct i2c_client *client = to_i2c_client(dev);
- struct v4l2_subdev *sd = i2c_get_clientdata(client);
- struct hi847 *hi847 = to_hi847(sd);
- mutex_lock(&hi847->mutex);
- if (hi847->streaming)
- hi847_stop_streaming(hi847);
- mutex_unlock(&hi847->mutex);
- return 0;
- }
- static int __maybe_unused hi847_resume(struct device *dev)
- {
- struct i2c_client *client = to_i2c_client(dev);
- struct v4l2_subdev *sd = i2c_get_clientdata(client);
- struct hi847 *hi847 = to_hi847(sd);
- int ret;
- mutex_lock(&hi847->mutex);
- if (hi847->streaming) {
- ret = hi847_start_streaming(hi847);
- if (ret)
- goto error;
- }
- mutex_unlock(&hi847->mutex);
- return 0;
- error:
- hi847_stop_streaming(hi847);
- hi847->streaming = 0;
- mutex_unlock(&hi847->mutex);
- return ret;
- }
- static int hi847_set_format(struct v4l2_subdev *sd,
- struct v4l2_subdev_state *sd_state,
- struct v4l2_subdev_format *fmt)
- {
- struct hi847 *hi847 = to_hi847(sd);
- const struct hi847_mode *mode;
- s32 vblank_def, h_blank;
- mode = v4l2_find_nearest_size(supported_modes,
- ARRAY_SIZE(supported_modes), width,
- height, fmt->format.width,
- fmt->format.height);
- mutex_lock(&hi847->mutex);
- hi847_assign_pad_format(mode, &fmt->format);
- if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
- *v4l2_subdev_get_try_format(sd, sd_state, fmt->pad) =
- fmt->format;
- } else {
- hi847->cur_mode = mode;
- __v4l2_ctrl_s_ctrl(hi847->link_freq, mode->link_freq_index);
- __v4l2_ctrl_s_ctrl_int64(hi847->pixel_rate,
- to_pixel_rate(mode->link_freq_index));
- /* Update limits and set FPS to default */
- vblank_def = mode->fll_def - mode->height;
- __v4l2_ctrl_modify_range(hi847->vblank,
- mode->fll_min - mode->height,
- HI847_FLL_MAX - mode->height, 1,
- vblank_def);
- __v4l2_ctrl_s_ctrl(hi847->vblank, vblank_def);
- h_blank = hi847->cur_mode->llp - hi847->cur_mode->width;
- __v4l2_ctrl_modify_range(hi847->hblank, h_blank, h_blank, 1,
- h_blank);
- }
- mutex_unlock(&hi847->mutex);
- return 0;
- }
- static int hi847_get_format(struct v4l2_subdev *sd,
- struct v4l2_subdev_state *sd_state,
- struct v4l2_subdev_format *fmt)
- {
- struct hi847 *hi847 = to_hi847(sd);
- mutex_lock(&hi847->mutex);
- if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
- fmt->format = *v4l2_subdev_get_try_format(&hi847->sd,
- sd_state,
- fmt->pad);
- else
- hi847_assign_pad_format(hi847->cur_mode, &fmt->format);
- mutex_unlock(&hi847->mutex);
- return 0;
- }
- static int hi847_enum_mbus_code(struct v4l2_subdev *sd,
- struct v4l2_subdev_state *sd_state,
- struct v4l2_subdev_mbus_code_enum *code)
- {
- if (code->index > 0)
- return -EINVAL;
- code->code = MEDIA_BUS_FMT_SGRBG10_1X10;
- return 0;
- }
- static int hi847_enum_frame_size(struct v4l2_subdev *sd,
- struct v4l2_subdev_state *sd_state,
- struct v4l2_subdev_frame_size_enum *fse)
- {
- if (fse->index >= ARRAY_SIZE(supported_modes))
- return -EINVAL;
- if (fse->code != MEDIA_BUS_FMT_SGRBG10_1X10)
- return -EINVAL;
- fse->min_width = supported_modes[fse->index].width;
- fse->max_width = fse->min_width;
- fse->min_height = supported_modes[fse->index].height;
- fse->max_height = fse->min_height;
- return 0;
- }
- static int hi847_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
- {
- struct hi847 *hi847 = to_hi847(sd);
- mutex_lock(&hi847->mutex);
- hi847_assign_pad_format(&supported_modes[0],
- v4l2_subdev_get_try_format(sd, fh->state, 0));
- mutex_unlock(&hi847->mutex);
- return 0;
- }
- static const struct v4l2_subdev_video_ops hi847_video_ops = {
- .s_stream = hi847_set_stream,
- };
- static const struct v4l2_subdev_pad_ops hi847_pad_ops = {
- .set_fmt = hi847_set_format,
- .get_fmt = hi847_get_format,
- .enum_mbus_code = hi847_enum_mbus_code,
- .enum_frame_size = hi847_enum_frame_size,
- };
- static const struct v4l2_subdev_ops hi847_subdev_ops = {
- .video = &hi847_video_ops,
- .pad = &hi847_pad_ops,
- };
- static const struct media_entity_operations hi847_subdev_entity_ops = {
- .link_validate = v4l2_subdev_link_validate,
- };
- static const struct v4l2_subdev_internal_ops hi847_internal_ops = {
- .open = hi847_open,
- };
- static int hi847_identify_module(struct hi847 *hi847)
- {
- struct i2c_client *client = v4l2_get_subdevdata(&hi847->sd);
- int ret;
- u32 val;
- ret = hi847_read_reg(hi847, HI847_REG_CHIP_ID,
- HI847_REG_VALUE_16BIT, &val);
- if (ret)
- return ret;
- if (val != HI847_CHIP_ID) {
- dev_err(&client->dev, "chip id mismatch: %x!=%x",
- HI847_CHIP_ID, val);
- return -ENXIO;
- }
- return 0;
- }
- static int hi847_check_hwcfg(struct device *dev)
- {
- struct fwnode_handle *ep;
- struct fwnode_handle *fwnode = dev_fwnode(dev);
- struct v4l2_fwnode_endpoint bus_cfg = {
- .bus_type = V4L2_MBUS_CSI2_DPHY
- };
- u32 mclk;
- int ret;
- unsigned int i, j;
- if (!fwnode)
- return -ENXIO;
- ret = fwnode_property_read_u32(fwnode, "clock-frequency", &mclk);
- if (ret) {
- dev_err(dev, "can't get clock frequency");
- return ret;
- }
- if (mclk != HI847_MCLK) {
- dev_err(dev, "external clock %d is not supported", mclk);
- return -EINVAL;
- }
- ep = fwnode_graph_get_next_endpoint(fwnode, NULL);
- if (!ep)
- return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
- fwnode_handle_put(ep);
- if (ret)
- return ret;
- if (bus_cfg.bus.mipi_csi2.num_data_lanes != HI847_DATA_LANES) {
- dev_err(dev, "number of CSI2 data lanes %d is not supported",
- bus_cfg.bus.mipi_csi2.num_data_lanes);
- ret = -EINVAL;
- goto check_hwcfg_error;
- }
- if (!bus_cfg.nr_of_link_frequencies) {
- dev_err(dev, "no link frequencies defined");
- ret = -EINVAL;
- goto check_hwcfg_error;
- }
- for (i = 0; i < ARRAY_SIZE(link_freq_menu_items); i++) {
- for (j = 0; j < bus_cfg.nr_of_link_frequencies; j++) {
- if (link_freq_menu_items[i] ==
- bus_cfg.link_frequencies[j])
- break;
- }
- if (j == bus_cfg.nr_of_link_frequencies) {
- dev_err(dev, "no link frequency %lld supported",
- link_freq_menu_items[i]);
- ret = -EINVAL;
- goto check_hwcfg_error;
- }
- }
- check_hwcfg_error:
- v4l2_fwnode_endpoint_free(&bus_cfg);
- return ret;
- }
- static void hi847_remove(struct i2c_client *client)
- {
- struct v4l2_subdev *sd = i2c_get_clientdata(client);
- struct hi847 *hi847 = to_hi847(sd);
- v4l2_async_unregister_subdev(sd);
- media_entity_cleanup(&sd->entity);
- v4l2_ctrl_handler_free(sd->ctrl_handler);
- pm_runtime_disable(&client->dev);
- mutex_destroy(&hi847->mutex);
- }
- static int hi847_probe(struct i2c_client *client)
- {
- struct hi847 *hi847;
- int ret;
- hi847 = devm_kzalloc(&client->dev, sizeof(*hi847), GFP_KERNEL);
- if (!hi847)
- return -ENOMEM;
- ret = hi847_check_hwcfg(&client->dev);
- if (ret) {
- dev_err(&client->dev, "failed to get HW configuration: %d",
- ret);
- return ret;
- }
- v4l2_i2c_subdev_init(&hi847->sd, client, &hi847_subdev_ops);
- ret = hi847_identify_module(hi847);
- if (ret) {
- dev_err(&client->dev, "failed to find sensor: %d", ret);
- return ret;
- }
- mutex_init(&hi847->mutex);
- hi847->cur_mode = &supported_modes[0];
- ret = hi847_init_controls(hi847);
- if (ret) {
- dev_err(&client->dev, "failed to init controls: %d", ret);
- goto probe_error_v4l2_ctrl_handler_free;
- }
- hi847->sd.internal_ops = &hi847_internal_ops;
- hi847->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
- hi847->sd.entity.ops = &hi847_subdev_entity_ops;
- hi847->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
- hi847->pad.flags = MEDIA_PAD_FL_SOURCE;
- ret = media_entity_pads_init(&hi847->sd.entity, 1, &hi847->pad);
- if (ret) {
- dev_err(&client->dev, "failed to init entity pads: %d", ret);
- goto probe_error_v4l2_ctrl_handler_free;
- }
- ret = v4l2_async_register_subdev_sensor(&hi847->sd);
- if (ret < 0) {
- dev_err(&client->dev, "failed to register V4L2 subdev: %d",
- ret);
- goto probe_error_media_entity_cleanup;
- }
- pm_runtime_set_active(&client->dev);
- pm_runtime_enable(&client->dev);
- pm_runtime_idle(&client->dev);
- return 0;
- probe_error_media_entity_cleanup:
- media_entity_cleanup(&hi847->sd.entity);
- probe_error_v4l2_ctrl_handler_free:
- v4l2_ctrl_handler_free(hi847->sd.ctrl_handler);
- mutex_destroy(&hi847->mutex);
- return ret;
- }
- static const struct dev_pm_ops hi847_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(hi847_suspend, hi847_resume)
- };
- #ifdef CONFIG_ACPI
- static const struct acpi_device_id hi847_acpi_ids[] = {
- {"HYV0847"},
- {}
- };
- MODULE_DEVICE_TABLE(acpi, hi847_acpi_ids);
- #endif
- static struct i2c_driver hi847_i2c_driver = {
- .driver = {
- .name = "hi847",
- .pm = &hi847_pm_ops,
- .acpi_match_table = ACPI_PTR(hi847_acpi_ids),
- },
- .probe_new = hi847_probe,
- .remove = hi847_remove,
- };
- module_i2c_driver(hi847_i2c_driver);
- MODULE_AUTHOR("Shawn Tu <[email protected]>");
- MODULE_DESCRIPTION("Hynix HI847 sensor driver");
- MODULE_LICENSE("GPL v2");
|