mbox series

[v2,0/2] Add support for the Purism Librem5 devkit

Message ID 20190412130427.13418-1-angus@akkea.ca
Headers show
Series Add support for the Purism Librem5 devkit | expand

Message

Angus Ainslie April 12, 2019, 1:04 p.m. UTC
The Librem5 devkit is based on the imx8mq from NXP. This is a default
devicetree to boot the board to a command prompt.

Changes since v1:
Dropped config file.
Updated the board compatible label.
Changed node names to follow naming conventions.
Added a more complete regulator hierachy.
Removed unused nodes.
Removed unknown devices.
Fixed comment style.
Dropped undocumented properties.

Angus Ainslie (Purism) (2):
  arm64: dts: fsl: librem5: Add a device tree for the Librem5 devkit
  dt-bindings: Add an entry for Purism SPC

 .../devicetree/bindings/vendor-prefixes.txt   |   1 +
 arch/arm64/boot/dts/freescale/Makefile        |   1 +
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 850 ++++++++++++++++++
 3 files changed, 852 insertions(+)
 create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts

Comments

Andrew Lunn April 12, 2019, 1:42 p.m. UTC | #1
> +	mdio {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		ethphy0: ethernet-phy@1 {
> +			compatible = "ethernet-phy-ieee802.3-c22";

Hi Angus

This compatible string is optional. It won't warm, but it is not
needed.

> +			reg = <1>;
> +			power-supply = <&reg_3V3_P>;

I don't remember seeing a power-supply property in an Ethernet PHY
node before. What is using it? The PHY driver? Or the driver core
code?

	Andrew
Leonard Crestez April 12, 2019, 2:39 p.m. UTC | #2
On Fri, 2019-04-12 at 07:04 -0600, Angus Ainslie (Purism) wrote:
> +&i2c1 {
> +       clock-frequency = <400000>;
> +       pinctrl-names = "default";
> +       pinctrl-0 = <&pinctrl_i2c1>;
> +       status = "okay";
> +
> +       pmic: pmic@4b {
> +               reg = <0x4b>;
> +               compatible = "rohm,bd71837";
> +               pinctrl-names = "default";
> +               pinctrl-0 = <&pinctrl_pmic>;
> +               clocks = <&pmic_osc>;
> +               clock-names = "osc";
> +               clock-output-names = "pmic_clk";
> +               interrupt-parent = <&gpio1>;
> +               interrupts = <3 GPIO_ACTIVE_LOW>;
> +               interrupt-names = "irq";
> +               rohm,reset-snvs-powered;
> +
> +               gpo {
> +                       /* 0b0000_1100 all gpos with cmos output mode
> */
> +                       rohm,drv = <0x0C>;
> +               };

After searching for this gpo/rohm,drv property it does not seem to be
documented or handled anywhere?

Should probably just drop.

> +               regulators {
> +                       #address-cells = <1>;
> +                       #size-cells = <0>;
> +
> +                       buck1_reg: BUCK1@0 {
> +                               reg = <0>;
> +                               regulator-name = "buck1";
> +                               regulator-min-microvolt = <700000>;
> +                               regulator-max-microvolt = <1300000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                               regulator-ramp-delay = <1250>;
> +                               rohm,dvs-run-voltage = <900000>;
> +                               rohm,dvs-idle-voltage = <850000>;
> +                               rohm,dvs-suspend-voltage = <800000>;
> +                       };
> +
> +                       buck2_reg: BUCK2@1 {
> +                               reg = <1>;
> +                               regulator-name = "buck2";
> +                               regulator-min-microvolt = <700000>;
> +                               regulator-max-microvolt = <1300000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                               regulator-ramp-delay = <1250>;
> +                               rohm,dvs-run-voltage = <1000000>;
> +                               rohm,dvs-idle-voltage = <900000>;
> +                       };
> +
> +                       buck3_reg: BUCK3@2 {
> +                               reg = <2>;
> +                               regulator-name = "buck3";
> +                               regulator-min-microvolt = <700000>;
> +                               regulator-max-microvolt = <1300000>;
> +                               rohm,dvs-run-voltage = <1000000>;
> +                       };
> +
> +                       buck4_reg: BUCK4@3 {
> +                               reg = <3>;
> +                               regulator-name = "buck4";
> +                               regulator-min-microvolt = <700000>;
> +                               regulator-max-microvolt = <1300000>;
> +                               rohm,dvs-run-voltage = <1000000>;
> +                       };
> +
> +                       buck5_reg: BUCK5@4 {
> +                               reg = <4>;
> +                               regulator-name = "buck5";
> +                               regulator-min-microvolt = <700000>;
> +                               regulator-max-microvolt = <1350000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       buck6_reg: BUCK6@5 {
> +                               reg = <5>;
> +                               regulator-name = "buck6";
> +                               regulator-min-microvolt = <3000000>;
> +                               regulator-max-microvolt = <3300000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       buck7_reg: BUCK7@6 {
> +                               reg = <6>;
> +                               regulator-name = "buck7";
> +                               regulator-min-microvolt = <1605000>;
> +                               regulator-max-microvolt = <1995000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       buck8_reg: BUCK8@7 {
> +                               reg = <7>;
> +                               regulator-name = "buck8";
> +                               regulator-min-microvolt = <800000>;
> +                               regulator-max-microvolt = <1400000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       ldo1_reg: LDO1@8 {
> +                               reg = <8>;
> +                               regulator-name = "ldo1";
> +                               regulator-min-microvolt = <3000000>;
> +                               regulator-max-microvolt = <3300000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       ldo2_reg: LDO2@9 {
> +                               reg = <9>;
> +                               regulator-name = "ldo2";
> +                               regulator-min-microvolt = <900000>;
> +                               regulator-max-microvolt = <900000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       ldo3_reg: LDO3@10 {
> +                               reg = <10>;
> +                               regulator-name = "ldo3";
> +                               regulator-min-microvolt = <1800000>;
> +                               regulator-max-microvolt = <3300000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       ldo4_reg: LDO4@11 {
> +                               reg = <11>;
> +                               regulator-name = "ldo4";
> +                               regulator-min-microvolt = <900000>;
> +                               regulator-max-microvolt = <1800000>;
> +                               regulator-boot-on;
> +                               regulator-always-on;
> +                       };
> +
> +                       ldo5_reg: LDO5@12 {
> +                               reg = <12>;
> +                               regulator-name = "ldo5";
> +                               regulator-min-microvolt = <1800000>;
> +                               regulator-max-microvolt = <3300000>;
> +                       };
> +
> +                       ldo6_reg: LDO6@13 {
> +                               reg = <13>;
> +                               regulator-name = "ldo6";
> +                               regulator-min-microvolt = <900000>;
> +                               regulator-max-microvolt = <1800000>;
> +                       };
> +
> +                       ldo7_reg: LDO7@14 {
> +                               reg = <14>;
> +                               regulator-name = "ldo7";
> +                               regulator-min-microvolt = <1800000>;
> +                               regulator-max-microvolt = <3300000>;
> +                       };
> +               };
> +       };
Angus Ainslie April 15, 2019, 2:58 p.m. UTC | #3
On 2019-04-12 07:39, Leonard Crestez wrote:
> On Fri, 2019-04-12 at 07:04 -0600, Angus Ainslie (Purism) wrote:
>> +&i2c1 {
>> +       clock-frequency = <400000>;
>> +       pinctrl-names = "default";
>> +       pinctrl-0 = <&pinctrl_i2c1>;
>> +       status = "okay";
>> +
>> +       pmic: pmic@4b {
>> +               reg = <0x4b>;
>> +               compatible = "rohm,bd71837";
>> +               pinctrl-names = "default";
>> +               pinctrl-0 = <&pinctrl_pmic>;
>> +               clocks = <&pmic_osc>;
>> +               clock-names = "osc";
>> +               clock-output-names = "pmic_clk";
>> +               interrupt-parent = <&gpio1>;
>> +               interrupts = <3 GPIO_ACTIVE_LOW>;
>> +               interrupt-names = "irq";
>> +               rohm,reset-snvs-powered;
>> +
>> +               gpo {
>> +                       /* 0b0000_1100 all gpos with cmos output mode
>> */
>> +                       rohm,drv = <0x0C>;
>> +               };
> 
> After searching for this gpo/rohm,drv property it does not seem to be
> documented or handled anywhere?
> 
> Should probably just drop.

Right I can't find it in the driver either. I'll drop it.

Thanks
Angus

> 
>> +               regulators {
>> +                       #address-cells = <1>;
>> +                       #size-cells = <0>;
>> +
>> +                       buck1_reg: BUCK1@0 {
>> +                               reg = <0>;
>> +                               regulator-name = "buck1";
>> +                               regulator-min-microvolt = <700000>;
>> +                               regulator-max-microvolt = <1300000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                               regulator-ramp-delay = <1250>;
>> +                               rohm,dvs-run-voltage = <900000>;
>> +                               rohm,dvs-idle-voltage = <850000>;
>> +                               rohm,dvs-suspend-voltage = <800000>;
>> +                       };
>> +
>> +                       buck2_reg: BUCK2@1 {
>> +                               reg = <1>;
>> +                               regulator-name = "buck2";
>> +                               regulator-min-microvolt = <700000>;
>> +                               regulator-max-microvolt = <1300000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                               regulator-ramp-delay = <1250>;
>> +                               rohm,dvs-run-voltage = <1000000>;
>> +                               rohm,dvs-idle-voltage = <900000>;
>> +                       };
>> +
>> +                       buck3_reg: BUCK3@2 {
>> +                               reg = <2>;
>> +                               regulator-name = "buck3";
>> +                               regulator-min-microvolt = <700000>;
>> +                               regulator-max-microvolt = <1300000>;
>> +                               rohm,dvs-run-voltage = <1000000>;
>> +                       };
>> +
>> +                       buck4_reg: BUCK4@3 {
>> +                               reg = <3>;
>> +                               regulator-name = "buck4";
>> +                               regulator-min-microvolt = <700000>;
>> +                               regulator-max-microvolt = <1300000>;
>> +                               rohm,dvs-run-voltage = <1000000>;
>> +                       };
>> +
>> +                       buck5_reg: BUCK5@4 {
>> +                               reg = <4>;
>> +                               regulator-name = "buck5";
>> +                               regulator-min-microvolt = <700000>;
>> +                               regulator-max-microvolt = <1350000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       buck6_reg: BUCK6@5 {
>> +                               reg = <5>;
>> +                               regulator-name = "buck6";
>> +                               regulator-min-microvolt = <3000000>;
>> +                               regulator-max-microvolt = <3300000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       buck7_reg: BUCK7@6 {
>> +                               reg = <6>;
>> +                               regulator-name = "buck7";
>> +                               regulator-min-microvolt = <1605000>;
>> +                               regulator-max-microvolt = <1995000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       buck8_reg: BUCK8@7 {
>> +                               reg = <7>;
>> +                               regulator-name = "buck8";
>> +                               regulator-min-microvolt = <800000>;
>> +                               regulator-max-microvolt = <1400000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       ldo1_reg: LDO1@8 {
>> +                               reg = <8>;
>> +                               regulator-name = "ldo1";
>> +                               regulator-min-microvolt = <3000000>;
>> +                               regulator-max-microvolt = <3300000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       ldo2_reg: LDO2@9 {
>> +                               reg = <9>;
>> +                               regulator-name = "ldo2";
>> +                               regulator-min-microvolt = <900000>;
>> +                               regulator-max-microvolt = <900000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       ldo3_reg: LDO3@10 {
>> +                               reg = <10>;
>> +                               regulator-name = "ldo3";
>> +                               regulator-min-microvolt = <1800000>;
>> +                               regulator-max-microvolt = <3300000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       ldo4_reg: LDO4@11 {
>> +                               reg = <11>;
>> +                               regulator-name = "ldo4";
>> +                               regulator-min-microvolt = <900000>;
>> +                               regulator-max-microvolt = <1800000>;
>> +                               regulator-boot-on;
>> +                               regulator-always-on;
>> +                       };
>> +
>> +                       ldo5_reg: LDO5@12 {
>> +                               reg = <12>;
>> +                               regulator-name = "ldo5";
>> +                               regulator-min-microvolt = <1800000>;
>> +                               regulator-max-microvolt = <3300000>;
>> +                       };
>> +
>> +                       ldo6_reg: LDO6@13 {
>> +                               reg = <13>;
>> +                               regulator-name = "ldo6";
>> +                               regulator-min-microvolt = <900000>;
>> +                               regulator-max-microvolt = <1800000>;
>> +                       };
>> +
>> +                       ldo7_reg: LDO7@14 {
>> +                               reg = <14>;
>> +                               regulator-name = "ldo7";
>> +                               regulator-min-microvolt = <1800000>;
>> +                               regulator-max-microvolt = <3300000>;
>> +                       };
>> +               };
>> +       };