amlogic: GXBB: Add pin controller
Subsystems (5)
cover amlogic: GXBB: Add pin controller
From: Carlo Caione <[email protected]>
Patchset to add and enable the pin controller driver on a couple of Amlogic boards with a Meson GXBB SoC.
Please note that:
* This patch depends on http://www.spinics.net/lists/devicetree/msg120964.html
([PATCH] ARM64: dts: amlogic: Add hiu and periphs buses).
* The platform driver is still missing a lot of muxing configurations. This is because Amlogic still hasn't publicly released documentation for the GXBB. Since Kevin has already this documentation under NDA, he will integrate and complete this driver with a separate submission.
Carlo Caione (2):
pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC
ARM64: dts: amlogic: Enable pin controller on GXBB-based platforms
.../devicetree/bindings/pinctrl/meson,pinctrl.txt | 2 + arch/arm64/Kconfig.platforms | 2 + .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 + arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 2 + .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 3 + arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 41 ++ drivers/pinctrl/meson/Makefile | 2 +- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 432 +++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.c | 8 + drivers/pinctrl/meson/pinctrl-meson.h | 2 + include/dt-bindings/gpio/meson-gxbb-gpio.h | 154 ++++++++ 11 files changed, 660 insertions(+), 1 deletion(-) create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxbb.c create mode 100644 include/dt-bindings/gpio/meson-gxbb-gpio.h
Signature · 1 line
2.7.4
PATCH 1/2 pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC
From: Carlo Caione <[email protected]>
This patch adds the basic platform file to support the pin controller found on the Amlogic Meson GXBB SoCs.
--- .../devicetree/bindings/pinctrl/meson,pinctrl.txt | 2 + arch/arm64/Kconfig.platforms | 2 + drivers/pinctrl/meson/Makefile | 2 +- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 432 +++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.c | 8 + drivers/pinctrl/meson/pinctrl-meson.h | 2 + include/dt-bindings/gpio/meson-gxbb-gpio.h | 154 ++++++++ 7 files changed, 601 insertions(+), 1 deletion(-) create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxbb.c create mode 100644 include/dt-bindings/gpio/meson-gxbb-gpio.h
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt +2 -0
@@ -5,6 +5,8 @@ Required properties for the root node: "amlogic,meson8b-cbus-pinctrl" "amlogic,meson8-aobus-pinctrl" "amlogic,meson8b-aobus-pinctrl" + "amlogic,meson-gxbb-periphs-pinctrl" + "amlogic,meson-gxbb-aobus-pinctrl" - reg: address and size of registers controlling irq functionality === GPIO sub-nodes ===
arch/arm64/Kconfig.platforms +2 -0
@@ -58,6 +58,8 @@ config ARCH_MEDIATEK config ARCH_MESON bool "Amlogic Platforms" + select PINCTRL + select PINCTRL_MESON help This enables support for the Amlogic S905 SoCs.
drivers/pinctrl/meson/Makefile +1 -1
@@ -1,2 +1,2 @@ -obj-y += pinctrl-meson8.o pinctrl-meson8b.o +obj-y += pinctrl-meson8.o pinctrl-meson8b.o pinctrl-meson-gxbb.o obj-y += pinctrl-meson.o
drivers/pinctrl/meson/pinctrl-meson-gxbb.c new file +432 -0
432 lines not on this page · raw message
drivers/pinctrl/meson/pinctrl-meson.c +8 -0
@@ -549,6 +549,14 @@ static const struct of_device_id meson_pinctrl_dt_match[] = { .compatible = "amlogic,meson8b-aobus-pinctrl", .data = &meson8b_aobus_pinctrl_data, }, + { + .compatible = "amlogic,meson-gxbb-periphs-pinctrl", + .data = &meson_gxbb_periphs_pinctrl_data, + }, + { + .compatible = "amlogic,meson-gxbb-aobus-pinctrl", + .data = &meson_gxbb_aobus_pinctrl_data, + }, { }, };
drivers/pinctrl/meson/pinctrl-meson.h +2 -0
@@ -199,3 +199,5 @@ extern struct meson_pinctrl_data meson8_cbus_pinctrl_data;extern struct meson_pinctrl_data meson8_aobus_pinctrl_data;extern struct meson_pinctrl_data meson8b_cbus_pinctrl_data;extern struct meson_pinctrl_data meson8b_aobus_pinctrl_data; +extern struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data; +extern struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data;
include/dt-bindings/gpio/meson-gxbb-gpio.h new file +154 -0
154 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 1/2 pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC
Quoted 8 lines · Carlo Caione
From: Carlo Caione <[email protected]>
This patch adds the basic platform file to support the pin controller found on the Amlogic Meson GXBB SoCs.
Signed-off-by Carlo Caione <[email protected]>.../devicetree/bindings/pinctrl/meson,pinctrl.txt | 2 +
This thing conflicts with upstream. Make a separate patch for updating the bindings I think.
Quoted 1 line
arch/arm64/Kconfig.platforms | 2 +
This needs to be split off and sent separatelt to the ARM64 maintainers. Since it's just a symbol dependency (I think?) it can be merged orthogonally.
Quoted 8 lines
drivers/pinctrl/meson/Makefile | 2 +- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 432 +++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.c | 8 + drivers/pinctrl/meson/pinctrl-meson.h | 2 + include/dt-bindings/gpio/meson-gxbb-gpio.h | 154 ++++++++ 7 files changed, 601 insertions(+), 1 deletion(-) create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxbb.c create mode 100644 include/dt-bindings/gpio/meson-gxbb-gpio.h
This stuff I can merge, if I get it in a separate patch.
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt Required properties for the root node: · line 9
Quoted 10 lines
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt +2
-0@@ -5,6 +5,8 @@ Required properties for the root node: "amlogic,meson8b-cbus-pinctrl" "amlogic,meson8-aobus-pinctrl" "amlogic,meson8b-aobus-pinctrl" + "amlogic,meson-gxbb-periphs-pinctrl" + "amlogic,meson-gxbb-aobus-pinctrl"
This is not how upstream looks...
Yours,
Linus Walleij
PATCH 1/2 pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Carlo Caione
From: Carlo Caione <[email protected]>
This patch adds the basic platform file to support the pin controller found on the Amlogic Meson GXBB SoCs.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Carlo Caione <[email protected]>.../devicetree/bindings/pinctrl/meson,pinctrl.txt | 2 +This thing conflicts with upstream. Make a separate patch for updating the bindings I think.
This patch is based on linux-next where the documentation is correctly updated (see 11ca8735) but apparently this is missing from upstream. Probably slipped through the cracks with the latest PR.
Kevin, did you merge both the commits in
https://patchwork.ozlabs.org/patch/603580/ or just the DT changes?
Quoted 5 lines
Quoted 1 line
arch/arm64/Kconfig.platforms | 2 +This needs to be split off and sent separatelt to the ARM64 maintainers. Since it's just a symbol dependency (I think?) it can be merged orthogonally.
Ok
Quoted 10 lines
Quoted 8 lines
drivers/pinctrl/meson/Makefile | 2 +- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 432 +++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.c | 8 + drivers/pinctrl/meson/pinctrl-meson.h | 2 + include/dt-bindings/gpio/meson-gxbb-gpio.h | 154 ++++++++ 7 files changed, 601 insertions(+), 1 deletion(-) create mode 100644 drivers/pinctrl/meson/pinctrl-meson-gxbb.c create mode 100644 include/dt-bindings/gpio/meson-gxbb-gpio.hThis stuff I can merge, if I get it in a separate patch.
I'll split it in v2
Quoted 4 lines
Quoted 4 lines
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt +0
-0
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt Required properties for the root node: · line 9
Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt +2
-0@@ -5,6 +5,8 @@ Required properties for the root node: "amlogic,meson8b-cbus-pinctrl" "amlogic,meson8-aobus-pinctrl" "amlogic,meson8b-aobus-pinctrl" + "amlogic,meson-gxbb-periphs-pinctrl" + "amlogic,meson-gxbb-aobus-pinctrl"This is not how upstream looks...
yeah, trying to figure this out,
Thanks,
Signature · 1 line
Carlo Caione
Kevin Hilman
maintainerPATCH 1/2 pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC
Quoted 15 lines · Carlo Caione
Quoted 7 lines · Linus Walleij
Quoted 5 lines · Carlo Caione
From: Carlo Caione <[email protected]>
This patch adds the basic platform file to support the pin controller found on the Amlogic Meson GXBB SoCs.
Quoted 6 lines
Quoted 3 lines
Signed-off-by Carlo Caione <[email protected]>.../devicetree/bindings/pinctrl/meson,pinctrl.txt | 2 +This thing conflicts with upstream. Make a separate patch for updating the bindings I think.
Quoted 6 lines
This patch is based on linux-next where the documentation is correctly updated (see
11ca8735) but apparently this is missing from upstream. Probably slipped through the cracks with the latest PR.Kevin, did you merge both the commits in
https://patchwork.ozlabs.org/patch/603580/ or just the DT changes?
Yes, I just pulled your branch.
That pull was merged for v4.7, which is why it's in next, but not yet mainline (where v4.6 is just now being finalized.)
Kevin
PATCH 2/2 ARM64: dts: amlogic: Enable pin controller on GXBB-based platforms
In reply to Carlo CaioneFrom: Carlo Caione <[email protected]>
Update DTS and DTSI files to enable the pin controller. We also now support the blinking blue LED on the Odroid-C2.
--- .../arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 13 +++++++ arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi | 2 ++ .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 3 ++ arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 41 ++++++++++++++++++++++ 4 files changed, 59 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +13 -0
@@ -45,6 +45,7 @@ /dts-v1/; #include "meson-gxbb.dtsi" +#include <dt-bindings/gpio/gpio.h> / { compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
@@ -62,8 +63,20 @@ device_type = "memory"; reg = <0x0 0x0 0x0 0x80000000>; }; + + leds { + compatible = "gpio-leds"; + blue { + label = "c2:blue:alive"; + gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "heartbeat"; + default-state = "off"; + }; + }; }; &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; };
arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi +2 -0
@@ -62,4 +62,6 @@ /* This UART is brought out to the DB9 connector */ &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; };
arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi +3 -0
@@ -56,4 +56,7 @@ &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; + };
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi +41 -0
59 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 2/2 ARM64: dts: amlogic: Enable pin controller on GXBB-based platforms
Quoted 6 lines · Carlo Caione
From: Carlo Caione <[email protected]>
Update DTS and DTSI files to enable the pin controller. We also now support the blinking blue LED on the Odroid-C2.
Signed-off-by Carlo Caione <[email protected]>
Yours,
Linus Walleij