Sync NXP LS1028A-RDB device trees between U-Boot and Linux
Subsystems (3)
v2 cover Sync NXP LS1028A-RDB device trees between U-Boot and Linux
The changes were intended to be minimal, but unfortunately I discovered some other stuff as well:
- we need to make some changes to the compatible strings of RTC devices and I2C muxes. This has ramifications to other NXP boards which were also updated.
- I broke Ethernet on LS1028A boards through a patch that is currently in Ramon's tree.
Therefore this patch set is a bit larger than would be otherwise expected.
The Linux device tree changes have just been posted by me here and are currently in flight, but they are rather small so I don't expect too much pushback on them:
https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m6f63c92e75fa79a01144b2c2c6dc4776e7971395
I've also triggered an Azure CI build with these changes:
https://github.com/u-boot/u-boot/pull/102
and it appears that 2 tests fail due to external causes:
1. https://dev.azure.com/u-boot/u-boot/_build/results?buildId=3283&view=logs&jobId=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&j=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&t=c864b9c4-48aa-5e04-3916-54070f85e156
2. https://dev.azure.com/u-boot/u-boot/_build/results?buildId=3283&view=logs&j=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&t=c864b9c4-48aa-5e04-3916-54070f85e156&l=27
Unable to find image 'trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021' locally
docker: Error response from daemon: Head "https://registry-1.docker.io/v2/trini/u-boot-gitlab-ci-runner/manifests/focal-20211006-14Nov2021": received unexpected HTTP status: 502 Bad Gateway.
The other tests seem to pass.
Vladimir Oltean (16):
i2c: muxes: pca954x: add PCA9847 variant
rtc: pcf2127: sync with Linux compatible strings
arm: dts: ls1088a-qds: use Linux compatible string for RTC
arm: dts: ls1088a-rdb: use Linux compatible string for RTC
arm: dts: lx2160a-qds: use Linux compatible string for RTC
arm: dts: ls1028a-qds: use Linux compatible string for RTC
arm: dts: ls1028a-rdb: use Linux compatible string for RTC
arm: dts: lx2160a-rdb: use Linux compatible string for RTC
rtc: pcf2127: remove U-Boot specific compatible string
arm: dts: ls1028a-rdb: sort nodes alphabetically
arm: dts: ls1028a-rdb: sync Ethernet device tree nodes with Linux
arm: dts: ls1028a-rdb: disable DSPI nodes
arm: dts: ls1028a-rdb: disable I2C buses 1 through 7
arm: dts: ls1028a-rdb: enable PCIe controllers from U-Boot dtsi
arm: dts: ls1028a-rdb: sync device tree with Linux
arm: dts: ls1028a-qds: declare in-band autoneg for Ethernet ports
.../dts/fsl-ls1028a-qds-1xxx-sch-30842.dtsi | 1 + .../dts/fsl-ls1028a-qds-8xxx-sch-24801.dtsi | 1 + .../fsl-ls1028a-qds-9999-sch-24801-LBRW.dtsi | 4 + .../dts/fsl-ls1028a-qds-9999-sch-24801.dtsi | 4 + .../fsl-ls1028a-qds-x3xx-sch-30841-LBRW.dtsi | 4 + .../fsl-ls1028a-qds-x5xx-sch-28021-LBRW.dtsi | 4 + arch/arm/dts/fsl-ls1028a-qds.dtsi | 2 +- arch/arm/dts/fsl-ls1028a-rdb-u-boot.dtsi | 15 + arch/arm/dts/fsl-ls1028a-rdb.dts | 295 ++++++++++++------ arch/arm/dts/fsl-ls1088a-qds.dtsi | 2 +- arch/arm/dts/fsl-ls1088a-rdb.dts | 2 +- arch/arm/dts/fsl-lx2160a-qds.dtsi | 2 +- arch/arm/dts/fsl-lx2160a-rdb.dts | 2 +- drivers/i2c/muxes/pca954x.c | 9 +- drivers/rtc/pcf2127.c | 4 +- 15 files changed, 242 insertions(+), 109 deletions(-) create mode 100644 arch/arm/dts/fsl-ls1028a-rdb-u-boot.dtsi
Signature · 1 line
2.25.1
PATCH v2 1/16 i2c: muxes: pca954x: add PCA9847 variant
This seems to be very similar to the already existing PCA9547, save for the fact that it supports 0.8V and doesn't support 5V. In fact, it is so similar to the PCA9547 that the NXP LS1028A-RDB board has been driving this chip using a "nxp,pca9547" compatible string.
Create a new compatible for the PCA9847 (which is the same as in Linux) and define the same operating parameters for it as for PCA9547.
--- drivers/i2c/muxes/pca954x.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/i2c/muxes/pca954x.c +8 -1
@@ -23,7 +23,8 @@ enum pca_type {PCA9546 ,PCA9547 ,PCA9548 , -PCA9646 +PCA9646 , + PCA9847, }; struct chip_desc {
@@ -68,6 +69,11 @@ static const struct chip_desc chips[] = { .muxtype = pca954x_isswi, .width = 4, }, + [PCA9847] = { + .enable = 0x8, + .muxtype = pca954x_ismux, + .width = 8, + }, }; static int pca954x_deselect(struct udevice *mux, struct udevice *bus,
@@ -106,6 +112,7 @@ static const struct udevice_id pca954x_ids[] = { { .compatible = "nxp,pca9547", .data = PCA9547 }, { .compatible = "nxp,pca9548", .data = PCA9548 }, { .compatible = "nxp,pca9646", .data = PCA9646 }, + { .compatible = "nxp,pca9847", .data = PCA9847 }, { } };
Signature · 1 line
2.25.1
PATCH v2 2/16 rtc: pcf2127: sync with Linux compatible strings
In reply to Vladimir OlteanAllow this driver to be used by boards which inherit their device trees from Linux. Compatibility is temporarily retained with the old compatible string which is U-Boot specific, and will be removed after a few changes.
--- drivers/rtc/pcf2127.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/rtc/pcf2127.c +3 -0
@@ -121,6 +121,9 @@ static const struct rtc_ops pcf2127_rtc_ops = {static const struct udevice_id pcf2127_rtc_ids[] = { { .compatible ="pcf2127-rtc" }, + { .compatible ="nxp,pcf2127" }, + { .compatible ="nxp,pcf2129" }, + { .compatible ="nxp,pca2129" }, { } };
Signature · 1 line
2.25.1
PATCH v2 3/16 arm: dts: ls1088a-qds: use Linux compatible string for RTC
In reply to Vladimir OlteanDuring the LS1028A-RDB sync with Linux device trees, it was observed that the same RTC is present on the two boards, and the wrong compatible string is used in both places. This change updates the RTC from the LS1088A-QDS to use the compatible string that was established in Linux.
--- arch/arm/dts/fsl-ls1088a-qds.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/fsl-ls1088a-qds.dtsi +1 -1
@@ -88,7 +88,7 @@ reg = <0x3>; rtc@51 { - compatible = "pcf2127-rtc"; + compatible = "nxp,pcf2129"; reg = <0x51>; }; };
Signature · 1 line
2.25.1
PATCH v2 4/16 arm: dts: ls1088a-rdb: use Linux compatible string for RTC
In reply to Vladimir OlteanDuring the LS1028A-RDB sync with Linux device trees, it was observed that the same RTC is present on the two boards, and the wrong compatible string is used in both places. This change updates the RTC from the LS1088A-RDB to use the compatible string that was established in Linux.
--- arch/arm/dts/fsl-ls1088a-rdb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/fsl-ls1088a-rdb.dts +1 -1
@@ -135,7 +135,7 @@ reg = <0x3>; rtc@51 { - compatible = "pcf2127-rtc"; + compatible = "nxp,pcf2129"; reg = <0x51>; }; };
Signature · 1 line
2.25.1
PATCH v2 5/16 arm: dts: lx2160a-qds: use Linux compatible string for RTC
In reply to Vladimir OlteanDuring the LS1028A-RDB sync with Linux device trees, it was observed that the same RTC is present on the two boards, and the wrong compatible string is used in both places. This change updates the RTC from the LX2160A-QDS to use the compatible string that was established in Linux.
--- arch/arm/dts/fsl-lx2160a-qds.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/fsl-lx2160a-qds.dtsi +1 -1
@@ -250,7 +250,7 @@ reg = <0x3>; rtc@51 { - compatible = "pcf2127-rtc"; + compatible = "nxp,pcf2129"; reg = <0x51>; }; };
Signature · 1 line
2.25.1
PATCH v2 6/16 arm: dts: ls1028a-qds: use Linux compatible string for RTC
In reply to Vladimir OlteanThe LS1028A-QDS board won't be synced with the Linux device trees right now, since those are currently still in progress (Ethernet is missing).
However, while we're at converting the RDB, it can be observed that the same RTC is present on the two boards, and the wrong compatible string is used in both places. This change updates the RTC from the QDS to use the compatible string that was established in Linux.
--- arch/arm/dts/fsl-ls1028a-qds.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/fsl-ls1028a-qds.dtsi +1 -1
@@ -195,7 +195,7 @@ status = "okay"; rtc@51 { - compatible = "pcf2127-rtc"; + compatible = "nxp,pcf2129"; reg = <0x51>; }; };
Signature · 1 line
2.25.1
PATCH v2 7/16 arm: dts: ls1028a-rdb: use Linux compatible string for RTC
In reply to Vladimir OlteanDuring this board's sync with Linux device trees, it was observed that it doesn't use the same compatible string for the RTC node as in U-Boot. This change makes the RTC compatible strings match, for a smoother sync.
--- arch/arm/dts/fsl-ls1028a-rdb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/fsl-ls1028a-rdb.dts +1 -1
@@ -75,7 +75,7 @@ reg = <0x3>; rtc@51 { - compatible = "pcf2127-rtc"; + compatible = "nxp,pcf2129"; reg = <0x51>; }; };
Signature · 1 line
2.25.1
PATCH v2 8/16 arm: dts: lx2160a-rdb: use Linux compatible string for RTC
In reply to Vladimir OlteanDuring the LS1028A-RDB sync with Linux device trees, it was observed that the same RTC is present on the two boards, and the wrong compatible string is used in both places. This change updates the RTC from the LX2160A-RDB to use the compatible string that was established in Linux.
--- arch/arm/dts/fsl-lx2160a-rdb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/dts/fsl-lx2160a-rdb.dts +1 -1
@@ -117,7 +117,7 @@ status = "okay"; rtc@51 { - compatible = "pcf2127-rtc"; + compatible = "nxp,pcf2129"; reg = <0x51>; }; };
Signature · 1 line
2.25.1
PATCH v2 9/16 rtc: pcf2127: remove U-Boot specific compatible string
In reply to Vladimir OlteanNow that all in-tree boards have been converted to the compatible strings from Linux, delete the support for the ad-hoc "pcf2127-rtc" one.
--- drivers/rtc/pcf2127.c | 1 - 1 file changed, 1 deletion(-)
drivers/rtc/pcf2127.c +0 -1
@@ -120,7 +120,6 @@ static const struct rtc_ops pcf2127_rtc_ops = { };static const struct udevice_id pcf2127_rtc_ids[] = { - { .compatible ="pcf2127-rtc" }, { .compatible ="nxp,pcf2127" }, { .compatible ="nxp,pcf2129" }, { .compatible ="nxp,pca2129" },
Signature · 1 line
2.25.1
PATCH v2 10/16 arm: dts: ls1028a-rdb: sort nodes alphabetically
In reply to Vladimir OlteanThe nodes in the NXP LS1028A-RDB device tree are out of order, regroup them alphabetically to have a simple delta when the Linux device tree is brought in.
--- arch/arm/dts/fsl-ls1028a-rdb.dts | 110 +++++++++++++++---------------- 1 file changed, 55 insertions(+), 55 deletions(-)
arch/arm/dts/fsl-ls1028a-rdb.dts +55 -55
@@ -36,6 +36,48 @@ status = "okay"; }; +&duart0 { + status = "okay"; +}; + +&duart1 { + status = "okay"; +}; + +&enetc_mdio_pf3 { + status = "okay"; + rdb_phy0: phy@2 { + reg = <2>; + }; + + /* VSC8514 QSGMII PHY */ + sw_phy0: phy@10 { + reg = <0x10>; + }; + + sw_phy1: phy@11 { + reg = <0x11>; + }; + + sw_phy2: phy@12 { + reg = <0x12>; + }; + + sw_phy3: phy@13 { + reg = <0x13>; + }; +}; + +&enetc_port0 { + status = "okay"; + phy-mode = "sgmii"; + phy-handle = <&rdb_phy0>; +}; + +&enetc_port2 { + status = "okay"; +}; + &esdhc { status = "okay"; };
@@ -110,44 +152,6 @@ status = "okay"; }; -&sata { - status = "okay"; -}; - -&duart0 { - status = "okay"; -}; - -&duart1 { - status = "okay"; -}; - -&pcie1 { - status = "okay"; -}; - -&pcie2 { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&usb1 { - status = "okay"; -}; - -&enetc_port0 { - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&rdb_phy0>; -}; - -&enetc_port2 { - status = "okay"; -}; - &mscc_felix { status = "okay"; };
@@ -185,26 +189,22 @@ status = "okay"; }; -&enetc_mdio_pf3 { +&pcie1 { status = "okay"; - rdb_phy0: phy@2 { - reg = <2>; - }; +}; - /* VSC8514 QSGMII PHY */ - sw_phy0: phy@10 { - reg = <0x10>; - }; +&pcie2 { + status = "okay"; +}; - sw_phy1: phy@11 { - reg = <0x11>; - }; +&sata { + status = "okay"; +}; - sw_phy2: phy@12 { - reg = <0x12>; - }; +&usb0 { + status = "okay"; +}; - sw_phy3: phy@13 { - reg = <0x13>; - }; +&usb1 { + status = "okay"; };
Signature · 1 line
2.25.1
PATCH v2 11/16 arm: dts: ls1028a-rdb: sync Ethernet device tree nodes with Linux
In reply to Vladimir OlteanIn a bit of a blunder, the blamed commit in the Fixes: tag below made the mscc_felix switch driver look at the 'managed = "in-band-status"' device tree property, forgetting that the U-Boot device tree had not been updated to include that property, whereas the Linux one does.
The switch is therefore described in the device tree as not requiring in-band autoneg, but the PHY driver for VSC8514 (drivers/net/phy/mscc.c) still enables that feature. This results in a mismatch => no traffic.
This patch is a copy-paste of the Ethernet device tree nodes from Linux, which resolves that issue. The device tree update also renames the Ethernet PHY labels.
--- arch/arm/dts/fsl-ls1028a-rdb.dts | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-)
arch/arm/dts/fsl-ls1028a-rdb.dts +18 -14
@@ -45,33 +45,33 @@ }; &enetc_mdio_pf3 { - status = "okay"; - rdb_phy0: phy@2 { - reg = <2>; + sgmii_phy0: ethernet-phy@2 { + reg = <0x2>; }; - /* VSC8514 QSGMII PHY */ - sw_phy0: phy@10 { + /* VSC8514 QSGMII quad PHY */ + qsgmii_phy0: ethernet-phy@10 { reg = <0x10>; }; - sw_phy1: phy@11 { + qsgmii_phy1: ethernet-phy@11 { reg = <0x11>; }; - sw_phy2: phy@12 { + qsgmii_phy2: ethernet-phy@12 { reg = <0x12>; }; - sw_phy3: phy@13 { + qsgmii_phy3: ethernet-phy@13 { reg = <0x13>; }; }; &enetc_port0 { - status = "okay"; + phy-handle = <&sgmii_phy0>; phy-mode = "sgmii"; - phy-handle = <&rdb_phy0>; + managed = "in-band-status"; + status = "okay"; }; &enetc_port2 {
@@ -158,28 +158,32 @@ &mscc_felix_port0 { label = "swp0"; - phy-handle = <&sw_phy0>; + managed = "in-band-status"; + phy-handle = <&qsgmii_phy0>; phy-mode = "qsgmii"; status = "okay"; }; &mscc_felix_port1 { label = "swp1"; - phy-handle = <&sw_phy1>; + managed = "in-band-status"; + phy-handle = <&qsgmii_phy1>; phy-mode = "qsgmii"; status = "okay"; }; &mscc_felix_port2 { label = "swp2"; - phy-handle = <&sw_phy2>; + managed = "in-band-status"; + phy-handle = <&qsgmii_phy2>; phy-mode = "qsgmii"; status = "okay"; }; &mscc_felix_port3 { label = "swp3"; - phy-handle = <&sw_phy3>; + managed = "in-band-status"; + phy-handle = <&qsgmii_phy3>; phy-mode = "qsgmii"; status = "okay"; };
Signature · 1 line
2.25.1
PATCH v2 12/16 arm: dts: ls1028a-rdb: disable DSPI nodes
In reply to Vladimir OlteanThere is no SPI peripheral on the LS1028A-RDB, therefore no reason to enable these nodes in the U-Boot device tree (and Linux does not enable them either).
--- arch/arm/dts/fsl-ls1028a-rdb.dts | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm/dts/fsl-ls1028a-rdb.dts +0 -12
@@ -24,18 +24,6 @@ }; }; -&dspi0 { - status = "okay"; -}; - -&dspi1 { - status = "okay"; -}; - -&dspi2 { - status = "okay"; -}; - &duart0 { status = "okay"; };
Signature · 1 line
2.25.1
PATCH v2 13/16 arm: dts: ls1028a-rdb: disable I2C buses 1 through 7
In reply to Vladimir OlteanThere is no I2C peripheral on these buses on the reference design board, and the Linux device tree does not enable them either.
--- arch/arm/dts/fsl-ls1028a-rdb.dts | 28 ---------------------------- 1 file changed, 28 deletions(-)
arch/arm/dts/fsl-ls1028a-rdb.dts +0 -28
@@ -112,34 +112,6 @@ }; }; -&i2c1 { - status = "okay"; -}; - -&i2c2 { - status = "okay"; -}; - -&i2c3 { - status = "okay"; -}; - -&i2c4 { - status = "okay"; -}; - -&i2c5 { - status = "okay"; -}; - -&i2c6 { - status = "okay"; -}; - -&i2c7 { - status = "okay"; -}; - &mscc_felix { status = "okay"; };
Signature · 1 line
2.25.1
PATCH v2 14/16 arm: dts: ls1028a-rdb: enable PCIe controllers from U-Boot dtsi
In reply to Vladimir OlteanReuse the scheme implemented by the Kontron SL28 boards in commit d08011d7f9b4 ("arm: dts: ls1028a: disable the PCIe controller by default") and move the 'status = "okay"' lines for the PCIe controllers inside a separate U-Boot dtsi for the LS1028A-RDB board. This way, the existing Linux device tree can simply be dropped in.
--- arch/arm/dts/fsl-ls1028a-rdb-u-boot.dtsi | 15 +++++++++++++++ arch/arm/dts/fsl-ls1028a-rdb.dts | 9 +-------- 2 files changed, 16 insertions(+), 8 deletions(-) create mode 100644 arch/arm/dts/fsl-ls1028a-rdb-u-boot.dtsi
arch/arm/dts/fsl-ls1028a-rdb-u-boot.dtsi new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* Copyright 2021 NXP */ + +/* + * u-boot will enable the device in the linux device tree in place. Because + * we are using the linux device tree, we have to enable the PCI controller + * ourselves. + */ +&pcie1 { + status = "okay"; +}; + +&pcie2 { + status = "okay"; +};
arch/arm/dts/fsl-ls1028a-rdb.dts +1 -8
@@ -9,6 +9,7 @@ /dts-v1/; #include "fsl-ls1028a.dtsi" +#include "fsl-ls1028a-rdb-u-boot.dtsi" / { model = "NXP Layerscape 1028a RDB Board";
@@ -153,14 +154,6 @@ status = "okay"; }; -&pcie1 { - status = "okay"; -}; - -&pcie2 { - status = "okay"; -}; - &sata { status = "okay"; };
Signature · 1 line
2.25.1
Re: [PATCH v2 14/16] arm: dts: ls1028a-rdb: enable PCIe controllers from U-Boot dtsi
Am 2021-12-07 21:20, schrieb Vladimir Oltean:
arch/arm/dts/fsl-ls1028a-rdb.dts line 12
Quoted 9 lines
arch/arm/dts/fsl-ls1028a-rdb.dts +1
-0@@ -9,6 +9,7 @@ /dts-v1/; #include "fsl-ls1028a.dtsi" +#include "fsl-ls1028a-rdb-u-boot.dtsi"
This shouldn't be needed, as as the -u-boot.dtsi is automagically included (at least at board level dtbs).
-michael
PATCH v2 15/16 arm: dts: ls1028a-rdb: sync device tree with Linux
In reply to Vladimir OlteanAllow device trees to be reused between Linux and U-Boot. The source for these device trees is today's linux-next plus these changes that have been made so that the sources can be shared. These other patches are currently in flight:
https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m6f63c92e75fa79a01144b2c2c6dc4776e7971395
--- arch/arm/dts/fsl-ls1028a-rdb.dts | 158 ++++++++++++++++++++++++++++--- 1 file changed, 146 insertions(+), 12 deletions(-)
arch/arm/dts/fsl-ls1028a-rdb.dts +146 -12
@@ -1,20 +1,28 @@ -// SPDX-License-Identifier: GPL-2.0+ OR X11 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* - * NXP ls1028ARDB device tree source + * Device Tree file for NXP LS1028A RDB Board. * - * Copyright 2019 NXP + * Copyright 2018-2021 NXP + * + * Harninder Rai <[email protected]> * */ /dts-v1/; - #include "fsl-ls1028a.dtsi" #include "fsl-ls1028a-rdb-u-boot.dtsi" / { - model = "NXP Layerscape 1028a RDB Board"; + model = "LS1028A RDB Board"; compatible = "fsl,ls1028a-rdb", "fsl,ls1028a"; + aliases { + crypto = &crypto; + serial0 = &duart0; + serial1 = &duart1; + mmc0 = &esdhc; + mmc1 = &esdhc1; + rtc1 = &ftm_alarm0; spi0 = &fspi; ethernet0 = &enetc_port0; ethernet1 = &enetc_port2;
@@ -23,6 +31,83 @@ ethernet4 = &mscc_felix_port2; ethernet5 = &mscc_felix_port3; }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory@80000000 { + device_type = "memory"; + reg = <0x0 0x80000000 0x1 0x0000000>; + }; + + sys_mclk: clock-mclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <25000000>; + }; + + reg_1p8v: regulator-1p8v { + compatible = "regulator-fixed"; + regulator-name = "1P8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + sb_3v3: regulator-sb3v3 { + compatible = "regulator-fixed"; + regulator-name = "3v3_vbus"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,format = "i2s"; + simple-audio-card,widgets = + "Microphone", "Microphone Jack", + "Headphone", "Headphone Jack", + "Speaker", "Speaker Ext", + "Line", "Line In Jack"; + simple-audio-card,routing = + "MIC_IN", "Microphone Jack", + "Microphone Jack", "Mic Bias", + "LINE_IN", "Line In Jack", + "Headphone Jack", "HP_OUT", + "Speaker Ext", "LINE_OUT"; + + simple-audio-card,cpu { + sound-dai = <&sai4>; + frame-master; + bitclock-master; + }; + + simple-audio-card,codec { + sound-dai = <&sgtl5000>; + frame-master; + bitclock-master; + system-clock-frequency = <25000000>; + }; + }; +}; + +&can0 { + status = "okay"; + + can-transceiver { + max-bitrate = <5000000>; + }; +}; + +&can1 { + status = "okay"; + + can-transceiver { + max-bitrate = <5000000>; + }; }; &duart0 {
@@ -68,43 +153,83 @@ }; &esdhc { + sd-uhs-sdr104; + sd-uhs-sdr50; + sd-uhs-sdr25; + sd-uhs-sdr12; status = "okay"; }; &esdhc1 { - status = "okay"; mmc-hs200-1_8v; + mmc-hs400-1_8v; + bus-width = <8>; + status = "okay"; }; &fspi { status = "okay"; mt35xu02g0: flash@0 { + compatible = "jedec,spi-nor"; #address-cells = <1>; #size-cells = <1>; - compatible = "jedec,spi-nor"; spi-max-frequency = <50000000>; + /* The following setting enables 1-1-8 (CMD-ADDR-DATA) mode */ + spi-rx-bus-width = <8>; /* 8 SPI Rx lines */ + spi-tx-bus-width = <1>; /* 1 SPI Tx line */ reg = <0>; - spi-rx-bus-width = <8>; - spi-tx-bus-width = <1>; }; }; &i2c0 { status = "okay"; - i2c-mux@77 { - - compatible = "nxp,pca9547"; + i2c-mux@77 { + compatible = "nxp,pca9847"; reg = <0x77>; #address-cells = <1>; #size-cells = <0>; + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x1>; + + sgtl5000: audio-codec@a { + #sound-dai-cells = <0>; + compatible = "fsl,sgtl5000"; + reg = <0xa>; + VDDA-supply = <®_1p8v>; + VDDIO-supply = <®_1p8v>; + clocks = <&sys_mclk>; + sclk-strength = <3>; + }; + }; + + i2c@2 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0x02>; + + current-monitor@40 { + compatible = "ti,ina220"; + reg = <0x40>; + shunt-resistor = <500>; + }; + }; + i2c@3 { #address-cells = <1>; #size-cells = <0>; reg = <0x3>; + temperature-sensor@4c { + compatible = "nxp,sa56004"; + reg = <0x4c>; + vcc-supply = <&sb_3v3>; + }; + rtc@51 { compatible = "nxp,pcf2129"; reg = <0x51>;
@@ -154,6 +279,14 @@ status = "okay"; }; +&optee { + status = "okay"; +}; + +&sai4 { + status = "okay"; +}; + &sata { status = "okay"; };
@@ -163,5 +296,6 @@ }; &usb1 { + dr_mode = "otg"; status = "okay"; };
Signature · 1 line
2.25.1
PATCH v2 16/16 arm: dts: ls1028a-qds: declare in-band autoneg for Ethernet ports
In reply to Vladimir OlteanThe commit in the Fixes: tag below broke traffic through switch ports where the SERDES protocol requires in-band autoneg and this requirement isn't described in the device tree: SGMII, QSGMII, USXGMII (with 2500Base-X, in-band autoneg isn't supported).
The LS1028A-QDS boards are not yet ready for syncing their device trees with Linux, since Ethernet is missing there (but has been submitted):
https://lore.kernel.org/lkml/[email protected]/
When agreement is reached for the Ethernet support in Linux, there will be a sync for these boards as well. For now, just enable in-band autoneg to fix the breakage.
--- arch/arm/dts/fsl-ls1028a-qds-1xxx-sch-30842.dtsi | 1 + arch/arm/dts/fsl-ls1028a-qds-8xxx-sch-24801.dtsi | 1 + arch/arm/dts/fsl-ls1028a-qds-9999-sch-24801-LBRW.dtsi | 4 ++++ arch/arm/dts/fsl-ls1028a-qds-9999-sch-24801.dtsi | 4 ++++ arch/arm/dts/fsl-ls1028a-qds-x3xx-sch-30841-LBRW.dtsi | 4 ++++ arch/arm/dts/fsl-ls1028a-qds-x5xx-sch-28021-LBRW.dtsi | 4 ++++ 6 files changed, 18 insertions(+)
arch/arm/dts/fsl-ls1028a-qds-1xxx-sch-30842.dtsi +1 -0
@@ -15,6 +15,7 @@ &enetc_port0 { status = "okay"; + managed = "in-band-status"; phy-mode = "usxgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@02}>; };
arch/arm/dts/fsl-ls1028a-qds-8xxx-sch-24801.dtsi +1 -0
@@ -14,6 +14,7 @@ &enetc_port0 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1c}>; };
arch/arm/dts/fsl-ls1028a-qds-9999-sch-24801-LBRW.dtsi +4 -0
@@ -44,24 +44,28 @@ &mscc_felix_port0 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1c}>; }; &mscc_felix_port1 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@1c}>; }; &mscc_felix_port2 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1e}>; }; &mscc_felix_port3 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1f}>; };
arch/arm/dts/fsl-ls1028a-qds-9999-sch-24801.dtsi +4 -0
@@ -29,24 +29,28 @@ &mscc_felix_port0 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1c}>; }; &mscc_felix_port1 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1d}>; }; &mscc_felix_port2 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1e}>; }; &mscc_felix_port3 { status = "okay"; + managed = "in-band-status"; phy-mode = "sgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@40/phy@1f}>; };
arch/arm/dts/fsl-ls1028a-qds-x3xx-sch-30841-LBRW.dtsi +4 -0
@@ -29,24 +29,28 @@ &mscc_felix_port0 { status = "okay"; + managed = "in-band-status"; phy-mode = "usxgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@00}>; }; &mscc_felix_port1 { status = "okay"; + managed = "in-band-status"; phy-mode = "usxgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@01}>; }; &mscc_felix_port2 { status = "okay"; + managed = "in-band-status"; phy-mode = "usxgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@02}>; }; &mscc_felix_port3 { status = "okay"; + managed = "in-band-status"; phy-mode = "usxgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@03}>; };
arch/arm/dts/fsl-ls1028a-qds-x5xx-sch-28021-LBRW.dtsi +4 -0
@@ -23,24 +23,28 @@ &mscc_felix_port0 { status = "okay"; + managed = "in-band-status"; phy-mode = "qsgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@08}>; }; &mscc_felix_port1 { status = "okay"; + managed = "in-band-status"; phy-mode = "qsgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@09}>; }; &mscc_felix_port2 { status = "okay"; + managed = "in-band-status"; phy-mode = "qsgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@0a}>; }; &mscc_felix_port3 { status = "okay"; + managed = "in-band-status"; phy-mode = "qsgmii"; phy-handle = <&{/soc/i2c@2000000/fpga@66/mux-mdio@54/mdio@50/phy@0b}>; };
Signature · 1 line
2.25.1
Hi Priyanka,
Quoted 22 lines · Vladimir Oltean
The changes were intended to be minimal, but unfortunately I discovered some other stuff as well:
- we need to make some changes to the compatible strings of RTC devices and I2C muxes. This has ramifications to other NXP boards which were also updated.
- I broke Ethernet on LS1028A boards through a patch that is currently in Ramon's tree.Therefore this patch set is a bit larger than would be otherwise expected.
The Linux device tree changes have just been posted by me here and are currently in flight, but they are rather small so I don't expect too much pushback on them:
https://lore.kernel.org/linux-arm-kernel/[email protected]/T/#m6f63c92e75fa79a01144b2c2c6dc4776e7971395I've also triggered an Azure CI build with these changes:
https://github.com/u-boot/u-boot/pull/102
and it appears that 2 tests fail due to external causes:
1. https://dev.azure.com/u-boot/u-boot/_build/results?buildId=3283&view=logs&jobId=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&j=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&t=c864b9c4-48aa-5e04-3916-54070f85e156
2. https://dev.azure.com/u-boot/u-boot/_build/results?buildId=3283&view=logs&j=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&t=c864b9c4-48aa-5e04-3916-54070f85e156&l=27
Quoted 4 lines
Unable to find image 'trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021' locally
docker: Error response from daemon: Head "https://registry-1.docker.io/v2/trini/u-boot-gitlab-ci-runner/manifests/focal-20211006-14Nov2021": received unexpected HTTP status: 502 Bad Gateway.The other tests seem to pass.
The Linux side of device tree patches were merged today, and I see you've reviewed the U-Boot side of changes too. Could you please pick them up?
Quoted 48 lines
-----Original Message-----
From: Vladimir Oltean <[email protected]>
Sent: Tuesday, December 14, 2021 8:09 PM
To: Priyanka Jain <[email protected]>; [email protected]
Cc: Michael Walle <[email protected]>; Tom Rini <[email protected]>; Leo Li <[email protected]>; Heiko Schocher <[email protected]>; Simon Glass <[email protected]>; Ramon Fried <[email protected]>
Subject: Re: [PATCH v2 00/16] Sync NXP LS1028A-RDB device trees between U- Boot and LinuxHi Priyanka,
Quoted 17 lines · Vladimir Oltean
The changes were intended to be minimal, but unfortunately I discovered some other stuff as well:
- we need to make some changes to the compatible strings of RTC devices and I2C muxes. This has ramifications to other NXP boards which were also updated.
- I broke Ethernet on LS1028A boards through a patch that is currently in Ramon's tree.Therefore this patch set is a bit larger than would be otherwise expected.
The Linux device tree changes have just been posted by me here and are currently in flight, but they are rather small so I don't expect too much pushback on them:
https://lore.kernel.org/linux-arm-kernel/20211202141528.2450169-5-vlad
[email protected]/T/#m6f63c92e75fa79a01144b2c2c6dc4776e7971395Quoted 10 lines
I've also triggered an Azure CI build with these changes:
https://github.com/u-boot/u-boot/pull/102
and it appears that 2 tests fail due to external causes:
1.
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=3283&view=l
ogs&jobId=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&j=5fafc5b9-a417-5c75-4c 48-15c7f941e4ee&t=c864b9c4-48aa-5e04-3916-54070f85e156
2.
https://dev.azure.com/u-boot/u-boot/_build/results?buildId=3283&view=l
ogs&j=5fafc5b9-a417-5c75-4c48-15c7f941e4ee&t=c864b9c4-48aa-5e04-3916-5
Quoted 5 lines
4070f85e156&l=27
Unable to find image 'trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021' locally
docker: Error response from daemon: Head "https://registry-
Quoted 7 lines
1.docker.io/v2/trini/u-boot-gitlab-ci-runner/manifests/focal-20211006- 14Nov2021": received unexpected HTTP status: 502 Bad Gateway.
Quoted 2 lines
The other tests seem to pass.
The Linux side of device tree patches were merged today, and I see you've reviewed the U-Boot side of changes too. Could you please pick them up?
Yes, I will pick the series as part of next pull-request for 2022.04
Regards
Priyanka
Quoted 4 lines · Priyanka Jain
Quoted 2 lines
The Linux side of device tree patches were merged today, and I see you've reviewed the U-Boot side of changes too. Could you please pick them up?
Yes, I will pick the series as part of next pull-request for 2022.04
Thanks. Could you also delete the '#include "fsl-ls1028a-rdb-u-boot.dtsi"' line from patch 14/16 like Michael suggested, or should I resend for that?
Am 2021-12-23 13:44, schrieb Vladimir Oltean:
Quoted 8 lines · Priyanka Jain
Quoted 4 lines
Quoted 2 lines
The Linux side of device tree patches were merged today, and I see you've reviewed the U-Boot side of changes too. Could you please pick them up?
Yes, I will pick the series as part of next pull-request for 2022.04
Thanks. Could you also delete the '#include "
fsl-ls1028a-rdb-u-boot.dtsi"' line from patch 14/16 like Michael suggested, or should I resend for that?
Patch 15/16 is also affected? I guess you took the linux dts and added that include line afterwards? that shouldn't be necessary.
-michael
Quoted 7 lines · Michael Walle
Am 2021-12-23 13:44, schrieb Vladimir Oltean:
Quoted 6 lines · Priyanka Jain
Quoted 4 lines
Quoted 2 lines
The Linux side of device tree patches were merged today, and I see you've reviewed the U-Boot side of changes too. Could you please pick them up?
Yes, I will pick the series as part of next pull-request for 2022.04
Quoted 7 lines
Quoted 4 lines
Thanks. Could you also delete the '#include "
fsl-ls1028a-rdb-u-boot.dtsi"'
line from patch 14/16 like Michael suggested, or should I resend for that?Patch 15/16 is also affected? I guess you took the linux dts and added that include line afterwards? that shouldn't be necessary.
Alright, I'll send v3 later today or tomorrow.