Skip to content

Commit

Permalink
Use different reset pin if RPI-RF-MOD is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreinert committed Mar 25, 2021
1 parent e259728 commit 847f7d2
Show file tree
Hide file tree
Showing 25 changed files with 191 additions and 44 deletions.
2 changes: 1 addition & 1 deletion create_devicetree_armbian.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
PKG_BUILD=30
PKG_BUILD=31

CURRENT_DIR=$(pwd)
WORK_DIR=$(mktemp -d)
Expand Down
2 changes: 1 addition & 1 deletion create_modules_dkms.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
PKG_BUILD=59
PKG_BUILD=60

PKG_VERSION=1.0.$PKG_BUILD

Expand Down
2 changes: 1 addition & 1 deletion create_modules_raspberrypi.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
PKG_BUILD=15
PKG_BUILD=16

PKG_VERSION=2.0-$PKG_BUILD

Expand Down
5 changes: 4 additions & 1 deletion dts/lepotato.dts.include
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
pinctrl-0 = <&pivccu_i2c_ao>;
pinctrl-names = "default";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand All @@ -38,9 +39,11 @@
status = "okay";
compatible = "pivccu,meson";
pivccu,reset_pin = <&pivccu_gpio_ao 6 0>;
pivccu,alt_reset_pin = <&pivccu_gpio 86 0>;
pivccu,red_pin = <&pivccu_gpio 81 0>;
pivccu,green_pin = <&pivccu_gpio 82 0>;
pivccu,blue_pin = <&pivccu_gpio 83 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};
};
};
Expand Down
7 changes: 5 additions & 2 deletions dts/nanopct4.dts.include
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/ {
serial@ff1a0000 {
compatible = "pivccu,dw_apb";
pinctrl-0 = <&pivccu_uart2b_xfer>;
pivccu,reset_pin = <&pivccu_gpio1 18 0>;
pivccu,alt_reset_pin = <&pivccu_gpio4 6 0>;
pivccu,red_pin = <&pivccu_gpio4 7 0>;
pivccu,green_pin = <&pivccu_gpio3 29 0>;
pivccu,blue_pin = <&pivccu_gpio3 30 0>;
pinctrl-0 = <&pivccu_uart2b_xfer>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};

pinctrl {
Expand All @@ -24,10 +26,11 @@
i2c@ff120000 {
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
7 changes: 5 additions & 2 deletions dts/nanopim4.dts.include
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/ {
serial@ff1a0000 {
compatible = "pivccu,dw_apb";
pinctrl-0 = <&pivccu_uart2b_xfer>;
pivccu,reset_pin = <&pivccu_gpio1 18 0>;
pivccu,alt_reset_pin = <&pivccu_gpio3 27 0>;
pivccu,red_pin = <&pivccu_gpio3 31 0>;
pivccu,green_pin = <&pivccu_gpio3 29 0>;
pivccu,blue_pin = <&pivccu_gpio3 30 0>;
pinctrl-0 = <&pivccu_uart2b_xfer>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};

pinctrl {
Expand All @@ -22,10 +24,11 @@
i2c@ff120000 {
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
5 changes: 4 additions & 1 deletion dts/odroidc2.dts.include
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@
status = "okay";
compatible = "pivccu,meson";
pivccu,reset_pin = <&pivccu_gpio 102 0>;
pivccu,alt_reset_pin = <&pivccu_gpio 78 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};

i2c@8500 {
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
5 changes: 4 additions & 1 deletion dts/odroidc4.dts.include
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@
status = "okay";
compatible = "pivccu,meson";
pivccu,reset_pin = <&pivccu_gpio 81 0>;
pivccu,alt_reset_pin = <&pivccu_gpio 84 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};

i2c@1d000 {
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
6 changes: 4 additions & 2 deletions dts/pivccu-bananapi-m1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
__overlay__ {
status = "okay";
compatible = "pivccu,dw_apb";
pivccu,gpio_pin = <&pio 7 2 0>;
pivccu,reset_pin = <&pio 7 2 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};
};

Expand All @@ -20,10 +21,11 @@
#size-cells = <0>;
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
7 changes: 5 additions & 2 deletions dts/pivccu-bananapi-pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
__overlay__ {
status = "okay";
compatible = "pivccu,dw_apb";
pivccu,gpio_pin = <&pio 8 3 0>;
pivccu,reset_pin = <&pio 8 3 0>;
pivccu,alt_reset_pin = <&pio 1 7 0>;
pivccu,red_pin = <&pio 1 6 0>;
pivccu,green_pin = <&pio 1 12 0>;
pivccu,blue_pin = <&pio 1 8 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};
};

Expand All @@ -23,10 +25,11 @@
#size-cells = <0>;
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/pivccu-orangepi-h2plus.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
status = "okay";
compatible = "pivccu,dw_apb";
pivccu,reset_pin = <&pio 0 7 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};
};

Expand All @@ -22,10 +23,11 @@
#size-cells = <0>;
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
5 changes: 4 additions & 1 deletion dts/pivccu-orangepi-h3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
status = "okay";
compatible = "pivccu,dw_apb";
pivccu,reset_pin = <&pio 3 14 0>;
pivccu,alt_reset_pin = <&pio 0 10 0>;
pivccu,red_pin = <&pio 6 9 0>;
pivccu,green_pin = <&pio 6 6 0>;
pivccu,blue_pin = <&pio 6 7 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};
};

Expand All @@ -26,10 +28,11 @@
#size-cells = <0>;
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/pivccu-orangepi-h5.dts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
status = "okay";
compatible = "pivccu,dw_apb";
pivccu,reset_pin = <&pio 0 7 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};
};

Expand All @@ -22,10 +23,11 @@
#size-cells = <0>;
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
7 changes: 5 additions & 2 deletions dts/pivccu-raspberrypi.dts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
__overlay__ {
compatible = "pivccu,pl011";
pivccu,reset_pin = <&gpio 18 0>;
pivccu,alt_reset_pin = <&gpio 19 0>;
pivccu,red_pin = <&gpio 16 0>;
pivccu,green_pin = <&gpio 20 0>;
pivccu,blue_pin = <&gpio 21 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};
};

Expand All @@ -22,11 +24,12 @@
#size-cells = <0>;
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
enable-external-capacitor;
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
};
Expand Down
4 changes: 3 additions & 1 deletion dts/rock64.dts.include
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
serial@ff130000 {
compatible = "pivccu,dw_apb";
pivccu,reset_pin = <&pivccu_gpio2 3 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};

pinctrl {
Expand All @@ -12,10 +13,11 @@
i2c@ff150000 {
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
7 changes: 5 additions & 2 deletions dts/rockpro64.dts.include
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/ {
serial@ff1a0000 {
compatible = "pivccu,dw_apb";
pinctrl-0 = <&pivccu_uart2c_xfer>;
pivccu,reset_pin = <&pivccu_gpio3 24 0>;
pivccu,alt_reset_pin = <&pivccu_gpio3 26 0>;
pivccu,red_pin = <&pivccu_gpio3 30 0>;
pivccu,green_pin = <&pivccu_gpio3 27 0>;
pivccu,blue_pin = <&pivccu_gpio3 31 0>;
pinctrl-0 = <&pivccu_uart2c_xfer>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};

pinctrl {
Expand All @@ -20,10 +22,11 @@
i2c@ff3e0000 {
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
5 changes: 4 additions & 1 deletion dts/tinkerboard.dts.include
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,21 @@
compatible = "pivccu,dw_apb";
status = "okay";
pivccu,reset_pin = <&pivccu_gpio6 0 0>;
pivccu,alt_reset_pin = <&pivccu_gpio6 1 0>;
pivccu,red_pin = <&pivccu_gpio7 7 0>;
pivccu,green_pin = <&pivccu_gpio6 3 0>;
pivccu,blue_pin = <&pivccu_gpio6 4 0>;
pivccu,rtc = <&rpi_rf_mod_rtc>;
};

i2c@ff140000 {
status = "okay";

rx8130@32 {
rpi_rf_mod_rtc: rx8130@32 {
compatible = "epson,rx8130-legacy";
reg = <0x32>;
status = "okay";
aux-voltage-chargeable = <1>;
enable-external-capacitor;
};
};
Expand Down
4 changes: 2 additions & 2 deletions kernel/dw_apb_raw_uart.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*-----------------------------------------------------------------------------
* Copyright (c) 2020 by Alexander Reinert
* Copyright (c) 2021 by Alexander Reinert
* Author: Alexander Reinert
* Uses parts of bcm2835_raw_uart.c. (c) 2015 by eQ-3 Entwicklung GmbH
*
Expand Down Expand Up @@ -413,6 +413,6 @@ module_raw_uart_driver(MODULE_NAME, dw_apb_raw_uart, dw_apb_raw_uart_of_match);

MODULE_ALIAS("platform:dw_apb-raw-uart");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.8");
MODULE_VERSION("1.9");
MODULE_DESCRIPTION("dw_apb raw uart driver for communication of piVCCU with the HM-MOD-RPI-PCB and RPI-RF-MOD radio modules");
MODULE_AUTHOR("Alexander Reinert <[email protected]>");
Loading

0 comments on commit 847f7d2

Please sign in to comment.