Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIPS: uaccess: emulate Ingenic LXW/LXH/LXHU uaccess #14

Closed
wants to merge 32 commits into from

Commits on Dec 12, 2022

  1. dt-bindings: power/supply: ingenic: Include power-supply.yaml

    This allows the battery node in Ingenic SoCs to have a "power-supplies"
    property.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    986aaed View commit details
    Browse the repository at this point in the history
  2. dt-bindings: power/supply: ingenic: Add compatible strings for JZ4760(B)

    Add ingenic,jz4760-battery and ingenic,jz4760b-battery compatible
    strings for the JZ4760 and JZ4760B SoCs respectively.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    000bbc5 View commit details
    Browse the repository at this point in the history
  3. dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs

    Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings,
    and make the ingenic,jz4770-phy compatible string require
    ingenic,jz4760-phy as a fallback, since both work the same, and the
    JZ4760 SoC is older.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    7a82540 View commit details
    Browse the repository at this point in the history
  4. dt-bindings/pinctrl: ingenic: Add compatible for JZ4760B

    The JZ4760B is pin-compatible with the JZ4760, but has configurable skew
    rate and drive strength that the JZ4760 lacks.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    17a3e2c View commit details
    Browse the repository at this point in the history
  5. dt-bindings: bcm4329-fmac: Add ingenic,iw8103-fmac compatible string

    The MIPS CI20 board has a Ingenic IW8103 chip, which is supposedly just
    a rebranded Broadcom BCM4330.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    10aa752 View commit details
    Browse the repository at this point in the history
  6. dt-bindings: Convert active-semi PMIC docs to YAML schemas

    Create YAML bindings for the Active-semi PMICs and remove the old text
    files.
    
    The bindings aren't perfect, for instance I couldn't find good
    descriptions for the vendor properties in the "charger" node of the
    ACT8945A because I am not familiar with the hardware and these
    properties were not documented anywhere.
    
    The YAML schemas are a bit different than what is described in the old
    text files, because these were sometimes wrong or had missing
    information. This is the case for the ACT8600 documentation, which
    specified the valid node names for the regulators, while the driver was
    expecting different names. This led to the current situation where we
    have two different boards using different names for the regulators:
    - arch/mips/boot/dts/ingenic/ci20.dts uses the names documented in the
      text file,
    - arch/mips/boot/dts/ingenic/gcw0.dts uses the names that the driver
      expects.
    In theory, the driver should be fixed to follow the documentation, and
    accept both naming schemes. In practice though, when the PMIC node was
    added to the ci20.dts board file, the names were already wrong in
    regards to what the driver expected, so it never really worked
    correctly and wasn't tested properly. Furthermore, in that board the
    consumers of the regulators aren't working for various other reasons
    (invalid GPIOs, etc.).
    
    For that reason, for the ACT8600 bindings I decided to only use the node
    names that the driver expects (and that gcw0.dts uses), instead of
    accepting both old and new names. A follow-up patch will update the CI20
    board to use the new regulator names.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    
    ---
    v2:
    - Avoid | character in descriptions that can be single-line
    - Remove unevaluatedProperties when additionalProperties is also present
    - Remove useless inner parentheses in regular expressions
    - Rename I2C nodes to just... i2c
    - Remove node handles
    
    v3:
    - Fix alignment in examples
    - Drop useless status = "okay"; in examples
    - I set myself as the maintainer, which I only did because nobody else
      seems to care.
    
    Cheers,
    -Paul
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    fae9dc9 View commit details
    Browse the repository at this point in the history
  7. drm: bridge: it66121: Move VID/PID to new it66121_chip_info structure

    This will make it easier later to introduce support for new chips in
    this driver.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    6267f7b View commit details
    Browse the repository at this point in the history
  8. drm: bridge: it66121: Add support for the IT6610

    Add support for the IT6610 HDMI encoder.
    
    The hardware is very similar, and therefore the driver did not require
    too many changes. Some bits are only available on the IT66121, and
    vice-versa. Also, the IT6610 requires specific polarities on the DE and
    pixel lines.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    1e9c1e7 View commit details
    Browse the repository at this point in the history
  9. MIPS: ingenic: Add support for new JZ4770 based boards

    Add support for the YLM (known as the Anbernic in the western
    world) RG-280V, RG-280M, RG-300X, RG-350, RG-350M, and the Wolsen
    PocketGo2 (aka. PlayGo) Rev. 1 & 2.
    
    The YLM RG-280V is almost a carbon copy of the GCW-Zero, with a
    different LCD panel (320x480 non-square pixels in diamond pattern),
    L2/R2 and Vol +/- buttons added, and with the analog stick, ACT8600
    regulator, RDA5807 radio, MXC6225 accelerometer, ITE6610 HDMI chips
    removed.
    
    The YLM RG-280M v1.1 is a RG-280V with a clickable analog stick. The
    v1.0 additionally has a ITE66121 chip.
    
    The Wolsen PocketGo2 Rev. 1 & 2 are similar to the RG-280V, with a
    proper 320x240 IPS screen this time.
    
    The RG-350 is a RG-280M v1.0 with two clickable analog sticks, and
    a proper 320x240 IPS screen.
    
    The RG-350M is a RG-350 with a 640x480 IPS screen.
    
    The RG-300X is a RG-350 without joysticks.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    b37a297 View commit details
    Browse the repository at this point in the history
  10. MIPS: ingenic: Add support for the JZ4760(B)

    Add Kconfig symbols and Device Tree files to support the JZ4760 and
    JZ4760B SoCs from Ingenic.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    7b0ee3e View commit details
    Browse the repository at this point in the history
  11. MIPS: ingenic: Add support for the YLM RS-97 and RG-300

    The RS-97 from Shenzhen Yangliming Electronic Technology Co., Ltd,
    aka YLM, aka Anbernic, is a simple handheld console based around the
    JZ4760 SoC.
    
    The RG-300 has the exact same board design, but uses a different LCD
    panel and a JZ4760B SoC.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    bafefd6 View commit details
    Browse the repository at this point in the history
  12. MIPS: ingenic: Add support for the QishengLong Gopher 2(B)

    Add support for the QishengLong Gopher 2, which is a handheld that
    features the Ingenic JZ4760 SoC.
    
    Also support the QishengLong Gopher 2B, which is the exact same handheld
    with some cosmetic changes, and a JZ4760B SoC.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    c3f623b View commit details
    Browse the repository at this point in the history
  13. MIPS: ingenic: Add support for the Wolsen LDK

    The Wolsen LDK are small handhelds with a 320x480 4:3 TFT LCD screen
    (non-square pixels).
    
    Two versions exist, one with a vertical layout (buttons below the
    screen) and one with a horizontal layout (buttons on the sides of the
    screen). Apart from that difference, the vertical version uses the
    JZ4760B SoC, while the horizontal version uses the JZ4760 SoC.
    
    Both are carbon copies of the RS-97 board, except for the different SoC
    (for the vertical LDK) and a different panel used.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    220873d View commit details
    Browse the repository at this point in the history
  14. MIPS: ingenic: Add support for the Pap KIIIS and YLM RS-07

    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    b6535c1 View commit details
    Browse the repository at this point in the history
  15. mips: ingenic: jz4770: Add hwlock node

    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    e12b79f View commit details
    Browse the repository at this point in the history
  16. MIPS: ingenic: gcw0: Set reset pin assert time to 500ms

    Make sure that the handheld won't power on, unless the reset pin is
    active for 500ms or more.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    6c1f4f0 View commit details
    Browse the repository at this point in the history
  17. mips: ingenic: Remove useless __maybe_unused

    These flags are useless in this case as the code referencing these data
    structures is always seen by the compiler (and not behind #ifdef
    guards).
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    ddf807e View commit details
    Browse the repository at this point in the history
  18. mips: ingenic: Enable EXT/2 divider on JZ4750/55/60 if EXT is 24 MHz

    The JZ4750, JZ4755 and JZ4760 (non-B version) support using a 24 MHz
    external crystal oscillator instead of the typical 12 MHz one.
    
    However, most of the SoC's IP blocks only work with a 12 MHz clock.
    Thanksfully, there is a /2 divider we can enable when a 24 MHz external
    crystal is present.
    
    Force-enable this /2 divider when the oscillator is 24 MHz, so that the
    SoC always uses a 12 MHz clock internally.
    
    It is done here, and not in the clocks driver, because we need the EXT
    clock to be 12 MHz for the early console to work, and the clocks driver
    probes way too late.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    dbc8754 View commit details
    Browse the repository at this point in the history
  19. MIPS: DTS: JZ4780: Add missing #clock-cells to RTC node

    The RTC module does provide a clock named "osc32k". On the CI20 board,
    this clock is supplied to the Bluetooth module and must be enabled for
    the Bluetooth and WiFi functionalities to work properly.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    c48186e View commit details
    Browse the repository at this point in the history
  20. MIPS: DTS: qi_lb60: Don't use unit address for regulators

    The regulators don't have any "reg" property, and therefore shouldn't
    use an unit address in their node names.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    19b8344 View commit details
    Browse the repository at this point in the history
  21. MIPS: DTS: CI20: fix reset line polarity of the ethernet controller

    The reset line is called PWRST#, annotated as "active low" in the
    binding documentation, and is driven low and then high by the driver to
    reset the chip. However in device tree for CI20 board it was incorrectly
    marked as "active high". Fix it.
    
    Because (as far as I know) the ci20.dts is always built in the kernel I
    elected not to also add a quirk to gpiolib to force the polarity there.
    
    Fixes: db49ca3 ("net: davicom: dm9000: switch to using gpiod API")
    Reported-by: Paul Cercueil <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>
    dtor authored and pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    2cf5d9d View commit details
    Browse the repository at this point in the history
  22. MIPS: DTS: CI20: Don't use unit address for regulators

    The regulators don't have any "reg" property, and therefore shouldn't
    use an unit address in their node names.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    08d49c2 View commit details
    Browse the repository at this point in the history
  23. MIPS: DTS: CI20: Regulators are active high

    No need to specify the GPIO_ACTIVE_LOW flag, it will be ignored.
    
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    3c6848f View commit details
    Browse the repository at this point in the history
  24. MIPS: DTS: CI20: Fix ACT8600 regulator node names

    The Device Tree was using invalid node names for the ACT8600 regulators.
    To be fair, it is not the original committer's fault, as the
    documentation did gives invalid names as well.
    
    In theory, the fix should have been to modify the driver to accept the
    alternative names. However, even though the act8865 driver spits
    warnings, the kernel seemed to work fine with what is currently
    supported upstream. For that reason, I think it is okay to just update
    the DTS.
    
    I removed the "regulator-name" too, since they really didn't bring any
    information. The node names are enough.
    
    Fixes: 73f2b94 ("MIPS: CI20: DTS: Add I2C nodes")
    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    4ec6dca View commit details
    Browse the repository at this point in the history
  25. MIPS: DTS: CI20: Misc. cleanups

    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    78996dd View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    0af85ee View commit details
    Browse the repository at this point in the history
  27. Merge branches 'for-upstream-adc', 'for-upstream-clk', 'for-upstream-…

    …drm', 'for-upstream-dts', 'for-upstream-hdmi', 'for-upstream-iio', 'for-upstream-lto', 'for-upstream-mips', 'for-upstream-mmc', 'for-upstream-panel', 'for-upstream-phy', 'for-upstream-pwm', 'for-upstream-radio', 'for-upstream-remoteproc', 'for-upstream-rtc', 'for-upstream-sound', 'for-upstream-slub' and 'for-upstream-usb' into jz-6.1-base
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    7644fb9 View commit details
    Browse the repository at this point in the history
  28. MIPS: Disable RIXI and PTE_SPECIAL for MIPS32

    This frees up a PTE bit so that we can use hugepages.
    
    HACK. NOT FOR UPSTREAM
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    28124a0 View commit details
    Browse the repository at this point in the history
  29. Revert "MIPS: ingenic: Remove CPU_SUPPORTS_HUGEPAGES"

    This reverts commit 69b686d.
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    1ccf385 View commit details
    Browse the repository at this point in the history
  30. mips: Clang does not support virtualization

    Signed-off-by: Paul Cercueil <[email protected]>
    pcercuei committed Dec 12, 2022
    Configuration menu
    Copy the full SHA
    3c600e9 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    0a5d749 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2022

  1. MIPS: uaccess: emulate Ingenic LXW/LXH/LXHU uaccess

    The patch tries to emulate unaligned access for Ingenic
    LXW/LXH/LXHU instructions of MXU subsystem.
    
    The unaligned access is produced by GCC compiler with patches
    for adding LX__ instructions but observed only on mips32r2,
    mips32r1 seems to be unaffected.
    
    Signed-off-by: Siarhei Volkau <[email protected]>
    SiarheiVolkau committed Dec 19, 2022
    Configuration menu
    Copy the full SHA
    427b930 View commit details
    Browse the repository at this point in the history