Skip to content

Commit

Permalink
fix: use constant instead of magic numbers
Browse files Browse the repository at this point in the history
Signed-off-by: ZHANG Yuntian <[email protected]>
  • Loading branch information
RadxaYuntian committed May 9, 2024
1 parent cd4d0cd commit ad81b82
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/dts-v1/;
/plugin/;

#include <dt-bindings/pinctrl/rockchip.h>
#include <dt-bindings/interrupt-controller/irq.h>

/ {
metadata {
title = "Enable MCP2515 with 8MHz external clock on SPI1";
Expand All @@ -16,7 +19,7 @@ Uses Pin 22 (GPIO4_D5) for INT.";
&pinctrl {
mcp2515_int_pins {
mcp2515_int_pins: mcp2515_int_pin {
rockchip,pins = <4 29 0 &pcfg_pull_none>;
rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
};
Expand All @@ -40,7 +43,7 @@ Uses Pin 22 (GPIO4_D5) for INT.";
compatible = "microchip,mcp2515";
reg = <0>;
interrupt-parent = <&gpio4>;
interrupts = <29 2>;
interrupts = <RK_PD5 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <10000000>;
clocks = <&can_mcp2515_osc>;
vdd-supply = <&vcc3v3_sys>;
Expand Down

0 comments on commit ad81b82

Please sign in to comment.