[PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support

Caleb James DeLisle posted 7 patches 7 months, 1 week ago
.../devicetree/bindings/mips/econet.yaml      |  26 +++
.../bindings/timer/econet,en751221-timer.yaml |  80 +++++++
.../devicetree/bindings/vendor-prefixes.yaml  |   2 +
MAINTAINERS                                   |  12 +
arch/mips/Kbuild.platforms                    |   1 +
arch/mips/Kconfig                             |  25 ++
arch/mips/boot/compressed/uart-16550.c        |   5 +
arch/mips/boot/dts/Makefile                   |   1 +
arch/mips/boot/dts/econet/Makefile            |   2 +
arch/mips/boot/dts/econet/en751221.dtsi       |  67 ++++++
.../econet/en751221_smartfiber_xp8421-b.dts   |  19 ++
arch/mips/econet/Kconfig                      |  48 ++++
arch/mips/econet/Makefile                     |   2 +
arch/mips/econet/Platform                     |   5 +
arch/mips/econet/init.c                       |  78 +++++++
drivers/clocksource/Kconfig                   |   8 +
drivers/clocksource/Makefile                  |   1 +
drivers/clocksource/timer-econet-en751221.c   | 216 ++++++++++++++++++
18 files changed, 598 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mips/econet.yaml
create mode 100644 Documentation/devicetree/bindings/timer/econet,en751221-timer.yaml
create mode 100644 arch/mips/boot/dts/econet/Makefile
create mode 100644 arch/mips/boot/dts/econet/en751221.dtsi
create mode 100644 arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dts
create mode 100644 arch/mips/econet/Kconfig
create mode 100644 arch/mips/econet/Makefile
create mode 100644 arch/mips/econet/Platform
create mode 100644 arch/mips/econet/init.c
create mode 100644 drivers/clocksource/timer-econet-en751221.c
[PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Caleb James DeLisle 7 months, 1 week ago
EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
processors. They are found in xDSL and xPON modems, and contain PCM
(VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.

The EcoNet MIPS SoCs are divided broadly into two families, the
EN751221 family based on the 34Kc, and the EN751627 family based on
the 1004Kc. Individual SoCs within a family are very similar, only
with different peripherals.

This patchset adds basic "boots to a console" support for the EN751221
family and adds SmartFiber XP8421-B, a low cost commercially available
board that is useful for testing and development.

Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
peripherals, and for historical reasons Airoha chips are sometimes
referred to with the EN75xx prefix. However this is a different
platform because Airoha chips are ARM based.

This patchset is against mips-next.

v4 -> v5
* 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
  * Improve explanation of HPT timer in changelog
  * Move pr_info to pr_debug per recommendation
  * Remove pointless debug on spurious interrupt
  * Small code-style change

v3 -> v4
* Rebase to 3b3704261e851e25983860e4c352f1f73786f4ab
* Omit already accepted patches (thanks guys!):
  - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-2-cjd@cjdns.fr/
  - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-3-cjd@cjdns.fr/
  - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-4-cjd@cjdns.fr/

v2 -> v3
* econet,en751221-timer.yaml -> Improve code style
* vendor-prefixes.yaml -> Correct alphabetic order
* en751221.dtsi
  - interrupt-controller code style
  - serial: Explain reason for clock-frequency = <1843200>
* v3->v3 diff provided for reference
  - https://gist.github.com/cjdelisle/21c9f0cd225f499bdff3c574c7f185f2
* CC: linux-mediatek@lists.infradead.org who may be interested.

v1 -> v2
* Codestyle
  - Apply codestyle from "The tip tree handbook" and recommendations
  - Remove "_rai" and "_m" symbol suffixes which are not standard
* irq-econet-en751221.c
  - Use cleanup.h _guard() and _free()
  - Separate irq_domain_ops from irq_chip, eliminating econet_intc struct
  - Remove irqsave in econet_wreg, irqs are already disabled in mask/unmask
  - Add explainatory comments
  - Refactor shadow logic for clarity, e.g. INTC_NO_SHADOW -> NOT_PERCPU
  - Improve error handling in case of invalid DTS
* econet,timer-hpt.yaml
  - Rename to econet,timer-en751221.yaml
  - Impose rule: "reg" must have 1 item on EN751221 and 2 on EN751627
* timer-econet-hpt.c
  - Rename to timer-econet-en751221.c to follow naming scheme from DT
* econet,en751221-intc.yaml
  - Fix validation error from required: interrupt-parent
  - shadow-interrupts -> switch to uint32-matrix for list of pairs
* MAINTAINERS -> Fixed accidental F: MAINTAINERS
* Replace "test image" with device SmartFiber-XP8421-B
* Restructure arch/mips/econet/Kconfig per arch/mips/ralink example
* v1->v2 diff is offered for reference:
  - https://gist.github.com/cjdelisle/bb3acab78b5f70dcdfe5dd6338293efe


Caleb James DeLisle (7):
  dt-bindings: timer: Add EcoNet EN751221 "HPT" CPU Timer
  clocksource/drivers: Add EcoNet Timer HPT driver
  dt-bindings: mips: Add EcoNet platform binding
  mips: Add EcoNet MIPS platform support
  dt-bindings: vendor-prefixes: Add SmartFiber
  mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board
  MAINTAINERS: Add entry for newly added EcoNet platform.

 .../devicetree/bindings/mips/econet.yaml      |  26 +++
 .../bindings/timer/econet,en751221-timer.yaml |  80 +++++++
 .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
 MAINTAINERS                                   |  12 +
 arch/mips/Kbuild.platforms                    |   1 +
 arch/mips/Kconfig                             |  25 ++
 arch/mips/boot/compressed/uart-16550.c        |   5 +
 arch/mips/boot/dts/Makefile                   |   1 +
 arch/mips/boot/dts/econet/Makefile            |   2 +
 arch/mips/boot/dts/econet/en751221.dtsi       |  67 ++++++
 .../econet/en751221_smartfiber_xp8421-b.dts   |  19 ++
 arch/mips/econet/Kconfig                      |  48 ++++
 arch/mips/econet/Makefile                     |   2 +
 arch/mips/econet/Platform                     |   5 +
 arch/mips/econet/init.c                       |  78 +++++++
 drivers/clocksource/Kconfig                   |   8 +
 drivers/clocksource/Makefile                  |   1 +
 drivers/clocksource/timer-econet-en751221.c   | 216 ++++++++++++++++++
 18 files changed, 598 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mips/econet.yaml
 create mode 100644 Documentation/devicetree/bindings/timer/econet,en751221-timer.yaml
 create mode 100644 arch/mips/boot/dts/econet/Makefile
 create mode 100644 arch/mips/boot/dts/econet/en751221.dtsi
 create mode 100644 arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dts
 create mode 100644 arch/mips/econet/Kconfig
 create mode 100644 arch/mips/econet/Makefile
 create mode 100644 arch/mips/econet/Platform
 create mode 100644 arch/mips/econet/init.c
 create mode 100644 drivers/clocksource/timer-econet-en751221.c

-- 
2.39.5
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Daniel Lezcano 7 months ago
On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
> EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
> processors. They are found in xDSL and xPON modems, and contain PCM
> (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
> 
> The EcoNet MIPS SoCs are divided broadly into two families, the
> EN751221 family based on the 34Kc, and the EN751627 family based on
> the 1004Kc. Individual SoCs within a family are very similar, only
> with different peripherals.
> 
> This patchset adds basic "boots to a console" support for the EN751221
> family and adds SmartFiber XP8421-B, a low cost commercially available
> board that is useful for testing and development.
> 
> Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
> peripherals, and for historical reasons Airoha chips are sometimes
> referred to with the EN75xx prefix. However this is a different
> platform because Airoha chips are ARM based.
> 
> This patchset is against mips-next.
> 
> v4 -> v5
> * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
>   * Improve explanation of HPT timer in changelog
>   * Move pr_info to pr_debug per recommendation
>   * Remove pointless debug on spurious interrupt
>   * Small code-style change

Shall I pick the clocksource + bindings changes through my tree ?

-- 

 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Thomas Bogendoerfer 7 months ago
On Tue, May 13, 2025 at 04:24:51PM +0200, Daniel Lezcano wrote:
> On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
> > EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
> > processors. They are found in xDSL and xPON modems, and contain PCM
> > (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
> > 
> > The EcoNet MIPS SoCs are divided broadly into two families, the
> > EN751221 family based on the 34Kc, and the EN751627 family based on
> > the 1004Kc. Individual SoCs within a family are very similar, only
> > with different peripherals.
> > 
> > This patchset adds basic "boots to a console" support for the EN751221
> > family and adds SmartFiber XP8421-B, a low cost commercially available
> > board that is useful for testing and development.
> > 
> > Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
> > peripherals, and for historical reasons Airoha chips are sometimes
> > referred to with the EN75xx prefix. However this is a different
> > platform because Airoha chips are ARM based.
> > 
> > This patchset is against mips-next.
> > 
> > v4 -> v5
> > * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
> >   * Improve explanation of HPT timer in changelog
> >   * Move pr_info to pr_debug per recommendation
> >   * Remove pointless debug on spurious interrupt
> >   * Small code-style change
> 
> Shall I pick the clocksource + bindings changes through my tree ?

please do, I'll take the remaining patches.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Daniel Lezcano 7 months ago
On 5/13/25 17:12, Thomas Bogendoerfer wrote:
> On Tue, May 13, 2025 at 04:24:51PM +0200, Daniel Lezcano wrote:
>> On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
>>> EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
>>> processors. They are found in xDSL and xPON modems, and contain PCM
>>> (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
>>>
>>> The EcoNet MIPS SoCs are divided broadly into two families, the
>>> EN751221 family based on the 34Kc, and the EN751627 family based on
>>> the 1004Kc. Individual SoCs within a family are very similar, only
>>> with different peripherals.
>>>
>>> This patchset adds basic "boots to a console" support for the EN751221
>>> family and adds SmartFiber XP8421-B, a low cost commercially available
>>> board that is useful for testing and development.
>>>
>>> Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
>>> peripherals, and for historical reasons Airoha chips are sometimes
>>> referred to with the EN75xx prefix. However this is a different
>>> platform because Airoha chips are ARM based.
>>>
>>> This patchset is against mips-next.
>>>
>>> v4 -> v5
>>> * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
>>>    * Improve explanation of HPT timer in changelog
>>>    * Move pr_info to pr_debug per recommendation
>>>    * Remove pointless debug on spurious interrupt
>>>    * Small code-style change
>>
>> Shall I pick the clocksource + bindings changes through my tree ?
> 
> please do, I'll take the remaining patches.


Applied patch 1 et 2, thanks!


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Caleb James DeLisle 7 months ago
On 13/05/2025 16:24, Daniel Lezcano wrote:
> On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
>> EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
>> processors. They are found in xDSL and xPON modems, and contain PCM
>> (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
>>
>> The EcoNet MIPS SoCs are divided broadly into two families, the
>> EN751221 family based on the 34Kc, and the EN751627 family based on
>> the 1004Kc. Individual SoCs within a family are very similar, only
>> with different peripherals.
>>
>> This patchset adds basic "boots to a console" support for the EN751221
>> family and adds SmartFiber XP8421-B, a low cost commercially available
>> board that is useful for testing and development.
>>
>> Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
>> peripherals, and for historical reasons Airoha chips are sometimes
>> referred to with the EN75xx prefix. However this is a different
>> platform because Airoha chips are ARM based.
>>
>> This patchset is against mips-next.
>>
>> v4 -> v5
>> * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
>>    * Improve explanation of HPT timer in changelog
>>    * Move pr_info to pr_debug per recommendation
>>    * Remove pointless debug on spurious interrupt
>>    * Small code-style change
> Shall I pick the clocksource + bindings changes through my tree ?
>
I'm new here so I don't know what that means for the merges which
will happen later, but I don't see any reason to do otherwise.


Thanks,

Caleb
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Daniel Lezcano 7 months ago
On Tue, May 13, 2025 at 04:31:05PM +0200, Caleb James DeLisle wrote:
> 
> On 13/05/2025 16:24, Daniel Lezcano wrote:
> > On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
> > > EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
> > > processors. They are found in xDSL and xPON modems, and contain PCM
> > > (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
> > > 
> > > The EcoNet MIPS SoCs are divided broadly into two families, the
> > > EN751221 family based on the 34Kc, and the EN751627 family based on
> > > the 1004Kc. Individual SoCs within a family are very similar, only
> > > with different peripherals.
> > > 
> > > This patchset adds basic "boots to a console" support for the EN751221
> > > family and adds SmartFiber XP8421-B, a low cost commercially available
> > > board that is useful for testing and development.
> > > 
> > > Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
> > > peripherals, and for historical reasons Airoha chips are sometimes
> > > referred to with the EN75xx prefix. However this is a different
> > > platform because Airoha chips are ARM based.
> > > 
> > > This patchset is against mips-next.
> > > 
> > > v4 -> v5
> > > * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
> > >    * Improve explanation of HPT timer in changelog
> > >    * Move pr_info to pr_debug per recommendation
> > >    * Remove pointless debug on spurious interrupt
> > >    * Small code-style change
> > Shall I pick the clocksource + bindings changes through my tree ?
> > 
> I'm new here so I don't know what that means for the merges which
> will happen later, but I don't see any reason to do otherwise.

The series introduces a new platform. The patches are touching
different susystems managed by different maintainers.

Usually, the changes are per subsystem, except when they are
interdependant.

Here you can choose to merge all the patches through the mips tree or
let the different maintainers to pick the changes related to the
subsystems they handle. You should clarify that in the cover
letter. If you choose the first alternative, then before merging the
changes, all maintainer should have blessed the patches with their
acked-by.


-- 

 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Caleb James DeLisle 7 months ago
On 13/05/2025 17:26, Daniel Lezcano wrote:
> On Tue, May 13, 2025 at 04:31:05PM +0200, Caleb James DeLisle wrote:
>> On 13/05/2025 16:24, Daniel Lezcano wrote:
>>> On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
>>>> EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
>>>> processors. They are found in xDSL and xPON modems, and contain PCM
>>>> (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
>>>>
>>>> The EcoNet MIPS SoCs are divided broadly into two families, the
>>>> EN751221 family based on the 34Kc, and the EN751627 family based on
>>>> the 1004Kc. Individual SoCs within a family are very similar, only
>>>> with different peripherals.
>>>>
>>>> This patchset adds basic "boots to a console" support for the EN751221
>>>> family and adds SmartFiber XP8421-B, a low cost commercially available
>>>> board that is useful for testing and development.
>>>>
>>>> Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
>>>> peripherals, and for historical reasons Airoha chips are sometimes
>>>> referred to with the EN75xx prefix. However this is a different
>>>> platform because Airoha chips are ARM based.
>>>>
>>>> This patchset is against mips-next.
>>>>
>>>> v4 -> v5
>>>> * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
>>>>     * Improve explanation of HPT timer in changelog
>>>>     * Move pr_info to pr_debug per recommendation
>>>>     * Remove pointless debug on spurious interrupt
>>>>     * Small code-style change
>>> Shall I pick the clocksource + bindings changes through my tree ?
>>>
>> I'm new here so I don't know what that means for the merges which
>> will happen later, but I don't see any reason to do otherwise.
> The series introduces a new platform. The patches are touching
> different susystems managed by different maintainers.
>
> Usually, the changes are per subsystem, except when they are
> interdependant.
>
> Here you can choose to merge all the patches through the mips tree or
> let the different maintainers to pick the changes related to the
> subsystems they handle. You should clarify that in the cover
> letter. If you choose the first alternative, then before merging the
> changes, all maintainer should have blessed the patches with their
> acked-by.
>
Thank you for the explanation, this patchset has already started to be
taken piece-wise, and the only dependency that comes to mind
is the econet vendor prefix which Rob Herring took few weeks ago.

With that said, I see no reason not to continue taking it piece-wise.

Thanks,

Caleb
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Thomas Bogendoerfer 6 months, 4 weeks ago
On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
> EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
> processors. They are found in xDSL and xPON modems, and contain PCM
> (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
> 
> The EcoNet MIPS SoCs are divided broadly into two families, the
> EN751221 family based on the 34Kc, and the EN751627 family based on
> the 1004Kc. Individual SoCs within a family are very similar, only
> with different peripherals.
> 
> This patchset adds basic "boots to a console" support for the EN751221
> family and adds SmartFiber XP8421-B, a low cost commercially available
> board that is useful for testing and development.
> 
> Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
> peripherals, and for historical reasons Airoha chips are sometimes
> referred to with the EN75xx prefix. However this is a different
> platform because Airoha chips are ARM based.
> 
> This patchset is against mips-next.
> 
> v4 -> v5
> * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
>   * Improve explanation of HPT timer in changelog
>   * Move pr_info to pr_debug per recommendation
>   * Remove pointless debug on spurious interrupt
>   * Small code-style change
> 
> v3 -> v4
> * Rebase to 3b3704261e851e25983860e4c352f1f73786f4ab
> * Omit already accepted patches (thanks guys!):
>   - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-2-cjd@cjdns.fr/
>   - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-3-cjd@cjdns.fr/
>   - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-4-cjd@cjdns.fr/
> 
> v2 -> v3
> * econet,en751221-timer.yaml -> Improve code style
> * vendor-prefixes.yaml -> Correct alphabetic order
> * en751221.dtsi
>   - interrupt-controller code style
>   - serial: Explain reason for clock-frequency = <1843200>
> * v3->v3 diff provided for reference
>   - https://gist.github.com/cjdelisle/21c9f0cd225f499bdff3c574c7f185f2
> * CC: linux-mediatek@lists.infradead.org who may be interested.
> 
> v1 -> v2
> * Codestyle
>   - Apply codestyle from "The tip tree handbook" and recommendations
>   - Remove "_rai" and "_m" symbol suffixes which are not standard
> * irq-econet-en751221.c
>   - Use cleanup.h _guard() and _free()
>   - Separate irq_domain_ops from irq_chip, eliminating econet_intc struct
>   - Remove irqsave in econet_wreg, irqs are already disabled in mask/unmask
>   - Add explainatory comments
>   - Refactor shadow logic for clarity, e.g. INTC_NO_SHADOW -> NOT_PERCPU
>   - Improve error handling in case of invalid DTS
> * econet,timer-hpt.yaml
>   - Rename to econet,timer-en751221.yaml
>   - Impose rule: "reg" must have 1 item on EN751221 and 2 on EN751627
> * timer-econet-hpt.c
>   - Rename to timer-econet-en751221.c to follow naming scheme from DT
> * econet,en751221-intc.yaml
>   - Fix validation error from required: interrupt-parent
>   - shadow-interrupts -> switch to uint32-matrix for list of pairs
> * MAINTAINERS -> Fixed accidental F: MAINTAINERS
> * Replace "test image" with device SmartFiber-XP8421-B
> * Restructure arch/mips/econet/Kconfig per arch/mips/ralink example
> * v1->v2 diff is offered for reference:
>   - https://gist.github.com/cjdelisle/bb3acab78b5f70dcdfe5dd6338293efe
> 
> 
> Caleb James DeLisle (7):
>   dt-bindings: timer: Add EcoNet EN751221 "HPT" CPU Timer
>   clocksource/drivers: Add EcoNet Timer HPT driver
>   dt-bindings: mips: Add EcoNet platform binding
>   mips: Add EcoNet MIPS platform support
>   dt-bindings: vendor-prefixes: Add SmartFiber
>   mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board
>   MAINTAINERS: Add entry for newly added EcoNet platform.
> 
>  .../devicetree/bindings/mips/econet.yaml      |  26 +++
>  .../bindings/timer/econet,en751221-timer.yaml |  80 +++++++
>  .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
>  MAINTAINERS                                   |  12 +
>  arch/mips/Kbuild.platforms                    |   1 +
>  arch/mips/Kconfig                             |  25 ++
>  arch/mips/boot/compressed/uart-16550.c        |   5 +
>  arch/mips/boot/dts/Makefile                   |   1 +
>  arch/mips/boot/dts/econet/Makefile            |   2 +
>  arch/mips/boot/dts/econet/en751221.dtsi       |  67 ++++++
>  .../econet/en751221_smartfiber_xp8421-b.dts   |  19 ++
>  arch/mips/econet/Kconfig                      |  48 ++++
>  arch/mips/econet/Makefile                     |   2 +
>  arch/mips/econet/Platform                     |   5 +
>  arch/mips/econet/init.c                       |  78 +++++++
>  drivers/clocksource/Kconfig                   |   8 +
>  drivers/clocksource/Makefile                  |   1 +
>  drivers/clocksource/timer-econet-en751221.c   | 216 ++++++++++++++++++
>  18 files changed, 598 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/mips/econet.yaml
>  create mode 100644 Documentation/devicetree/bindings/timer/econet,en751221-timer.yaml
>  create mode 100644 arch/mips/boot/dts/econet/Makefile
>  create mode 100644 arch/mips/boot/dts/econet/en751221.dtsi
>  create mode 100644 arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dts
>  create mode 100644 arch/mips/econet/Kconfig
>  create mode 100644 arch/mips/econet/Makefile
>  create mode 100644 arch/mips/econet/Platform
>  create mode 100644 arch/mips/econet/init.c
>  create mode 100644 drivers/clocksource/timer-econet-en751221.c

applied patches 3-7 to mips-next

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
Re: [PATCH v5 0/7] Add EcoNet EN751221 MIPS platform support
Posted by Caleb James DeLisle 6 months, 4 weeks ago
On 20/05/2025 08:49, Thomas Bogendoerfer wrote:
> On Wed, May 07, 2025 at 01:44:53PM +0000, Caleb James DeLisle wrote:
>> EcoNet MIPS SoCs are big endian machines based on 34Kc and 1004Kc
>> processors. They are found in xDSL and xPON modems, and contain PCM
>> (VoIP), Ethernet, USB, GPIO, I2C, SPI (Flash), UART, and PCIe.
>>
>> The EcoNet MIPS SoCs are divided broadly into two families, the
>> EN751221 family based on the 34Kc, and the EN751627 family based on
>> the 1004Kc. Individual SoCs within a family are very similar, only
>> with different peripherals.
>>
>> This patchset adds basic "boots to a console" support for the EN751221
>> family and adds SmartFiber XP8421-B, a low cost commercially available
>> board that is useful for testing and development.
>>
>> Note that Airoha (AN7523, AN7581) is similar to EcoNet in terms of
>> peripherals, and for historical reasons Airoha chips are sometimes
>> referred to with the EN75xx prefix. However this is a different
>> platform because Airoha chips are ARM based.
>>
>> This patchset is against mips-next.
>>
>> v4 -> v5
>> * 2/7 clocksource/drivers: Add EcoNet Timer HPT driver:
>>    * Improve explanation of HPT timer in changelog
>>    * Move pr_info to pr_debug per recommendation
>>    * Remove pointless debug on spurious interrupt
>>    * Small code-style change
>>
>> v3 -> v4
>> * Rebase to 3b3704261e851e25983860e4c352f1f73786f4ab
>> * Omit already accepted patches (thanks guys!):
>>    - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-2-cjd@cjdns.fr/
>>    - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-3-cjd@cjdns.fr/
>>    - https://patchwork.kernel.org/project/linux-mips/patch/20250330170306.2584136-4-cjd@cjdns.fr/
>>
>> v2 -> v3
>> * econet,en751221-timer.yaml -> Improve code style
>> * vendor-prefixes.yaml -> Correct alphabetic order
>> * en751221.dtsi
>>    - interrupt-controller code style
>>    - serial: Explain reason for clock-frequency = <1843200>
>> * v3->v3 diff provided for reference
>>    - https://gist.github.com/cjdelisle/21c9f0cd225f499bdff3c574c7f185f2
>> * CC: linux-mediatek@lists.infradead.org who may be interested.
>>
>> v1 -> v2
>> * Codestyle
>>    - Apply codestyle from "The tip tree handbook" and recommendations
>>    - Remove "_rai" and "_m" symbol suffixes which are not standard
>> * irq-econet-en751221.c
>>    - Use cleanup.h _guard() and _free()
>>    - Separate irq_domain_ops from irq_chip, eliminating econet_intc struct
>>    - Remove irqsave in econet_wreg, irqs are already disabled in mask/unmask
>>    - Add explainatory comments
>>    - Refactor shadow logic for clarity, e.g. INTC_NO_SHADOW -> NOT_PERCPU
>>    - Improve error handling in case of invalid DTS
>> * econet,timer-hpt.yaml
>>    - Rename to econet,timer-en751221.yaml
>>    - Impose rule: "reg" must have 1 item on EN751221 and 2 on EN751627
>> * timer-econet-hpt.c
>>    - Rename to timer-econet-en751221.c to follow naming scheme from DT
>> * econet,en751221-intc.yaml
>>    - Fix validation error from required: interrupt-parent
>>    - shadow-interrupts -> switch to uint32-matrix for list of pairs
>> * MAINTAINERS -> Fixed accidental F: MAINTAINERS
>> * Replace "test image" with device SmartFiber-XP8421-B
>> * Restructure arch/mips/econet/Kconfig per arch/mips/ralink example
>> * v1->v2 diff is offered for reference:
>>    - https://gist.github.com/cjdelisle/bb3acab78b5f70dcdfe5dd6338293efe
>>
>>
>> Caleb James DeLisle (7):
>>    dt-bindings: timer: Add EcoNet EN751221 "HPT" CPU Timer
>>    clocksource/drivers: Add EcoNet Timer HPT driver
>>    dt-bindings: mips: Add EcoNet platform binding
>>    mips: Add EcoNet MIPS platform support
>>    dt-bindings: vendor-prefixes: Add SmartFiber
>>    mips: dts: Add EcoNet DTS with EN751221 and SmartFiber XP8421-B board
>>    MAINTAINERS: Add entry for newly added EcoNet platform.
>>
>>   .../devicetree/bindings/mips/econet.yaml      |  26 +++
>>   .../bindings/timer/econet,en751221-timer.yaml |  80 +++++++
>>   .../devicetree/bindings/vendor-prefixes.yaml  |   2 +
>>   MAINTAINERS                                   |  12 +
>>   arch/mips/Kbuild.platforms                    |   1 +
>>   arch/mips/Kconfig                             |  25 ++
>>   arch/mips/boot/compressed/uart-16550.c        |   5 +
>>   arch/mips/boot/dts/Makefile                   |   1 +
>>   arch/mips/boot/dts/econet/Makefile            |   2 +
>>   arch/mips/boot/dts/econet/en751221.dtsi       |  67 ++++++
>>   .../econet/en751221_smartfiber_xp8421-b.dts   |  19 ++
>>   arch/mips/econet/Kconfig                      |  48 ++++
>>   arch/mips/econet/Makefile                     |   2 +
>>   arch/mips/econet/Platform                     |   5 +
>>   arch/mips/econet/init.c                       |  78 +++++++
>>   drivers/clocksource/Kconfig                   |   8 +
>>   drivers/clocksource/Makefile                  |   1 +
>>   drivers/clocksource/timer-econet-en751221.c   | 216 ++++++++++++++++++
>>   18 files changed, 598 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/mips/econet.yaml
>>   create mode 100644 Documentation/devicetree/bindings/timer/econet,en751221-timer.yaml
>>   create mode 100644 arch/mips/boot/dts/econet/Makefile
>>   create mode 100644 arch/mips/boot/dts/econet/en751221.dtsi
>>   create mode 100644 arch/mips/boot/dts/econet/en751221_smartfiber_xp8421-b.dts
>>   create mode 100644 arch/mips/econet/Kconfig
>>   create mode 100644 arch/mips/econet/Makefile
>>   create mode 100644 arch/mips/econet/Platform
>>   create mode 100644 arch/mips/econet/init.c
>>   create mode 100644 drivers/clocksource/timer-econet-en751221.c
> applied patches 3-7 to mips-next

Thank you very much, and also thanks to everyone who helped review and 
apply the others.


Thanks,

Caleb


>
> Thomas.
>