Add bluetooth, gps and accelerometer to TBS A711
Subsystems (3)
v2 cover Add bluetooth, gps and accelerometer to TBS A711
From: Ondrej Jirman <megous-5qf/[email protected]>
This series enables some peripherals on TBS A711 tablet that already have mainline drivers:
- GPS u-blox neo-6m (via gnss u-blox driver)
- Bluetooth (via recently added OF support in the Broadcom bluetooth driver)
- Accelermomter BMA-250 (hooked to the I2C bus)
It also modifies A83T DTSI and adds missing UART interfaces.
I've added additional compatible to the gnss/u-blox driver for NEO-6M, because this board uses this module, and I don't think I can use the existing compatible for u-blox,neo-m8, even as a fallback.
Please take a look, and apply the patches if you have no objections.
Many of the patches will go through the sunxi tree, but I'm not sure who will want to take the GPS patches.
regards,
Ondrej Jirman
Changes in v2:
- dropped already applied patches from the series (bluetooth, a83t uarts)
- added /omit-if-no-ref/ to "uart2-pb-pins"
- renamed node "bma250" to "accelerometer"
- removed pinctrl properties that are already in base dtsi (i2c1_pins)
Ondrej Jirman (5):
ARM: dts: sun8i: tbs-a711: Add node for BMA250 accelerometer
ARM: dts: sun8i: a83t: Add UART2 PB pins
gnss: Add u-blox,neo-6m compatible
dt-bindings: gnss: Add u-blox,neo-6m compatible
ARM: dts: sun8i: tbs-a711: Enable UART2 (for NEO-6M GPS module)
.../devicetree/bindings/gnss/u-blox.txt | 1 + arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 34 +++++++++++++++++++ arch/arm/boot/dts/sun8i-a83t.dtsi | 6 ++++ drivers/gnss/ubx.c | 1 + 4 files changed, 42 insertions(+)
Signature · 1 line
2.21.0
PATCH v2 1/5 ARM: dts: sun8i: tbs-a711: Add node for BMA250 accelerometer
From: Ondrej Jirman <[email protected]>
A711 tablet has BMA250 accelerometer connected to I2C1 bus. Enable both the I2C1 bus and add the accelerometer device to it.
--- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +13 -0
@@ -156,6 +156,19 @@ status = "okay"; }; +&i2c1 { + clock-frequency = <400000>; + status = "okay"; + + /* Accelerometer */ + accelerometer@18 { + compatible = "bosch,bma250"; + reg = <0x18>; + interrupt-parent = <&pio>; + interrupts = <7 10 IRQ_TYPE_EDGE_RISING>; /* PH10 / EINT10 */ + }; +}; + &mmc0 { vmmc-supply = <®_dcdc1>; pinctrl-names = "default";
Signature · 1 line
2.21.0
Re: [PATCH v2 1/5] ARM: dts: sun8i: tbs-a711: Add node for BMA250 accelerometer
Hi,
Quoted 20 lines · On Mon, Apr 01, 2019 at 01:56:12PM +0200…
From: Ondrej Jirman <megous-5qf/[email protected]>
A711 tablet has BMA250 accelerometer connected to I2C1 bus. Enable both the I2C1 bus and add the accelerometer device to it.
Signed-off-by Ondrej Jirman <megous-5qf/[email protected]>--- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +2
-0@@ -156,6 +156,19 @@ status = "okay"; }; +&i2c1 { + clock-frequency = <400000>;
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts line 170
Quoted 10 lines
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +10
-0+ status = "okay"; + + /* Accelerometer */ + accelerometer@18 { + compatible = "bosch,bma250"; + reg = <0x18>; + interrupt-parent = <&pio>; + interrupts = <7 10 IRQ_TYPE_EDGE_RISING>; /* PH10 / EINT10 */ + }; +};
I've dropped the comment, since it's pretty obvious now, and applied, thanks! Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
PATCH v2 2/5 ARM: dts: sun8i: a83t: Add UART2 PB pins
In reply to [email protected]From: Ondrej Jirman <megous-5qf/[email protected]>
Add pin definitions for UART2 PB pins. These are used on TBS-A711 tablet.
--- arch/arm/boot/dts/sun8i-a83t.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm/boot/dts/sun8i-a83t.dtsi +6 -0
@@ -768,6 +768,12 @@ pins = "PG8", "PG9"; function = "uart1"; }; + + /omit-if-no-ref/ + uart2_pb_pins: uart2-pb-pins { + pins = "PB0", "PB1"; + function = "uart2"; + }; }; timer@1c20c00 {
Signature · 1 line
2.21.0
Maxime Ripard
AppliedRe: [PATCH v2 2/5] ARM: dts: sun8i: a83t: Add UART2 PB pins
Quoted 6 lines · On Mon, Apr 01, 2019 at 01:56:13PM +0200…
From: Ondrej Jirman <megous-5qf/[email protected]>
Add pin definitions for UART2 PB pins. These are used on TBS-A711 tablet.
Signed-off-by Ondrej Jirman <megous-5qf/[email protected]>
Applied, thanks!
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
PATCH v2 3/5 gnss: Add u-blox,neo-6m compatible
In reply to [email protected]From: Ondrej Jirman <megous-5qf/[email protected]>
Add compatible for u-blox NEO-6M GPS module.
--- drivers/gnss/ubx.c | 1 + 1 file changed, 1 insertion(+)
drivers/gnss/ubx.c +1 -0
@@ -132,6 +132,7 @@ static void ubx_remove(struct serdev_device *serdev)static const struct of_device_id ubx_of_match[] = { { .compatible ="u-blox,neo-8" }, { .compatible ="u-blox,neo-m8" }, + { .compatible ="u-blox,neo-6m" }, {}, };MODULE_DEVICE_TABLE (of, ubx_of_match);
Signature · 1 line
2.21.0
PATCH v2 4/5 dt-bindings: gnss: Add u-blox,neo-6m compatible
In reply to [email protected]From: Ondrej Jirman <megous-5qf/[email protected]>
Add compatible for u-blox NEO-6M GPS module.
--- Documentation/devicetree/bindings/gnss/u-blox.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gnss/u-blox.txt +1 -0
@@ -9,6 +9,7 @@ Required properties: - compatible : Must be one of + "u-blox,neo-6m" "u-blox,neo-8" "u-blox,neo-m8"
Signature · 1 line
2.21.0
Re: [linux-sunxi] [PATCH v2 4/5] dt-bindings: gnss: Add u-blox,neo-6m compatible
Quoted 5 lines · megous via linux-sunxi
From: Ondrej Jirman <megous-5qf/[email protected]>
Add compatible for u-blox NEO-6M GPS module.
Signed-off-by Ondrej Jirman <megous-5qf/[email protected]>
Ouch, I forgot to add:
I'll do v3 if necessary, for this.
regards,
Ondrej
Quoted 23 lines
--- Documentation/devicetree/bindings/gnss/u-blox.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/gnss/u-blox.txt +1
-0@@ -9,6 +9,7 @@ Required properties: - compatible : Must be one of + "u-blox,neo-6m" "u-blox,neo-8" "u-blox,neo-m8"Signature · 6 lines
2.21.0 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Johan Hovold
maintainerRe: [linux-sunxi] [PATCH v2 4/5] dt-bindings: gnss: Add u-blox,neo-6m compatible
Quoted 5 lines · Ondřej Jirman
Quoted 4 lines · megous via linux-sunxi
From: Ondrej Jirman <[email protected]>
Add compatible for u-blox NEO-6M GPS module.
Quoted 7 lines
Quoted 1 line
Signed-off-by Ondrej Jirman <[email protected]>Ouch, I forgot to add:
Reviewed-by Rob Herring <[email protected]>I'll do v3 if necessary, for this.
Looks good to me too.
Now applied with Robs ack along with the ubx-driver patch.
Thanks,
Johan
PATCH v2 5/5 ARM: dts: sun8i: tbs-a711: Enable UART2 (for NEO-6M GPS module)
In reply to [email protected]From: Ondrej Jirman <megous-5qf/[email protected]>
TBS A711 tablet contains u-blox NEO-6M module connected to UART2. Enable UART2 to gain access to the module from userspace.
--- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +21 -0
@@ -98,6 +98,13 @@ }; }; + reg_gps: reg-gps { + compatible = "regulator-fixed"; + regulator-name = "gps"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + reg_vbat: reg-vbat { compatible = "regulator-fixed"; regulator-name = "vbat";
@@ -422,6 +429,20 @@ status = "okay"; }; +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pb_pins>; + status = "okay"; + + gnss { + compatible = "u-blox,neo-6m"; + + v-bckp-supply = <®_rtc_ldo>; + vcc-supply = <®_gps>; + current-speed = <9600>; + }; +}; + &usb_otg { dr_mode = "otg"; status = "okay";
Signature · 1 line
2.21.0
Re: [linux-sunxi] [PATCH v2 5/5] ARM: dts: sun8i: tbs-a711: Enable UART2 (for NEO-6M GPS module)
Hello Maxime,
Quoted 4 lines · megous via linux-sunxi
From: Ondrej Jirman <megous-5qf/[email protected]>
TBS A711 tablet contains u-blox NEO-6M module connected to UART2. Enable UART2 to gain access to the module from userspace.
Other GPS bits are now applied (thank you, Johan), so if this last bit can go in too via a sunxi tree, the series will be complete.
thank you,
Ondrej
Quoted 51 lines
Signed-off-by Ondrej Jirman <megous-5qf/[email protected]>--- arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)arch/arm/boot/dts/sun8i-a83t-tbs-a711.dts +21
-0@@ -98,6 +98,13 @@ }; }; + reg_gps: reg-gps { + compatible = "regulator-fixed"; + regulator-name = "gps"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + reg_vbat: reg-vbat { compatible = "regulator-fixed"; regulator-name = "vbat";@@ -422,6 +429,20 @@ status = "okay"; }; +&uart2 { + pinctrl-names = "default"; + pinctrl-0 = <&uart2_pb_pins>; + status = "okay"; + + gnss { + compatible = "u-blox,neo-6m"; + + v-bckp-supply = <®_rtc_ldo>; + vcc-supply = <®_gps>; + current-speed = <9600>; + }; +}; + &usb_otg { dr_mode = "otg"; status = "okay";Signature · 6 lines
2.21.0 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Maxime Ripard
AppliedRe: [linux-sunxi] [PATCH v2 5/5] ARM: dts: sun8i: tbs-a711: Enable UART2 (for NEO-6M GPS module)
Quoted 10 lines · Ondřej Jirman
Hello Maxime,
Quoted 4 lines · megous via linux-sunxi
From: Ondrej Jirman <megous-5qf/[email protected]>
TBS A711 tablet contains u-blox NEO-6M module connected to UART2. Enable UART2 to gain access to the module from userspace.
Other GPS bits are now applied (thank you, Johan), so if this last bit can go in too via a sunxi tree, the series will be complete.
Applied, thanks!
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Johan Hovold
maintainerQuoted 12 lines · On Mon, Apr 01, 2019 at 01:56:11PM +0200, [email protected] wrote:
From: Ondrej Jirman <[email protected]>
This series enables some peripherals on TBS A711 tablet that already have mainline drivers:
- GPS u-blox neo-6m (via gnss u-blox driver)
- Bluetooth (via recently added OF support in the Broadcom bluetooth driver)
- Accelermomter BMA-250 (hooked to the I2C bus)It also modifies A83T DTSI and adds missing UART interfaces.
Quoted 8 lines
I've added additional compatible to the gnss/u-blox driver for NEO-6M, because this board uses this module, and I don't think I can use the existing compatible for u-blox,neo-m8, even as a fallback.
Please take a look, and apply the patches if you have no objections.
Many of the patches will go through the sunxi tree, but I'm not sure who will want to take the GPS patches.
I'll take the GPS patches through my tree once I've had a chance to review them. Perhaps easiest to resend the corresponding dts change once that is done.
Johan