Nanocrystals are promising building blocks for the development of low-cost infrared optoelectronics. Gating a nanocrystal film in a phototransistor geometry is commonly proposed as a strategy to tune the signal to noise ratio by carefully controlling the carrier density within the semiconductor. However, the performance improvement has so far been quite marginal. With metallic electrodes, the gate dependence of the photocurrent follows the gate-induced change of the dark current. Graphene presents key advantages: (i) infrared transparency that allows back-side illumination, (ii) vertical electric field transparency and (iii) carrier selectivity under gate bias. Here, we investigate a configuration of 2D/0D infrared photodetectors taking advantage of a high capacitance ionic glass gate, large scale graphene electrodes, and a HgTe nanocrystal layer of high carrier mobility. The introduction of graphene electrodes combined with ionic glass enables to reconfigure selectively the HgTe nanocrystals and the graphene electrodes between electrons (n) and holes (p) doped states. We unveil that this functionality enables to design a 2D/0D p-n junction that expands throughout the device, with a built-in electric field that assists charge dissociation. We demonstrate that in this specific configuration, the signal to noise ratio for infrared photodetection can be enhanced by two orders of magnitude, and that photovoltaic operation can be achieved. The detectivity now reaches 10 9 Jones while the device only absorbs 8% of the incident light. Additionally, the time response of the device is fast (<10 µs) which strongly contrasts with the slow response commonly observed for 2D/0D mixed dimensionalities heterostructures, where larger photoconduction gains come at the cost of slower response.