Assuming the IC runs stable and is correctly compensated, It does nothing but applying a rect with defined frequency and rise time with a calculated pulse width to a choke that feeds a capacitor. Not sure what can be out of specs there... The actual wave form comes from load, inductor and capacitor.
For instance the DC/DC could be running below its minimal load, so the capacitor could be trying to suppress the overswing. I do vaguely remember something about the noise disappearing when you connect something to the USB ports and the above would match up with that symptom.
We know it's something to do with the USB ports; the system probably runs at 3.3/.7 V throughout, except it needs 5V plus a bit for those sockets at least when in host mode for the power pins. So I assume it's practically tied directly to the 5V pin of the USB type-A port.
My own plug in 3.1A USB charger emits a tone when it's switched on but nothing is drawing any current from it. It's just on the limits of my hearing, so it comes and goes as I turn my head, but I think it's basically a constant tone if I can hold my head still enough, and not in any way a 'sirring' type noise. It goes away when I attach something that needs charging though.
Which leads me to believe it's a DC/DC boost converter, which also means there should be a coil in there somewhere. It could be that we've built an LC oscillator with a resonance frequency coinciding with another circuit on the output. This would also explain why the noise differs so much between boards.
Some time and TI search engine poking later...
I think I've narrowed it down to 2 possible ICs which we could be dealing with here and one of them has
this application note attached to it in the documentation section, the relevant excerpt is as follows:
Texas Instruments said:
At no load or very light load condition, the switching frequency of the boost converter is very low, as shown in Figure 4. The input current is pulsating in the same frequency which makes the input current hard to be measured using a current meter.
A simple RC filter circuit shown in Figure 5 helps to solve this problem. The cut-off frequency of the RC filters must be much lower than the switching frequency of the boost converter.
From Figure 4, the switching period is 62 ms, so the time constant of the RC filter can be set to 6 seconds. Based on the input current calculated by Equation 2, we can select 10 kΩ for R_F and 600 μF for C_F. Large R_F results in large voltage difference between the power supply voltage and the real input voltage, which cause trouble in setting the right input voltage. Small R_F results in large ceramic C_F, which increase the cost.
Firstly, connect the power supply to node 2 shown in Figure 5 to charge the C_F and start up the boost converter. Then move power supply quickly to node 1. The input current can be calculated by measuring the voltage drop across the R_F with a multi-meter. It is suggested to wait at least ten minutes until the input current becomes stable. Table 2 shows the calculation and measurement results of the no load input current at different input voltages conditions. The calculated values are closed to the measurement results.
For those without a PDF reader on hand:
Figure 4 shows how the switch is trying to regulate without any load, which causes it to switch at long and irregular intervals. The illustrated periods range from about 30 ms to 62 ms.
Figure 5 shows how to properly measure the input current in this unstable state through the voltage drop across a known resistance in series with the power supply, after charging up the two input capacitors C_F and C_I in addition to inductor L. The output only has a capacitor C_O attached to it and there's an illustrative resistor to show where a load would be attached.
The example clearly illustrates what happens below the minimum load of the DC/DC. Even though the minimum load is not explicitly specified in the table of electrical properties it clearly has one since this application note is attached to it. The datasheet of the IC has a chapter called "Checking Loop Stability" which may be relevant to fixing this through adjusting the inductor and capacitor values, which also mentions the loop stability must be measured across the entire voltage, current and temperature range to verify it's stable.
That's about as much time I have for researching this today, I have a fluid mechanics test tomorrow and I want repeat a few more things (only 2 weeks in so it's basically just hydrostatics combined with Reynolds number and the unmodified Bernoulli equation, but still). Feel free to reply but don't expect an answer until tomorrow afternoon