fix(iomux): Fix port signal length (given mux size non-power of 2)
[pinmux.git] / src / spec / base.py
index a03ad93f6bbcb773b7ed081d7445b784cb069c32..c8fa2b09d650b1b7cfdb499bfe711a3ebaf5848b 100644 (file)
@@ -1,7 +1,7 @@
 from spec.interfaces import Pinouts
 
 from spec.ifaceprint import display, display_fns, check_functions
-from spec.ifaceprint import display_fixed
+from spec.ifaceprint import display_fixed, python_dict_fns
 from collections import OrderedDict
 
 
@@ -18,7 +18,7 @@ class PinSpec(Pinouts):
         bankspec = OrderedDict()
         self.offs = 0
         pkeys = self.pinbanks.keys()
-        print self.pinbanks
+        print (self.pinbanks)
         for kn in pkeys:
             bankspec[kn] = self.offs
             self.offs += self.pinbanks[kn]
@@ -37,7 +37,11 @@ class PinSpec(Pinouts):
 
         self.scenarios.append((name, needed, eint, pwm, descriptions))
 
+    def pywrite(self, pyf, pinmap):
+        return python_dict_fns(pyf, pinmap, self, self.function_names)
+
     def write(self, of):
+
         of.write("""# Pinouts (PinMux)
 auto-generated by [[pinouts.py]]
 
@@ -72,6 +76,10 @@ auto-generated by [[pinouts.py]]
         of.write("""# Reference Datasheets
 
 datasheets and pinout links
+* <https://ftp.libre-soc.org/STULPI01BTBR.en.CD00201527.pdf>
+* <https://ftp.libre-soc.org/3300db.pdf>
+* <https://ftp.libre-soc.org/1912111437_Realtek-Semicon-RTL8211F-CG_C187932.pdf>
+
 * <http://datasheets.chipdb.org/AMD/8018x/80186/amd-80186.pdf>
 * <http://hands.com/~lkcl/eoma/shenzen/frida/FRD144A2701.pdf>
 * <http://pinouts.ru/Memory/sdcard_pinout.shtml>