Bug#1065611: Additional support for SolidRun HoneyComb

2024-03-19 Thread Diederik de Haas
On Tuesday, 19 March 2024 11:52:29 CET Josua Mayer wrote:
> May I ask if you are analyzing dts manually, or whether you are aware
> of an automatic tool?

Analyses is done by a MUCH improved scripts based upon what I came up with a 
while ago:
https://salsa.debian.org/kernel-team/linux/-/merge_requests/906#note_442903

My script came forth as I was analysing dts[i] files manually by looking up the 
``compatible = "xyz"`` ... and at some point I made a script to help with 
that. Even the much improved version doesn't find them all so I regularly end 
up filling in the things it didn't find, but usually it does find 80-90+%.

HTH,
  Diederik

dts2config
Description: application/shellscript
diederik@bagend:~/dev/debian/salsa/kernel-team/linux$ ../dts2config 
arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dts

dts: arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dts

 includes: arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
 
 dts: arch/arm64/boot/dts/freescale/fsl-lx2160a-honeycomb.dts
 - ARCH_LAYERSCAPE
   - arch/arm64/Kconfig.platforms
 - ARCH_LAYERSCAPE (bool)
   - debian/config/arm64/config
 - CONFIG_ARCH_LAYERSCAPE=y
   - debian/config/arm64/config.cloud-arm64
 - # CONFIG_ARCH_LAYERSCAPE is not set
 
 compatible: "solidrun,honeycomb"
 
 compatible: "solidrun,lx2160a-cex7"
 
 compatible: "fsl,lx2160a"
 

dts: arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi

 includes: arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
 
 compatible: "gpio-keys"
 - source: drivers/input/keyboard/gpio_keys.c
   - KEYBOARD_GPIO
 - drivers/input/keyboard/Kconfig
   - KEYBOARD_GPIO (tristate)
 - debian/config/config
   - # CONFIG_KEYBOARD_GPIO is not set
 - debian/config/config.cloud
   - # CONFIG_KEYBOARD_GPIO is not set
 - debian/config/arm64/config
   - CONFIG_KEYBOARD_GPIO=m
   - INPUT_KEYBOARD
 - drivers/input/keyboard/Kconfig
   - INPUT_KEYBOARD (bool, default y)
 - debian/config/config
   - CONFIG_INPUT_KEYBOARD=y
   - INPUT
 - drivers/input/Kconfig
   - INPUT (tristate, default y)
 - debian/config/config
   - CONFIG_INPUT=y
 
 compatible: "sff,sfp"
 - source: drivers/net/phy/sfp.c
   - SFP
 - drivers/net/phy/Kconfig
   - SFP (tristate)
 - debian/config/config
   - CONFIG_SFP=m
 

dts: arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi

 includes: arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
 
 compatible: "solidrun,lx2160a-cex7"
 
 compatible: "fsl,lx2160a"
 
 compatible: "regulator-fixed"
 - source: drivers/regulator/fixed.c
   - REGULATOR_FIXED_VOLTAGE
 - drivers/regulator/Kconfig
   - REGULATOR_FIXED_VOLTAGE (tristate)
 - debian/config/config
   - # CONFIG_REGULATOR_FIXED_VOLTAGE is not set
 - debian/config/arm64/config
   - CONFIG_REGULATOR_FIXED_VOLTAGE=m
   - REGULATOR
 - drivers/regulator/Kconfig
   - REGULATOR (bool)
 - debian/config/config
   - # CONFIG_REGULATOR is not set
 - debian/config/config.cloud
   - # CONFIG_REGULATOR is not set
 - debian/config/arm64/config
   - CONFIG_REGULATOR=y
 
 compatible: "nxp,pca9547"
 - source: drivers/i2c/muxes/i2c-mux-pca954x.c
   - I2C_MUX_PCA954x
 - drivers/i2c/muxes/Kconfig
   - I2C_MUX_PCA954x (tristate)
 - debian/config/config
   - # CONFIG_I2C_MUX_PCA954x is not set
 - debian/config/arm64/config
   - CONFIG_I2C_MUX_PCA954x=m
 
 compatible: "atmel,24c512"
 - source: drivers/misc/eeprom/at24.c
   - EEPROM_AT24
 - drivers/misc/eeprom/Kconfig
   - EEPROM_AT24 (tristate)
 - debian/config/config
   - CONFIG_EEPROM_AT24=m
 
 compatible: "atmel,spd"
 - source: drivers/misc/eeprom/at24.c
   - EEPROM_AT24
 - drivers/misc/eeprom/Kconfig
   - EEPROM_AT24 (tristate)
 - debian/config/config
   - CONFIG_EEPROM_AT24=m
 
 compatible: "atmel,24c02"
 - source: drivers/misc/eeprom/at24.c
   - EEPROM_AT24
 - drivers/misc/eeprom/Kconfig
   - EEPROM_AT24 (tristate)
 - debian/config/config
   - CONFIG_EEPROM_AT24=m
 
 compatible: "ti,amc6821"
 - source: drivers/hwmon/amc6821.c
   - SENSORS_AMC6821
 - drivers/hwmon/Kconfig
   - SENSORS_AMC6821 (tristate)
 - debian/config/config
   - CONFIG_SENSORS_AMC6821=m
   - I2C
 - drivers/i2c/Kconfig
   - I2C (tristate)
 - debian/config/arm64/config
   - CONFIG_I2C=y
 
 compatible: "lltc,ltc3882"
 - source: drivers/hwmon/pmbus/ltc2978.c
   - SENSORS_LTC2978
 - drivers/hwmon/pmbus/Kconfig
   - SENSORS_LTC2978 (tristate)
   - PMBUS
 - drivers/hwmon/pmbus/Kconfig
   - PMBUS (tristate)
 - debian/config/config
   - # CONFIG_PMBUS is not set
   - HWMON
 - drivers/hwmon/Kconfig
   - HWMON (tristate, default y)
 - debian/config/config
   - CONFIG_HWMON=y
 

Bug#1065611: Additional support for SolidRun HoneyComb

2024-03-19 Thread Josua Mayer
Hi Diederik,

May I ask if you are analyzing dts manually, or whether you are aware
of an automatic tool?

sincerely
Josua Mayer

Am 12.03.24 um 18:04 schrieb Diederik de Haas:
> Hi Josua,
>
> On Tuesday, 12 March 2024 16:28:06 CET Josua Mayer wrote:
>> I believe I found the answer:
>> EDAC_MPC85XX is for power-pc only,
>> EDAC_LAYERSCAPE is for arm (see drivers/edac/layerscape_edac.c).
> You're right. In the commit I referenced earlier (ea2eb9a8b6207ee4),
> I misinterpreted the commit message.
> That commit also created ``drivers/edac/fsl_ddr_edac.c`` which got the arch 
> independent (or at least dual arch) parts. Its header has this:
> ```
>  * Support Power-based SoCs including MPC85xx, MPC86xx, MPC83xx and
>  * ARM-based Layerscape SoCs including LS2xxx. Originally split
>  * out from mpc85xx_edac EDAC driver.
> ```
>
>> Am 12.03.24 um 16:13 schrieb Josua Mayer:
>>> Thank you for taking care of this!
>>> First the additional changes you found seem reasonable.
> Excellent, then I'll make a MR for them (except EDAC_MPC85XX):
> - drivers/hwmon/pmbus: Enable PMBUS, SENSORS_PMBUS and
>SENSORS_LTC2978 as modules
> - drivers/nvmem: Enable NVMEM_LAYERSCAPE_SFP as module
> - drivers/rtc: Enable RTC_DRV_FSL_FTM_ALARM as module
> - drivers/soc/fsl: Enable FSL_RCPM
>
>>> Regarding edac - I checked NXPs reference BSP for LX2160,
>>> and their linux fork has the same status, driver can not be enabled on
>>> arm64.
>>> However I also agree it should be enabled if it were possible.
>>> The driver appears to setup ecc bit error interrupts so that hey can be
>>> reported by Linux.
>>> ...
>>> I may have access to an lx2160a system with ecc memory within the coming
>>> week, so I could test (on vendor kernel based on 5.10 only) whether any
>>> problems show up. If not, perhaps a patch to the kernel is advisable.
> As EDAC_LAYERSCAPE got enabled in 5.5.17-1 via bug 948576 (with a patch from 
> you), ECC support should already work with the Stable 6.1 kernel (or newer).
>
>>> Am 07.03.24 um 13:34 schrieb Diederik de Haas:
 On Thursday, 18 January 2024 17:40:38 CET Josua Mayer wrote:

> LX2160 SoC early silicon revisions have a pci-e generation 4
> controller.
> It requires a different driver from newer gen-3 silicon.
>
> This affects the SolidRun Honeycomb Workstation which
> is otherwise fully supported in Debian.
 I cloned bug report #1061116 into #1065611 to discuss some additional
 support for the SolidRun HoneyComb.

 I analyzed the HoneyComb dts file and the following included .dtsi
 files:
 - arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
 - arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
 - arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
> If my MR gets merged, then there's truly full support in Debian :)
>
> Cheers,
>   Diederik


Bug#1065611: Additional support for SolidRun HoneyComb

2024-03-12 Thread Diederik de Haas
Hi Josua,

On Tuesday, 12 March 2024 16:28:06 CET Josua Mayer wrote:
> I believe I found the answer:
> EDAC_MPC85XX is for power-pc only,
> EDAC_LAYERSCAPE is for arm (see drivers/edac/layerscape_edac.c).

You're right. In the commit I referenced earlier (ea2eb9a8b6207ee4),
I misinterpreted the commit message.
That commit also created ``drivers/edac/fsl_ddr_edac.c`` which got the arch 
independent (or at least dual arch) parts. Its header has this:
```
 * Support Power-based SoCs including MPC85xx, MPC86xx, MPC83xx and
 * ARM-based Layerscape SoCs including LS2xxx. Originally split
 * out from mpc85xx_edac EDAC driver.
```

> Am 12.03.24 um 16:13 schrieb Josua Mayer:
> >
> > Thank you for taking care of this!
> > First the additional changes you found seem reasonable.

Excellent, then I'll make a MR for them (except EDAC_MPC85XX):
- drivers/hwmon/pmbus: Enable PMBUS, SENSORS_PMBUS and
   SENSORS_LTC2978 as modules
- drivers/nvmem: Enable NVMEM_LAYERSCAPE_SFP as module
- drivers/rtc: Enable RTC_DRV_FSL_FTM_ALARM as module
- drivers/soc/fsl: Enable FSL_RCPM

> > Regarding edac - I checked NXPs reference BSP for LX2160,
> > and their linux fork has the same status, driver can not be enabled on
> > arm64.
> > However I also agree it should be enabled if it were possible.
> > The driver appears to setup ecc bit error interrupts so that hey can be
> > reported by Linux.
> > ...
> > I may have access to an lx2160a system with ecc memory within the coming
> > week, so I could test (on vendor kernel based on 5.10 only) whether any
> > problems show up. If not, perhaps a patch to the kernel is advisable.

As EDAC_LAYERSCAPE got enabled in 5.5.17-1 via bug 948576 (with a patch from 
you), ECC support should already work with the Stable 6.1 kernel (or newer).

> > Am 07.03.24 um 13:34 schrieb Diederik de Haas:
> >> On Thursday, 18 January 2024 17:40:38 CET Josua Mayer wrote:
> >> 
> >>> LX2160 SoC early silicon revisions have a pci-e generation 4
> >>> controller.
> >>> It requires a different driver from newer gen-3 silicon.
> >>>
> >>> This affects the SolidRun Honeycomb Workstation which
> >>> is otherwise fully supported in Debian.
> >> 
> >> I cloned bug report #1061116 into #1065611 to discuss some additional
> >> support for the SolidRun HoneyComb.
> >>
> >> I analyzed the HoneyComb dts file and the following included .dtsi
> >> files:
> >> - arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
> >> - arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
> >> - arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi

If my MR gets merged, then there's truly full support in Debian :)

Cheers,
  Diederik

signature.asc
Description: This is a digitally signed message part.


Bug#1065611: Additional support for SolidRun HoneyComb

2024-03-12 Thread Josua Mayer
Hi Diederik,

I believe I found the answer:
EDAC_MPC85XX is for power-pc only,
EDAC_LAYERSCAPE is for arm (see drivers/edac/layerscape_edac.c).

br
Josua

Am 12.03.24 um 16:13 schrieb Josua Mayer:
> Hi Diederik,
>
> Thank you for taking care of this!
> First the additional changes you found seem reasonable.
>
> Regarding edac - I checked NXPs reference BSP for LX2160,
> and their linux fork has the same status, driver can not be enabled on arm64.
>
> However I also agree it should be enabled if it were possible.
> The driver appears to setup ecc bit error interrupts so that hey can be 
> reported by Linux.
>
> Here is what other qoriq drivers do:
> drivers/crypto/caam/Kconfig:    depends on FSL_SOC || ARCH_MXC || 
> ARCH_LAYERSCAPE
>
> I may have access to an lx2160a system with ecc memory within the coming week,
> so I could test (on vendor kernel based on 5.10 only) whether any problems 
> show up.
> If not, perhaps a patch to the kernel is advisable.
>
> Am 07.03.24 um 13:34 schrieb Diederik de Haas:
>
>> Hi Josua,
>>
>> On Thursday, 18 January 2024 17:40:38 CET Josua Mayer wrote:
>>> LX2160 SoC early silicon revisions have a pci-e generation 4 controller.
>>> It requires a different driver from newer gen-3 silicon.
>>>
>>> This affects the SolidRun Honeycomb Workstation which
>>> is otherwise fully supported in Debian.
>> I cloned bug report #1061116 into #1065611 to discuss some additional 
>> support 
>> for the SolidRun HoneyComb.
>>
>> I analyzed the HoneyComb dts file and the following included .dtsi files:
>> - arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
>> - arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
>> - arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
>>
>> If I exclude the kernel modules from 1061116 and 1061117, then I still have 
>> the following list of additional modules to enable:
>> - drivers/edac: Enable EDAC_MPC85XX
>> - drivers/hwmon/pmbus: Enable PMBUS, SENSORS_PMBUS and
>>   SENSORS_LTC2978 as modules
>> - drivers/nvmem: Enable NVMEM_LAYERSCAPE_SFP as module
>> - drivers/rtc: Enable RTC_DRV_FSL_FTM_ALARM as module
>> - drivers/soc/fsl: Enable FSL_RCPM
>>
>> If you agree that this is a good list I can make a MR to get them enabled.
>> A MR for 1061116 and 1061117 has just been merged in our 'master' branch.
>>
>> But I ran into an issue when looking at the ``EDAC_MPC85XX`` stanza 
>> in``drivers/edac/Kconfig``:
>> ``depends on FSL_SOC && EDAC=y``
>>
>> But ``FSL_SOC`` is (only) defined in ``arch/powerpc/Kconfig``, which means 
>> ``EDAC_MPC85XX`` can not be enabled on ``arm64``. 
>> That module was found based on ``compatible = 
>> "fsl,qoriq-memory-controller"``, 
>> which sounds like something you would want to have.
>>
>> Upstream commit ea2eb9a8b6207ee4 has the following commit message:
>> ```
>> EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx
>> 
>> The mpc85xx-compatible DDR controllers are used on ARM-based SoCs too.
>> Carve out the DDR part from the mpc85xx EDAC driver in preparation to
>> support both architectures.
>> ```
>> Which I interpret as all (?) the preparations for supporting both powerpc 
>> and 
>> ARM were made, but they forgot to update the strict dependency of 
>> ``EDAC_MPC85XX`` to powerpc to actually support both architectures?
>>
>> Can you shed some light on this?
>>
>> Cheers,
>>   Diederik


Bug#1065611: Additional support for SolidRun HoneyComb

2024-03-12 Thread Josua Mayer
Hi Diederik,

Thank you for taking care of this!
First the additional changes you found seem reasonable.

Regarding edac - I checked NXPs reference BSP for LX2160,
and their linux fork has the same status, driver can not be enabled on arm64.

However I also agree it should be enabled if it were possible.
The driver appears to setup ecc bit error interrupts so that hey can be 
reported by Linux.

Here is what other qoriq drivers do:
drivers/crypto/caam/Kconfig:    depends on FSL_SOC || ARCH_MXC || 
ARCH_LAYERSCAPE

I may have access to an lx2160a system with ecc memory within the coming week,
so I could test (on vendor kernel based on 5.10 only) whether any problems show 
up.
If not, perhaps a patch to the kernel is advisable.

Am 07.03.24 um 13:34 schrieb Diederik de Haas:

> Hi Josua,
>
> On Thursday, 18 January 2024 17:40:38 CET Josua Mayer wrote:
>> LX2160 SoC early silicon revisions have a pci-e generation 4 controller.
>> It requires a different driver from newer gen-3 silicon.
>>
>> This affects the SolidRun Honeycomb Workstation which
>> is otherwise fully supported in Debian.
> I cloned bug report #1061116 into #1065611 to discuss some additional support 
> for the SolidRun HoneyComb.
>
> I analyzed the HoneyComb dts file and the following included .dtsi files:
> - arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
> - arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
> - arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
>
> If I exclude the kernel modules from 1061116 and 1061117, then I still have 
> the following list of additional modules to enable:
> - drivers/edac: Enable EDAC_MPC85XX
> - drivers/hwmon/pmbus: Enable PMBUS, SENSORS_PMBUS and
>   SENSORS_LTC2978 as modules
> - drivers/nvmem: Enable NVMEM_LAYERSCAPE_SFP as module
> - drivers/rtc: Enable RTC_DRV_FSL_FTM_ALARM as module
> - drivers/soc/fsl: Enable FSL_RCPM
>
> If you agree that this is a good list I can make a MR to get them enabled.
> A MR for 1061116 and 1061117 has just been merged in our 'master' branch.
>
> But I ran into an issue when looking at the ``EDAC_MPC85XX`` stanza 
> in``drivers/edac/Kconfig``:
> ``depends on FSL_SOC && EDAC=y``
>
> But ``FSL_SOC`` is (only) defined in ``arch/powerpc/Kconfig``, which means 
> ``EDAC_MPC85XX`` can not be enabled on ``arm64``. 
> That module was found based on ``compatible = 
> "fsl,qoriq-memory-controller"``, 
> which sounds like something you would want to have.
>
> Upstream commit ea2eb9a8b6207ee4 has the following commit message:
> ```
> EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx
> 
> The mpc85xx-compatible DDR controllers are used on ARM-based SoCs too.
> Carve out the DDR part from the mpc85xx EDAC driver in preparation to
> support both architectures.
> ```
> Which I interpret as all (?) the preparations for supporting both powerpc and 
> ARM were made, but they forgot to update the strict dependency of 
> ``EDAC_MPC85XX`` to powerpc to actually support both architectures?
>
> Can you shed some light on this?
>
> Cheers,
>   Diederik


Bug#1065611: Additional support for SolidRun HoneyComb

2024-03-07 Thread Diederik de Haas
Hi Josua,

On Thursday, 18 January 2024 17:40:38 CET Josua Mayer wrote:
> LX2160 SoC early silicon revisions have a pci-e generation 4 controller.
> It requires a different driver from newer gen-3 silicon.
> 
> This affects the SolidRun Honeycomb Workstation which
> is otherwise fully supported in Debian.

I cloned bug report #1061116 into #1065611 to discuss some additional support 
for the SolidRun HoneyComb.

I analyzed the HoneyComb dts file and the following included .dtsi files:
- arch/arm64/boot/dts/freescale/fsl-lx2160a-clearfog-itx.dtsi
- arch/arm64/boot/dts/freescale/fsl-lx2160a-cex7.dtsi
- arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi

If I exclude the kernel modules from 1061116 and 1061117, then I still have 
the following list of additional modules to enable:
- drivers/edac: Enable EDAC_MPC85XX
- drivers/hwmon/pmbus: Enable PMBUS, SENSORS_PMBUS and
  SENSORS_LTC2978 as modules
- drivers/nvmem: Enable NVMEM_LAYERSCAPE_SFP as module
- drivers/rtc: Enable RTC_DRV_FSL_FTM_ALARM as module
- drivers/soc/fsl: Enable FSL_RCPM

If you agree that this is a good list I can make a MR to get them enabled.
A MR for 1061116 and 1061117 has just been merged in our 'master' branch.

But I ran into an issue when looking at the ``EDAC_MPC85XX`` stanza 
in``drivers/edac/Kconfig``:
``depends on FSL_SOC && EDAC=y``

But ``FSL_SOC`` is (only) defined in ``arch/powerpc/Kconfig``, which means 
``EDAC_MPC85XX`` can not be enabled on ``arm64``. 
That module was found based on ``compatible = "fsl,qoriq-memory-controller"``, 
which sounds like something you would want to have.

Upstream commit ea2eb9a8b6207ee4 has the following commit message:
```
EDAC, fsl-ddr: Separate FSL DDR driver from MPC85xx

The mpc85xx-compatible DDR controllers are used on ARM-based SoCs too.
Carve out the DDR part from the mpc85xx EDAC driver in preparation to
support both architectures.
```
Which I interpret as all (?) the preparations for supporting both powerpc and 
ARM were made, but they forgot to update the strict dependency of 
``EDAC_MPC85XX`` to powerpc to actually support both architectures?

Can you shed some light on this?

Cheers,
  Diederik

signature.asc
Description: This is a digitally signed message part.