arm64: dts: meson: add libretech-pc support
Subsystems (2)
Jerome Brunet
reviewercover arm64: dts: meson: add libretech-pc support
This patchset adds support the new libretech PC platform, aka tartiflette. There is two variants of this platform, one with the S905D and another with the S912.
Jerome Brunet (4):
arm64: dts: meson: gxl: add i2c C pins
arm64: defconfig: enable FUSB302 as module
dt-bindings: arm: amlogic: add libretech-pc bindings
arm64: dts: meson: add libretech-pc boards support
.../devicetree/bindings/arm/amlogic.yaml | 2 + arch/arm64/boot/dts/amlogic/Makefile | 2 + .../dts/amlogic/meson-gx-libretech-pc.dtsi | 362 ++++++++++++++++++ .../amlogic/meson-gxl-s905d-libretech-pc.dts | 16 + arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 + .../amlogic/meson-gxm-s912-libretech-pc.dts | 63 +++ arch/arm64/configs/defconfig | 2 + 7 files changed, 456 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-libretech-pc.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts
Signature · 1 line
2.23.0
Jerome Brunet
reviewerPATCH 1/4 arm64: dts: meson: gxl: add i2c C pins
Add the DV18 and DV19 pinmux setting for the i2c C of the gxl family
--- arch/arm64/boot/dts/amlogic/meson-gxl.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/amlogic/meson-gxl.dtsi +9 -0
@@ -533,6 +533,15 @@ }; }; + i2c_c_dv18_pins: i2c_c_dv18 { + mux { + groups = "i2c_sck_c_dv19", + "i2c_sda_c_dv18"; + function = "i2c_c"; + bias-disable; + }; + }; + eth_pins: eth_c { mux { groups = "eth_mdio",
Signature · 1 line
2.23.0
Jerome Brunet
reviewerPATCH 2/4 arm64: defconfig: enable FUSB302 as module
In reply to Jerome BrunetEnable the type C fusb302 driver as module
--- arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/configs/defconfig +2 -0
@@ -618,6 +618,8 @@ CONFIG_USB_GADGET=y CONFIG_USB_RENESAS_USBHS_UDC=m CONFIG_USB_RENESAS_USB3=m CONFIG_TYPEC=m +CONFIG_TYPEC_TCPM=m +CONFIG_TYPEC_FUSB302=m CONFIG_TYPEC_HD3SS3220=m CONFIG_MMC=y CONFIG_MMC_BLOCK_MINORS=32
Signature · 1 line
2.23.0
Jerome Brunet
reviewerPATCH 3/4 dt-bindings: arm: amlogic: add libretech-pc bindings
In reply to Jerome BrunetAdd the board bindings for the libretech PC form factor
--- Documentation/devicetree/bindings/arm/amlogic.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +2 -0
@@ -104,6 +104,7 @@ properties: - enum: - amlogic,p230 - amlogic,p231 + - libretech,aml-s905d-pc - phicomm,n1 - const: amlogic,s905d - const: amlogic,meson-gxl
@@ -115,6 +116,7 @@ properties: - amlogic,q201 - khadas,vim2 - kingnovel,r-box-pro + - libretech,aml-s912-pc - nexbox,a1 - tronsmart,vega-s96 - const: amlogic,s912
Signature · 1 line
2.23.0
Jerome Brunet
reviewerPATCH 4/4 arm64: dts: meson: add libretech-pc boards support
In reply to Jerome BrunetAdd support for the the amlogic libretech-pc platform, aka tartiflette. There is 2 variants of the platform, one with the s905d, the other with the s912.
--- arch/arm64/boot/dts/amlogic/Makefile | 2 + .../dts/amlogic/meson-gx-libretech-pc.dtsi | 362 ++++++++++++++++++ .../amlogic/meson-gxl-s905d-libretech-pc.dts | 16 + .../amlogic/meson-gxm-s912-libretech-pc.dts | 63 +++ 4 files changed, 443 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-libretech-pc.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts
arch/arm64/boot/dts/amlogic/Makefile +2 -0
@@ -29,11 +29,13 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-phicomm-n1.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s805x-p241.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-p281.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905w-tx3-mini.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905d-libretech-pc.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-q201.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-libretech-pc.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-vega-s96.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +362 -0
362 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-libretech-pc.dts new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2019 BayLibre SAS. All rights reserved. + * Author: Jerome Brunet <[email protected]> + */ + +/dts-v1/; + +#include "meson-gxl-s905d.dtsi" +#include "meson-gx-libretech-pc.dtsi" + +/ { + compatible = "libretech,aml-s905d-pc", "amlogic,s905d", + "amlogic,meson-gxl"; + model = "Libre Computer AML-S905D-PC"; +};
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts new file +63 -0
63 lines not on this page · raw message
Signature · 1 line
2.23.0
Martin Blumenstingl
reviewerRe: [PATCH 4/4] arm64: dts: meson: add libretech-pc boards support
Hi Jerome,
this is looking good overall - I have some questions / nit-picks below
On Fri, Dec 6, 2019 at 11:02 AM Jerome Brunet <[email protected]> wrote:
[...]
Quoted 1 line
+
adc_keys{
on most boards we use "adc-keys" instead of "adc_keys"
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 20
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +3
-0+ button-onoff { + label = "On/Off"; + linux,code = <KEY_VENDOR>;
based on the label I assumed that the code is KEY_POWER why is KEY_VENDOR the better choice here?
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 37
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +3
-0+ cvbs-connector { + compatible = "composite-video-connector"; + status = "disabled";
is there CVBS on the board? if I remember correctly the VPU driver works fine when omitting the CVBS connector
so if the board doesn't have it you may drop the whole node instead of keeping it disabled
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 99
Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +5
-0+ leds { + compatible = "gpio-leds"; + + green { + label = "librecomputer:green:disk";
you can use the "function" and "color" properties instead of the (now deprecated) "label"
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 201
Quoted 3 lines
+&external_mdio {
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +2
-0+ external_phy: ethernet-phy@0 { + reg = <0>;
it would be great to have a comment above which PHY is used on this board
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 206
Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +5
-0+ max-speed = <1000>; + reset-assert-us = <10000>; + reset-deassert-us = <30000>; + reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio_intc>;
a comment like /* MAC_INTR on GPIOZ_15 */ would be great here
Quoted 1 line
+ interrupts = <25
IRQ_TYPE_LEVEL_LOW>;
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 223
Quoted 13 lines
+&pinctrl_periphs {
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +12
-0+ /* + * Make sure the reset pin of the usb HUB is driven high to take + * it out of reset. + */ + usb1_rst_pins: usb1_rst_irq { + mux { + groups = "GPIODV_3"; + function = "gpio_periphs"; + bias-disable; + output-high; + }; + };
on other boards (like Odroid-C2) we use a GPIO hog for this. I'm not sure which one is better
[...]
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts line 32
Quoted 4 lines
+&pinctrl_periphs {
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts new file +3
-0+ /* + * Make sure the irq pin of the TYPE C controller is not driven + * by the SoC.
is this because the SoC default configuration pulls the IRQ line LOW, which then generates "phantom" IRQs?
[...]
Quoted 1 line
+ fusb302@22 {
typec-portc@22
[...]
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts line 53
Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts new file +2
-0+ interrupt-parent = <&gpio_intc>; + interrupts = <59 IRQ_TYPE_LEVEL_LOW>;
a comment above with the GPIO number would be great
Martin
Jerome Brunet
reviewerRe: [PATCH 4/4] arm64: dts: meson: add libretech-pc boards support
Quoted 7 lines · Martin Blumenstingl
Hi Jerome,
this is looking good overall - I have some questions / nit-picks below
On Fri, Dec 6, 2019 at 11:02 AM Jerome Brunet <[email protected]> wrote:
[...]Quoted 1 line
+
adc_keys{
Quoted 9 lines
on most boards we use "adc-keys" instead of "
adc_keys"[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 20
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +3
-0+ button-onoff { + label = "On/Off"; + linux,code = <KEY_VENDOR>;based on the label I assumed that the code is
KEY_POWERwhy isKEY_VENDORthe better choice here?
My bad - The button is labeled with "UPDATE" ... nothing really matches in the KEYs ... so VENDOR it is.
I have just copy/pasted the section and forgot to update the rest
Quoted 8 lines
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 37
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +3
-0+ cvbs-connector { + compatible = "composite-video-connector"; + status = "disabled";is there CVBS on the board? if I remember correctly the VPU driver works fine when omitting the CVBS connector
so if the board doesn't have it you may drop the whole node instead of keeping it disabled
The CVBS output could be provided on one the GPIO header. Since it is not really standard, I prefer to keep off and leave to option to easily turn it on if someone wants to use it.
I'll had a comment for that.
Quoted 38 lines
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 99
Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +5
-0+ leds { + compatible = "gpio-leds"; + + green { + label = "librecomputer:green:disk";you can use the "function" and "color" properties instead of the (now deprecated) "label"
[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 201
Quoted 3 lines
+&external_mdio {
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +2
-0+ external_phy: ethernet-phy@0 { + reg = <0>;it would be great to have a comment above which PHY is used on this board
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 206
Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +5
-0+ max-speed = <1000>; + reset-assert-us = <10000>; + reset-deassert-us = <30000>; + reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio_intc>;a comment like /*
MAC_INTRonGPIOZ_15*/ would be great hereQuoted 1 line
+ interrupts = <25
IRQ_TYPE_LEVEL_LOW>;[...]
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi line 223
Quoted 13 lines
+&pinctrl_periphs {
arch/arm64/boot/dts/amlogic/meson-gx-libretech-pc.dtsi new file +12
-0+ /* + * Make sure the reset pin of the usb HUB is driven high to take + * it out of reset. + */ + usb1_rst_pins: usb1_rst_irq { + mux { + groups = "GPIODV_3"; + function = "gpio_periphs"; + bias-disable; + output-high; + }; + };
Quoted 3 lines
on other boards (like Odroid-C2) we use a GPIO hog for this. I'm not sure which one is better
This is at least tied to the related device.
I have discussed "hog" vs "pinctrl" matter with Bartosz Golaszewski and we could not find any reason not proceed with pinctrl when possible.
Quoted 7 lines
[...]
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts line 32
Quoted 4 lines
+&pinctrl_periphs {
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts new file +3
-0+ /* + * Make sure the irq pin of the TYPE C controller is not driven + * by the SoC.is this because the SoC default configuration pulls the IRQ line LOW, which then generates "phantom" IRQs?
No. It is just making sure the pin is claimed and properly configured.
Since our interrupt and gpio controller are completly de-coupled it is not necessarily the case without it (... and yes, the same is true for the other device using gpio irqs)
Quoted 12 lines
[...]
Quoted 1 line
+ fusb302@22 {
typec-portc@22
[...]
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts line 53
Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-gxm-s912-libretech-pc.dts new file +2
-0+ interrupt-parent = <&gpio_intc>; + interrupts = <59 IRQ_TYPE_LEVEL_LOW>;a comment above with the GPIO number would be great
Martin