arm64: meson-sm1: add support for Banana PI BPI-M5
Subsystems (2)
cover arm64: meson-sm1: add support for Banana PI BPI-M5
Banana Pi BPI-M5 is a credit card format SBC with the following features:
- Amlogic S905X3 quad core Cortex-A55
- Mali-G31 GPU
- 4GB LPDDR4
- 16GB eMMC flash
- 4 USB 3.0
- 1 GbE ethernet
- HDMI output
- 2x LEDS
- SDCard
- 2.5mm Jack with Stereo Audio + CVBS
- Infrared Received
- ADC Button
- GPIO Button
- 40 pins header + 3pins debug header
This also adds the missing toacodec node to enable internal audio codec.
Neil Armstrong (3):
arm64: dts: meson-sm1: add toacodec node
dt-bindings: arm: amlogic: add Banana PI M5 bindings
arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts
.../devicetree/bindings/arm/amlogic.yaml | 1 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-sm1-bananapi-m5.dts | 606 ++++++++++++++++++ arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 11 + 4 files changed, 619 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts
Signature · 1 line
2.25.1
PATCH 1/3 arm64: dts: meson-sm1: add toacodec node
Add toacodec node for Amlogic SM1 SoCs.
--- arch/arm64/boot/dts/amlogic/meson-sm1.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/amlogic/meson-sm1.dtsi +11 -0
@@ -401,6 +401,17 @@ tdmout_c: audio-controller@580 { status = "disabled"; }; + + toacodec: audio-controller@740 { + compatible = "amlogic,sm1-toacodec", + "amlogic,g12a-tohdmitx"; + reg = <0x0 0x740 0x0 0x4>; + #sound-dai-cells = <1>; + sound-name-prefix = "TOACODEC"; + resets = <&clkc_audio AUD_RESET_TOACODEC>; + status = "disabled"; + }; + tohdmitx: audio-controller@744 { compatible = "amlogic,sm1-tohdmitx", "amlogic,g12a-tohdmitx";
Signature · 1 line
2.25.1
PATCH 2/3 dt-bindings: arm: amlogic: add Banana PI M5 bindings
In reply to Neil ArmstrongAdd bindings for the Banana PI M5 board.
--- Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +1 -0
@@ -164,6 +164,7 @@ properties: - description: Boards with the Amlogic Meson SM1 S905X3/D3/Y3 SoC items: - enum: + - bananapi,bpi-m5 - hardkernel,odroid-c4 - hardkernel,odroid-hc4 - khadas,vim3l
Signature · 1 line
2.25.1
PATCH 3/3 arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts
In reply to Neil ArmstrongBanana Pi BPI-M5 is a credit card format SBC with the following features:
- Amlogic S905X3 quad core Cortex-A55
- Mali-G31 GPU
- 4GB LPDDR4
- 16GB eMMC flash
- 4 USB 3.0
- 1 GbE ethernet
- HDMI output
- 2x LEDS
- SDCard
- 2.5mm Jack with Stereo Audio + CVBS
- Infrared Received
- ADC Button
- GPIO Button
- 40 pins header + 3pins debug header
--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-sm1-bananapi-m5.dts | 606 ++++++++++++++++++ 2 files changed, 607 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
@@ -45,6 +45,7 @@ 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-gxm-wetek-core2.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-sm1-bananapi-m5.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-khadas-vim3l.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-c4.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +606 -0
606 lines not on this page · raw message
Signature · 1 line
2.25.1
Re: [PATCH 2/3] dt-bindings: arm: amlogic: add Banana PI M5 bindings
In reply to Neil ArmstrongQuoted 4 lines · Neil Armstrong
Add bindings for the Banana PI M5 board.
Signed-off-by Neil Armstrong <[email protected]>
Martin Blumenstingl
reviewerRe: [PATCH 3/3] arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts
In reply to Neil ArmstrongHi Neil,
thanks for adding support for the BPI-M5!
I had this on my TODO-list for a long time but didn't have enough time so far. so it's great to see this patch now :-)
On Thu, Apr 29, 2021 at 7:04 PM Neil Armstrong <[email protected]> wrote:
[...]
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 26
Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +7
-0+ adc_keys { + compatible = "adc-keys"; + io-channels = <&saradc 2>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + + button-onoff {
maybe just "key" (as you used below for SW1)?
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 42
Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +6
-0+ label = "SW3"; + linux,code = <BTN_3>; + press-threshold-microvolt = <1700000>; + }; + }; + /* TOFIX: handle CVBS_DET on SARADC channel 0 */
it's great to see that after many years at least some boards finally can detect whether the CVBS connector is plugged it
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 101
Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +4
-0+ memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + };
note to self: u-boot will update this from 1GiB to 4GiB
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 105
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +3
-0+ flash_1v8: regulator-flash_1v8 { + compatible = "regulator-fixed"; + regulator-name = "FLASH_1V8";
BPI-M5-SCH-V10-Release.pdf schematics are calling this EMMC_1V8. I suggest to use that name so it's easier to compare this with the schematics in the future
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 114
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +9
-0+ regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + }; + + dc_in: regulator-dc_in { + compatible = "regulator-fixed"; + regulator-name = "5V";
maybe use "DC_IN" here as well so the node-name matches what we see in userspace/kernel logs?
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 174
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +9
-0+ vddcpu: regulator-vddcpu { + /* + * SY8120B1ABC DC/DC Regulator. + */ + compatible = "pwm-regulator"; + + regulator-name = "VDDCPU"; + regulator-min-microvolt = <721000>; + regulator-max-microvolt = <1022000>;
the vendor .dts has:
regulator-min-microvolt = <690000>;
regulator-max-microvolt = <1050000>;
which also matches meson-sm1-sei610.dts (which uses the same regulator IC)
[...]
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 382
Quoted 7 lines
+ðmac {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +6
-0+ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&external_phy>; + amlogic,tx-delay-ns = <2>;
I haven't checked their u-boot code but some of the newer Amlogic BSPs seem to let the PHY add the TX delay (which is also what the netdev maintainers recommend)
that can be achieved by setting:
phy-mode = "rgmii-txid";
and deleting the "amlogic,tx-delay-ns" property
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 400
Quoted 4 lines
+&gpio {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +3
-0+ gpio-line-names = + /* GPIOZ */ + "", "", "", "", "", "", "", "",
GPIOZ_0 to GPIOZ_15:
- ETH_MDIO
- ETH_MDC
- ETH_RXCLK
- ETH_RX_DV
- ETH_RXD0
- ETH_RXD1
- ETH_RXD2
- ETH_RXD3
- ETH_TXCLK
- ETH_TXEN
- ETH_TXD0
- ETH_TXD1
- ETH_TXD2
- ETH_TXD3
- ETH_INTR
- ETH_NRST
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 403
Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +2
-0+ /* GPIOH */ + "", "", "", "", "",
GPIOH_0 to GPIOH_4:
- HDMI_SDA
- HDMI_SCL
- HDMI_HPD
- HDMI_CEC
- VL-RST_N
Quoted 1 line
+ "CON1-P36", /*
GPIOH_5*/
GPIOH_6 to GPIOH_8:
- VL-PWREN
- WiFi_3V3_1V8
- TFLASH_VDD_EN
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 408
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +3
-0+ /* BOOT */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "",
BOOT_0 to BOOT_13:
- eMMC_D0
- eMMC_D1
- eMMC_D2
- eMMC_D3
- eMMC_D4
- eMMC_D5
- eMMC_D6
- eMMC_D7
- eMMC_CLK
- (BOOT_9 is unused)
- eMMC_CMD
- (BOOT_11 is unused)
- eMMC_RST#
- eMMC_DS
Review
Quoted 2 lines
(quoted diff) +2
-0+ /* GPIOC */ + "", "", "", "", "", "", "", "",
GPIOC_0 to GPIOC_7:
- SD_D0_B
- SD_D1_B
- SD_D2_B
- SD_D3_B
- SD_CLK_B
- SD_CMD_B
- CARD_EN_DET
- (GPIOC_7 is unused)
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 460
Quoted 9 lines
+&gpio_ao {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +8
-0+ gpio-line-names = + /* GPIOAO */ + "DEBUG TX", /* GPIOAO_0 */ + "DEBUG RX", /* GPIOAO_1 */ + "SYS_LED2", /* GPIOAO_2 */ + "UPDATE_KEY", /* GPIOAO_3 */ + "CON1-P40", /* GPIOAO_4 */ + "",
GPIOAO_5 is IR_IN
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 468
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +8
-0+ "TF_3V3N_1V8_EN", /* GPIOAO_6 */ + "CON1-P35", /* GPIOAO_7 */ + "CON1-P12", /* GPIOAO_8 */ + "CON1-P37", /* GPIOAO_9 */ + "CON1-P38", /* GPIOAO_10 */ + "SYS_LED", /* GPIOAO_11 */ + /* GPIOE */ + "", "", "";
GPIOE_0 to GPIOOE_2:
- VDDEE_PWM
- VDDCPU_PWM
- TF_PWR_EN
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 606
Quoted 8 lines
+&usb2_phy0 {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +7
-0+ phy-supply = <&dc_in>; +}; + +&usb2_phy1 { + /* Enable the hub which is connected to this port */ + phy-supply = <&vl_pwr_en>; +};
I think technically we'd need to use AVDD18_USB here (that said, I chose the same approach as you are using here before..) USB bus devices (AFAIK) still need to be detected before any device-tree properties can be applied and there's (again AFAIK) still no pwrseq concept.
so I guess for now this is the way to go as there's enough comments about it in your patch
Best regards,
Martin
Re: [PATCH 3/3] arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts
Hi Martin,
Quoted 5 lines · Martin Blumenstingl
Hi Neil,
thanks for adding support for the BPI-M5!
I had this on my TODO-list for a long time but didn't have enough time so far. so it's great to see this patch now :-)
Same, so it's nearly done now !
Quoted 11 lines · Neil Armstrong
[...]
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 26
Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +7
-0+ adc_keys { + compatible = "adc-keys"; + io-channels = <&saradc 2>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + + button-onoff {maybe just "key" (as you used below for SW1)?
Fixed
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 42
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +6
-0+ label = "SW3"; + linux,code = <BTN_3>; + press-threshold-microvolt = <1700000>; + }; + }; + /* TOFIX: handle CVBS_DET on SARADC channel 0 */it's great to see that after many years at least some boards finally can detect whether the CVBS connector is plugged it
Yes, it's also available on Odroid-N2(+), so now no excuse for not supporting it !
Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 101
Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +4
-0+ memory@0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + };
Quoted 8 lines
note to self: u-boot will update this from 1GiB to 4GiB
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 105
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +3
-0+ flash_1v8: regulator-flash_1v8 { + compatible = "regulator-fixed"; + regulator-name = "FLASH_1V8";BPI-M5-SCH-V10-Release.pdf schematics are calling this
EMMC_1V8. I suggest to use that name so it's easier to compare this with the schematics in the future
Done
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 114
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +9
-0+ regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + vin-supply = <&vddao_3v3>; + regulator-always-on; + }; + + dc_in: regulator-dc_in { + compatible = "regulator-fixed"; + regulator-name = "5V";
Quoted 2 lines
maybe use "
DC_IN" here as well so the node-name matches what we see in userspace/kernel logs?
Done
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 174
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +9
-0+ vddcpu: regulator-vddcpu { + /* + * SY8120B1ABC DC/DC Regulator. + */ + compatible = "pwm-regulator"; + + regulator-name = "VDDCPU"; + regulator-min-microvolt = <721000>; + regulator-max-microvolt = <1022000>;
Quoted 4 lines
the vendor .dts has:
regulator-min-microvolt = <690000>;
regulator-max-microvolt = <1050000>;
which also matchesmeson-sm1-sei610.dts(which uses the same regulator IC)
Done, thanks
Quoted 9 lines
[...]
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 382
Quoted 7 lines
+ðmac {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +6
-0+ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&external_phy>; + amlogic,tx-delay-ns = <2>;
Quoted 6 lines
I haven't checked their u-boot code but some of the newer Amlogic BSPs seem to let the PHY add the TX delay (which is also what the netdev maintainers recommend)
that can be achieved by setting:
phy-mode = "rgmii-txid";
and deleting the "amlogic,tx-delay-ns" property
Done, but what about when we use mainline U-boot here ?
Quoted 89 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 400
Quoted 5 lines
+&gpio {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +3
-0+ gpio-line-names = + /* GPIOZ */ + "", "", "", "", "", "", "", "",
GPIOZ_0toGPIOZ_15:
-ETH_MDIO
-ETH_MDC
-ETH_RXCLK
-ETH_RX_DV
-ETH_RXD0
-ETH_RXD1
-ETH_RXD2
-ETH_RXD3
-ETH_TXCLK
-ETH_TXEN
-ETH_TXD0
-ETH_TXD1
-ETH_TXD2
-ETH_TXD3
-ETH_INTR
-ETH_NRSTarch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 403
Quoted 2 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +2
-0+ /* GPIOH */ + "", "", "", "", "",
GPIOH_0toGPIOH_4:
-HDMI_SDA
-HDMI_SCL
-HDMI_HPD
-HDMI_CEC
- VL-RST_NQuoted 1 line
+ "CON1-P36", /*
GPIOH_5*/
GPIOH_6toGPIOH_8:
- VL-PWREN
-WiFi_3V3_1V8
-TFLASH_VDD_ENarch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 408
Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +3
-0+ /* BOOT */ + "", "", "", "", "", "", "", "", + "", "", "", "", "", "", "", "",
BOOT_0toBOOT_13:
-eMMC_D0
-eMMC_D1
-eMMC_D2
-eMMC_D3
-eMMC_D4
-eMMC_D5
-eMMC_D6
-eMMC_D7
-eMMC_CLK
- (BOOT_9is unused)
-eMMC_CMD
- (BOOT_11is unused)
- eMMC_RST#
-eMMC_DSReview
Quoted 2 lines
(quoted diff) +2
-0+ /* GPIOC */ + "", "", "", "", "", "", "", "",
GPIOC_0toGPIOC_7:
-SD_D0_B
-SD_D1_B
-SD_D2_B
-SD_D3_B
-SD_CLK_B
-SD_CMD_B
-CARD_EN_DET
- (GPIOC_7is unused)arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 460
Quoted 9 lines
+&gpio_ao {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +8
-0+ gpio-line-names = + /* GPIOAO */ + "DEBUG TX", /* GPIOAO_0 */ + "DEBUG RX", /* GPIOAO_1 */ + "SYS_LED2", /* GPIOAO_2 */ + "UPDATE_KEY", /* GPIOAO_3 */ + "CON1-P40", /* GPIOAO_4 */ + "",
GPIOAO_5isIR_INarch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 468
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +8
-0+ "TF_3V3N_1V8_EN", /* GPIOAO_6 */ + "CON1-P35", /* GPIOAO_7 */ + "CON1-P12", /* GPIOAO_8 */ + "CON1-P37", /* GPIOAO_9 */ + "CON1-P38", /* GPIOAO_10 */ + "SYS_LED", /* GPIOAO_11 */ + /* GPIOE */ + "", "", "";
Quoted 4 lines
GPIOE_0toGPIOOE_2:
-VDDEE_PWM
-VDDCPU_PWM
-TF_PWR_EN
I was to lazy to do that, so thanks !
Quoted 16 lines
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts line 606
Quoted 9 lines
+&usb2_phy0 {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +7
-0+ phy-supply = <&dc_in>; +}; + +&usb2_phy1 { + /* Enable the hub which is connected to this port */ + phy-supply = <&vl_pwr_en>; +};I think technically we'd need to use
AVDD18_USBhere (that said, I chose the same approach as you are using here before..) USB bus devices (AFAIK) still need to be detected before any device-tree properties can be applied and there's (again AFAIK) still no pwrseq concept.
so I guess for now this is the way to go as there's enough comments about it in your patch
yeah we'll see if there is proper pwrseq method to fix that (and the hub reset)
Thanks for the review,
Neil
Quoted 5 lines
Best regards,
Martin
Rob Herring
maintainerRe: [PATCH 2/3] dt-bindings: arm: amlogic: add Banana PI M5 bindings
In reply to Neil ArmstrongQuoted 7 lines · Neil Armstrong
Add bindings for the Banana PI M5 board.
Signed-off-by Neil Armstrong <[email protected]>--- Documentation/devicetree/bindings/arm/amlogic.yaml | 1 + 1 file changed, 1 insertion(+)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:./Documentation/devicetree/bindings/arm/amlogic.yaml:167:1: [error] syntax error: found character '\t' that cannot start any token (syntax)
dtschema/dtc warnings/errors:
make[1]: *** Deleting file 'Documentation/devicetree/bindings/arm/amlogic.example.dts'
Traceback (most recent call last):
File "/usr/local/bin/dt-extract-example", line 45, in <module>
binding = yaml.load(open(args.yamlfile, encoding='utf-8').read())
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/main.py", line 421, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.8/dist-packages/ruamel/yaml/constructor.py", line 109, in get_single_data
node = self.composer.get_single_node()
File "_ruamel_yaml.pyx", line 706, in _ruamel_yaml.CParser.get_single_node
File "_ruamel_yaml.pyx", line 724, in _ruamel_yaml.CParser._compose_document
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 773, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 850, in _ruamel_yaml.CParser._compose_sequence_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 773, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 850, in _ruamel_yaml.CParser._compose_sequence_node
File "_ruamel_yaml.pyx", line 775, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 889, in _ruamel_yaml.CParser._compose_mapping_node
File "_ruamel_yaml.pyx", line 731, in _ruamel_yaml.CParser._compose_node
File "_ruamel_yaml.pyx", line 904, in _ruamel_yaml.CParser._parse_next_event
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character that cannot start any token
in "<unicode string>", line 167, column 1
make[1]: *** [Documentation/devicetree/bindings/Makefile:20: Documentation/devicetree/bindings/arm/amlogic.example.dts] Error 1 make[1]: *** Waiting for unfinished jobs...../Documentation/devicetree/bindings/arm/amlogic.yaml: while scanning for the next token
found character that cannot start any token
in "<unicode string>", line 167, column 1
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/arm/amlogic.yaml: ignoring, error parsing file
warning: no schema found in file: ./Documentation/devicetree/bindings/arm/amlogic.yaml
make: *** [Makefile:1414: dt_binding_check] Error 2
See https://patchwork.ozlabs.org/patch/1471788
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.
Martin Blumenstingl
reviewerRe: [PATCH 3/3] arm64: dts: meson-sm1: add Banana PI BPI-M5 board dts
In reply to Neil ArmstrongHi Neil,
On Fri, Apr 30, 2021 at 10:16 AM Neil Armstrong <[email protected]> wrote:
[...]
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
+ðmac {
arch/arm64/boot/dts/amlogic/meson-sm1-bananapi-m5.dts new file +6
-0+ pinctrl-0 = <ð_pins>, <ð_rgmii_pins>; + pinctrl-names = "default"; + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <&external_phy>; + amlogic,tx-delay-ns = <2>;
Quoted 8 lines
Quoted 6 lines
I haven't checked their u-boot code but some of the newer Amlogic BSPs seem to let the PHY add the TX delay (which is also what the netdev maintainers recommend)
that can be achieved by setting:
phy-mode = "rgmii-txid";
and deleting the "amlogic,tx-delay-ns" propertyDone, but what about when we use mainline U-boot here ?
I think it will work just fine if
- the PRG_ETH0/PRG_ETH1 register is programmed correctly (that's what we have in dwmac-meson8b), which according to [0] is partially (RX delay not being supported in u-boot yet) the case
- and the RTL8211F PHY driver can set the RX/TX delay on the PHY side, which according to [1] it can
So I have not tried it but I think it should just work
Best regards,
Martin
[0] https://source.denx.de/u-boot/u-boot/-/blob/798424e8573a6b642a1bb507d41c1f73e6736e2e/drivers/net/dwmac_meson8b.c
[1] https://source.denx.de/u-boot/u-boot/-/blob/fa6539a3dcbf269121ca64084cff4c146fcdaf19/drivers/net/phy/realtek.c#L204