浏览代码

rtc: assume RTC 32 kHz is supported to work if GPIO serial not used

If we don't use the GPIO serial workaround, assume we don't need the
RTC 32 kHz workaround either.
H. Peter Anvin 3 年之前
父节点
当前提交
a642f1f7a9
共有 5 个文件被更改,包括 4 次插入6 次删除
  1. 4 6
      fpga/max80.sv
  2. 二进制
      fpga/output_files/max80.jbc
  3. 二进制
      fpga/output_files/max80.jic
  4. 二进制
      fpga/output_files/max80.pof
  5. 二进制
      fpga/output_files/max80.sof

+ 4 - 6
fpga/max80.sv

@@ -8,11 +8,7 @@
 // Sharing JTAG pins (via JTAGEN)
 `undef SHARED_JTAG
 
-module max80
-#(
-  // Pull-up installed on RTC 32 kHz line
-  parameter rtc_32khz_rework = 1'b0
-) (
+module max80 (
 	      // Clock oscillator
 	      input	    clock_48, // 48 MHz
 
@@ -658,6 +654,8 @@ module max80
    assign tty_cts = tty_dtr_q[0] ? 1'bz : tty_cts_out;
    assign gpio[3] = tty_dtr_q[1] ? 1'bz : tty_cts_out;
 
+   // DTR on GPIO -> assume RTC 32 kHz output is nonfunctional
+   wire rtc_32khz_rework = tty_dtr_q[1];
 
    // SD card
    sdcard #(
@@ -705,7 +703,7 @@ module max80
      end
 
    // 32kHz clock synchronized with sys_clk
-   wire clk_32kHz = rtc_32khz_rework ? rtc_32khz : ctr_32khz;
+   wire clk_32kHz = rtc_32khz_rework ? ~rtc_32khz : ctr_32khz;
 
    sysclock #(.PERIODIC_HZ_LG2 ( 5 ))
    sysclock (

二进制
fpga/output_files/max80.jbc


二进制
fpga/output_files/max80.jic


二进制
fpga/output_files/max80.pof


二进制
fpga/output_files/max80.sof