1*7ebd8b66SMauro Carvalho ChehabKernel driver mc13783-adc 2*7ebd8b66SMauro Carvalho Chehab========================= 3*7ebd8b66SMauro Carvalho Chehab 4*7ebd8b66SMauro Carvalho ChehabSupported chips: 5*7ebd8b66SMauro Carvalho Chehab 6*7ebd8b66SMauro Carvalho Chehab * Freescale MC13783 7*7ebd8b66SMauro Carvalho Chehab 8*7ebd8b66SMauro Carvalho Chehab Prefix: 'mc13783' 9*7ebd8b66SMauro Carvalho Chehab 10*7ebd8b66SMauro Carvalho Chehab Datasheet: https://www.nxp.com/docs/en/data-sheet/MC13783.pdf 11*7ebd8b66SMauro Carvalho Chehab 12*7ebd8b66SMauro Carvalho Chehab * Freescale MC13892 13*7ebd8b66SMauro Carvalho Chehab 14*7ebd8b66SMauro Carvalho Chehab Prefix: 'mc13892' 15*7ebd8b66SMauro Carvalho Chehab 16*7ebd8b66SMauro Carvalho Chehab Datasheet: https://www.nxp.com/docs/en/data-sheet/MC13892.pdf 17*7ebd8b66SMauro Carvalho Chehab 18*7ebd8b66SMauro Carvalho Chehab 19*7ebd8b66SMauro Carvalho Chehab 20*7ebd8b66SMauro Carvalho ChehabAuthors: 21*7ebd8b66SMauro Carvalho Chehab 22*7ebd8b66SMauro Carvalho Chehab - Sascha Hauer <s.hauer@pengutronix.de> 23*7ebd8b66SMauro Carvalho Chehab - Luotao Fu <l.fu@pengutronix.de> 24*7ebd8b66SMauro Carvalho Chehab 25*7ebd8b66SMauro Carvalho ChehabDescription 26*7ebd8b66SMauro Carvalho Chehab----------- 27*7ebd8b66SMauro Carvalho Chehab 28*7ebd8b66SMauro Carvalho ChehabThe Freescale MC13783 and MC13892 are Power Management and Audio Circuits. 29*7ebd8b66SMauro Carvalho ChehabAmong other things they contain a 10-bit A/D converter. The converter has 16 30*7ebd8b66SMauro Carvalho Chehab(MC13783) resp. 12 (MC13892) channels which can be used in different modes. The 31*7ebd8b66SMauro Carvalho ChehabA/D converter has a resolution of 2.25mV. 32*7ebd8b66SMauro Carvalho Chehab 33*7ebd8b66SMauro Carvalho ChehabSome channels can be used as General Purpose inputs or in a dedicated mode with 34*7ebd8b66SMauro Carvalho Chehaba chip internal scaling applied . 35*7ebd8b66SMauro Carvalho Chehab 36*7ebd8b66SMauro Carvalho ChehabCurrently the driver only supports the Application Supply channel (BP / BPSNS), 37*7ebd8b66SMauro Carvalho Chehabthe General Purpose inputs and touchscreen. 38*7ebd8b66SMauro Carvalho Chehab 39*7ebd8b66SMauro Carvalho ChehabSee the following tables for the meaning of the different channels and their 40*7ebd8b66SMauro Carvalho Chehabchip internal scaling: 41*7ebd8b66SMauro Carvalho Chehab 42*7ebd8b66SMauro Carvalho Chehab- MC13783: 43*7ebd8b66SMauro Carvalho Chehab 44*7ebd8b66SMauro Carvalho Chehab======= =============================================== =============== ======= 45*7ebd8b66SMauro Carvalho ChehabChannel Signal Input Range Scaling 46*7ebd8b66SMauro Carvalho Chehab======= =============================================== =============== ======= 47*7ebd8b66SMauro Carvalho Chehab0 Battery Voltage (BATT) 2.50 - 4.65V -2.40V 48*7ebd8b66SMauro Carvalho Chehab1 Battery Current (BATT - BATTISNS) -50 - 50 mV x20 49*7ebd8b66SMauro Carvalho Chehab2 Application Supply (BP) 2.50 - 4.65V -2.40V 50*7ebd8b66SMauro Carvalho Chehab3 Charger Voltage (CHRGRAW) 0 - 10V / /5 51*7ebd8b66SMauro Carvalho Chehab 0 - 20V /10 52*7ebd8b66SMauro Carvalho Chehab4 Charger Current (CHRGISNSP-CHRGISNSN) -0.25 - 0.25V x4 53*7ebd8b66SMauro Carvalho Chehab5 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.30V No 54*7ebd8b66SMauro Carvalho Chehab6 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.30V / No / 55*7ebd8b66SMauro Carvalho Chehab 1.50 - 3.50V -1.20V 56*7ebd8b66SMauro Carvalho Chehab7 General Purpose ADIN7 / UID / Die Temperature 0 - 2.30V / No / 57*7ebd8b66SMauro Carvalho Chehab 0 - 2.55V / x0.9 / No 58*7ebd8b66SMauro Carvalho Chehab8 General Purpose ADIN8 0 - 2.30V No 59*7ebd8b66SMauro Carvalho Chehab9 General Purpose ADIN9 0 - 2.30V No 60*7ebd8b66SMauro Carvalho Chehab10 General Purpose ADIN10 0 - 2.30V No 61*7ebd8b66SMauro Carvalho Chehab11 General Purpose ADIN11 0 - 2.30V No 62*7ebd8b66SMauro Carvalho Chehab12 General Purpose TSX1 / Touchscreen X-plate 1 0 - 2.30V No 63*7ebd8b66SMauro Carvalho Chehab13 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.30V No 64*7ebd8b66SMauro Carvalho Chehab14 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.30V No 65*7ebd8b66SMauro Carvalho Chehab15 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.30V No 66*7ebd8b66SMauro Carvalho Chehab======= =============================================== =============== ======= 67*7ebd8b66SMauro Carvalho Chehab 68*7ebd8b66SMauro Carvalho Chehab- MC13892: 69*7ebd8b66SMauro Carvalho Chehab 70*7ebd8b66SMauro Carvalho Chehab======= =============================================== =============== ======= 71*7ebd8b66SMauro Carvalho ChehabChannel Signal Input Range Scaling 72*7ebd8b66SMauro Carvalho Chehab======= =============================================== =============== ======= 73*7ebd8b66SMauro Carvalho Chehab0 Battery Voltage (BATT) 0 - 4.8V /2 74*7ebd8b66SMauro Carvalho Chehab1 Battery Current (BATT - BATTISNSCC) -60 - 60 mV x20 75*7ebd8b66SMauro Carvalho Chehab2 Application Supply (BPSNS) 0 - 4.8V /2 76*7ebd8b66SMauro Carvalho Chehab3 Charger Voltage (CHRGRAW) 0 - 12V / /5 77*7ebd8b66SMauro Carvalho Chehab 0 - 20V /10 78*7ebd8b66SMauro Carvalho Chehab4 Charger Current (CHRGISNS-BPSNS) / -0.3 - 0.3V / x4 / 79*7ebd8b66SMauro Carvalho Chehab Touchscreen X-plate 1 0 - 2.4V No 80*7ebd8b66SMauro Carvalho Chehab5 General Purpose ADIN5 / Battery Pack Thermistor 0 - 2.4V No 81*7ebd8b66SMauro Carvalho Chehab6 General Purpose ADIN6 / Backup Voltage (LICELL) 0 - 2.4V / No 82*7ebd8b66SMauro Carvalho Chehab Backup Voltage (LICELL) 0 - 3.6V x2/3 83*7ebd8b66SMauro Carvalho Chehab7 General Purpose ADIN7 / UID / Die Temperature 0 - 2.4V / No / 84*7ebd8b66SMauro Carvalho Chehab 0 - 4.8V /2 85*7ebd8b66SMauro Carvalho Chehab12 General Purpose TSX1 / Touchscreen X-plate 1 0 - 2.4V No 86*7ebd8b66SMauro Carvalho Chehab13 General Purpose TSX2 / Touchscreen X-plate 2 0 - 2.4V No 87*7ebd8b66SMauro Carvalho Chehab14 General Purpose TSY1 / Touchscreen Y-plate 1 0 - 2.4V No 88*7ebd8b66SMauro Carvalho Chehab15 General Purpose TSY2 / Touchscreen Y-plate 2 0 - 2.4V No 89*7ebd8b66SMauro Carvalho Chehab======= =============================================== =============== ======= 90