[PATCH] powerpc: dtc: update P2020RDB dts
Rob Herring
robh at kernel.org
Fri Aug 2 02:12:34 AEST 2024
On Wed, Jul 31, 2024 at 11:14 PM Pawel Dembicki <paweldembicki at gmail.com> wrote:
>
On the subject, every patch is an 'update'. Please make it more
specific. If you have a hard time coming up with something specific,
that's a sign your patch is making too many separate changes.
> P2020RDB contains multiple peripherals, which isn't added to
> devicetree:
> - Switch: Microchip VSC7385
> - PMIC: Renesas ZL2006
> - Temperature sensor: Analog Devices ADT7461
> - Two eeproms: 24C256 and 24C01
> - GPIO expander: NXP PCA9557
> - reset gpios of Ethernet PHYs
>
> This commit adds it.
>
> Some refreshments was done:
> - fixed link in ethernet-node
> - platform drivers nodes names
> - added 'gpio0' label in pq3-gpio-0.dtsi
>
> Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
> ---
> arch/powerpc/boot/dts/fsl/p2020rdb.dts | 85 +++++++++++++++++++++--
> arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi | 2 +-
> 2 files changed, 81 insertions(+), 6 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/fsl/p2020rdb.dts b/arch/powerpc/boot/dts/fsl/p2020rdb.dts
> index 3acd3890b397..d563d37b91f1 100644
> --- a/arch/powerpc/boot/dts/fsl/p2020rdb.dts
> +++ b/arch/powerpc/boot/dts/fsl/p2020rdb.dts
> @@ -6,6 +6,7 @@
> */
>
> /include/ "p2020si-pre.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
>
> / {
> model = "fsl,P2020RDB";
> @@ -33,7 +34,7 @@ lbc: localbus at ffe05000 {
> 0x1 0x0 0x0 0xffa00000 0x00040000
> 0x2 0x0 0x0 0xffb00000 0x00020000>;
>
> - nor at 0,0 {
> + nor at 0 {
Make these clean-ups a separate patch.
> #address-cells = <1>;
> #size-cells = <1>;
> compatible = "cfi-flash";
> @@ -79,7 +80,7 @@ partition at f00000 {
> };
> };
>
> - nand at 1,0 {
> + nand at 1 {
> #address-cells = <1>;
> #size-cells = <1>;
> compatible = "fsl,p2020-fcm-nand",
> @@ -128,11 +129,49 @@ partition at 1100000 {
> };
> };
>
> - L2switch at 2,0 {
> + ethernet-switch at 2 {
> #address-cells = <1>;
> #size-cells = <1>;
> - compatible = "vitesse-7385";
> + compatible = "vitesse,vsc7385";
There are 7 occurrences of this. Please fix them all. (And again,
separate patch).
> reg = <0x2 0x0 0x20000>;
> + reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
> +
> + ports {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port at 1 {
> + reg = <1>;
> + label = "lan1";
> + };
> + port at 2 {
> + reg = <2>;
> + label = "lan2";
> + };
> + port at 3 {
> + reg = <3>;
> + label = "lan3";
> + };
> + port at 4 {
> + reg = <4>;
> + label = "lan4";
> + };
> + vsc: port at 6 {
> + reg = <6>;
> + label = "cpu";
> + ethernet = <&enet0>;
> + phy-mode = "rgmii";
> + rx-internal-delay-ps = <1400>;
> + tx-internal-delay-ps = <2000>;
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + pause;
> + };
> + };
> + };
> +
> };
>
> };
> @@ -141,12 +180,39 @@ soc: soc at ffe00000 {
> ranges = <0x0 0x0 0xffe00000 0x100000>;
>
> i2c at 3000 {
> + temperature-sensor at 4c {
> + compatible = "adi,adt7461";
> + reg = <0x4c>;
> + };
> +
> + eeprom at 50 {
> + compatible = "atmel,24c256";
> + reg = <0x50>;
> + };
> +
> rtc at 68 {
> compatible = "dallas,ds1339";
> reg = <0x68>;
> };
> };
>
> + i2c at 3100 {
> + pmic at 11 {
> + compatible = "zl2006";
Missing vendor prefix.
> + reg = <0x11>;
> + };
> +
> + gpio at 18 {
> + compatible = "nxp,pca9557";
> + reg = <0x18>;
> + };
> +
> + eeprom at 52 {
> + compatible = "atmel,24c01";
> + reg = <0x52>;
> + };
> + };
> +
> spi at 7000 {
> flash at 0 {
> #address-cells = <1>;
> @@ -200,11 +266,15 @@ mdio at 24520 {
> phy0: ethernet-phy at 0 {
> interrupts = <3 1 0 0>;
> reg = <0x0>;
> + reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
> };
> +
> phy1: ethernet-phy at 1 {
> interrupts = <3 1 0 0>;
> reg = <0x1>;
> + reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
> };
> +
> tbi-phy at 2 {
> device_type = "tbi-phy";
> reg = <0x2>;
> @@ -232,8 +302,13 @@ ptp_clock at 24e00 {
> };
>
> enet0: ethernet at 24000 {
> - fixed-link = <1 1 1000 0 0>;
> phy-connection-type = "rgmii-id";
> +
> + fixed-link {
> + speed = <1000>;
> + full-duplex;
> + pause;
> + };
> };
>
> enet1: ethernet at 25000 {
> diff --git a/arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi b/arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi
> index a1b48546b02d..5181117ea6b5 100644
> --- a/arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi
> +++ b/arch/powerpc/boot/dts/fsl/pq3-gpio-0.dtsi
> @@ -32,7 +32,7 @@
> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> */
>
> -gpio-controller at fc00 {
> +gpio0: gpio-controller at fc00 {
> #gpio-cells = <2>;
> compatible = "fsl,pq3-gpio";
> reg = <0xfc00 0x100>;
> --
> 2.34.1
>
More information about the Linuxppc-dev
mailing list