boards: arm: stm32g081b_eval: Add UCPD1 peripherals to dts node
The STM32G081b has two UCPD peripherals. This commit adds UCPD1
to the DTS so both peripherals can be used.
};
};
+&ucpd1 {
+ status = "okay";
+
+ /*
+ * UCPD is fed directly from HSI which is @ 16MHz. The ucpd_clk goes to
+ * a prescaler who's output feeds the 'half-bit' divider which is used
+ * to generate clock for delay counters and BMC Rx/Tx blocks. The rx is
+ * designed to work in freq ranges of 6 <--> 18 MHz, however recommended
+ * range is 9 <--> 18 MHz.
+ *
+ * +-------+ @ 16 MHz +-------+ @ ~600 kHz +-----------+
+ * HSI ---->| /psc |--------->| /hbit |--------------->| trans_cnt |
+ * +-------+ +-------+ | +-----------+
+ * | +-----------+
+ * +----------->| ifrgap_cnt|
+ * +-----------+
+ * Requirements:
+ * 1. hbit_clk ~= 600 kHz: 16 MHz / 600 kHz = 26.67
+ * 2. tTransitionWindow - 12 to 20 uSec
+ * 3. tInterframGap - uSec
+ *
+ * hbit_clk = HSI_clk / 27 = 592.6 kHz = 1.687 uSec period
+ * tTransitionWindow = 1.687 uS * 8 = 13.5 uS
+ * tInterFrameGap = 1.687 uS * 17 = 28.68 uS
+ */
+ psc-ucpdclk = <1>;
+ hbitclkdiv = <27>;
+ pinctrl-0 = <&ucpd1_cc1_pa8 &ucpd1_cc2_pb15>;
+ pinctrl-names = "default";
+};
+
&ucpd2 {
status = "okay";
