CV1800B: pinctrl: Added PINMUX macro.
Signed-off-by: Yilin Sun <imi415@imi.moe>
This commit is contained in:
parent
c85ec7b497
commit
2f1c9ef0ad
|
@ -6,6 +6,7 @@
|
|||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/pinctrl/cv1800b-pinctrl.h>
|
||||
|
||||
/ {
|
||||
#address-cells = <2>;
|
||||
|
@ -77,12 +78,21 @@
|
|||
pinctrl: pinctrl@03000000 {
|
||||
compatible = "cvitek,cv1800b-pinctrl";
|
||||
reg = <0x0 0x03000000 0x0 0x00001000>;
|
||||
|
||||
uart0_pins: uart0_pins {
|
||||
pinmux = <CVI_PINMUX(UART0_TX, UART0_TX)>, <CVI_PINMUX(UART0_RX, UART0_RX)>;
|
||||
};
|
||||
|
||||
i2c0_pins: i2c0_pins {
|
||||
pinmux = <CVI_PINMUX(IIC0_SCL, IIC0_SCL)>, <CVI_PINMUX(IIC0_SDA, IIC0_SDA)>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0: serial@04140000 {
|
||||
compatible = "cvitek,cv1800b-uart", "snps,dw-apb-uart";
|
||||
reg = <0x0 0x04140000 0x0 0x1000>;
|
||||
interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
|
||||
pinctrl-0 = <&uart0_pins>;
|
||||
clocks = <&apb_clk>;
|
||||
reg-shift = <2>;
|
||||
reg-io-width = <4>;
|
||||
|
|
|
@ -635,4 +635,7 @@
|
|||
#define FUNC_PAD_AUD_AOUTR_IIS2_DO (0x05U)
|
||||
#define FUNC_PAD_AUD_AOUTR_IIS1_DO (0x06U)
|
||||
|
||||
#define CVI_PINMUX(pad, func) \
|
||||
((FUNC_ ## pad ## _ ## func << 8U) | CTRL_ ## pad)
|
||||
|
||||
#endif /* DT_CV1800B_PINCTRL_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user