• [^] # Re: DTB ?

    Posté par . En réponse au message Port ethernet up mais aucun flux. Évalué à 1. Dernière modification le 22 avril 2023 à 23:07.

    Sommaire

    Hello
    Je te remercie pour ta réponse.

    Ton avis est très intéressant, je vais travailler dessus.

    Je possède une clearfog base cn9130.
    J'utilise le kernel 6.2
    Le dts n'est pas natif dans le kernel, je l'ai édité à l'aide des patchs du constructeur :
    ```
    // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
    /*
    * Copyright SolidRun Ltd.
    *
    * Device tree for the CN9130 based SOM.
    */

    include "cn9130.dtsi"

    include

    include

    / {
    model = "SolidRun CN9130 based SOM Clearfog Base";

    chosen {
     stdout-path = "serial0:115200n8";
    };
    aliases {
     gpio1 = &cp0_gpio1;
     gpio2 = &cp0_gpio2;
     i2c0 = &cp0_i2c0;
     ethernet0 = &cp0_eth0;
     ethernet1 = &cp0_eth1;
     ethernet2 = &cp0_eth2;
     spi1 = &cp0_spi0;
     spi2 = &cp0_spi1;
    };
    memory@00000000 {
     device_type = "memory";
     reg = <0x0 0x0 0x0 0x80000000>;
    };
    v_3_3: regulator-3-3v {
     compatible = "regulator-fixed";
     regulator-name = "v_3_3";
     regulator-min-microvolt = <3300000>;
     regulator-max-microvolt = <3300000>;
     regulator-always-on;
     status = "okay";
    };
    ap0_reg_sd_vccq: ap0_sd_vccq@0 {
     compatible = "regulator-gpio";
     regulator-name = "ap0_sd_vccq";
     regulator-min-microvolt = <1800000>;
     regulator-max-microvolt = <1800000>;
     states = <1800000 0x1 3300000 0x0>;
    };
    cp0_reg_usb3_vbus0: cp0_usb3_vbus@0 {
     compatible = "regulator-fixed";
     regulator-name = "cp0-xhci0-vbus";
     regulator-min-microvolt = <5000000>;
     regulator-max-microvolt = <5000000>;
     enable-active-high;
    };
    cp0_usb3_0_phy0: cp0_usb3_phy@0 {
     compatible = "usb-nop-xceiv";
     vcc-supply = <&cp0_reg_usb3_vbus0>;
    };
    cp0_reg_usb3_vbus1: cp0_usb3_vbus@1 {
     compatible = "regulator-fixed";
     regulator-name = "cp0-xhci1-vbus";
     regulator-min-microvolt = <5000000>;
     regulator-max-microvolt = <5000000>;
     enable-active-high;
    };
    cp0_usb3_0_phy1: cp0_usb3_phy@1 {
     compatible = "usb-nop-xceiv";
     vcc-supply = <&cp0_reg_usb3_vbus1>;
    };
    cp0_reg_sd_vccq: cp0_sd_vccq@0 {
     compatible = "regulator-gpio";
     regulator-name = "cp0_sd_vccq";
     regulator-min-microvolt = <1800000>;
     regulator-max-microvolt = <3300000>;
     states = <1800000 0x1
     3300000 0x0>;
    };
    cp0_reg_sd_vcc: cp0_sd_vcc@0 {
     compatible = "regulator-fixed";
     regulator-name = "cp0_sd_vcc";
     regulator-min-microvolt = <3300000>;
     regulator-max-microvolt = <3300000>;
     enable-active-high;
     regulator-always-on;
    };
    cp0_sfp_eth0: sfp-eth@0 {
     compatible = "sff,sfp";
     i2c-bus = <&cp0_i2c1>;
     los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
     mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
     tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
     tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
     maximum-power-milliwatt = <2000>;
    };
    keys {
     compatible = "gpio-keys";
     pinctrl-0 = <&cp0_button_pin>;
     pinctrl-names = "default";
     button0{
     /* SW3 button */
     label = "SW3";
     gpios = <&cp0_gpio2 0 GPIO_ACTIVE_LOW>;
     linux,can-disable;
     linux,code = <BTN_0>;
     };
    };
    

    };

    &uart0 {
    status = "okay";
    };

    /* on-board eMMC */
    &ap_sdhci0 {
    pinctrl-names = "default";
    bus-width = ;
    vqmmc-supply = <&ap0_reg_sd_vccq>;
    status = "okay";
    };

    &cp0_crypto {
    status = "disabled";
    };

    &cp0_ethernet {
    status = "okay";
    };

    &cp0_gpio1 {
    status = "okay";
    };

    &cp0_gpio2 {
    status = "okay";
    };

    /* EEPROM */
    &cp0_i2c0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c0_pins>;
    clock-frequency = ;

    /*
     * PCA9655 GPIO expander, up to 1MHz clock.
     * 0-CON3 CLKREQ#
     * 1-CON3 PERST#
     * 2-M2 FUL_CARD_POWER_OFF
     * 3-CON3 W_DISABLE
     * 4-CON2 CLKREQ#
     * 5-USB3 overcurrent
     * 6-USB3 power
     * 7-CON2 W_DISABLE
     * 8-M2 W_DISABLE
     * 9-JP4 P4
     * 10-M2 RESET
     * 11-m.2 DEVSLP
     * 12-SFP_LOS
     * 13-SFP_TX_FAULT
     * 14-SFP_TX_DISABLE
     * 15-SFP_MOD_DEF0
     */
    expander0: gpio-expander@20 {
     /*
     * This is how it should be:
     * compatible = "onnn,pca9655", "nxp,pca9555";
     * but you can't do this because of the way I2C works.
     */
     compatible = "nxp,pca9555";
     gpio-controller;
     #gpio-cells = <2>;
     reg = <0x20>;
     pcie1_0_clkreq {
     gpio-hog;
     gpios = <0 GPIO_ACTIVE_LOW>;
     input;
     line-name = "pcie1.0-clkreq";
     };
     m2_ful_card_power_off {
     gpio-hog;
     gpios = <2 GPIO_ACTIVE_HIGH>;
     output-high;
     line-name = "m2-ful-card-power-off";
     };
     pcie1_0_w_disable {
     gpio-hog;
     gpios = <3 GPIO_ACTIVE_LOW>;
     output-low;
     line-name = "pcie1.0-w-disable";
     };
     usb3_ilimit {
     gpio-hog;
     gpios = <5 GPIO_ACTIVE_LOW>;
     input;
     line-name = "usb3-current-limit";
     };
     usb3_power {
     gpio-hog;
     gpios = <6 GPIO_ACTIVE_HIGH>;
     output-high;
     line-name = "usb3-power";
     };
     m2_w_disable {
     gpio-hog;
     gpios = <8 GPIO_ACTIVE_LOW>;
     output-low;
     line-name = "m2-w-disable";
     };
     m2_reset {
     gpio-hog;
     gpios = <10 GPIO_ACTIVE_HIGH>;
     output-high;
     line-name = "m2-reset";
     };
     m2_devslp {
     gpio-hog;
     gpios = <11 GPIO_ACTIVE_HIGH>;
     output-low;
     line-name = "m.2 devslp";
     };
    };
    /* The MCP3021 supports standard and fast modes */
    mikrobus_adc: mcp3021@4c {
     compatible = "microchip,mcp3021";
     reg = <0x4c>;
    };
    /*EEPROM on the SOM */
    eeprom@53 {
     compatible = "atmel,24c02";
     reg = <0x53>;
     pagesize = <16>;
    };
    

    };

    /* I2C Master */
    &cp0_i2c1 {
    status = "okay";
    clock-frequency = ;
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c1_pins>;
    };

    &cp0_gpio1 {
    phy_reset { /* Release switch reset */
    gpio-hog;
    gpios = ;
    output-high;
    };
    };

    &cp0_mdio {
    status = "okay";
    phy0: ethernet-phy@0 {
    /* Green led blinks on activity, Orange LED on link /
    marvell,reg-init = ;
    reg = ;
    };
    phy1: ethernet-phy@1 {
    /
    Green led blinks on activity, Orange LED on link */
    marvell,reg-init = ;
    reg = ;
    };
    };

    /* SRDS #0 - SATA on M.2 connector */
    &cp0_sata0 {
    status = "okay";
    };

    /* SRDS #1 - USB 3.0 host */
    &cp0_usb3_0 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy0>;
    phy-names = "usb";
    };

    &cp0_usb3_1 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy1>;
    };

    /* SRDS #2 - SFP+ 10GE */
    &cp0_eth0 {
    status = "okay";
    phy-mode = "10gbase-r";
    local-mac-address = [64 69 61 67 62 03];
    phys = <&cp0_comphy2 0>;
    managed = "in-band-status";
    sfp = <&cp0_sfp_eth0>;
    };

    /* SRDS #3 - SGMII 1GE on carrier board */
    &cp0_eth1 {
    status = "okay";
    local-mac-address = [64 69 61 67 62 01];
    phys = <&cp0_comphy3 1>;
    phy = <&phy1>;
    managed = "in-band-status";
    phy-mode = "sgmii";
    };

    /* SRDS #4 - USB 3.0 host on M.2 connector */
    &cp0_usb3_1 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy1>;
    phy-names = "usb";
    };

    /* SRDS #5 - mini PCIe slot */
    &cp0_pcie2 {
    status = "okay";
    phys = <&cp0_comphy5 2>;
    num-lanes = ;
    reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
    };

    /* GE PHY RGMII /
    &cp0// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
    /

    * Copyright SolidRun Ltd.
    *
    * Device tree for the CN9130 based SOM.
    */

    include "cn9130.dtsi"

    include

    include

    / {
    model = "SolidRun CN9130 based SOM Clearfog Base";

    chosen {
     stdout-path = "serial0:115200n8";
    };
    aliases {
     gpio1 = &cp0_gpio1;
     gpio2 = &cp0_gpio2;
     i2c0 = &cp0_i2c0;
     ethern// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
    

    /*
    * Copyright SolidRun Ltd.
    *
    * Device tree for the CN9130 based SOM.
    */

    include "cn9130.dtsi"

    include

    include

    / {
    model = "SolidRun CN9130 based SOM Clearfog Base";

    chosen {
     stdout-path = "serial0:115200n8";
    };
    aliases {
     gpio1 = &cp0_gpio1;
     gpio2 = &cp0_gpio2;
     i2c0 = &cp0_i2c0;
     ethernet0 = &cp0_eth0;
     ethernet1 = &cp0_eth1;
     ethernet2 = &cp0_eth2;
     spi1 = &cp0_spi0;
     spi2 = &cp0_spi1;
    };
    memory@00000000 {
     device_type = "memory";
     reg = <0x0 0x0 0x0 0x80000000>;
    };
    v_3_3: regulator-3-3v {
     compatible = "regulator-fixed";
     regulator-name = "v_3_3";
     regulator-min-microvolt = <3300000>;
     regulator-max-microvolt = <3300000>;
     regulator-always-on;
     status = "okay";
    };
    ap0_reg_sd_vccq: ap0_sd_vccq@0 {
     compatible = "regulator-gpio";
     regulator-name = "ap0_sd_vccq";
     regulator-min-microvolt = <1800000>;
     regulator-max-microvolt = <1800000>;
     states = <1800000 0x1 3300000 0x0>;
    };
    cp0_reg_usb3_vbus0: cp0_usb3_vbus@0 {
     compatible = "regulator-fixed";
     regulator-name = "cp0-xhci0-vbus";
     regulator-min-microvolt = <5000000>;
     regulator-max-microvolt = <5000000>;
     enable-active-high;
    };
    cp0_usb3_0_phy0: cp0_usb3_phy@0 {
     compatible = "usb-nop-xceiv";
     vcc-supply = <&cp0_reg_usb3_vbus0>;
    };
    cp0_reg_usb3_vbus1: cp0_usb3_vbus@1 {
     compatible = "regulator-fixed";
     regulator-name = "cp0-xhci1-vbus";
     regulator-min-microvolt = <5000000>;
     regulator-max-microvolt = <5000000>;
     enable-active-high;
    };
    cp0_usb3_0_phy1: cp0_usb3_phy@1 {
     compatible = "usb-nop-xceiv";
     vcc-supply = <&cp0_reg_usb3_vbus1>;
    };
    cp0_reg_sd_vccq: cp0_sd_vccq@0 {
     compatible = "regulator-gpio";
     regulator-name = "cp0_sd_vccq";
     regulator-min-microvolt = <1800000>;
     regulator-max-microvolt = <3300000>;
     states = <1800000 0x1
     3300000 0x0>;
    };
    cp0_reg_sd_vcc: cp0_sd_vcc@0 {
     compatible = "regulator-fixed";
     regulator-name = "cp0_sd_vcc";
     regulator-min-microvolt = <3300000>;
     regulator-max-microvolt = <3300000>;
     enable-active-high;
     regulator-always-on;
    };
    cp0_sfp_eth0: sfp-eth@0 {
     compatible = "sff,sfp";
     i2c-bus = <&cp0_i2c1>;
     los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
     mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
     tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
     tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
     maximum-power-milliwatt = <2000>;
    };
    keys {
     compatible = "gpio-keys";
     pinctrl-0 = <&cp0_button_pin>;
     pinctrl-names = "default";
     button0{
     /* SW3 button */
     label = "SW3";
     gpios = <&cp0_gpio2 0 GPIO_ACTIVE_LOW>;
     linux,can-disable;
     linux,code = <BTN_0>;
     };
    };
    

    };

    &uart0 {
    status = "okay";
    };

    /* on-board eMMC */
    &ap_sdhci0 {
    pinctrl-names = "default";
    bus-width = ;
    vqmmc-supply = <&ap0_reg_sd_vccq>;
    status = "okay";
    };

    &cp0_crypto {
    status = "disabled";
    };

    &cp0_ethernet {
    status = "okay";
    };

    &cp0_gpio1 {
    status = "okay";
    };

    &cp0_gpio2 {
    status = "okay";
    };

    /* EEPROM */
    &cp0_i2c0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c0_pins>;
    clock-frequency = ;

    /*
     * PCA9655 GPIO expander, up to 1MHz clock.
     * 0-CON3 CLKREQ#
     * 1-CON3 PERST#
     * 2-M2 FUL_CARD_POWER_OFF
     * 3-CON3 W_DISABLE
     * 4-CON2 CLKREQ#
     * 5-USB3 overcurrent
     * 6-USB3 power
     * 7-CON2 W_DISABLE
     * 8-M2 W_DISABLE
     * 9-JP4 P4
     * 10-M2 RESET
     * 11-m.2 DEVSLP
     * 12-SFP_LOS
     * 13-SFP_TX_FAULT
     * 14-SFP_TX_DISABLE
     * 15-SFP_MOD_DEF0
     */
    expander0: gpio-expander@20 {
     /*
     * This is how it should be:
     * compatible = "onnn,pca9655", "nxp,pca9555";
     * but you can't do this because of the way I2C works.
     */
     compatible = "nxp,pca9555";
     gpio-controller;
     #gpio-cells = <2>;
     reg = <0x20>;
     pcie1_0_clkreq {
     gpio-hog;
     gpios = <0 GPIO_ACTIVE_LOW>;
     input;
     line-name = "pcie1.0-clkreq";
     };
     m2_ful_card_power_off {
     gpio-hog;
     gpios = <2 GPIO_ACTIVE_HIGH>;
     output-high;
     line-name = "m2-ful-card-power-off";
     };
     pcie1_0_w_disable {
     gpio-hog;
     gpios = <3 GPIO_ACTIVE_LOW>;
     output-low;
     line-name = "pcie1.0-w-disable";
     };
     usb3_ilimit {
     gpio-hog;
     gpios = <5 GPIO_ACTIVE_LOW>;
     input;
     line-name = "usb3-current-limit";
     };
     usb3_power {
     gpio-hog;
     gpios = <6 GPIO_ACTIVE_HIGH>;
     output-high;
     line-name = "usb3-power";
     };
     m2_w_disable {
     gpio-hog;
     gpios = <8 GPIO_ACTIVE_LOW>;
     output-low;
     line-name = "m2-w-disable";
     };
     m2_reset {
     gpio-hog;
     gpios = <10 GPIO_ACTIVE_HIGH>;
     output-high;
     line-name = "m2-reset";
     };
     m2_devslp {
     gpio-hog;
     gpios = <11 GPIO_ACTIVE_HIGH>;
     output-low;
     line-name = "m.2 devslp";
     };
    };
    /* The MCP3021 supports standard and fast modes */
    mikrobus_adc: mcp3021@4c {
     compatible = "microchip,mcp3021";
     reg = <0x4c>;
    };
    /*EEPROM on the SOM */
    eeprom@53 {
     compatible = "atmel,24c02";
     reg = <0x53>;
     pagesize = <16>;
    };
    

    };

    /* I2C Master */
    &cp0_i2c1 {
    status = "okay";
    clock-frequency = ;
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c1_pins>;
    };

    &cp0_gpio1 {
    phy_reset { /* Release switch reset */
    gpio-hog;
    gpios = ;
    output-high;
    };
    };

    &cp0_mdio {
    status = "okay";
    phy0: ethernet-phy@0 {
    /* Green led blinks on activity, Orange LED on link /
    marvell,reg-init = ;
    reg = ;
    };
    phy1: ethernet-phy@1 {
    /
    Green led blinks on activity, Orange LED on link */
    marvell,reg-init = ;
    reg = ;
    };
    };

    /* SRDS #0 - SATA on M.2 connector */
    &cp0_sata0 {
    status = "okay";
    };

    /* SRDS #1 - USB 3.0 host */
    &cp0_usb3_0 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy0>;
    phy-names = "usb";
    };

    &cp0_usb3_1 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy1>;
    };

    /* SRDS #2 - SFP+ 10GE */
    &cp0_eth0 {
    status = "okay";
    phy-mode = "10gbase-r";
    local-mac-address = [64 69 61 67 62 03];
    phys = <&cp0_comphy2 0>;
    managed = "in-band-status";
    sfp = <&cp0_sfp_eth0>;
    };

    /* SRDS #3 - SGMII 1GE on carrier board */
    &cp0_eth1 {
    status = "okay";
    local-mac-address = [64 69 61 67 62 01];
    phys = <&cp0_comphy3 1>;
    phy = <&phy1>;
    managed = "in-band-status";
    phy-mode = "sgmii";
    };

    /* SRDS #4 - USB 3.0 host on M.2 connector */
    &cp0_usb3_1 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy1>;
    phy-names = "usb";
    };

    /* SRDS #5 - mini PCIe slot */
    &cp0_pcie2 {
    status = "okay";
    phys = <&cp0_comphy5 2>;
    num-lanes = ;
    reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
    };

    /* GE PHY RGMII */
    &cp0_eth2 {
    status = "okay";
    local-mac-address = [64 69 61 67 62 02];
    phy = <&phy0>;
    phy-mode = "rgmii-id";
    pinctrl-0 = <&cp0_ge2_rgmii_pins>;
    };

    &cp0_sdhci0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_sdhci_pins
    &cp0_sdhci_cd_pins>;
    bus-width = ;
    cd-gpios = <&cp0_gpio2 11 GPIO_ACTIVE_LOW>;
    no-1-8-v;
    vqmmc-supply = <&v_3_3>;
    vmmc-supply = <&v_3_3>;
    };

    &cp0_spi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_spi1_pins>;
    reg = ;
    spi-flash@0 {
    #address-cells = ;
    #size-cells = ;
    compatible = "jedec,spi-nor";
    reg = ;
    spi-max-frequency = ;
    };
    spi-flash@1 {
    #address-cells = ;
    #size-cells = ;
    compatible = "jedec,spi-nor";
    reg = ;
    /* On carrier MUX does not allow higher frequencies */
    spi-max-frequency = ;
    };
    };

    &cp0_syscon0 {
    cp0_pinctrl: pinctrl {
    compatible = "marvell,cp115-standalone-pinctrl";
    cp0_i2c0_pins: cp0-i2c-pins-0 {
    marvell,pins = "mpp37", "mpp38";
    marvell,function = "i2c0";
    };
    cp0_i2c1_pins: cp0-i2c-pins-1 {
    marvell,pins = "mpp35", "mpp36";
    marvell,function = "i2c1";
    };
    cp0_ge2_rgmii_pins: cp0-ge-rgmii-pins-0 {
    marvell,pins = "mpp44", "mpp45", "mpp46",
    "mpp47", "mpp48", "mpp49",
    "mpp50", "mpp51", "mpp52",
    "mpp53", "mpp54", "mpp55";
    marvell,function = "ge1";
    };
    cp0_sdhci_cd_pins: cp0-sdhci-cd-pins-0 {
    marvell,pins = "mpp43";
    marvell,function = "sdio";
    };
    cp0_sdhci_pins: cp0-sdhi-pins-0 {
    marvell,pins = "mpp56", "mpp57", "mpp58",
    "mpp59", "mpp60", "mpp61";
    marvell,function = "sdio";
    };
    cp0_spi1_pins: cp0-spi-pins-1 {
    marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15", "mpp16";
    marvell,function = "spi1";
    };
    /* cp0_rcvr_clk_pins: cp0-rcvr-clk-pins {
    marvell, pins = "mpp40";
    marvell,function = "synce1";
    };*/
    cp0_button_pin: cp0-button-pin {
    marvell,pins = "mpp32";
    marvell,function = "gpio";
    };
    };
    };
    et0 = &cp0_eth0;
    ethernet1 = &cp0_eth1;
    ethernet2 = &cp0_eth2;
    spi1 = &cp0_spi0;
    spi2 = &cp0_spi1;
    };
    memory@00000000 {
    device_type = "memory";
    reg = <0x0 0x0 0x0 0x80000000>;
    };
    v_3_3: regulator-3-3v {
    compatible = "regulator-fixed";
    regulator-name = "v_3_3";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    regulator-always-on;
    status = "okay";
    };
    ap0_reg_sd_vccq: ap0_sd_vccq@0 {
    compatible = "regulator-gpio";
    regulator-name = "ap0_sd_vccq";
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    states = <1800000 0x1 3300000 0x0>;
    };

    cp0_reg_usb3_vbus0: cp0_usb3_vbus@0 {
    compatible = "regulator-fixed";
    regulator-name = "cp0-xhci0-vbus";
    regulator-min-microvolt = ;
    regulator-max-microvolt = ;
    enable-active-high;
    };
    cp0_usb3_0_phy0: cp0_usb3_phy@0 {
    compatible = "usb-nop-xceiv";
    vcc-supply = <&cp0_reg_usb3_vbus0>;
    };

    cp0_reg_usb3_vbus1: cp0_usb3_vbus@1 {
    compatible = "regulator-fixed";
    regulator-name = "cp0-xhci1-vbus";
    regulator-min-microvolt = ;
    regulator-max-microvolt = ;
    enable-active-high;
    };
    cp0_usb3_0_phy1: cp0_usb3_phy@1 {
    compatible = "usb-nop-xceiv";
    vcc-supply = <&cp0_reg_usb3_vbus1>;
    };

    cp0_reg_sd_vccq: cp0_sd_vccq@0 {
    compatible = "regulator-gpio";
    regulator-name = "cp0_sd_vccq";
    regulator-min-microvolt = ;
    regulator-max-microvolt = ;
    states = ;
    };
    cp0_reg_sd_vcc: cp0_sd_vcc@0 {
    compatible = "regulator-fixed";
    regulator-name = "cp0_sd_vcc";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    enable-active-high;
    regulator-always-on;
    };

    cp0_sfp_eth0: sfp-eth@0 {
    compatible = "sff,sfp";
    i2c-bus = <&cp0_i2c1>;
    los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>;
    mod-def0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>;
    tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>;
    tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>;
    maximum-power-milliwatt = ;
    };
    ``` keys {
    compatible = "gpio-keys";
    pinctrl-0 = <&cp0_button_pin>;
    pinctrl-names = "default";

     button0{
     /* SW3 button */
     label = "SW3";
     gpios = <&cp0_gpio2 0 GPIO_ACTIVE_LOW>;
     linux,can-disable;
     linux,code = <BTN_0>;
     };
    };
    

    };

    &uart0 {
    status = "okay";
    };

    /* on-board eMMC */
    &ap_sdhci0 {
    pinctrl-names = "default";
    bus-width = ;
    vqmmc-supply = <&ap0_reg_sd_vccq>;
    status = "okay";
    };

    &cp0_crypto {
    status = "disabled";
    };

    &cp0_ethernet {
    status = "okay";
    };

    &cp0_gpio1 {
    status = "okay";
    };

    &cp0_gpio2 {
    status = "okay";
    };

    /* EEPROM /
    &cp0_i2c0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c0_pins>;
    clock-frequency = ;
    ```
    /

    * PCA9655 GPIO expander, up to 1MHz clock.
    * 0-CON3 CLKREQ#
    * 1-CON3 PERST#
    * 2-M2 FUL_CARD_POWER_OFF
    * 3-CON3 W_DISABLE
    * 4-CON2 CLKREQ#
    * 5-USB3 overcurrent
    * 6-USB3 power
    * 7-CON2 W_DISABLE
    * 8-M2 W_DISABLE
    * 9-JP4 P4
    * 10-M2 RESET
    * 11-m.2 DEVSLP
    * 12-SFP_LOS
    * 13-SFP_TX_FAULT
    * 14-SFP_TX_DISABLE
    * 15-SFP_MOD_DEF0
    /
    expander0: gpio-expander@20 {
    /

    * This is how it should be:
    * compatible = "onnn,pca9655", "nxp,pca9555";
    * but you can't do this because of the way I2C works.
    /
    compatible = "nxp,pca9555";
    gpio-controller;
    #gpio-cells = ;
    reg = ;
    pcie1_0_clkreq {
    gpio-hog;
    gpios = <0 GPIO_ACTIVE_LOW>;
    input;
    line-name = "pcie1.0-clkreq";
    };
    m2_ful_card_power_off {
    gpio-hog;
    gpios = <2 GPIO_ACTIVE_HIGH>;
    output-high;
    line-name = "m2-ful-card-power-off";
    };
    pcie1_0_w_disable {
    gpio-hog;
    gpios = <3 GPIO_ACTIVE_LOW>;
    output-low;
    line-name = "pcie1.0-w-disable";
    };
    usb3_ilimit {
    gpio-hog;
    gpios = <5 GPIO_ACTIVE_LOW>;
    input;
    line-name = "usb3-current-limit";
    };
    usb3_power {
    gpio-hog;
    gpios = <6 GPIO_ACTIVE_HIGH>;
    output-high;
    line-name = "usb3-power";
    };
    m2_w_disable {
    gpio-hog;
    gpios = <8 GPIO_ACTIVE_LOW>;
    output-low;
    line-name = "m2-w-disable";
    };
    m2_reset {
    gpio-hog;
    gpios = <10 GPIO_ACTIVE_HIGH>;
    output-high;
    line-name = "m2-reset";
    };
    m2_devslp {
    gpio-hog;
    gpios = <11 GPIO_ACTIVE_HIGH>;
    output-low;
    line-name = "m.2 devslp";
    };
    };

    /
    The MCP3021 supports standard and fast modes */
    mikrobus_adc: mcp3021@4c {
    compatible = "microchip,mcp3021";
    reg = ;
    };
    ``` /*EEPROM on the SOM */
    eeprom@53 {
    compatible = "atmel,24c02";
    reg = ;
    pagesize = ;
    };
    };

    /* I2C Master */
    &cp0_i2c1 {
    status = "okay";
    clock-frequency = ;
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_i2c1_pins>;
    };

    &cp0_gpio1 {
    phy_reset { /* Release switch reset */
    gpio-hog;
    gpios = ;
    output-high;
    };
    };

    &cp0_mdio {
    status = "okay";
    phy0: ethernet-phy@0 {
    /* Green led blinks on activity, Orange LED on link /
    marvell,reg-init = ;
    reg = ;
    };
    phy1: ethernet-phy@1 {
    /
    Green led blinks on activity, Orange LED on link */
    marvell,reg-init = ;
    reg = ;
    };
    };

    /* SRDS #0 - SATA on M.2 connector */
    &cp0_sata0 {
    status = "okay";
    };

    /* SRDS #1 - USB 3.0 host */
    &cp0_usb3_0 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy0>;
    phy-names = "usb";
    };

    &cp0_usb3_1 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy1>;
    };

    /* SRDS #2 - SFP+ 10GE */
    &cp0_eth0 {
    status = "okay";
    phy-mode = "10gbase-r";
    local-mac-address = [64 69 61 67 62 03];
    phys = <&cp0_comphy2 0>;
    managed = "in-band-status";
    sfp = <&cp0_sfp_eth0>;
    };

    /* SRDS #3 - SGMII 1GE on carrier board */
    &cp0_eth1 {
    status = "okay";
    local-mac-address = [64 69 61 67 62 01];
    phys = <&cp0_comphy3 1>;
    phy = <&phy1>;
    managed = "in-band-status";
    phy-mode = "sgmii";
    };

    /* SRDS #4 - USB 3.0 host on M.2 connector */
    &cp0_usb3_1 {
    status = "okay";
    usb-phy = <&cp0_usb3_0_phy1>;
    phy-names = "usb";
    };

    /* SRDS #5 - mini PCIe slot */
    &cp0_pcie2 {
    status = "okay";
    phys = <&cp0_comphy5 2>;
    num-lanes = ;
    reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>;
    };

    /* GE PHY RGMII */
    &cp0_eth2 {
    status = "okay";
    local-mac-address = [64 69 61 67 62 02];
    phy = <&phy0>;
    phy-mode = "rgmii-id";
    pinctrl-0 = <&cp0_ge2_rgmii_pins>;
    };

    &cp0_sdhci0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_sdhci_pins
    &cp0_sdhci_cd_pins>;
    bus-width = ;
    cd-gpios = <&cp0_gpio2 11 GPIO_ACTIVE_LOW>;
    no-1-8-v;
    vqmmc-supply = <&v_3_3>;
    vmmc-supply = <&v_3_3>;
    };

    &cp0_spi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_spi1_pins>;
    reg = ;
    spi-flash@0 {
    #address-cells = ;
    #size-cells = ;
    compatible = "jedec,spi-nor";
    reg = ;
    spi-max-frequency = ;
    };
    spi-flash@1 {
    #address-cells = ;
    #size-cells = ;
    compatible = "jedec,spi-nor";
    reg = ;
    /* On carrier MUX does not allow higher frequencies */
    spi-max-frequency = ;
    };
    };

    &cp0_syscon0 {
    cp0_pinctrl: pinctrl {
    compatible = "marvell,cp115-standalone-pinctrl";
    cp0_i2c0_pins: cp0-i2c-pins-0 {
    marvell,pins = "mpp37", "mpp38";
    marvell,function = "i2c0";
    };
    cp0_i2c1_pins: cp0-i2c-pins-1 {
    marvell,pins = "mpp35", "mpp36";
    marvell,function = "i2c1";
    };
    cp0_ge2_rgmii_pins: cp0-ge-rgmii-pins-0 {
    marvell,pins = "mpp44", "mpp45", "mpp46",
    "mpp47", "mpp48", "mpp49",
    "mpp50", "mpp51", "mpp52",
    "mpp53", "mpp54", "mpp55";
    marvell,function = "ge1";
    };
    cp0_sdhci_cd_pins: cp0-sdhci-cd-pins-0 {
    marvell,pins = "mpp43";
    marvell,function = "sdio";
    };
    cp0_sdhci_pins: cp0-sdhi-pins-0 {
    marvell,pins = "mpp56", "mpp57", "mpp58",
    "mpp59", "mpp60", "mpp61";
    marvell,function = "sdio";
    };
    cp0_spi1_pins: cp0-spi-pins-1 {
    marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15", "mpp16";
    marvell,function = "spi1";
    };
    /* cp0_rcvr_clk_pins: cp0-rcvr-clk-pins {
    marvell, pins = "mpp40";
    marvell,function = "synce1";
    };*/
    cp0_button_pin: cp0-button-pin {
    marvell,pins = "mpp32";
    marvell,function = "gpio";
    };
    };
    };
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_sdhci_pins
    &cp0_sdhci_cd_pins>;
    bus-width = ;
    cd-gpios = <&cp0_gpio2 11 GPIO_ACTIVE_LOW>;
    no-1-8-v;
    vqmmc-supply = <&v_3_3>;
    vmmc-supply = <&v_3_3>;
    };

    &cp0_spi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&cp0_spi1_pins>;
    reg = ;
    spi-flash@0 {
    #address-cells = ;
    #size-cells = ;
    compatible = "jedec,spi-nor";
    reg = ;
    spi-max-frequency = ;
    };
    spi-flash@1 {
    #address-cells = ;
    #size-cells = ;
    compatible = "jedec,spi-nor";
    reg = ;
    /* On carrier MUX does not allow higher frequencies */
    spi-max-frequency = ;
    };
    };

    &cp0_syscon0 {
    cp0_pinctrl: pinctrl {
    compatible = "marvell,cp115-standalone-pinctrl";
    cp0_i2c0_pins: cp0-i2c-pins-0 {
    marvell,pins = "mpp37", "mpp38";
    marvell,function = "i2c0";
    };
    cp0_i2c1_pins: cp0-i2c-pins-1 {
    marvell,pins = "mpp35", "mpp36";
    marvell,function = "i2c1";
    };
    cp0_ge2_rgmii_pins: cp0-ge-rgmii-pins-0 {
    marvell,pins = "mpp44", "mpp45", "mpp46",
    "mpp47", "mpp48", "mpp49",
    "mpp50", "mpp51", "mpp52",
    "mpp53", "mpp54", "mpp55";
    marvell,function = "ge1";
    };
    cp0_sdhci_cd_pins: cp0-sdhci-cd-pins-0 {
    marvell,pins = "mpp43";
    marvell,function = "sdio";
    };
    cp0_sdhci_pins: cp0-sdhi-pins-0 {
    marvell,pins = "mpp56", "mpp57", "mpp58",
    "mpp59", "mpp60", "mpp61";
    marvell,function = "sdio";
    };
    cp0_spi1_pins: cp0-spi-pins-1 {
    marvell,pins = "mpp12", "mpp13", "mpp14", "mpp15", "mpp16";
    marvell,function = "spi1";
    };
    /* cp0_rcvr_clk_pins: cp0-rcvr-clk-pins {
    marvell, pins = "mpp40";
    marvell,function = "synce1";
    };*/
    cp0_button_pin: cp0-button-pin {
    marvell,pins = "mpp32";
    marvell,function = "gpio";
    };
    };
    };