Skip to content

Commit

Permalink
overlays: Add overlay for QCA7000 via UART0
Browse files Browse the repository at this point in the history
This adds an overlay to connect the QCA7000 in UART mode via UART0.
The qcauart driver uses the serial device bus instead of deprecated
line disciplines.

Signed-off-by: Stefan Wahren <stefan.wahren@in-tech.com>
  • Loading branch information
Stefan Wahren authored and pelwell committed Sep 3, 2021
1 parent 1ff6676 commit 19ad813
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
pwm-2chan.dtbo \
pwm-ir-tx.dtbo \
qca7000.dtbo \
qca7000-uart0.dtbo \
rotary-encoder.dtbo \
rpi-backlight.dtbo \
rpi-cirrus-wm5102.dtbo \
Expand Down
11 changes: 11 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -2505,12 +2505,23 @@ Params: gpio_pin Output GPIO (default 18)

Name: qca7000
Info: in-tech's Evaluation Board for PLC Stamp micro
This uses spi0 and a separate GPIO interrupt to connect the QCA7000.
Load: dtoverlay=qca7000,<param>=<val>
Params: int_pin GPIO pin for interrupt signal (default 23)

speed SPI bus speed (default 12 MHz)


Name: qca7000-uart0
Info: in-tech's Evaluation Board for PLC Stamp micro (UART)
This uses uart0/ttyAMA0 over GPIOs 14 & 15 to connect the QCA7000.
But it requires disabling of onboard Bluetooth on
Pi 3B, 3B+, 3A+, 4B and Zero W.
Load: dtoverlay=qca7000-uart0,<param>=<val>
Params: baudrate Set the baudrate for the UART (default
"115200")


Name: rotary-encoder
Info: Overlay for GPIO connected rotary encoder.
Load: dtoverlay=rotary-encoder,<param>=<val>
Expand Down
46 changes: 46 additions & 0 deletions arch/arm/boot/dts/overlays/qca7000-uart0-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// Overlay for the Qualcomm Atheros QCA7000 on PLC Stamp micro EVK
// Visit: https://in-tech-smartcharging.com/products/evaluation-tools/plc-stamp-micro-2-evaluation-board for details

/dts-v1/;
/plugin/;

/ {
compatible = "brcm,bcm2835";

fragment@0 {
target = <&uart0>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pins>;
status = "okay";

eth2: qca7000 {
compatible = "qca,qca7000";
current-speed = <115200>;
};
};
};

fragment@1 {
target = <&gpio>;
__overlay__ {
uart0_pins: uart0_pins {
brcm,pins = <14 15>;
brcm,function = <4>; /* alt0 */
brcm,pull = <0 2>;
};
};
};

fragment@2 {
target-path = "/aliases";
__overlay__ {
serial0 = "/soc/serial@7e201000";
serial1 = "/soc/serial@7e215040";
};
};

__overrides__ {
baudrate = <&eth2>, "current-speed:0";
};
};

0 comments on commit 19ad813

Please sign in to comment.